Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
m-ricย 
posted an update May 27
Post
836
๐™’๐™ง๐™ž๐™ฉ๐™ž๐™ฃ๐™œ ๐™ฉ๐™ค๐™ค๐™ก ๐™˜๐™–๐™ก๐™ก๐™จ ๐™ž๐™ฃ ๐™˜๐™ค๐™™๐™š ๐™Ÿ๐™ช๐™จ๐™ฉ ๐™ฌ๐™ค๐™ง๐™ ๐™จ ๐™—๐™š๐™ฉ๐™ฉ๐™š๐™ง ๐™ฉ๐™๐™–๐™ฃ ๐™…๐™Ž๐™Š๐™‰ ๐Ÿ’ช

I was really happy to learn today by @sergeipetrov that paper ๐˜Œ๐˜น๐˜ฆ๐˜ค๐˜ถ๐˜ต๐˜ข๐˜ฃ๐˜ญ๐˜ฆ ๐˜Š๐˜ฐ๐˜ฅ๐˜ฆ ๐˜ˆ๐˜ค๐˜ต๐˜ช๐˜ฐ๐˜ฏ๐˜ด ๐˜Œ๐˜ญ๐˜ช๐˜ค๐˜ช๐˜ต ๐˜‰๐˜ฆ๐˜ต๐˜ต๐˜ฆ๐˜ณ ๐˜“๐˜“๐˜” ๐˜ˆ๐˜จ๐˜ฆ๐˜ฏ๐˜ต๐˜ด was accepted at ICLR 2024!

As a reminder, an agent is a system in which you embed a LLM engine, to let it call tools.

These tools are meant like an IronMan suit, to supplement the LLM in areas that it isn't good at.
๐Ÿง‘โ€๐Ÿ’ป For instance your friendly LLM may be terrible at calculating powers of floating numbers ("What is X ^0.2947 ?"), so it should use a calculator.
๐Ÿ”ŽIt may be terrible at knowing precise facts ("What was the date of the Golden Bull?") so it should use a web browser.

So the agent system will prompt an agent with "Now you can use these tools: calculator, search,..."

But ๐™๐™ค๐™ฌ ๐™จ๐™๐™ค๐™ช๐™ก๐™™ ๐™ฉ๐™๐™š ๐™–๐™œ๐™š๐™ฃ๐™ฉ ๐™š๐™ญ๐™ฅ๐™ง๐™š๐™จ๐™จ ๐™ž๐™ฉ๐™จ ๐™–๐™˜๐™ฉ๐™ž๐™ค๐™ฃ๐™จ?

All well known frameworks let agents write their actions as JSON strings.

We ๐—ฝ๐—ฟ๐—ฒ๐—ณ๐—ฒ๐—ฟ๐—ฟ๐—ฒ๐—ฑ ๐˜๐—ผ ๐—ด๐—ผ ๐˜„๐—ถ๐˜๐—ต ๐—ณ๐—ผ๐—ฟ๐—บ๐˜‚๐—น๐—ฎ๐˜๐—ถ๐—ป๐—ด ๐—ฎ๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐—ถ๐—ป ๐—–๐—ผ๐—ฑ๐—ฒ, ๐˜„๐—ต๐—ถ๐—ฐ๐—ต ๐—ถ๐˜€ ๐—บ๐˜‚๐—ฐ๐—ต ๐—บ๐—ผ๐—ฟ๐—ฒ ๐˜ƒ๐—ฒ๐—ฟ๐˜€๐—ฎ๐˜๐—ถ๐—น๐—ฒ ๐—ฎ๐—ป๐—ฑ ๐—ฐ๐—ผ๐—ป๐—ฐ๐—ถ๐˜€๐—ฒ, ๐—ฎ๐—ป๐—ฑ ๐—ฎ๐—น๐—น๐—ผ๐˜„๐˜€ ๐˜๐—ผ ๐—ฐ๐—ต๐—ฎ๐—ถ๐—ป ๐—ฎ๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐˜€๐—ฒ๐—ฎ๐—บ๐—น๐—ฒ๐˜€๐˜€๐—น๐˜†: see the picture attached for an example where Code formulation really shines.

And the paper confirms our choice: researchers show that ๐—ฐ๐—ผ๐—บ๐—ฝ๐—ฎ๐—ฟ๐—ฒ๐—ฑ ๐˜๐—ผ ๐—๐—ฆ๐—ข๐—ก ๐—ผ๐—ฟ ๐—ฝ๐—น๐—ฎ๐—ถ๐—ป ๐˜๐—ฒ๐˜…๐˜, ๐—–๐—ผ๐—ฑ๐—ฒ ๐—ถ๐˜€ ๐—ฏ๐—ฒ๐˜๐˜๐—ฒ๐—ฟ ๐—ฏ๐—ผ๐˜๐—ต ๐—ถ๐—ป ๐—ฐ๐—ผ๐—ป๐—ฐ๐—ถ๐˜€๐—ฒ๐—ป๐—ฒ๐˜€๐˜€ ๐—ฎ๐—ป๐—ฑ ๐—ฝ๐—ฒ๐—ฟ๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐—ป๐—ฐ๐—ฒ:
โžค Up to 30% fewer steps for the same actions (much more concise)
โžค Up to 20% higher performance on benchmarks

And we find additional benefits, for instance a natural handling of variables.

Read the paper here ๐Ÿ“– Executable Code Actions Elicit Better LLM Agents (2402.01030)
Get your ReactCodeAgent running with our Agents framework! ๐Ÿ‘‰ https://huggingface.co/learn/cookbook/agents
In this post