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

# Ragas

> Ragas ve TokenLab ile LLM uygulamalarını değerlendirin

## Genel Bakış

Ragas, OpenAI uyumlu bir `AsyncOpenAI` istemcisini `llm_factory` içine geçirerek TokenLab destekli uygulamaları değerlendirebilir.

<Note>
  **Tür**: Değerlendirme çerçevesi

  **Birincil Yol**: OpenAI uyumlu Chat Completions

  **Destek Güveni**: Desteklenen OpenAI uyumlu yol
</Note>

## Ortam

```bash theme={null}
export TOKENLAB_API_KEY="sk-your-tokenlab-key"
```

## Örnek Değerlendirici

```python theme={null}
import os

from openai import AsyncOpenAI
from ragas.llms import llm_factory
from ragas.metrics import DiscreteMetric

client = AsyncOpenAI(
    api_key=os.environ["TOKENLAB_API_KEY"],
    base_url="https://api.tokenlab.sh/v1",
)
llm = llm_factory("claude-sonnet-5", client=client)

metric = DiscreteMetric(
    name="summary_accuracy",
    allowed_values=["accurate", "inaccurate"],
    prompt="Evaluate whether the response is accurate. Answer only accurate or inaccurate.\n\nResponse: {response}",
)
```

Ragas metriklerinde ve test kümelerinde `llm` nesnesini, OpenAI SDK destekli bir modeli kullanacağınız şekilde kullanın.

## Uç Nokta Notları

Ragas burada OpenAI SDK istemci yolunu kullanır. Yerel TokenLab Yanıtları, Anthropic Messages ve Gemini rotaları, bu istek biçimlerini doğrudan destekleyen değerlendirme çalıştırıcıları aracılığıyla en iyi şekilde kullanılır.
