Skip to content

rulechef-savings: score NER/extraction traffic - #45

Merged
adaamko merged 1 commit into
mainfrom
feat/savings-ner
Jul 31, 2026
Merged

rulechef-savings: score NER/extraction traffic#45
adaamko merged 1 commit into
mainfrom
feat/savings-ner

Conversation

@adaamko

@adaamko adaamko commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

rulechef-savings only understood classification traffic; span traffic scored as unanswered. Now:

  • traffic shape auto-detected from the first row (llm_entities → NER), with a warning counting rows that don't match the detected shape
  • NER fidelity = span micro-F1 against the LLM's entities (text+type match via the same _match_entities used in evaluation)
  • per-rule accounting: matched spans count as agreement, false positives count against the producing rule
  • test with hand-computed expectations (TP=1, FP=1 → P=0.5, R=1.0, F1=67%)

Supersedes #28, which implemented the same design but stalled without the contribution-rights attestation; this is an independent implementation with the mixed-shape warning added.

  • I certify that I have the right to submit this contribution under the project's Apache-2.0 license.

🤖 Generated with Claude Code

Traffic rows shaped {text, llm_entities} were silently treated as
unanswered. The CLI now detects span traffic from the first row, builds
an NER task, and reports fidelity as span micro-F1 against llm_entities
(text+type match). Rows that don't match the detected shape are counted
and warned about.

Closes #19
@adaamko
adaamko merged commit 9347a1f into main Jul 31, 2026
6 checks passed
@adaamko
adaamko deleted the feat/savings-ner branch July 31, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant