Agentic medical diagnosis system with layered vector retrieval powered by Weaviate
I’ve built Agentic GraphRAG for Medical Diagnosis (GitHub - avnlp/agentic-med-diag: Agentic Graph RAG for Medical diagnosis and Clinical QA. Combines LangGraph-orchestrated multi-hop reasoning with parallel graph, vector, community, and text-to-Cypher retrieval with an agentic plan–research–verify loop for evidence-grounded answers on MedQA, MedXpertQA, MedCaseReasoning and MMLU-Pro. · GitHub) , an end-to-end system combining LangGraph orchestration with multi-strategy vector search, hybrid retrieval (dense + BM25), and an agentic plan–research–verify loop for evidence-grounded clinical QA.
Stack: Weaviate for vector search and semantic indexing, Neo4j knowledge graphs, GLiNER/GLiREL extractors, LangGraph pipelines
Knowledge Graph Construction
- Schema-driven extraction with 13 entity types and 25 clinically-grounded relation types
- Three-extractor fusion (GLiNER, GLiREL, LLM) with configurable merge strategies
- Deterministic + LLM-powered entity resolution for deduplication
- Hierarchical Leiden community detection with auto-generated clinical summaries
Layered Retrieval Architecture
- Four vector collections (entity, relation, chunk, community report)
- Multiple atomic methods: hybrid search, fulltext, BFS graph traversal, and text-to-Cypher graph querying
- Pluggable rerankers (RRF, cross-encoder, MMR)
- Data-driven recipes for composing retrieval strategies
Agentic Plan–Research–Verify Loop
- Planner decomposes clinical questions into focused sub-questions
- Parallel researchers execute multi-strategy retrieval with citations
- Verifier assesses coverage and gates synthesis on sufficiency
- Gracefully converges on missing information across iterations
The stack is battle-tested: Neo4j + Weaviate/Qdrant for storage, LangGraph for orchestration, DeepAgents for multi-agent coordination, and BAML for type-safe LLM schema injection. Tested on MedQA, MedXpertQA, MedCaseReasoning, and MMLU-Pro benchmarks.