Skip to content

A RAG application to search through the recent ML research without going through the Papers with Code manually.

License

Notifications You must be signed in to change notification settings

wittyicon29/PWC-RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG For Papers with Code

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.

Requirements

  • HuggingFace API TOKEN
  • Upstash Account
  • Upstash URL and TOKEN after creating the index

Steps to Replicate

  1. Clone the repo

      git clone https://github.com/wittyicon29/PWC-RAG.git
  2. Move to the workspace directory

      cd PWC-RAG
  3. 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.

    image

    upstash-db

  4. 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

    cast

Notes

  • You can use any Embedding model supported by Langchain
  • You can try different LLMs on Langchain to evaluate the RAG system
  • The app is ready to deploy on Google Cloud Run using docker or Streamlit cloud.

Reference

How To Build an LLM-Powered App To Chat with PapersWithCode

About

A RAG application to search through the recent ML research without going through the Papers with Code manually.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages