Skip to main content

Retrievers

A retriever is an interface that returns documents given an unstructured query. It is more general than a vector store. A retriever does not need to be able to store documents, only to return (or retrieve) them. Retrievers can be created from vector stores, but are also broad enough to include Wikipedia search and Amazon Kendra.

Retrievers accept a string query as input and return a list of Documents as output.

For specifics on how to use retrievers, see the relevant how-to guides here.

Note that all vector stores can be cast to retrievers. Refer to the vector store integration docs for available vector stores. This page lists custom retrievers, implemented via subclassing BaseRetriever.

Bring-your-own documents

The below retrievers allow you to index and search a custom corpus of documents.

RetrieverSelf-hostCloud offeringPackage
AmazonKnowledgeBasesRetrieverlangchain_aws
AzureAISearchRetrieverlangchain_community
ElasticsearchRetrieverlangchain_elasticsearch
MilvusCollectionHybridSearchRetrieverlangchain_milvus
VertexAISearchRetrieverlangchain_google_community

External index

The below retrievers will search over an external index (e.g., constructed from Internet data or similar).

RetrieverSourcePackage
ArxivRetrieverScholarly articles on arxiv.orglangchain_community
TavilySearchAPIRetrieverInternet searchlangchain_community

Was this page helpful?


You can also leave detailed feedback on GitHub.