ashrivastava
menu›
// case study — ai-native-portfolio← all projects

Ask Amit + AI Labs — AI-Native Portfolio

An AI-native developer portfolio that demonstrates AI rather than just describing it. The 'Ask Amit' assistant answers visitor questions about projects, blog posts, and résumé with cited sources, grounded in a RAG index built from the site's own content. A ⌘K command palette runs meaning-based search over the same index. A dedicated /ai-labs page bundles interactive demos such as the RAG Playground, Prompt Cost Calculator, Embeddings Playground and Tokenization Visualizer. Query embedding runs entirely in the visitor's browser via Transformers.js (all-MiniLM-L6-v2, q8); only the LLM call hits a rate-limited, key-protected OpenRouter route. The architecture keeps the Vercel serverless function tiny (no ONNX runtime bundled server-side) and the visitor experience snappy.

Experimental·ai·2026

Built in public to learn something or prove a pattern. Some are published packages, some are demos that live on this site.

// hero
Ask Amit + AI Labs — AI-Native Portfolio
// stack
frontend
Next.js 15React 19TypeScriptTailwind CSSframer-motioncmdk
backend
Next.js API RoutesOpenRouter
database
tools
Transformers.jsall-MiniLM-L6-v2cl100k_base tokenizerVercel
// challenges
  • ▸Bundling an embedding model server-side blew past Vercel's 250 MB function limit
  • ▸Running RAG, semantic search, and LLM chat on a public portfolio without runaway cloud costs
  • ▸Indexing scattered résumé, blog, and project data so a single assistant can answer about any of it
// solutions
  • ▸Moved query embedding into the visitor's browser via Transformers.js — the serverless function stays tiny and the first request after a cold start is no longer slow
  • ▸Server-only OpenRouter key with per-IP rate limiting, length caps, and a hard spend cap on the key itself
  • ▸Single RAG index built from blog posts, project data, and a lib/profile-data.ts source of truth — powers the chat assistant and the ⌘K palette
// outcomes — impact3
▸

Visitor-facing AI assistant that answers questions about Amit's work with cited sources

▸

Cmd+K semantic search across the entire portfolio — no keyword matching

▸

/ai-labs page with browser-side interactive AI demos that recruiters can try in seconds

// related — other projects
Own productpinnedfeatured
ai2026

JobJam.io — AI Job Search & Application Platform

AI-powered job search platform: discover roles, evaluate fit, tailor applications, and close skill gaps. One-time pricing, no subscriptions.

AILLMsJob SearchAnthropic Claude+3
Own productpinnedfeatured
ai2026

Fathohm — Comprehension-Debt System of Record

See how much of your codebase no human understands. A treemap of your repo colored by human comprehension score, with a tracked, assignable metric for 'who understands what' in an AI-native codebase.

AIDeveloper AnalyticsGitHub AppLLM Classification+2
Own productpinnedfeatured
ai2026

Grenz — Firewall for AI Agents

A local firewall for AI agents: scoped, revocable, observable permissions instead of your full GitHub token. Deny-by-default, MIT licensed, live at grenz.dev.

AI AgentsSecurityIAMMCP+2