Skip to main content

EasyRAG Python Package

Project description


EasyRAG Python Package

EasyRAG 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. The "EasyRAG" 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 causal models depanding on the hardware. It also supports Googgle Gemini and OpenAi models through API call.

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-python.git

or

pip install easyrag-python

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

All open-source models might not be compatible at this moment. This package is specifically designed to work with causal language models often decoder-only models.

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.1.tar.gz (5.7 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.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: easyrag_python-1.0.1.tar.gz
  • Upload date:
  • Size: 5.7 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.1.tar.gz
Algorithm Hash digest
SHA256 089b324647e39601dd307373a5c55534ba09604d92cffd36a4147c1fc7cfcb49
MD5 1f93bc77fec514e0f1cc5560cd2e78d6
BLAKE2b-256 21868a36f0a91c6699016845a6cc79fd1b0add002789be29560d0ed92611a5c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: easyrag_python-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 193c5aa8bb1a858bdfeb1a86acb184a94cbe5321ea01b02c6defdea6849becf8
MD5 d51657a45111c2ded2bc12bb25cea2b8
BLAKE2b-256 289bc8dc7e5f9c0ec339a3781f528eb9cd5ba69c8484528666b01a20297754c4

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