This guest blog post is from Brandon Waselnuk, Developer Advocate, Unblocked.
Unblocked is a context layer for agentic software development. It connects to a team's code, pull requests, issue trackers, Slack, and documentation to give engineers and their coding agents the context behind a codebase: the decisions, discussions, data, and incidents that explain why the code looks the way it does.
Every answer Unblocked gives depends on retrieval.
Before Unblocked can answer a question, it has to find the right records, narrow them by attributes such as date, status, and author, and keep only the records that help solve the user’s problem.
Unblocked runs retrieval on MongoDB.
The records live in MongoDB Atlas. MongoDB Search handles text matching and structured filters. Agents write their own aggregation pipelines against the data. MongoDB serves rerankers from Voyage AI by MongoDB, which decide which results the model reads first.
In this post, the Unblocked engineering team explains why they chose MongoDB for this work and how they use it.
If you’re building retrieval for AI agents, three parts of the team’s approach may be useful: how they store records from many different tools in one MongoDB Atlas cluster, how their agents write their own aggregation pipelines, and why they chose a reranker they can steer with instructions.
What Unblocked does
Unblocked connects to a team's code, pull requests, Slack, issue trackers, documentation, data, and production tools. It links related records in order to reason across those sources, such as an incident, the pull request that fixed it, and the Slack thread where the fix was discussed.
Figure 1. Unblocked’s architectural overview.

Before answering, it checks whether its sources contradict each other, for example, a design doc that a later pull request overrode. It serves the results to coding agents through a Model Context Protocol (MCP) server, a command-line interface, and an API.
The same engine powers Unblocked’s own products: a Q&A assistant that answers engineering questions, an automated pull request reviewer, and Unblocked Code, a coding agent.
Why one kind of search is not enough
The questions engineers and agents ask fall into three broad types. Each needs a different kind of retrieval:
- Exact matches. When someone searches for a ticket number, an error string, or a function name, they want records that contain that exact text. A semantic search for an error string may return records about similar errors, which isn’t what the person asked for.
- Structured queries. A request for every pull request merged into the payments service last month, or every open incident tagged "ingestion," is a filter over dates, states, authors, and labels. It’s closer to a database query than to a search.
- Ranking. A search can return hundreds of candidates, and only the top results fit in the answering model's context window. A reranker reads the question alongside each candidate and orders the candidates by how directly they relate to it. That largely determines which results the answering model reads.
Figure 2. Unblocked’s retrieval architecture.

Many questions need all three. To answer the question, "What did the team decide about the retry bug after last week's incident?", Unblocked has to find the incident, find the pull requests that followed it, and place the Slack thread where the decision was made near the top of the results.
Customer data adds another complication. Customers connect tools such as GitHub, GitLab, Jira, Linear, Zendesk, Sentry, Datadog, Snowflake, Jenkins, and PostHog, and each tool structures its data differently. Jira issues carry custom fields keyed by opaque IDs, GitHub pull requests carry review states, and PostHog events have neither. The storage layer has to keep each source's structure intact while still supporting queries across all of them.
The previous setup
Before the migration, each of these jobs ran on a separate vendor, with its own integration, credentials, and rate limits.
The hosted search engine’s search-focused design handled exact matching well but couldn’t express database-style queries. A request such as “every pull request (PR) merged into payments last month by someone on the platform team” combines a filter, a lookup against team membership, and a date range. The search engine couldn’t express that combination in one query.
There was also no way to give an agent the schema and let it write the query on its own.
The reranker didn’t reliably follow instructions. Unblocked needs to favor code when someone asks how a feature works and Slack discussions when someone asks what the team decided. The Unblocked team passed those preferences to the reranker as instructions, but it often ignored them.
The team’s deployment model narrowed the options further. Unblocked runs in their own cloud, and some customers run it on their own infrastructure, so any database they chose had to work both as a managed service and as a self-hosted installation.
“We needed one database we could run fully managed in our cloud and self-hosted for customers on-prem,” said Mahdi Torabi, an engineer at Unblocked.
“MongoDB and Atlas gave us both.”
Choosing a reranker and a database
The team evaluated the reranker first.
Doug Purdy, an engineer at Unblocked, compared Voyage AI’s rerank-2.5 with an existing reranker on real production questions. He graded both with the evaluation harness Unblocked uses to measure retrieval quality.
Figure 3. Unblocked’s reranker evaluation.

