Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

20 AI Agents Autonomously Optimize Quickwit, Beat ClickBench SOTA in 4 Days

TabbyML deployed 20 AI agents as an autonomous engineering team to optimize the Quickwit search engine; over 4 days they ran 350 experiments, retained 6 optimizations, cut total hot query latency by 31% (up to 87% for some queries), and surpassed ClickBench state-of-the-art while enforcing correctness through a multi-agent review loop.

AI startup TabbyML demonstrated a multi-agent system that functions as an autonomous software engineering team. Instead of merely generating code, 20 specialized agents collaborated to optimize the open-source search engine Quickwit, which is built on the Tantivy library and used by TabbyML for storing AI agent traces.

Multi-Agent Engineering Team Structure

The team comprises three roles:

Investigator Agents – read code, analyze profiling data, and propose optimization hypotheses across areas such as decoding, memory management, aggregation, and storage access.

Lead Agent – reviews each proposal via an "experiment contract" that specifies performance targets, correctness, compatibility, and memory constraints. It rejects changes that overfit benchmarks or introduce subtle correctness issues.

Verification Agents – implement approved changes in isolated environments, run unit tests, microbenchmarks, and full performance suites. They can challenge the Lead Agent's design if they discover flaws during implementation.

Results from every experiment (success or failure) feed back into the team's shared knowledge base, creating a continuous hypothesis–verification–correction loop.

Experimental Process and Results

Over four days the system executed approximately 350 experiments and ultimately merged 6 optimizations covering cache configuration, data structures, decompressor reuse, and memory allocation. On a 100-million-row ClickBench dataset:

Total hot query time dropped from 40.5 s to 27.9 s (31% reduction) ; individual queries improved up to 87% .

Hot-query geomean fell from 403 ms to 304 ms , beating the previous public best (Duckflight at 354 ms) by 16% .

Unoptimized Quickwit baseline: 304 ms (after optimization) vs. ClickHouse at 392 ms.

Case Study: Correctness Over Benchmarks (Experiment E251)

An optimization reordered filtering and transformation for a top-10 IP query, yielding a 3.02× microbenchmark speedup and 11% query latency reduction . All 40 ClickBench queries passed validation. However, the Lead Agent rejected the change because it silently altered IP address comparison from string-based to numeric ordering. For example, "10.0.0.10" vs. "10.0.0.2": string order puts 10.0.0.10 first, numeric order puts 10.0.0.2 first. The benchmark data lacked ties, so the bug was invisible, but real workloads could return wrong results. This illustrates the system's separation of "running faster" from "producing correct answers."

Iterative Optimization with Regression Handling (Experiments E094/E119)

An optimization targeting small-group memory allocations improved the target query by 28% but caused a 9% regression on another query. Instead of accepting the trade-off, the team narrowed the optimization scope in E119, applying the new data structure only where beneficial, eliminating the regression while keeping the gain.

Verification Agent Corrects Lead Agent (Experiment E237)

A Lead Agent-approved hypothesis blamed a temporary memory buffer for a bottleneck. The Verification Agent discovered the buffer is flushed every 2,048 documents and never grows large enough to cause the issue; the real overhead came from a different ever-growing array. Feeding this finding back, the team revised the optimization, reducing the target query latency from 5.891 s to 3.131 s (47% improvement) .

WAL Write Lock Discovery (SearchBench Indexing)

Without being told the known bottleneck, Investigator Agents profiled the write path and independently identified the Write-Ahead Log (WAL) write lock as the scaling limiter. They experimented with compressing large WAL records before acquiring the lock, cutting the indexing write phase for 100 million logs by nearly 60% in internal tests.

Implications for AI Engineering

The work shifts AI from coding assistance to autonomous engineering : clear objectives, quantifiable metrics, reproducible environments, and strict correctness contracts create a feedback loop where agents can explore hundreds of hypotheses 24/7. TabbyML argues this turns sporadic, expert-dependent performance tuning into a continuous, scalable infrastructure capability.

"Future enterprise software infrastructure can not only run 7×24, but also be optimized 7×24."

Reference: https://www.tabbyml.com/blog/beating-clickbench-sota-with-a-team-of-agentic-systems-engineers/

About this article

For questions about attribution, corrections or content rights, please contactadmin@besthub.devand we will review it promptly.

AI agentsmulti-agent systemsClickBenchQuickwitautonomous engineeringcorrectness verificationsystem performance optimization

Discussion 0

Questions, practical examples and thoughtful responses.

Open full discussion