r/Rag • • 6h ago

Showcase What I learned building a GraphRAG that reads documents as rendered pages (open source, benchmarks vs RAG-Anything, LightRAG, GraphRAG)

13 Upvotes

Disclosure: I built this, and it's open source (Apache-2.0).

At work, documents pile up from every department, each in its own formats and its own way of laying things out: specs in Word, test records in Excel, review decks in PowerPoint, scanned PDFs, and the mail that carries them. Most RAG pipelines flatten these into text, so the tables, pictures and charts are gone before retrieval starts. If you work with a lot of different people, you probably know the feeling. Here is what worked for me.

A 30-second demo (a spreadsheet, a slide and a contract, each answer's source highlighted on the page) is at the top of the README: https://github.com/ToBeSuperior/Graph-Me-Maybe

Read the page, not the text. Every format is rendered to page images first. A VLM reads the outline off each page: which heading holds which paragraph, which label belongs to which figure, which rows a table really has. Styles and font sizes are not trusted, because half the documents at work don't use them.

Make the outline the graph. Instead of extracting entities and relations from every chunk, the graph is each document's own hierarchy (sections and the units under them), plus links between documents that cite or resemble each other (a memo naming a spec, copies and versions of one file). That keeps indexing cheap and the graph small.

Retrieve graph chunks cut along the outline. Search is hybrid (vector + full-text, fused with weighted RRF) over chunks that follow the outline, and the answer gets each chunk's pictures where they stand in the text, so it can read a value off a chart. Every claim cites the page, slide, cell or paragraph, highlighted on the original.

Benchmarks. Same documents, same answering model (Claude Haiku 5.5) for every system, graded by Claude Opus 5.5, on MMLongBench-Doc and DocBench:

systemMMLongBench-DocDocBench
Graph-Me-Maybe72.0%83.1%
RAG-Anything67.5%78.1%
LightRAG58.8%79.1%
Text RAG49.8%62.5%
HippoRAG 246.1%64.7%
Microsoft GraphRAG44.4%55.0%

It is also the fastest graph-based system to index on both sets (1.2-1.9x faster than GraphRAG's fast mode, 17-21x faster than RAG-Anything) and keeps the smallest graph (1.2-1.8x less than the next, 5-7x less than RAG-Anything). Setup, cost, time and per-type scores: https://graphme.io/benchmarks/

It's a desktop app (macOS, Windows, Linux). The graph (its own Neo4j, no Docker), the search (a local embedding model) and your files stay on your machine; pages are read and answers written with an OpenAI, Anthropic or Gemini API key, or a Claude, ChatGPT or Gemini subscription you already have (advanced option). It also works as an MCP server for Claude Code and Cursor.

Repo: https://github.com/ToBeSuperior/Graph-Me-Maybe · live demo, no install: https://graphme.io/demo/en/

Happy to go into the outline pass, how tables split across pages are joined, or how pictures are placed in the answer's context.


r/Rag • • 23h ago

Discussion Project ideas

5 Upvotes

What kind of project have you always wanted to build but never got around to because you didn't have enough time?

i am looking for unique and impactful project ideas the kind of projects that solves real world problems, make a meaningful difference, or have the potential to create something genuinely useful for people.

i am not looking for typical beginner projects or common clones. I want ideas that make people think, "That's actually an interesting and worthwhile project."


r/Rag • • 3h ago

Tools & Resources I made a tool that splits long PDFs into sections so RAG answers can cite the section and pages

2 Upvotes

Say your team loads a 583-page software manual into a RAG assistant, and someone asks "how do I make a pivot table?"

Many pipelines cut the PDF into fixed-size pieces. Here's a real 1,500-character piece from the free LibreOffice Calc Guide 26.2, shortened:

ice Base. For more information, see Chapter 12, Linking Data.
Using shortcuts
If you frequently use pivot tables in Calc, navigating through the built-in menu paths might feel inconvenient.
...
Creating a pivot table
...
After making a selection, create the pivot table in one of three ways:
• Use Insert > Pivot Table on the Menu bar.
330 | Calc Guide 26.2
• Use Data > Pivot Table > Insert or Edit on the Menu bar.
• Click the Insert or Edit Pivot Table icon on the Standard toolbar.
...
See Chapter 15, Calc as a D

It starts and ends in the middle of a word, mixes two topics and has a page footer in the middle of the steps. The last step is in the next piece, and nothing says which chapter or section any of it belongs to.

This is just a personal project and an experiment: I wanted to directly retrieve RAG chunks as sections for LLM reasoning as well as citations.

Section Anything is an open-source Python library that splits a PDF into its real sections. Every piece it returns keeps its chapter, section and pages. Here's the same part of the guide:

['Chapter 10 Using Pivot Tables', 'Introduction', 'Creating a pivot table'] 330 331
If you want Calc to automatically determine the full extent of the raw data list, then select a single cell within this list. ...
After making a selection, create the pivot table in one of three ways: • Use Insert > Pivot Table on the Menu bar.
• Use Data > Pivot Table > Insert or Edit on the Menu bar. • Click the Insert or Edit Pivot Table icon on the Standard toolbar. ...
Click OK on the Select Source dialog to display the Pivot Table Layout dialog, which is described in the next section.

The piece is exactly that section, with all the steps and no footer. The answer can cite "Chapter 10, Creating a pivot table, pages 330 to 331".

Install it with pip install "section-anything[anthropic]" and set ANTHROPIC_API_KEY. The code that printed it:

from section_anything import section

tree = section("CG262-CalcGuide.pdf", mode="quick", model="claude-haiku-5-5", max_pages=600)
for chunk in tree.chunks(max_chars=1500):
    print(chunk.heading_path, chunk.page_start, chunk.page_end)
    print(chunk.text)

There are also integrations for LangChain, LlamaIndex, Haystack and LightRAG.

That was quick mode, where a model double-checks which lines are real headings, using your own API key. On this manual it made 7 calls to Claude Haiku 5.5, cost $0.08 and took about 7 minutes. In my tests on 905 research papers it matched the real outlines best of the three modes. Paid runs are estimated before they start and capped at $0.50 per document unless you raise the cap.

Free mode needs no model. It reads the PDF's bookmarks, table of contents, fonts and numbering, runs on your own machine in seconds and costs nothing. But this manual's bookmarks stop one level higher, so free mode filed these steps under "Introduction".

It only reads the text layer, so scanned PDFs need OCR first. Tables and figures aren't structured, so their text just sits inside the section.

In an October test of an earlier version on Qasper, 707 questions about 200 short research papers, section chunks found the passage with the answer more often than fixed-size chunks, mostly because they were smaller, but the answers didn't get any better. Write-up: https://github.com/Omniwot/section-anything/blob/main/docs/rag-qasper.md

I'd most like to hear about PDFs where it gets the sections wrong (a link plus what you expected helps a lot), and which RAG framework I should support next.

Repo, with a short demo of quick mode at the top: https://github.com/Omniwot/section-anything

Try it: https://huggingface.co/spaces/Omniwot/section-anything


r/Rag • • 10h ago

Discussion Building desktop application with rag

2 Upvotes

I want to build an ai app for windows that can learn from files or the documents and store or memorize that answers that got given before

If anyone can help me with links articles or files to learn how to make it work I'll appreciate it


r/Rag • • 47m ago

Tools & Resources Docsumo open-sources SumoOCR tiny - a 1.8 MB, 1M-parameter OCR pipeline that runs on one CPU core (Apache-2.0)

1 Upvotes

Docsumo has released SumoOCR tiny, a small open-source OCR pipeline for business documents. It pairs a text detector with a line recognizer, comes to 1.04M parameters and 1.8 MB of INT8 ONNX, and runs on CPU through ONNX Runtime or OpenVINO. PyTorch and PaddlePaddle are not required.

pip install sumoocr
sumoocr invoice.png --format json

How it was built

  • The recognizer is Paddle's PP-OCRv6 tiny (0.61M params), fine-tuned on business and public documents with its output layer remapped to 758 Latin characters
  • The detector is the stock PP-OCRv6 tiny (0.43M params)
  • Both models are INT8-quantized, and the report puts the loss at under 0.2 points of word F1 against FP32
  • Each line comes back with its box and a confidence score

Published benchmarks (word F1 on whole pages, same images, one CPU thread)

EngineFUNSDSROIEXFUNDOmniDocBench ENpages/sLicense
SumoOCR tiny83.891.395.291.93.55Apache-2.0
Indra 1.2.083.489.293.690.02.07modified OpenRAIL-M
OCRia-nano-180.987.092.782.22.15OCRia-nano-1 licence
PP-OCRv6 tiny rec (Docsumo's pipeline, FP32)79.089.394.590.41.31Apache-2.0
PaddleOCR 3.7, tiny setting77.086.594.591.00.41Apache-2.0
Tesseract 561.975.090.790.21.07Apache-2.0

What the report says about those numbers

  • Speed was measured on one machine, a Mac mini M4, with each engine on 1 core in a 1-vCPU container. x86 was not measured.
  • PaddleOCR was timed outside the container, and Paddle's ARM kernels are slower than its x86 ones, so 0.41 is not an x86 figure.
  • The FUNSD result against Indra is a statistical tie.
  • None of the four benchmarks was part of the training data.
  • On receipt line crops (SROIE), stock PP-OCRv6 tiny still reads slightly better: 2.62% vs 2.93% character error.

Limitations

  • Latin script only (English and European languages)
  • Handwriting was not part of the fine-tune and is unmeasured; expect roughly stock PP-OCRv6 tiny accuracy on it
  • It returns lines, not tables, layout or key-value fields
  • Receipts and low-resolution scans are its weakest pages

SumoOCR tiny is the smallest reader from Docsumo's commercial OCR engine. The larger engine is not released.

  • Code: https://github.com/docsumo/sumoOCR-tiny
  • Model: https://huggingface.co/docsumo/sumoOCR-tiny
  • Benchmark method and charts: https://www.docsumo.com/blog/introducing-sumoocr-tiny

r/Rag • • 10h ago

Discussion Product RAG where half the data lives in PDFs (spec sheets, catalogs, price lists). How are you handling it?

1 Upvotes

For some domains (industrial parts, electronics, B2B catalogs) the real product data is in PDF spec sheets and price lists, not clean HTML. Those get added to a RAG index and the answers on numeric specs come out unreliable.

For anyone who's dealt with this:

- plain text extraction, layout-aware parsing, or a vision model on the PDF?

- how do you keep tables and units intact from a PDF?

- do you re-extract when a new revision of the spec sheet drops, and how do you notice?


r/Rag • • 10h ago

Tools & Resources Synapse: a local-first knowledge graph for AI agents (MCP, SurrealDB, Neo4j)

1 Upvotes

I just published Synapse, an open-source project I've been working on.

The goal is to build a local knowledge base that AI agents can actually query and navigate, instead of keeping project knowledge scattered across files and chat history.

A quick look at the architecture:

  • JSONL files are the source of truth.
  • SurrealDB handles BM25 and vector search.
  • Ollama generates local embeddings.
  • Neo4j handles graph relationships and traversal.
  • A read-only MCP server exposes the knowledge base to AI agents.

A few design decisions I made:

  • No LLM-based extraction during indexing.
  • Every record requires explicit evidence.
  • Records have confidence levels.
  • Secrets are checked before data reaches the stores.
  • All services bind to localhost.

There's a CLI, a local graph explorer, a demo dataset, Windows/Linux setup scripts and a Docker Compose option.

The project is MIT licensed.

I'd appreciate feedback, issue reports or contributions, especially from people working with knowledge graphs, local AI and agent infrastructure.

Repository: https://github.com/Keutonim/Synapse


r/Rag • • 12h ago

Discussion How do you handle outdated documents in a RAG pipeline?

1 Upvotes

Say you have two documents covering the same topic, but one contains outdated information.

Would you handle that through metadata filtering during retrieval or remove older versions from the index entirely? I'm curious how people deal with this when documents are updated frequently.


r/Rag • • 22h ago

Discussion Any streamlined collaborative or web-based rag api solutions?

1 Upvotes

Does every developer have to manually go into whatever document base you're trying to get the answer that your agent needs to figure out and then duplicate all of this effort across the entire industry or is there a anything at all that's better than doing that?

I find I'm wasting a lot of effort and tokens well.

If I can plan ahead for what type of documentation and or information I need and yes majority sites also structure the information via URLs easily enough so that it's found however,

utilizing rag agents that companies like Raspberry Pi and or others deploy via LLMs are a lot more useful than normal web search.

These platforms utilize github discussions and issues which is what can make them more accurate as well..

I've found a lot of situations that individual developers encounter in their own coding are also undocumented and unstored where we could all benefit off of each other's tread.

Which is why the collaborative part is in the title. Some form of answer base that's user submission based, like Reddit, and or discussion based as well.

But since Reddit already exists, this would primarily be, or at least ideally I can think of, agent based.

An agent has a mcp that links up to a global mcp, and when the agent finds a solution to something that's not already in the database, it stores it.

And humans now are letting agents run autonomously for hours. So instead of wasting tokens, a system like this is what's needed.

What are your thoughts? Or do you have any tools and or links of sites like this that are growing?

Anything that you usually wouldn't receive from just asking ChatGPT normally is the information that would probably be warranted here.

As for me, the current tools that are beneficial would be Grok's toolset for searching Twitter. If that includes all the discussions and replies that comes normally with tweets, you would usually find something from that, since it's a giant platform. Reddit also has its own system as well, and API. I have no idea how easily it integrates with CLIs though.


r/Rag • • 10h ago

Showcase Finance and Sales walked into Monday's review $290K apart on Q3 revenue from the exact same database, and there was no SQL bug

0 Upvotes

Monday 9:05 AM quarterly review. slide 4 of the Sales deck showed $4.18M for Q3 revenue. Two minutes later, Finance pulled up $3.89M. Both slides had the exact same footer citing our production orders table. then scenically, the room went quiet, everyone turned toward the data team....

so it took about 90 minutes of tracing to see what happened, nobody had done anything sloppy on purpose. Sales had exported a CSV from an older self-service workbook and dropped it into an AI chat to build a quick summary chart for the slide. That older workbook still summed gross amount and never filtered out status IN ('refunded', 'chargeback') or internal QA test accounts. finance was reading from the updated net-revenue definition

fixing the two slides took ten minutes, the harder realization was that telling non-technical teams to stop exporting CSVs and wait three days for an analyst ticket never sticks. Ops, Sales, and Finance want fast self-service answers, and increasingly they want to ask questions in natural language and tweak chart layouts themselves without waiting in a BI backlog; finally, what indeed has cut down the Monday number arguments was separating metric logic from chart layout into two distinct layers

1st
moving canonical business definitions (net revenue, active customer, refund exclusions, fiscal calendar rules) out of individual workbooks and ad-hoc prompts into one version-controlled semantic and context layer. That way, whether someone opens a chart, connects a BI tool, or asks an AI assistant in plain English, the query has to resolve through the governed metric definition instead of guessing column math on raw tables.

2nd
giving non-technical stakeholders guided self-service apps rather than raw table access. Most business users have no interest in writing SQL joins or wrestling with rigid BI grids. tools like Hex, Sigma, Metabase's guided questions, or Cube Apps (where you start from governed workbook reports, let an agent generate a custom page, and non-tech users click directly on a title or chart to ask for a bar-vs-line tweak with one-step undo) work much better because the underlying math stays locked even when someone changes how the page looks.

by the way (a catch!) no tool fixes organizational disagreement on its own. someone still has to get Sales and Finance in one room, agree on the exact written definition of net revenue, and commit it to Git. Without that step, AI-powered BI tools just help teams generate conflicting slides faster.

now would like to ask teams giving non-technical stakeholders genuine self-service (especially with natural-language dashboards), how are you preventing metric drift without turning analysts into a bottleneck for every chart tweak?