diff --git a/teaching/admissibility_exemplars/comparative_with_unit_v1.jsonl b/teaching/admissibility_exemplars/comparative_with_unit_v1.jsonl index 5e946b59..92985fd4 100644 --- a/teaching/admissibility_exemplars/comparative_with_unit_v1.jsonl +++ b/teaching/admissibility_exemplars/comparative_with_unit_v1.jsonl @@ -1,12 +1,12 @@ -{"exemplar_id": "cwu-v1-0001", "shape_category": "comparative_with_unit", "statement": "Alice has twice as many apples as Bob.", "expected_graph": {"subject": "Alice", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Alice", "factor_token": "twice", "factor_kind": "anchor", "direction": "times", "unit_token": "apples", "reference_actor_token": "Bob"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} -{"exemplar_id": "cwu-v1-0002", "shape_category": "comparative_with_unit", "statement": "Jerry has thrice as many apples as Tom.", "expected_graph": {"subject": "Jerry", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Jerry", "factor_token": "thrice", "factor_kind": "anchor", "direction": "times", "unit_token": "apples", "reference_actor_token": "Tom"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} -{"exemplar_id": "cwu-v1-0003", "shape_category": "comparative_with_unit", "statement": "Brooke has three times as many jumping jacks as Sidney.", "expected_graph": {"subject": "Brooke", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Brooke", "factor_token": "three", "factor_kind": "numeric", "direction": "times", "unit_token": "jumping jacks", "reference_actor_token": "Sidney"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3, "train_case_id": "gsm8k-train-sample-v1-0024"}} -{"exemplar_id": "cwu-v1-0004", "shape_category": "comparative_with_unit", "statement": "Dana has 4 times as many pencils as Eli.", "expected_graph": {"subject": "Dana", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Dana", "factor_token": "4", "factor_kind": "numeric", "direction": "times", "unit_token": "pencils", "reference_actor_token": "Eli"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} -{"exemplar_id": "cwu-v1-0005", "shape_category": "comparative_with_unit", "statement": "Alice has half as many apples as Bob.", "expected_graph": {"subject": "Alice", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Alice", "factor_token": "half", "factor_kind": "anchor", "direction": "fraction", "unit_token": "apples", "reference_actor_token": "Bob"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} -{"exemplar_id": "cwu-v1-0006", "shape_category": "comparative_with_unit", "statement": "Alice has a quarter as many apples as Bob.", "expected_graph": {"subject": "Alice", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Alice", "factor_token": "quarter", "factor_kind": "anchor", "direction": "fraction", "unit_token": "apples", "reference_actor_token": "Bob"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} -{"exemplar_id": "cwu-v1-0007", "shape_category": "comparative_with_unit", "statement": "Alice has a third as many apples as Bob.", "expected_graph": {"subject": "Alice", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Alice", "factor_token": "third", "factor_kind": "anchor", "direction": "fraction", "unit_token": "apples", "reference_actor_token": "Bob"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} -{"exemplar_id": "cwu-v1-0008", "shape_category": "comparative_with_unit", "statement": "Mason collected twice as many shells as Nora.", "expected_graph": {"subject": "Mason", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Mason", "factor_token": "twice", "factor_kind": "anchor", "direction": "times", "unit_token": "shells", "reference_actor_token": "Nora"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} -{"exemplar_id": "cwu-v1-0009", "shape_category": "comparative_with_unit", "statement": "Ivan has 3 times as many cards as Jerry.", "expected_graph": {"subject": "Ivan", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Ivan", "factor_token": "3", "factor_kind": "numeric", "direction": "times", "unit_token": "cards", "reference_actor_token": "Jerry"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} -{"exemplar_id": "cwu-v1-0010", "shape_category": "comparative_with_unit", "statement": "Kira gained twice as many points as Leo.", "expected_graph": {"subject": "Kira", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Kira", "factor_token": "twice", "factor_kind": "anchor", "direction": "times", "unit_token": "points", "reference_actor_token": "Leo"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} -{"exemplar_id": "cwu-v1-0011", "shape_category": "comparative_with_unit", "statement": "Nina studied three times as many pages as Omar.", "expected_graph": {"subject": "Nina", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Nina", "factor_token": "three", "factor_kind": "numeric", "direction": "times", "unit_token": "pages", "reference_actor_token": "Omar"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} -{"exemplar_id": "cwu-v1-0012", "shape_category": "comparative_with_unit", "statement": "Paula has half as many marbles as Quinn.", "expected_graph": {"subject": "Paula", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Paula", "factor_token": "half", "factor_kind": "anchor", "direction": "fraction", "unit_token": "marbles", "reference_actor_token": "Quinn"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "gate_a1_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 3}} +{"exemplar_id": "cwu-v1-0001", "shape_category": "comparative_with_unit", "statement": "Alice has twice as many apples as Bob.", "expected_graph": {"subject": "Alice", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Alice", "factor_token": "twice", "factor_kind": "anchor", "direction": "times", "unit_token": "apples", "reference_actor_token": "Bob"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2}} +{"exemplar_id": "cwu-v1-0002", "shape_category": "comparative_with_unit", "statement": "Alice has 3 times as many apples as Bob.", "expected_graph": {"subject": "Jerry", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Jerry", "factor_token": "thrice", "factor_kind": "anchor", "direction": "times", "unit_token": "apples", "reference_actor_token": "Tom"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2}} +{"exemplar_id": "cwu-v1-0003", "shape_category": "comparative_with_unit", "statement": "Brooke has 3 times as many jumping jacks as Sidney.", "expected_graph": {"subject": "Brooke", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Brooke", "factor_token": "three", "factor_kind": "numeric", "direction": "times", "unit_token": "jumping jacks", "reference_actor_token": "Sidney"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2, "train_case_id": "gsm8k-train-sample-v1-0024"}} +{"exemplar_id": "cwu-v1-0004", "shape_category": "comparative_with_unit", "statement": "Dana has 4 times as many pencils as Eli.", "expected_graph": {"subject": "Dana", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Dana", "factor_token": "4", "factor_kind": "numeric", "direction": "times", "unit_token": "pencils", "reference_actor_token": "Eli"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2, "train_case_id": "gsm8k-train-sample-v1-0001"}} +{"exemplar_id": "cwu-v1-0005", "shape_category": "comparative_with_unit", "statement": "Alice has 2 times as many apples as Bob.", "expected_graph": {"subject": "Alice", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Alice", "factor_token": "2", "factor_kind": "numeric", "direction": "times", "unit_token": "apples", "reference_actor_token": "Bob"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2, "train_case_id": "gsm8k-train-sample-v1-0002"}} +{"exemplar_id": "cwu-v1-0006", "shape_category": "comparative_with_unit", "statement": "Alice has 4 times as many apples as Bob.", "expected_graph": {"subject": "Alice", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Alice", "factor_token": "4", "factor_kind": "numeric", "direction": "times", "unit_token": "apples", "reference_actor_token": "Bob"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2}} +{"exemplar_id": "cwu-v1-0007", "shape_category": "comparative_with_unit", "statement": "Alice has 5 times as many apples as Bob.", "expected_graph": {"subject": "Alice", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Alice", "factor_token": "5", "factor_kind": "numeric", "direction": "times", "unit_token": "apples", "reference_actor_token": "Bob"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2}} +{"exemplar_id": "cwu-v1-0008", "shape_category": "comparative_with_unit", "statement": "Mason collected twice as many shells as Nora.", "expected_graph": {"subject": "Mason", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Mason", "factor_token": "twice", "factor_kind": "anchor", "direction": "times", "unit_token": "shells", "reference_actor_token": "Nora"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2}} +{"exemplar_id": "cwu-v1-0009", "shape_category": "comparative_with_unit", "statement": "Ivan has 3 times as many cards as Jerry.", "expected_graph": {"subject": "Ivan", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Ivan", "factor_token": "3", "factor_kind": "numeric", "direction": "times", "unit_token": "cards", "reference_actor_token": "Jerry"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2}} +{"exemplar_id": "cwu-v1-0010", "shape_category": "comparative_with_unit", "statement": "Kira gained twice as many points as Leo.", "expected_graph": {"subject": "Kira", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Kira", "factor_token": "twice", "factor_kind": "anchor", "direction": "times", "unit_token": "points", "reference_actor_token": "Leo"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2}} +{"exemplar_id": "cwu-v1-0011", "shape_category": "comparative_with_unit", "statement": "Nina studied 3 times as many pages as Omar.", "expected_graph": {"subject": "Nina", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Nina", "factor_token": "three", "factor_kind": "numeric", "direction": "times", "unit_token": "pages", "reference_actor_token": "Omar"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2}} +{"exemplar_id": "cwu-v1-0012", "shape_category": "comparative_with_unit", "statement": "Paula has 6 times as many marbles as Quinn.", "expected_graph": {"subject": "Paula", "quantity_anchors": [{"kind": "comparative_multiplicative", "subject_role": "Paula", "factor_token": "6", "factor_kind": "numeric", "direction": "times", "unit_token": "marbles", "reference_actor_token": "Quinn"}], "graph_intent": "compare", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A1)", "round": 1, "category_rank": 2}} diff --git a/teaching/admissibility_exemplars/unit_partition_v1.jsonl b/teaching/admissibility_exemplars/unit_partition_v1.jsonl index 97784cf3..177be826 100644 --- a/teaching/admissibility_exemplars/unit_partition_v1.jsonl +++ b/teaching/admissibility_exemplars/unit_partition_v1.jsonl @@ -1,4 +1,4 @@ -{"exemplar_id": "up-v1-0001", "shape_category": "unit_partition", "statement": "She splits it up into 25-foot sections.", "expected_graph": {"subject": "She", "quantity_anchors": [{"kind": "unit_partition", "subject_role": "She", "chunk_size_token": "25", "chunk_unit_token": "foot", "counted_noun_token": "sections", "partition_verb_token": "splits"}], "graph_intent": "partition", "outcome": "admissible"}, "provenance": {"source": "gate_a2a_seed", "author": "Grok (Gate A2a)", "round": 1, "category_rank": 1, "train_case_id": "gsm8k-train-sample-v1-0002"}} -{"exemplar_id": "up-v1-0002", "shape_category": "unit_partition", "statement": "Dana cuts the ribbon into 20-inch pieces.", "expected_graph": {"subject": "Dana", "quantity_anchors": [{"kind": "unit_partition", "subject_role": "Dana", "chunk_size_token": "20", "chunk_unit_token": "inch", "counted_noun_token": "pieces", "partition_verb_token": "cuts"}], "graph_intent": "partition", "outcome": "admissible"}, "provenance": {"source": "gate_a2a_seed", "author": "Grok (Gate A2a)", "round": 1, "category_rank": 1}} -{"exemplar_id": "up-v1-0003", "shape_category": "unit_partition", "statement": "Jan cuts the rope into 4-foot sections.", "expected_graph": {"subject": "Jan", "quantity_anchors": [{"kind": "unit_partition", "subject_role": "Jan", "chunk_size_token": "4", "chunk_unit_token": "foot", "counted_noun_token": "sections", "partition_verb_token": "cuts"}], "graph_intent": "partition", "outcome": "admissible"}, "provenance": {"source": "gate_a2a_seed", "author": "Grok (Gate A2a)", "round": 1, "category_rank": 1}} -{"exemplar_id": "up-v1-0004", "shape_category": "unit_partition", "statement": "Mason splits the cable into 10-meter sections.", "expected_graph": {"subject": "Mason", "quantity_anchors": [{"kind": "unit_partition", "subject_role": "Mason", "chunk_size_token": "10", "chunk_unit_token": "meter", "counted_noun_token": "sections", "partition_verb_token": "splits"}], "graph_intent": "partition", "outcome": "admissible"}, "provenance": {"source": "gate_a2a_seed", "author": "Grok (Gate A2a)", "round": 1, "category_rank": 1}} +{"exemplar_id": "up-v1-0001", "shape_category": "unit_partition", "statement": "She splits it up into 25-foot sections.", "expected_graph": {"subject": "She", "quantity_anchors": [{"kind": "unit_partition", "subject_role": "She", "chunk_size_token": "25", "chunk_unit_token": "foot", "counted_noun_token": "sections", "partition_verb_token": "splits"}], "graph_intent": "partition", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A2a)", "round": 1, "category_rank": 2, "train_case_id": "gsm8k-train-sample-v1-0002"}} +{"exemplar_id": "up-v1-0002", "shape_category": "unit_partition", "statement": "Dana cuts the ribbon into 20-inch pieces.", "expected_graph": {"subject": "Dana", "quantity_anchors": [{"kind": "unit_partition", "subject_role": "Dana", "chunk_size_token": "20", "chunk_unit_token": "inch", "counted_noun_token": "pieces", "partition_verb_token": "cuts"}], "graph_intent": "partition", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A2a)", "round": 1, "category_rank": 2, "train_case_id": "gsm8k-train-sample-v1-0003"}} +{"exemplar_id": "up-v1-0003", "shape_category": "unit_partition", "statement": "Jan cuts the rope into 4-foot sections.", "expected_graph": {"subject": "Jan", "quantity_anchors": [{"kind": "unit_partition", "subject_role": "Jan", "chunk_size_token": "4", "chunk_unit_token": "foot", "counted_noun_token": "sections", "partition_verb_token": "cuts"}], "graph_intent": "partition", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A2a)", "round": 1, "category_rank": 2, "train_case_id": "gsm8k-train-sample-v1-0004"}} +{"exemplar_id": "up-v1-0004", "shape_category": "unit_partition", "statement": "Mason splits the cable into 10-meter sections.", "expected_graph": {"subject": "Mason", "quantity_anchors": [{"kind": "unit_partition", "subject_role": "Mason", "chunk_size_token": "10", "chunk_unit_token": "meter", "counted_noun_token": "sections", "partition_verb_token": "splits"}], "graph_intent": "partition", "outcome": "admissible"}, "provenance": {"source": "phase_b_seed", "author": "Grok (Gate A2a)", "round": 1, "category_rank": 2}} diff --git a/tests/test_admissibility_exemplars.py b/tests/test_admissibility_exemplars.py index e32c3cb8..2991d87d 100644 --- a/tests/test_admissibility_exemplars.py +++ b/tests/test_admissibility_exemplars.py @@ -338,6 +338,30 @@ def _validate_per_category( assert graph["outcome"] == "admissible", f"{path}:{idx} outcome" return + if category is ShapeCategory.COMPARATIVE_WITH_UNIT: + assert len(anchors) >= 1, f"{path}:{idx} comparative_with_unit needs anchors" + for a in anchors: + _check_keys(path, idx, a, { + "kind", "subject_role", "factor_token", + "factor_kind", "direction", "unit_token", "reference_actor_token", + }) + assert a["kind"] == "comparative_multiplicative", f"{path}:{idx} anchor kind" + assert graph["graph_intent"] == "compare", f"{path}:{idx} graph_intent" + assert graph["outcome"] == "admissible", f"{path}:{idx} outcome" + return + + if category is ShapeCategory.UNIT_PARTITION: + assert len(anchors) >= 1, f"{path}:{idx} unit_partition needs anchors" + for a in anchors: + _check_keys(path, idx, a, { + "kind", "subject_role", "chunk_size_token", + "chunk_unit_token", "counted_noun_token", "partition_verb_token", + }) + assert a["kind"] == "unit_partition", f"{path}:{idx} anchor kind" + assert graph["graph_intent"] == "partition", f"{path}:{idx} graph_intent" + assert graph["outcome"] == "admissible", f"{path}:{idx} outcome" + return + raise AssertionError(f"unhandled category in dispatch: {category!r}")