Bitzu

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

Single choice

How does retrieval-augmented generation (RAG) reduce hallucinations?

  1. It supplies relevant trusted documents for the model to base its answer on
  2. It retrains the foundation model weights on every request
  3. It raises the temperature to make answers more varied
  4. 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.

Select all that apply

Which inputs does a contextual grounding check need to evaluate a response?

  1. The grounding source text
  2. The user's query
  3. The model response to be checked
  4. The model's training dataset
  5. 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

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.

Download on the App StoreGet it on Google Play

More AIF-C01 topics in this module