逐日AI微信小程序
← 返回全部课程题库

14 天 RAG:从检索到可信回答

课程题库 · 57 / 57 道题

D1 为什么要检索:幻觉、知识截止与长上下文的代价,以及一个纯关键词的最小 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?
    国内高频海外高频基础#rag-basics#fine-tuning#long-context

    🔒 解锁 D1 后查看答题要点。

  • BM25 里的词频饱和与文档长度归一化分别在解决什么问题?把 k1 和 b 都设成 0 会发生什么?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#ranking#information-retrieval

    🔒 解锁 D1 后查看答题要点。

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

    🔒 解锁 D1 后查看答题要点。

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

    🔒 解锁 D1 后查看答题要点。

D2 embedding 与向量检索:相似度、维度与模型选型,把文本存进 pgvector

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

    🔒 解锁 D2 后查看答题要点。

  • 把 embedding 维度从 1536 降到 512,你会损失什么?什么场景下这个损失可以接受?What do you lose when you cut embedding dimensions from 1536 to 512, and when is that loss acceptable?
    国内高频海外高频进阶#embeddings#dimensions#cost

    🔒 解锁 D2 后查看答题要点。

  • 为什么有些 embedding 模型要求查询和文档加不同的前缀?不加会怎样,你怎么在上线前发现这个问题?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?
    国内高频海外高频进阶#embeddings#model-selection#evaluation

    🔒 解锁 D2 后查看答题要点。

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

    🔒 解锁 D2 后查看答题要点。

D3 文档进来这一关:PDF 与 HTML 解析、表格与扫描件、清洗规则和必须留下的元数据

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

    🔒 解锁 D3 后查看答题要点。

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

    🔒 解锁 D3 后查看答题要点。

  • 扫描件走光学字符识别之后错字率不低,这些噪声会怎样影响检索和生成?怎么缓解?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?
    国内高频海外高频深入#ocr#data-quality#hybrid-search

    🔒 解锁 D3 后查看答题要点。

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

    🔒 解锁 D3 后查看答题要点。

D4 切块策略:固定、递归、按结构、父子与语义五种切法,以及用评估而不是直觉来选

  • 你怎么决定切块大小?说出你会看的两个指标和一个反例。How do you decide on chunk size? Name two metrics you would look at, and one counterexample.
    国内高频海外高频进阶#chunking#evaluation

    🔒 解锁 D4 后查看答题要点。

  • 父子切块的收益是什么?它在什么情况下反而会拖慢系统?What does parent-child chunking buy you, and when does it slow the system down instead?
    国内高频海外高频进阶#chunking#parent-child

    🔒 解锁 D4 后查看答题要点。

  • 重叠区设成块长的百分之多少合适?重叠过大会带来什么具体问题?What overlap ratio would you use, and what concretely goes wrong when the overlap is too large?
    国内高频海外高频基础#chunking#overlap

    🔒 解锁 D4 后查看答题要点。

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

    🔒 解锁 D4 后查看答题要点。

D5 向量索引与库选型:HNSW 与倒排文件、量化省内存、带过滤的查询与多租户隔离

  • 分层可导航小世界图和倒排文件索引你会怎么选?各说一个必须选它的场景,以及各自最该调的参数。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.
    国内高频海外高频进阶#vector-index#hnsw#ivfflat

    🔒 解锁 D5 后查看答题要点。

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

    🔒 解锁 D5 后查看答题要点。

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

    🔒 解锁 D5 后查看答题要点。

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

    🔒 解锁 D5 后查看答题要点。

D6 生成这一侧:上下文怎么排、引用怎么标、什么时候必须拒答,以及流式回答

  • 怎么让模型的引用是真的而不是编的?说出一个不依赖模型自觉的方案。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.
    国内高频海外高频进阶#citation-verification#grounding#hallucination

    🔒 解锁 D6 后查看答题要点。

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

    🔒 解锁 D6 后查看答题要点。

  • 知识库问答的拒答阈值怎么定?定高了和定低了各自的代价是什么?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?
    国内高频海外高频深入#refusal#thresholds#evaluation

    🔒 解锁 D6 后查看答题要点。

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

    🔒 解锁 D6 后查看答题要点。

D7 第一周综合:把六天的零件装成一个可一键启动的检索问答服务并复盘

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

    🔒 解锁 D7 后查看答题要点。

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

    🔒 解锁 D7 后查看答题要点。

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

    🔒 解锁 D7 后查看答题要点。

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

    🔒 解锁 D7 后查看答题要点。

D8 评估先行:搭 golden set、算召回与排序指标、用模型当裁判判忠实度

  • 让你从零给一个公司知识库的 RAG 系统建评估集,你会怎么做?多少题才算够用?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?
    国内高频海外高频进阶#evaluation#golden-set#rag

    🔒 解锁 D8 后查看答题要点。

  • 召回率、平均倒数排名、归一化折损累计增益,这三个检索指标分别在什么故障下会先掉下来?只盯一个会漏掉什么?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?
    国内高频海外高频进阶#retrieval-metrics#evaluation#ranking

    🔒 解锁 D8 后查看答题要点。

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

    🔒 解锁 D8 后查看答题要点。

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

    🔒 解锁 D8 后查看答题要点。

