Package-level declarations

Types

Link copied to clipboard
class BootstrapFewShotOptimizer<Input, Output, InputLabel>(val maxBootstrappedDemos: Int, val maxRounds: Int, val maxTotalDemos: Int, val includeLabeledExamples: Boolean, val storagePath: ResilientPath, randomSeed: Long) : AgentOptimizer<Input, Output, InputLabel>

Bootstrap few-shot optimizer that collects execution traces from successful agent runs and produces an OptimizationArtifact with demonstrations at both strategy and subgraph levels.

Functions

Link copied to clipboard
fun Prompt.prepareMessagesForFewShot(): List<Message>

Prepares demonstration messages for injection into a few-shot prompt:

Link copied to clipboard
fun removeOrphanedToolCalls(messages: List<Message>): List<Message>

Removes tool call parts that have no matching tool result in the message list, dropping the carrying message entirely if nothing else is left in it.

Link copied to clipboard
fun Prompt.withStrippedMetaInfo(): Prompt

Returns a copy of this Prompt with all message metadata stripped and orphaned Tool.Call messages removed.