Dayward AIWeChat Mini Program
← All course question banks

RAG in 14 Days: From Retrieval to Trustworthy Answers

Course questions · 57 / 57

D1 Why Retrieve at All: Hallucination, Knowledge Cutoffs, and the Cost of Long Context; a Minimal Keyword-Only RAG

  • When should you use retrieval-augmented generation, when should you fine-tune, and when is stuffing the documents into the context window good enough?什么时候该用检索增强生成,什么时候该微调,什么时候直接把文档塞进上下文就够了?
    Common in ChinaCommon overseasBasic#rag-basics#fine-tuning#long-context

    🔒 Unlock D1 to see the answer keys.

  • In BM25, what problems do term-frequency saturation and document length normalization each solve? What happens if you set both k1 and b to zero?BM25 里的词频饱和与文档长度归一化分别在解决什么问题?把 k1 和 b 都设成 0 会发生什么?
    Common in ChinaCommon overseasIntermediate#bm25#ranking#information-retrieval

    🔒 Unlock D1 to see the answer keys.

  • A retrieval-augmented generation system gave a wrong answer. How do you determine whether retrieval or generation is at fault?一个检索增强生成系统答错了,你怎么定位是检索的锅还是生成的锅?
    Common in ChinaCommon overseasIntermediate#debugging#failure-modes#evaluation

    🔒 Unlock D1 to see the answer keys.

  • Context windows are now in the millions of tokens. Does that make the retrieval step obsolete?上下文窗口已经做到上百万 token 了,检索这一步会被淘汰吗?
    Common in ChinaCommon overseasDeep dive#long-context#cost#system-design

    🔒 Unlock D1 to see the answer keys.

D2 Embeddings and Vector Search: Similarity, Dimensionality, and Model Choice; Storing Text in pgvector

  • When are cosine similarity and inner product equivalent? What goes wrong if you rank by inner product on vectors that are not normalized?余弦相似度和内积什么时候等价?如果向量没有归一化,用内积排序会出什么问题?
    Common in ChinaCommon overseasBasic#embeddings#similarity#normalisation

    🔒 Unlock D2 to see the answer keys.

  • What do you lose when you cut embedding dimensions from 1536 to 512, and when is that loss acceptable?把 embedding 维度从 1536 降到 512,你会损失什么?什么场景下这个损失可以接受?
    Common in ChinaCommon overseasIntermediate#embeddings#dimensions#cost

    🔒 Unlock D2 to see the answer keys.

  • Why do some embedding models require different prefixes for queries and documents? What happens if you skip them, and how would you catch it before shipping?为什么有些 embedding 模型要求查询和文档加不同的前缀?不加会怎样,你怎么在上线前发现这个问题?
    Common in ChinaCommon overseasIntermediate#embeddings#model-selection#evaluation

    🔒 Unlock D2 to see the answer keys.

  • Can vector search fully replace keyword search? Give a query where vectors are bound to fail, and say how you would fix it.向量检索能完全取代关键词检索吗?举一个向量必然失手的查询,并说说你会怎么补。
    Common in ChinaCommon overseasIntermediate#hybrid-search#embeddings#retrieval-failure

    🔒 Unlock D2 to see the answer keys.

D3 Getting Documents In: Parsing PDF and HTML, Tables and Scans, Cleaning Rules, and Metadata You Must Keep

  • The text extracted from a PDF comes out in the wrong order. How do you diagnose and fix it?一份 PDF 解析出来的文字顺序是乱的,你会怎么排查和修复?
    Common in ChinaCommon overseasIntermediate#pdf-parsing#ingestion#data-quality

    🔒 Unlock D3 to see the answer keys.

  • Which metadata should a document parsing stage preserve, and which downstream feature breaks if you drop each one?文档解析阶段应该保留哪些元数据?少了其中某一项会在哪个环节出问题?
    Common in ChinaCommon overseasIntermediate#metadata#ingestion#access-control

    🔒 Unlock D3 to see the answer keys.

  • OCR output from scanned documents carries a non-trivial error rate. How does that noise propagate into retrieval and generation, and how do you mitigate it?扫描件走光学字符识别之后错字率不低,这些噪声会怎样影响检索和生成?怎么缓解?
    Common in ChinaCommon overseasDeep dive#ocr#data-quality#hybrid-search

    🔒 Unlock D3 to see the answer keys.

  • Why is parsing quality the ceiling on retrieval quality? Walk through one concrete chain of propagation.为什么说解析质量决定了检索质量的上限?举一个具体的传导链条。
    Common in ChinaCommon overseasBasic#ingestion#data-quality#failure-analysis

    🔒 Unlock D3 to see the answer keys.