D9 混合检索与重排:两路召回、倒数排名融合,再用交叉编码器把前几名重新排一遍

  • 混合检索为什么普遍用倒数排名融合,而不是把两路分数归一化之后加权相加?加权那条路在什么情况下会失控?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?
    国内高频海外高频进阶#hybrid-search#rank-fusion

    🔒 解锁 D9 后查看答题要点。

  • 交叉编码器为什么比双编码器准?既然更准,为什么不干脆拿它直接检索全库?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?
    国内高频海外高频基础#cross-encoder#bi-encoder

    🔒 解锁 D9 后查看答题要点。

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

    🔒 解锁 D9 后查看答题要点。

  • 加上重排之后每次提问多了两百毫秒延迟,还多了一笔按次计费的开销。你怎么判断这笔钱该不该付?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?
    国内高频海外高频深入#rerank#cost-tradeoff

    🔒 解锁 D9 后查看答题要点。

D10 查询侧优化:改写、假设文档嵌入、多路查询、后退提问与意图路由

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

    🔒 解锁 D10 后查看答题要点。

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

    🔒 解锁 D10 后查看答题要点。

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

    🔒 解锁 D10 后查看答题要点。

  • 意图路由判错了会怎样?你会怎么设计兜底?What happens when intent routing misclassifies, and how would you design the fallback?
    国内高频海外高频进阶#intent-routing#fallback#observability

    🔒 解锁 D10 后查看答题要点。

D11 高级索引:父子文档、摘要索引、上下文检索,以及树状聚合与图检索的取舍

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

    🔒 解锁 D11 后查看答题要点。

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

    🔒 解锁 D11 后查看答题要点。

  • 什么样的问题必须上图检索?给一个该上的具体例子和一个不该上的例子。What kind of question actually requires graph retrieval? Give one concrete case where it is justified and one where it is not.
    国内高频海外高频深入#graph-rag#multi-hop#cost

    🔒 解锁 D11 后查看答题要点。

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

    🔒 解锁 D11 后查看答题要点。

D12 Agentic RAG:把检索做成工具,让模型自己决定查不查、查几次、要不要推翻重来

  • 把检索包成一个工具交给模型,这个工具的描述该怎么写?写不好会导致哪些具体的错误行为?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?
    国内高频海外高频基础#tool-design#agentic-rag#prompting

    🔒 解锁 D12 后查看答题要点。

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

    🔒 解锁 D12 后查看答题要点。

  • 多跳检索里第一跳查错了,后面全跟着错。你会怎么设计容错?In multi-hop retrieval a wrong first hop poisons every hop after it. How would you design for that?
    国内高频海外高频深入#multi-hop#error-propagation#agentic-rag

    🔒 解锁 D12 后查看答题要点。

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

    🔒 解锁 D12 后查看答题要点。

D13 上生产:增量同步与去重、按权限过滤、缓存分层、链路追踪与成本延迟账

  • 文档更新之后,你怎么做到只重算受影响的块?被删掉的文档又怎么保证一定从索引里消失?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?
    国内高频海外高频进阶#incremental-sync#content-hash#index-maintenance

    🔒 解锁 D13 后查看答题要点。

  • 为什么权限过滤不能放在生成阶段做?放在那里会泄露什么?Why can't access control be applied at the generation step? What exactly leaks if you put it there?
    国内高频海外高频深入#access-control#filter-pushdown#multi-tenancy

    🔒 解锁 D13 后查看答题要点。

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

    🔒 解锁 D13 后查看答题要点。

  • 要换一个 embedding 模型,线上系统怎么迁移才能不停机也不掉召回?You need to switch embedding models. How do you migrate a live system without downtime and without losing recall?
    国内高频海外高频深入#embedding-migration#zero-downtime#rollout

    🔒 解锁 D13 后查看答题要点。

D14 综合项目与复盘:多租户企业知识库问答,一张 RAG 决策地图与面试专题

  • 给你一个五百万文档、要求秒级响应、准确率优先的知识库场景,你会怎么设计这套系统?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?
    国内高频海外高频深入#system-design#scaling#latency-budget

    🔒 解锁 D14 后查看答题要点。

  • 你做过的这个 RAG 项目里,哪个决定你现在会改?为什么?Looking back at the RAG project you built, which decision would you change now, and why?
    国内高频海外高频深入#retrospective#evidence#chunking

    🔒 解锁 D14 后查看答题要点。

  • 怎么向不懂技术的业务方证明你的检索系统真的变好了?How do you convince a non-technical stakeholder that your retrieval system actually got better?
    国内高频海外高频基础#evaluation#stakeholder-communication#abstention

    🔒 解锁 D14 后查看答题要点。

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

    🔒 解锁 D14 后查看答题要点。

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

    🔒 解锁 D14 后查看答题要点。