Key takeaway: Noon's candidate search runs on turbopuffer's hosted service, with almost 700 million documents in more than 23,000 namespaces, partitioned by geography plus one private namespace per customer ATS. Each search sends one hybrid vector and BM25 query per namespace and fuses everything with a single global RRF before our own reranker cuts the pool down. p50 query latency on turbopuffer is 250ms, against multi-second searches on pgvector.

Noon is a recruiting agent. A hiring team describes a role, and Noon finds candidates and checks each one against the team's criteria, then contacts the strong matches by email and SMS. More than 4,000 recruiting teams use it.

Retrieval runs on turbopuffer's hosted service: almost 700 million documents in more than 23,000 namespaces, a bit over a terabyte. We don't run any search nodes. turbopuffer scales query and indexing nodes on its side as load changes.

This post is mostly about our client code, especially geographic routing and the per-namespace choice between exact and approximate vector search. For the product view, see our AI sourcing agent.

Why retrieval is the hard part

The agent can only evaluate candidates that retrieval hands it, so a person who never makes the pool is gone for good. LLM evaluation is also the expensive step, which means the pool it reads has to be small. The job is getting from hundreds of millions of profiles to about a thousand without losing the good ones.

Two things about our data make that harder. Embeddings are backfilled over time, and a large share of profiles still have a zero vector. Filters also swing from very selective (a specific title within 3 miles of a zip code) to barely selective at all (a remote role open to anyone in the US).

What broke on pgvector

Our first version stored embeddings with pgvector inside the application Postgres. As the table grew, searches took several seconds, and heavy search traffic slowed down the reads and writes the product depended on. We didn't keep benchmarks from that period, so we can't give a clean before-and-after p50.

Moving to turbopuffer took search out of that database entirely. All filtering, semantic search, and keyword search runs on turbopuffer, so we do not need to maintain a second search system.

What a document looks like

A document is one public professional profile, or one candidate from a customer's ATS. It is never a resume file. For public profiles we flatten the whole profile into one plain-text field: name, headline, summary, location, every job with its title, company, dates and description, then education, skills, languages and certifications. We truncate that to 4,000 characters.

That field, profile, is full-text indexed in English with stemming. We use it for BM25 ranking and also for ContainsAllTokens filters when a role marks a skill as required. The current job title gets its own full-text field, so a title filter doesn't match a word buried in a job from 2012.

Roughly, the public-profile schema looks like this (illustrative):

{
  "id": "string",
  "profile": { "type": "string", "full_text_search": { "language": "english", "stemming": true } },
  "title": { "type": "string", "full_text_search": true },
  "geohash": { "type": "string", "filterable": true },
  "yoe": { "type": "int" },
  "company_id_0": { "type": "string" },
  "company_ids": { "type": "[]string" },
  "vector": { "type": "[512]f16", "ann": { "distance_metric": "cosine_distance" } }
}

id is the profile slug, 64 bytes at most. geohash is a 5-character geohash of the person's location, filterable but not full-text indexed. yoe is years of experience. company_ids holds an id for every employer in the person's history, and company_id_0 is the current one.

The vector is a 512-dimension f16 embedding from Voyage's voyage-4-lite, computed from the title plus the profile text, with cosine distance. Filtering company_ids with ContainsAny is how "has worked at any of these companies" works.

ATS documents are thinner. They carry the ATS id, name, title, geohash, profile text and the same 512-dimension vector. Each customer gets a private namespace, and an ATS search only ever queries that one customer's namespace. That boundary is what makes rediscovering candidates already in a team's ATS safe to run alongside the public pool.

On the write side, the bulk loader groups profiles by destination namespace and upserts them in batches, with one writer per namespace at a time and backpressure disabled. Embeddings arrive later through the backfill, which is why so many documents still sit on a zero vector.

Partitioning by geography

A large share of our roles are local, meaning an office or hybrid job in one metro. Many others are remote or multi-city and need to cover a whole country. The layout had to work for both, and the local case is where partitioning pays off most.

Outside the US we use one namespace per country. In the US we use one namespace per 2-character geohash cell, so a namespace name is either a country or US plus a two-character prefix. About 200 US cells exist, and a US-wide search uses a fixed list of 33 that cover where the population actually lives.

