Skip to main content

Research AI — Overview

Seven specs (SPEC-01 through SPEC-07) deliver the full research / AI infrastructure. All shipped as of 2026-04-23.

SPECService(s)Capability
SPEC-01memory-storeKnowledge graph (entities / relationships / claims) + consent-hardened repo + BAA governance + MCP server
SPEC-02research-engine5 agents (Researcher · Critic · Correlator · Replicator · Librarian) · 12 trusted sources · change-stream promotion pipeline · dual-LLM w/ audited fallback
SPEC-03orchestrator6-phase hypothesis candidate lifecycle · emergency path · detectors · scheduler · feasibility scoring · stakeholder approval
SPEC-04model-optimizationDecision graph (15 node types) · eval harness (DPO pair builder) · outcome feedback loop · Socket.IO real-time UI
SPEC-05memory-storeHybrid Retrieval Core — rule-based query classifier + 4 routes (GRAPH · AGG · TEXT · HYBRID) + context serializer + HTTP + SDK
SPEC-06research-engine + orchestratorConsumer integration — Researcher · Critic · Correlator · Detectors all wired to MemoryClient.retrieve() with rollout flags + fail-soft fallback
SPEC-07model-optimization250-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

  1. Evidence traceability — every AI output cites its sources. Every retrieval emits memory.retrieval.hybrid with count-only entity references.
  2. Dual-LLM with audited fallback — OpenAI GPT-4o primary; Gemini 2.0 Flash fallback. Every fallback emits llm_provider_fallback audit + HCP toast.
  3. 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.
  4. 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.
  5. Fail-soft everywhereMemoryRetrievalError on 503 → legacy BM25 fallback + consumer.retrieval_fallback audit. LLM 5xx/429 → Gemini fallback. Source connector error → empty hits + WARNING log (no exceptions).

Subsections