A safe prompt tells a chatbot to use only supplied information and say when it cannot answer. For example, ask how many columns three temples have and instruct it to say so if the text does not provide the total. section 6.1.1
Prompt security
A safe prompt is an instruction that restricts a language model to supplied information and directs it to acknowledge when an answer is unavailable.
How AI Agents and Applications covers it
- How deep it goes
- Defines a brief instruction and demonstrates it with a factual question about information missing from the supplied text.
- Examples
- Uses a question about the total columns in three temples, where the text does not give the answer.
- What it assumes
- Assumes a supplied text and question, and demonstrates the instruction with a concrete example.
- What you can do after
- Apply it via an instruction to rely only on supplied information and acknowledge when the answer is unavailable.
- How it connects
- Connects prompt safety to Q&A chatbots, hallucinations, and retrieval-augmented generation.
Also explained in
-
Prompt Engineering in PracticePrompt security is the practice of protecting model behavior and sensitive information from attacks delivered through prompts or other model inputs.
Compare how 2 books explain prompt security →
Related concepts
- prompt engineeringuses · Prompt engineering is the deliberate design and refinement of instructions, context, examples, or other inputs to guide an AI model’s behavior or outputs.
- hallucinationaddresses · A hallucination is model-generated content that is false, fabricated, or unsupported by relevant evidence but presented as plausible or factual.
- system-level responsecontrasts with · A system-level response is a mitigation implemented in surrounding software, infrastructure, permissions, or operational controls rather than solely in prompt instructions.
- failure modeaddresses · A failure mode is a distinct way in which a system, component, process, or operation can fail or produce an undesirable result.
This explainer was generated by Manning's knowledge graph from the text of AI Agents and Applications. The section links point to the parts of the book it draws on.

