Doc Search logo

Doc Search

Free

converse with book - Built with GPT-3 ![GitHub Repo stars](https://img.shields.io/github/stars/namuan/dr-doc-search?style=social)

FreeFree tier
Type
Open Source

About Doc Search

Doc Search is an open-source tool that enables users to converse with books and PDF documents by asking questions and receiving answers. It uses GPT-3 or HuggingFace models for generating embeddings and answers, supports OCR for scanned PDFs via Tesseract and ImageMagick, and provides both a command-line interface and a web interface (built with HoloViz Panel) for interaction. The tool is built on LangChain and requires Python 3.7+.

Key Features

Ingest PDF files and generate embeddings for question answering
Supports both OpenAI GPT-3 and HuggingFace models for embeddings and language generation
OCR capabilities for scanned PDFs using Tesseract and ImageMagick
Command-line interface for training and querying
Web application interface powered by HoloViz Panel for interactive Q&A
Built on LangChain for document processing and retrieval
Free and open-source (MIT license)

Pros & Cons

Pros
  • Free and open-source with no licensing costs
  • Supports multiple embedding backends (OpenAI, HuggingFace)
  • Works with scanned PDFs through OCR integration
  • Provides both CLI and web interface for flexibility
  • Built on LangChain, enabling easy customization and extension
  • Active development with community contributions
Cons
  • Requires Python environment and manual installation of dependencies
  • OCR dependencies (Tesseract, ImageMagick) may need additional setup on some systems
  • OpenAI API key required for GPT-3 based mode; alternative HuggingFace models may be less accurate
  • Limited to PDF input; no support for other document formats (e.g., Word, HTML) as of current version

Best For

Query specific content from PDF books or documentsResearch and extract information from academic papers or reportsStudy and review material by asking questions in natural languageAccessible reading for scanned or non-searchable PDFs via OCR

FAQ

What are the prerequisites for using Doc Search?
You need Python 3.7+, Tesseract OCR, and ImageMagick installed. On Windows, set the IMCONV environment variable to the ImageMagick executable.
Can I use Doc Search without an OpenAI API key?
Yes, from version 1.5.0 you can use HuggingFace models for embeddings and answers by specifying the --embedding huggingface and --llm huggingface flags.
Does Doc Search support scanned PDFs?
Yes, it uses Tesseract OCR and ImageMagick to extract text from scanned pages, processing them into images and then text files.
How do I ask questions after training?
After creating the index with --train, you can ask questions via CLI with --input-question or launch a web app on port 5006 with --web-app and -i pointing to the PDF.