Eval-Gerüst gegen aufgezeichnete Antworten #10

Merged
torben merged 9 commits from 4-eval-harness into main 2026-12-02 18:40:45 +00:00
8 changed files with 41 additions and 0 deletions
Showing only changes of commit c423e1039c - Show all commits

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
input:
text: "Heute ist ein schöner Tag."
expect:
- grader: "equals"
path: "/entities"
value: []
+9
View File
@@ -0,0 +1,9 @@
input:
text: "Marie Curie wurde in Warschau geboren."
expect:
- grader: "equals"
path: "/language"
value: "de"
- grader: "contains"
path: "/entities"
items: ["Marie Curie", "Warschau"]
+11
View File
@@ -0,0 +1,11 @@
input:
text: |
The European Space Agency launched
a new satellite last week.
expect:
- grader: "equals"
path: "/language"
value: "en"
- grader: "contains"
path: "/entities"
items: ["European Space Agency"]
+3
View File
@@ -0,0 +1,3 @@
name: "example"
threshold: 1.0
output_model: "chemenu.evals.example:ExampleOutput"
@@ -0,0 +1 @@
{"language": "de", "entities": []}
@@ -0,0 +1 @@
{"language": "de", "entities": ["Marie Curie", "Warschau"]}
@@ -0,0 +1 @@
{"language": "en", "entities": ["European Space Agency"]}
+9
View File
@@ -0,0 +1,9 @@
from pathlib import Path
from chemenu.evals.cli import main
EXAMPLE_SET = Path(__file__).resolve().parents[2] / "evals" / "example"
def test_example_set_passes() -> None:
assert main([str(EXAMPLE_SET)]) == 0