Skip to content

AI Engineer Interview Daily — 2026-12-03: LLM & Agent Engineering

Dec 3, 20269 min
TL;DRA customer saying a model regressed after an upgrade isn't an argument to win on vibes — treat it as an eval problem: pull production traces, build an eval set, slice by task type, then turn the process itself into a guardrail for the next upgrade.

Look up & save

Loading dictionary…

中文版

Today's Focus

Thursday's fixed topic is LLM & Agent Engineering, and it's different from plain model trivia: interviewers want to see whether you can pinpoint which layer broke — in a RAG pipeline, a tool-calling app, or a full agent loop — and know which tool fixes that layer. Today's most representative probe is "a customer says the model got worse after you upgraded their deployment — what do you do?" This question isn't testing model knowledge at all; it's testing whether you can turn "feels worse" into something measurable, something you can run as a regression test. That's exactly where LLM engineering overlaps most with plain software engineering. We'll also sort out the RAG/tool-calling/agent distinction and the defense-in-depth mindset for prompt injection.

Core Concepts Cheat Sheet

RAG, Tool-Calling, and Agents: the difference is who decides the next step, not which sounds cooler

These three terms get used interchangeably, but what interviewers actually care about is who controls the flow. A RAG app retrieves relevant documents and generates one answer — no loop. A tool-calling app lets the model call functions, but the sequence — "classify first, then look up the order, then answer" — is hardcoded in your code; the model just fills in arguments. An agent hands that decision over to the model too: the model plans, picks tools, judges from results whether to continue, and iterates until it hits the goal or runs out of budget. When asked "is this an agent?", asking "who decides the next step" sorts it out fast — and in practice the three are often stacked together, not mutually exclusive choices.

From RAG to Agent: who decides the next step
From RAG to Agent: who decides the next stepA RAG app retrieves then generates once, no loop. A tool-calling app can call functions, but code decides the next step. An agent hands planning and decisions to the model, which iterates on its own toward a goal. RAG app retrieve + generate, no loop Tool-calling app code decides next step Agent model decides next step

Simplified: the three are often combined in practice — the difference is who controls the flow, not a choice between exclusive techniques.

Prompting → RAG → fine-tuning: escalate only on measured failure, not by default toward complexity

When a customer asks "should we fine-tune," the right order is prompting first, then RAG if that's not enough, then fine-tuning only if that's still not enough — and each step up needs a measured failure as the justification. Prompting's edge is zero infrastructure and instant edits; it fails when the corpus is too big to fit in context, or when too much irrelevant content distracts the model. RAG is close to the default right answer for knowledge-base scenarios: it handles data that changes often (re-index instead of retrain), filters retrieval results by user permissions, and gives citations — but it adds a new failure mode (bad retrieval → wrong answer) that needs retrieval-specific metrics like recall@k. Fine-tuning was never meant for stuffing in knowledge — it's for changing a model's behavioral style or formatting habits. The question interviewers love to probe is "the customer insists on fine-tuning" — can you use data to talk them into RAG instead.

Treat a model upgrade as a regression test, not an argument about feelings

"The customer says the model got worse after an upgrade" is a classic LLM engineering interview scenario, and the core mindset is to treat it as an eval problem, not a vibes debate. First pull production traces from before and after the upgrade. If an eval set already exists (built from real traffic), run both versions on it and compare sliced by task type — because an aggregate average often hides a real regression in one category (extraction fine, tone worse, one language degraded). If there's no eval set, build one on the spot: sample 50-100 recent production inputs, run both versions, and grade them with human labels or a calibrated LLM judge. At the same time, ask the customer directly for 5-10 concrete failing examples — specific failures usually surface the pattern faster than a general impression.

Three common root causes: it's not always that the model actually got worse

When verifying an upgrade dispute, three causes come up repeatedly. First, the old prompt was written around the previous model's quirks, and the new model's changed behavior breaks it — the fix is revising the prompt, not rolling back the model. Second, output-format drift: the new version's output got longer or restructured and broke a downstream parser — the fix is structured outputs or stricter format instructions. Third, there's a genuine capability regression on the customer's specific task — only this case justifies temporarily pinning the old version and escalating examples to the model team. Figuring out which one it is determines whether you fix the prompt, the parser, or the version itself.

