Skip to content

Instantly share code, notes, and snippets.

View savarin's full-sized avatar

Ezzeri Esa savarin

  • San Francisco Bay Area
View GitHub Profile
Question:
Is there a reason you switched from "interpretable" when there were 4 groups to
mean "there is only one way to do things and thus interpretable to humans", but
when there were 8 groups you mean "interpretable by the machine"?
Answer:
I apologize for any confusion caused. The term "interpretable" can be used in
different contexts and with different meanings. In the first categorization with
four groups, I used "interpretable" to refer to languages that are human
-readable and allow for clear understanding of the code's behavior. In the
import sys
DETAILS = {
2: [7, 5, "Introduction to Operating Systems", "https://pages.cs.wisc.edu/~remzi/OSTEP/intro.pdf"],
4: [6, 5, "The Abstraction: The Process", "https://pages.cs.wisc.edu/~remzi/OSTEP/cpu-intro.pdf"],
5: [7, 6, "Interlude: Process API", "https://pages.cs.wisc.edu/~remzi/OSTEP/cpu-api.pdf"],
6: [5, 12 ,"Mechanism: Limited Direct Execution", "https://pages.cs.wisc.edu/~remzi/OSTEP/cpu-mechanisms.pdf"],
7: [10, 5, "Scheduling: Introduction", "https://pages.cs.wisc.edu/~remzi/OSTEP/cpu-sched.pdf"],
8: [6, 5, "Scheduling: The Multi-Level Feedback Queue", "https://pages.cs.wisc.edu/~remzi/OSTEP/cpu-sched-mlfq.pdf"],
@savarin
savarin / pr_418_review.md
Created February 7, 2026 22:33
Review of PR #418

Review: PR #418 - Training Pipeline Hardening

This is a substantial and high-quality piece of engineering. It makes several critical improvements to the training pipeline that address real-world operational concerns. My review is strongly positive.

Summary

This PR hardens the nbcore training pipeline by tackling two fundamental issues: the risk of OOM errors from loading large training windows into memory, and the temporal information leakage from using a random train/test split.

It introduces:

  1. A week-by-week streaming pattern (stream_training_weeks) to cap peak memory usage.

ALICE

Review: Broaden _requires_full_refresh to check entire query tree

Summary

This PR simplifies _requires_full_refresh by replacing a targeted SELECT-projection-only check with a whole-query parsed.find(expression) search. The motivation is that Snowflake dynamic tables don't support change tracking for CURRENT_TIMESTAMP()/CURRENT_DATE/CURRENT_TIME anywhere in the query, not just in SELECT projections. The old code incorrectly allowed INCREMENTAL mode when these functions appeared in WHERE clauses.

This is a correctness fix — the old behavior could produce dynamic tables that Snowflake silently downgrades or errors on.

@savarin
savarin / eng407-before-after.md
Created May 20, 2026 05:41
ENG-407: Before/after report comparisons for LLM pre-pass

ENG-407: Before/After Report Comparisons

Three experiments tested against the local endpoint. Before = current production (no pre-pass). After = with LLM pre-pass generating hypotheses from template content.


1. Activity Nudges Email: At Risk (Gen 1 — zero metadata)

This is the strongest case. 34 variants, zero hypothesis or description in Postgres.

Report Insights: v4 Model Comparison — Sonnet 4.6 vs Opus 4.6 vs Opus 4.7

Scored 3 models × 12 experiments against the v4 rubric (10 criteria, 3 tiers). Responses frozen from May 21, 2026. Judge model: Opus 4.7.

Results

# Criterion Tier Method S46 O46 O47 Notes
1 Summary names test dimensions 1 Codebook extract-then-score 12/12 12/12 12/12 All models perfect
2 Business impact vs holdout control 1 LLM extraction 10/12 10/12 6/12 O47 states lifts vs peer variants
@savarin
savarin / pruned-jargon-analysis.md
Created May 23, 2026 19:37
Report-insights C4 jargon analysis: pruned terminology leak

"Pruned" jargon leak — analysis and fix

Context

The report-insights endpoint generates LLM-powered experiment reports for exec stakeholders. Reports are evaluated against a 10-criterion rubric (v4) across 12 Suno experiments. The v4 baseline for v2 is 88/112 (79%).

Finding

All C4 (no pipeline jargon) failures in the v4 baseline come from a single term: "pruned."

@savarin
savarin / experiment-dimensions.md
Created May 29, 2026 17:41
Experiment categorization dimensions — all 22 active experiments

Experiment Categorization Dimensions

Categorization pipeline output for all 22 active experiments.

Activity Nudges Email: At Risk — 34 variants · 3 cohorts

  • Hero headline framing (h1): 20 values across 5 themes — urgency & readiness prompts, creation & originality invitations, lyric & idea transformation, content & backdrop utility, and anticipation & discovery — with CTA, persona, and subject line each bundled per headline
  • Variant cohort: original standard HTML batch (w/ control) → JTBD persona-named variants (standard HTML) → Simple HTML re-run of select variants

Activity Nudges Email: Dormant — 20 variants · 2 cohorts

  • User persona segment (persona): 10 values across 3 themes — creative hobbyists & experimenters, social & sharing-oriented creators, and professional & utility-driven musicians — with CTA, cta url, headline, and subject line each bundled per persona
  • Variant cohort: standard HTML (w/ control) → Simple HTML
@savarin
savarin / app.py
Last active June 3, 2026 22:23
Standalone categorization server — recap pipeline decomposed into composable endpoints. Postgres/Snowflake queries and LLM prompts annotated.
from __future__ import annotations
from collections.abc import AsyncIterator
from contextlib import asynccontextmanager
from fastapi import FastAPI
from fastapi.routing import APIRoute
from fastapi_mcp import FastApiMCP
from nbcore.partner import PartnerContextServiceType, partner_context
@savarin
savarin / CLAUDE.md
Created June 4, 2026 04:42
Experiment insights agent — CLAUDE.md, context files, and tool pipeline

Agents

Domain model

An experiment tests messaging variations (email or push) against a target audience. Each experiment has variants (individual messages with creative copy and a cohort_date), cohorts (date-based batches), and evaluations (per-variant lift, rank, and significance from Snowflake).

Tool pipeline

Six tools run in order: categorizeinterpretaudience (S1) → design (S2) → result (S3) → takeaway (S4). All accept experiment_id plus optional --variant-ids and --cohort-date.