The problem with character splits
A 1200-character chunk in English is roughly 240 tokens. The same 1200 characters in Korean might be 700 tokens. The same 1200 characters of Python source might be 400. Your token budget is what the embedding model cares about — character counting silently misbehaves across languages and content types.
Token-aware splitting
Use the model's tokenizer to split. The two common patterns:
- Wrap a tokenizer around a recursive splitter — split by paragraph/sentence, then check token count, then split further if needed.
- Direct token-based slicing — encode the whole document, slice the token list, decode each slice back to text.
The second is faster but produces ugly mid-word boundaries. Most production systems use the first.