Skip to main content
When you upload a document to Gloo, Search and Grounded Responses don’t operate on the whole file. They operate on chunks: passages of text small enough to retrieve precisely and large enough to carry meaning. A question about one paragraph of a 40-page report should surface that paragraph, not the entire report, and the model grounding an answer should receive exactly the passages that matter. Chunking produces those passages. It runs automatically on every upload; you’ll see it as the CHUNKING status while an item is processing. This page explains what happens between upload and searchable, and how to prepare your own content with that in mind.

From Upload to Searchable

Every item you upload moves through the same processing pipeline:
Processing pipeline: documents are parsed while audio and video are first transcribed, then all content is chunked, embedded, and indexedProcessing pipeline: documents are parsed while audio and video are first transcribed, then all content is chunked, embedded, and indexed
Parse. Gloo detects the file format automatically and extracts clean text from it. Documents (Markdown, HTML, PDF, Word, and the other supported formats) are parsed directly. Audio and video files take one extra step first: Gloo transcribes them, then chunks the transcript with its timing kept, and embeds and indexes it like any other item. Chunk. The extracted text is split into chunks (the CHUNKING status). Embed. Each chunk is encoded for semantic search, so retrieval can match on meaning rather than exact keywords. For uploaded content, Gloo manages the embedding models and vectors. If you manage your own vector store, see the Embeddings API. Index. The embedded chunks are stored and made retrievable. When the item reaches COMPLETED, its chunks are what Search queries and grounded responses draw from. None of these stages needs configuration, and none can be skipped. You shape the outcome through what you upload and how you divide it into items, and you can set the chunk size and overlap for an upload.

How Content Is Split

Gloo splits documents on natural text boundaries, so chunks follow the structure of your writing. By default a chunk holds up to 1,500 characters. A new chunk starts at a heading when the section before it would not fit, and short sections are combined. PDFs are chunked as one continuous text rather than page by page, so a paragraph that runs onto the next page can stay in one chunk. When a paragraph is too long for one chunk, it is cut into pieces, and each piece repeats the last 200 characters of the piece before it:
One item's text, a short paragraph and a long one, divided into three chunks: the short paragraph is a whole chunk with no overlap, and the long paragraph is cut into two chunks that share a highlighted region of overlapping textOne item's text, a short paragraph and a long one, divided into three chunks: the short paragraph is a whole chunk with no overlap, and the long paragraph is cut into two chunks that share a highlighted region of overlapping text
The overlap exists because meaning doesn’t stop at a cut. Repeating a small window of text in both pieces keeps each one understandable on its own, so retrieval doesn’t miss a passage just because the answer straddles the cut. Whole paragraphs don’t overlap, because nothing was cut between them. Because splitting prefers natural boundaries, well-structured text produces better chunks than flat text. Headings, paragraphs, and section breaks give the splitter good places to cut; a wall of unbroken text forces arbitrary ones. This is why the content preparation guide recommends Markdown: it preserves exactly the structure that chunking uses. A heading followed by a paragraph too long to share a chunk with it stays at the end of the previous chunk. These defaults apply to files you upload with POST /ingestion/v2/files or in Studio, and to web pages and feed articles that Studio imports for you. Some content is chunked its own way, so these sizes don’t apply to it:
  • Transcripts Gloo makes from audio and video are cut into chunks of up to 1,000 characters, with up to 100 characters of overlap between neighboring chunks, and each chunk keeps its timing.
  • JSON files are split along their structure, so each chunk is valid JSON.
  • Content sent to the deprecated real-time upload (POST /ingestion/v1/real_time_upload) is cut into chunks of up to 1,000 characters, with up to 100 characters of overlap between neighboring chunks. To get the defaults above and set your own, upload files to POST /ingestion/v2/files instead.
Each chunk stays tied to its parent item, so search results and grounded responses can attribute a passage to the item it belongs to, along with that item’s metadata: title, author, canonical URL, tags, and the other item metadata fields. Item metadata travels with every chunk of that item into retrieval, so its quality matters.

Set Chunk Size and Overlap

Dense reference material often retrieves better in small chunks, and narrative content in large ones. To change the defaults for an upload, add any of these form fields to POST /ingestion/v2/files:
Shell
  • Options you leave out use their defaults, and all three are checked together. chunk_size=200 on its own is refused, because the default overlap is also 200.
  • An invalid value returns a 400 with the code invalid_chunking_options and a message naming the problem. Nothing is stored or queued.
  • The options apply to documents and PDFs. Audio and video transcripts and JSON files ignore them.
  • They apply when a file is uploaded. Content already in your library keeps its chunks. Uploading an identical file again doesn’t re-chunk it: the file comes back in the response’s duplicates list. To re-chunk an item, replace it with the update parameter.
  • Larger chunks can cost more. A grounded request retrieves up to sources_limit chunks, so larger chunks send more input tokens to the model.

Can Chunking Be Turned Off?

No. Chunking always runs, and there is no setting to disable or bypass it. You do have a second lever, beyond chunk size and overlap: item granularity. Content short enough to fit within a single chunk is not split further, so a short item effectively becomes one chunk. If your content must not be merged with a neighbor, such as individual Q&A pairs, upload each unit as its own item. The item remains isolated from neighboring content, but oversized items may still be split into multiple chunks. The next section covers when that is the right call.

Pre-Split or Let Gloo Chunk?

Default: let Gloo chunk. For most content (articles, reports, transcripts, long-form prose of any kind), upload the document as one item. Pre-splitting long prose into fragments works against you: it discards the document structure that helps chunking find natural boundaries, and it multiplies the items you have to manage. Split content into separate items before upload only when it has hard semantic boundaries that retrieval must never cross: units that would be wrong to return partially or merged with a neighbor.
  • Q&A content. Each question-and-answer pair is one unit. A chunk containing half an answer, or the end of one answer and the start of the next question, misleads retrieval.
  • Devotionals and daily entries. Each entry stands alone. A passage spanning two days’ entries belongs to neither.
  • Episodic collections. If each segment has its own title, date, and canonical URL, it deserves its own item so its metadata and citations point to the right place.
This is a decision about what constitutes one document, not about tuning chunk sizes. Within each item you create, Gloo still chunks automatically. Each pre-split item needs its own producer_id and metadata; the content preparation guide covers how to structure that.

Guidance by Content Type

Beyond the few content types chunked their own way, what varies by content type is how you should divide content into items and what metadata to attach:

What Gloo Handles for You

After upload, these are automatic, so don’t build them yourself:
  • Format detection and parsing for all supported document formats, with no format flags.
  • Transcription of audio and video files, whether uploaded directly or ingested through Studio connectors.
  • Chunking, as described on this page, with defaults you can change for an upload.
  • Embedding of every chunk for semantic search, with no models or vectors to manage.
  • Vector storage and retrieval indexing, with no database to run or index to maintain.
Your job ends at clean text, sensible item granularity, stable IDs, and good metadata. Everything between upload and searchable is Gloo’s job.

Next steps

To see chunking in a working pipeline, follow Part 1: Set Up the Pipeline of the RAG pipeline tutorial. For every field the upload endpoint accepts, see the Ingestion API reference. For Learning Center background on chunking and metadata in RAG systems generally, see Building a Knowledge Base.

Search

Query the chunks this pipeline produces.

Grounded Responses

Ground model answers in your indexed content.

Preparing Content for Ingestion

The full source-agnostic pattern for structuring content before upload, including producer_id schemes and metadata timing.

Upload Content

Send files to the ingestion endpoint.