<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to write a good prompt for the agent]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1791887717015-thumbnail-agent-ai.png" alt="Agent and the AI module in BAS" class=" img-fluid img-markdown" /></p>
<p dir="auto">Prefer to watch? It's all in my YouTube video, it's available in English, Hindi and Turkish: how I wrote the prompt for the Steam parser <a href="https://youtu.be/EY2B457MBJo?t=1219" rel="nofollow ugc">from 20:19</a>, and the breakdown of what a prompt should be made of <a href="https://youtu.be/EY2B457MBJo?t=1738" rel="nofollow ugc">from 28:58</a></p>
<p dir="auto">All the materials for the video are on my Telegram channel, come join: <a href="https://t.me/mustangbas" rel="nofollow ugc">t.me/mustangbas</a></p>
<h3>Plan</h3>
<ol>
<li>What happens with a bad prompt</li>
<li>How to put a prompt together</li>
<li>How I wrote the prompt for the Steam parser</li>
<li>What the agent did with that prompt</li>
<li>What to do if it's unclear how to write the prompt</li>
<li>Conclusion</li>
</ol>
<h3>What happens with a bad prompt</h3>
<p dir="auto">People are used to writing a neural network a tiny prompt of a couple of lines. The big frontier models are good at this: they can finish part of the work on their own. And they can also get skills that ask questions about the project by themselves</p>
<p dir="auto">Frontier models will still fill in the gaps though. Whatever we didn't tell them, they just decide for us, and honestly, that's how all models work. If the prompt is bad, even they will get things wrong anyway, and the project, in short, may not come out the way we wanted</p>
<p dir="auto">Here's an example with the Steam parser. I wrote straight out that every category needs its own folder with a .csv file. If I hadn't written that, it could easily have saved everything into one big text file, and going through that would be as inconvenient as it gets</p>
<p dir="auto">That's why a prompt is better put together by a few rules, and I'll go through them below</p>
<h3>How to put a prompt together</h3>
<p dir="auto"><img src="/assets/uploads/files/1791886992288-02-02-art02-prompt-en.png" alt="The four parts of a prompt and how they fit into my prompt for the Steam parser" class=" img-fluid img-markdown" /></p>
<p dir="auto">For the agent to understand everything, the prompt needs four parts, step by step:</p>
<ol>
<li>Context: what this project is and what it does. So literally tell it what the project does and what's in it. This step is also a kind of insurance: if something goes wrong in the other points, the agent can at least somehow put it all together</li>
<li>What needs to be done: the task itself, directly and step by step. If it's vague, the agent can basically wander off somewhere else in no time</li>
<li>What should come out: what result is needed at the end. It's better to really spell out the format, otherwise the agent will decide on its own where and how to save everything</li>
<li>What must not be changed: this one is for an existing project. Here we can simply forbid the agent to touch some action or setting</li>
</ol>
<p dir="auto">The first three points are the base, and they basically decide whether the prompt turns out good or not, and with it a good result</p>
<p dir="auto">Why spell it out in so much detail. The model doesn't know what's in our head. Anything that isn't in the prompt, it either makes up on its own or, and this happens more often, just doesn't do. On top of that, the agent's model isn't the very top one, so everything that matters really has to be spelled out here</p>
<h3>How I wrote the prompt for the Steam parser</h3>
<p dir="auto">Before writing anything, I went to the Steam discounts page and just looked at how it's built. I decided to explain the Show More button, which loads more games, separately, because the agent could easily get confused by it</p>
<p dir="auto">I dictated the prompt itself by voice so the agent would build me the project. In the end it included:</p>
<ul>
<li>the link to the page and a request to analyze it</li>
<li>the data format Name Game|Discount|Price</li>
<li>a separate folder for every category, with a .csv in it</li>
<li>a resource with filters and three categories, which can be changed later</li>
<li>what to do with the Show More button</li>
</ul>
<p dir="auto"><img src="/assets/uploads/files/1791886992464-02-03-01-steam-prompt.png" alt="My prompt for the Steam parser: data format, a folder per category, filters, categories and the Show More button" class=" img-fluid img-markdown" /></p>
<h3>What the agent did with that prompt</h3>
<p dir="auto">It built the resources exactly by the prompt, and even added hints to the fields by itself</p>
<p dir="auto"><img src="/assets/uploads/files/1791886992486-02-04-02-steam-resources.png" alt="Resources the agent added by itself from the prompt: three categories and a filter with hints" class=" img-fluid img-markdown" /></p>
<p dir="auto">When it was testing, it picked Video Production and clicked that same Show More button I had described. In the end we got three folders, a CSV in each, and all the games in the format I had specified</p>
<p dir="auto">I didn't mention multithreading in the prompt, and the agent did all the work in one thread, just with loops</p>
<p dir="auto">For the Steam login I wrote separately that it should get the fingerprint in a While loop with error handling. And it really did that, exactly the way I wrote it</p>
<p dir="auto"><img src="/assets/uploads/files/1791887013857-02-05-05-fingerprint-loop.png" alt="The loop with retries for getting the fingerprint that I asked for directly in the prompt" class=" img-fluid img-markdown" /></p>
<p dir="auto">In the same prompt I pointed to the folder with all the data for the resources, and the agent filled in all the fields by itself</p>
<h3>What to do if it's unclear how to write the prompt</h3>
<p dir="auto">Sometimes it's not clear how to write the prompt right or how to build the project at all. Then we can ask the agent to first write a plan of how it sees the situation, and decide what to do next based on that</p>
<p dir="auto">That's exactly what I did on another developer's big 6500-action project. I basically described to the agent everything I wanted:</p>
<ul>
<li>split everything into functions</li>
<li>remove duplicates</li>
<li>label the actions in Russian</li>
<li>suggest proper names for the functions</li>
</ul>
<p dir="auto">I didn't ask it to change the project itself yet, I was only waiting for a plan of how this could be done</p>
<p dir="auto"><img src="/assets/uploads/files/1791887013930-02-06-08-refactor-plan.png" alt="I asked the agent to look at the project and suggest a plan to clean it up, below is the start of its plan by stages" class=" img-fluid img-markdown" /></p>
<p dir="auto">The plan it sent was really huge, split into stages, from removing unused code to renaming functions. I didn't do everything at once, I took three tasks from the plan and gave those to the agent</p>
<h3>Conclusion</h3>
<p dir="auto">So it turns out that the more context, task description and ideas of our own on how to build it the prompt has, the better the project comes out</p>
<p dir="auto">If writing all that is really hard, we can always just ask the agent itself: how to build it, what way out it sees, what prompt to write for it. The agent sees the project anyway, so it can usually give an answer</p>
<p dir="auto">By the way, it's easy to get disappointed in the tool itself when it simply wasn't given the data it needed. It never comes out perfect from the first prompt anyway, every model makes mistakes, so the mistakes have to be explained and fixed either way</p>
]]></description><link>http://community.bablosoft.com/topic/32582/how-to-write-a-good-prompt-for-the-agent</link><generator>RSS for Node</generator><lastBuildDate>Tue, 13 Oct 2026 23:46:43 GMT</lastBuildDate><atom:link href="http://community.bablosoft.com/topic/32582.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Oct 2026 11:37:17 GMT</pubDate><ttl>60</ttl></channel></rss>