Skip to content

eshwargirigowda/RAG_Chat_Application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents
  1. Introduction to RAG
  2. Environment Setup
  3. Run the code

Introduction to RAG

Retrieval-Augmented Generation (RAG) is a technique/process which enhances the capabilities of large language models (LLMs), which access knowledge base outside of its training data before response. It can generate more accurate, up-to-date relevant responses, all without the need to retrain the model and best part is, its time and cost-efficient.

RAG's efficient approach includes Indexing, Vectorization, Chunking etc.

Lets see an example by Building an AI chatbot in Python that lets you chat with uploaded simple pdf file

Environment Setup

  1. Download / Clone code from
    https://github.com/eshwargirigowda/RAG_Chat_Application
    and open in your IDE, I am using VSCode

  2. Set virtual environment
    For windows systems, open Terminal and run the cmd (command) as shown below
    c:\>python -m venv venv
    c:\>venv\Scripts\activate

  3. create/Update file
    .env
    with your openai api key
    OPENAI_API_KEY="your API Key"

  4. Install all the requirement packages by running pip cmd
    c:\>pip install -r .\requrements.txt

  5. Make sure you have Docker Desktop installed and its running

  6. Now run cmd as shown below
    c:\>docker-compose up

    Make sure file "docker-compose.yml" is at the prompt.
    in above e.g. its c:\

Run the code

open Terminal and run the cmd (command) as shown below
c:\>streamlit run main.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501
Network URL: http://192.168.2.102:8501

Note:- IP and Port number will be displayed based on your system.

About

Building a RAG Chat Application by using Streamlit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages