Skip to content
How deep do RAG interview questions go: memorizing the architecture is less important than clearly explaining one failure

How deep do RAG interview questions go: memorizing the architecture is less useful than clearly explaining one failure

In interviews, when asked “Have you worked on retrieval-augmented generation (RAG)?”, candidates typically walk through document parsing to vector stores, then retrieval to reranking, hitting every term. It all sounds right. But follow up with “What was the most serious wrong answer after launch, and how did you diagnose it?” and the answer often becomes “tweaked the prompt,” “switched to a bigger model,” “increased top_k.”

This chain only proves they’ve read a tutorial. The difficulty of RAG isn’t stitching a few segments together—it’s that every segment has failure modes, and failures disguise themselves as other problems. The depth an interview should probe isn’t how many components a candidate can recite, but whether they can take apart a single wrong answer, find the responsible layer, and explain the cost of the fix and how to verify it.

I divide the passing bar for RAG interviews into three tiers. Being able to recite the pipeline is a pass; being able to explain parameters and trade-offs is qualified; being able to clearly describe one failure, the cost of fixing it, and the boundaries is what makes someone fit for a project. Reciting the architecture only proves you know what it looks like; failure cases prove you’ve actually touched it.

Reciting the pipeline only proves you know what RAG looks like

The standard pipeline is roughly document parsing, chunking, embedding, indexing, retrieval, reranking, context assembly, generation. Memorizing it takes five minutes. But in real projects, every step has defaults, and defaults are often the source of failure. Double-column PDFs, headers and footers, cross-page tables split a sentence in two at the parsing layer; fixed-length chunking separates clauses from table headers; embedding models are insensitive to precise tokens like model numbers, IDs, and amounts; if permission filtering in the vector store happens after retrieval, it may first pull content that shouldn’t be seen; if top_k is set too large, key passages get squeezed out of the context window.

All called RAG, but customer service FAQ, contract review, and internal wiki are not the same difficulty. Customer service answers are short, updated frequently, and need citations; contracts need complete clauses, are version-sensitive, and have strict permissions; internal wiki questions are vague and documents conflict a lot. The architecture diagram looks the same, but failure modes are completely different. If a candidate only says “I built something with some framework” but can’t explain the dirtiest type of document in their corpus, you can basically conclude they haven’t touched dirty data.

The first watershed: can you break a wrong answer down to the pipeline

The best follow-up question in an interview isn’t “What modules does RAG have?” but “When a user says the answer is wrong, what do you check first?” A qualified answer won’t immediately switch models but will first layer the problem. Because “wrong answer” has at least six kinds: not retrieved, retrieved but ranked wrong, retrieved correctly but context truncated, model didn’t use the context, the question itself is beyond the knowledge base, permissions or timeliness caused an answer that shouldn’t have been given. Each has a different fix.

Symptom What to check first Common misdiagnosis
Answer has no basis at all, or says it doesn’t know Whether the correct passage is in the index, whether parsing dropped text, whether query rewriting went off track Directly switch to a bigger model
Cited a relevant passage but didn’t answer the question Whether the key passage entered the context after reranking, whether the chunk was split too finely Keep increasing top_k
Answer only covers half Whether the context was truncated, whether only one document was taken from multiple Adjust temperature
Old and new versions appear together, answer cites the old one Whether document version, effective time, and tenant permissions participate in filtering Write “please prioritize the latest version” in the prompt
Question is beyond the knowledge base Whether it should refuse to answer, whether there’s a handoff to human or search fallback Let the model “try its best to answer”

In this table, what I care about most is the last two rows. They aren’t model capability problems; they’re product and engineering boundary problems. A candidate who can identify “shouldn’t answer” is usually more reliable than one who can tune ten prompts.

When an answer is wrong, running through layered diagnosis first is more effective than directly switching models.

flowchart TD
    A[用户反馈答错] --> B{正确片段被召回}
    B -- 否 --> C[查解析 切分 索引 查询改写]
    B -- 是 --> D{重排后进入上下文}
    D -- 否 --> E[查重排 过滤 截断]
    D -- 是 --> F{上下文完整且无冲突}
    F -- 否 --> G[查版本 权限 预算]
    F -- 是 --> H[查生成约束与拒答]

How to fix old/new version conflicts

Here’s a common failure: a user asks about the return policy, the system answers with an old version, and the citation looks plausible. The team’s first reaction is to tweak the prompt, adding “please answer according to the latest policy”—no effect. Digging further reveals both old and new documents entered the index, and the metadata has no effective time; the reranking model only looks at semantic similarity, and the old document ranked first because its wording was more similar to the user’s question. The generation model sees two conflicting materials and can only guess.

The fix isn’t something a prompt can solve. Ingestion must carry version, effective time, and applicable tenant; retrieval must filter by time and permissions before ranking; freshness can be added to reranking features but can’t replace metadata filtering; the prompt must specify which document takes precedence in conflicts and require quoting the original text; the evaluation set must specifically include “old/new version conflict” questions. A common starting point is retrieving 20 to 50 items, keeping 5 to 8 after reranking, and controlling context to a few thousand tokens. Parameters aren’t the point—the point is that every layer must be able to explain why it’s set that way. After fixing, run regression with dozens of conflict questions and see whether the wrong-version rate, citation accuracy, and refusal rate change together. Watching only overall accuracy makes it easy to be masked by a large number of simple questions.

