← all repositories
LeDat98/NexusRAG

RAG pipeline that embeds your charts instead of ignoring them

NexusRAG exists because most retrieval systems treat documents as flat text and forget where the tables live.

500 stars Python RAG · SearchLLMOps · Eval
NexusRAG
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

NexusRAG ingests PDFs, Word files, and PowerPoints through either Docling or Marker, then answers questions with inline citations tied to specific pages and headings. It combines ChromaDB vector search, a LightRAG knowledge graph, and cross-encoder reranking to surface context before handing off to either Gemini or a local Ollama model. Images and tables are captioned by a vision LLM and folded into the text chunks they share a page with, so searching for a chart does not require a separate image index.

The interesting bit

The pipeline assigns two different embedding models with different jobs: a fast local bge-m3 for vector retrieval, and a separate, richer model for knowledge-graph entity extraction. During retrieval, vector over-fetch and graph lookup run in parallel, then a cross-encoder rescores the top twenty candidates jointly with the query. It is a rare case where the architecture diagram actually matches the code.

Key highlights

  • Dual-parser support: switch between Docling and Marker via environment config without touching downstream logic.
  • Visual content is embedded through captions appended to page chunks, making images and tables searchable through standard vector similarity.
  • LightRAG runs on file-based storage (NetworkX plus NanoVectorDB), so the knowledge graph needs no extra Docker services.
  • Citations use four-character IDs with page numbers and heading paths, and the UI lets you click through to the exact source section.
  • LLM provider toggles between cloud Gemini and local Ollama via environment config; the system auto-detects native tool-calling support versus prompt-based fallback.

Caveats

  • The README warns that smaller local models (around 4B parameters) may fail to extract any entities from complex documents, so knowledge-graph quality depends heavily on model size.
  • Docling’s formula enrichment can consume roughly 18–20 GB of VRAM, while Marker sits closer to 2–4 GB.
  • Gemma 4 models require Ollama v0.20.0 or newer.

Verdict

Worth a look if you need a batteries-included RAG stack that preserves document structure and cites sources out of the box. Skip it if you want a minimal, pluggable component; this is a full-stack opinionated assembly.

Frequently asked

What is LeDat98/NexusRAG?
NexusRAG exists because most retrieval systems treat documents as flat text and forget where the tables live.
Is NexusRAG open source?
Yes — LeDat98/NexusRAG is an open-source project tracked on heatdrop.
What language is NexusRAG written in?
LeDat98/NexusRAG is primarily written in Python.
How popular is NexusRAG?
LeDat98/NexusRAG has 500 stars on GitHub.
Where can I find NexusRAG?
LeDat98/NexusRAG is on GitHub at https://github.com/LeDat98/NexusRAG.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.