Introduction
In this lesson, you will work hands-on with all three retriever types to see how they work in practice.
There are three Jupyter notebooks to explore:
-
01_01_vector_retriever.ipynb
- Vector Retriever
-
01_02_vector_cypher_retriever.ipynb
- Vector + Cypher Retriever
-
01_03_text2cypher_retriever.ipynb
- Text2Cypher Retriever
Hands-On: Retriever Notebooks
Open the first notebook: 01_01_vector_retriever.ipynb
Each notebook demonstrates:
-
Setting up the retriever with the knowledge graph we built
-
Customizing the retriever for your requirements
-
Using the retriever as part of a GraphRAG pipeline
-
Comparing results from different retrieval methods
What You’ll Build:
As you work through the notebooks, take time to review the code snippets and understand how each retriever is initialized and used.
Note how each retriever has its place in a complete GraphRAG system!
Initialize Models:
All retrievers will use the same LLM and embedder for consistency:
Vector Retriever:
-
Returns semantically similar text chunks
-
Good for exploratory questions
-
May miss entity-specific context
Vector + Cypher Retriever:
-
Provides both content and relationships
-
Richer context with entity information
-
Better for comprehensive answers
Text2Cypher Retriever:
-
Direct, precise answers from graph structure
-
Perfect for factual queries
-
Handles aggregations and counts
Testing Different Retrievers
Try these questions with each retriever:
Broad Semantic Questions:
Entity-Specific Questions:
Precise Data Questions:
Compare the results - you’ll see how each retriever approaches the same question differently!
Summary
In this hands-on lesson, you worked with all three retriever types in practice:
What You Built:
-
Vector Retriever for semantic search
-
Vector + Cypher Retriever for contextual search
-
Text2Cypher Retriever for precise queries
Key Insights:
-
Different retrievers excel at different question types
-
Combining approaches gives comprehensive coverage
-
Understanding retriever strengths guides selection
Preparation:
-
You now understand how each retriever works in practice
-
You’ve seen their different strengths and limitations
-
You’re ready to wrap these retrievers as conversational agent tools
In the next module, you will learn how to combine these retrievers into intelligent agents that can choose the right retrieval method automatically.