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/prompts/index.d.ts:58
updatePrompts()
updatePrompts(
prompts
):void
Parameters
• prompts: PromptsRecord
Returns
void
Inherited from
Defined in
packages/core/prompts/dist/prompts/index.d.ts:59
validatePrompts()
validatePrompts(
promptsDict
,moduleDict
):void
Parameters
• promptsDict: PromptsRecord
• moduleDict: ModuleRecord
Returns
void
Inherited from
Defined in
packages/core/prompts/dist/prompts/index.d.ts:57