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.
Metadata
Release files for easyrag-python 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| easyrag_python-1.0.1.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easyrag_python-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.1 kB
Release files / easyrag_python-1.0.1.tar.gz
| Download URL | easyrag_python-1.0.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
089b324647e39601dd307373a5c55534ba09604d92cffd36a4147c1fc7cfcb49
|
|
BLAKE2b-256 checksum How to use checksums |
21868a36f0a91c6699016845a6cc79fd1b0add002789be29560d0ed92611a5c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / easyrag_python-1.0.1-py3-none-any.whl
| Download URL | easyrag_python-1.0.1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
193c5aa8bb1a858bdfeb1a86acb184a94cbe5321ea01b02c6defdea6849becf8
|
|
BLAKE2b-256 checksum How to use checksums |
289bc8dc7e5f9c0ec339a3781f528eb9cd5ba69c8484528666b01a20297754c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|