▲ 7 r/pdf+2 crossposts

Claude is getting surprisingly good at reading really long PDFs

i remember Claude’s website saying it could handle PDFs up to around 1k pages, but a few days ago i tried uploading a PDF that was 2k+ pages just to see what would happen.

surprisingly, it handled it really well.

I was asking questions about pretty specific things buried in the document, and not only did it find the answers, it also gave me the line numbers for where the information came from when I asked. That part is actually super useful for me because I often need to go back to the original PDF and verify the source rather than just trusting the AI answer.

the only thing i really wish Claude had now is a better built-in PDF viewer.

Like imagine if I could click the citation / line number in Claude and it would open the PDF right there, jump to the exact sentence it used, and highlight it. For someone doing finance or research or working with documents where references actually matter, that would make the whole experience sooo much better.

reddit.com
u/This-Eye6296 — 6 days ago

Do YC actually look at your SAFE docs when you apply?

Working on our 2026 application and got stuck on one thing. We've raised a small amount on SAFEs already and I'm not sure how much detail YC wants at this stage.

Do they just want the headline numbers (how much, from whom) or do they actually dig into the terms, like the cap and discount? Trying to figure out if I need to get everything cleaned up and reviewed before submitting or if that only matters later at interview/due diligence stage.

Anyone who's been through it recently, how did it go for you?

Also curious, did you get a lawyer to look over your SAFEs before applying or just go with the standard YC ones as-is?

reddit.com
u/This-Eye6296 — 1 month ago
▲ 0 r/Rag

Today's Supreme Court birthright citizenship decision (Trump v. Barbara) is a brutal structured-doc retrieval test.

The birthright-citizenship decision (Trump v. Barbara) dropped today and from a retrieval standpoint it's a monster: 194 pages, a Roberts majority, a Jackson concurrence, a Kavanaugh concurrence-in-part/dissent-in-part, and three separate dissents (Thomas's alone is ~91 pages). The fun part is that the same phrase — "subject to the jurisdiction" — carries a different meaning depending on which opinion you're standing in. So it's a genuinely nasty structured-document test, and I threw it at PageIndex to see how the vectorless / tree-based approach holds up on something this layered.

Quick disclosure: I'm just a user, not affiliated — posting because the doc happened to be a great stress test.

What actually worked well:

  • Cross-section navigation was the standout. Asking "what's Kavanaugh's basis vs. the majority's basis" and having it land on the right opinion/section instead of returning a blender of similar-sounding chunks. On a doc where five-plus opinions are talking past each other, that's exactly where naive chunk+embed tends to fall apart.
  • Every answer pointed back to specific blocks in specific pages, so I could open the PDF and verify it. For a legal doc that's the whole game — an answer I can't trace is useless.
  • It didn't choke on length. 194 pages plus the long dissents, responses came back quickly with no obvious degradation as I went deeper in.

Caveats / where I did not push it (being straight):

  • This was a fairly happy-path run: one well-structured PDF with a real, if buried, hierarchy. I did not test the stuff these approaches usually struggle with — scanned/messy docs with no clean structure, or cross-document questions spanning multiple filings. So read this as "worked great on a hard single doc," not "retrieval solved."
  • I didn't benchmark traversal token cost against a plain vector-RAG baseline, so I can't speak to the query-time cost tradeoff.

Curious if anyone here has run genuinely messy legal/financial docs through tree-based / vectorless retrieval, or compared it to plain chunk+embed on something with this many internal cross-references. Where does it actually break?

reddit.com
u/This-Eye6296 — 2 months ago

Vectorless RAG can scale to millions of documents now?

I was reading the new PageIndex blog today and they just announced something called the PageIndex File System. If you haven't heard of PageIndex, it's the vectorless RAG framework that doesn't use embeddings at all. Instead of chunking docs and doing semantic similarity search, it represents each doc as a tree (sections → subsections → pages → content) and has an LLM navigate the tree to find answers. Repo is at like 26k stars, hit #1 on GitHub Trending earlier this year.

