validate_search_type » all fields
field combine_documents_chain: BaseCombineDocumentsChain [Required]#
Chain to use to combine the documents.
field k: int = 4#
Number of documents to query for.
field return_source_documents: bool = False#
Return the source documents.
field search_kwargs: Dict[str, Any] [Optional]#
Extra search args.
field search_type: str = 'similarity'#
Search type to use over vectorstore. similarity or mmr.
field vectorstore: VectorStore [Required]#
Vector Database to connect to.
classmethod from_chain_type(llm: langchain.schema.BaseLanguageModel, chain_type: str = 'stuff', chain_type_kwargs: Optional[dict] = None, **kwargs: Any) → langchain.chains.vector_db_qa.base.VectorDBQA[source]#
Load chain from chain type.
classmethod from_llm(llm: langchain.schema.BaseLanguageModel, prompt: Optional[langchain.prompts.prompt.PromptTemplate] = None, **kwargs: Any) → langchain.chains.vector_db_qa.base.VectorDBQA[source]#
Initialize from LLM.
pydantic model langchain.chains.VectorDBQAWithSourcesChain[source]#
Question-answering with sources over a vector database.
Validators
set_callback_manager » callback_manager
set_verbose » verbose
validate_naming » all fields
field k: int = 4#
Number of results to return from store
field max_tokens_limit: int = 3375#
Restrict the docs to return from store based on tokens,
enforced only for StuffDocumentChain and if reduce_k_below_max_tokens is to true
field reduce_k_below_max_tokens: bool = False#
Reduce the number of results to return from store based on tokens limit
field search_kwargs: Dict[str, Any] [Optional]#