Concepts

RAG Chain

Combines a vector store with an existing chain — retrieves relevant context, injects it into the prompt, generates a grounded answer.

Why it exists

Lets a chain answer questions using information it wasn't trained on, by retrieving relevant text first and feeding it into the prompt before generation.

View source on GitHub
educhain.py
from educhain.core.rag import RAGChain

rag = RAGChain(vector_store=store, chain=chain)

Related