The two rerankers agreed on about 85% of their top 30 results. The differences were in the first few positions—the results the answering model actually reads:
For “What are Unblocked’s user engagement metrics and how do they work?” Voyage AI’s reranker ranked the code that implements those metrics at positions five and eight. The previous reranker put a marketing FAQ at position five and didn’t rank any code above position 10.
For “What are the most common issues in #engineering in the last week?” Voyage AI’s reranker placed the relevant Slack messages in the top six results. The previous reranker ranked them as low as position 15.
Instruction following was the deciding factor. When the team told the Voyage AI reranker to prioritize pull requests, pull requests moved up the ranking. That meant they could write reranking instructions for each type of question, tune them, and expect them to take effect.
“Being able to steer the reranker in plain English changed what we could ask of it,” said Rashin Arab, an engineer at Unblocked.
“I’d have swapped on the spot. But quality beats speed every time for us, so it had to earn it in our evaluator first,” Peter Werry, an engineer at Unblocked, said. Voyage AI’s reranker passed that evaluation and replaced our previous reranker in October 2025.
Choosing the database was simpler. When they reviewed our database options in 2021, they concluded that if they wanted a document model, they wanted MongoDB’s own query engine rather than a service that emulates part of MongoDB’s API.
Atlas provides that engine as a managed service on AWS, and they connect to it over a private endpoint.
“We wanted a data lake our agents could query for themselves,” Arab said.
“MongoDB has the most refined query engine we’ve worked with, and it scales with us."
How it works
The system has four main parts.
Container documents
For every record, they store a post-processed payload that includes fields they derive, so they can always reread exactly what the provider sent. Fields they derive, such as display names and labels for custom fields, live on the outer document that wraps the payload.
They store timestamps as native dates, so date-range queries need no conversion. This structure lets a single MongoDB Atlas cluster hold data from any number of sources without forcing them into a shared schema.
Atlas Search indexes defined in code
Atlas Search is the full-text search engine built into Atlas, so text matching and structured filters run against the same collection.
The team defines every index in code, which keeps the indexes identical across environments. Developers run the same Atlas Search locally in a container.
Queries written by agents
MongoDB expresses complex queries as aggregation pipelines: sequences of stages that filter, group, sort, and reshape documents.
When an agent needs something like “open bugs assigned to me that were updated in the last week,” a model reads the collection schema and the descriptions of the Atlas Search indexes, then writes the pipeline.
They validate each pipeline before it runs. This approach powers the pull request and issue query tools in our MCP server, as well as the pull request lookups our own agents make when researching a question.
It works across GitHub, GitLab, Bitbucket, Azure DevOps, Jira, Linear, Asana, Sentry, Datadog, and Zendesk. They also open-sourced a workshop to learn how to do this yourself with MongoDB Atlas.
Reranking through Voyage AI by MongoDB
Voyage AI by MongoDB reranks the results for every question, using instructions tuned to the type of question being asked. The team counts tokens before each call so large batches stay within the model's input limit. Requests go through MongoDB's AI API endpoint with keys scoped to the US region.
This year, Andrey Khabarov, an engineer at Unblocked, rebuilt the path agents use to query this data.
Generating a query used to take up to four model turns. Now it takes a single model call, with a retry only when the query fails validation.
“Give the model the schema and the indexes, and it writes a good MongoDB query on the first try. Going from four turns to one made answers faster without making them worse,” Khabarov said.
Moving our reranking traffic to the Embedding and Reranking API on MongoDB Atlas took Torabi a single pull request.
“One PR, one afternoon, and all our reranking traffic was running through MongoDB,” Torabi said.
Results
Twice the reranking throughput. MongoDB's endpoint allows us 20 million tokens and 12,000 requests per minute. That’s double the token limit we had with our previous reranker vendor, at no additional cost.
Relevant code and discussions ranked higher. The Voyage AI reranker and our previous reranker agreed on most of their top 30 results, but the Voyage AI reranker ranked relevant code and discussions higher. In the engagement metrics example, the Voyage AI reranker ranked the implementing code fifth, where the previous reranker had a marketing FAQ.
Fewer model calls per agent query. Agent queries over pull requests and issues take one model call instead of up to four, with retries only when a query fails validation.
What's next
Atlas now holds the records they ingest for customers from code hosts, issue trackers, and support desks, and every pull request and issue query our agents run goes through Atlas.
They have since moved from rerank-2.5 to Voyage AI’s rerank-3, which scored a few percentage points higher in their benchmarks. When rerank-3 went live, Purdy summed up how gains of that size add up: “A percent here. A percent there. Pretty soon, we’ll be leading the benchmarks.”
They’re also evaluating Voyage AI’s embedding models. On their own Kotlin code, voyage-context-3 scored 10.2% higher average precision than the embedding model they use today. They haven’t switched yet, but they plan to benchmark voyage-code-4 next.
Every answer Unblocked gives depends on three retrieval steps: finding the right records, narrowing them down, and keeping only the ones that help solve the user’s problem.
MongoDB handles all three.
Next Steps
Not yet registered for Atlas? Get started for free and start building today.