The University of Hong Kong · FACULTY OF MANAGEMENT

PMGM7023 Chap.5 Prompts, Context and the Model Engine

- one subject, every graph, every model, every mark
4 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 5 of 12 · PMGM7023

Prompts, Context and the Model Engine

A vocabulary arranged so failures can be located

The second session supplies eighteen terms arranged in five layers, and the arrangement carries as much teaching as the definitions. Each layer answers one question about the system, so a failure can be attributed to a layer rather than blamed on the model in general.

This chapter covers the first two layers: what enters the system, and what generates the response.

A request can specify how to think, not only what to answer

A prompt is your request together with anything you deliberately supply alongside it. A strong one names the outcome wanted, the context, the evidence available, the constraints, the reasoning approach and the shape of the output.

Each of those removes a degree of freedom that would otherwise be filled by guessing.

Asking what should we do supplies one element; asking what should we do, given these two tables, without inferring causation, as three findings and one recommended next question supplies five.

Preferences that apply across many tasks belong in a standing instruction instead: who you are and what you work on, how you want answers organised, and the habits you never want, including evidence rules and hard constraints.

The test of a good one is whether it would visibly change an answer.

A reusable request works the same way, holding fixed the standards of reasoning, the rules on evidence, the shape of the output and the final check while leaving obvious places for the goal, the audience and the source material.

Context is finite and it competes

Context is everything available for the current response: the standing instruction, the conversation so far, attached files, passages found for you, and results returned by tools.

Two limits follow. The first is capacity, and anything falling outside it cannot be used at all rather than merely being deprioritised, which is the mechanism behind an assistant that appears to forget an instruction given an hour earlier.

The second is attention: a long input can bury the passage that decides the answer, so supplying a hundred pages when four are relevant makes a wrong answer more likely and harder to diagnose.

The sampling setting is frequently misread as an accuracy control. A lower value concentrates probability on the most likely continuations and usually produces more repeatable wording.

It adds no knowledge, verifies no claim and does not reduce the chance of an invented fact.

What is generating the response

Generative systems are the broad category producing new content, including images and audio, so the category is wider than language.

A large language model is the language member of that family and can power a product without being the product, since the product may also include search, tools, memory and controls.

The architecture asks, for each position in a sequence, which earlier positions carry useful signal, merges what it finds and revises how it is holding that position, repeating that block across many layers before scoring and choosing the next piece of the answer.

Two moments are easy to conflate. Training adjusts numerical parameters before deployment.

Inference uses an already-trained model on new input, which is what a tutorial request triggers, so a correction you make does not change the model and will not persist tomorrow unless something outside it stores the correction.

In this chapter

What this chapter covers

  • 01

    Prompt, standing instruction and reusable request as three different objects

  • 02

    The context window as a finite space with competing occupants

  • 03

    Sampling spread changes variation in wording, not accuracy

  • 04

    Training changes parameters; inference uses them

Worked example · free

Rebuilding a request so the answer can be judged

Q [9 marks]. AskSia-authored practice. Rewrite the request summarise our staff survey results into something an analyst could be held to, covering goal, context, evidence, constraints, output and check. The marks shown are an AskSia study allocation, not an official University marking scheme.
  • 3Name the decision the summary will support.
  • 3Name the audience and the complication the answer must handle.
  • 3State an evidence rule and a refusal in advance.
Compare this year's survey with last year's and identify the three items that moved most, so the leadership team can choose one area to act on. The audience is a management group with no statistical training, and two departments were reorganised between the surveys. Use only the two attached response tables, quoting the item wording and the number of respondents for every figure. Do not infer causation from a difference between years, and flag any item whose respondent count fell by more than a fifth. Return three findings, one compact table and the single question worth asking next, checking each figure against the tables before you answer.
Sia tip — State the refusal in advance rather than correcting the inference afterwards. Do not infer causation is a constraint the answer can be held to; pointing out the error later is not.
Glossary

Key terms

Standing Instruction
A standing instruction is a persistent set of preferences and rules read at the start of a session and applied across tasks. It is useful only if it would visibly change an answer.
Context
Context is all information available to a model for the current response, including instructions, conversation history, attached files and tool results.
Inference
Inference is the use of an already-trained model on a new input to produce an answer. It leaves the model's parameters unchanged.
Temperature
Temperature is a generation setting that reshapes how probability is spread across candidate continuations. It changes variation in wording rather than correctness.
FAQ

Prompts, Context and the Model Engine FAQ

Where should I put a preference that applies to every task?

In the standing instruction rather than in each request. A preference repeated message by message consumes space in a finite working context and disappears as soon as earlier turns fall outside it. Written once as a standing instruction, it is read at the start of a session and applies across tasks, which is both cheaper and more reliable than restating it.

Will lowering the temperature stop an assistant inventing figures?

No. The setting reshapes how probability is spread across possible continuations, so it affects how varied and repeatable the wording is. An invented figure is a missing-evidence problem: the repair is to supply the passage containing the number, require every figure to be quoted from the attachment, and permit the answer to state that the figure is not present.

Study strategy

Exam move

Write your standing instruction early in the term and revise it whenever you correct the same habit twice. Keep tutorial sessions short and start fresh when the task changes. Practise naming the layer responsible for a described failure before proposing any fix, since most failures are input or evidence problems rather than model problems.

Working through Prompts, Context and the Model Engine in PMGM7023? Sia is AskSia’s AI Management tutor — ask any PMGM7023 Prompts, Context and the Model Engine question and get a clear, step-by-step explanation grounded in how PMGM7023 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 4 of your The University of Hong Kong subjects - and 1,000+ Bibles across every Australian university.
Sia - your PMGM7023 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works