Concept
Hallucination detection and grounding
Make a model’s answers match real sources, and catch the ones that do not.
- 1A user asks a question.
- 2The application retrieves trusted documents.
- 3The model answers using only those documents.
- 4A grounding check tests whether the answer is supported.
Step by step
- 1A user asks a question.
- 2The application retrieves trusted documents.
- 3The model answers using only those documents.
- 4A grounding check tests whether the answer is supported.
Retrieve first, then check the answer against the source.
RAG grounding
- How it helps
- Answers come from retrieved sources
- Example
- Answer from the policy manual, with a link
Output validation
- How it helps
- Checks answers against rules or data
- Example
- Price must match the catalog
Confidence scoring
- How it helps
- Rates how sure the answer is
- Example
- Low score goes to a person
Contextual grounding check
- How it helps
- Scores support by the source
- Example
- Blocks unsupported answers
Human review
- How it helps
- A person checks risky answers
- Example
- Legal text reviewed before sending
| Method | How it helps | Example |
|---|---|---|
| RAG grounding | Answers come from retrieved sources | Answer from the policy manual, with a link |
| Output validation | Checks answers against rules or data | Price must match the catalog |
| Confidence scoring | Rates how sure the answer is | Low score goes to a person |
| Contextual grounding check | Scores support by the source | Blocks unsupported answers |
| Human review | A person checks risky answers | Legal text reviewed before sending |
1 / 3
RAG grounding
- How it helps
- Answers come from retrieved sources
- Example
- Answer from the policy manual, with a link
Output validation
- How it helps
- Checks answers against rules or data
- Example
- Price must match the catalog
| Method | How it helps | Example |
|---|---|---|
| RAG grounding | Answers come from retrieved sources | Answer from the policy manual, with a link |
| Output validation | Checks answers against rules or data | Price must match the catalog |
2 / 3
Confidence scoring
- How it helps
- Rates how sure the answer is
- Example
- Low score goes to a person
Contextual grounding check
- How it helps
- Scores support by the source
- Example
- Blocks unsupported answers
| Method | How it helps | Example |
|---|---|---|
| Confidence scoring | Rates how sure the answer is | Low score goes to a person |
| Contextual grounding check | Scores support by the source | Blocks unsupported answers |
3 / 3
Human review
- How it helps
- A person checks risky answers
- Example
- Legal text reviewed before sending
| Method | How it helps | Example |
|---|---|---|
| Human review | A person checks risky answers | Legal text reviewed before sending |
What it is
A hallucination is an answer that sounds right but is false or made up. Models produce them because they predict likely words, not checked facts. In a business setting, a made-up refund policy or legal claim is a real risk.
Grounding ties the answer to trusted information. Retrieval augmented generation (RAG) is the main method: the application fetches relevant documents and tells the model to answer only from them. Citing the sources lets people check the answer.
What it is
Detection catches what grounding misses. Output validation checks answers against rules or sources. Confidence scoring estimates how sure the system is, and low scores go to a human. Amazon Bedrock Guardrails has contextual grounding checks that score whether an answer is supported by the source and relevant to the question, and block it below a threshold.
Remember
- Hallucination: a confident answer that is false or invented.
- RAG grounding: retrieve trusted documents and answer from them. Cite the sources.
- Output validation: check answers against rules or sources before use.
- Confidence scoring: low confidence goes to a human or gets a fallback answer.
Remember
- Contextual grounding check in Amazon Bedrock Guardrails: blocks answers the source does not support.
- Grounding lowers hallucinations but does not remove them.
On the exam
- “Make a model answer from the company’s own documents” points to RAG grounding.
- “Block answers that the retrieved source does not support” points to the contextual grounding check in Amazon Bedrock Guardrails.
- “Send uncertain answers to a human reviewer” describes confidence scoring with human review.
Do not mix it up with
- Retrieval Augmented Generation (RAG)Look up facts first, add them to the prompt, then let the model answer from them.
- Amazon Bedrock GuardrailsSafeguards that check what goes into a generative AI application and what comes out.
- Limitations of GenAIWhere generative AI falls short: hallucinations, hard-to-explain output, errors and varying answers.