https://github.com/atakang7/robotixe
Transform your documents into interactive Q&A sessions. Generate insightful questions directly from your content and get answers on the fly!
https://github.com/atakang7/robotixe
chatbot langchain openai python
Last synced: 5 months ago
JSON representation
Transform your documents into interactive Q&A sessions. Generate insightful questions directly from your content and get answers on the fly!
- Host: GitHub
- URL: https://github.com/atakang7/robotixe
- Owner: atakang7
- Created: 2023-07-20T10:38:50.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-25T22:20:21.000Z (over 1 year ago)
- Last Synced: 2025-07-22T00:33:11.441Z (12 months ago)
- Topics: chatbot, langchain, openai, python
- Language: Python
- Homepage: https://smartpdf.onrender.com/
- Size: 314 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
[](https://smartpdf.onrender.com/)
https://github.com/user-attachments/assets/5f4c47cd-9ee3-4670-8b47-dc46607524c3
## 🌟 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.**


- **This doesnt entirely proves that only answers from the document so I had to be sure and I asked one more question.**


- **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.**


# How To Run On Local Systems
```python
git clone https://github.com/AtakanG7/robotiXe.git
```
Create virtual envirement (required!) Trust me :)
```python
python -m venv your_env_name
```
Now, the envirement is supposed to be added to your directory. You need to activate it.
```python
.your_env_name\Scripts\activate
```
Congratulations, you are half way there. Now install the dependencies.
```python
pip install -r requirements.txt
```
This will take some time.
After all things set up, you need to run the project
```python
streamlit run main.py
```
### Dependencies
* langchain
* openai
* PyPDF2
* streamlit
* InstructorEmbedding
* sentence_transformers
* faiss-cpu
*
# Conclution
* If you have any questions you can e-mail me pwxcv7352@gmail.com 😊👋
* Good Luck!