Skip to content

feat(financial-ner): support entity-level routing - #1

Merged
Garyouki merged 10 commits into
mainfrom
feature/entity-level-financial-ner
Sep 23, 2026
Merged

Garyouki merged 10 commits into
mainfrom
feature/entity-level-financial-ner

Conversation

@Kylinny

@Kylinny Kylinny commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds the roadmap's entity-level Financial NER policy path without adding a separate policy format.

  • convert entity-level JSONL predictions into the existing common record schema
  • add calibroute convert-financial-ner-entities
  • retain auditable parent-sentence, model, seed, signal, and entity-type metadata while deliberately excluding entity text
  • document the input contract and require a single fixed entity-correctness definition per audit
  • add adapter coverage for metadata, model-specific signals, and invalid labels

Each entity becomes one PredictionRecord, so the existing audit, fit, validate, and route workflows operate unchanged.

Validation

  • PYTHONPATH=src python3.10 -m unittest discover -s tests -v (41 passed)
  • PYTHONPATH=src python3.10 -m calibroute.cli --help
  • git diff --check

Scope

This adapter expects entity-level input to carry an explicit boolean correct label. It does not infer correctness from span text or implement an entity-matching heuristic, avoiding silently mixing exact-match and overlap-based metrics.

@Garyouki

Copy link
Copy Markdown
Owner

LGTM

@Garyouki
Garyouki merged commit 704cb6f into main Sep 23, 2026
8 checks passed
@Garyouki
Garyouki self-requested a review September 23, 2026 05:16
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.

2 participants