Files
Celes Renata a72f336ad1 feat: Intelligence Pipeline v3 — full implementation
Multi-stage evidence-grounded inference architecture replacing the
monolithic 9B model extraction pipeline. CPU-first specialist services
handle routine extraction while the 9B vLLM model is preserved for
semantic adjudication of ambiguous cases.

Key components:
- Capability-aware inference gateway (OpenAI-compatible + Ollama)
- Endpoint registry with DB migrations and REST API
- Sentence-aware document segmenter (property tests)
- Deterministic financial parsing with offset integrity
- Symbol resolution with ambiguity detection
- Specialist service (GLiNER2, dynamic batching, K8s deployment)
- Company-specific sentiment (FinBERT, calibration)
- Retrieval-based novelty and duplicate detection
- Confidence calibration pipeline
- Deterministic routing engine (property tests)
- 9B adjudication layer with VRAM gating
- Stock-specific impact model (features, labels, baseline, trained)
- Pipeline orchestrator (state machine, queues, leases, feature flags)
- Bounded parallelism (async workers, semaphore, load shedding)
- Observability (tracing, metrics, alerts)
- Compatibility adapter (v3→v2 golden mapping tests)
- Shadow/canary promotion framework
- Active learning and fine-tuning pipeline

Test results: 1,161 tests pass, ruff lint clean.
All 282 spec tasks completed.
2026-07-13 02:14:59 +00:00

54 lines
1.6 KiB
Python

"""Evidence verification and grounding for Intelligence Pipeline v3.
This package provides:
- Offset, entity association, and numeric consistency verification
- Rejected-candidate storage with structured reason codes
- A compact entailment verifier scaffold (keyword-overlap baseline)
- Evidence coverage and unsupported-claim metrics
- Aggregated verification metrics for dashboards and promotion gates
"""
from services.intelligence_pipeline_v3.verification.coverage import (
CoverageMetrics,
FieldEvidence,
compute_coverage,
)
from services.intelligence_pipeline_v3.verification.entailment import (
EntailmentResult,
EntailmentVerifier,
)
from services.intelligence_pipeline_v3.verification.metrics import (
VerificationMetrics,
compute_verification_metrics,
)
from services.intelligence_pipeline_v3.verification.models import (
AssociationVerification,
NumericVerification,
OffsetVerification,
RejectedCandidate,
RejectionReason,
VerificationReport,
)
from services.intelligence_pipeline_v3.verification.rejected_store import (
RejectedCandidateStore,
)
from services.intelligence_pipeline_v3.verification.verifier import EvidenceVerifier
__all__ = [
"AssociationVerification",
"CoverageMetrics",
"EntailmentResult",
"EntailmentVerifier",
"EvidenceVerifier",
"FieldEvidence",
"NumericVerification",
"OffsetVerification",
"RejectedCandidate",
"RejectedCandidateStore",
"RejectionReason",
"VerificationMetrics",
"VerificationReport",
"compute_coverage",
"compute_verification_metrics",
]