loading
one moment
writing
write-ups from production work. things that bit me, how i diagnosed them, and what i would do differently.
the data wasn't in documents
designed a pageindex tree index and graphrag pipeline for organizational knowledge. discovered the data was excel rows. rebuilt around duckdb and text-to-sql.
why 247 of 299 articles got deindexed in 2 weeks
249 articles published on april 24. google indexed all of them, then dropped 247 within 2 weeks. the git history and gsc data made the cause clear.
giving an agent pipeline memory that changes its output
semantic, episodic and procedural memory in pgvector, pulled by the current goal into each run's system prompt, then refilled by an experiment loop.
one door for every llm call: fallbacks and caching
every model call in this pipeline runs through one function: openrouter-native fallback chains, anthropic prompt caching, and a cheaper dev-mode path.
what the transformer paper taught me about rag
encoder embeddings, l2 norm as attention's scaling trick, multi-resolution retrieval as residual connections, and context over fine-tuning.
scoring an agent's own writing before it publishes
the last step before publishing scores an article on three axes with an LLM, then runs deterministic checks in python that the model score can never override.
stripe pause: release the schedule before the trial
a pause built on trial_end is undone by any subscription schedule still attached to the subscription. release the schedule first, then write trial_end.
the over-broad boolean that zeroed a token pool
a product-classification flag that also matched the per-seat tier routed monthly renewals through managed-tier logic and granted whole orgs zero ai tokens.
provisioning stripe subscriptions before ach settles
ach debits take days to clear, so a subscription can't wait for settlement. provision on payment_intent.processing, with a grace period for later failures.
langgraph hitl with postgres checkpoints and sse
wiring LangGraph interrupt() and Command(resume=) into a FastAPI pipeline: a compiled graph singleton, a dedicated checkpoint pool, and resumable SSE streaming.
why fastapi background tasks disappear mid-execution
asyncio.create_task() holds a weak reference to the task object. if nothing else does, the gc cancels the task silently while it's still running.
when two of my pages cannibalize the same query
search console showed two of my own urls ranking for one query, so the learning phase flags the weaker page and queues it to refresh on the next run.
publishing articles to a repo with the git data api
the pipeline commits many generated files at once through github's git data api with no clone: build blobs and a tree, commit, move the ref, open a pr.
canvas lms self-hosted: polling submissions without kinesis
canvas self-hosted gave us only rest polling. the fix was a spring + sqs poll chain with watermarks for a 15k/month qms pipeline.
facebook reels isn't a platform, it's a flag
facebook shorts isn't a real format. the work was modeling one publish target reached two ways, kept coherent with a reel flag and a mutual-exclusivity rule.
react native tts false interrupts and synthesis latency
rms fires on speaker output. VOICE_COMMUNICATION fixes android; whisper VoiceChat handles ios. piper: xnnpack + warmup. kokoro: forward() not stream().
get notified
follow me on x or linkedin. i'll post when something drops.