Microsoft Azure

Any language. Any platform. Our team is focused on making the world more amazing for developers and IT operations communities with the best that Microsoft Azure can provide. If you want to contribute in this journey with us, contact us at medium@microsoft.com

Member-only story

Introducing GraphRAG with LangChain and Neo4j

Part 1: Getting Started with Graph Databases in the LLMs Era

11 min readApr 28, 2024

--

In my latest article about graph-based techniques in the LLM-powered applications landscape, we explored how these data structures can be levaraged in the context of multi-agents frameworks. More specifically, we covered a new LangChain library, LangGraph, introduced in January 2024 and based on the mathematical object of graph as representative framework for agentic applications.

The main goal of LangGraph is to overcome the main limitations of traditional LangChain’s chains, that is, the lack of cycles into their runtime; this limitation can be easily bypassed by introducing a graph-like structure which easily introduces cycles into chains that are, by design, directed acyclic graphs (DAGs).

However, graphs are powerful tools also in organizing the knowledge base in Retrieval Augmented Generation (RAG) scenarios. More specifically, they enhance the “Retrieval” phase and lead to a more meaningful context retrieval, with the final result of getting more accurate generated responses. To achieve that, the idea is that of storing the knowledge base into graph-based databases (such as Neo4j) leveraging the semantic power of LLMs to correctly extract and map entities and relationships.

--

--

Microsoft Azure
Microsoft Azure

Published in Microsoft Azure

Any language. Any platform. Our team is focused on making the world more amazing for developers and IT operations communities with the best that Microsoft Azure can provide. If you want to contribute in this journey with us, contact us at medium@microsoft.com

Valentina Alto
Valentina Alto

Written by Valentina Alto

Data&AI Specialist at @Microsoft | MSc in Data Science | AI, Machine Learning and Running enthusiast

Responses (15)