A successful embedding can still contain truncated input
Embedding success does not prove the whole document was processed. Check local tokenization, endpoint truncation, source positions, and retrieval of facts near the end.

A returned embedding does not prove that every part of a long document was processed. Some paths reject oversized input; others truncate it. A local tokenizer may shorten the text before the request ever reaches the service. Check preprocessing, endpoint limits, and retrieved evidence separately.
This article checks Google's hosted text embedding guide, the Gemini embedding guide, and the multilingual-e5-large model card on November 26, 2026. It describes documented behavior and an acceptance procedure, not a live retrieval experiment.
How can success hide missing content?
When automatic truncation is enabled, success may mean that the shortened input was embedded successfully. An exception, effective date, or product identifier outside that retained input cannot contribute to its representation.
Three documented paths illustrate why endpoint scope matters:
| Path | Documented behavior | Scope limit |
|---|---|---|
Google's hosted gemini-embedding-001:predict endpoint | parameters.autoTruncate: false makes oversized input fail; truncation is allowed by default | This is not a universal OpenAI-compatible request field |
| Embedding 2 PDF input through the Gemini Developer API | The shared 8,192-token limit includes visual and extracted text tokens; excess input is silently truncated | Page count alone cannot establish that the input fits; this is not a rule for every text endpoint |
Local multilingual-e5-large example | The tokenizer uses max_length=512, truncation=True; the card states that long text is truncated to at most 512 tokens | Other models and hosted implementations have their own limits |
Google's hosted guide lists model-specific limits. Read the selected model and endpoint together rather than treating one example's number as a product-wide maximum.
Can oversized input fail visibly instead?
Where the endpoint supports it, disabling automatic truncation turns a hidden loss into a failure you can handle by changing chunking. This illustrative body follows the documented gemini-embedding-001:predict format; it is not a Nbility request:
{
"instances": [
{
"content": "Public demonstration policy: standard goods may be returned within seven days; custom goods require manual review."
}
],
"parameters": {
"autoTruncate": false
}
}
Send it to the documented Google project and regional endpoint using the corresponding credentials. Inspect predictions[].embeddings.statistics.truncated and token_count in that API's response. Do not assume another service returns the same metadata.
Without a truncation flag, check the provider's limits and the SDK's preprocessing. A missing flag is not proof of complete input. Vector dimensions are not a useful completeness check either: shortened input normally still produces the configured vector length.
Nbility's Embeddings API accepts text and text batches. Confirm the selected model's actual length behavior; a common interface does not make different models share the same truncation policy.
Can character counts replace token counts?
No. Counts depend on the model's tokenizer and the final input, including titles and task instructions. Characters, UTF-8 bytes, and English words are useful size indicators but not exact token counts.
Assemble the final input before counting it using the model's supported method. With separate query and document formats, titles and prefixes consume input space too.
If the SDK already applies truncation=True, the service receives a shortened string. A server response saying it did not truncate only describes the content it received; it cannot recover text removed locally.
What should a chunk retain?
Keep source position and text revision with each chunk so that missing content can be traced to extraction, splitting, or embedding. This is an application record, not a provider request:
{
"chunk_id": "demo-policy-v1-section-04",
"source_id": "demo-policy",
"source_revision": "v1",
"section": "Custom-goods exception",
"source_start_char": 1200,
"source_end_char": 1480,
"input_policy": "title-text-v1",
"expected_fact": "Custom goods require manual review"
}
Character offsets are this application's location convention, not token positions. If extraction includes cleanup, specify whether the offsets refer to the source or cleaned text. Page and paragraph references may be more useful for other file types.
Avoid separating a condition from its exception or negation. The parent-child chunking guide discusses retaining surrounding context, while the PDF citation guide follows the path into final references.
How do you check facts near the end?
Create a public test document with distinct facts near its beginning, middle, and end. Ask questions that require each fact without including the answer in the question. For a final custom-goods exception, ask whether standard returns apply automatically.
Check whether the clause exists in extracted text, in the actual submitted chunk, and in retrieved evidence with the correct source ID. Finding a literal marker through a text or keyword path does not prove semantic retrieval includes its meaning.
Keep a short-document control and repeat equivalent questions on a longer version. If only the long version fails, investigate truncation, topic mixing, and retrieval settings rather than assigning a single cause immediately. We parsed the example JSON and checked the documentation; we did not send a long-input embedding request or measure an optimal chunk size.
Establish the connection between processed text and the original source before tuning candidate counts. A larger context window increases capacity, but does not replace that completeness check.


