PromptAugmenter

fun interface PromptAugmenter(source)

Interface for augmenting prompts with relevant context retrieved from memory.

Implementations define how retrieved context is inserted into the prompt. Two built-in implementations are provided:

Can also be implemented as a lambda thanks to the fun interface declaration:

val custom = PromptAugmenter { prompt, context ->
// custom augmentation logic
prompt
}

See also

Inheritors

Types

Link copied to clipboard
object Companion

Companion object with constants, static methods, and builder entry point.

Functions

Link copied to clipboard
abstract fun augment(originalPrompt: Prompt, relevantContext: List<SearchResult>): Prompt

Augments the given prompt with relevant context.