Skip to content
masterclass Buddy

LangChain · Interface

BaseRetriever

BaseRetriever is the base class for document retrievers in LangChain. Extend it to turn a text query into a list of relevant Document objects.

Last updated

Since
v1.7

Syntax

class BaseRetriever(RunnableSerializable[RetrieverInput, RetrieverOutput], ABC)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Document
  • RunnableSerializable
  • Runnable
  • _get_relevant_documents
  • _aget_relevant_documents
  • invoke
  • ainvoke
  • batch

Source: BaseRetriever | langchain_core | LangChain Reference. Checked 2026-11-03.