The Research Report
Your Prompt Playbook Is Wrong for Half Your Codebase
Chain-of-thought prompting is gospel in AI coding circles. "Think step-by-step" gets pasted into prompts like a lucky charm.
Johnathen Chilcher, a Senior Site Reliability Engineer at GoDaddy, tested that assumption. He ran 5,760 benchmarks across Python, Go, JavaScript, and C#. The results wreck the one-size-fits-all playbook.
Chain-of-thought improved C# code by +7.7 points and Go by +5.3 points on a 100-point correctness benchmark. It degraded Python by -0.5 points. Same technique. Opposite outcomes.
The lesson is simple. The language you are coding in changes what prompting works.
The Experiment
GoDaddy engineers use AI coding tools across every team. Chilcher wanted to know if prompt strategies that worked for Python tasks also worked for Go services and C# backends.
He expanded the benchmark suite from 12 Python tasks to 48 tasks across four languages. Each language got 12 equivalents: 4 code generation, 3 bug fixes, 3 refactors, and 2 instruction-following tasks. Task complexity was matched as closely as possible across languages.
He tested two prompting techniques:
- Chain-of-thought: adding "Think step-by-step before writing code" to every prompt
- Politeness: changing "Write a function that..." to "Could you please write a function that..."
Each experiment ran 2,880 times. Two variants across three Claude models (Haiku, Sonnet, Opus), 48 tasks, 10 repetitions each. The scoring rubric weighted test pass rate at 40%, code quality at 20%, complexity at 20%, and an LLM judge score at 20%.
All data is open source at github.com/jchilcher-godaddy/claude-benchmark.
Chain-of-Thought: The Language Flip
Here are the raw scores:
- Python bare prompt: 84.58
- Python with CoT: 84.05 (delta: -0.53)
- Go bare prompt: 74.75
- Go with CoT: 80.09 (delta: +5.34)
- JavaScript bare prompt: 71.74
- JavaScript with CoT: 73.46 (delta: +1.72)
- C# bare prompt: 62.21
- C# with CoT: 69.91 (delta: +7.70)
The pattern is stark. The lower the baseline score, the more CoT helps.
Python sits at 84.58 without any prompting tricks. Claude has seen mountains of Python training data. The model rarely botches Python idioms. Asking it to "think step-by-step" adds overhead without adding value. It is like giving a native speaker grammar worksheets.
C# is a different story. At 62.21 bare, Claude struggles with OOP patterns, LINQ syntax, and async/await structures. CoT acts as scaffolding. The model walks through patterns it does not internalize naturally. The +7.7 point jump is the largest gain in the dataset.
Go lands in the middle. Its explicit error handling and type system benefit from structured reasoning. CoT guides the model through boilerplate it has not memorized. The +5.3 gain is meaningful for production code.
JavaScript sees a modest +1.72 bump. The model has decent training exposure to JS, so CoT adds less marginal value.
All three models showed the same directional pattern. Haiku, Sonnet, and Opus all hurt Python with CoT and helped Go and C#. The magnitude scaled slightly with model size, but the direction was universal.
This is not a model quirk. It is a fundamental property of how LLMs handle prompting at different competence levels.
Politeness: The Other Flip
The politeness experiment produced a mirror pattern.
- Python imperative: 84.68
- Python polite: 84.40 (delta: -0.28)
- Go imperative: 75.68
- Go polite: 73.30 (delta: -2.38)
- JavaScript imperative: 71.48
- JavaScript polite: 74.23 (delta: +2.75)
- C# imperative: 61.94
- C# polite: 60.16 (delta: -1.78)
Polite framing helps flexible languages and hurts explicit ones.
JavaScript thrives on it. The language has multiple valid paradigms: functional, object-oriented, prototype-based. A softer "Could you please..." cue encourages the model to explore instead of defaulting to one pattern. The +2.75 gain is solid.
Go and C# suffer. Both languages prize directness and structure. "Could you please" adds ambiguity that conflicts with the explicit style. Go drops 2.38 points. C# drops 1.78 points.
Python stays neutral. The effect is small either way.
Why This Happens
Chilcher's hypothesis is straightforward. When a model is near its performance ceiling in a language, extra prompting adds noise. When it is far from the ceiling, structured prompting provides scaffolding.
Python is Claude's home turf. The ceiling is high. CoT and politeness are unnecessary ornament.
C# is Claude's weakest language among the four tested. The ceiling is low. CoT provides critical structure. Politeness adds confusion.
This explains why so much prompt engineering advice contradicts itself. One blog post says CoT is essential. Another says it is a waste of tokens. Both authors might be right. They just tested on different languages.
Task-Level Breakdown
The effects hold across task types with interesting variations.
Refactoring sees the biggest CoT gains in Go and C#. Refactoring is already the hardest task type. In languages where the model is less fluent, CoT provides structure for preserving behavior while changing code. C# refactoring with CoT jumps +7.9 points. Go refactoring jumps +5.2 points.
Instruction-following shows the biggest politeness sensitivity. JavaScript instruction tasks gain +3.0 points with polite framing. Go and C# instruction tasks lose the most, dropping 2.6 and 2.0 points respectively. When tasks require interpreting ambiguous requirements, softer framing helps flexible languages and hurts rigid ones.
Code generation splits the difference. C# code-gen with CoT gains +8.2 points, the single largest task-type effect in the study.
The Updated Playbook
Chilcher published language-specific recommendations based on the 5,760 runs:
Python: Keep it minimal. Use a persona if you want, but skip CoT. Politeness has mixed evidence (the original Python-only study showed +0.3, the cross-language study showed -0.28), so test it on your specific tasks. The model is already near its ceiling.
Go: Add a CoT prefix. "Think step-by-step before writing Go code." Skip polite framing. The explicit language benefits from structured reasoning and gets confused by soft cues.
C#: Add a CoT prefix. "Think step-by-step before writing C# code." Skip politeness. This is where CoT pays the biggest dividends. The model needs scaffolding for OOP patterns and LINQ.
JavaScript: Use polite framing. "Could you please..." Skip CoT unless the task is highly algorithmic. The language's flexibility benefits from exploratory cues. CoT helps modestly (+1.72) but may not justify the token cost.
What This Means for Teams
Most engineering organizations run multiple languages. A backend team might use Go. A data team uses Python. A frontend team uses JavaScript. A legacy system runs on C#.
If you are using the same prompt template for all of them, you are leaving quality on the table.
The fix is not complicated. Create language-specific prompt variants in your AI coding workflow. Store them in your project templates or CLAUDE.md files. The open-source claude-benchmark tool can test your own configurations across languages.
The bigger implication: stop treating prompt engineering as a universal skill. It is a context-specific skill. The context includes the model, the task, and now we know it includes the programming language.
Limitations
Chilcher is transparent about the study's limits.
The 2,880 runs per experiment is smaller than his dedicated Python-only studies, which ran 10,800 each. The effects are clear, but more data would tighten confidence intervals.
Task equivalence across languages is approximate. A Python list comprehension is not exactly a C# LINQ query. Perfect matching is impossible.
Go's lower baseline scores might partially reflect rubric bias. The scoring system was developed on Python tasks and adapted for other languages.
Only Claude models were tested. GPT-4 or Gemini might show different language competence profiles and different prompting sensitivities.
Only CoT and politeness were tested. Other techniques (personas, anchoring, step-back prompting) might show different cross-language patterns.
The Bottom Line
5,760 benchmarks produced a single clear finding. Language is the biggest moderator of prompt effectiveness.
The prompting advice that gets retweeted on Tech Twitter was probably tested on Python. That does not make it wrong. It makes it incomplete.
If your team ships code in more than one language, tune your prompts per stack. Your C# service needs CoT scaffolding. Your Python scripts need minimal interference. Your JavaScript frontend benefits from a softer tone.
One playbook does not fit all stacks. The data proves it.
Citations
- GoDaddy blog post: "Chain of Thought Helps Go and C# But Hurts Python: When Prompt Advice Flips by Language" by Johnathen Chilcher, May 20, 2026. URL: https://www.godaddy.com/resources/news/chain-of-thought-helps-go-and-c-but-hurts-python-when-prompt-advice-flips-by-language
- Full experiment writeup with all data tables: "CoT Helps Go and C# But Hurts Python: When Prompt Advice Flips by Language (5,760 Benchmarks)" by Johnathen Chilcher, TechLoom, May 2026. URL: https://techloom.it/blog/cross-language-revisits-experiment/
- Open-source benchmarking tool: claude-benchmark, GitHub repository jchilcher-godaddy/claude-benchmark. URL: https://github.com/jchilcher-godaddy/claude-benchmark
- Original Python-only chain-of-thought experiment showing CoT hurts Python: https://techloom.it/blog/chain-of-thought-experiment/
- Original Python-only politeness sweep showing polite framing helps Python: https://techloom.it/blog/politeness-sweep-experiment/
Suggested Title
Your Prompt Playbook Is Wrong for Half Your Codebase
Word Count
1,487 words (body text only)
Fact-Check Notes
- All benchmark numbers (5,760 runs, +7.70 C#, +5.34 Go, -0.53 Python, +1.72 JavaScript) come directly from the TechLoom experiment writeup. Verify against the original data tables if publishing.
- The GitHub repo URL is github.com/jchilcher-godaddy/claude-benchmark per the GoDaddy blog. Note: a similar repo exists at github.com/jchilcher/claude-benchmark (3 stars). Confirm which is the canonical open-source release before linking.
- Politeness numbers (-2.38 Go, +2.75 JS, -1.78 C#, -0.28 Python) are from the same cross-language experiment.
- Model names referenced are Haiku, Sonnet, Opus (Claude family). Confirm current Anthropic model naming if including in published version.
- The scoring rubric breakdown (40/20/20/20) is from the GitHub repo README, not the blog post.
- Task-type breakdown tables (code-gen, bug-fix, refactor, instruction) are from the TechLoom writeup. Numbers are approximate from visual table parsing; verify exact values from source data files if precision matters.