Skip to content

kinza711/personal_chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€–** AI Chatbot with Pinecone + OpenAI (RAG System)**

A smart AI chatbot built using Node.js, OpenAI embeddings, and Pinecone vector database. It uses a Retrieval-Augmented Generation (RAG) approach to answer questions based on custom data.

🌿** Features** πŸ“„ custom .txt data 🧠 Convert text into embeddings using OpenAI πŸ“¦ Store embeddings in Pinecone vector DB πŸ” Semantic search using user queries πŸ€– AI-generated responses using OpenAI GPT models 🧩 Modular backend architecture (controllers, services, utils)

πŸ—οΈ** Tech Stack** Node.js Express.js OpenAI API (Embeddings + Chat Completions) Pinecone Vector Database JavaScript (ES Modules)

πŸ“ Project Structure

src/ β”‚

β”œβ”€β”€ config/ β”‚ β”œβ”€β”€ openai.js β”‚ └── pinconeapi.js β”‚

β”œβ”€β”€ controllers/ β”‚ β”œβ”€β”€ chatController.js β”‚ └── adminController.js β”‚

β”œβ”€β”€ services/ β”‚ β”œβ”€β”€ embeddingServices.js β”‚ β”œβ”€β”€ openaiServices.js β”‚ └── pineconeService.js β”‚

β”œβ”€β”€ utils/ β”‚ └── searchContext.js β”‚

β”œβ”€β”€ routes/ β”‚ β”œβ”€β”€ adminRoutes.js β”‚ └── chatRoutes.js β”‚

β”œβ”€β”€ data/ β”‚ β”œβ”€β”€ about.txt β”‚ └── skills.txt β”‚

└── scripts/ (optional used for testing purpose only) └── uploadData.js

βš™οΈ How It Works (RAG Flow) User Question

↓

Generate Embedding (OpenAI)

↓

Search Similar Vectors (Pinecone)

↓

Retrieve Relevant Context

↓

Send Context + Question to GPT

↓

AI Response

⚑ Performance Notes Embeddings are generated using OpenAI API

Pinecone handles fast semantic search

Response time: ~2–4 seconds (normal RAG behavior)

🧠 Key Concepts Used Embeddings (vector representation of text)

Semantic Search

Vector Database (Pinecone)

RAG Architecture

🀍 Author

Kinza AI-Focused MERN Stack Developer

About

A AI-powered personal portfolio chatbot built with the MERN stack and RAG architecture, using OpenAI embeddings and Pinecone to answer context-aware questions about my skills, projects, and experience.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors