🛠️ https://jinleedev.vercel.app/
A behind-the-scenes look at how I’m planning to upgrade my portfolio chatbot from a prompt-only Gemini integration to a document-aware, OpenAI-powered RAG system using LangChain and FAISS.


🤖 Current Chatbot Architecture
On my portfolio website, I currently use a chatbot assistant to help visitors—especially recruiters—learn more about me. The assistant is powered by Google’s Gemini API, and it responds to predefined prompts using a single long initial prompt that includes:
- My bio and education
- Technical skills
- Project summaries
- Pre-written responses to likely questions
This setup is integrated into my site via an API route (/api/chat), and the frontend is built with React + Tailwind CSS, giving it a native chat feel.
⚠️ Limitations of the Current Approach
While it works well for casual Q&A, the Gemini-based solution has several shortcomings:
LimitationDescription
| 🔒 Static knowledge | It only knows what I prewrote in the initial prompt |
| 📄 No document parsing | Can’t answer questions based on my actual resume or project files |
| 🧠 No memory | Lacks multi-turn reasoning or context |
| 🧪 No testable updates | I have to redeploy or manually edit the prompt for changes |
| 📚 Limited to Gemini | Hard to swap out models or build on top of it |
🔁 Planned Refactor: From Gemini → LangChain + OpenAI (RAG)
To overcome these issues, I’m in the process of transitioning the assistant to a Retrieval-Augmented Generation (RAG) setup. The new approach includes:
🧱 Core Components:
- LangChain: For chaining document loaders, embeddings, and LLMs
- FAISS: Lightweight in-browser vector DB to store document chunks
- OpenAI API (gpt-3.5-turbo): As the core reasoning engine
- Resume + Text files: Real source data for grounded answers
🔍 What RAG will enable:
FeatureDescription
| 📄 Document-grounded Q&A | Answers based on actual PDF/MD/TXT files |
| 💡 Dynamic context | No need to stuff everything into one prompt |
| 🛠️ Easily updatable | Just drop in new documents |
| 🤖 Smarter responses | Better factuality and follow-up ability |
⚖️ Comparison Table: Current vs Planned
FeatureGemini ChatbotLangChain RAG Assistant
| Document awareness | ❌ None | ✅ Reads actual files |
| Prompt structure | 🔒 Static only | 🔄 Dynamic retrieval |
| Model | Gemini | OpenAI (gpt-3.5-turbo) |
| Accuracy | 🎯 Medium | 🎯🎯 High (fact-grounded) |
| Maintainability | 🔧 Manual edits required | 🔧 Drop-in file updates |
| Extendability | ❌ Not modular | ✅ Easily extendable |
🛤️ My Refactor Roadmap
Here’s a rough outline of my planned steps:
- ✅ Prototype the LangChain RAG pipeline using local files
- 🔄 Replace Gemini API backend with a /api/chat route powered by OpenAI
- 🧪 Test multi-document parsing (Resume.pdf, About_Project.txt, Roadmap.md)
- 🎛️ Add toggles to switch between Gemini and RAG modes (for testing)
- 🧼 Refactor UI if needed to improve responsiveness and loading behavior
- 📜 Write updated documentation for API, prompt structure, and usage
- 📝 Publish a follow-up blog with the full code and reflection
📝 Why This Matters
This upgrade isn’t just about showing off AI integration—it’s about giving my visitors (and potential employers) a real-time, accurate, and personalized experience when learning about my skills and projects.
By grounding answers in actual files, I remove fluff and show what I’ve truly done.
🚧 In Progress — Stay Tuned
This project is still in progress, and I’ll be documenting each milestone as I go. Once the refactor is complete, I’ll update this blog with a full walkthrough, code samples, and deployment tips.
If you’re building an AI-enhanced portfolio too—or thinking about it—I’d love to hear how you’re approaching it!
📝 블로그 한글 요약: 포트폴리오 챗봇, 더 똑똑하게 리모델링하기
현재 내 포트폴리오 사이트에는 Google Gemini API를 사용하는 간단한 챗봇이 있고, 방문자가 나에 대해 질문하면 사전에 작성한 정보로 대답해줘. 하지만 이 방식은 고정된 프롬프트에 의존해서, 실제 내 이력서나 프로젝트 내용을 반영하지 못한다는 단점이 있다.
그래서 지금은 OpenAI API와 LangChain, FAISS를 활용한 RAG(Retrieval-Augmented Generation) 구조로 개선하는 리팩토링을 진행 중이다. 이 방식은 PDF, TXT 등 실제 문서를 읽고 벡터로 저장한 뒤, 질문에 맞춰 관련 정보를 찾아 대답하는 시스템이다.
✅ 이 리팩토링의 핵심 목표:
- 실제 문서 기반 응답 제공 (이력서, 프로젝트 설명 등)
- 더 정확하고 유연한 질문 대응
- 쉽게 업데이트 가능한 구조
- Gemini보다 확장성과 활용성이 뛰어남
📌 앞으로의 작업 계획:
- LangChain + FAISS로 기본 구조 완성
- 기존 Gemini API를 OpenAI로 대체
- 멀티 문서 파싱 실험
- 필요시 챗 UI 개선
- 최종 블로그에 전체 코드와 후기 정리 예정
지금은 아직 개발 진행 중이고, 이 글은 리팩토링 과정과 개선 방향을 소개하는 첫 번째 블로그야. 추후 완성되면 후속 블로그로 정리할 계획이다!
'AI Study' 카테고리의 다른 글
| Migrating from Python FAISS to Node.js LangChain: A Real-World RAG Integration Experience (1) | 2025.06.05 |
|---|---|
| Step 3 Multi-Document RAG Chatbot (0) | 2025.06.04 |
| 반드시 알고가자! (0) | 2025.06.04 |
| Step 2: Expanding RAG – Multi-Document Chatbot with PDF Support (0) | 2025.06.04 |
| What is RAG? Building my first LangChain-based document chatbot (0) | 2025.06.02 |