Skip to main content

bootstrap_prompt

Function bootstrap_prompt 

Source
pub fn bootstrap_prompt(persona_description: &str) -> String
Expand description

Generate a calibration prompt for bootstrapping a persona lexicon via an LLM.

Pass the returned string to any LLM. The model’s response will be a fenced TOML block suitable for parsing with [super::ConfigLexiconScorer::from_str] or saving to disk for super::ConfigLexiconScorer::from_file.

CF provides the calibration baseline; the caller is responsible for making the LLM call and persisting the result. Extract the TOML from inside the fenced block before parsing.

§Example

use context_forge::lexicon::bootstrap_prompt;

let prompt = bootstrap_prompt("A Space Marine Chaplain from Warhammer 40k");
assert!(prompt.contains("Space Marine Chaplain"));
assert!(prompt.contains("0.0, 1.5]"));