Write the Intent Before the Prompt
When an agent does badly, the prompt is often fine. Write one sentence of intent first, then answer five questions: workflow, boundary, knowledge, cost, trust.
I helped my team design a knowledge base agent. Its job was to collect knowledge that sat in code, documents, and chat history. After I wrote the first goal, I added a note next to it: “The purpose is still not clear enough.”
That note reminded me of something. When an agent does badly, the prompt is often fine. The real problem is that nobody said clearly why the agent exists.
Intent, plus five questions
The intent is one sentence: “This agent exists so that someone can do something.” With that sentence in hand, answer the five questions from the talk by 「大大帶我飛」:
How I found the intent
I did not rewrite the goal directly. First, I listed what each kind of user wanted from the agent. The people who write code wanted it to read code and logs. The people who maintain knowledge wanted one source of truth and access control. The people who only look things up wanted answers that were current, correct, and sourced.
After that list, the intent became clear. Each need also fell into one of the five questions. After that, it was much easier to decide which steps become scripts and which go to the LLM. I cover that step in Agent Design Is the FR/NFR Split.
Exercise
Someone asks, “Why did the activation rate of new users drop last week?” The agent must find the data definition and query the related tables. Then it writes SQL, checks the result, and sums up the conclusion and its limits. Write one sentence of intent first. Then use the five questions to design the smallest version that works.
If you cannot write one sentence of intent, you are not ready to write the prompt.
References:
- A talk by 「大大帶我飛」
Related: see how a clear intent drives the FR/NFR split, or go back to the series overview: Design an Agent.