D4 Chunking Strategies: Five Approaches — Fixed, Recursive, Structure-Based, Parent-Child, and Semantic — and Choosing by Evaluation, Not Intuition

  • How do you decide on chunk size? Name two metrics you would look at, and one counterexample.你怎么决定切块大小?说出你会看的两个指标和一个反例。
    Common in ChinaCommon overseasIntermediate#chunking#evaluation

    🔒 Unlock D4 to see the answer keys.

  • What does parent-child chunking buy you, and when does it slow the system down instead?父子切块的收益是什么?它在什么情况下反而会拖慢系统?
    Common in ChinaCommon overseasIntermediate#chunking#parent-child

    🔒 Unlock D4 to see the answer keys.

  • What overlap ratio would you use, and what concretely goes wrong when the overlap is too large?重叠区设成块长的百分之多少合适?重叠过大会带来什么具体问题?
    Common in ChinaCommon overseasBasic#chunking#overlap

    🔒 Unlock D4 to see the answer keys.

  • Semantic chunking costs considerably more than recursive splitting. How would you prove to your team that the money is well spent?语义切分比递归切分贵不少,你怎么向团队证明这笔钱值得花?
    Common in ChinaCommon overseasDeep dive#chunking#evaluation#cost

    🔒 Unlock D4 to see the answer keys.

D5 Vector Indexes and Store Selection: HNSW vs. Inverted File, Quantization to Save Memory, Filtered Queries and Multi-Tenant Isolation

  • How do you choose between an HNSW index and an IVFFlat index? Give one scenario that forces each choice, and name the parameter you would tune first in each.分层可导航小世界图和倒排文件索引你会怎么选?各说一个必须选它的场景,以及各自最该调的参数。
    Common in ChinaCommon overseasIntermediate#vector-index#hnsw#ivfflat

    🔒 Unlock D5 to see the answer keys.

  • Why does a vector search with a WHERE clause return fewer results than expected, and what are the fixes and their costs?为什么加了 WHERE 条件的向量检索会漏结果?有哪几种修法,代价分别是什么?
    Common in ChinaCommon overseasDeep dive#filtering#iterative-scan#recall

    🔒 Unlock D5 to see the answer keys.

  • If you switch your vectors from full precision to half precision or binary quantisation, how do you verify that recall has not dropped materially?把向量从全精度换成半精度或二值量化,你会用什么方法确认召回没有明显下降?
    Common in ChinaCommon overseasIntermediate#quantization#evaluation#recall

    🔒 Unlock D5 to see the answer keys.

  • When should you move your vectors out of PostgreSQL into a dedicated vector database? Give measurable triggers, and also make the case for staying.什么时候应该把向量搬出 PostgreSQL?给出可量化的触发条件,也说说不该搬的理由。
    Common in ChinaCommon overseasIntermediate#vector-database#architecture#trade-offs

    🔒 Unlock D5 to see the answer keys.

D6 The Generation Side: Ordering Context, Labeling Citations, When You Must Refuse to Answer, and Streaming Responses

  • How do you make sure a model's citations are real rather than fabricated? Describe a scheme that does not rely on the model behaving well.怎么让模型的引用是真的而不是编的?说出一个不依赖模型自觉的方案。
    Common in ChinaCommon overseasIntermediate#citation-verification#grounding#hallucination

    🔒 Unlock D6 to see the answer keys.

  • Does the ordering of retrieved passages in the context affect answer quality? If so, how would you order them?上下文里材料的排列顺序会影响回答质量吗?如果会,你会怎么排?
    Common in ChinaCommon overseasBasic#context-assembly#prompt-engineering#ordering

    🔒 Unlock D6 to see the answer keys.

  • How do you set the refusal threshold for a knowledge-base assistant, and what does it cost you when the threshold is too high or too low?知识库问答的拒答阈值怎么定?定高了和定低了各自的代价是什么?
    Common in ChinaCommon overseasDeep dive#refusal#thresholds#evaluation

    🔒 Unlock D6 to see the answer keys.

  • In a streaming setup, how do you make sure nothing you have already sent needs to be retracted because its citation failed verification?流式输出的场景下,你怎么保证吐出去的内容不会因为引用校验失败而需要撤回?
    Common in ChinaCommon overseasDeep dive#streaming#citation-verification#api-design

    🔒 Unlock D6 to see the answer keys.

