Skip to content

Repository files navigation

Chat with file and generate question/Answer

Removed from Streamlit as I had another project to deploy

Warning donot run both the chat and question Generator Together

image

Concepts used

  • Pinecone - For vector store
  • Langchain - For Rag with GPT
  • StreamLit - For deployment
  • ChatGpt with RAG
  • Langchain chain- QAGenerationChain (Looked into the code Basically it is RAG model which makes question by splitiing Docs and making Questions for each split)

Index

Streamlit Appliaction- contains my streamlit files used for deployment

Question Generator ipynb - contains code that generates the questions

questions.txt- question answer generated by Question Generator ipynb

rag.ipynb- Chat bot that uses RAG memory to answer question about the file

Environment Variables

In your Enviroment Variables set OPENAI_API_KEY

Install the requirements.txt

pip install -r requirements.txt

There are Two parts

  1. Memory Rag Where you can ask it question about the document
  2. Question Generator it generates 3 types of Question

Beware ONLY ONE runs at a Time

Either the Chat bot Runs or the Question Generator

Question Generator

The ipynb File is Question Generator.ipynb

It generates the question in TXT format it is questions.txt

Streamlit Demo

image

Multiple Questions Can be Generated of Different Types

You can download the TXT file with the button or read the generation

image

TXT file

Download the TXT file with the button

image

Memory Rag

The ipynb File is rag.ipynb

image

Streamlit Demo

About

This project lets you analyze a document in two ways: Question Generator: It automatically creates various questions from your document. Memory-Based Chatbot: Ask the chatbot questions about the document, and it will answer using its knowledge of the content.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages