Skip to main content

Module prompt

Module prompt 

Source
Expand description

Prompt hardening utilities.

Functionsยง

truncate_for_prompt
Truncate a string for safe embedding into LLM prompts.
wrap_untrusted
Wrap untrusted text in explicit XML-like tags to make the security boundary obvious to the model.