> ## Documentation index
> Fetch the complete documentation index at: https://arize.com/llms.txt
> Ask it with GET https://arize.com/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.

# LiteLLM Evals

> Configure and run LiteLLM for evals

### Using LiteLLM with Phoenix Evals

<Info>
Requires `litellm>=1.0.3`

```sh
pip install "arize-phoenix-evals>=3" litellm
```
</Info>

Create an `LLM` instance with the LiteLLM provider:

```python
from phoenix.evals import LLM

llm = LLM(provider="litellm", model="gpt-4o")
```

LiteLLM supports [100+ providers](https://docs.litellm.ai/docs/providers). Set the appropriate environment variables for your provider before creating the LLM. For provider-specific configuration, see [LiteLLM provider params](https://docs.litellm.ai/docs/completion/input#provider-specific-params).

### Ollama example

```python
import os
from phoenix.evals import LLM

os.environ["OLLAMA_API_BASE"] = "http://localhost:11434"

llm = LLM(provider="litellm", model="ollama/llama3")
```

### Using with evaluators

```python
from phoenix.evals import LLM, evaluate_dataframe
from phoenix.evals.metrics import FaithfulnessEvaluator

llm = LLM(provider="litellm", model="ollama/llama3")
evaluator = FaithfulnessEvaluator(llm=llm)

results_df = evaluate_dataframe(dataframe=df, evaluators=[evaluator])
```
