AboutWorkProjectsNotes
PT

say hi

 © 2026

  • Embed less, find moreRetrieval
  • The teacher was confidently wrongFine-tuning
  • Every agent write needs a name on itAgents
  • Too long to train onTraining
0/ 292 tokens

Retrieval · Draft · ~1 min

Embed less, find more

Recall went from 61% to 88% by putting fewer fields into the vector, not more.

We had 48,000 configuration records. Each one had a free-text description and seven structured fields: region, module, owner, and so on. The obvious move was to glue everything into one string and embed it.

That obvious move quietly broke retrieval. Recall@20 sat at 61%, and no amount of prompt tuning on the generation side fixed it.

Why concatenation hurts

An embedding is an average of meaning. When half the tokens are field names and enum values, records that share a region look closer than records that share a purpose. The vector stops being about what the record means and starts being about how it's filed.

recall@8: 2/8 share the topic

  • compute config(query)
  • access policy
  • billing rule
  • data retention
  • drag the ◉ query
Drag the query point. Colors are the true topic of each record; a hit is a neighbor with the same topic.

The fix

Embed only the free text. Keep the seven structured fields as metadata and filter on them before similarity search. A graph-driven pre-filter pruned about 87% of the space before scoring, then a reranker sorted what was left.

Recall@20 went from 61% to 88%. Top-3 precision went from 71% to 89%. Same model, same data, fewer tokens in the vector.

This is a draft. If you've hit the same problem, I'd love to compare notes.