š§ Early Knowledge Alignment (EKA) RAG Demo
Multi-Hop Reasoning with Knowledge Grounding for Complex Questions
š Knowledge Base
Step 1:
Load documents into vector database. These form the knowledge corpus for retrieval.
Documents (one per line, separated by |)
Film Directors | Steven Spielberg was born in 1946 and directed Jaws, Raiders, and E.T. Film Directors | Christopher Nolan was born in 1970 and directed Inception and Oppenheimer. Film Birthplaces | Steven Spielberg was born in New Jersey. Film Birthplaces | Christopher Nolan was born in London. Movies | Jaws (1975) directed by Spielberg was a blockbuster. Movies | Oppenheimer (2023) directed by Nolan won multiple Oscars.
š¤ Load Documents
ā Multi-Hop Query
Step 2:
Ask complex questions requiring multiple reasoning steps. EKA retrieves top-k facts first to ground reasoning.
Your Question
Number of Initial Retrieval (top-k)
ā” EKA Query (with early alignment)
š Standard RAG (without EKA)
š Results & Analysis
šÆ EKA (Early Knowledge Alignment) Process
Step 1: Initial Retrieval (Early Knowledge Alignment)
First, retrieve top-k relevant documents from corpus to ground planning
Step 2: Grounded Planning
LLM plans reasoning steps based on retrieved knowledge
Step 3: Iterative Reasoning & Search
Think-Search-Answer cycle with focused exploration
Step 4: Final Answer
Generated response using aligned knowledge context
š EKA Metrics
š Standard RAG Process
Step 1: Query Decomposition (Blind)
Plans reasoning without prior knowledge of corpus
Step 2: Iterative Retrieval
Searches based on initial plan, may have inefficiencies
Step 3: Final Answer
Generated response
š Standard RAG Metrics
š EKA vs Standard RAG Comparison
ā EKA (With Early Alignment)
š Standard RAG