The criticism that always made sense to me was: ok but that only works on one document at a time, how does this scale to a real enterprise corpus with millions of docs? And the cost concern that came with it — if an LLM is navigating a tree on every query, doesn't that blow up?

Their answer starts with an observation I think is genuinely elegant: a file system is already a tree. Folders → subfolders → files. So they just made the folder hierarchy another layer of the same tree the LLM already knows how to navigate. One continuous tree from the top of your drive down into the internal structure of a specific document.

But the post is honest about why that alone doesn't actually work, which is the part I found interesting. Three problems with just inheriting your folder structure:

  1. Tons of corpora have no real hierarchy — flat S3 buckets, SharePoint dumps, document management systems where everything is in one pool
  2. A folder tree is one-dimensional — a contract belongs to a vendor AND a region AND a fiscal year AND a product line, but a folder forces you to pick one
  3. Folder labels are often garbage (misc/, final_v3_USE_THIS_ONE/, 2019_legacy/) so the LLM ends up navigating noise

So they solve it with three things, and this is where the query-time strategy comes in:

Virtual nodes — when no usable hierarchy exists, they synthesize one. Topic clustering groups documents into nodes, and LLM-inferred metadata (category, summary, key entities) becomes additional internal nodes. The same document can sit under multiple virtual ancestors at once, which a real folder tree fundamentally can't express.

Query-dependent tree construction — this is the part that genuinely changes how I think about retrieval. The tree isn't fixed at ingestion. It's built on demand, per query. The example they use: "What did vendor X charge us in 2024?" wants a tree organized by vendor → year. "Show me all contracts up for renewal next quarter" wants a tree organized by status → renewal date. Same corpus, completely different tree depending on what you're asking. No re-ingestion, no re-embedding — the structure gets composed at query time from the metadata axes that are actually relevant. They also mention the system improves over time because traversal patterns from past queries refine the virtual nodes.

Adaptive tree search (this is where the cost concern dies) — the LLM doesn't blindly walk every level. At each node, it picks a strategy. If the children have informative labels, it goes layer-by-layer and prunes early. If the labels are uninformative, it does what they call dynamic flattening — collapses the entire subtree down to the leaves and just defers to the actual content. Useless intermediate levels get skipped entirely, so the LLM only burns calls where the structure is actually carrying signal. The depth of the search shrinks to the depth that's actually informative for that specific question.

That last piece is what makes the cost story actually work at million-doc scale. You're not paying for an LLM to navigate every node of a giant tree — you're paying for it to navigate exactly the parts that are useful for this query.

What do you think of their approach?

u/This-Eye6296 — 3 months ago
▲ 73 r/Rag

I was reading the new PageIndex blog today and they just announced something called the PageIndex File System. If you haven't heard of PageIndex, it's the vectorless RAG framework that doesn't use embeddings at all. Instead of chunking docs and doing semantic similarity search, it represents each doc as a tree (sections → subsections → pages → content) and has an LLM navigate the tree to find answers. Repo is at like 26k stars, hit #1 on GitHub Trending earlier this year.

The criticism that always made sense to me was: ok but that only works on one document at a time, how does this scale to a real enterprise corpus with millions of docs? And the cost concern that came with it — if an LLM is navigating a tree on every query, doesn't that blow up?

Their answer starts with an observation I think is genuinely elegant: a file system is already a tree. Folders → subfolders → files. So they just made the folder hierarchy another layer of the same tree the LLM already knows how to navigate. One continuous tree from the top of your drive down into the internal structure of a specific document.

But the post is honest about why that alone doesn't actually work, which is the part I found interesting. Three problems with just inheriting your folder structure:

  1. Tons of corpora have no real hierarchy — flat S3 buckets, SharePoint dumps, document management systems where everything is in one pool
  2. A folder tree is one-dimensional — a contract belongs to a vendor AND a region AND a fiscal year AND a product line, but a folder forces you to pick one
  3. Folder labels are often garbage (misc/, final_v3_USE_THIS_ONE/, 2019_legacy/) so the LLM ends up navigating noise

