# AI evals

> Evaluation datasets of inputs and expected outputs (imported or taken from rated ai-chat replies), runs against a prompt version and model, a score per scorer and item, and a regression compare between two runs; only the service role reads and writes them.

- Category: AI
- Module: `ai-evals`
- Modes: `managed`
- Docs: https://bettersupabase.com/docs/blocks/ai-evals
- Page: https://bettersupabase.com/blocks/ai-evals

## Install

```bash
npx better-supabase add ai-evals
```

## Configure

Add the block to `better-supabase.config.ts`:

```ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  blocks: {
    // Modes: "managed". The default is "managed".
    "ai-evals": { mode: "managed" },
  },
});
```

## Client

The block has no React entry yet. Its server-side TypeScript is in `better-supabase/blocks/ai-evals`.

## Related blocks

Works with: [ai-chat](https://bettersupabase.com/blocks/ai-chat.md)
