USE CASE

How do you turn PDFs into a searchable knowledge base that cites pages?

Most PDF piles fail at the same point: the text is searchable, but nobody can tell which page an answer came from. A useful knowledge base keeps the file, the page, and the claim connected. That is the whole job.

What "searchable" should mean

Searchable is not the same as indexed. A folder search finds a file by name. A knowledge base answers a question and points to the page that supports the answer, so you can check it in one click.

Set the target before you start: for any answer, the system should return the file name, the page number, and a short quote. If it cannot, you have a file store, not a knowledge base.

Mesocosm Desktop — Research Notes workspace used as a source library, with a report column, a draft column, and a material column

Supported formats and what survives

The knowledge-base template imports six formats. The list is a starting point, not a promise that every file extracts cleanly.

FormatWhat usually survivesWhat usually breaksCheck before you rely on it
Markdown (.md)Headings, lists, simple tablesNested tables, raw HTMLOpen the rendered view and compare
PDF, text layer (.pdf)Page numbers, paragraphsMulti-column layouts, tables, footnotesExtract five pages and read them
PDF, scanned (.pdf)Page images after OCROCR errors, handwriting, stampsEyeball the same five pages
Word (.doc, .docx)Headings and paragraphsTracked changes, comments, text boxesCheck the converted text, not the layout
Excel (.xlsx, .xls)Cell values, sheet namesFormulas, merged cells, stylesConfirm values, not formulas
Plain textEverything as textStructure and page numbersAdd a source note manually

If a format is not on the list, convert it to one that is before import. A clean Markdown or text export is often better than a complex Word file whose layout will not survive.

Pass 1: extract text and keep page numbers

Extract text per page, not per document. Page-level extraction is what makes the citation possible later. Keep the original file too; a quote without the page is hard to verify.

Scanned PDFs need OCR before anything else. Check a few pages by eye after extraction, especially tables and footnotes, because those are where extracted text usually breaks.

Pass 2: build the index

Build one index entry per section, not per document. Each entry should carry the file, the pages, the topic, and a short summary. Small entries retrieve more precisely than whole-document summaries.

Then add a second structure by topic: which files cover the same question, and where they disagree. This is what lets you ask a comparison question, not just a lookup question.

Mesocosm Desktop — Research Notes material card with a dated source compilation

Pass 3: answer with citations

Ask questions against the index, and require the answer to name the file and page. If the index has no matching entry, the correct answer is "not found", not a plausible guess.

Keep a small evaluation set: ten questions with the pages that should be cited. Run it after every rebuild. When the index changes, the set tells you whether retrieval got better or just different.

Where it breaks at 500 PDFs

Twenty files hide problems that five hundred expose. The table below is the difference between a demo and a library you can maintain.

Symptom at scaleLikely causeWhat to change
Import takes hours or burns creditsEvery page is extracted and checked in one batchImport by topic; measure twenty files first
Scanned files return empty answersOCR was skipped or failedOCR before import; keep the page images
The same passage appears twiceDuplicate files or overlapping batchesChecksum and filename before import
Rebuilding the index takes all dayFull rebuild after every batchAdd in batches; rebuild only the changed topic
Answers cite the file but not the pageDocument-level extractionRe-extract per page; store page numbers
Retrieval returns near-duplicatesChunks are too large or too smallSplit by section, not by character count
Storage and backup grow without limitOriginals, extracted text, and index all keptKeep originals; prune old extracted text
People see files they should notOne library for several access levelsSplit by audience; scope the Space

The last row is a permissions problem, not a search problem. Decide who can see the library before the five hundredth file arrives.

Which pass fails at 500 PDFs

The symptom table tells you what broke. This one tells you where to look first, because the fix belongs to a different pass.

