Skip to content
sinc-LLMBook a 30-minute call

Engineering reference

The Mathematician, the Engineer, and the Prompt

A first-person task example comparing mathematical and engineering roles and the sequence used to assign them.

By Mario Alexandre March 30, 2026 6 min read OrchestrationExamples

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.

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.

The two-step example separates mathematical formulation from engineering implementation. Check the handoff between roles and verify each result; assigning roles does not guarantee that either step is correct.

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.

Review a prompt using six specification fields

Try sinc-LLM Free

Or install: pip install sinc-llm

// Production AI Engineering

Build AI systems that hold up in production.

sinc-LLM designs, audits, and stabilises production AI infrastructure: from vendor evaluation and cost accountability to incident controls and MCP architecture.

See what we do →
Original source record

sinc-LLM About Blog Services