Chunking policy
When you upload a document knowledge source, you choose a chunking policy that controls how extracted text is split before embedding. The choice is stored on the source and applied during background processing: extract text (Docling) → chunk → embed → index.
Policies at a glance
| Policy | Best for | Behavior |
|---|---|---|
| Paragraph | General policies, manuals, reports, mixed prose | Merge paragraphs (blank-line splits) up to ~1000 characters per chunk |
| FAQ | Support Q&A lists, FAQ pages | One chunk per detected question/answer pair; falls back to paragraph if nothing matches |
| Custom | Tuned corpora | You set chunk size (100–8000 chars) and overlap (up to half of chunk size); uses the same paragraph-merging logic as Paragraph |
Re-upload or re-process a source to apply a new policy. Changing policy does not automatically re-index files already processed.
Paragraph
- Splits on blank lines, then greedily merges paragraphs until the size target is reached.
- Default overlap is 0.
- Oversized single paragraphs may produce chunks larger than the target.
Custom
You specify:
- Chunk size - target maximum characters per chunk (100–8000).
- Overlap - characters copied from the end of one chunk into the start of the next, which can help retrieval across boundaries.
Custom does not change the splitting algorithm-only the numbers.
FAQ
- Scans line by line for question markers, then treats following lines as the answer until the next marker.
- One searchable chunk per pair when possible; very long answers may split into multiple chunks with the question repeated on each part.
- If no FAQ patterns are found, processing falls back to paragraph chunking.
How questions are detected
A new FAQ item starts when a line begins with one of these patterns (case-insensitive):
- Q: Q. Q) Q-
- Question: Question. (and similar punctuation)
- FAQ: …
- Markdown-style headings such as ## Q: …
- Numbered lines such as 1. 2. at the start of the line
Comment:Comment lines (structure and author notes)
Comment:Comment.Comment)Comment-Comment:[Comment: your text here]
Q: …
…
Comment:Comment:Comment: Orders & shipping
Q: How long does delivery take?
Standard shipping is 5–7 business days.
Comment: Returns
Q: What is your return policy?
You may return unworn items within 30 days.
Formatting FAQ documents (Word / PDF)
Author in plain paragraphs when possible-avoid tables, text boxes, and multi-column layouts.
Recommended pattern - one question per paragraph, then answer paragraph(s):
Q: What is your return policy?
You may return unworn items within 30 days with receipt.
Q: Do you ship internationally?
Yes. We ship to most countries. Import duties may apply.
Question: and numbered questions (1. What are your opening hours?) work the same way.
Do
- Put the full question on one paragraph.
- Use a consistent prefix (Q` or Question:) for every item.
- Use normal paragraph breaks between question and answer.
- Use a dedicated FAQ document for FAQ content; use Paragraph for mixed prose.
Avoid
| Pitfall | Why |
|---|---|
| Questions without Q: / Question: / numbering | Not detected; content before the first marker is skipped. |
| Question and answer in the same paragraph | The whole line is the “question”; answer may be empty. |
| Shift+Enter inside a question | The next line may be treated as answer text. |
Lines starting with | Starts a new FAQ item-use bullets in answers instead. |
| Intro you need indexed | Preamble is ignored-use |
| Starts a new context for the next question only; it is not added to the current answer. |
After upload, confirm processing is completed and test chat with wording similar to your questions.
What is stored
Upload metadata includes a chunking object, for example:
{ "chunking": { "strategy": "faq" } }
or
{
"chunking": {
"strategy": "manual",
"chunk_size": 1200,
"chunk_overlap": 100
}
}
After processing, resolved settings are recorded on the source for support and debugging.
Ingest trace (debug observability)
chunking.debug_trace: trueINGEST_DEBUG_TRACE=truedeployment_type: ingest_trace- Summary - policy, namespace, index, total chunk count
- Up to 20 chunk payloads (full text)
- Truncation notice if more than 20 chunks were produced (all chunks are still indexed)
- Upsert result after Pinecone upload
ingest_log_chat_idsource_metadata