The 23,000+ figure overstates how evenly the data is spread. Most of those namespaces are tiny, and the bulk of the documents sit in a few hundred: the US cells and the large countries. The cell covering New York City has about 5.5M profiles, India about 7.5M and Germany about 5.8M.

Namespaces on turbopuffer are free in the static sense. What we pay for is the bytes each query reads. Because namespace count can grow without limit, we could pick whatever resolution serves relevant results quickly, and we never had to pack indexes into clusters that need resizing and rebalancing.

How a location becomes a query

Routing is deterministic code. No LLM picks namespaces, and there's no stored table from places to namespaces. It's string prefixing, computed on the fly for each search.

A role has one or more locations (a city, state, country, zip code, or "Europe") and a radius in miles, with a minimum of 3. For a city we geocode to lat/lon and build a bounding box for the radius. We enumerate every 5-character geohash cell in the box with ngeohash.bboxes and keep the cells whose centre falls within the radius by haversine distance.

Zip codes resolve to a city first, using a lookup table with a cached LLM fallback for zips the table doesn't know. States use a precomputed list of 4-character cells that trace the state's outline. A bounding box would be wrong there, since Mississippi's box reaches Memphis and Mobile.

Big radii produce a lot of cells. Above 200 cells we truncate to 4-character prefixes, and if that's still above 200, to 3-character ones. Each cell's namespace is its first two characters, so turning cells into namespaces is a group-by on the prefix.

Inside a namespace, cells become range filters on geohash. A prefix match is expressed as a range:

["And", [
  ["geohash", "Gte", "9q8y"],
  ["geohash", "Lt", "9q8z"]
]]

Adjacent cells are merged into a single range to keep the filter short, and the ranges are OR'd together. Truncated coarse cells over-select, so in that case we post-filter results client-side against the original set of 5-character cells.

Remote and country-wide roles skip the geohash filter and query every namespace for the country, which is 33 for the US. We started at 10 namespaces concurrently, and a US-wide search took 17s even though its slowest single scan took 10s. Scans on different namespaces don't slow each other down, so that gap was our own client queueing. We raised the limit to 50.

Before any of this runs, we send turbopuffer a cache-warm hint for the namespaces the role is about to hit.

One hybrid query per namespace

For each namespace we send one multi-query with two sub-queries: a vector query with the role's embedding and a BM25 query over profile. Both carry the same filters, both use top_k 10,000, and both run with eventual consistency.

Vector search handles phrasing, so someone who "built data pipelines" can match a role asking for an ETL engineer. BM25 handles exact terms like a certification or a framework name. The BM25 side takes up to 8 keywords ordered by importance, with weights that decay by a factor of 0.7 at each step:

["Sum", [
  ["Product", 1.0,  ["profile", "BM25", "kubernetes"]],
  ["Product", 0.7,  ["profile", "BM25", "terraform"]],
  ["Product", 0.49, ["profile", "BM25", "golang"]]
]]

Required skills, titles, schools and past employers become ContainsAllTokens filters on profile or title. Target companies become ContainsAny on company_ids, and location becomes the geohash ranges. It ends up close to the boolean search recruiters write by hand, except the clauses are generated from the role.

Each attempt has a 60s timeout, with at most one retry after a timeout and a 150s budget per namespace. If a namespace still fails we skip it and keep the rest of the results. A hot namespace started returning "too many concurrent queries to a single namespace" 429s, so the client now caps itself at 16 concurrent queries per namespace.

Choosing between kNN and ANN

Most queries are small, and p50 sits around 250ms. The slow end is exact vector scoring on large namespaces, and that is where most of our tuning went.

When filters narrow the search space enough to keep exact vector scoring inside our latency target, we run exhaustive kNN instead of ANN and get 100% recall. That decision is made per namespace. The first call for each namespace is an aggregate count with the role's filters, cached for an hour.

Exact kNN costs us about 4 microseconds per filtered row. A 100-mile radius around New York City touches 16.7M rows, which works out to roughly 62s, just past our 60s client timeout. ANN is fast, but with a large share of profiles on a zero vector, an unfiltered ANN query returned almost none of the true top 1,000.