D7 Week One Capstone: Assembling Six Days of Parts Into a One-Command Question-Answering Service, and a Retrospective

  • How would you draw the module boundaries of a RAG system, and which layer most needs to be swappable? Why?你会怎么划分一个检索增强生成系统的模块边界?其中哪一层最应该做成可替换的,为什么?
    Common in ChinaCommon overseasBasic#architecture#modularity#embeddings

    🔒 Unlock D7 to see the answer keys.

  • What should the ingestion path and the query path share, and what concretely goes wrong when you over-share?摄取链路和查询链路应该共享哪些代码?强行复用会带来什么具体问题?
    Common in ChinaCommon overseasIntermediate#architecture#ingestion#retrieval

    🔒 Unlock D7 to see the answer keys.

  • What three checks would you run before shipping a retrieval QA service, and why those three?一个检索问答服务上线前你会做哪三项检查?为什么偏偏是这三项?
    Common in ChinaCommon overseasIntermediate#production-readiness#citations#refusal

    🔒 Unlock D7 to see the answer keys.

  • What is the biggest risk in the RAG service you just assembled, and how would you prove that judgment?你刚拼出来的这个检索问答系统,现在最大的风险在哪里?你打算怎么证明这个判断?
    Common in ChinaCommon overseasDeep dive#evaluation#risk-assessment#retrospective

    🔒 Unlock D7 to see the answer keys.

D8 Evaluation First: Building a Golden Set, Computing Recall and Ranking Metrics, Using a Model as Judge for Faithfulness

  • You need to build an evaluation set from scratch for a RAG system over a company knowledge base. How would you do it, and how many questions are enough?让你从零给一个公司知识库的 RAG 系统建评估集,你会怎么做?多少题才算够用?
    Common in ChinaCommon overseasIntermediate#evaluation#golden-set#rag

    🔒 Unlock D8 to see the answer keys.

  • Recall, mean reciprocal rank, and normalized discounted cumulative gain - which failure mode does each one catch first, and what do you miss by watching only one?召回率、平均倒数排名、归一化折损累计增益,这三个检索指标分别在什么故障下会先掉下来?只盯一个会漏掉什么?
    Common in ChinaCommon overseasIntermediate#retrieval-metrics#evaluation#ranking

    🔒 Unlock D8 to see the answer keys.

  • What systematic biases does an LLM judge have when scoring RAG faithfulness, and how do you detect them and prove your judge is trustworthy?用模型当裁判来评 RAG 的忠实度,有哪些系统性偏差?你怎么发现它们、又怎么证明你的裁判可信?
    Common in ChinaCommon overseasDeep dive#llm-as-judge#evaluation#faithfulness

    🔒 Unlock D8 to see the answer keys.

  • Why must a RAG evaluation set include questions the corpus cannot answer, and what does leaving them out hide?RAG 的评估集里为什么一定要放语料里没有答案的问题?不放会掩盖什么?
    Common in ChinaCommon overseasBasic#evaluation#abstention#golden-set

    🔒 Unlock D8 to see the answer keys.

