1000% agree. I am increasingly hesitant to believe Anthropic's continual war drum of "build for the capabilities of future models, they'll get better". We've got a QA agent that needs to run through, say, 200 markdown files of requirements in a browser session. Its a cool system that has really helped improve our team's efficiency. For the longest time we tried everything to get a prompt like the following working: "…
I saw a major uplift in performance after I combined tools like apply_patch with check_compilation & run_unit_tests. I still call the tool "apply_patch", but it now returns additional information about the build & tests if the patch succeeds. The agent went from ~80% success rate to what seems to be deterministic (so far). I don't bother to describe the compilation and unit testing processes in my prompts anymore. Al…
Agents need control flow, not more prompts
331–340 of 348 posts
Re: Agents need control flow, not more prompts
#332Here's a recent PR created end-to-end using `/do` workflow of agency: https://github.com/srid/emanote/pull/719
Re: Agents need control flow, not more prompts
#333Earlier quoted context omitted.
This has been our experience as well. Initially we had a list of tools that the agent could use to manipulate a data structure in certain ways. This approach was quite brittle. Now we are using a small DSL (domain specific language) and a single tool where the agent can input scripts written in the DSL. We are getting more dynamic use-cases now and wrong syntax can easily be catched by the parser and relayed to the a…
Do you have an example of type of data and DSL? I feel I’d just give it access to write python/js to manipulate data
The data structure is a recursive list of simple objects that form a table of content.
DSL uses Python syntax though. For example:
swap_section(a, b) create_section(after=2) delete_section(2)
This proved to safe a ton of explanatory prompts that would be needed if every command was a tool instead. And it’s faster and more reliable.
Re: Agents need control flow, not more prompts
#334Define what a good job looks like, unskippable steps, etc etc - essentially what your process is for producing your desired output in a reproducible way.
Then codify it. Have the model write code and wrap the model in a harness that ensures said code runs when you need it to, every time.
Re: Agents need control flow, not more prompts
#335How does one achieve this?
Native integrations with agents, i.e. Claude Code's system of Hooks. Harnesses, which kick off agents with what to do. Tools, which show an agent where in a process it is, and what the next step should be. In my experience I find Hooks to be extremely powerful cross-project. CLI Tools are easy to make also, and work really well for guiding agents.
Re: Agents need control flow, not more prompts
#336Re: Agents need control flow, not more prompts
#337Earlier quoted context omitted.
Native integrations with agents, i.e. Claude Code's system of Hooks. Harnesses, which kick off agents with what to do. Tools, which show an agent where in a process it is, and what the next step should be. In my experience I find Hooks to be extremely powerful cross-project. CLI Tools are easy to make also, and work really well for guiding agents.
Thanks. Any tutorials?
Re: Agents need control flow, not more prompts
#338Earlier quoted context omitted.
Rather than telling the LLM "loop through these files", tell it "write a script to loop through these files", then hard-code that script somewhere.
The models will eventually be able to know that they need to do that to get the thing done from natural language
Re: Agents need control flow, not more prompts
#339Earlier quoted context omitted.
I saw a major uplift in performance after I combined tools like apply_patch with check_compilation & run_unit_tests. I still call the tool "apply_patch", but it now returns additional information about the build & tests if the patch succeeds. The agent went from ~80% success rate to what seems to be deterministic (so far). I don't bother to describe the compilation and unit testing processes in my prompts anymore. Al…
Can you explain in more detail how you implemented those tools? Is that via a MCP server?
No, this all in one application. A Winforms+WebView2 app wraps the chat completion APIs and implements the various tools directly.
Re: Agents need control flow, not more prompts
#340One way to slice it: there are three kinds of underspecification an agent has to close.
Intent: what the user wanted (JWT vs cookies, should free users see this feature). Verification can't close this and probably shouldn't try.
Structural e.g. null, types, exhaustiveness, ownership. Sound static analysis closes this by construction.
Domain e.g. auth on every route, error propagation, contract stability. A domain-shaped apparatus closes this because it knows what kind of program is being built.
Babysitter, auditor, prayer is the right taxonomy of bad options. The fourth option is making the LLM a component inside an apparatus that handles structural and domain statically, and leaving the human on intent.