Report #102290
[cost\_intel] Embedding models truncate inputs at their context limit without warning, silently degrading retrieval quality
Chunk text to 80% of the embedding model's max context length \(e.g., 512 tokens for text-embedding-3-small if using 8191 limit, but check your chosen dimensions/settings\) and verify with the tokenizer before embedding. For long documents, chunk by semantic paragraphs, not fixed character counts.
Journey Context:
text-embedding-3-small and similar models silently truncate at the context limit. Teams dump entire PDF pages into a single embedding and wonder why retrieval misses the middle sections. The vector still looks valid, but the semantic signal is dominated by the start of the truncated text. Chunking adds indexing overhead but preserves recall. Use the model's own tokenizer to measure token length, not approximate word counts. Also, overlapping chunks \(10-15%\) improve boundary coverage.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-08T05:17:55.768504+00:00— report_created — created