>_TheQuery
← Glossary

Neo4j

Knowledge Graphs

The most widely used graph database in industry, designed for storing and querying property graphs using the Cypher query language.

Neo4j is a native graph database that stores data as nodes, relationships, and properties in a property graph model. It is the most popular graph database for knowledge graph applications, offering mature tooling, excellent query performance for graph traversals, and the intuitive Cypher query language.

Neo4j's key advantage is index-free adjacency -- each node directly references its neighbors, making traversal operations constant-time per hop regardless of total graph size. This makes multi-hop queries like "find all skills within 3 hops of Alice" extremely fast even with millions of nodes. Neo4j also includes the Graph Data Science (GDS) library with built-in algorithms for PageRank, community detection, shortest path, and other graph analytics.

In RAG+KG architectures, Neo4j serves as the structured knowledge store alongside a vector database for unstructured content. Common patterns include using LLMs to generate Cypher queries from natural language (text-to-Cypher), expanding retrieval context through graph neighborhood exploration, and providing explainable reasoning paths through graph traversals. Neo4j can be deployed locally via Docker or as a managed cloud service.

Last updated: February 22, 2026