All projects
AI · LLM · RAG2026Live

MERCY

My personal AI assistant: it knows my work, speaks Bangla and English, and lives on this site as a flying eagle

MERCY (Mindful Empathetic Responsive Companion for You) is an AI assistant I designed and built from scratch to represent me. Visitors can ask it about my education, projects, research and skills, by text or by voice, in Bangla or English. It answers from my own portfolio, which it re-learns within seconds whenever I update it, and searches the web for the latest AI, ML and mobile-app news. It runs on free-tier models with automatic key rotation, and it's the eagle flying around this page.

Presented at
ARTIFICIAL INTELLIGENCE (Course Code: INT4203), INTI International University, Malaysia.

Try it on this page: click the eagle, or open the full chat.

MERCY

The problem

A portfolio only answers the questions its author thought of. Recruiters and visitors have specific ones ("Has he worked with RAG?", "How does NeuroScan work?") and have to dig through pages to find out. Generic chatbots don't know me and tend to make things up. I wanted an assistant that knows exactly what my portfolio knows, stays up to date without manual work, never invents facts or shares private details, works in my own language, and runs reliably on free API tiers.

The approach

  1. 1Hybrid retrieval (RAG): documents are split along their own structure (JSON objects, Markdown headings), embedded with Gemini and stored in Neon Postgres with pgvector. Each question is searched by meaning and by keywords at once, and the two rankings are merged with Reciprocal Rank Fusion.
  2. 2Portfolio as the source of truth: every save in my portfolio's admin pings MERCY, which re-reads a public knowledge endpoint and the text of my CV and course PDFs, with phone numbers and addresses removed before indexing. A daily cron job catches anything missed.
  3. 3Reliability on free tiers: every Gemini key and model is tried first, then Groq, with per-key health tracking and cooldowns shared across serverless instances. If one provider is busy, the answer still arrives.
  4. 4A router decides when a question needs live information, and only then searches the web (Tavily), limited to AI, ML and mobile-app news.
  5. 5Voice in both languages: speech recognition in the browser, and neural text-to-speech that starts speaking after the first sentence instead of waiting for the whole answer. Bangla text is detected and read with a Bangla voice.
  6. 6Fixed scope and privacy rules in code, not in the editable prompt: MERCY stays on topic, never shares private details or makes commitments on my behalf, and says when it doesn't know. Questions it can't answer and messages for me are saved to an inbox in the admin panel.
  7. 7The flying eagle: a procedural 3D eagle (React Three Fiber) that maps the free space on screen so it never covers text or images, perches on cards, crosses the page, and offers help about the section you are reading.

Outcome

  • Always up to date: a portfolio change reaches MERCY within seconds, with no manual re-upload. Visitors get instant, accurate answers about my work in Bangla or English, by text or voice
  • Runs entirely on free API tiers with automatic failover between providers and keys
  • Shows what visitors actually want to know: unanswered questions land in an inbox, so I know what to add next
  • An admin panel to manage knowledge, identity, branding, key health and the inbox, behind Google sign-in

Built with

Next.jsTailwind CSSTypeScriptVercelNeon PostgresReactRAGpgvectorGroq, Gemini APIAuth.jsWeb Speech APIThree.jsReact Three FiberTavily