.rst
.pdf
Retrievers
Retrievers#
pydantic model langchain.retrievers.ArxivRetriever[source]#
It is effectively a wrapper for ArxivAPIWrapper.
It wraps load() to get_relevant_documents().
It uses all ArxivAPIWrapper arguments without any change.
async aget_relevant_documents(query: str) → List[langchain.schema.Document][source]#
Get documents relevant for a query.
Parameters
query – string to find relevant documents for
Returns
List of relevant documents
get_relevant_documents(query: str) → List[langchain.schema.Document][source]#
Get documents relevant for a query.
Parameters
query – string to find relevant documents for
Returns
List of relevant documents
class langchain.retrievers.AwsKendraIndexRetriever(kclient: Any, kendraindex: str, k: int = 3, languagecode: str = 'en')[source]#
Wrapper around AWS Kendra.
async aget_relevant_documents(query: str) → List[langchain.schema.Document][source]#
Get documents relevant for a query.
Parameters
query – string to find relevant documents for
Returns
List of relevant documents
get_relevant_documents(query: str) → List[langchain.schema.Document][source]#
Run search on Kendra index and get top k documents
docs = get_relevant_documents(‘This is my query’)
k: int#
Number of documents to query for.
kclient: Any#
boto3 client for Kendra.
kendraindex: str#
Kendra index id
languagecode: str#
Languagecode used for querying.
pydantic model langchain.retrievers.AzureCognitiveSearchRetriever[source]#
Wrapper around Azure Cognitive Search.
rtdocs_stable/api.python.langchain.com/en/stable/reference/modules/retrievers.html