max / README2.md
sliitguy
updated corrections
9c17f52

Max: AI-Powered Developer Portfolio Chatbot

Python FastAPI LangChain License


๐Ÿš€ Project Overview

Max Portfolio Assistant is an advanced, production-ready AI chatbot API designed to deliver contextual, precise, and dynamic answers about Nivakaranโ€™s professional portfolio. Leveraging the power of retrieval-augmented generation (RAG) combined with vector-based semantic search, this system intelligently interprets user queries and fetches relevant information directly from portfolio documents, including detailed PDFs.

This is not just another chatbot โ€” itโ€™s a smart assistant engineered to showcase developer expertise with real-world, scalable architecture.


๐Ÿ”ฅ Why This Project Matters

  • Real-world AI Integration: Implements cutting-edge LLM orchestration using LangChain with HuggingFace embeddings and Groqโ€™s hosted large language model.
  • Production-Grade API: Built on FastAPI with clear REST endpoints, session management, and CORS ready for seamless frontend integration.
  • Multi-turn Dialogue: Maintains chat history context for fluid conversations โ€” no robotic one-off answers.
  • Efficient Document Retrieval: Processes and indexes large PDFs into vector embeddings enabling lightning-fast semantic search.
  • Clean Code & Logging: Structured with robust error handling and logging โ€” ready for maintenance and scaling.
  • Portfolio Showcase: Serves as a unique interactive gateway into the developerโ€™s skills, projects, and professional story.

๐Ÿ›  Technical Highlights

Feature Details
Language Model Groq ChatGroq (Deepseek-R1-Distill-Llama-70b)
Embeddings HuggingFace all-MiniLM-L6-v2 for semantic vector search
Vector Store Chroma DB for fast, persistent vector retrieval
Document Loader & Splitter PyPDFLoader + RecursiveCharacterTextSplitter for handling large portfolio PDFs
API Framework FastAPI with async support, CORS, and automatic Swagger docs
Session Management Session-aware chat history using LangChain's ChatMessageHistory
Environment & Config .env managed tokens and paths for secure, flexible deployment
Logging & Error Handling Python logging with clear error responses for production debugging

๐Ÿ“ฆ Installation & Setup

Setup Project

git clone https://github.com/yourusername/max-portfolio-assistant.git
cd max-portfolio-assistant
python -m venv venv
source venv/bin/activate          # Windows: venv\Scripts\activate
pip install -r requirements.txt

Create .env file with the following variables:

HF_TOKEN=your_huggingface_api_token
GROQ_API_KEY=your_groq_api_key
PDF_PATH=path/to/your/portfolio.pdf
HOST=0.0.0.0
PORT=5000

Run the server:

uvicorn main:app --host $HOST --port $PORT --reload

๐Ÿ” How to Use

  • Ask the assistant: Send POST requests to /ask with JSON body:

{
  "session_id": "unique-session-uuid",
  "question": "What are Nivakaran's main technical skills?"
}
  • Get answers: The AI responds with precise, context-aware answers sourced directly from the portfolio.
  • Maintain sessions: Use consistent session_id values to keep chat history context intact.

๐Ÿง  Architecture Overview

  1. PDF Processing: Portfolio PDF is loaded and split into manageable chunks.
  2. Vectorization: Text chunks converted to semantic vectors via HuggingFace embeddings.
  3. Indexing: Chroma database stores vectors for similarity search.
  4. Query Handling: Incoming questions are reformulated based on chat history.
  5. Retrieval & Generation: System retrieves relevant document chunks and generates an answer using Groq LLM.
  6. Session Management: Multi-turn dialogue history tracked to ensure coherent conversations.

๐ŸŽฏ Impact & Use Cases

  • Personal Branding: Transform your static portfolio into an interactive, AI-powered experience.
  • Recruiter Friendly: Instant access to precise answers about skills and projectsโ€”no browsing required.
  • Tech Demonstration: Showcases expertise in AI integration, API design, and modern NLP pipelines.
  • Scalable Architecture: Easily extend to multiple domains or add new data sources.

๐Ÿ“š Technologies & Tools

  • Python 3.8+
  • FastAPI (ASGI web framework)
  • LangChain (LLM orchestration)
  • Groq ChatGroq (LLM inference)
  • HuggingFace Embeddings (all-MiniLM-L6-v2)
  • Chroma Vector Database
  • PyPDFLoader & RecursiveCharacterTextSplitter
  • Pydantic for request validation
  • Uvicorn ASGI server
  • Python Logging

๐Ÿค Contributing

Contributions and improvements are welcome! Feel free to open issues or submit PRs for:

  • Adding new document types
  • Enhancing conversation flow
  • Improving deployment (Docker/K8s)
  • Optimizing vector search performance

โšก Final Notes

Max Portfolio Assistant is not just a chatbot, itโ€™s a showcase of how to leverage modern AI, NLP, and backend engineering skills to create real, usable developer portfolio experiences that recruiters notice and remember.