Add example eval set and its test
Three recorded cases for an entity-extraction step; threshold 1.0. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
53bed333de
commit
c423e1039c
8 files changed
+41
No files matched your search
@@ -0,0 +1,6 @@
|
||||
input:
|
||||
text: "Heute ist ein schöner Tag."
|
||||
expect:
|
||||
- grader: "equals"
|
||||
path: "/entities"
|
||||
value: []
|
||||
@@ -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"]
|
||||
@@ -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"]
|
||||
@@ -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"]}
|
||||
@@ -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
|
||||
Reference in new issue
Block a user