Identify Hallucination
When AI models generate responses, sometimes the outputs stray from the original instructions or context, creating fabricated or irrelevant content. This phenomenon is known as hallucination.
Hallucinations can be frustrating, especially when the AI’s reliability matters. Whether you’re building a chatbot, summarising documents, or generating answers, identifying hallucinations is key to improving accuracy and trust in your AI system.
Hallucinations happen when the output:
- Doesn’t follow the user’s instructions.
- Introduces information that isn’t part of the given context.
- Strays into unrelated topics or makes unsupported claims.
That is why detecting hallucination matters because it ensures accuracy by reducing errors in AI-generated content, which is critical for applications like customer service, research, or education and it can help builds trust with its consistent and grounded responses, thus making users confident in the AI system’s capabilities.
Following are the evals to identify hallucinations in AI-generated text content:
1. Prompt/Instruction Adherence
Measures how closely an output follows given prompt instructions, checking for completion of requested tasks and adherence to specified constraints or formats.
Click here to read the eval definition of Prompt/Instruction Adherence
a. Using Interface
Inputs Required:
- Output: The column that has response generated by the AI system.
b. Using SDK
2. Context Adherence
Evaluates how well responses stay within the provided context by measuring if the output contains any information not present in the given context.
Click here to read the eval definition of Context Adherence
a. Using Interface
Inputs Required:
- Output: The response generated by the AI system.
- Context: The background information or source material the response should be based on.