Skip to content

LLMQuestionGenerator

Defined in: .build/typescript/packages/llamaindex/src/QuestionGenerator.ts:22

LLMQuestionGenerator uses the LLM to generate new questions for the LLM using tools and a user query.

  • PromptMixin
  • BaseQuestionGenerator

new LLMQuestionGenerator(init?): LLMQuestionGenerator

Defined in: .build/typescript/packages/llamaindex/src/QuestionGenerator.ts:30

Partial<LLMQuestionGenerator>

LLMQuestionGenerator

PromptMixin.constructor

llm: LLM

Defined in: .build/typescript/packages/llamaindex/src/QuestionGenerator.ts:26


prompt: SubQuestionPrompt

Defined in: .build/typescript/packages/llamaindex/src/QuestionGenerator.ts:27


outputParser: BaseOutputParser<StructuredOutput<SubQuestion[]>>

Defined in: .build/typescript/packages/llamaindex/src/QuestionGenerator.ts:28

protected _getPrompts(): object

Defined in: .build/typescript/packages/llamaindex/src/QuestionGenerator.ts:38

object

PromptMixin._getPrompts


protected _updatePrompts(promptsDict): void

Defined in: .build/typescript/packages/llamaindex/src/QuestionGenerator.ts:44

SubQuestionPrompt

void

PromptMixin._updatePrompts


generate(tools, query): Promise<SubQuestion[]>

Defined in: .build/typescript/packages/llamaindex/src/QuestionGenerator.ts:52

ToolMetadata[]

QueryType

Promise<SubQuestion[]>

BaseQuestionGenerator.generate


protected _getPromptModules(): ModuleRecord

Defined in: .build/typescript/packages/llamaindex/src/QuestionGenerator.ts:72

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.

ModuleRecord

PromptMixin._getPromptModules