Zubnet AI学习Wiki › Question Answering
Using AI

Question Answering

QA, Reading Comprehension
一个用自然语言回答问题的系统。抽取式 QA 在给定文档中找答案所在的片段(“根据第 3 段,答案是...”)。生成式 QA 从一个或多个源头综合出答案。开放域 QA 不需要特定文档就能回答任何问题。基于 RAG 的 QA 检索相关文档,并从中生成答案。

为什么重要

Question-answering 是 AI 助手的基本交互模式。每个聊天机器人、每个企业知识库、每个客服机器人本质上都是 QA 系统。理解不同的 QA 范式(抽取式、生成式、retrieval-augmented)帮你为应用选对架构,并对准确性建立现实预期。

Deep Dive

Extractive QA (the SQuAD paradigm): given a document and a question, identify the exact span of text that answers the question. Fine-tuned BERT models excel at this — they read the document, understand the question, and highlight the answer. This is fast, accurate, and verifiable (the answer is always a direct quote). But it can only answer questions whose answers appear verbatim in the document.

RAG-Based QA

The dominant modern pattern: (1) user asks a question, (2) retrieve relevant documents from a knowledge base using semantic search, (3) include the retrieved documents in the LLM's context, (4) the LLM generates an answer based on the retrieved context. This combines the precision of retrieval with the fluency of generation. The key challenges are retrieval quality (finding the right documents) and faithfulness (generating answers that accurately reflect the source material).

Evaluation

QA accuracy is measured differently for each paradigm. Extractive QA uses exact match (EM) and F1 score against ground-truth answer spans. Generative QA is harder to evaluate automatically — multiple valid phrasings exist for any answer. RAGAS and similar frameworks evaluate RAG-based QA on faithfulness (does the answer match the source?), relevance (did you retrieve the right documents?), and answer quality. Human evaluation remains the gold standard for generative QA.

相关概念

← 所有术语
ESC