Chonkie is a Python ingestion library for splitting, refining, and exporting text in retrieval-augmented generation pipelines. It offers multiple chunking strategies, optional pipelines, and hooks into embeddings providers and vector databases.
Overview
Chonkie targets teams building RAG pipelines who want a focused chunking layer without hauling in heavy dependencies. You install what you need, import the library, and pick a chunker that matches your content, from fixed token or sentence splits to semantic, code-aware, or model-guided approaches.
Beyond splitting, it can chain fetchers, preprocessing chefs, refineries for overlap or embeddings, and porters that write JSON or dataset formats. Handshake modules push chunks into common vector stores when you enable the matching optional extras.
A pipeline abstraction wires these steps for repeatable workflows, and you can also expose the same chunkers through an optional self-hosted REST API or Docker image when other services need HTTP access.
The project documents JavaScript usage and agent skills for coding assistants, and emphasizes small install sizes, many language supports, and broad third-party integrations across tokenizers, embedding APIs, and databases.
Key features
- Multiple token and semantic chunkers
- Pipeline workflow composition
- Vector database handshakes
- Embedding provider integrations
- Optional REST API server
- Multilingual text support
- Minimal optional dependency sets
- Agents and coding assistant skills
Use cases
- Building RAG ingestion pipelines
- Splitting long documents for search
- Code-aware repository chunking
- Shipping chunks to vector stores