Parameters aren’t memorized; they’re traded for constraints

Interviews often ask what chunk size to use, what top_k, whether to rerank. Giving a number isn’t hard; explaining under what constraints that number holds is. In FAQ scenarios, answers are usually short, chunks can be two or three hundred characters, and overlap is only kept a little when sentences cross chunks; for contracts and manuals, chunking by heading hierarchy is more reasonable, a single chunk may be over a thousand characters, and sentence-level localization is done within the chunk. Small chunks retrieve precisely but fragment context and easily lose premises; large chunks preserve structure but carry more noise, cost more, and dilute model attention. It’s not about which is better, but what you’re trading for what.

The same goes for top_k. Fewer retrieved items means lower latency but more misses; more items means higher recall but reranking pressure and context noise rise together. Reranking models are accurate but usually slower—customer service scenarios need to fight for first-token latency, while contract review can wait a few more seconds. RAG latency isn’t just generation; retrieval and reranking both count. If a candidate can proactively say “to hit first-token latency, we compressed reranking to this many items, at the cost of recall dropping on some long-tail questions,” that’s far more credible than reciting a best practice.

Validation can’t just look at the final answer either. At minimum you need to look at retrieval hit rate, whether citations support the answer, whether it refuses when it should, whether wrong versions appear, p95 latency, and per-call cost. A usable evaluation sample looks like this:

YAML6 lines
1
2
3
4
5
6
- id: refund-version-01
question: 退货政策多久内可以申请
type: 版本冲突
must_recall: policy_v3
must_not_cite: policy_v2
expect: answer_with_citation

You don’t need many samples—bucket by question type first, a few dozen per bucket, which exposes problems better than two thousand random questions. A candidate may not have actually done large-scale evaluation, but at least they should know that “overall accuracy” lies.

The second watershed: knowing when RAG shouldn’t be used

A deeper answer proactively states boundaries. RAG solves putting external knowledge into context; it doesn’t solve aggregation computation, transactional state, or permission responsibility. When a user asks “Which products had the highest refund rate over the past year,” that’s an analytical query and should go through a database or report, not vector retrieval; when a user asks “Where is my order,” that should query the order API, not find an answer in customer service docs; when a user asks “Does this contract have automatic renewal,” RAG can locate the clause, but the answer must cite the original text, and critical scenarios still need human review.

If a candidate says “all knowledge Q&A can go through RAG,” I’ll assume they haven’t been educated by a production incident yet. Conversely, if they can clearly explain which questions should be refused, which should be escalated to a human, and which should go through rules or APIs, that shows they understand the system’s boundaries of responsibility. RAG is not a universal entry point; it’s just a component that connects knowledge with generation. Put a component in the wrong place, and the harder you try, the more wrong you go.

How interviewers should ask to surface depth

For interviewers, don’t open with “introduce the RAG architecture”—that only gets you a recitation. A more effective approach is to follow a single failure downward:

  1. In the RAG you built, what are the three most common types of user questions?
  2. Which type performs worst? Give a specific bad case (failure sample).
  3. How do you determine whether it’s a recall miss, a wrong recall, or the generation not using what was retrieved?
  4. After fixing it, what metric do you use to verify? Did any metric get worse?
  5. When the knowledge base has no answer, how does the system currently behave? How should it behave?

These five questions don’t need standard answers, but they reveal whether someone has actually made trade-offs. The fourth question especially—many people can say “accuracy went up” but can’t say “the refusal rate also went up” or “latency increased by one second.” Talking only about gains and not costs usually means they’ve never shipped to production.

Preparing three failures is more useful than preparing an architecture diagram

If you’re interviewing for a RAG role, don’t rush to memorize the architecture diagram more thoroughly. Pick three failures you’ve actually handled: one at the data or parsing layer, one at the retrieval and ranking layer, and one at the product boundary layer. Prepare each failure in five sentences: what the symptom was, how you localized it to that layer, what you changed, what you used to verify, and what risk remains.

For example, at the parsing layer, a scanned document recognized the 0 in a model number as O, so users couldn’t find it; the fix was routing low-confidence optical character recognition (OCR) to human review or a second engine; verification looked at recall for model-number questions; the residual risk is that handwriting is still poor. At the retrieval layer, synonymous phrasings failed to recall; the fix was query rewriting plus hybrid retrieval; verification must be bucketed by phrasing, not just looked at in aggregate. At the boundary layer, a user asked about a promotional policy not in the knowledge base, and the model fabricated one; the fix was refusal plus escalation to a human, and verification should look at both the false-answer rate and the refusal rate—too many refusals also hurts the experience.

If you can explain these three failures clearly, you’ll have something to say even when the interviewer probes to the third level. Conversely, if you can only recite “parsing, chunking, vectorization, vector store, recall, reranking, generation,” you’ll be exposed on the second follow-up.

If you’re interviewing tomorrow, don’t rush to change the tech stack on your resume. Pick one bad case you’ve handled and write its symptom, localization, fix, and verification in four sentences, then read it to yourself. If those four sentences contain no costs and no boundaries, it’s still just an architecture diagram, not experience.

About this Post

This post is written by Lu's Blog, licensed under CC BY-NC 4.0.

#AI Products #Interviews #RAG

Comments