# Evaluate threads in your project
results = evaluate_threads(
    project_name="my_chatbot_project",
    eval_project_name="quality_evaluation",
    metrics=[quality_metric],
)
```

### Key Patterns in LLM-as-Judge Metrics

When building LLM-as-judge metrics, follow these best practices:

1. **Structured Output**: Use Pydantic models to ensure consistent LLM responses
2. **Clear Prompts**: Provide specific evaluation criteria to the judge
3. **Error Handling**: Wrap LLM calls in try-except blocks with proper logging
4. **Model Flexibility**: Allow users to specify their preferred judge model
5. **Reason Field**: Always include an explanation for transparency

## Using Custom Conversation Metrics

You can use custom metrics with `evaluate_threads`:

```python
from opik.evaluation import evaluate_threads