from_llm(
cls,
llm: BaseLanguageModel,
vectorstore: VectorStore,
document_contents: str,
| Name | Type | Description |
|---|---|---|
llm* | BaseLanguageModel | The language model to use for generating queries. |
vectorstore* | VectorStore | The vector store to use for retrieving documents. |
document_contents* | str | Description of the page contents of the document to be queried. |
metadata_field_info* | Sequence[AttributeInfo | dict] | |
structured_query_translator | Visitor | None | Default: None |
chain_kwargs | dict | None | Default: None |
enable_limit | bool | Default: False |
use_original_query | bool | Default: False |
**kwargs | Any | Default: {} |
Create a SelfQueryRetriever from an LLM and a vector store.
Metadata field information for the documents.
Optional translator for turning internal query
language into VectorStore search params.
Additional keyword arguments for the query constructor.
Whether to enable the limit operator.
Whether to use the original query instead of the revised query from the LLM.
Additional keyword arguments for the SelfQueryRetriever.