SAJ AI Assistant Architecture Poster

AI Application · RAG · Full-Stack Web

Solo Project

SAJ AI Assistant

Query-Aware RAG · Multi-Model LLM Failover · Structured Portfolio AI

Formal title: SAJ: AI-Powered Portfolio Assistant

ActiveSole Developer / AI Application EngineerProduction AI System · Live
Duration: Aug 2026 – Present
Affiliation: Personal Production AI Project
Live Site: Try SAJ Live
Repository: Private Repository

Project Overview

SAJ (Smart Assistant for Sajjad's Journey) is an intelligent, query-aware portfolio assistant built to provide grounded, transparent, and multi-turn conversational access to Sajjad Hossain Soykot's complete professional body of work.

Rather than feeding a single massive, token-heavy prompt into an LLM, SAJ uses deterministic query normalization and domain-specific context retrieval across 11 discrete portfolio knowledge areas (biography, skills, education, experiences, projects, leadership, volunteering, awards, publications, certifications, and contact metadata).

To guarantee high availability and resilience against API rate limits and model deprecations, SAJ features an automated provider failover pipeline: prioritizing primary Google Gemini Flash models and gracefully cascading to Groq-hosted open-weights models (such as GPT-OSS 20B and Qwen 3.8 27B) if quotas or timeouts occur, with automatic compact retries for large context payloads.

Platform Highlights & Architectural Metrics

Query-Aware

RAG with selective domain retrieval

Multi-Model

Cascade across Gemini & Groq

Dual

Interface: Dedicated Page & Floating Widget

Zero

Hallucination with verified fact grounding

My Contributions

Direct Engineering & Architectural Ownership

  • Sole architectural design of the query-aware RAG pipeline and token optimization engine
  • Implementation of provider failover orchestration across Google Gemini and Groq APIs with structured logging
  • Creation of the dedicated /ask-saj full-page chat interface with mobile visual viewport keyboard handling
  • Development of canonical domain separation preventing cross-category factual bleeding

Key Features

  • Query-Aware RAG Architecture: Analyzes visitor prompts to extract intent and selectively injects only matching domain knowledge, keeping tokens within tight latency and cost bounds.
  • Multi-Model Failover: Employs Gemini Flash as the primary LLM with valid Gemini fallback handling and Groq-hosted open models (GPT-OSS 20B and Qwen 3.8 27B) as additional fallbacks.
  • Error-Aware Routing: Classifies conditions such as provider timeouts, rate limits (429), unavailable models (404), server errors (5xx), and oversized requests (413) to drive intelligent failover.
  • Compact Retry: If a fallback provider rejects an oversized context (HTTP 413), SAJ dynamically rebuilds a smaller high-relevance context and retries once automatically.
  • Grounded Zero-Hallucination Responses: Answers are strictly constrained to verified portfolio facts without inferring undocumented metrics, technologies, roles, or ownership.
  • Local Intent Fast Paths: Simple greetings, acknowledgements, and lightweight interactions are handled locally with zero API latency and zero token consumption.
  • Responsive Conversational UI: Features a dedicated Ask SAJ page (/ask-saj) plus the floating portfolio assistant interface, optimized for desktop, tablet, and mobile virtual keyboards.

Contributions & Outcomes

  • Solely designed, architected, and engineered the end-to-end SAJ AI assistant pipeline from intent detection to UI rendering
  • Engineered query-aware domain routing and selective context building across 11 discrete portfolio knowledge domains
  • Implemented token-budgeting and error-aware multi-provider failover cascade across Google Gemini and Groq
  • Built automatic compact context retry mechanism for handling provider-specific TPM and payload limits (HTTP 413)
  • Developed zero-latency local fast-path responders for common conversational acknowledgements
  • Crafted responsive, keyboard-safe chat interfaces for both dedicated full-page (/ask-saj) and floating widget experiences

Learning Outcomes

  • Reducing large portfolio-wide context into query-specific domain retrieval without sacrificing precision
  • Preventing domain bleeding between leadership, awards, education, certifications, and professional experiences
  • Handling provider rate limits, retired model cascades, timeouts, and free-tier token constraints gracefully
  • Enforcing strict zero-hallucination guardrails so responses remain faithfully grounded in canonical data
  • Building resilient failover orchestration across distinct AI providers with differentiated error classification
  • Engineering mobile virtual keyboard safety with visual viewport tracking and safe-area inset management

Technologies & System Stack

AI & Model Engineering

Gemini APIGroq APIQuery-Aware RAGPrompt EngineeringMulti-Model FailoverContext Optimization

Architecture & Retrieval

Structured Knowledge DomainsIntent NormalizationToken BudgetingError ClassificationCompact Retry

Frontend & Interface

Next.js App RouterReact 19TypeScriptTailwind CSSFramer MotionVisual Viewport API

Deployment & Infrastructure

Vercel Edge & ServerlessCloudinary Image DeliverySession Storage StateZero-Hallucination Guardrails

Screenshots

SAJ AI Assistant Architecture

SAJ AI Assistant Architecture

Dedicated Ask SAJ Full-Page Chat Interface

Dedicated Ask SAJ Full-Page Chat Interface

Query-Aware RAG Response Delivery

Query-Aware RAG Response Delivery

Multilingual Grounded Answering in Bengali

Multilingual Grounded Answering in Bengali

History and Guardrail Safety

History and Guardrail Safety

Dedicated Chat in Dark Mode Theme

Dedicated Chat in Dark Mode Theme

Portfolio-Wide Floating SAJ Assistant Widget

Portfolio-Wide Floating SAJ Assistant Widget

Keyboard-Safe Mobile Messaging Experience

Keyboard-Safe Mobile Messaging Experience