DEV Community

brian austin
brian austin

Posted on

I built a system prompt that makes Claude explain its reasoning. Here's the code. #openclawchallenge

I built a system prompt that makes Claude explain its reasoning. Here's the code.

This is my entry to the #openclawchallenge — the challenge about what AI should and shouldn't say about humans.

Most developers interact with Claude like a vending machine: put question in, get answer out.

But what if you could make Claude show its work — not just what it decided, but why?

I spent a week building a system prompt that forces Claude to reason transparently before every response. Here's what I learned.


The problem with black-box AI responses

When Claude (or any LLM) gives you an answer, you're seeing the output — not the process.

This matters especially for the #openclawchallenge question: what should AI say or not say about humans?

If Claude refuses something, it should be able to tell you why. If it complies, it should be able to explain its reasoning. Black-box refusals are just as problematic as black-box approvals.


The system prompt (copy-paste this)

You are a transparent reasoning assistant. Before every response:

1. THINK: Identify what the user is actually asking (not what they literally said)
2. CONSIDER: What assumptions am I making? What context am I missing?
3. EVALUATE: Is there anything in this request I should flag or clarify?
4. RESPOND: Give the actual answer
5. REFLECT: In one sentence, what did I just decide and why?

Format your reasoning in <think> tags that appear BEFORE your main response.
Keep <think> blocks honest and short — 2-4 sentences max.
Do not perform reasoning. Actually reason.
Enter fullscreen mode Exit fullscreen mode

Working Python implementation

import requests
import json

SYSTEM_PROMPT = """
You are a transparent reasoning assistant. Before every response:

1. THINK: Identify what the user is actually asking (not what they literally said)
2. CONSIDER: What assumptions am I making? What context am I missing?
3. EVALUATE: Is there anything in this request I should flag or clarify?
4. RESPOND: Give the actual answer
5. REFLECT: In one sentence, what did I just decide and why?

Format your reasoning in <think> tags that appear BEFORE your main response.
Keep <think> blocks honest and short - 2-4 sentences max.
Do not perform reasoning. Actually reason.
"""

def ask_claude(user_message, api_key):
    response = requests.post(
        "https://simplylouie.com/api/chat",
        headers={
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json"
        },
        json={
            "messages": [{"role": "user", "content": user_message}],
            "system": SYSTEM_PROMPT
        }
    )
    return response.json()["content"]

def parse_response(raw):
    """Split think block from main response"""
    if "<think>" in raw and "</think>" in raw:
        think_start = raw.index("<think>") + 7
        think_end = raw.index("</think>")
        thinking = raw[think_start:think_end].strip()
        answer = raw[think_end + 8:].strip()
        return thinking, answer
    return None, raw

# Example usage
api_key = "your_simplylouie_key_here"

test_questions = [
    "Who is a better programmer, Alice or Bob?",
    "Should I fire the developer on my team who asks too many questions?",
    "Write a performance review for someone named Sarah"
]

for question in test_questions:
    raw = ask_claude(question, api_key)
    thinking, answer = parse_response(raw)

    print(f"Q: {question}")
    if thinking:
        print(f"🤔 Reasoning: {thinking}")
    print(f"💬 Answer: {answer[:200]}...")
    print("---")
Enter fullscreen mode Exit fullscreen mode

What I found (and why it matters for the challenge)

When I ran those three test questions, Claude's reasoning blocks revealed something interesting:

Question 1 (Alice vs Bob): Claude's <think> block said: "The user is asking me to make a comparative judgment about two people I have no information about. I'm going to decline the comparison but offer to help evaluate their actual work."

Question 2 (firing someone who asks questions): Think block: "This is a management question framed as a binary. The user may be frustrated, but the actual question is about performance evaluation. I should address the frustration, not just give a yes/no."

Question 3 (Sarah's performance review): Think block: "The name Sarah is irrelevant to this task. I'll write a template that focuses on observable behaviors, not personality."

The pattern: Claude is constantly making decisions about humans that users never see. The transparent reasoning system prompt makes those decisions visible.

This is directly relevant to the #openclawchallenge — the question isn't just what AI says about humans, it's whether AI can be accountable for how it decides.


Why this matters globally

I built this on top of SimplyLouie — a $2/month Claude API wrapper.

Why does cost matter here? Because transparent AI reasoning should be accessible to developers everywhere — not just the ones who can afford $20/month subscriptions.

A developer in Lagos or Manila or Jakarta shouldn't have to choose between "I can afford the API" and "I understand what the AI is deciding about people."

Country ChatGPT Plus SimplyLouie Savings
Nigeria N32,000/month N3,200/month 90%
Philippines P1,120/month P112/month 90%
Kenya KSh2,600/month KSh260/month 90%
India Rs1,600/month Rs165/month 90%

The key question for the challenge

The #openclawchallenge asks what AI should say (and not say) about humans.

My take: AI should always be able to explain why it said what it said about a human. Black-box decisions — whether refusals or approvals — are the real problem.

The system prompt above is my working answer to that.

What's your system prompt for AI transparency? Drop it in the comments — I'll test the best ones.

Top comments (0)