The Mathematician, the Engineer, and the Prompt
The Task
I had a job to do. Take a number from a client. Do some math on it. Use the answer as a price in a software system. Sounds easy. I wrote a prompt. The model wrote code. The code ran. But the math was wrong.
Not big wrong. Small wrong. The tricky edge cases were missed. The precision was not set. The rounding was off. The code looked great. The math formula was bad.
Two Brains, One Prompt
I needed two kinds of thinking for this job. I only asked for one. I asked for an engineer. The engineer wrote code. Good code. But the engineer had to guess at the math. I never gave them a math spec to follow.
On a real team, the mathematician sets the formula first. What goes in. What math to do. How precise. What happens at the edges. Then the engineer takes that spec and builds it exactly. No guessing. Just code that follows a proven formula.
I skipped the mathematician. I went straight to the engineer. So the engineer made up a formula on the spot. It seemed okay. It was wrong for my case.
The Correct Sequence
Now I use two steps. First prompt: you are a mathematician who works on pricing models. Here are the rules. Write the formula. List the edge cases. Set the precision. Set the rounding rules. Give me a math spec so clear that an engineer can build it without any math guesswork.
Second prompt: you are a senior Python engineer. Here is the math spec. Build it exactly as written. Do not change the math. Do not simplify it. Do not guess about edge cases. The spec is complete. Just build it.
This two step process works every time. Not because the model got smarter. Because each role did what it is good at. The mathematician did math. The engineer did engineering. Neither one had to guess about the other’s job.
The Principle
When a job needs more than one kind of skill, use more than one prompt. Each prompt uses one kind of brain. Each brain finishes its work before passing it on. The result is not a mix of two half efforts. It is a chain. Each link is a specialist doing one thing well. That chain gives you results a single all purpose prompt never can.
Transform any prompt into 6 Nyquist-compliant bands
Try sinc-LLM FreeOr install: pip install sinc-llm