Atlas
Ask a question about a 400-page filing and get an answer with the exact region highlighted on the original page, verified before it's shown and priced in dollars.
- Status
- Open source (MIT)
- Role
- Solo: design, build, evaluation
- Timeline
- Jun to Aug 2026
- Links
- GitHubDemo video
Question → the relevant region resolves on the page → a grounded, cited answer with its cost.
The problem
The answer is often in the layout
Due-diligence teams search data rooms full of scanned PDFs, contracts, financial tables and charts. The answer to a question often lives in the layout: a number in a table cell, a signature block, a stamp.
Text-only RAG flattens the page and loses that structure. It also answers with a page number at best, so every answer still has to be checked by hand.
Constraints
A laptop and a small budget
- A 16 GB Mac as the development machine, with a 3B-parameter visual retrieval model that needs a GPU
- Designed to run on roughly $3 of model credit without surprises
- A real public corpus: Uber's 407-page SEC S-1 filing from EDGAR
Architecture
Retrieve, answer, then verify
The query pipeline is a LangGraph state machine. The interesting part is what happens after the verifier.
Retrieval fuses three channels (ColPali over page images, bge-m3 dense text vectors, and a GLiNER entity graph in Neo4j) with Reciprocal Rank Fusion, then reranks with a cross-encoder. The citation highlight is the per-patch term of the same MaxSim score used for retrieval, so it needs no extra model.
Orchestration
The LangGraph state machine
Each query runs through a LangGraph StateGraph with seven nodes: planner, retriever, answerer, verifier, replan, human review and finalize. The nodes share one typed state, so each step can read what the previous one decided, and the cost accounting (model calls and spend) travels with the request. Every node runs inside its own trace span, so one request can be followed step by step.
- Grounded answer: released with its citations.
- A drafted answer failed verification and retries remain: the replan node widens retrieval and the graph loops back to the retriever, up to two retries by default.
- Still failing after the retry budget: the answer is withheld and the request is queued for human review.
- Nothing relevant found in the pages: refuse immediately, without spending retries.
The routing lives in the graph, not in a prompt. It is a small, plain function of the verifier's output, so it can be read and tested on its own, and a failed answer is handled the same way every time.
Decisions
What I chose, and what it cost
| Decision | Why | Trade-off |
|---|---|---|
| Retrieve over page images | Keeps layout; enables pixel-level citations | Heavier per-page storage than text |
| ColPali on a hosted GPU Space | A 16 GB Mac can't host a 3B model; keeps torch out of the core | Network hop and cold starts |
| One Postgres for everything | Dense vectors, page multivectors, ANN index and cost ledger in one store | A dedicated vector store is the documented scale path |
| Two-stage visual search | Exact MaxSim over every page grows linearly | Approximate shortlist; exact rescoring recovers precision |
| Cost-aware verifier loop | Recall without runaway spend | Extra latency on hard questions, capped by max retries |
What broke
Two things that didn't work first time
Structured output came back empty
JSON-schema structured output returned empty on the chosen model. Switched to function-calling structured output.
Entities went missing
Named-entity extraction was dropping entities, which weakened the graph channel. Fixed with windowed extraction.
Results
Measured on the demo corpus
- pages
- 407
- visual search
- 734→181 ms
- per answer
- ~$0.002
- tests passing
- 40
Observed during development on the Uber S-1/A. Illustrative, not a published benchmark. The eval harness reports recall@k, nDCG@10, citation precision, groundedness and cost per answer.
What's next
From one filing to real data rooms
- Multi-tenant access control, with citations scoped to what each user may see
- Self-hosted models so confidential documents never leave the tenant
- A native multivector store once the corpus outgrows Postgres
Related: RAG & document intelligence · Agents & multi-step workflows · AI reliability & evaluation