[amgad]

DocuMind

Built at INTI International University, 2026

Agentic pipeline for finance documents: OCR, classification, Gemini field extraction and policy checks against a ChromaDB knowledge base, with an SQLite audit trail.

PERIOD
"2026"
CONTEXT
"AI course, INTI International University"
STACK
"Python, Gemini, ChromaDB, RAG"
UPDATED
"Sep 2026"
github.com/amga-d/DocuMind

Overview

DocuMind takes finance documents (invoices, receipts, purchase orders, claim forms) from upload to an approval decision. Each stage is its own module, so any step can be swapped or tested alone.

Classical OCR reads the document. Gemini extracts the structured fields, with a regex fallback for when the model fails. A decision agent then checks the result against company policy retrieved from a ChromaDB knowledge base, and every document and decision is logged to SQLite for audit.

What I built

  • Preprocessing for PDFs and images with PyMuPDF and PIL, then OCR with EasyOCR.
  • Hybrid field extraction: Gemini returns structured JSON, with a regex fallback.
  • Document classifier using keyword rules, with an LLM fallback.
  • Policy-aware decision agent: RAG over ChromaDB, an instant short-circuit for blacklisted suppliers, and approval levels set by rule.
  • Streamlit dashboard to preview documents, inspect OCR and extraction output, and trace the agent's reasoning.

How it fits together

    • UploadPDF or image
    • OCRPyMuPDF, EasyOCR
    • ExtractionGemini, regex
    • Classifierkeywords, Gemini
  1. policy context
    • RAGChromaDB
    • Decision agentapprove, escalate, flag
    • SQLiteaudit trail

In the repository

$ git clone https://github.com/amga-d/DocuMind.git

tree -L 1

.
├── data/
├── database/
├── knowledge_base/
├── scripts/
├── src/
├── vector_store/
├── .env.example
├── .gitignore
├── app.py
├── implementation.md
├── PROJECT_DOCUMENT.md
├── README.md
├── requirements.txt
└── run.py

git log --author=amga-d --oneline -1

  1. 8caed7dInitial commit
  • Python 100%