Skip to content

Imagine a website where users can skip complex navigation and get instant answers with just a question. This project explores how a Retrieval-Augmented Generation (RAG) chatbot reduces server load and network congestion by streamlining interactions-enhancing both efficiency and user experience in a way traditional navigation can't.

Notifications You must be signed in to change notification settings

manishkolla/GenAI_University_Chatbot

Repository files navigation

A New Generative Approach to Optimize the Network and Server Load of Websites (University Chatbot)

Project submitted to Dr. Yanqing Zhang for Artificial Intelligence (CS4810)

Authors: Manish Kolla & Ritesh Dumpala

Application Manual

This manual provides step-by-step instructions to set up and run the University Chatbot application locally.


Here's the updated version of the Prerequisites section with steps to check for Python and Visual Studio Code installations, and install them if necessary:

Prerequisites

Before running the application, ensure you have the following:

  1. Python Installation
    The application requires Python. To check if Python is installed, run the following command in your terminal or command prompt:

    python --version

    If Python is not installed, follow these steps to install it:

    • Download Python from the official Python website.
    • Run the installer and make sure to check the box that says Add Python to PATH during the installation process.
    • After installation, confirm Python is installed by running:
    python --version
  2. Visual Studio Code (VS Code)
    Visual Studio Code is recommended as the code editor for this application. To check if VS Code is installed, run the following command in your terminal:

    code --version

    If VS Code is not installed, follow these steps to install it:

    • Download the installer for your operating system from the official VS Code website.
    • Run the installer and follow the prompts to complete the installation.
    • Once installed, you can open VS Code by typing code in the terminal.
  3. Gemini API Key
    The Gemini API key is required for interacting with Generative AI. Follow these steps to obtain one:

    • Login to the Gemini AI Studio.
    • Sign in with your account or create a new one.
    • Click on Get API Key section and follow the prompts.
    • Generate a new API key and copy it.
      Note: Save the key securely as it will be used in the application.
  4. Bing Search API Key
    The Bing Search API key is required for integrating web search functionality. Follow these steps to obtain one:

    • Visit the Microsoft Azure Portal.
    • Sign in with your Microsoft account or create a new one.
    • Go to Create a Resource and search for "Bing Search v7".
    • Set up a new resource for Bing Search and navigate to the Keys and Endpoint section.
    • Copy one of the provided API keys.
      Note: Save the key securely as it will be used in the application.
  5. Create the config.py File
    To securely store your API keys, create a config.py file in the project directory and add the following code:

    # config.py
    GEMINI_API = "YOUR_API_KEY_HERE"
    BING_API = "YOUR_API_KEY_HERE"
    • Replace "YOUR_API_KEY_HERE" with your actual Gemini API Key and Bing API Key.
    • Save this file in the same directory as your main application script (app.py).

Steps to Run the Application

1. Clone the Repository

Use the following command to clone the repository from your Git hosting platform (e.g., GitHub):

git clone https://github.com/manishkolla/GenAI_University_Chatbot

2. Navigate to the Project Directory

Change your working directory to the cloned repository folder:

cd <project-directory>

3. Check Python and pip Installation

Make sure Python and pip are installed on your system.

To check if Python is installed:

python --version

or

python3 --version

To check if pip is installed:

pip --version

If either is missing, download and install the latest version of Python from the official Python website.


4. Create and Activate a Virtual Environment

It is recommended to use a virtual environment to isolate dependencies.

For Windows:

  1. Create a virtual environment:
    python -m venv venv
  2. Activate the virtual environment:
    venv\Scripts\activate

For Mac/Linux:

  1. Create a virtual environment:
    python3 -m venv venv
  2. Activate the virtual environment:
    source venv/bin/activate

5. Install Required Dependencies

Install all necessary Python libraries listed in the requirements.txt file:

pip install -r requirements.txt

6. Run the Flask Application

Run the Flask application using the following command:

python app.py

7. Access the Application Locally

Once the application starts, it will display a local URL (usually http://127.0.0.1:5000/). Open this URL in your web browser to access the application.


8. Test the Application

You can test the application by interacting with it through the web interface or API (depending on the implementation).

  • Open the URL shown in the terminal (e.g., http://127.0.0.1:5000/) in your browser.
  • Ask questions related to Computer Science (CS), Data Science departments, or the directory. For example:
    • "What is the role of the CS department?"
    • "Can you provide information about the Data Science program?"
    • "Who is the head of the CS department?"
    • "Can you find a contact in the directory?"
  • The application should respond with the relevant information or provide helpful answers based on its functionality.

Optional: Deactivate the Virtual Environment

Once done, deactivate the virtual environment using:

deactivate

About

Imagine a website where users can skip complex navigation and get instant answers with just a question. This project explores how a Retrieval-Augmented Generation (RAG) chatbot reduces server load and network congestion by streamlining interactions-enhancing both efficiency and user experience in a way traditional navigation can't.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published