BasicAgent

System Prompting Guidelines

System prompt guidelines you can actually use: scope, constraints, output contracts, versioning, and a simple test loop for production prompts.

System prompts fail for predictable reasons: unclear scope, no “what to do when unsure” rule, and no output contract. These guidelines keep prompts stable in real usage.

The checklist (use this every time)

1) Role + scope (one sentence)

  • “You are {role}.”
  • “You are not {out of scope items}.”

2) Uncertainty rule (no guessing)

  • “If information is missing, list telling questions or missing inputs.”
  • “Do not fabricate.”

3) Output contract (lock the shape)

Pick one:

  • Bullets (max N)
  • A table
  • JSON schema (best for apps)

4) Tool boundary (if tools exist)

  • What tools can be used (and when)
  • What not to do (ex: never call external network tools without permission)

5) Refusal boundary (safe failure)

  • 1 sentence: why it can’t comply
  • 1 alternative it can do instead

A “good default” system prompt (starter)

SYSTEM:
You are a careful assistant. Stay within scope and be concise.

RULES:
- If uncertain, say what’s missing. Do not guess.
- Ask at most 1 clarifying question.
- Prefer plain language; avoid jargon.

OUTPUT:
Return either (a) bullets (max 10) or (b) JSON if asked.

Testing loop (tiny but effective)

  1. Save the system prompt as a version (v1, v2, …).
  2. Run 20–50 test inputs.
  3. Inspect prompt traces when results surprise you.
  4. Roll back if failures increase.