Skip to main content

DocRag

DocRag is an advanced document search and retrieval system that leverages Retrieval-Augmented Generation (RAG) to provide intelligent natural language search capabilities across PDF document collections. This system combines sophisticated PDF processing, vector embeddings, and large language models to enable semantic understanding of document content and context-aware responses to complex queries.

Installation

pip install docrag

Getting Started

For a comprehensive tutorial on using DocSearch, check out our Getting Started notebook which covers:

  • Setting up your Google Gemini API key
  • Creating Document objects from PDFs
  • Exploring document content (figures, tables, text, formulas)
  • Converting documents to markdown
  • Saving and exporting processed data

The notebook provides step-by-step examples and explanations to help you get up and running quickly with DocSearch.

Quick Example

import os
from docrag import Document

# Set your Google Gemini API key
os.environ['GEMINI_API_KEY'] = 'your-api-key-here'

# Process a PDF document
doc = Document.from_pdf('your_document.pdf')

# Access different content types
print(f"Found {len(doc.figures)} figures, {len(doc.tables)} tables")

# Convert to markdown
markdown = doc.to_markdown()
print(markdown)

# Save processed document
doc.save('output_directory')

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Authors

Logan Lang

Metadata

Release files for docrag 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for docrag 0.0.3
File Size Uploaded
docrag-0.0.3.tar.gz 13.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for docrag 0.0.3
File Interpreter ABI Platform
docrag-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 MB

Release files / docrag-0.0.3.tar.gz

Download URL docrag-0.0.3.tar.gz
Size 13.2 MB
Tags Source
SHA-256 checksum
How to use checksums
6004fd10357256255a1f607bfa29a1dfa524e50b598aa2ddbb725135db990541
BLAKE2b-256 checksum
How to use checksums
dea7b4b3ca4395dacbaace085236a0b592318454fb539dc672ad286bf52591ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / docrag-0.0.3-py3-none-any.whl

Download URL docrag-0.0.3-py3-none-any.whl
Size 34.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
628d1bb33a2d3fc713c8144a06a6cc0e89bbb3ec88cecfc818ddb5c56c0c9521
BLAKE2b-256 checksum
How to use checksums
ae3a82e36b1bc25893ef4cdd1bfdb3ea0428058758965e2200963c2b6585fa99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page