Prompt construction for generation and repair cycles.
Builds structured prompts from specs and diagnostics.
Summary
Functions
Build initial generation prompt from a spec.
Build repair prompt from previous attempt and diagnostics.
Types
Functions
@spec build_initial(ExOutlines.Spec.t()) :: [message()]
Build initial generation prompt from a spec.
Converts the spec to a schema representation and constructs a prompt instructing the LLM to generate conforming JSON output.
@spec build_repair(String.t(), ExOutlines.Diagnostics.t()) :: [message()]
Build repair prompt from previous attempt and diagnostics.
Creates messages showing the validation failure and requesting correction. Returns messages to append to the conversation history.