ashrivastava
menu
// case study — siteask← all projects

SiteAsk — Drop-in AI Chat for Any Website

SiteAsk is the productised version of the Ask Amit assistant on this site — generalised so any blog, docs, or marketing site can install it with a single script tag. The widget loads a static prebuilt index, runs query embedding in the visitor's browser via Transformers.js (all-MiniLM-L6-v2 q8), does cosine retrieval locally, and only then POSTs to a tiny user-supplied backend that proxies the LLM call. That architecture lets it undercut SaaS competitors (Inkeep, Kapa.ai) on cost: no embedding-API bill, no vector DB to host, you pay only for LLM calls and only when someone actually chats. Ships as @siteask/widget (the embed bundle) plus a Node CLI for building the index from markdown directories or arbitrary URLs.

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
SiteAsk — Drop-in AI Chat for Any Website
// stack
frontend
TypeScriptDOM (no framework)tsup@huggingface/transformers
backend
Node.js (CLI)Reference Next.js API routeOpenRouter / BYOK LLM
database
tools
gray-matterall-MiniLM-L6-v2 (q8)cosine retrieval
// challenges
  • Most chat-widget products are SaaS-only and charge per-query — too expensive for personal sites and small docs
  • RAG normally requires a backend index + a vector DB + an embedding API key — three pieces of infrastructure to host and pay for
  • Cross-site embeds usually need a brittle iframe; CSS isolation + clean theming is non-trivial
// solutions
  • Move embedding and retrieval into the visitor's browser via Transformers.js (q8 quantised model, ~25 MB lazy-loaded once)
  • Ship the index as a static JSON file the site owner hosts on their own CDN — no vector DB needed
  • Backend is just a thin LLM proxy with a documented 2-key contract; reference implementation for Next.js, Cloudflare Workers and Vercel Edge on the roadmap
  • Single IIFE bundle with namespaced CSS classes — no iframe, no shadow DOM gotchas; theme via data attributes
// outcomes — impact3

~10 KB gzipped widget bundle; transformers.js + model lazy-load only when a visitor opens the chat

Site owners pay only for LLM tokens, never for embedding API calls or vector DB hosting

One-script-tag install with sensible defaults; programmatic SiteAsk.init() for advanced users

// 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