So they solve it with three things, and this is where the query-time strategy comes in:

Virtual nodes — when no usable hierarchy exists, they synthesize one. Topic clustering groups documents into nodes, and LLM-inferred metadata (category, summary, key entities) becomes additional internal nodes. The same document can sit under multiple virtual ancestors at once, which a real folder tree fundamentally can't express.

Query-dependent tree construction — this is the part that genuinely changes how I think about retrieval. The tree isn't fixed at ingestion. It's built on demand, per query. The example they use: "What did vendor X charge us in 2024?" wants a tree organized by vendor → year. "Show me all contracts up for renewal next quarter" wants a tree organized by status → renewal date. Same corpus, completely different tree depending on what you're asking. No re-ingestion, no re-embedding — the structure gets composed at query time from the metadata axes that are actually relevant. They also mention the system improves over time because traversal patterns from past queries refine the virtual nodes.

Adaptive tree search (this is where the cost concern dies) — the LLM doesn't blindly walk every level. At each node, it picks a strategy. If the children have informative labels, it goes layer-by-layer and prunes early. If the labels are uninformative, it does what they call dynamic flattening — collapses the entire subtree down to the leaves and just defers to the actual content. Useless intermediate levels get skipped entirely, so the LLM only burns calls where the structure is actually carrying signal. The depth of the search shrinks to the depth that's actually informative for that specific question.

That last piece is what makes the cost story actually work at million-doc scale. You're not paying for an LLM to navigate every node of a giant tree — you're paying for it to navigate exactly the parts that are useful for this query.

What do you think of their approach?

u/This-Eye6296 — 4 months ago
▲ 25 r/LLMDevs

A couple of weeks ago Karpathy posted a thread about what he called "LLM Knowledge Bases" — using an LLM to compile raw documents (papers, articles, PDFs) into a structured, interlinked Markdown wiki that lives in Obsidian and gets queried later.

Knowledge accumulates instead of being re-derived from scratch on every RAG query. The thread blew up. It clearly resonated.

But Karpathy himself flagged the hard part in a follow-up: long books and PDFs break this workflow. The suggestion was to use EPUB instead, or process one chapter at a time. More of a workaround than a fix.

There's now an open-source implementation that takes a real swing at the long-document piece — OpenKB (Apache 2.0).

The quick version

CLI tool. Drop files into raw/, an LLM compiles them into a wiki of Markdown files with [[wikilinks]]. Open the folder in Obsidian and the IDE Karpathy described basically materializes. Query it, chat with it, lint it for contradictions and gaps, watch mode for auto-updates as new files land.

How long PDFs are handled

Standard chunking + vector retrieval doesn't really work for dense 200-page reports — context rot, lossy summarization, and the LLM never sees the document's structure.

OpenKB uses tree indexing instead: a hierarchical index of each long doc, basically a programmatic table of contents with summaries at every node. The LLM reads the tree and reasons over it to find what it needs, the same way a human flips through a long book. No chunking, no vector DB.

Short docs (under 20 pages by default) just get read in full. Long PDFs go through the tree index. Both feed into the same wiki compilation step, where the LLM writes summary pages, updates concept pages with cross-document synthesis, and keeps everything cross-linked. A single source might touch 10–15 wiki pages on the way in.

The rest of the stack

  • Formats: PDF / Word / PPT / Excel / HTML / CSV / MD via Microsoft's markitdown
  • Models: Multi-LLM via LiteLLM — OpenAI, Anthropic, Gemini, anything LiteLLM-compatible
  • Multi-modality: figures, tables, and embedded images get retrieved and reasoned over alongside text, not stripped out during ingestion
  • License: Apache 2.0, no paid tier, no locked features
reddit.com
u/This-Eye6296 — 4 months ago