← Back to selected work

Project notes · Live

AskSam

AskSam is a portfolio assistant that answers questions about Samuel's published work, cites its sources, and declines when evidence runs out. It runs as an independent grounded AI service behind a same-origin facade.

Visit AskSam
Role
Product, architecture, and engineering
Period
Current
Status
Live
Disciplines
Applied AI, Retrieval systems, API architecture, Security, Privacy, AI FinOps

Product demo · 0:18 · Silent walkthrough

See grounding and boundaries in practice

AskSam moves from project and leadership questions to cited answers, then declines a private question when published evidence runs out.

AskSam · See grounding and boundaries in practice

A provider-free editorial demonstration using reviewed synthetic responses: AskSam grounds project and leadership answers in public sources, then shows its explicit no-answer boundary.

01 · Context

What prompted it

A portfolio assistant has a narrow promise: answer from reviewed public evidence, cite that evidence, and say when the evidence is insufficient. The operating risk is broader. Untrusted questions, pasted job offers, retrieved text, model output, bot traffic, provider spend, and service credentials all cross different trust boundaries.

The first implementation lived inside Under the Hood. Extracting it created a second challenge: transfer runtime ownership without changing the browser contract, copying the corpus, creating a second migration history, or leaving two mutable backend implementations.

02 · Approach

How it works

Keep the browser on same-origin POST /api/ask. A server-side facade authenticates to AskSam, forwards exactly once, and sends only an HMAC-derived admission bucket rather than the raw client IP.

Run the existing evidence pipeline behind that boundary: query embedding, scoped hybrid retrieval from the active reviewed corpus, grounded generation, output-safety inspection, and citation projection limited to public Under the Hood fields.

Treat release confidence and provider spend as the same operational problem. Offline tests remain provider-free, a seven-case live smoke profile covers representative behavior, successful evidence is cached by code, battery, model adapters, dependencies, and corpus identity, and the full live benchmark is reserved for release-relevant changes.

03 · Decisions

Choices along the way

01

Shipped

Preserve the browser contract through a server facade

Constraint
A direct cross-origin browser migration would expose a new network boundary and make service credentials part of the client contract.
Alternatives considered
Move the browser directly to AskSam or maintain two public request contracts.
Decision
Keep POST /api/ask same-origin and forward each request exactly once to AskSam, with no local retry or fallback.
Effect
The interface and public response contract stay stable while backend ownership and deployment remain independent.
02

Shipped

Transfer ownership without duplicating infrastructure

Constraint
Copying the database, corpus, provider project, or migration ledger would create competing sources of truth and risky synchronization work.
Alternatives considered
Provision a new stack for AskSam or reingest the corpus into parallel infrastructure.
Decision
Reuse the existing Supabase and GCP resources unchanged while making AskSam the sole backend and control-plane owner.
Effect
AskSam consumes the same active evidence and provider resources without data migration, corpus duplication, or a second writable ledger.
03

Shipped

Make safety, rollback, and spend executable controls

Constraint
A fluent answer does not prove grounding, privacy, employment-policy safety, single-destination routing, or bounded provider cost.
Alternatives considered
Rely on manual spot checks or run the full paid benchmark on every deployment.
Decision
Combine deterministic pre-capability refusal, strict Turnstile and admission controls, aggregate-only logging, provider-free CI, cached live smoke evidence, release-only full evaluation, and AskSam deployment rollback and kill switches.
Effect
The system can reject unsafe work before paid capabilities, avoid repeated benchmark spend, and recover without database or corpus operations.

04 · Current state

What is true now

Shipped
AskSam is the sole backend owner and receives every request from the unchanged Under the Hood facade, which has no local retry or fallback.
Evidence
Contract tests prove one destination; a production provider-free probe recorded one Under the Hood invocation and one AskSam invocation, both returning the expected Turnstile rejection; both repositories pass CI, and no Supabase, GCP, corpus, migration, or DNS resource was copied or renamed.
Unresolved
The planned seven-day and all-status-class Gate 5 evidence does not exist because the operator accepted that risk to close ownership immediately. The reviewed media now covers entry, grounded citation, and explicit no-answer states rather than the original five-state plan. The independent sampadilla.com interface belongs to Phase 7.
Visit AskSam

05 · Lessons

What I learned

A safe AI extraction is less about moving code than preserving one source of truth while making trust, spend, and rollback boundaries observable.

  1. A facade can separate runtime ownership from product continuity

    Evidence
    The browser contract and interface stayed unchanged while the backend moved to a separately deployed service with exactly one request destination.
    Next time
    Define the stable public contract and single-destination dispatcher before creating the new service deployment.
  2. Default-off controls must be tested in the deployed configuration

    Evidence
    The first full-routing probe exposed disabled Turnstile enforcement, triggered an immediate rollback, and passed only after the service was redeployed with strict verification enabled.
    Next time
    Probe every default-off production control at the cheapest pre-provider boundary before allowing broader traffic.
  3. Evaluation frequency is an architecture decision

    Evidence
    Provider-free CI, representative smoke coverage, content-addressed PASS evidence, and release-only full evaluation separate routine confidence from paid benchmarking.
    Next time
    Design evidence reuse and hard provider budgets with the evaluator rather than after usage grows.