home/business/prompting

PROMPTING

GPTClaudeGemini··898 copies·updated 2026-07-14
prompting.prompt
# Prompting for Sentinel Blocks

The parser is only half the system. The other half is telling the model to emit
blocks in the first place. This is the *strategy* that makes extraction trivial.

## The three rules

1. **Blocks only.** The model replies *only* with sentinel blocks — no prose before
   the first block or after the last. (If you do want a chat-style preamble, that's
   fine: extraction ignores anything outside the blocks. But for machine pipelines,
   "blocks only" is the cleanest contract.)
2. **JSON carries data, never code.** A `<<<JSON>>>` block contains a single JSON
   object with *data only*. No source code, no markdown, no ```` ``` ```` fences.
3. **Code and long text get their own block.** Anything that would need escaping —
   source files, logs, diffs, multi-line strings — goes in a named block like
   `<<<FILE path>>> … <<<END>>>`, taken verbatim.

Rule 2 + 3 together remove the single most common failure: **unescaped code inside a
JSON string**. If there's no code in the JSON, there's nothing to break the JSON.

## A reusable system-prompt block

when to use it

Community prompt sourced from the open-source GitHub repo Eth-Interchained/sentinel-blocks (GPL-3.0). A "PROMPTING" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

businesscommunitygeneral

source

Eth-Interchained/sentinel-blocks · GPL-3.0