Extract triples with Ollama or vLLM, store them in a graph database, and explore them in a GPU-accelerated web UI
In a terminal, clone the playbook repository and navigate to the project assets directory.
git clone https://github.com/NVIDIA/dgx-spark-playbooks
cd dgx-spark-playbooks/nvidia/playbook-txt2kg/assets
Use the provided start script. By default, ./start.sh starts the ArangoDB + Ollama stack. Use one stack flag when you want a different graph database or LLM backend.
./start.sh
Common options:
# Stack flags
./start.sh --neo4j # Neo4j + Ollama
./start.sh --vllm # Neo4j + vLLM
# Optional flags
./start.sh --vector-search # Add Qdrant + Sentence Transformers
./start.sh --help # Full option list
DGX Spark is not affected by the 64 KB page-size issue. On affected DGX Station systems, start with ./start.sh --neo4j to use Neo4j + Ollama.
The script will:
docker logs vllm-service -fTriple extraction quality depends on the LLM behind Ollama or vLLM. Start with the stack default below, then explore other models to trade quality vs. speed and memory.
| Stack | Default model | Notes |
|---|---|---|
| ArangoDB + Ollama | llama3.1:8b | Pull with docker exec ollama-compose ollama pull llama3.1:8b |
| Neo4j + Ollama | llama3.1:8b | Pull with docker exec ollama-compose ollama pull llama3.1:8b |
| Neo4j + vLLM | nvidia/Llama-3_3-Nemotron-Super-49B-v1_5-FP8 | Loaded by the vLLM container; first start can take 30+ minutes |
Pull a language model for knowledge extraction (skip if the default was already pulled on start):
docker exec ollama-compose ollama pull <model-name>
Examples:
docker exec ollama-compose ollama pull llama3.1:8b
Then select the model in the web UI.
Explore more models: browse the Ollama model library. Prefer models that fit the memory available on your hardware platform.
The model is loaded automatically by the vLLM container from VLLM_MODEL in deploy/compose/docker-compose.vllm.yml.
To try a different Hugging Face checkpoint:
VLLM_MODEL to another handle (for example from Hugging Face Models or vLLM Recipes)../stop.sh then start again with your stack flags (for example ./start.sh --vllm).docker logs vllm-service -fExplore more models: vLLM Recipes — DGX Spark · vLLM Recipes — DGX Station · Hugging Face
NOTE
Larger models generally produce higher-quality triples but need more memory and load time. If you hit memory limits, choose a smaller or quantized model.
Open your browser and navigate to:
http://localhost:3001
You can also access stack-specific services:
| Service | URL | Stack |
|---|---|---|
| Web UI | http://localhost:3001 | All |
| ArangoDB Web Interface | http://localhost:8529 | ArangoDB + Ollama |
| Neo4j Browser | http://localhost:7474 | Neo4j + Ollama or Neo4j + vLLM |
| Ollama API | http://localhost:11434 | ArangoDB + Ollama or Neo4j + Ollama |
| vLLM API | http://localhost:8001 | Neo4j + vLLM |
If the LLM backend is still loading, the UI may show an initializing banner until the backend is ready.
--neo4j or --vllmStop services with the same stack flags you used to start:
# Stop services (match the stack you started)
./stop.sh
# If you started with Neo4j + Ollama: ./stop.sh --neo4j
# If you started with Neo4j + vLLM: ./stop.sh --vllm
# Remove containers and volumes (optional)
# Ollama stack:
# docker compose -f deploy/compose/docker-compose.yml down -v
# Neo4j + Ollama stack:
# docker compose -f deploy/compose/docker-compose.neo4j.yml down -v
# Neo4j + vLLM stack:
# docker compose -f deploy/compose/docker-compose.vllm.yml down -v
# Remove downloaded Ollama models (Ollama stacks only, optional)
# docker exec ollama-compose ollama rm <model-name>