Prompt
I’m unhappy with OpenAI embeddings search quality for long documents
Latest observation
Nov 25, 2026
OpenAI APIWeb search: off
That’s a common pain point. With long documents, embedding search quality often degrades because a single vector has to represent too much content.
A few practical ways to improve it:
-
Chunk more intelligently
- Split documents into smaller chunks, not just by fixed length.
- Use section headings, paragraphs, or semantic boundaries.
- Keep chunks around the size where one idea is captured well.
-
Add overlap
- Use a small overlap between adjacent chunks so context isn’t lost at boundaries.
-
Retrieve at the right granularity
- Search over chunks, not whole documents.
- After retrieving relevant chunks, optionally fetch the parent section or full document for answer generation.
-
Use hybrid search
- Combine embeddings with keyword/BM25 search.
- This helps for exact terms, names, IDs, and rare phrases.
-
Rerank results
- Use a cross-encoder or LLM reranker on the top-k retrieved chunks.
- This often gives a big quality boost.
-
Improve chunk metadata
- Store title, section heading, document type, date, and other metadata.
- Include that metadata in retrieval or reranking.
-
Try hierarchical retrieval
- First retrieve relevant sections or chapters.
- Then search within those sections for the best chunks.
-
Evaluate with your own queries
- Build a small test set of real user questions and expected passages.
- Measure recall@k / MRR to see which strategy helps most.
If you want, I can help you design a better retrieval pipeline for your specific setup—e.g.:
- document length and type,
- chunking strategy,
- vector database,
- whether you need semantic Q&A or document search,
- and what “bad quality” looks like in your case.
Brands