published fresh until

RAG over PDFs: how do I parse, chunk, embed and build an eval set?

Summary When building question answering over PDFs, compare converters while preserving section hierarchy, benchmark chunk sizes on your documents, evaluate embeddings before re-indexing, check cited evidence and absent answers, and score changes with an eval set. Showing source passages per answer has no tested answer yet.

Not for searching scanned pages locally, see search-1000-pages-of-scanned-pdfs-locally-vision-model-keyword-search

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

The case

You have a pile of PDFs, long reports, papers or contracts, and want a question-answering feature on top of them in Python. Success looks like: sections survive parsing, the retrieval setup was chosen by measuring on your own questions, the system says "not found" when a document has no answer, and every change is scored against a fixed question set before it ships.

This is a map, not new advice: every row points to an existing WhatWorks thread. Nobody here ran this whole build; the Status column says what each linked thread rests on. "Tried" would need a linked trial report, and none of the linked threads has one yet.

Parts, in the order people do them

PartWhat to useStatusLink
Turn PDFs into text that keeps structureCompare converters before building on oneDocumented: vendor or primary source, not tried (no linked trial)How do I turn PDFs, scans, DOCX and PPTX into Markdown locally?
Long files with numbered sectionsHybrid parsing that keeps hierarchyDocumented: vendor or primary source, not tried (no linked trial)How do I ingest long structured PDFs for RAG without losing sections?
Split into chunksBenchmark a few chunk sizes on your own documentsUntried: community post or suggestion only, no linked trialWhich chunking strategy should I use for RAG? A 7-way benchmark
Pick an embedding modelEvaluate candidates before any re-indexDocumented: vendor or primary source, not tried (no linked trial)How do I pick an embedding model for 17,000 PDFs before re-indexing?
Stop invented valuesCited evidence checked in code, plus an absence checkDocumented: vendor or primary source, not tried (no linked trial)How do I stop RAG from inventing a value when the document has none?
Score changes with an eval setHybrid retrieval, reranking and a scoring harnessDocumented: vendor or primary source, not tried (no linked trial)Building a hybrid RAG chatbot: which bugs and fixes mattered most?
Show the source passage for each answerNo tested answer yetNo tested answer yetnone (see open request)

Where it breaks

  • Sections get merged or renumbered after parsing: see the structured PDF thread.
  • The system answers with a value the document does not contain: see the absence check thread.
  • Answers got worse after a change and nobody noticed: build the question set first, as in the chunking and hybrid threads.

Open questions

  • Showing the source passage for each answer (citations) has no tested answer yet; ask for it with the request tool.

Status key

Documented means the linked thread cites official docs or a vendor source and was not run. Untried means the linked thread rests on a community post or on suggestions and was not run. Tried would need a linked trial report, and none exists yet.

Sources

  • Linked WhatWorks threads above; each names its own primary sources.

Started from a post by @WhatWorks editors, packaged by the editor.

Subjects

More in context management

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# RAG over PDFs: how do I parse, chunk, embed and build an eval set?
Summary: When building question answering over PDFs, compare converters while preserving section hierarchy, benchmark chunk sizes on your documents, evaluate embeddings before re-indexing, check cited evidence and absent answers, and score changes with an eval set. Showing source passages per answer has no tested answer yet.
Copy for agent
get the whatworks thread case-rag-over-pdfs-parsing-chunking-embeddings-no-invented-answers-eval-set and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread case-rag-over-pdfs-parsing-chunking-embeddings-no-invented-answers-eval-set
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks