AIF-C01 ยท Securing and governing AI solutions
Hallucination detection and grounding
RAG grounding, output validation and confidence scoring to improve output accuracy.
Key points
- Hallucination: a fluent answer that is wrong or unsupported.
- Retrieval-augmented generation (RAG): grounds the model in trusted documents; source citation lets users check claims.
- Contextual grounding check (Bedrock Guardrails): scores grounding (supported by the source) and relevance (answers the question); below your thresholds, blocked or flagged.
- Output validation against rules and human review add confidence.
Source: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails-contextual-grounding-check.html
Practice questions
How does retrieval-augmented generation (RAG) reduce hallucinations?
- It supplies relevant trusted documents for the model to base its answer on
- It retrains the foundation model weights on every request
- It raises the temperature to make answers more varied
- It removes the user's question from the prompt
Show answer
Answer: A. It supplies relevant trusted documents for the model to base its answer on
RAG puts retrieved evidence in the prompt so the answer can rest on it. It does not retrain the model, and higher temperature increases variability.
Which inputs does a contextual grounding check need to evaluate a response?
- The grounding source text
- The user's query
- The model response to be checked
- The model's training dataset
- The GPU type used for inference
Show answer
Answer: A. The grounding source text, B. The user's query, C. The model response to be checked
The check compares the response with the source in light of the query. The training data and hardware are not inputs.
True or false: setting the grounding threshold to 1 gives the strictest valid filter.
Show answer
Answer: False
False. Thresholds range from 0 to 0.99; a value of 1 is invalid because it would block all content.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
