This project is a simple prototype developed for a research paper focused on democratizing AI tools for managing PDF documents in resource-limited contexts. It serves as an advanced Retrieval-Augmented Generation (RAG) pipeline example, showcasing how AI can facilitate document management.
To set up the project locally, follow these steps:
- Clone the repository:
git clone https://github.com/humankernel/rag.git
cd rag
- Install the dependencies:
uv sync
(Optional) Setup PyPi cuban repos
# uv will use the cuban national pypi repos
# if you don't want this open the `pyproject.toml`
# and remove the following:
# [[tool.uv.index]]
# url = "http://nexus.prod.uci.cu/repository/pypi-all/simple"
# default = true
- Setup
.env
variables - Execute
uv run main
, this will start the Gradio UI
(Optional) In a local environment (e.g dev mode) you can start a separated vLLM
instance.
# https://docs.vllm.ai/en/stable/serving/engine_args.html
❯ vllm serve ./qwen2.5-1.5b-instruct-q8_0.gguf --device cuda --gpu-memory-utilization 0.6 --max-model-len 2048
pytest .
This project is licensed under the MIT License - see the LICENSE file for details