🔗 Live Demo: https://chatbot.zid.web.id/
A context-aware AI chatbot designed to transform a traditional portfolio into an interactive conversational interface 💬
Instead of reading static CVs, users can directly ask about:
- Experience
- Skills
- Projects
The system responds with relevant, data-driven answers using a lightweight RAG (Retrieval-Augmented Generation) approach.
User Input
↓
Intent Detection
↓
Topic Mapping
↓
Context Retrieval (data.txt)
↓
Prompt Injection
↓
OpenAI API
↓
Response (UI)
- 💬 Clean & Responsive UI
- 🧠 Lightweight RAG system
- 🎯 Keyword-based topic routing
- 📂 Structured knowledge base (section-based)
- 🔍 Portfolio relevance scoring
- 🧵 Conversation history support
- ⚡ FastAPI backend (fast & efficient)
Only relevant data is injected into the model:
context = retrieve_context(user_input)✔ Improves accuracy ✔ Reduces token usage ✔ Minimizes hallucination
KEYWORD_TOPIC → TOPIC_MAP → SECTIONSMaps user queries into structured knowledge domains.
Stored in:
data.txt
Format:
==== SECTION NAME ====
content...
score += 1 if word in text else 0Ensures only relevant projects are returned.
system_prompt = BASE_PROMPT + contextConstrains the model to grounded responses.
Backend
- FastAPI
- Python
- OpenAI API
Frontend
- TailwindCSS
- Vanilla JavaScript
- Lucide Icons
.
├── index.html # UI
├── main.py # Backend
├── data.txt # Knowledge base
├── prompt.txt # Prompt config
├── .env # API key
{
"message": "What are your skills?",
"history": []
}- File-based knowledge → simple & portable
- Keyword routing → deterministic & lightweight
- No embeddings → avoid overengineering
- Limited history → token efficiency
- Embedding-based retrieval
- Vector database (FAISS / Pinecone)
- Streaming responses
- Multi-language support
- Docker deployment
Fida Yuzida
Turning a portfolio into a conversation creates a more engaging way to explore a candidate 🚀