跳到主要内容Skip to main content
← 深水指南Guides

练习包 · Builder:用 10 篇站内文档搭一个带引用的问答Exercise: cited answers from 10 source pages

规划Planning

一个可独立完成的 RAG 练习:选 10 篇站内页面做语料,产出 10 题答案、引用表、评测表与失败记录;附评分标准与参考答案结构。

A self-contained RAG exercise: use 10 site pages as a corpus and produce 10 answers, a citation table, an evaluation sheet and a failure log, with a rubric and a model-answer outline.

任务The task

用 10 篇站内页面做唯一语料,搭一个能回答问题的问答流程。不允许接外部搜索,不允许凭记忆补充。题数和评分线是本练习的教学约束,不是生产系统的通用标准。

  1. 从 learn 站任选 10 个词条页,主题集中在一个领域(如 RAG 或本地部署)。
  2. 把它们切成可检索的片段,记录切分规则(按段、按标题、固定长度)。
  3. 写 10 个问题,其中 3 个的答案不在语料里,用来测拒答。
  4. 每次回答必须带引用:页面标题 + 链接 + 命中的原文句子。
  5. 记录每次失败:答错、答偏、编造、引用错页。

Use ten site pages as the only corpus for a question-answering workflow. Do not add external search or fill gaps from memory. The question count and passing score are teaching constraints for this exercise, not universal production standards.

  1. Choose ten Learn term pages concentrated in one area, such as RAG or local deployment.
  2. Split them into retrievable passages and record whether you split by paragraph, heading or fixed length.
  3. Write ten questions; three should have no answer in the corpus, to test abstention.
  4. Every answer must cite a page title, link and supporting source sentence.
  5. Record failures: incorrect answers, off-topic answers, fabrication or citations to the wrong page.

交付物Deliverables

文件内容检查点
answers.md10 题答案,逐题带引用每条引用能点回原文并找到该句
citations.csv题目 / 引用页 / 原文句 / 是否命中10 行,无空行
eval.csv题目 / 判定(对/错/拒答)/ 原因判定可被第二人复核
failures.md失败记录与改法按实际情况记录并写清触发条件;人为构造的失败输入须标注
FileContentsCheck
answers.mdTen answers, each with citationsEvery citation links back to a source where the sentence can be located
citations.csvQuestion / cited page / source sentence / supported?Ten rows, no blank rows
eval.csvQuestion / verdict (correct, incorrect, abstained) / reasonAnother reader can review the verdict
failures.mdFailures and proposed fixesRecord actual outcomes and triggers; label deliberately constructed failure inputs

评分标准Rubric

每项 0–2 分,共 10 分:

维度0 分1 分2 分
引用准确引用页与答案无关引用页相关但句子对不上每条都能点回并找到原句
拒答不会的题也硬答拒答了但没说缺什么3 道无答案题全部拒答并说明缺口
评测可复核只有「感觉对」有判定但无原因每题有判定与可复核原因
失败记录没记录记了现象记了触发条件与改法
可复现别人跑不出同样结果步骤缺一环切分、检索、提示词三步可照做

8 分及格;6 分以下回到「怎么评测 RAG 的效果」重做。

Award 0–2 for each item, for a total of ten:

Dimension012
Citation accuracyPage unrelated to answerRelevant page, but sentence does not support answerEvery source sentence can be located and supports the answer
AbstentionAnswers unsupported questions anywayAbstains without explaining the gapAbstains on all three unanswerable questions and explains what is missing
Reviewable evaluationOnly “feels right”Verdict without a reasonVerdict and reviewable reason for every question
Failure logNo logSymptoms onlyTrigger conditions and proposed fixes
ReproducibilityOthers cannot follow the processA step is missingChunking, retrieval and prompting steps can be followed

Eight is the exercise's passing score. Below six, return to the RAG evaluation guide and repeat the exercise.

参考答案结构Model answer outline

不提供逐题答案(语料由你选),提供合格答案的结构:

问题:分块时为什么要保留标题和页码?
答案:它们可作为元数据,让检索时按结构信息过滤。
引用:《怎么给文档做分块》「怎么做」第 6 项;原文句:「保留结构信息:标题、章节、页码存进元数据,检索时能过滤。」
判定:对;原因:引用句直接支持答案。

拒答题的合格写法:

问题:这个模型在 2026-11-01 的准确率是多少?
答案:语料里没有该日期的评测数据,无法回答。需要补充官方评测页或自建评测。
判定:拒答;原因:语料中无对应事实。

The corpus is your choice, so this supplies an answer structure rather than answers to every question:

Question: Why preserve headings and page numbers when chunking?
Answer: They can be stored as metadata to filter retrieval by document structure.
Citation: How to Chunk Documents for Retrieval, “How to do it”, item 6.
Source sentence (Chinese original): 保留结构信息:标题、章节、页码存进元数据,检索时能过滤。
Verdict: correct; the cited sentence directly supports the answer.

An acceptable abstention:

Question: What was this model's accuracy on 2026-11-01?
Answer: The corpus contains no evaluation data for that date, so this cannot be answered.
An official evaluation page or a suitable evaluation would be needed.
Verdict: abstained; the required fact is absent from the corpus.

常见失分Common misses

  • 引用整页而不是句子:读者无法核对。
  • 把「语义相近」当「原文支持」:答案超出引用句。
  • 无答案题也答:宁可拒答,不要补记忆。
  • 只测正常输入会漏掉边界问题;补充无答案、缺字段和不符合格式的样本。
  • Citing a whole page instead of a supporting sentence makes checking difficult.
  • Semantic similarity does not establish support; an answer may go beyond the cited text.
  • Abstain on unanswerable questions rather than filling gaps from memory.
  • Normal inputs alone miss boundary cases. Add unanswerable questions, missing fields and malformed inputs.

出处Sources

资料快照日期:2026-11-03;单项复核范围与日期见对应正文或来源记录。产品功能与条款可能变化,使用前请核对原始来源。Source snapshot: 2026-11-03; item-specific rechecks and their scope are recorded in the text or source notes. Features and terms may change; check the original sources before use.