AI Lab · Generative Systems

From content generation to context governance.

Collaboratively designed and built a production generative workflow for an early-stage wealth-tech team.

The system started as a draft-generation workflow, but production use exposed a harder product problem: controlling how context, editorial feedback and persistent rules behave as the system scales.

My focus was the AI workflow architecture — context design, quality loops, deterministic controls, human-feedback memory, and the reliability layer governing provenance, conflicts, freshness and regressions.

31+

Live articles published

8–12

Long-form articles / week · pipeline capacity

≤3

Writer–Critic iterations

2

Publishing variants

01The Real Problem

Generating wasn't the hard part. Consistency was.

A prototype could turn a topic into a credible draft. But production use exposed a different class of problems: instructions accumulated, retrieved context became noisy, human edits could contradict previous rules, and exact publishing requirements were still being delegated to probabilistic models.

Naive

Prompt
Draft
Publish

Mature system

Context
Generate
Critique
Constrain
Human Review
Learn
Govern

The product problem shifted from “Can the model write?” to “Can the system remain predictable as context and feedback accumulate?”

02Context

More context is not always better context.

The system deliberately separates different kinds of context instead of feeding one giant prompt. Each context type has a different scope and lifetime. Keeping them separate reduces instruction drift and prevents a one-off editorial correction from silently becoming permanent system behavior.

01

Stable Business Context

Long-lived facts and positioning.

Long-lived
02

Style Context

Voice and editorial patterns.

Medium-lived
03

Retrieved Evidence

Relevant source material selected for the task.

Per-article
04

Persistent Editorial Rules

Reusable rules learned from prior human feedback.

Accumulating
05

Local Human Feedback

Instructions specific to the current article or edit.

Single draft

More context is not always better context.

03Architecture

Separate responsibilities, not maximize agent count.

I didn't maximize agent count. I separated responsibilities so different failure modes could be controlled independently — each stage with a clear responsibility, input contract and fallback behavior.

01

Discover

Topic selection + duplication avoidance

02

Generate

Draft generation + critique

03

Constrain

SEO metadata + deterministic validation + exact publishing rules

04

Review

Human review + targeted local edits

05

Govern

Feedback reusability + persistent-rule governance

The implementation uses specialized pipeline stages, but the design goal was responsibility isolation rather than agent count.

Platform outputs

Platform outputs — Website + newsletter variants share editorial state, with targeted edit propagation and duplicate-processing protection.

04Failure Modes

Design around failure modes, not ideal prompts.

Each design decision below was a direct response to a failure mode observed in use — not a theoretical concern.

Failure mode

Prompt / instruction drift

Design response

Separate stable context, retrieved evidence and persistent rules.

Failure mode

Context overload

Design response

Retrieve bounded relevant chunks rather than injecting the entire corpus.

Failure mode

Local feedback polluting global behavior

Design response

Gatekeeper decides whether feedback is local or reusable.

Failure mode

Conflicting persistent rules

Design response

Conflict governance classifies proposed rules as safe, duplicate, conflict or needs review before memory mutation.

Failure mode

Exact requirements handled probabilistically

Design response

URLs, metadata limits, formatting and publishing invariants enforced in code.

Failure mode

Invalid structured output

Design response

Runtime schema validation before downstream use.

Failure mode

Ambiguous reviewer instructions

Design response

Escalate to Needs Clarification instead of guessing.

Failure mode

Stale context

Design response

Track source lifecycle and freshness; inactive or superseded sources are excluded or deprioritized.

Failure mode

Model / prompt regressions

Design response

Offline regression suite tests critical reliability dimensions before changes are trusted.

More context is not always better context.

Move certainty into code.

Ambiguity is a workflow state, not permission to guess.

Don't let a local correction silently become global behavior.

05Quality Loop

Treat every generated draft as untrusted intermediate work.

Every draft passes through a Writer–Critic loop before it reaches human review.

01

Writer

Generates the draft.

02

Critic score

Evaluates quality and returns a score.

03

Revise if needed

Feedback sent back to Writer for a targeted rewrite.

04

Max 3 iterations

Loop bounded to prevent unproductive cycling.

05

Proceed when threshold met

Score ≥ 7 continues to validation and human review.

The critic reduces single-pass quality risk. It is not an independent truth-verification system — human review remains the final authority.

06Responsibility Split

Models judge. Code enforces. Humans decide.

Models handle probabilistic judgment. Code enforces deterministic constraints. Humans resolve ambiguity.

Model judgment

Topic generation

Drafting

Critique

Semantic edits

Feedback reusability

Semantic rule-conflict assessment

Code / system control

Canonical URLs

Slug construction

