
Chunking strategies for RAG
Fixed-size, semantic, and recursive chunking — with the tradeoffs.
The single biggest RAG quality lever isn't the model — it's the chunker.
Fixed-size (baseline)#
512-1024 tokens with 10% overlap. Cheap, easy, works for most content.
Recursive#
Split on paragraphs, then sentences, then words — collapsing until each chunk fits the size cap. Preserves structure.
Semantic#
Embed each sentence, cluster on cosine distance, chunk cluster boundaries. Best quality, 3× slower to index.
Build this with TokenRex
TokenRex is an LLM marketplace by Asirex Labs. Choose an enabled model, create a private API key and use the supported endpoint shown in Docs. Check live prices before your first request.