Question answering
Question answering is the computational task of producing, selecting, or extracting an answer to a natural-language question from available information or knowledge.
AI-Powered Search
Question answering is the task of producing an answer to a natural-language question from available information.
- How it is used
- Uses question answering to return direct answers instead of requiring searchers to sift through result lists.
- How deep it goes
- Develops an extractive retriever-reader pipeline from data labeling through fine-tuning and reranking, while deferring abstractive question answering.
- Examples
- Uses Stack Exchange outdoors question-answer pairs, including a query about minimalist shoes, to demonstrate answer extraction.
- What you can do after
- Applies a Hugging Face Transformers pipeline to label question-context pairs and integrate a fine-tuned reader with search.
Effective Conversational AI
Question-answering is a conversational AI capability that responds directly to a user's question, usually without follow-up interaction.
- How it is used
- Delivers direct answers to frequently asked questions, usually without follow-up interaction.
- How deep it goes
- Explains utterance-to-intent-to-response mapping, example-based training, and response trade-offs without descending into implementation code.
- Examples
- Uses store-hours and cake-price questions, cake ordering, and account-balance requests to distinguish answers from completed tasks.
- What you can do after
- Build it from scratch with trained question examples and controlled responses, then evaluate answer accuracy and unnecessary follow-ups.
Read how Effective Conversational AI explains question answering →
Natural Language Processing in Action, Second Edition
A question-answering system produces answers to questions expressed in natural language.
- How it is used
- Builds FAQ bots and document-grounded applications that answer natural-language questions.
- How deep it goes
- Explains matching, retrieval, extraction, and generation with runnable pipelines, but defers deeper model internals.
- Examples
- Uses data-science FAQs, book sentences, Haystack, TF–IDF, FAISS, BERT-based retrievers, and transformer readers.
- What you can do after
- Builds a basic FAQ matcher or configures a Haystack retrieval-and-reading pipeline.
Read how Natural Language Processing in Action, Second Edition explains question answering →
Transfer Learning for Natural Language Processing
Question answering determines an appropriate answer to a question expressed in natural language.
- How it is used
- Applies question answering to human queries, including searches, fact checking, medical diagnosis, and customer-service chatbots.
- How deep it goes
- Defines extractive answers as paragraph start and end indices, demonstrates a pretrained pipeline, and does not detail model internals or training.
- Examples
- Uses a COVID-19 article paragraph to answer questions about its topic, country, disease, and time period.
- What you can do after
- Apply question answering with the Transformers pipeline to extract answers from a supplied context paragraph.
Read how Transfer Learning for Natural Language Processing explains question answering →
Introduction to Generative AI, Second Edition
Question answering is the task of producing answers to questions posed in natural language.
- How it is used
- Frames question answering as a core large-language-model application for responding to natural-language questions.
- How deep it goes
- Distinguishes task formats and answer-generation modes, then explains representation, parsing, pretraining, and uncertainty without implementation details.
- Examples
- Uses Nobel Prize, Beethoven, and first-president questions alongside text passages, tables, multiple-choice items, and conversational datasets.
- What you can do after
- Evaluate question-answering systems by distinguishing answer formats, context use, reading-comprehension settings, and risks of unsupported responses.
Read how Introduction to Generative AI, Second Edition explains question answering →
LLM Evaluation and Alignment, The Foundational Ideas
Question answering is a language-processing task in which a system generates or extracts answers to questions about provided content.
- How it is used
- Measures factual consistency across sampled responses by comparing answers to questions generated from target sentences.
- How deep it goes
- Explains a two-step verification procedure and its limitation, but stops short of implementation details.
- Examples
- Uses a Pantheon completion-date claim and compares extracted answers across samples.
- What you can do after
- Evaluate fine-grained factual consistency by generating claim-focused questions and comparing answers across samples.
Read how LLM Evaluation and Alignment, The Foundational Ideas explains question answering →
Also covered in
- AI Agents and Applications
- Domain-Specific Small Language Models
- Human-in-the-Loop Machine Learning: Active learning and annotation for human-centered AI
- Knowledge Graphs and LLMs in Action
- Hugging Face in Action
- Data Analysis with LLMs
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- foundation modelA foundation model is a broadly trained machine-learning model whose learned capabilities can be reused or adapted for a range of downstream tasks.
- similarity searchSimilarity search is a retrieval technique that finds or ranks items by their similarity to a query, often by comparing feature or vector representations under a similarity or distance measure.
- promptA prompt is text or other input supplied to an AI model to provide instructions, context, or other information that guides its response or generated output.
Related concepts
- extractive question answeringincludes · Extractive question answering is a technique that answers a question by selecting a relevant span of text from supplied source material.
- conversational aikind of · Conversational AI is artificial intelligence that enables software systems to interpret user input and interact with users through natural-language dialogue.
- abstractive question answeringincludes · Abstractive question answering synthesizes information into newly generated answer text rather than selecting text directly from source documents.
- closed-book generative question answeringincludes · A question-answering approach that generates an answer from the question and the model's learned information without supplied external context.
Questions about question answering
What is question answering?
Question answering is the computational task of producing, selecting, or extracting an answer to a natural-language question from available information or knowledge.
Which Manning books explain question answering?
AI-Powered Search, Effective Conversational AI, Natural Language Processing in Action, Second Edition, Transfer Learning for Natural Language Processing, Introduction to Generative AI, Second Edition and LLM Evaluation and Alignment, The Foundational Ideas.
What should I know before learning question answering?
Manning books that teach question answering usually introduce language model, foundation model, similarity search and prompt first.
What kinds of question answering are there?
Kinds of question answering include knowledge-based question answering, multihop question answering, extractive question answering, abstractive question answering and closed-book generative question answering.
What is question answering a kind of?
Question answering is a kind of conversational ai. Conversational AI is artificial intelligence that enables software systems to interpret user input and interact with users through natural-language dialogue.
What is question answering also called?
Question answering is also called QA.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.





