> ## Documentation Index
> Fetch the complete documentation index at: https://docs.athina.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Context Sufficiency

*This is an [LLM Graded Evaluator](faqs/evals/why-llm-judge)*

[Github ](https://github.com/athina-ai/athina-evals/blob/main/athina/evals/llm/context_contains_enough_information/evaluator.py)

### Info[](#info)

This evaluator checks if the retrieved context contains enough information to answer the user's query.

**Required Args**

* `query`: The query, ideally in a question format.
* `context`: The retrieved data that should contain the required information to answer the user's query

**Default Engine:** `gpt-4`

***

### Example[](#example)

> * **Query**: How much equity does Y Combinator take?
> * **Retrieved Context**: YC invests \$500,000 in 200 startups twice a year.

<Warning>
  **Eval Result**

  * **Result:** Fail
  * **Explanation:** The context mentions that YC invests \$500,000 but it does not mention how much equity they take, which is what the query is asking about.
</Warning>

***

### Run the eval on a dataset[](#run-the-eval-on-a-dataset)

1. Load your data with the `Loader`

```python
from athina.loaders import Loader

# Load the data from JSON, Athina or Dictionary
dataset = Loader().load_json(json_file)
```

2. Run the evaluator on your dataset

```python
from athina.evals import ContextContainsEnoughInformation

# Checks if the context contains enough information to answer the user query provided
ContextContainsEnoughInformation().run_batch(data=dataset)
```

### Run the eval on a single datapoint[](#run-the-eval-on-a-single-datapoint)

```python
from athina.evals import ContextContainsEnoughInformation

# Checks if the context contains enough information to answer the user query provided
ContextContainsEnoughInformation().run(
    query=query,
    context=context
)
```
