Prompt
Do I need to chunk documents differently for slides, PDFs, and wiki pages?
Latest observation
Nov 14, 2026
OpenAI APIWeb search: off
Yes — usually you should chunk them differently, because the structure and “meaning boundaries” are different.
Rule of thumb
Chunk by the natural units of the document type:
Slides
- Chunk per slide or even per slide section.
- Slides are already highly compressed; one slide often contains one main idea.
- Keep:
- title
- bullets
- speaker notes, if available
- nearby visual captions/labels
- Avoid splitting a slide unless it’s very text-heavy.
PDFs
- Chunk by paragraphs, headings, or sections.
- PDFs often preserve layout rather than semantic structure, so extraction quality varies.
- Good strategy:
- use headings if you can detect them
- otherwise chunk by paragraphs with overlap
- keep tables and figure captions together when possible
- Watch out for page boundaries: don’t assume a page is a good chunk unless the document is very short or page-like.
Wiki pages
- Chunk by section/subsection.
- Wiki pages usually have explicit headings and hierarchical structure.
- Good strategy:
- one chunk per section
- split large sections into paragraphs with overlap
- preserve the heading path, e.g.
Page > Section > Subsection
- This helps retrieval because each chunk has clear topical context.
Best practice
Use a format-aware chunking strategy:
- Slides: slide-level chunks
- PDFs: heading/paragraph-aware chunks with overlap
- Wiki: section-aware chunks with hierarchy metadata
Also add metadata like:
- source type
- document title
- section heading
- page/slide number
- order/index in document
If you want a single simple approach
Use:
- semantic chunking with boundaries based on headings/paragraphs
- a small token overlap between chunks
- preserve structure metadata
That works reasonably well across all three, but format-specific chunking is usually better.
If you want, I can give you a recommended chunking template for each format, or a code example for implementing it.