LangChain 1 · Retrieval (RAG)

Store chunks in a vector store

Use the in-memory store to experiment. Swap in Chroma, pgvector or another store for real data.

from langchain_core.vectorstores import InMemoryVectorStore

vector_store = InMemoryVectorStore(embeddings)
vector_store.add_documents(chunks)

Official LangChain 1 documentation

More retrieval (rag) commands

All retrieval (rag) commands · LangChain 1 cheatsheet

Was this page helpful?