Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

DocuMind: Intelligent Document Analysis Engine

Overview

DocuMind is a powerful document intelligence tool that analyzes multiple PDF documents to extract and rank sections based on their relevance to a specific user persona and task. Using advanced natural language processing techniques, it helps users quickly identify the most valuable information across multiple documents without having to read them entirely.

Key Features

  • Smart Document Analysis: Automatically identifies and extracts meaningful sections from PDFs
  • Persona-Based Relevance: Ranks content based on user-defined persona and specific task needs
  • Multi-Document Processing: Handles 3-10 PDFs simultaneously for comparative analysis
  • Efficient Performance: Processes 50-page documents in under 10 seconds
  • Containerized Solution: Fully Dockerized for easy deployment and consistent performance
  • Structured Output: Provides clean, well-organized JSON output for easy integration
  • Offline Processing: Works entirely offline with no external API dependencies

Input Requirements

  • Place PDFs (3 to 10 files) inside:
    app/input_pdfs/

  • Enter persona and job_to_be_done via terminal prompt

  • Each PDF should be ≤ 50 pages

Output Format

Output will be written to:
app/output/output.json

Example Output Structure

{
  "metadata": {
    "persona": "PhD Researcher in Computational Biology",
    "job_to_be_done": "Prepare a lecture on it",
    "input_documents": [
      "2506.01302v1.pdf",
      "Graph_Neural_Networks_for_Drug_Discovery_An_Integrated_Decision_Support_Pipeline.pdf",
      "paper-5.pdf",
      "peerj-13163.pdf"
    ],
    "processing_timestamp": "2025-07-27T10:58:38"
  },
  "extracted_sections": [
    {
      "document": "paper-5.pdf",
      "page_number": 1,
      "section_title": "Explaining Graph Neural Network Predictions for Drug Repurposing",
      "importance_rank": 1
    }
  ],
  "subsection_analysis": [
    {
      "document": "paper-5.pdf",
      "refined_text": "Here we show that the attention mechanism allows interpretation of which drug-target interactions influence the GNN model prediction...",
      "page_number": 1
    }
  ]
}

How It Works

  1. PDFs are parsed using PyMuPDF
  2. Headings are detected using font size and layout rules
  3. TF-IDF vectorizer scores relevance using cosine similarity
  4. Top sections are refined using paragraph-level filtering
  5. Results are saved in structured JSON format

Docker Setup

Build the Docker Image docker build --platform linux/amd64 -t persona-docs .

Run the Container

docker run --rm
-v $(pwd)/app/input_pdfs:/app/input_pdfs
-v $(pwd)/app/output:/app/output
persona-docs

Folder Structure

├── app/ │ ├── main.py # Core application logic │ ├── requirements.txt # Python dependencies │ ├── approach_explanation.md # Technical documentation │ ├── input_pdfs/ # Directory for input PDF files │ └── output/ # Directory for JSON output ├── Dockerfile # Container configuration └── README.md # Project documentation

Performance

  • Processes a typical 50-page PDF in 1-2 seconds
  • Memory usage scales linearly with document size and count
  • CPU-optimized for AMD64 architecture
  • No GPU requirements

Limitations

  • Maximum recommended input: 10 PDFs of 50 pages each
  • Works best with well-structured academic or technical documents
  • English language documents only (current implementation)
  • Basic section detection may miss complex document structures

Future Enhancements

  • Integration with large language models for deeper semantic understanding
  • Support for additional document formats (DOCX, HTML, etc.)
  • Multi-language support
  • Web-based user interface
  • API endpoints for service integration
  • Advanced document structure recognition

About

Ranks the most relevant sections across multiple PDFs for a given persona + task, fully offline, outputs JSON, Dockerized.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages