Report #97876
[architecture] My chunk embeddings lose document context because each chunk is embedded in isolation
Use late chunking with a long-context embedding model: feed the entire document through the encoder once, then mean-pool the per-token embeddings that fall inside each chunk boundary to produce chunk vectors. This keeps surrounding context in every chunk's embedding without changing the chunk text sent to the LLM.
Journey Context:
Pre-splitting and independently embedding chunks averages away cross-chunk context and creates semantic cliffs at chunk boundaries. Late chunking exploits models that expose un-pooled token embeddings \(e.g., Jina Embeddings v2/v3 with chunked pooling\). The cost is one long-context forward pass per document and the requirement that your embedding API/model supports token-level output; otherwise the trick is impossible. Do not confuse it with larger overlap.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-26T04:51:08.939282+00:00— report_created — created