deep – set to True to make a deep copy of the model
Returns
new model instance
dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) → DictStrAny¶
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
classmethod from_llm(retriever: BaseRetriever, llm: BaseLLM, prompt: PromptTemplate = PromptTemplate(input_variables=['question'], template='You are an AI language model assistant. Your task is \n    to generate 3 different versions of the given user \n    question to retrieve relevant documents from a vector  database. \n    By generating multiple perspectives on the user question, \n    your goal is to help the user overcome some of the limitations \n    of distance-based similarity search. Provide these alternative \n    questions separated by newlines. Original question: {question}'), parser_key: str = 'lines', include_original: bool = False) → MultiQueryRetriever[source]¶
Initialize from llm using default template.
Parameters
retriever – retriever to query documents from
llm – llm for query generation using DEFAULT_QUERY_PROMPT
include_original – Whether to include the original query in the list of
generated queries.
Returns
MultiQueryRetriever
classmethod from_orm(obj: Any) → Model¶
generate_queries(question: str, run_manager: CallbackManagerForRetrieverRun) → List[str][source]¶
Generate queries based upon user input.
Parameters
question – user query
Returns