Skip to content

Transform your documents into interactive Q&A sessions. Generate insightful questions directly from your content and get answers on the fly!

Notifications You must be signed in to change notification settings

atakang7/robotiXe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Question-Answer & Question Generation with Langchain

This project provides a powerful chatbot that allows users to interact with their PDF documents by asking questions and receiving accurate answers. Additionally, it can generate relevant questions from the content of the PDFs. This chatbot can be easily integrated into Python-based frameworks like Flask.

Live Demo

robotiXe.1.mp4

🌟 Key Features

  • Interactive Q&A: Chat with your documents
  • Automatic Question Generation: Create quizzes.
  • Smart Context Retrieval: Get accurate answers
  • Easy Integration: Python frameworks like Flask

🛠️ Under the Hood

Question Generation

  1. Prompt Engineering: Prompt to guide the AI.
  2. LLM Integration: Leverage OpenAI's GPT models.
  3. Context Chunking: Efficiently process.

Document Chat

  1. Embeddings: Vector representations
  2. Semantic Search: Relevant context
  3. Conversational Memory: Chat session
  4. Focused Responses: Strictly based on document content

Let's start talking about what we expect from these conversation bots. We don't want them to give non-sense, unrelated answers. To avoid that we can either use prompts or conversation chains. In this case, we will be using chains.

Commitment To The Document

  • I gave this text which was in the document. d c
  • This doesnt entirely proves that only answers from the document so I had to be sure and I asked one more question. b a
  • Overall, I'm convinced that this set-up only answers from the document.
  • Whenever I ask non-sense question. It says "I don't know" which is what we expect. Screenshot 2023-07-21 064108 Screenshot 2023-07-21 064125

How To Run On Local Systems

    git clone https://github.com/AtakanG7/robotiXe.git

Create virtual envirement (required!) Trust me :)

    python -m venv your_env_name

Now, the envirement is supposed to be added to your directory. You need to activate it.

    .your_env_name\Scripts\activate

Congratulations, you are half way there. Now install the dependencies.

    pip install -r requirements.txt

This will take some time. After all things set up, you need to run the project

    streamlit run main.py

Dependencies

  • langchain
  • openai
  • PyPDF2
  • streamlit
  • InstructorEmbedding
  • sentence_transformers
  • faiss-cpu

Conclution

About

Transform your documents into interactive Q&A sessions. Generate insightful questions directly from your content and get answers on the fly!

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published