Skip to content

MultiQuestionTransformer

PropertyPatternTypeDeprecatedDefinitionTitle/Description
+ implementationNoconstNo-Implementation
- keep_originalNobooleanNo-Keep Original
- number_to_generateNointegerNo-Number To Generate
- promptNostringNo-Prompt

1. Property implementation

Title: Implementation

Typeconst
RequiredYes

Specific value: "MultiQuestionTransformer"

2. Property keep_original

Title: Keep Original

Typeboolean
RequiredNo
Defaulttrue

Description: Whether to keep the original question in the output

3. Property number_to_generate

Title: Number To Generate

Typeinteger
RequiredNo
Default3

Description: The number of questions to generate

4. Property prompt

Title: Prompt

Typestring
RequiredNo
Default"You are an AI language model assistant. Your task is to generate {{number_to_generate}} different versions of the given user \n question to retrieve relevant documents from a vector database. By generating multiple perspectives on the user question, \n your goal is to help the user overcome some of the limitations of distance-based similarity search. Provide these alternative \n questions separated by newlines. Original question: {{question}}"

Description: The prompt to be used for the question transformer. This should be a template where the user question is the field {{question}}