Definition
The context utilization test measures how effectively the LLM uses the provided context when generating its response. This metric evaluates whether the model is appropriately leveraging the available contextual information to produce better answers.Taxonomy
- Task types: LLM.
- Availability: and .
Why it matters
- Context utilization ensures that your LLM is effectively using the retrieved or provided context to improve its responses.
- This metric helps identify when your model is ignoring relevant context or not incorporating it appropriately into its answers.
- It’s particularly important for RAG (Retrieval-Augmented Generation) systems where context should enhance the quality of generated responses.
Required columns
To compute this metric, your dataset must contain the following columns:- Input: The question or prompt given to the LLM
- Outputs: The generated answer/response from your LLM
- Context: The provided context or background information
Test configuration examples
If you are writing atests.json
, here are a few valid configurations for the context utilization test:
Related
- Ragas integration - Learn more about Ragas metrics.
- Context relevancy test - Measure relevance of retrieved context.
- Context recall test - Measure completeness of retrieved context.
- Faithfulness test - Evaluate factual consistency with context.
- Aggregate metrics - Overview of all available metrics.