diff --git a/evals/elsuite/rag_match_fuzzy.py b/evals/elsuite/rag_match_fuzzy.py index 50bd99add7..3861b1dfe6 100644 --- a/evals/elsuite/rag_match_fuzzy.py +++ b/evals/elsuite/rag_match_fuzzy.py @@ -107,7 +107,7 @@ def eval_sample(self, sample: Any, *_): sampled = result.get_completions()[0] try: - pattern = re.compile(r'\w\)\s\d+\s?[°]?[CK]?') + pattern = re.compile(r'\w\)\s\d+(?:\.\d+)?(?:\s?:\s?\d+(?:\.\d+)?)?\s?[°]?[CK]?') sampled0 = pattern.findall(sampled)[0] if sampled0 is None or sampled0==[]: pass diff --git a/evals/registry/data/00_polymer_chart/samples.jsonl b/evals/registry/data/00_polymer_chart/samples.jsonl new file mode 100644 index 0000000000..90a28eff95 --- /dev/null +++ b/evals/registry/data/00_polymer_chart/samples.jsonl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:931578a50437b08044761f92ea30a564d6bbbb55a8e7577c8fd377f24bbc91f7 +size 7555 diff --git a/evals/registry/data/00_polymer_ratio/samples.jsonl b/evals/registry/data/00_polymer_ratio/samples.jsonl new file mode 100644 index 0000000000..fd84db45b4 --- /dev/null +++ b/evals/registry/data/00_polymer_ratio/samples.jsonl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01eadade91891b9ecfd343773428566ab0b51dabacd6643cd9a6e285fc739cc1 +size 7241 diff --git a/evals/registry/evals/00_polymer_chart.yaml b/evals/registry/evals/00_polymer_chart.yaml new file mode 100644 index 0000000000..27200370e4 --- /dev/null +++ b/evals/registry/evals/00_polymer_chart.yaml @@ -0,0 +1,8 @@ +polymer_chart: + id: polymer_chart.dev.v0 + metrics: [accuracy] + +polymer_chart.dev.v0: + class: evals.elsuite.rag_match_fuzzy:RAGMatch + args: + samples_jsonl: 00_polymer_chart/samples.jsonl diff --git a/evals/registry/evals/00_polymer_ratio.yaml b/evals/registry/evals/00_polymer_ratio.yaml new file mode 100644 index 0000000000..386608e1b9 --- /dev/null +++ b/evals/registry/evals/00_polymer_ratio.yaml @@ -0,0 +1,8 @@ +polymer_ratio: + id: polymer_ratio.dev.v0 + metrics: [accuracy] + +polymer_ratio.dev.v0: + class: evals.elsuite.rag_match_fuzzy:RAGMatch + args: + samples_jsonl: 00_polymer_ratio/samples.jsonl