liveBook · Manning

ParentDocumentRetriever

As explained in Essential GraphRAG

Parent document retrieval is a strategy that embeds or matches smaller child segments while returning their enclosing parent document for broader context.

ParentDocumentRetriever improves retrieval by embedding small child chunks for precise matching while returning their larger parent chunks as context. This addresses a common RAG limitation: embeddings may locate only incomplete or overly narrow passages, leaving generated answers without surrounding information. section 3.0 section 3.2

A practical implementation follows this hierarchy:

  • Split the source document by structural elements such as paragraphs, sections, or titles before applying size limits. section 3.2
  • Create a vector index on child embeddings so queries can match granular content while the associated parent supplies broader context. section 3.2

Einstein’s Patents and Inventions

A PDF is split into titled sections, then oversized sections are divided into 2,000-character parents. Each parent produces 500-character children whose embeddings are stored on Child nodes. PDF, Parent, and Child nodes are connected with HAS_PARENT and HAS_CHILD relationships, and a Neo4j vector index is created on child embeddings. section 3.2

How Essential GraphRAG covers it

How deep it goes
Defines the hierarchy and implements splitting, embedding, graph import, and child indexing, but does not show a complete query-time retrieval call.
Examples
Uses Einstein’s Patents and Inventions, section splitting, 2,000-character parents, and 500-character children.
What it assumes
Assumes basic text embeddings and vector similarity search, while demonstrating structural splitting and token counting.
What you can do after
Builds a parent-child retrieval index with Python, embeddings, Cypher, and a Neo4j vector index.
How it connects
Connects document chunking, text embeddings, vector similarity search, graph databases, and retrieval-augmented generation.

Also explained in

Compare how 2 books explain ParentDocumentRetriever →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Essential GraphRAG. The section links point to the parts of the book it draws on.