D9 Hybrid Search and Reranking: Two-Path Retrieval, Reciprocal Rank Fusion, Then Re-Ranking the Top Results With a Cross-Encoder

  • Why do hybrid retrieval systems usually use reciprocal rank fusion instead of normalizing both scores and adding them with weights? When does the weighted approach break down?混合检索为什么普遍用倒数排名融合,而不是把两路分数归一化之后加权相加?加权那条路在什么情况下会失控?
    Common in ChinaCommon overseasIntermediate#hybrid-search#rank-fusion

    🔒 Unlock D9 to see the answer keys.

  • Why is a cross-encoder more accurate than a bi-encoder? And if it is more accurate, why not just use it to search the whole corpus directly?交叉编码器为什么比双编码器准?既然更准,为什么不干脆拿它直接检索全库?
    Common in ChinaCommon overseasBasic#cross-encoder#bi-encoder

    🔒 Unlock D9 to see the answer keys.

  • You replaced pure vector retrieval with hybrid search plus reranking, and after shipping it your eval metrics went down. How do you investigate?你把纯向量检索换成了混合检索加重排,上线之后评估指标反而掉了。你会怎么排查?
    Common in ChinaCommon overseasDeep dive#hybrid-search#evaluation

    🔒 Unlock D9 to see the answer keys.

  • Adding a reranker costs you 200 ms of extra latency per question plus a per-search fee. How do you decide whether that spend is worth it?加上重排之后每次提问多了两百毫秒延迟,还多了一笔按次计费的开销。你怎么判断这笔钱该不该付?
    Common in ChinaCommon overseasDeep dive#rerank#cost-tradeoff

    🔒 Unlock D9 to see the answer keys.

D10 Query-Side Optimization: Rewriting, Hypothetical Document Embeddings, Multi-Query, Step-Back Prompting, and Intent Routing

  • Why does HyDE (hypothetical document embeddings) work, and when does it steer retrieval in the wrong direction?假设文档嵌入(HyDE)为什么有效?它在什么情况下会把检索带偏?
    Common in ChinaCommon overseasIntermediate#hyde#query-transformation#retrieval-quality

    🔒 Unlock D10 to see the answer keys.

  • How do you handle coreference in multi-turn RAG, and what is the classic failure when you skip it?多轮对话里怎么处理指代?不做指代消解最典型的翻车场景是什么?
    Common in ChinaCommon overseasBasic#coreference#multi-turn#query-rewriting

    🔒 Unlock D10 to see the answer keys.

  • Query rewriting adds a model call per question and doubles end-to-end latency. How do you decide whether it is worth paying?上线查询改写之后每问多了一次模型调用,端到端延迟涨了一倍,你怎么判断这笔开销值不值?
    Common in ChinaCommon overseasDeep dive#cost-tradeoff#latency#query-rewriting

    🔒 Unlock D10 to see the answer keys.

  • What happens when intent routing misclassifies, and how would you design the fallback?意图路由判错了会怎样?你会怎么设计兜底?
    Common in ChinaCommon overseasIntermediate#intent-routing#fallback#observability

    🔒 Unlock D10 to see the answer keys.

D11 Advanced Indexing: Parent-Child Documents, Summary Indexes, Contextual Retrieval, and the Trade-Offs of Tree Aggregation vs. Graph Retrieval

  • Parent-child indexing and contextual retrieval both patch the same problem — chunks losing their context. What actually distinguishes them?父子索引和上下文检索都在补『块被切碎』这个问题,它们的差别到底在哪?
    Common in ChinaCommon overseasIntermediate#indexing#contextual-retrieval#chunking

    🔒 Unlock D11 to see the answer keys.

  • Contextual retrieval needs one model call per chunk. How do you estimate that one-off cost, and what levers bring it down?上下文检索要给每个块调一次模型,这笔一次性成本怎么估?有哪些办法能压下来?
    Common in ChinaCommon overseasDeep dive#contextual-retrieval#prompt-caching#cost

    🔒 Unlock D11 to see the answer keys.

  • What kind of question actually requires graph retrieval? Give one concrete case where it is justified and one where it is not.什么样的问题必须上图检索?给一个该上的具体例子和一个不该上的例子。
    Common in ChinaCommon overseasDeep dive#graph-rag#multi-hop#cost

    🔒 Unlock D11 to see the answer keys.

  • You have built three different indexes over the same corpus. How do you decide which one a query goes to?同一份语料建了三套索引,检索时你怎么决定走哪一套?
    Common in ChinaCommon overseasIntermediate#index-routing#evaluation#architecture

    🔒 Unlock D11 to see the answer keys.

