retrieval-augmented generation
Fetching relevant context from an external data source as additional context to inform a language model's response.
Also written: RAG
Example
Neo4j includes features for both vector and graph retrieval.
prompt
What movie features a toy protagonist who becomes jealous of a new arrival?ai.text.embed turns that description into queryVector. The SEARCH clause reads the moviePlots index for the five films whose own vectors lie nearest it.
cypher
WITH ai.text.embed($searchPrompt, 'OpenAI', {
token: $token, model: 'text-embedding-3-small'
}) AS queryVector
MATCH (movie:Movie)
SEARCH movie IN (
VECTOR INDEX moviePlots
FOR queryVector
LIMIT 5
) SCORE AS similarityScore
RETURN movie.title AS title, movie.plot AS plot, similarityScoretext
Toy Story 0.9334269165992737
Little Rascals, The 0.9214372634887695
NeverEnding Story III, The 0.9206198453903198
Drop Dead Fred 0.9199690818786621
E.T. the Extra-Terrestrial 0.919100284576416Only the first title shares a word with the description. The other four matched on plot alone. Those five plots become the context the model answers from, and asked the same thing with nothing fetched it answers from its training alone.
Lessons that use this term
The lesson and course links below open in a new tab.
15 lessons use this term. Results are ordered by term density.
Neo4j & GenerativeAI Fundamentals25 mentions
- GenAI FrameworksIntegrating Neo4j with Generative AIRetrieval-augmented generation6 mentions
- What is RAG?Retrieval Augmented Generation (RAG)Retrieval-Augmented Generation (RAG) is an approach that enhances the responses of LLMs by providing them with relevant, up-to-date information9 mentions
- RAG PipelineIntegrating Neo4j with Generative AIcan use a retriever as part of a RAG (Retrieval-Augmented Generation) pipeline to provide context to a4 mentions
- Vector RAGRetrieval Augmented Generation (RAG)In the last lesson, you learned about Retrieval Augmented Generation (RAG) and the role of retrievers in finding relevant3 mentions
- GraphRAGRetrieval Augmented Generation (RAG)can be used in conjunction with vector RAG2 mentions
- Vector IndexesRetrieval Augmented Generation (RAG)In the last lesson, you learned about embeddings, vectors and their role in RAG1 mention
Building Knowledge Graphs with LLMs16 mentions
- Querying using CypherExploring your knowledge graph| --- | --- | --- | | [Technology] | GenAI Frameworks | HAS | [Capability] | Retrieval-augmented generation | | [Application] | GenAI application development | USES | [Technology] | Neo4j | | [Technology] | GenAI Frameworks |15 mentions
- Neo4j LLM Graph BuilderLLM Graph Buildercan use different Retrieval Augmented Generation (RAG) approaches to answer questions, including GraphRAG, Vector Search, and1 mention
Neo4j and Generative AI Workshop14 mentions
- GraphRAG?Generative AIGeneration (RAG) is an approach that enhances the responses of LLMs by providing them with relevant, up-to-date information11 mentions
- Vector RAGRetrievalYou previously learned about Retrieval Augmented Generation (RAG) and the role of retrievers in finding relevant3 mentions
Using Neo4j with LangChain3 mentions
- Vector RetrieverVectorssearch can be used in Retrieval Augmented Generation (RAG) applications to find relevant documents based on their2 mentions
- Simple LangChain AgentNeo4j and LangChainupdate the agent to query a Neo4j graph database, retrieve information using RAG and GraphRAG, and dynamically generate Cypher queries based on user1 mention
GraphRAG Hackathon6 mentions
- Understanding GraphRAGIntroduction to GraphRAGthis lesson, you will learn why LLMs hallucinate, how RAG grounds their responses in real data, and why graphs make RAG significantly more6 mentions
Building Agents in Neo4j Aura1 mention
- Next StepsPublishing Agents— Integrate Neo4j with LangChain for retrieval-augmented generation and agents Developing with Neo4j MCP Tools — Learn how to use the Model Context1 mention
AI on Your Lakehouse: Context Comes in Shapes, Not Queries1 mention
- The Outline ShapeNavigate What's There - Table of Contentsthe approach reports 98.7% accuracy, against roughly 50% for naive vector RAG1 mention