Inspiration

As developers, we often struggle to showcase our projects effectively. Existing portfolio platforms lack intelligent search, project categorization, and AI-powered insights. We wanted to build a solution that automates portfolio updates, makes projects easily searchable, and provides an interactive chatbot to discuss our work.

Making a chatbot using paid LLM can be easy with langchain. However, the rising costs of api for using the LLMs prevented us from developing chatbot to showcase our project portfolio.

I started building chatbot using langchain and tool calling agent and gpt 4 LLM and successfully built it, however, the api costs for get 4 is $0.03 for 1000 tokens, which is about 20 times higher than that of gpt 3.5 turbo LLM.

I switched the LLM to get 3.5 turbo; however, the LLM was not able to invoke multiple tools at the right time due to its limitation of reasoning power.

I explored free options and found Gemini 1.5 pro, which I could still use with free tier. However, it had quota limit and when I implemented it, I could easily ran into quota limit when I tested the chatbot. It had good enough reasoning to invoke the multiple tools. But, the issue was the inaccessibility due to quota limit.

Then, I explored the free option of building an own agent using vector search. However, the text embeddings in my GitHub repos was not satisfactory. So, I decided to build a rule-based agent that choose a tool based on a keyword in query. This option was entirely free with no api calls.

Then, it had limitation of answering. Thus, I decided to build a structure of multiple agents that can first use the rule-based agent to answer greetings and answer about projects that user wants to see. When asked by user that cannot be done by the 1st agent, the 2nd agent comes into play that is powered by Large Language Model (LLM).

This structure of agents were to decrease the api usage and decrease the api costs for a student to still be able to showcase his/her projects using affordable chatbot.

What it does

MyPortfolio.AI is an AI-powered personal portfolio that:
✅ Automatically updates project details from GitHub and put data to mongoDB on daily basis using scheduler
✅ Uses rule-based filtering for better searchability
✅ Implements an interactive AI chatbot to answer queries about projects
✅ Supports frontend, backend, database, and hardware filtering
✅ Provides LLM-based fallback if a query isn't covered by prebuilt tools

Double Agent Structure

1st Agent: Rule-based, keyword-search-based Agent

  • Handles the greeting by user.
  • Responds to user when asked to show my projects
  • Has an array of tools that can search my project through mongoDB Atlas.
  • Each search tool for search categories (backend, frontend, database, hardware)

    2nd Agent: Tool Calling Agent (Langchain) powered by Gemini 1.5 pro.

  • When 1st Agent cannot answer, and cannot use any of the agent's tools, then it falls through to the 2nd agent that uses a tool calling agent powered by Gemini 1.5 pro, which has good enough reasoning to invoke multiple steps with a invocation of different tool at a step.

  • When the quota limit for free tier of Gemini comes in, it alternates to GPT 4 Turbo, which has a high api cost at $0.03 for 1000 tokens. At the worst case scenario anything that may not be answered by our 1st agent, or 2nd agent by Gemini 1.5 pro, it alternates to GPT 4 Turbo and answers. So, this will provide consistent service to users.

Tools for agent

# 🔹 Define the tools the agent can use
tools = [
    Tool(
        name="GitHub Search by Name",
        func=search_github_projects_by_name,
        description="Search GitHub projects stored in MongoDB by name. Provide project name, description, features, GitHub, demo link, and Devpost."
    ),
    Tool(
        name="GitHub Search by Frontend",
        func=search_github_projects_by_frontend,
        description="Search GitHub projects stored in MongoDB that use a specific frontend technology."
    ),
    Tool(
        name="GitHub Search by Backend",
        func=search_github_projects_by_backend,
        description="Search GitHub projects stored in MongoDB that use a specific backend technology."
    ),
    Tool(
        name="GitHub Search by Database",
        func=search_github_projects_by_database,
        description="Search GitHub projects stored in MongoDB by the database technology used."
    ),
    Tool(
        name="GitHub Search by Hardware",
        func=search_github_projects_by_hardware,
        description="Search GitHub projects stored in MongoDB that use a specific hardware component."
    )
]

How we built it

🚀 Tech Stack:

Backend: FastAPI, MongoDB, LangChain, Sentence Transformers
Frontend: Svelte
AI & ML: Gemini, GPT-4 Turbo
Automation: APScheduler for daily GitHub updates

👨‍💻 Development Process:

Extracted project details from GitHub using the API & README parsing Stored projects in MongoDB with structured metadata Implemented rule-based logic for tech stack filtering Developed an interactive AI chatbot using LangChain tools Ensured Gemini-to-GPT fallback for uninterrupted responses Challenges we ran into

⚠️ Handling API Rate Limits – Implemented exponential backoff strategies
⚠️ Parsing inconsistent README formats – Developed regex-based extractors
⚠️ Fine-tuning AI Responses – Combined rule-based logic with LLM fallbacks
⚠️ Ensuring seamless frontend integration – Used Svelte’s reactive stores

Accomplishments that we're proud of

🏆 Built a fully automated portfolio that updates daily
🏆 Implemented multi-step AI reasoning to improve search accuracy
🏆 Developed a robust chatbot that understands project details
🏆 Created a seamless blend of rule-based + AI-driven responses

What we learned

📌 Mixing rule-based and AI models enhances chatbot reliability
📌 Svelte is great for real-time UI updates
📌 LangChain tools are powerful for structured AI queries

What's next for MyPortfolio.AI

🚀 GitHub Repository Insights – Analyze commits, stars, and activity
🚀 User Engagement Analytics – Track popular projects & searches
🚀 Enhanced AI Capabilities – Train on personal blog posts & Devpost
🚀 Multimodal AI Support – Enable image-based project explanations

Built With

Share this project:

Updates