# CogniRAG — Universal Enterprise Document Intelligence Assistant

A document-grounded enterprise assistant that fuses dense vector search, BM25 and Neo4j knowledge-graph traversal into one retrieval pipeline with agentic routing.

CogniRAG combines dense vector retrieval, BM25 sparse reranking and multi-hop Neo4j knowledge-graph traversal, fusing results from four selectable retrieval pipelines (dense, dense plus BM25, graph-only, and hybrid) with reciprocal rank fusion. A graph fact scorer combines semantic similarity, entity match, relation match, confidence and hop-distance penalty to rank graph-derived facts, and a query-planner agent routes each query to a retrieval mode, with manual override available.

It includes an interactive visual graph explorer built with PyVis and Streamlit, a multi-tier cognitive memory engine, and a persistent SQLite database for state. A dual ingestion pipeline parses, chunks, vectorizes and extracts entities and relations from documents, keeping deletions synchronized across the vector and graph stores.

The project describes its architecture as runnable at zero cost, using Pinecone's serverless free tier, OpenRouter's free-model routing, local MiniLM embeddings, and a local Docker Neo4j Community instance capped at 1.5GB of RAM.

Website: https://github.com/WaqassKhn/CogniRAG
