Skip to content

Conversational chatbot integrated into my portfolio, designed to share detailed information about my background, skills, and projects.

Notifications You must be signed in to change notification settings

AlbeDere/MyTwinHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Personal Portfolio Helper

A conversational AI assistant that answers questions about its creator using RAG (Retrieval Augmented Generation) technology. The bot processes PDF documents containing personal and professional information, creating a knowledge base to provide accurate, context-aware responses about the portfolio owner.

Features

  • PDF document processing and vectorization
  • Context-aware question answering
  • Chat history management
  • Professional response formatting
  • Integration with OpenAI and Pinecone services

Prerequisites

  • Python 3.8+
  • OpenAI API key
  • Pinecone account and API key
  • PDF documents containing portfolio information

Installation

  1. Clone the repository:
git clone <your-repository-url>
cd personal-portfolio-helper
  1. Install required dependencies:
pip install -r requirements.txt
  1. Create a .env file in the root directory with the following variables:
OPENAI_API_KEY=your_openai_api_key
INDEX_NAME=your_pinecone_index_name
PINECONE_API_KEY=your_pinecone_api_key

Project Structure

personal-portfolio-helper/
├── bot.py              # Main chatbot implementation
├── reader.py           # PDF processing and vector database setup
├── requirements.txt    # Project dependencies
├── data/              # Directory for PDF documents
│   └── rag-training-doc.pdf
└── README.md

Components

reader.py

Handles document processing and vector database setup:

  • Loads PDF documents using PyPDFLoader
  • Splits text into manageable chunks
  • Creates embeddings using OpenAI
  • Stores vectors in Pinecone database

bot.py

Implements the conversational interface:

  • Manages chat history
  • Processes user queries with context awareness
  • Retrieves relevant information from vector storage
  • Generates appropriate responses using OpenAI's GPT model

Usage

  1. First, process your PDF documents to create the vector database:
python reader.py
  1. Start the chatbot:
python bot.py
  1. Interact with the bot by typing questions. Type 'exit' to end the session.

Technical Details

The project uses several key technologies:

  • LangChain for RAG implementation
  • OpenAI's embeddings and chat models
  • Pinecone for vector storage
  • Python's dotenv for environment management

The system follows a two-step process:

  1. Document Processing: Converting PDF content into searchable vectors
  2. Interactive QA: Using chat history and context-aware retrieval for accurate responses

Contributing

Feel free to submit issues and enhancement requests!

Author

Albert Derevski

About

Conversational chatbot integrated into my portfolio, designed to share detailed information about my background, skills, and projects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages