Building Lightweight RAG Applications Using Neo4j

Fanghua (Joshua) Yu
Neo4j Developer Blog
8 min readDec 10, 2023

--

Knowledge Graph Store With Rich Integration Features

COSMOS by the French artist Jean-Michel Othoneil at Doha International Airport. Photo by author.

Abstract

Retrieval-Augmented Generation (RAG) framework, including tools like LangChain & LlamaIndex, represents an evolving and increasingly significant area in the field of natural language processing (NLP) and GenAI. However, there is always extra complexity & learning curve introduced by those frameworks, esp. for users who only need a small part of their functionality (think about the heave abstraction of LangChain).

In this post, I will go through the steps of creating a lightweight RAG application that is purely API-driven, a single knowledge store, and scalable to complex retrieval strategies, using Neo4j’s available technical product features.

For this lightweight architecture, I assume all genAI capabilities will be provided by external APIs, so there is no locally hosted LLM for embedding or inferencing.

A Property Graph Database for Both Text & Vector Data

Neo4j Graph DBMS — An Overview

Neo4j is a highly regarded and widely used graph database management system (DBMS) that specializes in storing and managing data as a graph.

--

--

Fanghua (Joshua) Yu
Neo4j Developer Blog

I believe our lives become more meaningful when we are connected, so is data. Happy to connect and share: https://www.linkedin.com/in/joshuayu/