Skip to content

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).

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`
]
};

optional criticalUsage: PromptTemplate

Defined in: core/prompt-config.ts:71

Critical usage instruction that appears in the usage section. Default emphasizes the exact format requirement.


optional customExamples: (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.

PromptContext

string


optional formatDescription: PromptTemplate

Defined in: core/prompt-config.ts:77

Format description for the block parameter format. Default uses the configured argPrefix dynamically.


optional iterationProgressHint: 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

optional mainInstruction: 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.


optional parallelGadgetsHint: HintTemplate

Defined in: core/prompt-config.ts:101

Hint shown when LLM uses only one gadget per response. Encourages parallel gadget usage for efficiency.


optional rules: 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.