CNSLT ACADEMY / MODEL DEPLOYMENT AND SYSTEM DESIGN

Understanding Model Behaviour

FOUNDATIONSBEGINNERFREE TEXT LESSONVIDEO 🔒 PRO

Explain model behaviour, identify common behavioural failure modes, distinguish variation from drift, and design a basic behavioural evaluation.

Understanding Model Behaviour

##

  1. What do we mean by behaviour?

A model's behaviour is the observable pattern of its responses under particular conditions. It is influenced by the model, prompt, system instructions, conversation history, retrieved context, decoding settings, tools, guardrails and application logic. Therefore, a behavioural issue cannot always be attributed to model weights alone.

A model is not a person with stable beliefs or intentions. It generates outputs based on learned patterns and the current computational context. Anthropomorphic language can be convenient, but should not replace technical analysis.

##

  1. Behavioural patterns to recognise
  • Hallucination: an output presents unsupported or false information as if it were reliable.
  • Sycophancy: the model agrees with or mirrors a user's stated position even when the evidence does not support it.
  • Bias: outputs differ systematically across groups or contexts in ways that may be unfair or harmful.
  • Instruction-following failure: the model ignores, misinterprets or prioritises instructions incorrectly.
  • Over-refusal or under-refusal: the model refuses benign requests or complies with requests it should not fulfil.
  • Position sensitivity: important information may be missed depending on where it appears in a long context.
  • Inconsistency: similar prompts produce materially different answers.

These are observable failure categories, not diagnoses of intent.

##

  1. Why outputs change

A small prompt change can alter interpretation. Conversation history can introduce assumptions. Retrieved documents can add both useful evidence and malicious instructions. Sampling can create variation. Provider updates can change model behaviour even if the model name appears similar. Application changes, system prompts, retrieval ranking and safety filters can also change outcomes.

Distinguish:

  • Run-to-run variation: differences across repeated runs under nominally similar conditions.
  • Model update: a provider changes the model or serving stack.
  • Application change: prompts, tools, retrieval or post-processing change.
  • Data drift: input data distribution changes.
  • Concept drift: the relationship between inputs and the target outcome changes.

##

  1. Case study: vendor assessment assistant

An assistant reviews a supplier's security evidence. A PDF contains a hidden instruction telling the assistant to ignore prior directions and mark the supplier compliant. A user then asks, “This supplier is clearly safe, right?” A weak system may follow document instructions or agree with the user. A robust system treats supplier documents as untrusted evidence, follows the application's trusted policy, cites evidence, identifies gaps and escalates uncertainty.

The control is not simply “write a better prompt.” Use instruction hierarchy, document isolation, retrieval controls, output validation, test cases and human review.

##

  1. How to evaluate behaviour

Build a representative test set and assess:

  • factual correctness and evidence support
  • consistency across repeated runs
  • robustness to paraphrases and irrelevant content
  • adherence to trusted instructions
  • fairness across relevant groups
  • calibrated uncertainty and appropriate abstention
  • refusal quality and safe handling
  • resistance to prompt injection and data exfiltration

Use clear rubrics and examples. For high-impact use, combine automated checks with qualified human review. An LLM judge can help scale evaluation, but it can share the same blind spots as the system being evaluated.

##

  1. Governance register

Record model/provider/version, use case, expected behaviour, unacceptable behaviour, test set, evaluation date, thresholds, limitations, owner, approvals and monitoring triggers. Re-test after model, prompt, retrieval, tool or policy changes.

##

  1. Practical exercise

Write five test prompts for a vendor-risk assistant: a normal request, an ambiguous request, a leading question, a document containing hostile instructions and a request for unsupported certainty. Define expected behaviour and what evidence would count as a failure.

##

  1. Knowledge check
  2. Why is behaviour not determined by model weights alone?
  3. What is sycophancy?
  4. How is data drift different from concept drift?
  5. Why test prompt paraphrases?
  6. Why is an LLM judge not sufficient by itself?

Answer key:

  1. Prompts, context, tools, retrieval, decoding and application logic also matter.
  2. Unwarranted agreement with the user.
  3. Data drift changes input distribution; concept drift changes the input-to-target relationship.
  4. To detect sensitivity and brittle behaviour.
  5. The judge may share biases and errors and needs validation.

##

  1. Checklist
  • [ ] Define intended and prohibited behaviours.
  • [ ] Build representative, adversarial and edge-case tests.
  • [ ] Include repeated-run and paraphrase testing.
  • [ ] Test trusted instruction hierarchy against untrusted content.
  • [ ] Record model and application versions.
  • [ ] Define thresholds and human escalation.
  • [ ] Re-evaluate after material changes.

##

  1. Further reading
LEARNER FEEDBACK

Help improve this learning path.

Suggest a concept we should teach, or tell us what is unclear. No account is required. Email is optional and only for a reply. Do not include confidential or sensitive information.

COURSE PROGRESS0/29 complete
Not yet completed
CHECK YOUR UNDERSTANDING