noorulamean444's picture
Update README.md
dc3b60a verified

A newer version of the Gradio SDK is available: 4.37.2

Upgrade
metadata
title: ChatBot for Jupyter Notebook
emoji: 💬
colorFrom: green
colorTo: purple
sdk: gradio
app_file: app.py
pinned: false
license: apache-2.0
short_description: ChatBot using Microsoft's Phi-3-mini-4k-instruct

ChatBot for Jupyter Notebook

Introduction

Welcome to the Chatbot for Jupyter Notebooks project! This repository contains an interactive chatbot built using Microsoft's Phi model(Phi-3-mini-4k-instruct) and Mistral AI's Mistral-7B-Instruct-v0.2 (for utility function), integrated with Jupyter Notebook. The chatbot is designed to assist users by providing relevant answers and insights based on the code and content present in the notebook.

The primary goal of this project is to enhance the user experience by enabling an intuitive and efficient way to interact with the notebook's code.

Key Features:

  • RAG Framework: Retrieval Augmented Generation Framework has been implemented to get the relevent context related to queries that deals with referring a particular cell number, or with queries asking follow-up questions with respect to previous responses from the model.
  • Prompt Engineering: The Prompts are written in a way to utilize the contexts properly and correctly to answer the query.
  • Context-Aware Responses: By analyzing the code and content in the notebook, the chatbot provides contextually relevant answers.

Usage

Upload your Jupyter Notebook and start asking questions. Examples for the questions that you can ask for:

  • Explain the code present in 4th cell.
  • Can you summarize the above/previous response

Few things to remember:

  • Before uploading your notebook, make sure that the output of the cells are cleared, as it can cause errors occasionally.
  • If the notebook has MarkDown cells, it can sometime disturb the order of the cells that the model gets as context for answering the query, so it's better to avoid MarkDown cells if any.
  • Do not have more than 4 line breaks in between the code in a notebook cell, as it leads to partition of code, sometimes resulting in improper context.
  • The context has been provided in a way to answer the queries by just referring the cell number, But sometimes it might not be accurate to pick up the right cell number.