• Built a structured debugging knowledge base where AI coding assistants can search & record fixes via MCP protocol.
• Integrated with 4+ AI tools (Cursor, Claude, Windsurf, Gemini) enabling ”search before code, record after fix” workflow.
• Built RRF fusion search engine combining Postgres FTS + pg trgm fuzzy matching, achieving sub-50ms query latency.
• Implemented 3-layer sanitization pipeline (secret scan → pattern redact → AI semantic) blocking 7 secret types.
• Architected ledger-based credit system with ”no-hit-no-charge” billing model supporting 10+ transaction types.
• Deployed production stack via Docker Compose with pgvector, Redis, and Caddy for automatic HTTPS.
Deep dive
Ask AI — Deep Dive (Public / Non‑Sensitive)
This document is designed for public sharing and for use as a high-signal knowledge source for an AI “digital twin” that must answer interview / diligence questions about the project.
Contact: askai112358@gmail.com
To protect the project, it intentionally avoids:
code-level file paths, internal function names, and repository-specific anchors
production identifiers (project IDs, service URLs) and any secrets (keys, tokens, passwords)
copy‑paste deployment recipes that would enable a full clone without the repo
If you need the evidence-backed version, use the internal deep dive (kept private).
1) What This Is (one paragraph)
Ask AI is a personal + public knowledge vault that turns day-to-day AI work (debugging, research, decisions, learnings) into compounding, searchable knowledge. It is built for two first-class users: humans (via a clean web console) and AI tools (via MCP tools). The system closes the loop: search first → do the work → record what worked → publish the best cards, so future work becomes faster, cheaper, and more reliable.
2) The Problem, Framed Like a Founder
The real pain
AI assistants are great at answering—but they do not reliably retain organizational context across weeks/months, and teams repeatedly pay the “same learning tax”:
repeated debugging of the same errors
repeated “what was our decision and why?” questions
repeated onboarding explanations for new teammates and new AI agents
The core insight
The missing primitive is not “better answers”; it’s a memory layer with incentives that:
is fast to capture,
is easy to retrieve,
is safe to share,
is usable by both people and AI tools,
produces a sustainable flywheel.
Ask AI is that memory layer.
3) Who It’s For + Use Cases
Primary users (today)
Individual builders: keep an always-on personal vault of what you learned while shipping.
AI power users: let your coding assistant query a real memory layer instead of “guessing.”
Small teams: keep a shared workspace vault with optional publishing into a public library.
Typical use cases
Debugging: error → search → fix → record the resolution as a card → publish if reusable.
Research: summarize a paper/blog/spec → capture raw notes → curate into a reusable card.
Architecture decisions: record context/options/tradeoffs so future work doesn’t regress.
Operational playbooks: “how we deploy”, “how we migrate”, “how we troubleshoot prod”.
Success definition
The system is successful when it measurably:
reduces repeated work (time-to-resolution drops over time)
increases retrieval confidence (AI answers become more grounded and consistent)
creates a compounding knowledge asset (personal vault + optional community library)
3.5) My Role (What I Personally Built)
I built Ask AI end-to-end with a founder/CTO mindset: ship a real product, make it reliable, then make it compounding.
Scope of work (high level):
Product + UX: web console for humans; workflows for capturing, editing, and publishing knowledge.
Tooling for AI agents: MCP tools + manifest so any compatible AI client can integrate without bespoke glue.
Retrieval system: hybrid search with multiple sparse signals, fusion ranking, and explainable snippets.
Data model + multi-tenancy: personal/public/org workspaces, role-based access, and safety controls.
snippets (highlighted segments showing the match in context)
This matters for AI toolchains: agents can justify why they think something is relevant, and users can trust the retrieval.
Quality + billing coupling
Public search uses hit-only billing: credits are spent only when the system believes the result is a real hit (high-confidence threshold). This is crucial to prevent “AI burned my credits” fear and aligns incentives with retrieval quality.
7.5) Differentiation (Why This Isn’t “Just Another Notes App”)
Ask AI is opinionated about one thing: knowledge must be actionable and retrievable under pressure.
Key differentiators:
AI-native interface (MCP): tools are first-class, not a wrapper around a UI.
Hybrid retrieval with explainability: not only “what matched”, but “why it matched” (snippets + fields).
Compounding loop: the product is designed so your best work becomes future leverage.
8) AI & Embeddings (Designed to be Optional, Not Fragile)
Raw → Card curation
The platform supports a two-step capture:
capture raw material (logs, chats, long notes)
curate into a structured card
When an AI provider is configured, curation can be LLM-assisted; otherwise it falls back to a deterministic mode and the user edits manually. This avoids “AI dependency brittleness” while still enabling acceleration when configured.
Embeddings lifecycle (pragmatic)
Embeddings can be computed for semantic retrieval, but the system is built so that:
keyword retrieval works even without embeddings
embeddings are most valuable for public knowledge at scale
the platform can choose when to embed (e.g., on publish, or via background backfill jobs)
This keeps costs predictable and avoids embedding everything prematurely.
9) Credits, Billing, and Incentives (A Balanced Flywheel)
Ask AI’s economic design is built around two constraints:
Users must feel safe letting AI search.
The public library must grow with quality, not spam.
Credits-first model (principles)
Personal vault usage is “unlimited by credits” (people must record freely).
Public library usage is metered to fund infra and prevent abuse.
Publishing is rewarded to encourage contributions.
Rewards do not depend on “others hitting your card” (prevents gaming and clickbait dynamics).
Hit-only public spend (trust)
The public search charge triggers only on high-confidence hits. If the system doesn’t find something useful, users don’t pay for the miss. This reduces friction to “try searching” and is critical for agentic workflows.
Subscription posture
The system supports subscription gating (including invite-based activation while Stripe is not wired). This enables:
early controlled rollout
pricing experiments without blocking engineering progress
a clean upgrade path to Stripe later
Safety controls are first-order
Users can disable:
public search
publishing to public
These settings must be enforced consistently across UI, REST API, and MCP tools. This is non-negotiable for trust.
In addition to automated evals, the system is validated end-to-end:
“search → record → publish” loop via tools and UI
billing policy verification (hit-only spend)
safety switches enforcement
Numbers are intentionally not published here; the important thing is that the system is designed to continuously measure and improve.
14) 90-Second Interview Pitch (Script)
“Ask AI is a compounding memory layer for humans and AI tools. In practice, AI agents are great at answering but forget everything, so teams keep paying the same debugging and decision tax. I built a system with a web console for humans and MCP tools for AI. The workflow is simple: search first, then record what worked, and publish the best cards. Under the hood it uses hybrid retrieval—full text, fuzzy matching, evidence-aware signals, and optional embeddings—fused via rank fusion, with explainable snippets so agents can justify hits. The economics are credit-based with hit-only billing so users don’t fear agents wasting money, and publishing is rewarded but not in a gameable way. The result is a private vault that’s free to record into, plus an optional public library that becomes more valuable as you contribute.”