dr-doc-search

Converse with book - Built with GPT-3

open-sourceagent-frameworks
597
Stars
+0
Stars/month
0
Releases (6m)

Star Growth

584597609Mar 27Apr 1

Overview

dr-doc-search is a Python tool that enables conversational interaction with PDF documents using AI. Built on GPT-3 and supporting HuggingFace models as an alternative, it creates searchable embeddings from PDF content and allows users to ask natural language questions about the document. The tool handles both regular text PDFs and scanned documents through OCR integration with Tesseract. It operates in two phases: first creating an index with embeddings from the PDF content, then enabling interactive querying through a conversational interface. The tool extracts text, generates embeddings for semantic search, and provides AI-powered responses based on the document content. With 597 GitHub stars, it represents a practical approach to document intelligence, making large PDFs more accessible through natural language interaction rather than manual searching.

Deep Analysis

Key Differentiator

vs ChatPDF / book-gpt: OCR-based PDF extraction (handles scanned documents) with optional fully local pipeline using HuggingFace models — no cloud dependency required

Capabilities

  • PDF book/document conversational Q&A
  • OCR-based PDF page extraction via Tesseract
  • Vector embeddings with OpenAI or HuggingFace models
  • Web-based Q&A interface via HoloViz Panel
  • Command-line and web app modes
  • Support for local HuggingFace LLMs (no OpenAI required)

🔗 Integrations

OpenAIHuggingFaceTesseract OCRImageMagickLangChainHoloViz Panel

Best For

  • Conversational Q&A over scanned or complex PDF documents
  • Users wanting local/offline document Q&A with HuggingFace models
  • Researchers needing to query academic papers or books interactively

Not Ideal For

  • Real-time document processing at scale
  • Non-PDF document formats
  • Users without technical setup capability (OCR dependencies)

Languages

Python

Deployment

pip install dr-doc-searchPoetry

Known Limitations

  • Requires Tesseract OCR and ImageMagick pre-installed
  • Windows requires special ImageMagick environment variable setup
  • Scanned PDF quality affects OCR accuracy
  • Generates temporary files for each processed document

Pros

  • + Supports multiple AI backends including OpenAI GPT-3 and HuggingFace models for flexibility
  • + Handles both regular text PDFs and scanned documents through integrated OCR capabilities
  • + Simple CLI interface with clear two-step workflow for indexing and querying documents

Cons

  • - Requires external dependencies (Tesseract OCR and ImageMagick) which can complicate setup
  • - Limited to PDF format only, doesn't support other document types
  • - Two-step process requires separate training phase before use, adding workflow complexity

Use Cases

  • Academic research where scholars need to quickly find specific information across lengthy papers and textbooks
  • Legal document review allowing lawyers to ask specific questions about contracts and case files
  • Technical documentation analysis for developers and engineers working with complex manuals and specifications

Getting Started

Install via pip install dr-doc-search and set up Tesseract OCR and ImageMagick dependencies. Set your OpenAI API key as an environment variable (or use HuggingFace alternative). Run dr-doc-search --train -i your-document.pdf to create the searchable index, then use the CLI to start asking questions about your document content.

Compare dr-doc-search