Skip to content

Question Answering & RAG

Retrieve the evidence first, then answer from it

inTextText

What this capability means

Takes a question and returns an answer. It has two forms: closed-book, answering from parameters alone, and open-book, retrieving relevant passages from an external corpus first. Retrieval-augmented generation belongs to the latter, keeping knowledge in an updatable external store and usually attaching citations. It differs from free generation by having an explicit question and a verifiable target answer.

How it is done

A RAG pipeline chunks documents into vectors in an index, encodes the question the same way and takes nearest neighbours, then pastes the retrieved passages with the question into a prompt so the model can answer with citations. Refinements include hybrid dense-plus-sparse retrieval, query rewriting before retrieval, and a reranker to pick the best passages. Closed-book answering relies purely on knowledge compressed during pre-training.

Representative products

14

Perplexity AI

Perplexity

Answers built as it searches, each one backed by sources

3Caps
App Freemium
TextText
2022

Google DeepMind

NotebookLM

Answers only from the sources you give it, with citations

3Caps
App Freemium
TextTableAudioTextAudio
2023

OpenAI

ChatGPT

The chat window that put a large language model in everyone’s hands

4Caps
App Freemium
TextImageAudioTextImageAudio
2022

OpenAI

GPT-4o

A natively multimodal general model, with text, image and audio through one door

4Caps
Model Closed
TextImageAudioTextAudio
2024

Google DeepMind

Gemini

One chat entry point that gathers search, office apps and a multimodal model

4Caps
App Freemium
TextImageAudioTextImageAudio
2024

Cohere

Command R

A commercial model built for retrieval augmentation and tool use

4Caps
Model Open weights
TextText
2024

AI21 Labs

Jamba

An open-weight model that mixes a state-space model with a Transformer

4Caps
Model Open weights
TextText
2024

Moonshot AI

Kimi

A Chinese chat assistant known for long-context handling

3Caps
Model Closed
TextText
2023

Tencent (Hunyuan)

Hunyuan

Tencent’s general model family, with open-weight versions

4Caps
Model Open weights
TextImageText
2023

Microsoft

Microsoft Copilot

Conversational AI woven into the operating system and office apps

4Caps
App Freemium
TextImageAudioTextImage
2023

ByteDance (Seed)

Doubao

ByteDance’s general chat model and application

4Caps
Model Closed
TextImageText
2023

LangChain

LangChain

Chain models, tools and retrieval together

3Caps
Tool Open source
2022

Baidu

ERNIE

A Chinese model that began with knowledge-enhanced pretraining, an early landmark version

3Caps
Model Closed
TextText
2019

Pinecone

Pinecone

A managed vector database for similarity search

2Caps
Infrastructure Closed
2019

Organizations involved

Typical uses

  • Enterprise knowledge bases and internal Q&A
  • Web-search assistants with citations
  • Document and contract interrogation
  • Support and technical self-service

How it is evaluated

Exact Match
Share of answers identical to the reference
Answer F1
Token overlap with the reference, allowing partial credit
Retrieval hit rate and citation accuracy
Whether evidence was retrieved and citations actually support the claim

Limits and hard parts

  • When the right passage is not retrieved, the model still answers confidently — hallucination in disguise
  • Multi-hop questions needing several documents break, answering only one link
  • Key evidence in the middle of a long context is the most likely to be ignored

Concepts behind it

AI Engineering, Safety & Ethics

Retrieval-Augmented GenerationBeginner

Rather than cramming knowledge into parameters, leave it outside and look it up on demand — an open-book exam instead of a closed-book one

4Linked
Figures 2 · Data 1

NLP & Large Language Models

Attention MechanismIntermediate

Every position can look directly at every other position and dynamically weight how much attention to pay

4Linked
Figures 1 · Data 1

NLP & Large Language Models

Prompting & AlignmentExpert

Making a model helpful, honest and harmless is harder than simply making it bigger

4Linked
Figures 1 · Data 1