Modalities and governance
Layers and clocks
The Problem
LedgerRouteâs tabular head can retrain when fresh labels arrive. A text embedding served by a vendor API cannot be âretrainedâ inside your account when the provider ships a new encoder. Generative stacks add prompt versions, tool schemas, RAG corpora, and eval setsâeach drifts on its own clock.
âContinuous learningâ on the slide often means continuous governance: pin versions, measure surrogates, and decide when humansânot an automated pipelineâown the next change.
Where retrain is not the lever
Embeddings, prompts, and RAG
The Challenge
Pick the lever that actually moves
Foundation weight updates are rare and deliberate. Embedding endpoints change with opaque model IDs. Prompts change every deploy. Corpus staleness is a product decision, not only an ML metric. Fraud and abuse adapt faster than monthly retrainsâresponse time is organizational, not FLOPs.
Where teams over-promise
Our approach
Governance loop
The Solution
Governance loop without fantasy retrain
Monitor inputs and outputs per layer. Schedule evaluations on pinned eval sets. Define shadow mode, rules-engine fallback, and human gates when prediction drift fires before labels return.
Tabular head
Retrain or reweight when labels confirm outcome drift.
Embeddings
Reference batch cosine distance; pin provider model ID.
Prompts / RAG
Hash prompts; version corpus; block deploy on eval regression.
Adversarial drift
Faster human+rules loop than monthly retrain.
What changes in operations
Code for embedding surrogate
Distance without weight updates
Implementation
Notebook 06 scores a fixed reference batch before and after a synthetic provider swapâmean cosine distance is the surrogate we chart (no GPU LLM training in-repo).
def embedding_drift(ref_vecs, prod_vecs):
# L2-normalized rows; same expense_ids in both batches
sim = (ref_vecs * prod_vecs).sum(axis=1)
return 1.0 - sim.mean() # mean cosine distance
Key points
- Provider swap: Simulated shift; distance jumps when model ID changes.
- Not a retrain signal: Triggers index refresh + eval gate, not weight update.
- Separate monitors: Weights, embedding API, prompt hash, RAG ageâindependent series.
Notebook: 06_llm_embedding_surrogate.ipynb
Notebook: 05_prediction_and_delayed_labels.ipynb
Summary
Close the saga
Closing the saga
Match the maintenance action to the layer. Full model retrain is one tool among many; governance is choosing which tool is allowed this week.
Per-layer monitors
Do not collapse tabular, embedding, and generative drift into one KPI.
Eval gates before traffic
Pinned sets for prompts and retrieval, not only offline accuracy months ago.
Humans own pause
Automatic rollback only where harm is bounded; else shadow + sign-off.
Questions answered
Production insights
Embedding pin
Click to revealTreat provider model ID like a dependency lockfile; CI fails on silent bump.
Prompt hash
Click to revealDeploy artifact includes prompt_hash; diff prompts like code.
RAG age
Click to revealAlert on corpus freshness for regulated answers, not only on click-through.
Saga takeaway
Click to revealRead chapters 1â4 for tabular clocks; use this chapter when retrain is not on the table.
Ready for your data saga?
We can map your label latency, segment dashboards, and governance gates to the same layered playbookâstarting from the traffic you already log.