ClearFox logoClearFox
← All docs

Writing Prompts

How to write system prompts for ClearFox agents.

Writing Prompts

Markdown in system prompts

  1. 1

    Every prompt editor in ClearFox — Profile → Personal System Prompt, Admin → LLMs → Company Context, Admin → Roles → Custom System Prompt, Admin → Integrations → System Prompt, and Agents → Task — accepts Markdown. The text is sent to the model exactly as you typed it; the editor only adds syntax highlighting so structure is easier to see while writing.

  2. 2

    Modern LLMs (Claude, GPT, Gemini, Grok) treat Markdown as semantic structure, not decoration. Headings group related instructions, lists improve step-by-step adherence, fenced code blocks separate examples from instructions, and bold raises the weight of a phrase. Both Anthropic and OpenAI recommend structuring system prompts this way.

  3. 3

    Use level-2 headings (##) for sections. The model uses them as anchors and is more likely to satisfy every section.

    ## Role
    You are a senior PPC analyst.
    
    ## Goal
    Find ad groups where CPA is 2× the account average.
    
    ## Output
    A markdown table with ad group, spend, CPA, and a one-line recommendation.
  4. 4

    Use bullet or numbered lists for steps and rules. Numbered lists are stronger for ordered procedures; bullets for non-ordered constraints.

    ## Steps
    1. Pull the last 30 days of campaign data.
    2. Compute account-average CPA.
    3. Flag ad groups ≥ 2× average.
    
    ## Rules
    - Never include paused ad groups.
    - Cite source rows by id.
  5. 5

    Use fenced code blocks (```) for examples, schemas, and verbatim text the model should copy. The model reliably treats their content as data, not instructions — a useful fence against accidental prompt injection in pasted samples.

    ## Output schema
    ```json
    { "ad_group": "string", "cpa": "number", "recommendation": "string" }
    ```
  6. 6

    Use **bold** sparingly to mark non-negotiable rules or critical numbers. Overuse dilutes the signal — if every line is bold, none of them is.

    - **Always** use the company’s display currency.
    - *Prefer* short summaries when the user did not ask for detail.
  7. 7

    Use inline `code` for tool names, field names, exact values, and identifiers. This stops the model from translating or paraphrasing them.

    Call <code>`search_orders`</code> with <code>`status: "shipped"`</code>, never with localised words like &ldquo;shipped&rdquo; or &ldquo;отгружено&rdquo;.
  8. 8

    Pitfalls to avoid:

    • Don't mix three heading levels in a short prompt — pick <code>##</code> and stop.
    • Don't bury key constraints in a wall of paragraph text — break them into a bulleted "Rules" section.
    • Don't write very long single sentences ending with semicolons; split them into list items.
    • Don't indent code blocks with leading spaces inside lists — keep fences flush left so the markdown parser doesn't treat them as nested code.
  9. 9

    Need help structuring an existing prompt? On the agent edit screen, click Improve with AI on the right side of the page. ClearFox sends your task plus the runtime context (model, sources, triggers) to the LLM and returns a properly structured Markdown rewrite plus up to three actionable recommendations. Use Investigate on a failed run to do the same with the run transcript as additional context.