Optimizing Vector Search: Why You Should Flatten Structured Data
summary
Embedding raw JSON balloons nonsemantic tokens so tokenizers see 50% noise tokens and mean pooling lets structural markers drift the centroid by ~25%, hurting retrieval. A simple preprocessing step converts JSON to natural language templates, cutting token count ~14% and then embedding with a small Omnila 384‑dim model and flat file indexes (no ANN) in experiments on the Amazon ESCI dataset. Results show large gains: Recall@10 +90% and MRR +27% and ~19.7% precision@10 uplift.
AI-written summary · about
chapters (12)
- 0:00Introduction to optimization
- 0:30Problem with structured data
- 1:35How embedding models work
- 2:59Tokenization issues with JSON
- 3:42Attention mechanism challenges
- 4:47Mean pooling and semantic noise
- 6:10Solution: flattening data
- 7:14Flattening example
- 8:36Experiment setup
- 9:59Results and metrics
- 10:42Key takeaways
- 11:24Q&A session
