Skip to content
/ ragbase Public
forked from curiousily/ragbase

Completely local RAG. Chat with your PDF documents (PyMuPDF and LLM) and Streamlit UI that uses LangChain, Ollama (Llama 3.3), Qdrant, and advanced methods like reranking and semantic chunking.

License

Notifications You must be signed in to change notification settings

amchen/ragbase

 
 

Repository files navigation

RagBase - Private Chat with Your Documents

Completely local RAG with chat UI

Demo

Check out the RagBase on Streamlit Cloud. Runs with Groq API.

Installation

Clone the repo:

git clone git@github.com:curiousily/ragbase.git
cd ragbase

Install the Python development headers for your python version:

sudo apt-get install python3.12-dev

Install or update the dependencies (requires Poetry):

poetry install

or

poetry update

Install/restart ollama:

sudo snap install ollama

or

sudo snap restart ollama

Fetch your LLM (gemma2:9b by default):

ollama pull gemma2:9b

Run the Ollama server

ollama serve

Start RagBase:

poetry run streamlit run app.py

Architecture

Ingestor

Extracts text from PDF documents and creates chunks (using semantic and character splitter) that are stored in a vector databse

Retriever

Given a query, searches for similar documents, reranks the result and applies LLM chain filter before returning the response.

QA Chain

Combines the LLM with the retriever to answer a given user question

Tech Stack

Add Groq API Key (Optional)

You can also use the Groq API to replace the local LLM, for that you'll need a .env file with Groq API key:

GROQ_API_KEY=YOUR API KEY

About

Completely local RAG. Chat with your PDF documents (PyMuPDF and LLM) and Streamlit UI that uses LangChain, Ollama (Llama 3.3), Qdrant, and advanced methods like reranking and semantic chunking.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 52.3%
  • Jupyter Notebook 47.7%