Giter Site home page Giter Site logo

faizan1234567 / rag-powered-chatbot-with-llm Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 519 KB

Development of RAG powered LLM chatbot for Question answering related to NUST school of interdisciplinary engineering & sciences (SINES)

License: Apache License 2.0

Python 4.96% Jupyter Notebook 95.04%

rag-powered-chatbot-with-llm's Introduction

RAG-Powered-Chatbot-with-LLM

Pretrained LLM stores factual information in their parameters and, when fine-tuned, provides state-of-the-art performance on downstream tasks. However, their ability to access and provide domain-specific and current knowledge is still limited. To address this, Retrieval augmented generation (RAG) has been proposed. RAG uses non-parametric memory to provide additional context to the LLM. It converts the user query to embedding and by using similarity search algorithms it returns top K best retreived results based on the query. This additional context along with the query is added to the LLM prompt for up-to-date response generation [1]. The following figure shows the RAG working:

alt text

Image by [3]

Installation

  1. Clone the github repository
git clone https://github.com/faizan1234567/RAG-Powered-Chatbot-with-LLM
cd RAG-Powered-Chatbot-with-LLM
  1. create and activate an enviroment using anaconda
conda create -n rag_chatbot python=3.10.0 -y
conda activate rag_chatbot
conda list

python -m pip install --upgrade pip (optional)
pip list
  1. install required packages
pip install -r requirements.txt

if you face any issue in installation, please create an issue.

Acknowledgements

[1]. Lewis, Patrick, et al. "Retrieval-augmented generation for knowledge-intensive nlp tasks." Advances in Neural Information Processing Systems 33 (2020): 9459-9474.

[2]. D’Agostino, A. (2023, November 30). Create a chatbot in python with Langchain and rag. Medium. https://medium.com/mlearning-ai/create-a-chatbot-in-python-with-langchain-and-rag-85bfba8c62d2

[3]. Thakur, P. (2023b, August 26). A gentle introduction to retrieval augmented generation (RAG). W&B. https://wandb.ai/cosmo3769/RAG/reports/A-Gentle-Introduction-to-Retrieval-Augmented-Generation-RAG---Vmlldzo1MjM4Mjk1

rag-powered-chatbot-with-llm's People

Contributors

faizan1234567 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.