Prompt injection has no complete fix — defense is about limiting blast radius, not finding one magic filter

When an agent reads untrusted content (web pages, customer documents, email) and can also call tools, the honest starting premise is that prompt injection has no complete fix today — instructions and data share the same channel, and a sufficiently clever payload looks like ordinary data. So the answer is defense-in-depth plus blast-radius limiting, not a single filter. To reduce susceptibility: state explicitly in the system prompt that retrieved content is data, not instructions. The real security lives in limiting blast radius: tool access follows least privilege (an email assistant doesn't need delete permissions), credentials are scoped per user and per session, irreversible or data-exfiltrating actions (send, delete, outbound HTTP POST) require human confirmation with a UI that clearly shows what will actually be sent, and deny-by-default egress means an injected instruction can't even POST data out if arbitrary network calls aren't an available tool. Finally, detection: log every tool call with its triggering context, and continuously red-team with an injection corpus so regressions in your defenses get caught like any other regression. The design mindset is to assume the model will be successfully injected sometimes, and make that event low-consequence.

Today's Practice Question

The Question

A customer tells you the model "got worse" after you upgraded the model version in their deployment. How do you verify this, and how do you respond?

Source: OpenAI AI Engineer interview question (ombharatiya/AI-Engineer-Interview-Questions, updated 2026-11) Difficulty: Advanced Round: Onsite (Forward Deployed Engineering / applied engineering round)

Breaking It Down

  1. Clarify first: Ask whether an eval set already exists (ideally one built from real traffic with graded outputs), and what exactly changed in this upgrade — just a version bump, or did prompts and retrieval settings also change. Jumping straight into model architecture differences without this is read as skipping the verification step.
  2. Build a framework: Frame this explicitly as "an eval problem, not a feelings problem," and also as "a process failure to fix regardless of the verdict" — stating both framings up front is the key scoring signal for this question.
  3. Go deep: The verification path is pull production traces → if an eval set exists, run both versions and slice-compare by task type → if not, sample and build one on the spot → also ask the customer for concrete failing examples. Then enumerate the three common root causes (prompt overfit to old quirks, format drift breaking a downstream parser, genuine capability regression) — distinguishing them determines which layer you actually fix.
  4. Close strong: Converge on the process fix — pin model versions per deployment, gate any future upgrade on the customer's eval suite, and keep both versions callable during a transition window for A/B comparison. Emphasize that "the eval set built during this incident becomes a permanent regression gate" — this turns one-time firefighting into systemic protection, which is what leaves an impression.

Sample Answer (how to actually say this in the room)

I'd frame this as an eval problem from the start, not an argument about feelings. First I'd check if an eval set already exists; if not, I'd sample 50 to 100 recent real inputs on the spot, run both versions, hand-label a small subset to calibrate an LLM judge, and let the judge score the rest to save time. At the same time I'd ask the customer directly for 5 to 10 concrete failing examples, because an aggregate score often masks a real regression in one specific category, and concrete examples usually surface the pattern faster.

Once I have results, I'd figure out which cause it actually is. If the old prompt was written too close to the previous model's behavioral quirks and the new model broke it, I'd fix the prompt, not roll back the model. If output format changed and broke a downstream parser, I'd lock the format down with structured outputs. Only if the slice comparison shows a genuine capability regression on a specific task category would I consider temporarily pinning the old version, while also escalating the examples to the model team.

Finally, I'd turn this verification into a permanent guardrail. I'd pin the model version per deployment so it never auto-upgrades silently; gate the next upgrade on passing the customer's eval suite; and during any transition, keep both versions callable for A/B comparison. The eval set built during this incident isn't a throwaway — it becomes the permanent regression test for every future upgrade.

Self-Check

Use this table to check whether your answer hit the key points:

Checklist itemCovered?
Asked whether an eval set exists and what exactly changed in the upgrade
Framed it as an eval problem, not an argument about feelings
Knows how to build an eval set on the spot when none exists (sampling + human labels / LLM judge)
Listed the three common root causes, and that distinguishing them determines which layer to fix
Closed with the process fix: pin versions, eval-gate the next upgrade, A/B transition window
Bonus: can answer the follow-up "how large does an eval set need to be to trust a 3-point difference"

Further Reading

References