| """Run the v10 examples through the trace API.""" | |
| from __future__ import annotations | |
| import json | |
| from pathlib import Path | |
| from ts_bridge.reasoner_v10 import solve_trace | |
| ROOT = Path(__file__).resolve().parent | |
| EXAMPLES = ROOT / "examples" / "v10_examples.json" | |
| def main() -> None: | |
| examples = json.loads(EXAMPLES.read_text()) | |
| print(f"{'id':28s} {'answer':14s} {'conf':6s} {'rule':42s} rationale") | |
| print("-" * 132) | |
| for row in examples: | |
| trace = solve_trace(row["prompt"], row["category"]) | |
| print(f"{row['id']:28s} {trace.display_answer:14s} {trace.confidence:<6.2f} {trace.rule:42s} {trace.rationale}") | |
| if __name__ == "__main__": | |
| main() | |