Anthropic
AI safety and research company behind Claude, focusing on constitutional AI.
5 Rounds
~20 Days
Very Hard
The Interview Loop
Recruiter Screen (30 min)
Standard fit check, behavioral questions, and resume overview.
Technical Loop (3-4 Rounds)
Deep dive into domain knowledge, coding, and system design.
Interview Question Bank
Software Engineer
•
Coding
•
medium
Implement a token bucket rate limiter for an API endpoint. Extend it to handle distributed rate limiting across multiple servers.
#Concurrency
#API Design
#Distributed Systems
Software Engineer
•
Coding
•
medium
Write a function to parse a raw stream of Server-Sent Events (SSE) and yield complete JSON objects. The network can chunk the data at arbitrary byte boundaries.
#String Manipulation
#Networking
#Streaming
Software Engineer
•
Coding
•
medium
Implement a text chunking algorithm that takes a large document and splits it into chunks of maximum N tokens, ensuring that chunks only break on sentence boundaries.
#NLP
#String Manipulation
#Edge Cases
Software Engineer
•
Coding
•
hard
Write a concurrent web scraper that fetches a list of URLs. It must respect robots.txt, enforce a maximum of N concurrent requests per domain, and handle retries with exponential backoff.
#Concurrency
#Web Scraping
#Error Handling
Software Engineer
•
Coding
•
hard
Implement a basic Byte Pair Encoding (BPE) tokenizer. Given a string of text and a target vocabulary size, write a function to iteratively merge the most frequent adjacent pairs of characters or subwords.
#Strings
#Hash Maps
#Priority Queue
#LLM Fundamentals
Software Engineer
•
Coding
•
hard
Design a streaming JSON parser. In our LLM inference API, Claude streams responses token by token. Sometimes the output is a JSON object, but the client receives it in incomplete chunks. Write a function that takes a stream of characters and yields the deepest valid JSON structure possible at any given moment.
#Parsing
#State Machines
#Trees
#Streaming
Software Engineer
•
Coding
•
medium
Write a rate limiter for an API. The rate limiter should support different limits based on the user's tier (e.g., free vs. paid) and should be based on the number of tokens generated, not just the number of requests.
#Concurrency
#Token Bucket
#Object-Oriented Design
Software Engineer
•
Coding
•
medium
Write a function to compute the cosine similarity between two dense vectors. Then, optimize it to find the top K most similar vectors from a massive list of vectors (e.g., 1 million) as quickly as possible.
#Math
#Arrays
#Heaps
#Optimization
Software Engineer
•
Coding
•
easy
Given a list of conversation logs with start and end timestamps, write a function to merge overlapping intervals to find the total continuous time a user spent interacting with the model.
#Sorting
#Arrays
#Intervals
Software Engineer
•
Coding
•
hard
Implement a text diffing algorithm. Given two strings (an original prompt and an edited prompt), return a list of operations (Insert, Delete, Keep) to transform the original into the edited version.
#Dynamic Programming
#Strings
Software Engineer
•
Coding
•
medium
Write a function that takes a long string of text and a maximum line length, and returns the text word-wrapped. Words longer than the line length should be broken with a hyphen.
#Strings
#Formatting
#Edge Cases
Software Engineer
•
Coding
•
easy
Write a retry decorator in Python that implements exponential backoff with jitter. It should take parameters for maximum retries, base delay, and exceptions to catch.
#Python
#Decorators
#Networking
#Math
Software Engineer
•
Coding
•
medium
Given a Directed Acyclic Graph (DAG) representing a chain of LLM prompts where some prompts depend on the outputs of others, write an execution engine that runs the prompts in the correct order, maximizing concurrency.
#Graphs
#Topological Sort
#Concurrency
#Asyncio
Software Engineer
•
Coding
•
easy
Implement a sliding window algorithm to manage an LLM's context window. Given an array of text chunks with token counts and a maximum token limit, find the contiguous subarray of chunks that maximizes the token count without exceeding the limit.
#Sliding Window
#Arrays
#Two Pointers
Software Engineer
•
Coding
•
medium
Write a program to parse a massive log file (e.g., 50GB) to find the top 10 most frequent IP addresses. You have limited RAM (e.g., 1GB).
#File I/O
#Hashing
#Heaps
#Memory Management
Software Engineer
•
Coding
•
medium
Implement a token bucket rate limiter to throttle incoming API requests based on a user's tier. It should handle concurrent requests safely.
#Concurrency
#Data Structures
#API Design
Software Engineer
•
Coding
•
hard
Write a simplified Byte Pair Encoding (BPE) tokenizer. Given a corpus of text and a target vocabulary size, implement the training loop to find the most frequent adjacent character pairs and merge them.
#String Manipulation
#Hash Maps
#Heaps
Software Engineer
•
Coding
•
medium
Implement a parser for Server-Sent Events (SSE) that consumes a raw byte stream from an LLM and yields complete JSON objects, handling network interruptions and fragmented chunks.
#I/O Streaming
#State Machines
#String Parsing
Software Engineer
•
Coding
•
hard
Write an asynchronous task batcher. It should accept individual requests, wait for either a maximum batch size or a maximum time window, and then process the batch together.
#Asynchronous Programming
#Concurrency
#System Timers
Software Engineer
•
Coding
•
medium
Implement a Trie-based caching mechanism to store and retrieve LLM prompt prefixes, returning the longest matching cached prefix for a new prompt.
#Trees
#Caching
#String Matching
Software Engineer
•
Coding
•
medium
Given a massive log file of API requests, write a script to find the top K users who experienced the highest error rates in a specific 5-minute sliding window.
#Sliding Window
#Heaps
#Log Parsing
Software Engineer
•
Coding
•
hard
Implement a basic Key-Value (KV) cache data structure used in transformer attention mechanisms. It needs to support appending new tokens, evicting the oldest tokens when a max length is reached, and fast retrieval.
#Data Structures
#Linked Lists
#Hash Maps
Software Engineer
•
Coding
•
medium
Given a set of Constitutional AI rules represented as a directed acyclic graph (where edges represent dependencies between rules), write a function to determine a valid execution order.
#Graphs
#Topological Sort
#DFS/BFS
Software Engineer
•
Coding
•
medium
Given a string of text and a list of overlapping highlight annotations (start_index, end_index, label), write a function to merge overlapping intervals and return a flattened list of text segments.
#Intervals
#Sorting
#Arrays
Software Engineer
•
Coding
•
easy
Write a function to manage a sliding context window for an LLM. Given a list of messages and a maximum token limit, return the optimal subset of messages that fits, ensuring the system prompt is always included.
#Arrays
#Greedy Algorithms
#Logic
Software Engineer
•
Coding
•
medium
Implement a thread-safe asynchronous queue from scratch using basic concurrency primitives (mutexes, condition variables).
#Concurrency
#Data Structures
#Synchronization
Software Engineer
•
Coding
•
hard
Write a custom JSON parser that can recover from common malformed outputs generated by LLMs (e.g., missing closing brackets, trailing commas, unescaped quotes).
#Parsing
#String Manipulation
#Heuristics
Software Engineer
•
Coding
•
hard
Given an array of integers representing the execution times of tasks and an integer K representing the number of available workers, write a function to assign tasks to workers to minimize the maximum time spent by any worker.
#Binary Search
#Greedy Algorithms
#Optimization
Difficulty Radar
Based on recent AI-sourced data.
Meet Your Interviewers
The "Standard" Interviewer
Senior EngineerFocuses on core competencies, system constraints, and clear communication.
SimulateUnwritten Rules
Think Out Loud
Always explain your thought process before writing code or drawing architecture.