RAG For Papers with Code is a easier method to scan through tons of ML research by just hitting a button. A RAG system that mines large amount of information easily. You’ll ask it your questions in natural language and it’ll answer according to relevant papers it finds on Papers With Code.
On the backend side, the system is powered with a Retrieval Augmented Generation (RAG) framework that relies on a scalable serverless vector database called Upstash, for embeddings we are using BGE models on the HuggingFace, and Mixtral-8x7B-Instruct-v0.1 as LLM from HuggingFace.
On the front-end side, this assistant will be integrated into an interactive and easily deployable web application built with Streamlit.
- HuggingFace API TOKEN
- Upstash Account
- Upstash URL and TOKEN after creating the index
-
Clone the repo
git clone https://github.com/wittyicon29/PWC-RAG.git
-
Move to the workspace directory
cd PWC-RAG
-
Indexing To index data into the vector DB, you first need to create an index on Upstash and fill in the credentials in the
.env
file:UPSTASH_URL=... UPSTASH_TOKEN=...
Run the following command:
python -m src.index_papers --query "Mistral" --limit 200
Result of indexing 200 chunks matching the "Mistral" query.
-
Running the streamlit applications locally
Before running the streamlit app, you have to set the Huggingface API token in the '.env' file:
HUGGINGFACE_API_TOKEN=...
Now you can the streamlit app
python -m streamlit run src/app.py