Class: LLMQuestionGenerator
LLMQuestionGenerator uses the LLM to generate new questions for the LLM using tools and a user query.
Extends
Implements
BaseQuestionGenerator
Constructors
new LLMQuestionGenerator()
new LLMQuestionGenerator(
init
?):LLMQuestionGenerator
Parameters
• init?: Partial
<LLMQuestionGenerator
>
Returns
Overrides
Defined in
packages/llamaindex/src/QuestionGenerator.ts:26
Properties
llm
llm:
LLM
<object
,object
>
Defined in
packages/llamaindex/src/QuestionGenerator.ts:22
outputParser
outputParser:
BaseOutputParser
<StructuredOutput
<SubQuestion
[]>>
Defined in
packages/llamaindex/src/QuestionGenerator.ts:24
prompt()
prompt: (
__namedParameters
) =>string
Parameters
• __namedParameters
• __namedParameters.queryStr: undefined
| string
= ""
• __namedParameters.toolsStr: undefined
| string
= ""
Returns
string
Defined in
packages/llamaindex/src/QuestionGenerator.ts:23
Methods
_getPromptModules()
protected
_getPromptModules():Record
<string
,any
>
Returns
Record
<string
, any
>
Inherited from
Defined in
packages/llamaindex/src/prompts/Mixin.ts:83
_getPrompts()
protected
_getPrompts():object
Returns
object
Overrides
Defined in
packages/llamaindex/src/QuestionGenerator.ts:34
_updatePrompts()
protected
_updatePrompts(promptsDict
):void
Parameters
• promptsDict
• promptsDict.subQuestion
Returns
void
Overrides
Defined in
packages/llamaindex/src/QuestionGenerator.ts:40
generate()
generate(
tools
,query
):Promise
<SubQuestion
[]>
Parameters
• tools: ToolMetadata
[]
• query: QueryType
Returns
Promise
<SubQuestion
[]>
Implementation of
BaseQuestionGenerator.generate
Defined in
packages/llamaindex/src/QuestionGenerator.ts:48
getPrompts()
getPrompts():
PromptsDict
Returns all prompts from the mixin and its modules
Returns
PromptsDict
Inherited from
Defined in
packages/llamaindex/src/prompts/Mixin.ts:27
updatePrompts()
updatePrompts(
promptsDict
):void
Updates the prompts in the mixin and its modules
Parameters
• promptsDict: PromptsDict