The planner's rules:

  • Up to 2M matching rows: exact kNN.
  • Above 2M: narrow the vector query to profiles that contain any of the BM25 keywords and run kNN over that subset. On NYC-radius searches this kept 97-99% of the true top 1,000.
  • If that keyword subset is under 200k rows and plain kNN still fits (10M rows or fewer), run plain kNN. On Germany, keyword narrowing left 46k of 5.8M rows and kept only 60% of the true top 1,000.
  • Above 10M rows: ANN.

Exact scans over 2M rows get split into 4 sub-queries by id range inside the same multi-query, and turbopuffer runs them in parallel. The NYC cell (5.5M rows) dropped from 24s to 12.5s, and India (7.5M) from 30s to 17.7s. We tried more splits and saw no gain past 4.

Fusing, reranking and what the agent reads

Results from every namespace go into one pool. We sort all vector hits by distance and all BM25 hits by score, then run one reciprocal rank fusion (RRF, k=60) over the whole pool. Fusing per namespace and merging afterwards would treat rank 1 in a tiny namespace the same as rank 1 in a cell holding 5.5M people.

With top_k at 10,000 per sub-query per namespace, the pool gets big. One country-wide search ranked about 700k rows.

The reranker is our own gradient-boosted ranking model, trained with an NDCG objective, exported to ONNX and run in-process with onnxruntime. It has 9 features:

  • cosine similarity to an "ideal candidate" embedding generated from the role's criteria
  • fraction of criteria keywords present
  • count of criteria keywords present
  • exact title match
  • required-company match
  • company size
  • number of companies
  • tenure
  • profile length

Feature data comes from one more turbopuffer query per namespace (filter id In [...], 1,000 ids per request) plus a lookup in Postgres. The reranker keeps the top 1,800 by default. The LLM agent then evaluates at most 1,000 candidates per pass against the hiring team's criteria, 50 at a time.

End to end, hundreds of millions of profiles become tens of thousands retrieved, then 1,800 after reranking, then up to 1,000 that the agent actually reads. Keeping that final set small is what lets the agent spend real reasoning on each person. We wrote more about that last stage in how AI job matching works.

In production, retrieval is a static pipeline. An LLM reads the job description once and turns it into structured preferences: titles, keyword groups, companies, locations, radius and the ideal-candidate embedding. From there, code builds every query.

A role runs several search tiers concurrently, for example its specific target companies alongside the wider industry. Tiers and retries often send identical per-namespace queries, so we share in-flight scans and cache finished ones for an hour in an LRU capped at 1GB. The first version of that cache had no cap and ran the process out of memory.

When a role's pool runs dry, a fixed relaxation ladder loosens one criterion at a time, for example dropping the programming-language keyword filter first and widening the radius later. After each rung it re-runs the search and checks the yield before going further. The ladder is serial, while namespaces within a rung fan out in parallel as usual.

That ladder is what runs in production. On a small set of roles we're testing an LLM orchestrator that reads the role's funnel (what was retrieved, rejected and accepted, and why) and picks the next action from a fixed tool menu, such as changing titles, keywords or radius, or relaxing one criterion. Even there it can't write turbopuffer queries itself. It changes the structured preferences, and the same code builds the queries.

A recruiter sourcing by hand loosens a search the same way, one constraint at a time. We compare the two approaches in AI sourcing vs manual sourcing.

Results

  • p50 query latency on turbopuffer is 250ms, against multi-second searches on pgvector.
  • Almost 700 million documents in 23,000+ namespaces, over a terabyte, on turbopuffer's hosted service. We run no search nodes.
  • All filtering, semantic search, and keyword search runs on turbopuffer, so we do not need to maintain a second search system.
  • Each customer's ATS candidates sit in their own namespace, separate from the geo-partitioned public pool.

The work that remains is mostly on the tail: the large exact scans and the embedding backfill. As more profiles get real vectors, we expect the planner's ANN branch to become usable on namespaces where it isn't today.

About the author

Rey Sivji is Head of Growth at Noon AI. Rey writes about recruiting technology, AI sourcing, and hiring workflows. Reach Rey at rey@noon.ai.