Research AI — Overview
Seven specs (SPEC-01 through SPEC-07) deliver the full research / AI infrastructure. All shipped as of 2026-04-23.
| SPEC | Service(s) | Capability |
|---|---|---|
| SPEC-01 | memory-store | Knowledge graph (entities / relationships / claims) + consent-hardened repo + BAA governance + MCP server |
| SPEC-02 | research-engine | 5 agents (Researcher · Critic · Correlator · Replicator · Librarian) · 12 trusted sources · change-stream promotion pipeline · dual-LLM w/ audited fallback |
| SPEC-03 | orchestrator | 6-phase hypothesis candidate lifecycle · emergency path · detectors · scheduler · feasibility scoring · stakeholder approval |
| SPEC-04 | model-optimization | Decision graph (15 node types) · eval harness (DPO pair builder) · outcome feedback loop · Socket.IO real-time UI |
| SPEC-05 | memory-store | Hybrid Retrieval Core — rule-based query classifier + 4 routes (GRAPH · AGG · TEXT · HYBRID) + context serializer + HTTP + SDK |
| SPEC-06 | research-engine + orchestrator | Consumer integration — Researcher · Critic · Correlator · Detectors all wired to MemoryClient.retrieve() with rollout flags + fail-soft fallback |
| SPEC-07 | model-optimization | 250-query × 5-strategy benchmark harness + Azure Monitor KQL + workbooks + alerts + compliance-probe regression gates |
See the Research AI block diagram for the full mermaid chart of these services + agents + routes + sources.
Design commitments
- Evidence traceability — every AI output cites its sources. Every retrieval emits
memory.retrieval.hybridwith count-only entity references. - Dual-LLM with audited fallback — OpenAI GPT-4o primary; Gemini 2.0 Flash fallback. Every fallback emits
llm_provider_fallbackaudit + HCP toast. - FDA CDS-exemption posture — every AI response carries metadata: disclaimer, model, confidence,
fda_cds_exemption_ref,fallback_occurred. Never the sole basis for a clinical action. - Progressive rollout flags — 4 consumer flags (
USE_HYBRID_RETRIEVAL_RESEARCHER,USE_HYBRID_CRITIC_EXPANSION,USE_HYBRID_CORRELATOR_EXPANSION,USE_HYBRID_ORCHESTRATOR) for staged cutover from legacy BM25. - Fail-soft everywhere —
MemoryRetrievalErroron 503 → legacy BM25 fallback +consumer.retrieval_fallbackaudit. LLM 5xx/429 → Gemini fallback. Source connector error → empty hits + WARNING log (no exceptions).
Subsections
- Knowledge graph → — Entity + Relationship + Claim schemas + state machine
- Knowledge lifecycle → — how to add / change / delete (retract / archive) — HTTP + SDK + required scopes + audit events
- Hybrid retrieval → — classifier rules + 4 routes + serializer
- Agents → — 5 agents + three-file pattern
- Orchestrator → — 6-phase hypothesis lifecycle
- Benchmark → — 250-query × 5-strategy harness