以编程方式使用文档

A 检索器 是一个接口,用于在给定非结构化查询时返回文档。 它比向量存储库更通用。 检索器不需要能够存储文档,只需要返回(或检索)它们。 检索器可以从向量存储库创建,但也足够广泛,可以包含其他来源。

检索器接受字符串查询作为输入,并返回Document] 对象列表作为输出。

请注意,所有 向量存储库 都可以转换为检索器。请参阅向量存储库 集成文档 了解可用的向量存储库。 本页面列出了通过子类化 BaseRetriever 实现的自定义检索器。

使用您自己的文档

以下检索器允许您索引和搜索自定义文档语料库。

检索器自托管云服务软件包
AmazonKnowledgeBasesRetrieverlangchain-aws
ElasticsearchRetrieverlangchain-elasticsearch
NVIDIARAGRetrieverlangchain-nvidia-ai-endpoints
VertexAISearchRetrieverlangchain-google-community

外部索引

以下检索器将搜索外部索引(例如从互联网数据或类似来源构建的索引)。

检索器来源软件包
ParallelSearchRetriever通过 并行搜索 APIlangchain-parallel
PerplexitySearchRetriever通过 Perplexity 搜索 APIlangchain-perplexity
YouRetriever互联网搜索langchain-youdotcom

所有检索器

AgentMail

Bedrock (Knowledge Bases)

Box

Cognee

Cohere reranker

Cohere RAG

Contextual AI Reranker

Dappier

Elasticsearch

Egnyte

Galaxia

Google Drive

Google Vertex AI Search

Graph RAG

GreenNode

IBM watsonx.ai

IMAP

Kinetica Vectorstore

LinkupSearchRetriever

Nebius

Nimble Extract

Nimble Search

NVIDIA RAG Blueprint

Parallel Search

Permit

Perigon

Perplexity Search

Pinecone Rerank

RAGatouille

SpiceDB

ValyuContext

Vectorize

You.com

Zotero