Mario Alexandre  ·  March 26, 2026  ·  sinc-llm prompt-engineering structured-prompts

I Treat My LLM Like a Genie (And It Fixed My Prompt Problems)

There is an old thought experiment about genie wishes. You make a wish. The genie grants it exactly. "I wish for a million dollars" and it lands on your doorstep, triggering an IRS investigation. "I wish for world peace" and humanity is instantly gone, which is technically peaceful. The genie gives you what you asked for. Not what you meant.

Language models work the same way. They are very literal. They give you exactly what your prompt asked for. Your prompt is written in plain language. Plain language has hidden ambiguity. The model picks one meaning, often not the one you intended.

Once I understood this, my prompts got better right away.

The Genie's Literal Mind

When I ask Claude "make the login faster", what does that mean? Faster how? Cache the session? Optimize the DB query? Remove validation steps? Return a 200 before the async work finishes? All of these make login "faster". The genie picks one.

If I am lucky, it picks the one I wanted. I am not lucky roughly 60% of the time based on my measurement. It picks a different one and I have to spend another exchange correcting it.

The fix is to make wishes that can only be read one way. Not by being wordy. Be specific about the things that matter.

Make login faster
Reduce P95 login response time by optimizing the auth token query. No changes to validation logic, no schema changes, no caching layer additions. Measure improvement with an EXPLAIN ANALYZE before/after.

The second version is longer for a good reason. I named the metric (P95), the method (query optimization), and three hard limits (no validation changes, no schema changes, no cache). The genie now has almost no room to go wrong.

sinc-LLM — the prompt is a wish; sinc structure makes it unambiguous
x(t) = Σ x(nT) · sinc((t - nT) / T)

CONSTRAINTS Are Your Wish Safeguards

In genie stories, the hero learns to add safeguards. "I wish for a million dollars, obtained legally, without harm to anyone, without triggering any legal investigation, deposited in my existing bank account." Each safeguard closes one hole the genie could use against you.

In sinc-LLM, that is the CONSTRAINTS band. It carries 42.7% of prompt quality weight in my measurements. That is more than PERSONA, CONTEXT, DATA, and TASK combined. Constraints are how you close the holes in your specification. The genie analogy explains exactly why.

Every constraint closes one way the model can go wrong. "No schema changes" blocks the migration path. "Tests must pass" blocks the refactor-everything path. "Response under 50 lines" blocks the long-explanation path. More constraints means fewer valid answers. Fewer valid answers means the model is more likely to pick the one you want.

FORMAT Is Your Output Shape

Another classic genie failure: you wish for gold and get a gold statue of yourself. You got gold. Just not the shape you wanted. FORMAT is how you tell the model what shape the output should take.

"Code diff" means a before/after diff, not an explanation of what to change. "Bullet list" means bullets, not flowing prose. "JSON schema" means a schema, not an example of JSON that matches it. If you do not specify FORMAT, the genie picks one. It usually picks prose. It is usually too long. It is usually not what you needed for your next step.

FORMAT carries 26.3% of quality weight in my measurements. It is the second biggest driver after CONSTRAINTS. Together they make up 69% of what makes a prompt response good or bad.

How the Auto-Scatter Hook Makes Wishing Easier

Writing perfect genie wishes every time is hard. In practice, when I am in the zone, I type "fix the login bug" and hit enter. I am not thinking about CONSTRAINTS and FORMAT. I am thinking about the problem.

The auto-scatter hook takes my rough wish and adds safeguards for me. It guesses the most likely constraints from context. It fills in the most likely format for the type of task. It adds persona and context from the project environment. Think of it as an interpreter who cleans up your wishes before the genie hears them.

The result: my exchange rate dropped from 4.2 to 1.6 responses per prompt. The hook costs $0.002 per call. It saves $0.08 per call. That is a 38x ROI. It is open source. Leave a comment and I will share the link.

// 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 →