LangChain 1 · Retrieval (RAG)

Turn a vector store into a retriever

Get a retriever that fits into chains and agents.

retriever = vector_store.as_retriever(search_kwargs={"k": 4})
retriever.invoke("How do refunds work?")

Official LangChain 1 documentation

More retrieval (rag) commands

All retrieval (rag) commands · LangChain 1 cheatsheet

Was this page helpful?