Skip to content

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.

Notifications You must be signed in to change notification settings

Suyash018/Chat-with-file-AND-Generate-Question-Answers

Repository files navigation

Chat with file and generate question/Answer

Deployed on Streamlit

https://questiongenerator-cagyflei86fyppgorbqk8p.streamlit.app/

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

Watchers

Forks

Releases

No releases published

Packages