﻿# How do you verify which end of a long text TEI truncates?

How do you verify which end of a long text TEI truncates? Confirm the intended side before rebuilding an index.

Author: Retrivium editorial team
Updated: 2026-11-29
Canonical URL: https://retrivium.ai/journal/research-20261129-tei-long-input-truncation/
Language: en

Text Embeddings Inference v1.10.0 on November 25 fixes a character-level guard so long inputs are cut in the configured direction. That guard can act before the token limit. Both boundaries can affect the representation supplied to the embedding model.

## What the source establishes

Put distinct harmless markers at the beginning and end of a test string. Make it possible to identify which evidence survived by examining the retained text, token IDs or controlled nearest neighbors. Pin the artifact and compare through the same runtime entry point that the application uses.

## Design the comparison

Compare a short control and long inputs that cross each relevant limit. Keep the tokenizer and model constant. Try different scripts and texts with combining characters so character counts and tokens are not assumed to agree. Run a representative input with the previous version and repeat it after changing the dependency. Include a nearby boundary and observe the selected execution path.

## Read the results

Record the marker retained, input length, tokens passed and the search result. Verify that storage or indexing does not treat two different truncation policies as one embedding identity. Check the returned shape or contract along with time and memory. Keep correctness results attached to the exact configuration. Collect the primary outcome together with a measure of workload size. Preserve errors, timeouts and explicit fallbacks in the reported population. A median from successful samples can conceal a subgroup that operates on a different path. Store enough diagnostic context for another engineer to explain which part of the system caused the difference.

## Decide what goes into service

Confirm the intended side before rebuilding an index. Record the tokenizer, truncation limits and direction with the embedding configuration. State the acceptance threshold before choosing the implementation. Add the tested boundary and conditions for revisiting it to the release record. If an observed behavior differs from expectations, narrow the scope of the rollout while collecting evidence for that case. Keep the prior artifact or configuration available so the comparison remains repeatable.

## Sources

- [Primary source · text-embeddings-inference #955](https://github.com/huggingface/text-embeddings-inference/pull/955)
- [Primary source · text-embeddings-inference v1.10.0](https://github.com/huggingface/text-embeddings-inference/releases/tag/v1.10.0)

## Related reading

- [How OpenRouter embedding inputs differ from chat messages](/journal/learn-openrouter-embedding-inputs/)
- [Byte tokenization and Unicode characters have different boundaries](/journal/byte-tokenization-unicode-boundaries/)
