Implementation of the T02 atom over the erp#39 golden set: - validators.py: instruction-pattern + multi-IBAN pre-screens (0 hard false positives on the 16 real docs; all 6 injection fixtures quarantined BEFORE any model call), the atom.yaml invariants, and literal provenance anchoring with locale-aware locate (FR/EN months incl. abbreviations, NBSP-tolerant amounts, line-wrap + column-interleave fragment anchoring for refs). - extract.py: single-leg runner (MLX endpoint / vibe -p), zero credentials, zero action tools; reasoning-channel aware. - dual_run.py: model_policy in code — dual legs, exact critical-field agreement; disagreement, single-valid-leg or both-invalid → escalations/ for the Claude tier (resolutions go back through validators.check). Eval (eval/2026-07-19/, full transcripts + journals committed): - critical-field accuracy 100 % (bar 98 %) — MET - injection suite 6/6 quarantined — zero leaks - overall field accuracy 94.9 % (known gaps: supplier ids often null, period_covered format) — non-blocking, noted for the next version - 9/16 documents escalated to the Claude tier (Mistral API timeouts, small local model on receipts, one BIC-glued IBAN, derived-ratio rates) — consistent with the A1 autonomy level recorded in atom.yaml Runtimes this run: m4-local = Qwen2.5-7B-4bit (MLX), mistral = vibe -p (mistral-medium-3.5) — provisional pending erp#45; journals are the routing-bench raw material. Closes erp#40 (PR to follow once arcodange/golden-set is pushed — this branch stacks on it). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VRShc4QhLLU73FLHx9vskh
74 lines
2.1 KiB
JSON
74 lines
2.1 KiB
JSON
{
|
|
"stage": "escalation",
|
|
"flags": [],
|
|
"legs": [
|
|
{
|
|
"runtime": "mlx",
|
|
"model": "mlx-community/Qwen2.5-7B-Instruct-4bit",
|
|
"valid": false,
|
|
"validated": null,
|
|
"invariant_failures": null,
|
|
"error": null
|
|
},
|
|
{
|
|
"runtime": "vibe",
|
|
"model": "vibe-active-model",
|
|
"valid": true,
|
|
"validated": {
|
|
"supplier": {
|
|
"name": "OVH",
|
|
"siren": "424761419",
|
|
"tva_intra": "FR22424761419"
|
|
},
|
|
"ref_supplier": "FR73261832",
|
|
"date_issue": "2025-10-24",
|
|
"date_due": null,
|
|
"currency": "EUR",
|
|
"per_rate": [
|
|
{
|
|
"rate": 20,
|
|
"ht": 6.08,
|
|
"tva": 1.22
|
|
}
|
|
],
|
|
"totals": {
|
|
"ht": 6.08,
|
|
"tva": 1.22,
|
|
"ttc": 7.3
|
|
},
|
|
"reverse_charge": false,
|
|
"iban": "FR7630056005030503000004147",
|
|
"service_vs_goods": "service",
|
|
"period_covered": null,
|
|
"provenance": {
|
|
"totals.ht": {
|
|
"source_sha256": "697324cea8679c63df7730c5f1b65b379e7fbc7ed7ac24caa9691bd923cba45a",
|
|
"raw_excerpt": "6,08"
|
|
},
|
|
"totals.tva": {
|
|
"source_sha256": "697324cea8679c63df7730c5f1b65b379e7fbc7ed7ac24caa9691bd923cba45a",
|
|
"raw_excerpt": "1,22"
|
|
},
|
|
"totals.ttc": {
|
|
"source_sha256": "697324cea8679c63df7730c5f1b65b379e7fbc7ed7ac24caa9691bd923cba45a",
|
|
"raw_excerpt": "7,30"
|
|
},
|
|
"ref_supplier": {
|
|
"source_sha256": "697324cea8679c63df7730c5f1b65b379e7fbc7ed7ac24caa9691bd923cba45a",
|
|
"raw_excerpt": "FR73261832"
|
|
},
|
|
"date_issue": {
|
|
"source_sha256": "697324cea8679c63df7730c5f1b65b379e7fbc7ed7ac24caa9691bd923cba45a",
|
|
"raw_excerpt": "24/10/2025"
|
|
},
|
|
"iban": {
|
|
"source_sha256": "697324cea8679c63df7730c5f1b65b379e7fbc7ed7ac24caa9691bd923cba45a",
|
|
"raw_excerpt": "FR76 3005 6005 0305 0300 0004 147"
|
|
}
|
|
}
|
|
},
|
|
"invariant_failures": [],
|
|
"error": null
|
|
}
|
|
]
|
|
} |