D12 Agentic RAG: Turning Retrieval Into a Tool So the Model Decides Whether to Search, How Many Times, and Whether to Start Over

  • You are exposing retrieval to a model as a tool. How do you write the tool description, and what concrete failure modes appear when you write it badly?把检索包成一个工具交给模型,这个工具的描述该怎么写?写不好会导致哪些具体的错误行为?
    Common in ChinaCommon overseasBasic#tool-design#agentic-rag#prompting

    🔒 Unlock D12 to see the answer keys.

  • Self-reflective retrieval rewrites the query and retries. How do you guarantee it terminates instead of spinning on the same query forever?自反思式检索会反复改写查询重试。你怎么保证它一定会停下来,而不是在同一个查询上原地打转?
    Common in ChinaCommon overseasIntermediate#agentic-rag#self-reflection#reliability

    🔒 Unlock D12 to see the answer keys.

  • In multi-hop retrieval a wrong first hop poisons every hop after it. How would you design for that?多跳检索里第一跳查错了,后面全跟着错。你会怎么设计容错?
    Common in ChinaCommon overseasDeep dive#multi-hop#error-propagation#agentic-rag

    🔒 Unlock D12 to see the answer keys.

  • When would you refuse to make a RAG system agentic, and what data would you use to convince your team?什么情况下你会拒绝把一个 RAG 系统做成 Agentic 的?拿什么数据说服你的团队?
    Common in ChinaCommon overseasIntermediate#agentic-rag#cost#engineering-judgement

    🔒 Unlock D12 to see the answer keys.

D13 Going to Production: Incremental Sync and Deduplication, Permission-Based Filtering, Cache Layering, Tracing, and the Cost-Latency Ledger

  • After a document changes, how do you recompute only the affected chunks? And how do you guarantee a deleted document really disappears from the index?文档更新之后,你怎么做到只重算受影响的块?被删掉的文档又怎么保证一定从索引里消失?
    Common in ChinaCommon overseasIntermediate#incremental-sync#content-hash#index-maintenance

    🔒 Unlock D13 to see the answer keys.

  • Why can't access control be applied at the generation step? What exactly leaks if you put it there?为什么权限过滤不能放在生成阶段做?放在那里会泄露什么?
    Common in ChinaCommon overseasDeep dive#access-control#filter-pushdown#multi-tenancy

    🔒 Unlock D13 to see the answer keys.

  • What can be cached in a RAG system, and what are the invalidation conditions for each?RAG 系统里有哪些东西可以缓存?各自的失效条件是什么?
    Common in ChinaCommon overseasIntermediate#caching#invalidation#cost-optimization

    🔒 Unlock D13 to see the answer keys.

  • You need to switch embedding models. How do you migrate a live system without downtime and without losing recall?要换一个 embedding 模型,线上系统怎么迁移才能不停机也不掉召回?
    Common in ChinaCommon overseasDeep dive#embedding-migration#zero-downtime#rollout

    🔒 Unlock D13 to see the answer keys.

D14 Capstone Project and Retrospective: A Multi-Tenant Enterprise Knowledge-Base Q&A, a RAG Decision Map, and an Interview Deep Dive

  • You are handed a knowledge base of five million documents that must answer in about a second, with accuracy as the top priority. How would you design it?给你一个五百万文档、要求秒级响应、准确率优先的知识库场景,你会怎么设计这套系统?
    Common in ChinaCommon overseasDeep dive#system-design#scaling#latency-budget

    🔒 Unlock D14 to see the answer keys.

  • Looking back at the RAG project you built, which decision would you change now, and why?你做过的这个 RAG 项目里,哪个决定你现在会改?为什么?
    Common in ChinaCommon overseasDeep dive#retrospective#evidence#chunking

    🔒 Unlock D14 to see the answer keys.

  • How do you convince a non-technical stakeholder that your retrieval system actually got better?怎么向不懂技术的业务方证明你的检索系统真的变好了?
    Common in ChinaCommon overseasBasic#evaluation#stakeholder-communication#abstention

    🔒 Unlock D14 to see the answer keys.

  • Users report that your live RAG system 'answers inaccurately'. What is your triage order?RAG 系统上线后用户反馈「答得不准」,你的排查顺序是什么?
    Common in ChinaCommon overseasIntermediate#debugging#failure-modes#observability

    🔒 Unlock D14 to see the answer keys.

  • If you could only fund three changes to improve an existing RAG system, which three would you pick and why those three?如果预算只够做三件事来提升一个已有 RAG 系统的效果,你选哪三件?为什么是这三件?
    Common in ChinaCommon overseasIntermediate#prioritization#evaluation#abstention

    🔒 Unlock D14 to see the answer keys.