Skip to main content

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.

This page covers every step needed to go from a bare machine to a fully configured Agentic Graph RAG environment: installing the Python dependency manager, syncing the project lockfile, spinning up the Neo4j and Milvus storage backends in Docker, and setting the environment variables the pipeline needs to connect everything together.

Requirements

Before you begin, confirm that the following are available on your system:
RequirementPurposeNotes
Python 3.10+Runtime for all pipeline and evaluation codeCheck with python --version
uvFast Python package and project managerInstalled in the next section
DockerRuns Neo4j and Milvus as local containersAny recent stable release
LLM API accessPowers the reasoning steps inside the pipelinee.g., an OpenAI API key

Installing uv

The project uses uv for dependency management. Install it with pip:
pip install uv
uv manages a project-local virtual environment automatically. You do not need to create or activate a venv manually — running uv sync is sufficient.

Installing Project Dependencies

Clone the repository and let uv install all locked dependencies in one step:
git clone https://github.com/avnlp/agentic-med-diag.git
cd agentic-med-diag
uv sync
uv sync reads the project lockfile and installs all dependencies into a .venv directory inside the project root. Subsequent uv run calls automatically use that environment.

Neo4j Setup

Neo4j stores the entity/relationship knowledge graph built from ingested medical documents. The relational retrieval channel queries Neo4j to fetch structured KG triples and multi-hop paths during inference. Start a local Neo4j instance with Docker:
docker run --name neo4j \
  -p 7474:7474 -p 7687:7687 \
  -e NEO4J_AUTH=neo4j/password \
  neo4j:latest
PortProtocolPurpose
7474HTTPNeo4j Browser UI
7687BoltDriver connection used by the pipeline
Once the container is running, open the Neo4j Browser at http://localhost:7474 to verify the database is up and accepting connections. Log in with the credentials neo4j / password (as set by NEO4J_AUTH above).
For production or persistent development use, mount a volume (-v $PWD/neo4j-data:/data) so graph data survives container restarts.

Milvus Setup

Milvus stores dense vector embeddings for semantic retrieval over document chunks. The semantic retrieval channel performs hybrid search over Milvus to ground sub-queries in text evidence during each reasoning hop. Start a standalone Milvus instance with Docker:
docker run -d --name milvus-standalone \
  -p 19530:19530 -p 9091:9091 \
  milvusdb/milvus:latest \
  milvus run standalone
PortProtocolPurpose
19530gRPCPrimary connection used by the pipeline
9091HTTPMetrics and health endpoint
For persistent development, mount a volume (-v $PWD/milvus-data:/var/lib/milvus) to retain indexed embeddings across restarts.

Environment Variables

The pipeline reads connection details and credentials from environment variables. Set these before running any pipeline code:
NameDescription
NEO4J_URIBolt URI for the Neo4j instance, e.g. bolt://localhost:7687
NEO4J_USERNAMENeo4j username, e.g. neo4j
NEO4J_PASSWORDNeo4j password, e.g. password
MILVUS_HOSTHostname or IP of the Milvus instance, e.g. localhost
MILVUS_PORTgRPC port for Milvus, e.g. 19530
OPENAI_API_KEYAPI key for your LLM provider (OpenAI or compatible)
You can export them in your shell:
export NEO4J_URI="bolt://localhost:7687"
export NEO4J_USERNAME="neo4j"
export NEO4J_PASSWORD="password"
export MILVUS_HOST="localhost"
export MILVUS_PORT="19530"
export OPENAI_API_KEY="sk-..."
Or place them in a .env file at the project root — uv run will pick them up automatically.

Verifying the Installation

After completing the steps above, confirm that both services are healthy:
# Check Neo4j is reachable on the Bolt port
nc -zv localhost 7687

# Check Milvus health endpoint
curl http://localhost:9091/healthz
A successful response from the Milvus health endpoint returns OK. For Neo4j, open http://localhost:7474 in a browser and confirm you can log in.
The codebase is actively being developed and the full pipeline code will be released soon. Once released, you can verify the Python installation by importing the top-level package after running uv sync.
Do not expose the Neo4j or Milvus ports publicly without additional authentication and network controls. The Docker commands above are intended for local development only.

Build docs developers (and LLMs) love