课堂-RAG 来源核对Lesson - Checking Sources in RAG Answers
课堂教案 · 约 15 分钟Lesson plan · about 15 min · 引用核验 2026-11-07(仅引用链接与日期) · refs checked 2026-11-07 (reference links and dates only)
学员把一次 RAG 回答拆成检索、片段、生成三段责任,用三列核对表定位问题出在哪一段,并给出可验证的改进动作。Learners split a RAG answer into retrieval, passage and generation responsibilities, use a three-column check sheet to locate the failing stage, and propose a verifiable improvement.
能把一次回答拆成三段责任:检索是否命中、片段是否够用、生成是否超出片段。
能为每个断言找到对应片段与位置,找不到就标为无依据。
能说明分块会切断上下文,重排只改候选顺序、不新增事实。
能提出一个改进动作,并说明用什么口径验证它有没有效。
Split one answer into three responsibilities: whether retrieval hit, whether passages are sufficient, and whether generation goes beyond passages.
Find the passage and position for each claim; mark it unsupported if none can be found.
Explain that chunking can cut context and reranking only changes candidate order, not facts.
Propose one improvement and state how to verify whether it worked.
Anthropic 官方工程博客《Introducing Contextual Retrieval》:传统 RAG 编码时丢上下文会让检索失败。
Cohere 官方 Rerank 文档:给定查询与文档列表,按语义相关度排序。
LlamaIndex 官方 CitationQueryEngine 示例:答案带来源节点引用的写法。
三份虚构内部文档片段(其中一份条款被切断上下文)+一张三列核对表。
Anthropic engineering post Introducing Contextual Retrieval: traditional RAG can lose context during encoding and fail retrieval.
Cohere Rerank documentation: given a query and document list, order by semantic relevance.
LlamaIndex CitationQueryEngine example: answers with source-node citations.
Three fictional internal document passages, one with a clause cut from its context, plus a three-column check sheet.
- 3 分钟建参考答案:各组读问题与文档,先人工标出应当命中的片段。
- 4 分钟查检索:对照系统给出的片段,分成命中、漏检、片段缺上下文三类。
- 4 分钟查生成:逐句核对答案与片段,标出超出片段的断言与引用错位。
- 4 分钟提改进:每组给一个动作与验证口径,全班按「改的是哪一段责任」归类。
- 3-minute reference answer: groups read the question and documents and manually mark passages that should be hit.
- 4-minute retrieval check: compare system passages and classify them as hit, missed, or missing context.
- 4-minute generation check: check the answer sentence by sentence against passages and mark claims beyond passages or misplaced citations.
- 4-minute improvement: each group gives one action and verification method; the class groups them by which responsibility stage changed.
以为答案带了引用就可信;引用可能指向不支持该句的片段。
把检索不到归因为模型笨;也可能是分块切断上下文或用词不一致。
以为重排能补出缺失事实;它只调整候选顺序。
把厂商博客里的提升幅度直接搬到自己的库;那是特定数据与设置下的结果。
Assuming an answer with citations is trustworthy; a citation may point to a passage that does not support the sentence.
Blaming the model for retrieval misses; chunking may cut context or wording may differ.
Assuming reranking can supply missing facts; it only adjusts candidate order.
Copying uplift figures from a vendor blog into your own corpus; those results depend on specific data and settings.
三列核对表填完:每个断言有片段位置,或明确标为无依据。
能把本组失败归因到三段中的一段,并指出支撑该判断的证据。
改进动作带验证口径,例如同一组问题重跑后比较无依据断言的数量。
The three-column sheet is complete: every claim has a passage position or is explicitly marked unsupported.
The group can attribute its failure to one of the three stages and point to evidence for that judgment.
The improvement has a verification method, such as rerunning the same questions and comparing the number of unsupported claims.
例子与判断Example and interpretation
以下是教学情境,不是本站运行或实测记录。A teaching scenario, not a measured or executed site test.
课堂练习:答案说「活动免费」,但引用片段只写了时间与地点。把该断言标为无依据,再判断问题在检索漏检还是生成超出片段。Class exercise: the answer says the event is free, but the cited passage only gives time and place. Mark the claim unsupported, then decide whether the failure is missed retrieval or generation beyond the passage.
做完例子后怎么检查How to check your practice
先用自己的话解释上面的判断,再检查输入条件,最后回原文验证。说不清原因时回概念;缺日期、字段或权限时补输入;结论无出处时先撤回结论。Explain the example in your own words, inspect input constraints, then verify against the source. Revisit concepts if you cannot explain why; supply missing dates, fields or permissions; withdraw unsupported conclusions.
按这篇主题,先从“概念没分清”练习查起For this topic, start with concept confusion · 查看全部六个情境与理由See all six scenarios and their reasoning
分块Chunking 向量 / 嵌入Embedding / Vector 引用与可追溯Citations and Traceability 检索质量度量Retrieval Quality Metrics 幻觉Hallucination
课堂-AI 能力与边界入门Lesson - AI Capabilities and Limits · 怎么给文档做分块How to Chunk Documents for Retrieval · 怎么给检索结果重排How to Rerank Retrieval Results · 怎么做混合检索How to Do Hybrid Search