KnowledgeCompilerConfig
Properties
Section titled “Properties”compile
Section titled “compile”compile: (systemPrompt, userPrompt) => Promise<string>;Function that calls the LLM to compile raw text into structured markdown. The compiler is model-agnostic — callers provide their own LLM function.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
|
|
|
Instructions for compilation. |
|
|
|
The raw text to compile. |
Returns
Section titled “Returns”Promise<string>
Compiled structured markdown.
maxTokens?
Section titled “maxTokens?”optional maxTokens?: number;Maximum token budget for the compiled output. The compiler instructs the LLM to stay within this limit. Default: 4000.
systemPrompt?
Section titled “systemPrompt?”optional systemPrompt?: string;Custom system prompt for the compilation LLM call. When not provided, a default prompt is used that produces structured markdown organized by topic with deduplication.