Use cases
Chunk documents for retrieval
Chunk documents for retrieval
Split large text into consistent chunks so a retrieval pipeline can index and search it.
Control chunk boundaries precisely
Control chunk boundaries precisely
Fix chunk size and overlap before ingestion instead of relying on defaults.
Chunk outside of Knowledge Bases
Chunk outside of Knowledge Bases
Prepare text for a third-party vector database or an existing embedding pipeline.
Fix retrieval quality after ingestion
Fix retrieval quality after ingestion
Inspect, edit, or delete chunks in a Knowledge Base Datasource.
Overview
Chunking splits large documents into smaller pieces that a retrieval pipeline can index and search. Orq.ai offers the standalone Chunking API and chunk management inside Knowledge Bases. Text becomes chunks through three paths: a Knowledge Base chunks uploaded files automatically, the Chunking API prepares text that is added to a Datasource manually, or the Chunking API feeds an external vector database. The sections below compare the strategies and the ingestion paths.Quick start
Split text with thetoken strategy to see the API shape.
Which chunking strategy to use
The Chunking API offers six strategies:
For the full parameter tables and defaults for each strategy, see Datasource and Chunking.
Chunk size and overlap
- Chunk size controls how much context each retrieved unit carries. Smaller chunks retrieve more precisely but produce more chunks, more tokens, and higher embedding and storage cost. Larger chunks give the model more surrounding context but increase token use and generation cost.
- Chunk overlap repeats tokens across neighboring chunks so a boundary does not cut off a relevant passage. Higher overlap increases redundancy between chunks but improves the likelihood that relevant information is returned to models.
chunk_size512 for token, sentence, and recursivechunk_overlap0 for token and sentence (recursive has no overlap parameter)agenticuseschunk_size1024fastusestarget_size4096 bytes
Standalone chunking vs Knowledge Base chunking
Guides per path:
- Managed upload: Create a Datasource
- Manual pattern: Simple RAG cookbook
- External storage: Use Pinecone and custom vector databases
Inspecting and correcting chunks
After ingestion, chunks in a Knowledge Base Datasource can be listed, counted, retrieved, updated, and deleted, one at a time or in bulk. The Knowledge Bases page covers the UI flow and chunk metadata; the reference pages list the exact payloads.Worked example
For a complete example that chunks a document with the Chunking API, adds the chunks to a Knowledge Base Datasource, and retrieves them, see Simple RAG. For chunking into a custom vector database, see Use Pinecone and custom vector databases.Best practices
- Clean text before chunking (Knowledge Base path): pass
chunking_cleanup_optionsinsidechunking_optionswhen creating a Datasource to remove emails, credit card numbers, and phone numbers, and to normalize whitespace, before content is indexed. See Datasource and Chunking. - Keep chunk metadata primitive and consistent: strings, numbers, or booleans only; non-coercible values are discarded from the chunk.
- Match chunk size to the retrieval question: smaller chunks for precise Q&A, larger chunks when the model needs broader context.