Live data from Hacker News

Tools: Code Is All You Need

lucumr.pocoo.org

11–20 of 234 posts

Re: Tools: Code Is All You Need

#13

Tools are constraints and time/token savers. Code is expensive in terms of tokens and harder to constrain in environments that can’t be fully locked-down because network access for example is needed by the task. You need code AND tools.

> Code is expensive in terms of tokens and harder to constrain in environments

It's also true for human. But then we invented functions / libraries / modules

Re: Tools: Code Is All You Need

#14
I frankly use tools mostly as an auth layer for things were raw access is too big a footgun without a permissions step. So I give the agent the choice of asking for permission to do things via the shell, or going nuts without user-interaction via a tool that enforces reasonable limitations.

Otherwise you can e.g just give it a folder of preapproved scripts to run and explain usage in a prompt.

Re: Tools: Code Is All You Need

#15
post #6

> This is a significant advantage that an MCP (Multi-Component Pipeline) typically cannot offer Oh god please no, we must stop this initialism. We've gone too far.

It's the wrong acronym. I wrote this blog post on the bike and used an LLM to fix up the dictation that I did. While I did edit it heavily and rewrote a lot of things, I did not end up noticing that my LLM expanded MCP incorrectly. It's Model Context Protocol.

Re: Tools: Code Is All You Need

#17
post #5

Directionally I think this is right. Most LLM usage at scale tends to be filling the gaps between two hardened interfaces. The reliability comes not from the LLM inference and generation but the interfaces themselves only allowing certain configuration to work with them. LLM output is often coerced back into something more deterministic such as types, or DB primary keys. The value of the LLM is determined by how well…

this is a really good take

Re: Tools: Code Is All You Need

#19

The problem with this is that you have to give your LLM basically unbounded access to everything you have access to, which is a recipe for pain.

Not necessarily. I have a small little POC agentic tool on my side which is fully sandboxed, an it's inherently "non prompt injectable" by the data that it processes since it only ever passes that data through generated code.

Disclaimer: it does not work well enough. But I think it shows great promise.

Re: Tools: Code Is All You Need

#20
This is similar to the tool call (fixed code & dynamic params) vs code generation (dynamic code & dynamic params) discussion: tools offer contrains and save tokens, code gives you flexibility. Some papers suggest that generating code is often superior and this will likely become even more true as language models improve

[1] https://huggingface.co/papers/2402.01030

[2] https://huggingface.co/papers/2401.00812

[3] https://huggingface.co/papers/2411.01747

I am working on a model that goes a step beyond and even makes the distinction between thinking and code execution unnecessary (it is all computation in the end), unfortunately no link to share yet

Post reply on HN