System Architecture: The “Secret Sauce”

🧩 The Core Problem: Losing the Big Picture

Traditional RAG systems chop documents into fixed-size blocks (e.g., 500 characters).

  • The Issue: A block might contain the sentence “To reset it, click here,” but the instructions on what “it” is might be in the previous block. The AI gets confused because it’s missing the context.

🚀 The Solution: Parent-Child Architecture

RAGv2 solves this by splitting text into two layers:

  1. Child Chunks (The Search Target): Small snippets (250 chars) that are very easy for the computer to search through.
  2. Parent Chunks (The Context): Larger sections (2000 chars) that contain the “Full Story.”

When you ask a question:

  1. The system finds the best Child (the specific detail).
  2. It instantly looks up that child’s Parent (the full page).
  3. It gives the Parent to the AI. This way, the AI always has the full context!

Computers don’t read words like we do; they use Vector Embeddings.

🔢 What is a Vector? (Meaning Matching)

  • Keyword Search (Old Way): Searching for “Cat” only finds the word “Cat.” It misses “Kitten” or “Feline.”
  • Vector Search (RAGv2 Way): An AI model turns your question into a “Coordinate” on a giant map of meanings. In this map, “Cat,” “Kitten,” and “Feline” are all in the same neighborhood.

RAGv2 searches neighborhoods, not just letters. This is why you can ask a question in your own words and the system still finds the right answer.


🔗 The Relationship Diagram

graph LR
    P1["📄 Parent: Full Section on 'Login'"] --> C1("👶 Child: 'Enter username'")
    P1 --> C2("👶 Child: 'Click Submit'")
    P1 --> C3("👶 Child: 'Error Handling'")
    
    P2["📄 Parent: Full Section on 'API'"] --> C4("👶 Child: 'GET Request'")
    P2 --> C5("👶 Child: 'POST Request'")

    style P1 fill:#f9f,stroke:#333,stroke-width:2px
    style C1 fill:#bbf,stroke:#333,stroke-width:1px

Last Updated: 2026-05-01