Files
stonks-oracle/services/intelligence_pipeline_v3/resolution/__init__.py
T
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

41 lines
1.1 KiB
Python

"""Symbol resolution package for Intelligence Pipeline v3.
Resolves company mentions in documents to canonical identifiers using the
symbol registry, supporting alias matching, ambiguity detection, and
separation of explicit mentions from inferred exposures.
"""
from services.intelligence_pipeline_v3.resolution.alias_index import (
AliasIndex,
build_alias_index,
)
from services.intelligence_pipeline_v3.resolution.explicit_vs_inferred import (
ClassifiedMentionType,
classify_mention,
to_mention_type,
)
from services.intelligence_pipeline_v3.resolution.models import (
MatchType,
MentionType,
ResolutionCandidate,
ResolutionResult,
UnresolvedMention,
UnresolvedReason,
)
from services.intelligence_pipeline_v3.resolution.symbol_resolver import SymbolResolver
__all__ = [
"AliasIndex",
"ClassifiedMentionType",
"MatchType",
"MentionType",
"ResolutionCandidate",
"ResolutionResult",
"SymbolResolver",
"UnresolvedMention",
"UnresolvedReason",
"build_alias_index",
"classify_mention",
"to_mention_type",
]