Concepts

Vector Store (InMemoryVectorStore)

Stores text and embeddings, retrieves the most relevant chunks for a query using hand-written cosine similarity search.

Why it exists

RAG requires finding which stored text is most relevant to a question — this implements that search from scratch instead of importing a vector database.

View source on GitHub
educhain.py
from educhain.core.vectorstore import InMemoryVectorStore

store = InMemoryVectorStore()

Related