Expand description
The shared prepared semantic request (Prompt Precision route carry).
One profile document — the same JSON shape the POET HTTP API accepts under
conditioning — is persisted at {storage}/conditioning/active-profile.json
and compiled per turn by the core compiler
(poet_llm_conditioning::prepare_conditioned_prompt). Every product route
then lowers the same plan:
- native / orchestrated chat: the rendered envelope is prepended to the augmented prompt before decode;
- Ollama: the envelope travels in the native
systemrole field, with the output budget carried asnum_predict; - remote MCP:
lower_mcp_tool_argumentsproduces structured or flattened tool arguments with an explicit role-degradation receipt.
“Same request” means same logical plan and traceability — wire syntax differs per backend capability and receipts say so honestly.
Structs§
- Prepared
Route Receipt - Per-route lowering receipt attached to inference results.
routeis"native","orchestrated","ollama","remote_mcp"or"http";role_moderecords how the request reached the backend:"envelope"(merged into the prompt text),"system"(dedicated role field),"structured"(separate MCP arguments) or"flattened"(single argument). - Prepared
Semantic Request - One compiled semantic request — route-neutral plan receipt plus the rendered request text the compiler produced for it.
Constants§
Functions§
- activate_
profile - Validate a profile by compiling it once against an empty context, then persist it as the active profile shared by all inference routes. Returns the probe plan receipt.
- active_
profile_ path - Active profile path.
- active_
profile_ status - Current activation state for status surfaces.
- deactivate_
profile - Clear the active profile. Returns whether a profile was present.
- load_
active_ profile - The persisted active profile document, if present and well-formed JSON.
- prepare_
active_ semantic_ request - Compile the persisted active profile for this turn.
Ok(None)when no profile is active — routes keep their legacy shape. - prepare_
semantic_ request - Compile one profile document against one request. Never silently rewrites: failures mean the declared profile cannot run, so callers fail closed instead of dropping enforced requirements.