Shipped · May to Aug 2026
Peptide AI Product, Mobile, and RAG Platform
Cross-platform product engineering, lifecycle automation, retrieval, safety evaluation, and a privacy-scoped semantic cache.
The problem
Users ask health questions that have to be answered from their own data, meaning their wearable signals, their logs, and their history, with no leakage between users, and it has to stream fast enough to feel like a conversation. At around 9 seconds to an answer, people stopped engaging with it.
What I built
As one of two engineers, I worked across Swift/SwiftUI and Kotlin mobile flows, TypeScript/Deno services, PostgreSQL, weekly releases, customer-email automation, hybrid retrieval, and a pgvector semantic cache scoped per user with dedicated safety guards.
Latency was the product problem
At around 9 seconds to a first useful answer, the experience felt slow. The thing that fixed it was not the choice of model. It was noticing how many questions were semantically similar to ones already asked. A pgvector cache keyed on embedding proximity absorbs those, and a cache hit returns in under 3 seconds at no extra inference cost.
Caching health questions safely
A simple shared cache would leak one user's data into another user's answer. Entries are scoped per user and gated by dedicated safety guards, and a Deno regression suite runs on every deploy to assert the negative controls, which are the questions that must never return a cache hit.
Separating computation from narration
The Coach system computes statistics deterministically in code, then asks the model only to narrate what was computed, citing evidence tiers. Numbers stop being hallucination surface area.
Grading the trajectory
Scoring only the final output hides the failures that matter. The evaluation covers claim level grounding, whether the tool trace was correct, and whether the agent abstained on negative controls. That means an agent that arrives at the right answer through the wrong tools still fails the suite.
The work was broader than the AI layer
I also redesigned onboarding, tracking, dosing, subscriptions, and notification flows across the mobile clients, and automated weekly customer feedback and win-back emails with retry, deduplication, and unsubscribe protection. The role was end-to-end product engineering: client UX, backend services, data, testing, releases, and the operational work that keeps a product moving.
Outcome
- ~70% latency reduction on cache hits (9s → under 3s) at $0 marginal cost
- 14,000 downloads across iOS and Android in two months
- 9 million combined App Store and Google Play impressions in two months
- Evaluation false positives reduced from 23.3% to 3.3%; 11/11 unsafe dosing prompts blocked after testing
Stack
Data flow
Retrieval + agent pipeline with privacy-scoped cache
- 1
Mobile clients
Swift/SwiftUI and Kotlin product flows for onboarding, tracking, dosing, subscriptions, and notifications
- 2
Edge Function
Deno request handler, auth + RLS scoping
- 3
Semantic cache
pgvector nearest-neighbor, per-user scope, safety guards
- 4
Hybrid retrieval
Dense embeddings + BM25 over user-owned data
- 5
Rerank
Voyage cross-encoder over candidate evidence
- 6
Agent layer
Deterministic stats computation, then LLM narration
- 7
Claude
Streamed generation grounded in evidence-tiered citations
- 8
Lifecycle automation
Customer feedback and win-back emails with retries, deduplication, and unsubscribe protection
This diagram is generated from portfolio.ts. Edit the `architecture` field to change it.
Keep reading
SynthDrive
You describe a driving scenario in plain English, and it generates a 3D world, runs object detection on it, and scores how hard that scene is to perceive.
Case studyEgoSocial (Meta Project Aria research)
A UMD research proposal for an egocentric dataset that pairs Aria Gen 2 sensor streams with validated psychological ground truth, plus the world model and behavioral model trained on it.
Case studyPanNote + PipelineEvolve
A Chrome extension that turns Panopto lectures into structured notes, plus a research harness that tries to improve the note pipeline automatically.
Case studyWant the deeper version of this?
I am happy to walk through the tradeoffs, the failure modes, and what I would do differently.