Milvus is the vector database that stores dense embeddings of medical document chunks. It powers the semantic retrieval channel of the agentic pipeline, enabling similarity-based search over unstructured medical text. The README specifies that Milvus is used for dense hybrid search, and that LightRAG stores its chunk embeddings in a vector index alongside the Neo4j knowledge graph — making Milvus an explicit dependency for the LightRAG backend.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/avnlp/agentic-med-diag/llms.txt
Use this file to discover all available pages before exploring further.
Role in the System
Milvus participates in both the indexing and retrieval stages of the agentic pipeline when LightRAG is the active backend. During indexing, LightRAG embeds each document chunk into a dense vector representation and writes it into a vector index alongside the raw text. This happens in parallel with the entity and relationship extraction that populates Neo4j, so the semantic and relational indexes are built in a single ingestion pass. During retrieval, the semantic channel uses the vector index to identify the document chunks most relevant to each sub-query generated by the decomposition step. The top-ranked chunks are then filtered, summarised, and merged with the relational channel’s output before the final answer is synthesised.The README explicitly associates Milvus with LightRAG’s hybrid retrieval mode. Other backends (MiniRAG, PathRAG, HyperGraphRAG) store their context locally and may not share the same vector storage arrangement.
Setup
The quickest way to run Milvus locally is in standalone mode via Docker.Start the Milvus standalone container
Pull and start the Milvus standalone image with the standard gRPC and HTTP ports exposed:The standard Milvus standalone ports are 19530 (gRPC) and 9091 (HTTP).
Configuration
The pipeline connects to Milvus using environment variables for the host and port. The table below shows typical configuration variable names — set these in your shell or in a.env file and never hardcode them in source code.
| Variable | Description | Example |
|---|---|---|
MILVUS_HOST | Hostname or IP address of the Milvus instance | localhost |
MILVUS_PORT | gRPC port for the Milvus instance | 19530 |
Hybrid Search
LightRAG operates in hybrid mode, combining two complementary retrieval strategies in a single pass:- Keyword-based KG traversal — a graph-structured search that surfaces entities and relationships from the Neo4j knowledge graph that are lexically relevant to the query.
- Dense vector search — a similarity search over the vector-indexed chunk embeddings that retrieves semantically related document passages even when there is no exact keyword overlap.
Knowledge Graph Data (Entity), Knowledge Graph Data (Relationship), Document Chunks, and a Reference Document List. The pipeline’s context_filter then splits this response, routing the document chunks and reference list to the semantic channel and the entity and relationship JSON to the relational channel.
For further details on Milvus architecture, collection management, and production deployment options, refer to the official Milvus documentation at https://milvus.io/.