Document navigation,
for AI Agents.
DocSlicer is a lightweight parser that turns PDFs, DOCX, PPTX, and HTML into a queryable tree of sections. Stop dumping entire files into your context window - let your LLM pull only the chunks it needs.
import docslicer
# HSBC Holdings PLC Annual Report — 372 pages · 518,426 tokens
result = docslicer.parse_document("hsbc_annual_report_2025.pdf")
# → done in 7.85s
# inspect the outline before pulling anything into context
result.hierarchy.to_outline()
# - Highlights
# - Our Strategy
# - ...
# - Financial Summary
# - Income statement commentary
# - Net interest income
# - Summary of interest income by type of asset
# - ...
# pull only what the agent needs
section = result.find_heading("Summary of interest income by type of asset")[0]
chunks = result.chunks_under(section) # ~1,000 tokens
# | | Avg balance | Interest | Yield |
# | | 2025, $m | 2025, $m | % |
# | ----------------------------------- | ----------- | -------- | ----- |
# | Short-term funds and loans to banks | 325,790 | 11,460 | 3.52 |
# | Loans and advances to customers | 971,804 | 46,036 | 4.74 |
One unified parser.
Endless downstream workflows.
Go from a 400-page doc to structured, agent-ready data in three lines of Python. No API keys, no gigabytes of model weights to download on first run - just queryable objects out of the box.
Layout-aware parsing
that understands the page.
DocSlicer reconstructs the document structure - so your LLM sees clean, faithful content instead of scrambled text.
Heading hierarchy
Every heading is detected and reconstructed into a navigable outline tree — so an agent can jump straight to the section it needs instead of scanning the whole document.
Reading order
Multi-column layouts, figures, and footnotes are untangled into the exact sequence a human would read — no scrambled text bleeding across columns.
Tables
Table structure is recovered cell-by-cell, preserving the row- and column-spans that flat text extraction silently throws away.
The only parser that combines
speed and accuracy.
BizDocBench scores parsers on six axes, across PDF, DOCX, PPTX and HTML. DocSlicer is the only tool that is well-suited for agentic harnesses, combining fast parsing, with accuracy and support for multiple document types
| Tool | Score | Coveragen=77 | Speedn=parsed | Hierarchyn=9 | Faithfuln=9 | Tablesn=12 | Retrievaln=19 | Parsed |
|---|---|---|---|---|---|---|---|---|
| docslicer | 0.88 | 1.00 | 0.88 | 0.85 | 0.98 | 0.80 | 0.76 | 77/77 |
| docling | 0.70 | 1.00 | 0.38 | 0.49 | 0.89 | 0.75 | 0.71 | 77/77 |
| markitdown | 0.58 | 1.00 | 0.85 | 0.06 | 0.80 | 0.26 | 0.54 | 77/77 |
| unstructured | 0.58 | 0.91 | 0.11 | 0.43 | 0.91 | 0.48 | 0.64 | 70/77 |
| opendataloader | 0.54 | 0.58 | 1.00 | 0.39 | 0.65 | 0.27 | 0.33 | 45/77 |
| pymupdf4llm | 0.45 | 0.60 | 0.65 | 0.11 | 0.65 | 0.36 | 0.36 | 46/77 |
| mineru | 0.41 | 0.60 | 0.14 | 0.42 | 0.62 | 0.30 | 0.39 | 46/77 |
| marker | 0.37 | 0.60 | 0.16 | 0.19 | 0.61 | 0.30 | 0.38 | 46/77 |
77 business documents · Apple M4 Max, 16 cores, 64 GB · every tool at its official defaults, versions pinned · score is the mean of the six axes, each macro-averaged over its documents · speed is a log-scaled throughput score over the documents a tool parsed · a failed or assisted parse scores 0 on every axis