Quality assurance · Production

How Ellipsis built a multi-agent AI code review and code search system

The problem

Building a reliable AI code review agent is hard: a single mega-agent with a large prompt produces high false positive rates — developers' most common complaint — and LLM performance degrades under large context. Traditional RAG cosine-similarity thresholds work poorly for code search because they fail to capture whether retrieved code is actually useful.

First attempt

The conventional RAG approach — search, rerank by cosine similarity, drop below a threshold — does not work well for code search because relative ranking matters less than whether the retrieved code is actually useful, and cosine similarity cannot reliably capture that distinction.

Workflow diagram · grounded in source
1
PR opened or tagged
trigger
“When a user opens a PR or marks a PR as ready to review, the workflow clones the repository and runs the review agent. It also responds to tags ("@ellipsis-dev review this")”
2
Webhook routed to queue
integration
“we route webhook events through Hookdeck for reliability, which forwards to our web app (FastAPI). We immediately place events onto a workflow queue managed by Hatchet”
3
Parallel comment generators
ai_action
“several Comment Generators run in parallel to find different types of issues. For example, one Generator may look for violations of the customer's custom rules, another may search the codebase for duplicated code, etc. This also lets us …”
4
Code search subagent
ai_action
“Both Comment Generation and Filtering steps leverage a Code Search subagent. This modular design is important to our overall architecture - our other workflows like Code Generation and Codebase Chat also leverage this same subagent, whic…”
5
Multistage filtering pipeline
validation
“we run a multistage Filtering Pipeline, which significantly reduces the false positive rate (developers' most common complaint about AI code review tools). We also use this pipeline to make small edits/tweaks to comments, such as in the …”
6
User feedback incorporated
feedback_loop
“Feedback (through thumbs up/down) is also used in a filtering step, by using an embedding search over similar comments we've left in the past that have been reacted to”
7
Filtered comments posted
output
“We include filtered comments and reasoning in our final output so users can have a sense of what Ellipsis found suspicious and why something wasn't posted”
Reported outcome

The multistage filtering pipeline significantly reduces the false positive rate, incremental vector indexing syncs code changes in a couple of seconds, and user feedback is reflected almost immediately in agent behavior without requiring per-customer fine-tuning.

Reported metrics
False positive ratesignificantly reduces the false positive rate
Index sync time on code changesa couple seconds
Feedback reflection speedreflected almost immediately in the agent behavior
Installation time<30 seconds
Reported stack
GitHub AppHookdeckFastAPIHatchettree-sitterTurbopufferLsproxyModalDynamoDBGPT-4oSonnet-3.6GitHubLinear
Source
https://www.ellipsis.dev/blog/how-we-built-ellipsis
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

The multistage filtering pipeline significantly reduces the false positive rate, incremental vector indexing syncs code changes in a couple of seconds, and user feedback is reflected almost immediately in agent behavi…

What tools did this team use?

GitHub App, Hookdeck, FastAPI, Hatchet, tree-sitter, Turbopuffer, Lsproxy, Modal, DynamoDB, GPT-4o.

What results were reported?

False positive rate: significantly reduces the false positive rate; Index sync time on code changes: a couple seconds; Feedback reflection speed: reflected almost immediately in the agent behavior; Installation time: <30 seconds (source-reported, not independently verified).

What failed first in this deployment?

The conventional RAG approach — search, rerank by cosine similarity, drop below a threshold — does not work well for code search because relative ranking matters less than whether the retrieved code is actually useful…

How is this quality assurance AI workflow structured?

PR opened or tagged → Webhook routed to queue → Parallel comment generators → Code search subagent → Multistage filtering pipeline → User feedback incorporated → Filtered comments posted.