Short answer

A deep guide that combines prompt delimiters, JSON Schema output contracts, and human-approved AI red-team review in one auditable workflow.

01

Design instructions and data as separate channels

A RAG document, support ticket, or user passage is data even when it contains language that looks like an instruction. A random explicit delimiter marks the boundary, while the governing rule states that commands inside are not executed, secrets are not disclosed, and ambiguity pauses the workflow.

A delimiter is not a firewall. Tool allowlists, narrow parameter schemas, read-only defaults, output limits, and human approval before consequential actions all belong to the same threat model.

  • Never merge untrusted content into system instructions.
  • Allowlist tools and parameters.
  • Use synthetic data and rollback plans in tests.
02

Bind output to a machine-checkable contract

Asking for JSON alone does not control field names, types, or extra commentary. A closed-object schema exposes required fields, data types, and the additional-property policy. Parse the response as JSON, validate it against the schema, and explain failures to the user.

A schema derived from fields is not a business rule. Currency, dates, enums, relationships, and authorization constraints need separate definitions; schema-valid output still requires impact review.

03

Run red-team cases with evidence and versions

A useful checklist covers leakage, excessive agency, false certainty, malformed input, undo, log minimization, and approval bypass—not only jailbreak phrases. Record expected safe behavior, observed output, model and prompt version, date, and reviewer for every case.

One clean run is not assurance. Repeat normal, boundary, abuse, and regression cases when versions change. Heuristics prioritize review; authorized human evaluation makes the release decision.

  • Make every finding reproducible.
  • Tie results to model and prompt versions.
  • Stop release on consequential failures.
RELATED TOOLS

Put this guide into practice

105Prompt Boundary & Delimiter BuilderBuild explicit data boundaries that separate untrusted content from instructions.106Structured Output Schema BuilderTurn field definitions into JSON Schema and a model output contract.107AI Red-Team Checklist BuilderCreate a risk-based, traceable test checklist for an AI use case.
Editorial method

Content is checked against visible ByteQuant product behavior and the listed primary sources where available. It is general information, not legal or security advice.

Turn guidance into action

Start working on-device with 131 tools

Explore tools