PromptTemplateConfig
Defined in: core/prompt-config.ts:60
Configuration for customizing all prompts used internally by llmist.
Each field can be either a string (static text) or a function that receives context and returns a string (for dynamic content).
Example
Section titled “Example”const customConfig: PromptTemplateConfig = { mainInstruction: "USE ONLY THE GADGET MARKERS BELOW:", criticalUsage: "Important: Follow the exact format shown.", rules: (ctx) => [ "Always use the markers to invoke gadgets", "Never use function calling", `You have ${ctx.gadgetCount} gadgets available` ]};Properties
Section titled “Properties”criticalUsage?
Section titled “criticalUsage?”
optionalcriticalUsage:PromptTemplate
Defined in: core/prompt-config.ts:71
Critical usage instruction that appears in the usage section. Default emphasizes the exact format requirement.
customExamples()?
Section titled “customExamples()?”
optionalcustomExamples: (context) =>string
Defined in: core/prompt-config.ts:91
Custom examples to show in the examples section. If provided, replaces the default examples entirely. Should be a function that returns formatted example strings.
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”string
formatDescription?
Section titled “formatDescription?”
optionalformatDescription:PromptTemplate
Defined in: core/prompt-config.ts:77
Format description for the block parameter format. Default uses the configured argPrefix dynamically.
iterationProgressHint?
Section titled “iterationProgressHint?”
optionaliterationProgressHint:HintTemplate
Defined in: core/prompt-config.ts:112
Template for iteration progress hint. Informs the LLM about remaining iterations to help plan work.
When using a string template, supports placeholders:
- {iteration}: Current iteration (1-based)
- {maxIterations}: Maximum iterations allowed
- {remaining}: Iterations remaining
mainInstruction?
Section titled “mainInstruction?”
optionalmainInstruction:PromptTemplate
Defined in: core/prompt-config.ts:65
Main instruction block that appears at the start of the gadget system prompt. Default emphasizes using text markers instead of function calling.
parallelGadgetsHint?
Section titled “parallelGadgetsHint?”
optionalparallelGadgetsHint:HintTemplate
Defined in: core/prompt-config.ts:101
Hint shown when LLM uses only one gadget per response. Encourages parallel gadget usage for efficiency.
rules?
Section titled “rules?”
optionalrules:string[] |PromptTemplate| (context) =>string[]
Defined in: core/prompt-config.ts:84
Rules that appear in the rules section. Can be an array of strings or a function that returns an array. Default includes rules about not using function calling.