PassWhat failsWhat you seeWhat to change
ImportThe batch is one undifferentiated pileNo owner, no topic, and no stop ruleImport by topic, twenty files at a time
ExtractionText runs across columns or pagesA quote that reads correctly but is attached to the wrong pageKeep page images and spot-check a sample per document class
IndexingOne entry per document instead of per sectionAnswers that are broad, vague, or cite the whole fileIndex sections with a locator and a short summary
RetrievalChunks are too large or too smallNear-duplicate passages, or a miss on an exact phraseSplit by section, then re-run the ten-question set
RebuildEvery batch rebuilds everythingHours of work for a small additionRebuild only the changed topic and keep a timestamp
PermissionsOne library serves several access levelsA restricted file appears in a searchSplit by audience before the library grows

If you only have time for one check, run the extraction row on five pages from each document class. Most "the AI is wrong" reports are an extraction or indexing failure that looked fine in the demo.

A cited answer you can check

A useful answer is not a summary. It is a claim with a locator. Here is the shape to require:

Question: What is the refund window for annual plans?

Answer: Annual plans can be refunded within 14 days of purchase. This is stated in pricing-policy.pdf, page 3, section "Annual plans".

Check: Open page 3 and confirm the sentence before you use the answer.

If the index has no matching passage, the correct output is "not found in the indexed files". That is a successful answer, not a failure. A confident guess is the failure.

Import in batches, not in one pass

A five-hundred-file import is not one job. Run it as three passes: extract and verify twenty files, build the index for that topic, then ask five questions whose answers you already know. Add the next batch only when the sample passes.

Set a stop rule before you start: if the extraction sample fails on two documents of the same class, stop and fix that class instead of importing the rest. The rule protects both the credit budget and the credibility of the library.

How to run it on Mesocosm

Put the PDFs and the index in one workspace so the source and the answer stay together. Ask AI to process one batch, check the page references, then add the next batch. The built-in browser is for pages that need a sign-in.

For the broader structure, read how to do AI knowledge management. When the PDFs are papers rather than reports, continue with the AI literature review workflow.

How to judge whether this works for you

CheckWhat to runPasses whenFails when
Page-level citationImport five PDFs, ask a question whose answer sits on a known page, and open the cited page.The answer names the file, the page, and a quote that appears there.The answer names the file but not the page.
Table fidelityTake one scanned PDF with a six-column table, extract it, and compare headers and three totals with the page image.Headers and totals match the image.A column is shifted, so this document class is not ready.
Duplicate testAdd the same file twice under different names, rebuild, and search a phrase from it.One passage comes back.Two near-identical passages appear.
Permission testSearch for a restricted file from a second Space or lower-access account.The file stays hidden.It appears, so the library is scoped wrong.
Five-page sampleExtract the same five pages before a large import and read them.Text, headings, and page numbers survive.You would be importing noise at scale.
Scale testImport twenty files first and read the time and credit use.The rate predicts the full library.The estimate is off by more than you can absorb.

Two limits

Input limit: scans, stamps, and tables that cross pages

Handwriting, stamps, and multi-page tables defeat OCR in a specific way: the words survive but the row and column associations do not. A total or a footnote can be attached to the wrong line while the citation still looks valid.

Capability limit: retrieval does not verify currency or authority

The index returns passages; it does not know that a policy was superseded or that a memo is a draft. An old edition and its replacement can be cited with equal confidence unless you record version and date and exclude retired files.

Common questions

Can it answer across 500 PDFs?

It can, if files are batched by topic and every index entry keeps file and page. At 500 files the limit is maintenance, not retrieval: dedupe, permissions, and rebuild time. Test twenty first.

How many credits does a 500-page import use?

There is no fixed price: credits follow AI calls, and OCR or retries add calls per page. Import twenty pages, read the ledger, and multiply; batch by topic so one bad run cannot consume the whole budget.

What happens when OCR reads a table wrong?

The answer may quote the wrong cell while the citation looks valid. Keep the page image, flag table-heavy pages for manual review, and never trust a total that was not checked against the image.

Drive search finds files by name or keyword. This returns the passage and the page, and refuses when the index has no match; the page-level citation is the difference.

Next step

Pick one topic, add twenty PDFs, and build the index before you ask the first question.

MESOCOSM DESKTOP

Download Mesocosm and run this workflow on your desktop.

Windows · macOS (Apple silicon and Intel). Download first, then start from a request or a template.