Postmortem 001 · Foundations · Model Behaviour

Predict vs Generate.

Same input. Two different computational roles.

Watch one business message pass through a bounded decision path and a generative path. Inspect the mechanics, change the controls, break the system on purpose, then rebuild the concept as reusable agentic architecture.

MERGETransparent Lab EngineBrowser-safe V1No fabricated probabilitiesReusable components
AI System Building BlockDecision + Generation Architecture
Discriminative role

Predict

Input
Candidate labels
Scores
Confidence gate
Selected decision
Generative role

Generate

Prompt context
Generation controls
Construct output
Validation
New content
Different behaviour. Different guarantees.The architecture question is not “which AI is more powerful?” but “what does this stage need to do reliably?”

Live comparison lab

One message.
Two behaviours.

Edit the same business message, change the confidence threshold and generation controls, then run the two computational roles independently or together.

Predict vs Generate · Interactive Foundation LabLocal lab ready
Discriminative path

Classifier Inspector

LAB SCORES

Candidate labels

DecisionRun the classifier.
Generative path

Generation Inspector

LOCAL SIMULATOR

Generated output

Run the generator to create a controlled local simulation.
Token probability inspection: unavailable in this browser-safe V1 because no provider/model logprobs are being requested. The lab will never invent token probabilities.

Execution Trace

Classifier trace

Generator trace

Break it

A working demo is not enough.
Make failure visible.

These experiments deliberately create common system-design failures: weak margins, unconstrained generation and the wrong computational role.

Failure experiment 01

Weak classification margin

A naïve system can still emit a label when top candidates are too close together. That looks decisive even when the route is uncertain.

Load the experiment to inspect the margin.
Failure experiment 02

Unconstrained generation

High freedom with weak context can produce verbose, unsupported or policy-inventing output. Intelligence is not the same as control.

Load the experiment to compare unconstrained and controlled output.
Failure experiment 03

Wrong capability selected

A plausible generated answer may completely bypass the routing decision the application actually required.

Load the experiment to see the architecture error.

Improve it

From “input → model → output”
to explicit system design.

The improvement is not merely a better prompt. The architecture becomes explicit about task semantics, confidence, constraints, validation and fallbacks.

Basic version

Input
Model
Output

Improved version

Input
Task Detector
Required Behaviour
Classifier + Confidence Gate
Prompt + Constraints
Structured Response
Validator / Fallback
Confidence thresholdsExplicit task semanticsStructured generationValidationFallback behaviourObservable traces

Compare

Decision behaviour
vs constructed output.

Discriminative operation

Predict / Decide

Primary outputBounded decision
Typical interfaceLabels / classes
Main inspectionScores / confidence
Failure patternWrong class or weak margin
Useful system roleRouting, gating, detection
Control mechanismThresholds / candidate set
Generative operation

Generate / Construct

Primary outputConstructed sequence / content
Typical interfacePrompt / context
Main inspectionGeneration controls / output
Failure patternPlausible but unsupported output
Useful system roleResponses, summaries, tool arguments
Control mechanismPrompt, schema, validation, sampling
The architecture decision is not “small AI vs powerful AI.” It is: what behaviour and guarantees does this stage of the system require?

Combined workflow

Real systems frequently need
both behaviours.

Click a node to inspect its role in an intelligent service-request pipeline.

System flow

Customer Message

The raw request enters the workflow. The next question is not “generate something”; it is “what operation does this request require?”

Practical transformation

The concept becomes
reusable system architecture.

The introductory distinction becomes useful when it is transformed into practical decision + generation pipelines.

Service operations

Intelligent Service Request Pipeline

Detect intent and priority, route the workflow, retrieve context, generate a draft, validate it and choose human or automated action.

message → classify → route → retrieve → generate → validate → act
Document operations

Document Processing

Identify document type or workflow, then extract or construct the required structured output.

document → classify → process → structure
Incidents

Incident Management

Classify severity or category first, then generate an investigation summary and recommended next step.

incident → severity → route → summary
Knowledge systems

Grounded Knowledge Response

Route the query type, retrieve the appropriate context and generate a constrained answer.

question → route → retrieve → answer

Production reality

Toy behaviour becomes
operational responsibility.

A production implementation needs explicit treatment of uncertainty, cost, latency, privacy, validation, auditability, model changes and human authority.

Confidence handling

HIGH CONFIDENCEContinue automatically when the route is sufficiently reliable and the action is allowed.
MEDIUM CONFIDENCEUse alternative processing, additional checks or a second-stage evaluator.
LOW CONFIDENCERequest clarification or send the case for human review.
Classifier calibration
Uncertain predictions
Generation hallucination
Model latency
API / inference cost
Schema validation
PII handling
Audit trails
Model versioning
Evaluation datasets
Prompt versioning
Timeout / fallback behaviour

Capability added to DeTLeng

Build once.
Reuse across later labs.

This postmortem should contribute shared primitives to the Agentic Systems Lab rather than remain a one-off lecture page.

ClassScoreInspector

Display labels, lab/model scores, rank, threshold, margin and selected result.

Useful later: routing · moderation · evaluators
ConfidenceGate

Apply explicit continue, fallback, clarification or human-review behaviour to uncertain decisions.

Useful later: agent routing · safety · approvals
GenerationTrace

Expose prompt assembly, parameters, timing, output mode, validation and stop reason.

Useful later: RAG · tools · agents
ModelBehaviourCompare

Standard split-screen comparison for A vs B execution, internals and result.

Useful later: models · retrievers · strategies
ExecutionTimeline

Render structured application events so hidden workflow behaviour becomes inspectable.

Useful later: RAG · MCP · tool calling · multi-step agents

Where this capability connects next

RoutingRAGTool CallingAgentsMCPEvaluatorsHuman-in-the-loopStructured Outputs

Postmortem complete

Built from a concept.
Broken on purpose.
Rebuilt as capability.

This implementation does not preserve a lecture as a web page. It extracts the useful system behaviour, makes the mechanics visible, tests failure, and adds reusable building blocks to the broader DeTLeng Agentic Systems Lab.

POSTMORTEM 001DECISION · MERGEFOUNDATIONS · MODEL BEHAVIOURPREDICT VS GENERATE