AI NewsOpen sourceAnnouncement

Hugging Face let 1,000 agents write a rule-based chatbot in pure Python

Hugging Face points over 1,000 agents at one problem. They write 640,000 lines of Python, with no model behind it.

AI News

Editorial2 min read

LinkedInX
GitHub social card for the huggingface/pybot repository

Image: GitHub

Why it mattersA rule-based bot the agents wrote matches a small language model from a few years back. The loop around it is what a team can copy.

A rule-based chatbot cannot do much. ELIZA held conversations in 1966 by matching a few patterns and reading from a template. A bot built that way has not been serious work since. Hugging Face released PyBot on GitHub this month. The question behind it is how far the old approach goes, if a swarm of agents does the writing.

The repo is at huggingface/pybot. It had 1,094 stars 10 days after release. The licence is Apache 2.0. The README says over 1,000 agents wrote and evaluated more than 5,000 versions.

What a swarm of agents built

Hugging Face writes the whole thing in plain Python. The README says it is "no weights, no training, just if-else branches, regex patterns and lookup tables". The current code is about 640,000 lines of Python across 528 files. The agents wrote another 550,000 lines of tests.

The code is split into five parts. The understanding engine is 25,000 lines. The memory store is 109,000. The knowledge base is 317,000. The response composer is 104,000. Shared modules are 81,000. A reader with Python 3.8 can run it with one pip install ..

The number that matters

Hugging Face benchmarks PyBot on SmolTalkBench. An LLM judge reads each reply beside a reference answer. The judge picks which is better. PyBot's win rate climbed from 0 percent to 26 percent across the 5,000 versions. Hugging Face says that result "puts it on par with" SmolLM-360M-Instruct. That model, the README says, "was state of the art for models under 1 billion parameters" a few years ago.

The reader is invited to notice the shape of the comparison. A model with 360 million weights lost a quarter of its head-to-head replies to a pile of if-else. The agents wrote the if-else. The benchmark had a reference answer for every input. The small language model has every advantage the rule-based bot does not. It generalises. It handles cases it has not seen. Its architecture fits in a short paper. It still loses 26 percent of the time.

What the method says about building software

The point is not that rule-based chatbots are back. A swarm of agents taking a benchmark from 0 to 26 percent over 5,000 iterations says something else. It says agents can write a lot of code in one direction, when the goal has a judge attached.

Each version was evaluated against the same reference answers. An agent wrote a change. The next pass measured it. The swarm kept the versions that scored higher. For any team building AI products, the piece worth copying is the loop. Give 1,000 agents a target. Give them a judge. Give them 5,000 attempts. The output here was 640,000 lines of code that passes its own tests.

The limits are in the shape of the problem. A reference answer existed for every input. The bot never meets a case the agents did not write for. The 26 percent figure is on that benchmark, not on open conversation. Hugging Face names no author for the project. It is credited to the swarm.

Source

SourceGitHub

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project