What Senior and Staff AI Engineer loops test, ranked from reported questions: RAG, agents, evals, prompt injection, LLM-plumbing code and AI-assisted rounds, and which labs prepare you for each.
This chapter is for you if you have spent years on backend or distributed systems and want a Senior or
Staff applied-AI role. You get the loop shape, ten ranked themes with what a strong answer covers, a section
each on evals and prompt injection, Senior vs Staff signals and a lab-based prep path. It is built from the 154
questions in the bank tagged AI Engineer or both tracks (as of 2026-10-11). Most rest on one anonymous account
or a prep site, so every claim below says where it comes from. “Reported” means a candidate or a prep site
said so, not that the company confirmed it.
The role at Senior and Staff
An AI Engineer builds products on top of models they did not train: retrieval, agents, tool use, evals,
latency and cost. It is not ML research, and most loops do not test model math. The Forward Deployed
Engineer (FDE) title is a customer-facing version of the same job. By May 2026 the Pragmatic Engineer
described FDE work as roughly 25% coding, 50% integration and 25% customer-facing
(The Pragmatic Engineernews · 24 May 2026).
The research behind this guide found one pattern that works in your favor: many AI Engineer questions are
distributed-systems questions with an LLM in the middle. An access-control-aware multi-tenant index, a
versioned prompt store, connector freshness after an outage, a batching scheduler. You already know how to
answer those. The two gaps the research points to are evals and a clear account of a RAG or agent
system you built yourself, with numbers.
At Senior and Staff, coding mostly filters and the design and behavioral rounds set the level. In a Blind
thread about a Meta E6 “AI native” loop (two AI-enabled coding rounds, two design rounds and a behavioral, per
the recruiter), commenters described coding as effectively pass or fail and said design and behavioral set the
level (Blindfirst-hand).
What the loop looks like
A typical reported shape: a recruiter call, one or two technical screens, then four to six onsite rounds
drawn from the list below. Which rounds you get depends on the company and the team.
Round
What candidates report
Sources
Practical coding
Long, multi-part builds whose requirements change: a credit ledger with expiring credits, a resumable iterator, paging through an API, retries with backoff
A multi-file codebase with an assistant (Meta, LinkedIn); any tool allowed (Canva, Shopify); an agent-coding round (Stripe); Perplexity’s portal lists an “Agentic Coding” round that requires coding agents
Anthropic: no AI in live interviews or take-homes unless told otherwise. Cursor: no AI beyond autocomplete in first screens. OpenAI: reported banned except a beta agentic round
Cursor: two days in the office on a real project, per its CEO; a July 2026 report calls its trials unpaid. Foxglove runs trials for every role and says “We expect you to use AI”
Rules change by round, even inside one company. One Apple candidate had a round advertised as “any tool
allowed” in which no tool was used (Aced (formerly Exponent)first-hand · 2026). Ask your recruiter about each round. The
company cards list each reported loop and AI-tool policy with
dates.
Ranked themes
Themes are listed in the site’s rank order, which comes from how many sourced rows touched each theme in
the first research pass. The number after each heading is how many rows the bank holds today for that
theme (AI Engineer plus both-track rows). The two orders differ in places: the second research pass added
many AI-assisted round reports (21 of the 26 are tagged both tracks), and practical-coding reports
outnumber security ones. Each theme ends with a link to its questions in the bank.
1. RAG and retrieval quality (21)
What gets asked. Design a multi-tenant enterprise RAG assistant with hybrid keyword and vector retrieval,
reranking, permission-aware retrieval and citations; PracHub’s version adds how fast a deleted document
stops appearing in answers (PracHubaggregator). Harvey had a candidate build bare-bones embedding
RAG in Colab and then asked how to improve its evaluation with recall and hit rate (PracHubfirst-hand · Aug 2026).
A Google “AI Infrastructure Engineer” round still opened with enterprise RAG design (Aced (formerly Exponent)first-hand · 2026).
A strong answer separates indexing from serving, ties chunk size and k to the corpus and the questions
users ask, combines lexical and dense retrieval, reranks a shortlist, and states retrieval quality as a
number. It decides where the access check runs: filtering inside retrieval keeps forbidden documents out of
the candidate set; filtering after ranking is simpler but can empty the top-k and leak through timing. One
prep guide calls fixed 512-token chunks “the lazy default” because they cut sentences in half, and warns that
raising k buys recall at the cost of context, latency and distractors (techinterview.orgsecondary).
Senior vs Staff. Senior builds the pipeline and measures recall@k. Staff puts a number on deletion
latency, decides who owns the eval set, and prices re-indexing when the embedding model changes.
Labs.Build Your Own RAG System builds dense, hybrid (BM25 plus dense with reciprocal rank fusion) and
reranked retrieval, measured on a public benchmark (see the prep path below). Build Your Own Vector Index (HNSW + IVF-PQ) covers HNSW, IVF and PQ, but not filtered search.
Build Your Own Embedding Pipeline covers batching, caching and model versioning. Gaps: chunking
beyond fixed-size windows, faithfulness scoring and ACL-filtered vector search have no lab yet.
RAG questions.
2. Agent design and reliability (20)
What gets asked. Design a support agent whose loop answers, calls a tool or hands off to a human on each
turn, and never gets stuck (Sierra, prep guide, techinterview.orgsecondary). Sierra’s debugging round hands you a 4–5 file agent
codebase and a diagram of correct behavior and asks you to find about three bugs (gaijineer.cofirst-hand).
A Snowflake ML engineer onsite asked for the common components of agent memory (PracHubfirst-hand · 24 Sep 2026).
A strong answer keeps control flow in the orchestrator, not the prompt. It sets explicit stop conditions
(step budget, token budget, repeated-action detection), validates tool arguments against a schema, makes
tools idempotent so retries are safe, and traces every step. It hands off to a human when confidence is low;
one guide puts it as “a low-confidence escalation path matters more than a clever prompt”
(techinterview.orgsecondary).
Senior vs Staff. Senior designs the loop and its failure handling. Staff says where an agent is the wrong
tool (an Apple report asked when deterministic code is better, Interview Querysnippet only) and sets what the
agent may do without a human. The Harvey candidate thinks they overcomplicated their multi-agent
design (PracHubfirst-hand · Aug 2026).
What gets asked. A take-home with 50 markdown documents: build Q&A plus a 20-question eval set and report
recall@5 and faithfulness; a variant calibrates an LLM judge against human labels on 30 pairs
(techinterview.orgsecondary). A Sierra prep guide asks for eval sets and a regression process for prompt or
model swaps (techinterview.orgsecondary). An OpenAI FDE prep guide asks how you know an assistant is good
enough to roll out to the next team (theforwarddeployed.iosecondary). Evals get their own section below.
Eval questions.
4. Security, permissions and prompt injection (9)
What gets asked. Summarize product reviews with an LLM while defending against injection through the
review text, sanitizing input and handling PII (Google, first-hand, PracHubfirst-hand · Oct 2026). Design
per-tool permissions so injected text can never reach billing writes (Sierra, prep guide,
techinterview.orgsecondary). How would
you stop a coding agent leaking private source code (Meta, aggregator, PracHubaggregator)? See the
section below. Security questions.
5. Practical LLM-plumbing code (17)
What gets asked. Call an endpoint that fails intermittently until it succeeds, then resolve products
through fallback IDs, with a new requirement in each follow-up (Sierra, gaijineer.cofirst-hand). Page
through an API and compute over the JSON (Sierra Senior, rejected, Acedfirst-hand). Implement a
resilient pool of LLM providers with failover (Perplexity, PracHubaggregator). A Cursor guide lists
parsing partial or malformed streamed tokens (techinterview.orgsecondary · 2026).
A strong answer is correct, readable code, finished fast. It puts a timeout on every call, separates
retryable errors (429, 5xx, timeouts) from the rest, uses exponential backoff with jitter and a retry budget,
opens a circuit per provider, and makes writes idempotent. A streaming parser buffers partial chunks instead
of assuming whole tokens.
Senior vs Staff. Both level-tagged Senior reports in the research (Sierra, Harvey) ended in rejection on
long practical problems; the advice is speed in your own language. A Staff OpenAI candidate called the coding
question “rather long” and suggested using the interviewer to focus on the parts that matter
(Hello Interviewsecondary · 2026).
What gets asked. Design an inference service that batches waiting requests where each batch takes 100 ms
(Anthropic, aggregator, PracHubaggregator). Diagnose high latency across an LLM pipeline and say
where batching and caching help (OpenAI, first-hand, gaijineer.cofirst-hand). A LinkedIn project deep
dive asked how tokens were allocated and whether pricing was per query or per token (Aced (formerly Exponent)first-hand · 2026).
A strong answer argues in tokens first: prompt and output lengths, fan-out, cache-hit rate, then which
model tier each step needs. It treats time to first token and inter-token latency as separate budgets.
Hello Interview’s OpenAI guide says the company name alone isn’t a reason to prepare GPU infrastructure;
prepare for the team you’re interviewing with (Hello Interviewsecondary · 2026). One unverified Blind comment says Staff loops expect you to go into KV cache,
batching and eval design (Blindfirst-hand). The AI Infra back-of-envelope sheet
has the formulas. Lab: Build Your Own LLM Inference EnginePartial.
7. AI-assisted coding rounds (26)
What gets asked. Meta’s round is about 60 minutes in a multi-file CoderPad project: fix a bug, implement
the core logic, then optimize for larger inputs. The assistant answers in chat, you write the code, and the
grading covers problem solving, code quality, verification and communication, not prompting
(Hello Interviewsecondary · 16 Feb 2026). A LinkedIn candidate finished 2 of 4 staged parts (LRU, then TTL, then thread
safety) and said fixing the AI’s mistakes took most of the time (PracHubfirst-hand · Aug 2026).
A strong answer states the plan before prompting, asks for small pieces, runs the tests after each one,
reads every diff, and catches invented helpers; one Meta candidate reports the model inventing functions that
did not exist in the codebase (Aced (formerly Exponent)first-hand · 2026). Miscalibration cuts both ways: a Meta MLE was told
“less manual work, more on AI” (PracHubfirst-hand · Jul 2026), while a rejected Stripe Staff candidate
believes letting the agent drive counted against them (PracHubfirst-hand · Aug 2026).
What gets asked. Walk through a RAG project you built: sources, retrieval, evaluation, what broke, how
you catch answers drawn from stale documents (Amazon, aggregator, PracHubaggregator · Oct 2026). “Is there an
actual eval framework here, or is it vibes-based?” (OpenAI, snippet, Exponent (Medium)snippet only). Why did you
use an LLM, and how did you know it fit (Anthropic, aggregator, Aced (formerly Exponent)aggregator)?
A strong answer says “I”, not “we”, for the parts you built, and brings three numbers: retrieval or task
quality, cost per request, and latency. It names what broke and what you changed because of it. Staff
answers also defend what the project cost against what it returned.
Deep-dive questions.
9. Customer discovery and scoping (4)
What gets asked. In an OpenAI FDE round, a candidate started on architecture and the interviewer stopped
them to ask what they would ask the customer first (gaijineer.cofirst-hand). Cohere’s FDE debugging round
says “requests are failing” and gives you only a diagram, no logs (gaijineer.cofirst-hand).
A strong answer runs discovery before architecture: who the users are, whether the flow is interactive or
agentic, what the corpus looks like, and whether the system writes data
(Formation, secondary).
No lab covers this.
10. Fine-tuning vs RAG vs prompting (6)
What gets asked. When would you fine-tune, use RAG, or just improve the prompt (OpenAI, first-hand,
gaijineer.cofirst-hand)? An Amazon GenAI-team phone screen mixed fine-tuning, embeddings, the KV cache
and RAG evaluation (snippet, 1point3acressnippet only).
A strong answer starts with the prompt, uses retrieval for knowledge that changes or needs citations, and
uses fine-tuning for format, style or moving a task to a smaller model. The eval set decides, not taste.
Lab: Build Your Own LoRA Fine-Tuning PipelinePartial.
Also in most loops: classic DSA (7) and behavioral (10)
Classic coding hasn’t gone away; see the table above. Behavioral rounds increasingly ask about AI use itself:
“tell me about a time AI gave you wrong or harmful output” (Amazon, aggregator, PracHubaggregator · Oct 2026) and
“what is your view of AI?” (Microsoft, aggregator, PracHubaggregator).
Evals: the differentiator
The research names evals as the clearest differentiator for applied candidates. Eugene Yan and Jason Liu, writing as hiring
managers in July 2024, said even engineers who only call APIs should build eval harnesses, track performance
over time and add guardrails (Eugene Yan, secondary). A
paid course calls evals the “weed out” part of interviews; that is a vendor claim
(Hamel Husain). The research found no company
that officially runs a standalone eval round. Evals come up inside design rounds, take-homes and project deep
dives, usually as “how do you know it works?”
Build the eval set from real failures
“A customer says your bot feels dumb. What do you change first?” (techinterview.orgsecondary). Start by turning
the complaint into labeled cases you can count. Pull them from production logs, thumbs-down events, support
tickets and escalations. Tag each with a query type, so you can see which slice regressed. Every incident
becomes a test. Keep a held-out slice you never tune prompts against.
Then check the set is big enough to detect the change you care about:
Is the eval set big enough?
standard error of a pass rate = √( p × (1 − p) ÷ n ) 95% interval ≈ p ± 1.96 × SE
p
measured pass rate (0 to 1)
n
number of eval items
SE
standard error of p
Worked example
n = 20, p = 0.8: SE = √(0.8 × 0.2 ÷ 20) = √0.008 = 0.089, so the interval is ±17.5 points. One question is 5 points.
n = 200, p = 0.8: SE = √(0.16 ÷ 200) = 0.028, so the interval is ±5.5 points.
Illustrative inputs. When you compare two prompts on the same items, use a paired test instead: it removes per-item difficulty and detects smaller differences.
A 20-question set, the size one take-home asks for, can’t tell a 5-point regression from noise. Say so in the
interview, and say what size you would grow it to. A paired test helps but doesn’t remove the need for size:
the llm-eval lab’s simulation found that with 500 items, the smallest true gap its paired bootstrap catches
80% of the time is 5.0 / 7.3pp(measured on Apple M1 Ultra, 64 GB RAM, Python 3.13.7, numpy 2.5.4 (CPU, single thread), 2026-10-11 · llm-eval lab), when the two versions
disagree on 20% or 40% of items.
Measure retrieval and generation separately
If you only score the final answer, you can’t tell a retrieval miss from a generation error. Measure
retrieval with recall@k or hit rate (did a gold passage reach the top k?) and MRR or NDCG when rank order
matters, the split one prep guide uses (techinterview.orgsecondary). Measure generation with
faithfulness (is every claim supported by the retrieved context?), answer relevance, and citation
correctness. Harvey’s follow-up on recall and hit rate (PracHubfirst-hand · Aug 2026) and the OpenAI FDE question
on how specific results should be (Acedfirst-hand · 2026) are both versions of this.
Calibrate the judge against human labels
An LLM judge is a model too. One prep guide counts trusting a judge you haven’t checked against human labels
as a weak answer (techinterview.orgsecondary), and an Apple question asks when you would trust an LLM judge rather than human
judges (PracHubaggregator). Label a sample by hand, run the judge on it, and report agreement corrected
for chance:
Judge agreement corrected for chance (Cohen's kappa)
A judge that always says "faithful" agrees on 21 of 30 (70%) and has κ = 0.
Illustrative inputs. Raw agreement looks good whenever one label dominates; kappa shows how much of it is real.
Also check the known judge biases (position, length, preferring its own model’s output), pin the judge model
and prompt version, and re-run the calibration whenever either changes.
Gate every prompt and model swap
Treat a prompt change like a code change. Version prompts immutably (Anthropic’s prompt-playground question
asks for exactly this, PracHubaggregator). Run the offline eval in CI on every prompt, model or
retrieval change, compare against the current version on the same items with a paired test, and block on
per-slice thresholds, not just the average. Then canary the change with online metrics; for a support agent,
that means containment and escalation rates (techinterview.orgsecondary). Keep the rollback one flag flip
away.
Percentage rollout and targeting: the canary half of a regression gate.
LLM-as-judge and faithfulness scoring are a gap: no lab builds them yet (planned as llm-judge-evals).
Prompt injection and permissions
What gets asked, beyond the theme examples above: design MCP servers and tool permissions so analysts can
query five siloed systems through Claude, with explicit trust boundaries (theforwarddeployed.iosecondary); build a
sales-insights agent that refuses requests for personal data (Cohere take-home, AI Engineering Field Guide (GitHub)secondary);
what happens downstream when a party’s data access is revoked (Cohere design follow-up,
PracHubfirst-hand · Apr 2026).
What a strong answer covers:
All retrieved and tool-returned text is untrusted data. Injection arrives through review text, web
pages, emails, documents and tool output, not only the user’s message.
Permissions live outside the model. Authorize every tool call against the end user’s identity and
scopes, not the agent’s service account. Deny by default. Split read tools from write tools. The model
cannot grant itself access, whatever the text says.
Irreversible actions need a gate. Human approval, confirmation, amount and rate limits. One reported
take-home asks for an inbox agent that waits for approval before it acts (AI Engineering Field Guide (GitHub)secondary).
Close the exfiltration paths. Don’t auto-render links or images to arbitrary domains, allowlist tool
egress, and redact PII before it reaches the model or the logs.
Access control inside retrieval. The RAG theme again: a document the user can’t read should never
reach the context window, and revocation has a stated propagation time.
Test it. Injection cases go into the eval set and the regression gate. Log and audit every tool call.
No prompt makes injection impossible, so design for a bounded blast radius when the model is confidently
wrong. Staff answers say who owns the policy across systems and how an audit would reconstruct what the agent
did.
No AI lab publishes a Senior-vs-Staff rubric for AI Engineer roles. This is pieced together from
level-tagged reports and level guides.
AI Engineer loops
Senior
Finishes long, multi-part practical problems under time pressure; both level-tagged Senior rejections happened here (Acedfirst-hand, Acedfirst-hand).
Reaches a coherent design within the session, defends the internals and drives without waiting for direction (Hello Interviewsecondary · 2026).
In AI-assisted rounds, scrutinizes the output instead of accepting it (interviewing.iosecondary).
States retrieval quality as a number and knows which metric answers which question.
Staff
Designs from the actual requirements, not a memorized template; that was the explicit feedback on a rejected Stripe Staff loop (PracHubfirst-hand · Aug 2026).
Design depth sets the level: a Google L6 guide says strong coding with L5-level design can get you down-leveled (snippet, Hello Interviewsnippet only), and Hello Interview calls design “the part of the loop that most drives your E6 level determination” at Meta (Hello Interviewsecondary).
Product and safety judgment, such as the criteria for releasing a new model, and influencing a peer who disagrees (Hello Interviewsecondary · 2026).
Why candidates get rejected
Each of these is reported, mostly by one candidate or one guide.
Architecture before discovery. The OpenAI FDE redirect (gaijineer.cofirst-hand); a rejected Cohere
candidate said they went deep too early instead of laying out the components first (PracHubfirst-hand · Apr 2026).
Hand-waved evaluation: a prep guide’s list of weak answers includes an unchecked judge and default 512-token chunks (techinterview.orgsecondary).
Too slow on long practical coding: first-hand Sierra and Harvey Senior rejections
(Acedfirst-hand, Acedfirst-hand).
These are the most representative rows for this track. The full bank has every question with filters for
theme, round, company, source type and confidence:
all AI Engineer questions.
Design a multi-tenant enterprise RAG assistant (think ChatGPT Enterprise) with hybrid keyword + vector retrieval, reranking, permission-aware retrieval and citations. PracHub's write-up adds follow-ups: how fast a deleted doc leaves answers, domain-tuning the embedding model, reducing latency and cost for the most frequently asked questions.
ML / LLM system design Medium confidence
Staff signal This is a distributed-systems question with an LLM in the middle. Strong answers decide where the ACL check runs (inside retrieval or after ranking) and put a number on how long a deleted document can still be cited.
Design a Glean-like enterprise research assistant that answers complex questions from internal and external sources, synthesizes findings and outputs a cited report. Follow-ups: caching by question similarity, how citations work, and what happens when a downstream party's data access is revoked.
ML / LLM system design Medium confidence
Staff signal The rejected candidate said they went deep too early and should have laid out the components first, then let the model plan with function calling.
Debugging round: you get a small agent codebase (4-5 files) and a diagram that defines correct behavior. Find the roughly three bugs that make the code disagree with the diagram.
Take-home: build a customer-support agent for a fictional client with a provided API key, then a 60-minute presentation where interviewers ask "why" about your architecture and tool-calling choices.
Take-homeProject presentation / deep dive Medium confidence
How would you use AI to improve the test coverage and reliability of a service? Follow-ups: what if the AI hallucinates, how would you minimize human oversight, and how do you get notified when something fails?
ML / LLM system design Medium confidence
Staff signal This is the verification question in its plainest form. Strong answers say which checks stay human, what the agent may change on its own, and how a bad agent-written test gets caught.
Agent expertise round: design a pipeline that automatically extracts or distills reusable agent skills for enterprise customers. Also: what are the common components of agent memory?
eng-039Applied-AI loops (no single company)·2026Featured
Take-home: given 50 markdown documents, build a Q&A system plus a 20-question eval set, and report recall@5 and faithfulness. (A prep guide's illustrative example, not a specific candidate's take-home.)
Take-home Low confidence
Staff signal Expect to be asked how you know the eval measures quality. Report retrieval quality as a number and explain how the 20 questions were chosen.
Design a platform that ingests e-commerce product reviews and summarizes them with an LLM for an internal dashboard. Focus on trust and safety: prompt injection, data sanitization and PII.
AI-assisted coding round (about 60 minutes): in a multi-file codebase with tests, fix a bug, implement a feature, then handle edge cases and scale. You pick the model; the assistant answers in chat and can't edit files.
AI-assisted coding Medium confidence
Staff signal Reported grading is the usual four (problem solving, code quality, verification, communication), not prompting. Prep sites say E7+ get only this coding round, so it carries the whole coding signal at Staff.
Agent-assisted coding round: implement accept/deny rules for transactions, growing from simple checks to AND/OR to nested parentheses. The candidate believes the interviewer wanted them to drive the design and keep the code modular rather than let the agent write one big solution.
AI-assisted coding Medium confidence
Staff signal The rejected candidate's own read: they let the agent drive. Decompose the problem yourself and keep the code modular, and design from the actual requirements rather than a memorized template.
AI-assisted coding round: build a control system that manages aircraft takeoffs and landings. The problem is deliberately ambiguous and product-shaped, so a single prompt can't solve it.
AI-assisted coding High confidence
Staff signal Canva says it watches when you reach for AI, how you break down requirements, whether you catch flaws in AI output, and whether the result is production quality.
Walk through a RAG project you built: sources, retrieval, evaluation and what broke. Follow-ups: how you detect answers drawn from stale documents, and what the system does when the docs don't cover the question.
Hiring-manager roundBehavioral Medium confidence
Staff signal A weak project story or an inflated "we" is a reported rejection reason. Say what you personally built, with a number for retrieval quality.
An open-ended customer scenario that needs a full AI solution. One candidate started on architecture and the interviewer stopped them: what would you ask the customer first?
System designCustomer roleplay / scoping Medium confidence
Staff signal Discovery before architecture: ask who the users are, whether the flow is interactive or agentic, what the corpus looks like and whether the system writes data, before you name RAG or a database.
Build these in order. Each step says what it lets you claim in an interview. Many lab benchmark tables are
still estimates. The rag, embedding-pipeline and llm-eval numbers quoted here were measured on 2026-10-11;
quote them with the machine they ran on, or better, your own measurement on your own corpus.
ReAct loop, function calling, cost guard, sandbox and parallel tools (mock LLM).
Partial: the agent loop, tools and state handling are real but the LLM is a mock, and 3 of 15 tests fail (the parser can't read nested tool-call JSON) as of 2026-10-11.
Four topics that come up often have no lab yet: an LLM gateway, guardrails, LLM-as-judge evals, and LLM
observability (token counts, time to first token, cost per request). Building one of them yourself, with a
real eval and a write-up, is the kind of validated work the
transition chapter argues for.