Chonkie
feyninc/chonkie β a lightweight, fast chunking library for RAG pipelines (mascot: a pygmy hippo). It covers the βsplit source text into good retrieval unitsβ step end-to-end: fetch β CHONK β refine β embed β ship to your vector DB. The pitch is no-bloat and βjust worksβ: small install, quick chunking, and 32+ integrations with embedders and vector stores out of the box, across 56 languages.
In the LLM App Engineering Stack this is the chunking lane β the piece between document parsing (Marker for files, Crawl4AI for web) and vector storage (Qdrant). Chunk quality is one of the biggest hidden levers on retrieval quality, which is why it gets its own tool rather than a hand-rolled text.split().
π Links
Description
- Repo: https://github.com/feyninc/chonkie
- Cloud: https://labs.chonkie.ai
- License: MIT
Download or use
pip install chonkie # minimal
pip install "chonkie[all]" # all chunkers + integrationsfrom chonkie import SemanticChunker
chunker = SemanticChunker() # groups by meaning, not fixed size
chunks = chunker.chunk(long_text)# self-host the API server
pip install "chonkie[api,semantic,code,catsu]"
docker compose upποΈ Description
π§© Chunkers
A family of strategies so you can match the chunker to the content:
- Token / Sentence / Recursive β classic size- and structure-based splitting.
- Semantic β groups by embedding similarity so chunks are meaning-coherent.
- Code β structure-aware splitting for source files.
- Late / SDPM / Neural β advanced strategies for higher retrieval fidelity.
π§© Pipeline extras
- Refinery β post-chunk overlap/merge refinement.
- Embeddings + porters β embed and ship straight into vector DBs.
- Cloud or local β run in-process, as a self-hosted API server, or on Chonkie Cloud.
- AI agent skills & plugins + published benchmarks for chunker comparison.
βοΈ Reasoning for
- Retrieval quality lever β bad chunk boundaries wreck recall; a semantic chunker often beats fixed-size for the same embedding model. Cheap upgrade to any RAG stack (e.g. over Brain via LightRAG).
- Light footprint β small dependency surface vs pulling a whole framework just to split text.
- Vector-DB agnostic β ships to Qdrant and 30+ others without custom glue.
Weak points: itβs one link in the chain (still need parsing + a vector DB + a retriever); βbestβ chunker is workload-dependent, so expect to benchmark; semantic chunking costs extra embedding calls at ingest.
Alternatives considered
- LangChain / LlamaIndex text splitters β bundled with the big frameworks; heavier, less specialised.
- Unstructured.io chunking β tied to its ETL pipeline.
- PageIndex β sidesteps chunking entirely with a vectorless hierarchical index; different philosophy for long docs.
RecursiveCharacterTextSplitterby hand β fine baseline, but you leave semantic/structure-aware gains on the table.
π Resources
- README: https://github.com/feyninc/chonkie
- Docs: https://docs.chonkie.ai
- Benchmarks: https://github.com/feyninc/chonkie#-benchmarks
Template: tool