Patient QA Pipeline
Sources: Antigravity, 2026-07-05 Raw: Patient QA Pipeline Source
Patient QA Pipeline
SequentialAgent containing 8 specialist LLM agents answers clinical questions with cited evidence from notes, images, and vector search — grounded in patient context.
flowchart TD
START([Patient-scoped question]) --> VR
VR["qa_request_validation_agent (flash-lite)
validate_qa_request"] --> CA
CA["context_assembly_agent (flash-lite)
lookup_patient_record, load_memory,
search_past_conversations"] --> ER
ER["evidence_retrieval_agent (pro-customtools)
search_clinical_notes, search_vector_store,
retrieve_imaging_evidence"] --> IE
IE["image_evidence_agent (pro-customtools)
analyze_evidence_images, fetch_image_from_gcs"] --> CB
CB["citation_builder_agent (flash-lite)
build_citations"] --> AS
AS["answer_synthesis_agent (pro)
compose_clinical_answer"] --> AU
AU["qa_audit_agent (flash-lite)
log_audit_event, save_qa_to_memory"] --> RS
RS["qa_response_agent (flash-lite)
return cited answer"] --> DONE([Cited answer + audit trail])
Key facts:
- Validation happens first:
validate_qa_requestrejects out-of-scope requests before any retrieval. - Evidence is multimodal — text notes, vector search hits, and imaging pulled from GCS and analyzed by Gemini Vision.
- Every answer carries citations built before synthesis, so sources are traceable in the UI ([[Clinical App]]).
- The audit stage persists the exchange to long-term memory (
save_qa_to_memory) with PHI filtered first ([[Memory Layers]] Layer 3).
Related: [[Agent Architecture]] · [[End-to-End Request Flow]]