Skip to main content

Module poet_llm_conditioning

Module poet_llm_conditioning 

Source
Expand description

Request-boundary lowering for Prompt Precision local-model calls.

Structs§

PreparedPrompt
The compiled+rendered result of one profile against one request. plan_id/profile_id are None for the no-conditioning legacy path.
PromptConditioning
An owned, cold-boundary profile. It is compiled into caller-buffered plan data before inference starts; no profile changes the original request.
PromptConditioningBudget
PromptEvidence
PromptRequirement

Functions§

prepare_conditioned_prompt
Route-agnostic preparation: compile the same profile document for any inference route (HTTP, desktop chat, Ollama, remote MCP). prompt is the raw user request — used as the objective when the profile omits one — and graph_context supplies the fallback allowed-scope hash.
prepare_prompt
Compile and render the semantic profile into the precise prompt consumed by local inference. The returned receipt makes the applied plan inspectable. Thin adapter over prepare_conditioned_prompt — identical semantics to the shared route-agnostic entry point.