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:30
Properties
llm
llm:
LLM
<object
,object
>
Defined in
packages/llamaindex/src/QuestionGenerator.ts:26
outputParser
outputParser:
BaseOutputParser
<StructuredOutput
<SubQuestion
[]>>
Defined in
packages/llamaindex/src/QuestionGenerator.ts:28
prompt
prompt:
SubQuestionPrompt
Defined in
packages/llamaindex/src/QuestionGenerator.ts:27
Methods
_getPromptModules()
protected
_getPromptModules():ModuleRecord
Return a dictionary of sub-modules within the current module that also implement PromptMixin (so that their prompts can also be get/set).
Can be blank if no sub-modules.
Returns
Overrides
Defined in
packages/llamaindex/src/QuestionGenerator.ts:72
_getPrompts()
protected
_getPrompts():object
Returns
object
Overrides
Defined in
packages/llamaindex/src/QuestionGenerator.ts:38
_updatePrompts()
protected
_updatePrompts(promptsDict
):void
Parameters
• promptsDict
• promptsDict.subQuestion: SubQuestionPrompt
Returns
void
Overrides
Defined in
packages/llamaindex/src/QuestionGenerator.ts:44
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:52
getPrompts()
getPrompts():
PromptsRecord
Returns
Inherited from
Defined in
packages/core/prompts/dist/index.d.ts:66
updatePrompts()
updatePrompts(
prompts
):void
Parameters
• prompts: PromptsRecord
Returns
void
Inherited from
Defined in
packages/core/prompts/dist/index.d.ts:67
validatePrompts()
validatePrompts(
promptsDict
,moduleDict
):void
Parameters
• promptsDict: PromptsRecord
• moduleDict: ModuleRecord
Returns
void
Inherited from
Defined in
packages/core/prompts/dist/index.d.ts:65