How to Prompt Claude for the Best Results, According to Anthropic Engineers

How to Prompt Claude for the Best Results, According to Anthropic Engineers

Ondřej Barták
Ondřej Barták
Entrepreneur and Programmer
7. 7. 2026
4 minutes reading
How to Prompt Claude for the Best Results, According to Anthropic Engineers

The difference between a terrible and a great response from Claude usually does not come down to the model, subscription plan, or any secret trick. It lies in how clearly you describe what you actually want. That is the foundation of both Anthropic’s official guide and the advice circulating among developers. And one of the engineers working on Claude Code came up with an approach that would not occur to most people: instead of refining the prompt yourself, you let the AI interview you.

AI infers less than you might expect

In its guide, Anthropic compares Claude to a smart but new colleague. It can do many things, but it does not know your habits or the context in which you work. The more precisely you describe what you want from it, the better the result you will get back. The company adds a simple benchmark it calls the golden rule: show your prompt to a colleague who knows almost nothing about the task and ask them to follow it. If they are confused, Claude will be confused too.

In practice, this means stating up front what format the response should take and what constraints it should follow. If the order or completeness of the steps matters, it is worth writing them as a numbered list. And if you expect something beyond the ordinary from the model, tell it directly. It will not infer that from a vague prompt on its own.

It also helps to include the reason behind an instruction. When Claude knows why you want something, it can more easily infer things you did not explicitly mention, and the response will better suit what you need it for.

Provide an example and assign a role

Examples are the most reliable way to guide the model toward the desired format, tone, and structure. Anthropic recommends including three to five of them and choosing ones that closely resemble your actual task while also covering edge cases. This prevents the model from picking up on some incidental pattern you did not intend. It is also useful to wrap each example in an <example> tag so that Claude does not confuse it with the instructions themselves.

The same logic applies to structuring the entire prompt with XML-style tags. When you combine instructions, context, examples, and input data in a single prompt, separate tags such as <instructions>, <context>, or <input> significantly reduce the risk of the model misunderstanding something. Assigning a role also works. A single sentence in the system prompt—for example, that Claude is an experienced Python programming assistant—is enough to align its tone and behavior with what you need from it.

Tell the model what to do, not what not to do

Anthropic points out one common bad habit. People often tell the model what to avoid, even though the opposite approach works better. Instead of “don’t use markdown,” it is more effective to say “write continuous prose in flowing paragraphs.” The model is more likely to follow a positively worded instruction than a prohibition.

Anyone working with long documents should place them at the beginning of the prompt, before the question and instructions themselves. According to Anthropic’s tests, placing the query after extensive data can improve response quality on complex multi-document tasks by tens of percent. With lengthy texts, it is also useful to have Claude first extract the relevant passages and only then tackle the task itself, helping it work through the noise in the rest of the document.

Let Claude interview you

At the end of December 2025, Thariq, who works on the Claude Code team, shared a process that prompted many developers to immediately rethink their approach. He described his favorite way to build large features: start with a minimal brief or prompt and let Claude interview you using AskUserQuestion, a tool built directly into Claude Code. Only then do you start a new session that creates everything according to the prepared specification.

You do not have to anticipate every requirement in advance. Claude was trained on millions of software projects and already knows which edge cases may arise. It presents them to you as questions. For a login system, for example, it might ask which authentication methods you want to support or whether sessions should persist after the browser is closed. You respond conversationally and do not have to think of everything ahead of time.

Claude as a teacher

The same follow-up questioning tool can be applied elsewhere as well. Thariq shared a prompt from his colleague Suzanne at Anthropic that turns Claude into a teacher. The model maintains an ongoing list of what you should understand: what the problem was and why it arose in the first place, what the solution looks like and which decisions underpin it, and what impact it has. It then asks you to repeat what you understood in your own words and fills in the gaps. As needed, it explains the material as if you were five, fourteen, or a new intern.

Then comes the test. Claude asks you questions through AskUserQuestion, shuffles the answers, and does not let you peek ahead. The final line of the prompt holds the entire process together: the session must not end until the model has verified that you have truly mastered everything on its list.

Sources: claude.com and github.com

Category:AI
Did you enjoy this article?
Discover more interesting posts on our blog
Back to blog

Related posts

Altman Announced the Singularity Days After His Models Escaped the Lab on Their OwnAltman Announced the Singularity Days After His Models Escaped the Lab on Their Own
OpenAI chief Sam Altman declared on the Relentless podcast that humanity has already entered the singularity. “We’re like, in the singularity now,” he said verbatim. For decades, the term belonged more to science-fiction literature
6 min read
28. 7. 2026
AI Remixed a Madonna Song—and Now It Tops the Charts in Australia. Musicians Are Furious.AI Remixed a Madonna Song—and Now It Tops the Charts in Australia. Musicians Are Furious.
Since April, Australian radio has been playing a dance remake of Madonna’s hit Like a Prayer on repeat. Released by Queensland DJ Josh Fawaz, it tops the radio airplay chart and has 35 million Spotify streams.
6 min read
28. 7. 2026
Claude Opus 5 Built a Shooter from Scratch. What Can Claude of Duty Do?Claude Opus 5 Built a Shooter from Scratch. What Can Claude of Duty Do?
A first-person shooter that runs directly in the browser, with its own physics and eleven separate code modules. Around 55,000 lines in total, split across eleven subsystems and built on Thr
4 min read
28. 7. 2026
Přihlaste se k odběru našeho newsletteru
Zůstaňte informováni o nejnovějších příspěvcích, exkluzivních nabídkách, a aktualizacích.
CodedTrip

Operated by CodedTrip LLC, USA.

YouTube
TikTok