An open-source Document Intelligence application by FutureSmart AI.
Turn documents into structured, searchable information.
Upload PDFs, invoices, resumes, contracts, reports and other supported documents. Define the fields you want to extract, organize the results into structured tables, explore your documents through the Knowledge View, and ask questions using RAG.
Use the hosted application, deploy it in your own environment, or integrate its capabilities through APIs.
Try the Live Application · View Installation Guide · Developer docs · Product capabilities · Explore the API
Open source · Apache-2.0 · Self-hostable · API accessible
Structured data extraction. Define fields with their types and descriptions, process documents, and inspect the extracted values in a structured table. Search, sort and filter it, and export the results as CSV.
Knowledge View. Explore the documents in a collection, their extracted fields, summaries and the text read from each file, in one place.
Document question answering. Ask questions about a collection or chosen documents and get answers grounded in them, with the documents each answer used.
Document Intelligence APIs. Use ingestion, extraction configuration, search and grounded chat from your own applications through the documented REST API. The search API returns the matching passages themselves. For the hosted product, the developer docs cover API keys, adding documents, search, chat, extracted fields and the full API reference.
- Teams with a pile of documents to read: invoices for finance and operations, resumes for recruiting, contracts for legal and procurement, reports and policies for everyone else.
- Developers who need document extraction and RAG in their own product, through an API instead of building ingestion, indexing and retrieval from scratch.
- Engineers who want a working reference architecture they can read, run, self-host and change.
We evaluate FutureSmart Document Intelligence through the Structured Document Extraction and Managed RAG benchmarks on AI Demos.
The findings help us identify limitations, investigate issues and improve the application. We document engineering decisions, fixes, verification results and ongoing work publicly.
Explore our research-driven improvement history →
Structured data extraction. Name the fields you want; every document becomes a row and every field a typed column. Shown: six synthetic invoices.
Knowledge view. Open any row to see the text read from the document beside every field taken from it. |
Managed RAG. Ask a question and get an answer with the documents it was drawn from. |
One repository contains the FastAPI backend, the Next.js web application, the Celery ingestion/indexing worker, deployment configuration, tests and examples. The supported stack is Docker Compose with PostgreSQL, Qdrant, Redis and S3/SQS (LocalStack locally, real AWS for durable deployments). The web UI is optional; the worker is required.
What it does:
- Collections and ingestion. PDF, DOCX, TXT, Markdown, HTML, web pages and audio. Text-based files and web pages are read locally; scanned, layout and visual modes use an optional LlamaParse key, and Firecrawl is an optional scraper.
- Charts. Aggregate questions ("how many candidates per skill") return a
chart computed over every matching document's extracted fields, drawn
in-process with the same
OPENAI_API_KEY. - Structured extraction. Define fields with types and descriptions; each document's values appear in a typed table you can inspect and export as CSV.
- Grounded answers. Ask questions about a collection or chosen documents and see which documents the answer used. The search API returns the matching passages themselves.
- RAG as a service. Authenticated REST API for ingestion, search and chat, with OpenAPI docs and a server-side example client.
We test this application in the AI Demos Structured Document Extraction and Managed RAG benchmarks, then use what the testing finds to improve it. The improvement history connects findings, engineering decisions, code and verification, and keeps the failures. Each entry names the benchmark it came from; the two benchmarks are reported separately and never combined into one score.
What testing found. A caller restricted a question to a chosen subset of documents. When that subset held no answer, retrieval fell back and answered from a document outside the requested scope.
What we improved. Explicit document IDs are now a hard boundary on every retrieval path. An empty, unknown, deleted or foreign selection returns no matches instead of broadening to the whole collection. Unsupported filters are rejected instead of silently ignored. Read the decision, code and checks.
What we verified. Focused scope contracts run against a real Qdrant in CI, with separate direct API and browser checks. These are engineering checks, not a new independently graded benchmark run.
Managed RAG · Engineering correction released · Benchmark result for this scenario not yet published on AI Demos.
Published so far. Structured Document Extraction: one result, a cleanly scanned document, Pass. Managed RAG: no result published yet. The baseline lists what is and is not published.
Explore all research-driven findings and engineering outcomes →
We prioritize a dependable, deployable product and reproducible evidence over commercial feature parity or a higher benchmark score.
You need Git, Docker with Compose v2, Python 3, and one OPENAI_API_KEY.
git clone https://github.com/FutureSmart-AI/document-intelligence.git
cd document-intelligence
export OPENAI_API_KEY=... # keep it private; PowerShell: $env:OPENAI_API_KEY="..."
python deploy/configure.py
docker compose --profile ui up -d --build
docker compose ps -aconfigure.py writes a private .env with generated secrets and the default
openai-v1 model profile, and refuses to
overwrite an existing one. The first build downloads large Python dependencies.
api-init and worker-init exit with code 0; api, worker and ui stay running.
Open http://localhost:8086/document-intelligence/ and sign in with
STANDALONE_PASSWORD from .env. No FutureSmart account is needed.
- Create a collection and add extraction fields, for example
daily_meal_limit_inr(number) andreceipt_deadline_days(number). - Upload
examples/northstar-policy.txtand wait for Completed. - Inspect the extracted values (2450 and 14), then ask: What is the daily meal limit, and how long do employees have to submit receipts? Open Sources to see which document the answer used.
docker compose up -d --build
python examples/rag_service.py --env-file .envThe example authenticates, creates and configures a collection, uploads a
document, waits for indexing, retrieves chunks and calls the grounded chat
endpoint, checking the returned facts. The API is http://localhost:8000,
with interactive docs at /docs. See the service API guide
and extraction context.
docker compose --profile ui stop
docker compose --profile ui up -dCollections, extracted values and vectors persist in named volumes. LocalStack
is a disposable S3/SQS emulator: restarting it loses original uploads and queued
work. Use the AWS-backed overlay for durable files and
queues. Never use down -v as a rollback. See installation.
Product capabilities · Installation · Configuration and model profiles · Architecture · Development · AWS ECS/Fargate deployment · Publication and source export
| Directory | Purpose |
|---|---|
backend/ |
API, RAG engine, packaged configuration and migrations |
frontend/ |
Optional web UI and its API contract |
workers/ |
Required ingestion/indexing worker |
deploy/ |
Configuration, model profiles, containers and source export |
docs/ |
Installation, API, architecture, deployment and improvement history |
tests/, examples/, evals/ |
Regressions, fixtures, API client and a grounded-answer check |
- Questions that must enumerate or total every document in a collection can miss or merge records. A fix is in progress and not released (DI-004).
- Learning extraction rules from labelled examples and correcting extracted values back into stored records are not implemented (DI-DEC-001).
- The web UI's Sources panel lists the documents an answer used, with a summary of each, not the supporting passage. There is no field-level source span or calibrated confidence (DI-DEC-002).
- Home cards can show a document's update time several hours off, apparently a time-zone display issue.
- Installation proves the application runs; it does not establish extraction accuracy or RAG quality on your documents. Evaluate on your own data.
- Configured model providers receive document text, questions and retrieved passages, even when you self-host.
- Hosted FutureSmart sign-in, usage metering and integrations remain in the source and are off in the standalone profile (details).
Apache-2.0; see LICENSE and NOTICE. Bundled fonts keep their SIL Open Font License notices. This repository is a clean source snapshot with fresh history; see publication and source export.


