Parent-Child Retriever
Alternative Names
- Parent-Document-Retriever
Required Graph Shape
Description
The user question is embedded using the same embedder that has been used before to create the Chunk embeddings. A vector similarity search is executed on the Child Chunk embeddings to find k (number previously configured by developer / user) most similar Chunks. The Parent Chunks of the found Child Chunks are retrieved.
Usage
This pattern is a useful evolution of the Basic Retriever. It is especially useful when several topics are covered in a chunk which subsequently influence the embedding negatively while smaller chunks will have more meaningful vector representations which can then lead to better similarity search results. With limited additional effort, better results can be obtained.
Further reading
- Advanced Retriever Techniques to Improve Your RAGs (Damian Gil, April 2024)
- Implementing advanced RAG strategies with Neo4j (November 2023)