vitorpaulo.dev
Back to posts

The Agent Doesn't Know What You Want (And Neither Do You)

14 Oct 2026 · 7m · 404 views · 31 reactions

Vitor Paulo Vitor Paulo

AI

Some months ago, while working out, I remembered that I had run out of my energy drink stash and started wondering which supermarket I should stop by to buy a few cases. That's when I got the idea of creating a silly little script to search for products across supermarkets in my city.

I couldn't exactly write the script or come up with a prompt in the middle of the gym without interrupting my workout, so I came up with a simple idea. I thought it was kind of dumb when I sent it, but the results proved me wrong:

image.png

The Interview

Although I no longer have the exact prompt, I still remember the part I want to talk about. I recreated it just to have an example that I could break down into smaller parts:

We need a script that searches for prices across all supermarkets in Curitiba, Paraná, Brazil.

**Interview me about every decision and question until I approve the plan. Use the question tool in batches of 5.**

Providing Context

We need a script that searches for prices across all supermarkets in Curitiba, Paraná, Brazil.

This is the most common part of a prompt: it's the baseline context the agent will use to generate questions and come up with a realistic plan.

It's the bare minimum we can give the agent to keep it from hallucinating and questioning the morality of its own existence without any direction.

Making the Request

Interview me about every decision and question until I approve the plan.

This is where the idea behind this post comes into play: the agent will generate questions about how to execute the task based on the context we provided in the first line.

The advantage is that I don't have to think through every requirement before getting started. The agent uses the context to identify the decisions that still need to be made and helps me work through each one before moving on to implementation.

Since I asked it to build a supermarket script, it came back with relevant and fairly specific questions. I don't have all of them right now, but here are a few examples:

Question Answer Notes
Which language should I use to create the script? Node.js Easier to develop, run, and maintain in the future
Which supermarkets should be included in the search? Armazém do Seu Jura, Mercadinho do Doc Harris, etc. This caught my attention because it actually looked up supermarkets in Curitiba before asking me
Should we store prices for future comparisons? Yes, in CSV Makes development easier and provides additional information
What should we do if security measures block access? Skip it and notify the user Important to keep the agent from hallucinating and trying to bypass Cloudflare or reCAPTCHA

Of course, that doesn't mean the plan will be perfect. The agent can still miss important requirements or suggest decisions that don't make sense for the project.

The idea is to reduce assumptions and resolve as many relevant questions as possible before starting implementation.

What Is the Question Tool?

use the question tool in batches of 5

This is a more specific detail for OpenCode (and a few other platforms), since it provides a tool that allows the agent to ask the user questions directly.

This makes the interaction easier and helps you think through the best answer, since it usually provides multiple-choice questions and lets you write your own answer if none of the options fit:

image.png

But if your platform doesn't have a similar tool, you can simply remove that part and the agent will ask the questions directly in the chat. To be honest, I'd add something like this instead:

send me questions in batches of 5, each with 2–5 options to choose from

Why Five at a Time?

Sounds strange, right? You have a tool that lets you ask "infinite" questions, yet you decide to limit them to five per round?

The explanation is pretty simple. These are just precautions to avoid problems that could throw the entire strategy out the window:

  1. Losing progress: If you close the chat, the connection resets, or a timeout occurs, you might lose everything you've answered so far and have to spend more tokens while the agent asks you everything all over again.
  2. Keeping the context manageable: Asking the agent to generate too many questions at once can force it to come up with questions just to fill the quota. By keeping the batches smaller, we can get better, more focused questions.
  3. Avoiding human error: When faced with a huge questionnaire, there's a good chance you'll skip questions or answer without really thinking them through. Breaking it into smaller parts helps work around our very human nature.
  4. Responsiveness: This one is more personal, but I leave my agents running while I work out, travel, and so on. That means I use the web version on my phone quite a lot, and there's a very specific issue with OpenCode Web that makes it difficult to answer too many questions because of the responsive layout.

Why It Works

Imagine you've hired a new developer for your project. They get a task to add a feature: "smart supermarket search in Curitiba."

They'll probably manage to build something, but it won't necessarily be what you're expecting. Which supermarkets should they search? What should happen to the prices? Should prices be calculated per kilogram or per unit, or should we just compare the total price? And so on.

If you haven't provided that information, chances are they'll make those decisions on their own or come back and ask you. And the more important decisions they make without knowing what you actually want, the higher the chance they'll deliver something different from what you expected.

The same thing happens with agents. They can't read your mind, so they work with the context they've been given. To be honest, things can get even worse because some LLMs struggle to recognize when they don't have enough information to answer a question. Instead of admitting uncertainty, they may fill in the gaps with plausible answers that don't necessarily reflect reality.

The values are fictional and illustrative. They represent hypothetical scores for possible next tokens, not actual probabilities or a measure of confidence in the truthfulness of the answer.

When we ask the agent to interview us before getting started, we're trying to solve exactly this problem. Instead of leaving all those decisions implicit, we turn them into questions that we can answer and validate before implementation.

The Script

For anyone who's curious, the script works perfectly and actually does more than I originally wanted. It even has a feature to track price increases and decreases over the months.

The script even earned itself a spot in my personal agent, which I plan to explain in more detail in another post.

image.png

image.png

Conclusion

I know the situation I described shows a lazy approach to writing prompts for agents. I've even called this kind of thing lazy-prompts or lazy-agents before. But the truth is, this approach can be used in all sorts of contexts, and I've applied similar ideas in other projects myself, mainly as a fallback when I haven't explained something clearly enough or left out a detail.

The goal isn't to find a magic phrase that makes an agent think better, but to provide enough context for it to work toward what we actually need.



Comments