Metadata limits

Structured schema validation

Status transitions

Duplicate-processing protection

Deterministic publishing rules

Audit records

Human authority

Ambiguous editorial direction

Conflicting persistent policies

Final publication decision

Unresolved quality judgment

07Human Authority & Memory

Human authority controls what the system is allowed to learn.

Human feedback should improve the workflow without silently rewriting global behavior. Ambiguity therefore becomes a workflow state, and persistent memory changes require an explicit governance decision.

Flow A — Ambiguity

Primary lifecycle

Draft
Needs Review
LLM Updated
Approved

Ambiguity branch

Ambiguous comment
Needs Clarification
Human response
Continue

Ambiguity is a workflow state, not permission to guess.

Flow B — Memory

01

Human edit

A reviewer leaves feedback on a draft.

02

Editor applies local change

The Editor rewrites the affected paragraph locally.

03

Gatekeeper evaluates reusability

The Gatekeeper classifies the feedback.

04

Rule-governance check

Proposed rules checked against existing persistent memory.

Local

Keep change article-specific.

Reusable + Safe

Promote to persistent editorial memory.

Conflict / Unclear

Escalate for human review.

Persistent memory is a product surface, not a dumping ground.

08v1.4 · Context Governance

Relevance wasn't enough.

As the source corpus and persistent editorial memory grew, the next failure modes were no longer about generation quality. They were about deciding which context to trust, whether rules conflicted, whether knowledge was stale, and whether system changes introduced silent regressions.

01

Source Provenance

Retrieved context now carries metadata about where it came from, its lifecycle state, authority and freshness.

02

Rule Conflict Governance

Reusable feedback is checked against existing persistent rules before memory is mutated. Conflicts are surfaced rather than automatically resolved.

03

Freshness-Aware Retrieval

Active, authoritative and relevant context should beat content simply because it is newer.

04

Regression Evaluation

A fixed offline evaluation suite checks critical behavior when prompts, models or system logic change.

Retrieval priority

Authority
Active state
Relevance
Freshness

Newer is not automatically better.

09Regression Safety

Successful execution is not the same as correct behavior.

The system already validated output structure. The next step was validating behavior across changes.

Voice / persona consistencyFactual-rule complianceDeterministic SEOAmbiguity handlingRule governanceContext provenance + freshnessStructured output recovery

10 / 10

Unit tests passing

13 / 13

Offline regression evals passing

Automated CI

Runs on pull requests

These are reliability signals, not proof of semantic correctness for every generated article.

10Evolution

How the system matured.

v1.0

Generate

Topic → Writer → Critic → SEO → Notion

v1.1

Learn

Human micro-edits + reusable feedback extraction

v1.2

Control

Deterministic publishing invariants + lifecycle hardening

v1.3

Validate

Structured schemas + modular prompts + safer model outputs

v1.4

Govern

Source provenance + rule conflict checks + freshness-aware retrieval + regression safety

Strategic progression

Generation
Feedback
Reliability
Governance

Each architecture change followed a new failure mode becoming visible in use.

11Outcome

From draft generation to a governed editorial operating model.

31+

Live articles published

8–12

Long-form articles / week · pipeline capacity

2

Publishing variants

Human approval

Retained before publication

The outcome wasn't simply faster generation. It was a repeatable editorial operating model in which creative judgment remained probabilistic while exact requirements, memory changes and ambiguous decisions were increasingly governed.

Proof of Contribution

Public contribution trail

Architecture and reliability improvements were contributed through a reviewed GitHub pull request and merged into the shared repository.

Context governance·Regression safety·Reliability controls
12What Is Still Not Solved

Where reliability work would go next.

01

Untrusted context / prompt injection

Retrieved material is bounded and governed, but the system does not yet provide a complete trust or sanitization layer for arbitrary untrusted documents.

02

External fact verification

The critic checks quality and consistency; it does not independently verify every factual claim against authoritative external sources.

03

Semantic conflict edge cases

Rule-conflict detection reduces unsafe memory mutation, but no semantic classifier can guarantee detection of every linguistic contradiction.

04

Live model drift

Offline regression evaluation catches known failure patterns, but continuous production monitoring of model-version drift is not yet implemented.

The next maturity step is moving from context governance toward continuous trust and evaluation.

13Reflections

01

More context is not always better context.

02

Move certainty into code.

03

Ambiguity should escalate, not be guessed.

04

Persistent memory needs governance.

05

AI systems need evaluation for behavior, not just valid outputs.

The system started as a generation problem. In practice, the harder product challenge became governing how context, memory and human authority interact over time. That shift — from output generation to system governance — is the part of building AI products I find most consequential.