# Question answering (QA)

> Canonical: https://skillalmanac.com/glossary/question-answering | Last verified: 2026-11-25 | Index status: index-eligible

Question answering (QA) is the task of building systems that respond to questions asked in natural language. Answers can be extracted from supplied text or generated by a language model, with or without retrieval.

Also called: QA, QA NLP, question answering NLP, QA system, question answering system.

## In plain language

Question answering means asking a computer a question in ordinary words and getting an answer back, not a list of links. A help-desk assistant that answers how do I reset my password from your support articles is a QA system. Some systems copy the answer out of a document you give them. Others write it from what a language model learned in training. The main risks are a confident wrong answer, an answer to a question the documents never covered, and a question that is ambiguous. Good systems should say when the sources do not contain an answer. Check answers against the cited source before acting on them.

## Technical definition

The Stanford textbook Speech and Language Processing distinguishes open book QA, where the answer is produced given one or more documents (for example through retrieval-augmented generation), from closed book QA, where the language model answers directly with no retrieval. It describes reading comprehension as an earlier task in which a model is given a question and a document and must extract the answer, and says factual QA can be scored by exact match against a known answer or by token F1 for free text. IBM adds the extractive versus generative split and open-domain versus closed-domain, and lists as challenges ambiguous intent, reasoning across several sources, and recognizing when a question has no answer in the sources.

## How it shows up when you use agents

Whenever you ask an agent a factual question, you are using question answering in one of two modes. If it answers from memory, that is closed book. If it first searches files, docs or the web and then answers, that is open book, and it is the idea behind [retrieval-augmented generation](/glossary/retrieval-augmented-generation). Support bots, documentation assistants and library-lookup skills are all QA systems over a set of sources.

What breaks when the difference is ignored: a closed book answer about a library version or an internal policy can be a confident [hallucination](/glossary/hallucination), and an open book answer is only as good as the passages found. IBM lists recognizing when no answer exists in the sources as a challenge, so a good test is to ask questions you know the documents do not answer and see whether the system says so.

The next action is to require a citation for each answer and spot-check a sample. For code questions, prefer a setup that points the agent at the installed package files, not recall.

## Common confusions

- **Extractive versus generative QA.** Extractive systems pull the answer from provided text. Generative systems write it, often with a large language model, so the wording may not appear in any source.
- **Open book versus closed book.** Open book uses documents at question time. Closed book relies on what the model absorbed in training.
- **QA versus search.** Search returns documents for you to read. QA returns an answer. Many QA systems use search underneath.
- **Myth.** A high score on a benchmark means it will answer your questions. IBM notes evaluation metrics may not fully capture understanding, and models may exploit shortcuts in datasets.

## Worked examples in this catalogue

### [library-docs-lookup](https://skillalmanac.com/skills/skill-almanac/library-docs-lookup)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: An agent answering library questions from the installed package's own files, with file and line cited.

Why it exercises the concept: It is open book QA for code: the answer is drawn from supplied sources and cited, so you can check it against the file.

### [faq-page-builder](https://skillalmanac.com/skills/skill-almanac/faq-page-builder)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: An FAQ page built from customer questions and facts you supply.

Why it exercises the concept: It is the authoring side of QA. The questions and answers it produces are the source material a QA system or support bot would answer from.

### [What Is RAG? Retrieval-Augmented Generation Explained](https://skillalmanac.com/learn/what-is-rag)

Status: illustrative example from the item's own documentation, not executed for this page.

What you see: A walkthrough of how a model answers from passages fetched at question time, and where retrieval fails.

Why it exercises the concept: RAG is a common way to do open book QA over your own documents, and the guide shows why a missing passage leads to a weak answer.

## Related terms

- [Retrieval-augmented generation (RAG)](https://skillalmanac.com/glossary/retrieval-augmented-generation.md)
- [Natural language processing (NLP)](https://skillalmanac.com/glossary/natural-language-processing.md)
- [Large language model (LLM)](https://skillalmanac.com/glossary/large-language-model.md)
- [AI hallucination](https://skillalmanac.com/glossary/hallucination.md)
- [Chatbot](https://skillalmanac.com/glossary/chatbot.md)
- [Semantic search](https://skillalmanac.com/glossary/semantic-search.md)

## Sources

- [Information Retrieval and RAG (Speech and Language Processing, chapter 11)](https://web.stanford.edu/~jurafsky/slp3/11.pdf), Stanford University (Jurafsky and Martin) (accessed 2026-11-24)
- [What is question answering?](https://www.ibm.com/think/topics/question-answering), IBM (accessed 2026-11-24)

Definitions are written by Skill Almanac from the sources above and checked against them on 2026-11-25. [Glossary index](https://skillalmanac.com/glossary.md).
