Weights, Training, and Inference
When an AI behaves differently, find what changed before you blame the model
Outcome. When an AI answer changes, you can identify the most likely cause and test it.
- First ask: what changed?
- A new model version means the model may have changed.
- A changed request, saved record, or tool result can change an answer without retraining.
Inspect the request. If it contains preferredlanguage=km, remove that line and run the same request again.
Why it matters: One controlled change gives stronger evidence than a confident story about how the AI works.You add “Return the answer as JSON” to one request. That answer becomes JSON. A new request without the instruction returns normal prose. Which bucket changed?
Message Roles and Instruction Priority
Higher-priority text guides behavior; it does not create a security boundary
Outcome. You can resolve a conflict among system/developer instructions, user requests, tool output, and quoted untrusted content—and identify what must be enforced outside the model.
- Role names and exact precedence are API-specific.
- Instruction priority is a trained tendency, not a hard security boundary.
- Retrieved documents and tool results may contain untrusted instructions.
Keep the policy in the application as well as the prompt. The model may propose {orderid, amount, reason}; a policy service verifies ownership and amount; refunds above $100 require human approval; the tool executes only an authorized request; all attempts are logged.
Why it matters: The design separates conversational instruction following from enforceable authorization.Choose one real claim or decision today and test it against this idea: Role names and exact precedence are API-specific.
The Agent Loop: Observe, Decide, Act, Check
An agent is a controlled software loop around a model—not a new species of model
Outcome. You can trace an agent run, identify its state and stopping rule, and locate the step where an error, loop, or false completion should have been caught.
- An agent combines a model with a loop, tools, state, limits, and permissions.
- A fixed workflow is preferable when the path can be defined and tested.
- Every loop needs budgets, stop conditions, and recovery behavior.
Add state containing queries already tried, sources accepted/rejected, remaining evidence gaps, step count, and cost. Stop successfully only when three sources pass criteria; stop unsuccessfully after six steps or repeated no-progress; ask the user when the goal is ambiguous; verify that every cited URL was actually retrieved.
Why it matters: The stronger design can explain why the loop continues, prove when it succeeded, and stop safely when it cannot.Choose one real claim or decision today and test it against this idea: An agent combines a model with a loop, tools, state, limits, and permissions.
Multimodal Inputs: More Than Text
Separate the base model, modality encoder, API surface, and generation tool
Outcome. You can map how text, images, audio, and video enter a system and avoid assuming that one modality benchmark predicts every other task.
- Multimodal architectures differ; avoid universal claims about one hidden design.
- Product, API, base model, encoder, and generation model may be separate layers.
- Input capability does not imply output generation in the same modality.
For one current API, record exact model ID, accepted input types, produced output types, size/duration limits, preprocessing, pricing units, and five task tests: clean OCR, small chart labels, object counting, noisy speech, and temporal video question. Mark unsupported tasks explicitly.
Why it matters: A matrix prevents one successful demo from becoming an unsupported claim about an entire modality.Choose one real claim or decision today and test it against this idea: Multimodal architectures differ; avoid universal claims about one hidden design.
Hallucination, Uncertainty, and Verification
A plausible answer is not evidence, and a confidence sentence is not calibration
Outcome. You can classify a factual failure, choose an appropriate grounding or verification control, and define when the system should abstain or escalate.
- Hallucination includes contradictions, unsupported additions, and misattributed citations.
- Retrieval and tools reduce some risks but can introduce their own failures.
- Confidence is calibrated only when measured across a dataset.
Require claims as {claim, evidencequote, sourceid, support: entailed|partial|none}. Reject or abstain when the quote does not entail the claim. Test missing policy, conflicting versions, irrelevant retrieval, and a malicious document. Route policy exceptions to a human.
Why it matters: The control checks whether the source supports the claim rather than whether a citation-shaped object exists.Choose one real claim or decision today and test it against this idea: Hallucination includes contradictions, unsupported additions, and misattributed citations.
Write a Model Requirements Card
Choose from the task backward, not from the provider logo forward
Outcome. You can translate one product use case into measurable quality, language, modality, context, tool, privacy, safety, latency, cost, and lifecycle requirements.
- Start with task, users, evidence, actions, and failure consequences.
- Separate must-haves from targets and preferences.
- Include Khmer, safety, privacy, latency, cost per success, and lifecycle.
Task: classify and summarize inbound tickets for human agents. Must: no autonomous customer action; EN/KM pass rate ≥92%; zero cross-customer data leaks in the test set; JSON schema ≥99.5%; p95 ≤4s; evidence quote for urgency; approved data retention. Target: ≤$0.03 per successful ticket. Preference: provider-hosted tools. Define 50 representative cases and severe failures.
Why it matters: Specific thresholds make selection and later migration defensible.Choose one real claim or decision today and test it against this idea: Start with task, users, evidence, actions, and failure consequences.