Skip to main content

EasyRAG Python Package

Project description


EasyRAG Python Package

RAG is a Python package designed to facilitate information retrieval and generation tasks, particularly in natural language processing applications. With RAG, users can input a PDF file along with a Hugging Face model, enabling the extraction of relevant data from the PDF and responding to user queries based on the extracted information.

Features

  • PDF Parsing: RAG can parse PDF files to extract textual information.
  • Information Retrieval: Using Hugging Face models, RAG retrieves relevant data from the parsed PDF.
  • Query Response: Users can ask questions or input queries, and RAG will provide responses based on the extracted information.

Installation

To install rag, paste the link below into your terminal and press enter.

pip install git+https://github.com/SayedShaun/easyrag.git

Usage

Using RAG is straightforward. Here's a basic example of how to use it:

from easyrag import HuggingFaceModel

# Initialize and Provide a PDF file and Hugging Face model
rag = HuggingFaceModel(
    model_id="meta-llama/Meta-Llama-3-8B-Instruct",
    hf_token="your huggingface token",
    pdf_path="sample resume.pdf"
)

# Retrieve data from the PDF
rag.retrieve_answer("what skills she has?")

# Response
"""
Donna Robbins has skills in Microsoft NAV Dynamics,
Cashflow planning & management, State & federal tax codes,
Bookkeeping, Exceptional communication, and Fluent in German.
"""

Bugs

The "Rag" framework is designed for quick rag prototype and to check retrieval performance with different open source models, including Llama, Mistral, Phi, and other 1 to 10 billion parameter models. It also supports Googgle Gemini and OpenAi models through API call. All open-source models might not be compatible also the GoogleGemini and OpenAI classes are unstable at this moment.

Contributing

We welcome contributions from the community to enhance RAG's functionality, improve its performance, or fix any issues. To contribute, please follow these steps:

License

This project is licensed under the MIT License - see the LICENSE file for details.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easyrag_python-1.0.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easyrag_python-1.0.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file easyrag_python-1.0.0.tar.gz.

File metadata

  • Download URL: easyrag_python-1.0.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for easyrag_python-1.0.0.tar.gz
Algorithm Hash digest
SHA256 54093debeb1b1e641c3a5d22cb00fd1683853d83866e44650a1f78fc4c7812cb
MD5 0d228eb841b40eafa00929a8b9e903a1
BLAKE2b-256 64fee3eb259cf5d8d957bbecc720fb47171181b424d744d1fbf42e994e611ad7

See more details on using hashes here.

File details

Details for the file easyrag_python-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: easyrag_python-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for easyrag_python-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d9cb7c501c563ea9702ad8e04adfedb7c22f46a8424e24cc49d264a2f99c709a
MD5 86a4d90952fff88d120b651c9257ae70
BLAKE2b-256 298bc12781dc16258b14b29718ce123cad0c36f8d2c6fbb2d35ed914f10f94dd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page