File size: 4,345 Bytes
497bad8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | # Test Format Specification
[English](#english) • [Français](#français)
---
## English
### Overview
Each test category is a JSON file in `tests/` containing an array of test objects.
### Standard Test Format
```json
{
"id": "category_001",
"prompt": "The user message to send to the model",
"system": "Optional system prompt (defaults to Yawo system prompt)",
"eval_method": "keywords",
"expected_keywords": ["keyword1", "keyword2"],
"temperature": 0.3,
"description": "Human-readable description of what this test evaluates"
}
```
### Fields
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | ✅ | Unique test identifier (format: `category_NNN`) |
| `prompt` | string | ✅* | User message sent to the model |
| `messages` | array | ✅* | Full message array for multi-turn tests |
| `system` | string | ❌ | System prompt (default: Yawo standard prompt) |
| `eval_method` | string | ✅ | Scoring method to use |
| `temperature` | float | ❌ | Generation temperature (default: 0.3) |
| `description` | string | ❌ | What this test evaluates |
*Either `prompt` or `messages` is required, not both.
### Evaluation Method Fields
#### `exact_match`
```json
{
"eval_method": "exact_match",
"expected": "The exact expected answer"
}
```
#### `keywords`
```json
{
"eval_method": "keywords",
"expected_keywords": ["word1", "word2", "word3"]
}
```
#### `multiple_choice`
```json
{
"eval_method": "multiple_choice",
"expected": "B"
}
```
#### `format`
```json
{
"eval_method": "format",
"expected_format": {
"contains_ewe": true,
"min_length": 50,
"max_length": 2000,
"contains_function_call": false,
"markdown_elements": ["header", "list", "bold"]
}
}
```
#### `ewe_quality`
```json
{
"eval_method": "ewe_quality"
}
```
No additional fields needed — scored by heuristic.
#### `composite`
```json
{
"eval_method": "composite",
"expected_keywords": ["word1", "word2"],
"expected_format": {
"contains_ewe": true,
"min_length": 100
}
}
```
### Multi-turn Test Format
For conversation tests, use `messages` instead of `prompt`:
```json
{
"id": "multi_turn_001",
"messages": [
{"role": "system", "content": "Tu es Yawo..."},
{"role": "user", "content": "First user message"},
{"role": "assistant", "content": "Expected first response context"},
{"role": "user", "content": "Follow-up question"}
],
"eval_method": "composite",
"expected_keywords": ["reference_to_first_turn"],
"expected_format": {"contains_ewe": true}
}
```
### Complete Example
```json
[
{
"id": "cultural_001",
"prompt": "Gblɔ lododo Ewe aɖe nam si fia be dɔ wɔwɔ le vevi",
"system": "Tu es Yawo, un assistant IA expert en culture Ewe. Réponds en Ewe.",
"eval_method": "composite",
"expected_keywords": ["lododo", "dɔ", "agbe"],
"expected_format": {
"contains_ewe": true,
"min_length": 50
},
"temperature": 0.5,
"description": "Can the model produce an authentic Ewe proverb about hard work?"
}
]
```
---
## Français
### Vue d'ensemble
Chaque catégorie de tests est un fichier JSON dans `tests/` contenant un tableau d'objets test.
### Format standard
```json
{
"id": "categorie_001",
"prompt": "Le message utilisateur envoyé au modèle",
"system": "System prompt optionnel",
"eval_method": "keywords",
"expected_keywords": ["motcle1", "motcle2"],
"temperature": 0.3,
"description": "Description lisible de ce que le test évalue"
}
```
### Champs
| Champ | Type | Requis | Description |
|-------|------|--------|-------------|
| `id` | string | ✅ | Identifiant unique (format: `categorie_NNN`) |
| `prompt` | string | ✅* | Message utilisateur |
| `messages` | array | ✅* | Tableau complet pour les tests multi-tour |
| `system` | string | ❌ | System prompt (défaut: prompt Yawo standard) |
| `eval_method` | string | ✅ | Méthode de scoring |
| `temperature` | float | ❌ | Température de génération (défaut: 0.3) |
| `description` | string | ❌ | Ce que le test évalue |
### Ajouter un test
1. Choisir la catégorie appropriée dans `tests/`
2. Ajouter l'objet test au tableau JSON
3. S'assurer que l'`id` est unique
4. Tester avec `python run_benchmark.py --category <category> -v`
5. Soumettre une PR
|