PrerequisiteAI 101 recommended, plus Module 1 of this course
0 / 7 completed
Sync my progressJoin a session to keep progress across devices and share it with your instructor
Learning objectives
Name the seven types of context: Instructions, User Context, Task Context, Reference Knowledge, Conversation History, State / Memory, Tool / Retrieval Results
Place a real piece of information into the right context type and explain why
Explain why "all the history" does not mean "all of it is useful" for conversation history
Tell State from Memory, and decide which one a piece of information belongs to
The Problem
7 min
What Does an AI Need to Know for a Purchasing Evaluation?
Last module showed that an AI output depends on the instruction plus the context. But "context" sounds vague. To judge what is worth providing, you first need to name the kinds of information involved.
Work scenario (illustrative)
Please help me write a purchasing evaluation report for a new batch of classroom tablets.
To finish that report, the AI might need:
Format and tone requirements
Your department and responsibilities
The deadline, and how far the work has got
Purchasing policy and product specifications
A clarification you gave earlier in the conversation
The report layout your manager prefers
The latest price looked up from a quotation system
These behave very differently: some must be supplied fresh for every task, some can be kept over time, and some must be looked up live. Telling them apart is the first step of context design.
Key takeaway: Different information behaves differently. Classify first, then decide how to handle it.
The Seven Types
10 min
The Seven Types of Context at a Glance
This course groups context into seven types. It is a thinking aid: material from one source can fit more than one type. What matters is knowing which kind of information you are dealing with.
Seven context types (tablet purchasing evaluation as the example; data is illustrative)
Type
What question it answers
Examples
1. Instructions
How should the AI work?
Role, task, constraints, output format, success criteria
2. User Context
Who is using it, and for what?
The user's job, department, goals, preferences, permissions
3. Task Context
Where does this work stand?
Goal, deadline, finished and unfinished items, next step
"Legal review not finished"; "manager prefers a one-page summary"
7. Tool / Retrieval Results
What was just looked up?
Database query, web search, RAG result, API response
Info
Type 7 is introduced here only as a concept: an AI can bring freshly looked-up data into its context. How tools are called safely is the subject of AI 201.
Key takeaway: Seven types: instructions, user context, task context, reference knowledge, conversation history, state and memory, tool and retrieval results.
9 min
The First Four: Instructions, User, Task, Reference
1Instructions Role, task, constraints, format and success criteria. You already practiced this in AI 101.
2User Context The user's role, department, goals and preferences. It tells the AI who the work is for, but only the part relevant to the task should be provided.
3Task Context Goal, deadline, what is finished and unfinished, the next step. It lets the AI pick up from where the work stands.
4Reference Knowledge Policies, SOPs, regulations, product documents, research papers, handbooks. There is usually a lot of it, and any one task uses only a small part.
Warning
Personalization does not mean every piece of personal information should go to the AI. Give user context only to the extent this task needs.
Reference knowledge is where the "paste the whole thing" habit is strongest. Consider: if you only want to know the number of leave days, does the AI really need all 30 pages of the handbook?
Check yourself
A colleague pastes the full 30-page employee handbook into the conversation every time they ask about leave rules. What is the biggest problem with this?
Key takeaway: Reference knowledge is usually large, but each task needs only a small relevant part.
Conversation History
8 min
Conversation History: All of It Is Not All Useful
Conversation history is everything already said in this conversation. The longer it runs, the more there is. But not every line deserves to be carried forward.
Four ways to handle conversation history
Approach
What it does
Fits when
Watch out for
Recent history
Keep the last few turns
The task is continuous and topics are close
An early but important constraint may be pushed out
Relevant history
Pick only parts related to the current question
The conversation is long and topics switch
You must judge what counts as relevant
Summary
Condense earlier points into a few sentences
Decisions and constraints must be kept
A wrong summary keeps repeating its error
Compression
Shorten long content and keep only what is essential
Space is limited
Detail is lost, so flag critical details first
Info
Summaries and compressed text are produced by an AI or a tool, so they are derived data. When a number or limit matters, such as a budget ceiling, check it against the original rather than trusting the summary alone.
Check yourself
In a very long conversation, at turn 100 the AI starts proposing options above the budget ceiling, which was stated at turn 3. Which response is most sensible?
Key takeaway: History needs trade-offs: keep what is recent, relevant and necessary, and restate and check important constraints.
State and Memory
9 min
State and Memory: Progress Is One Thing, Lasting Preference Another
State (狀態) and Memory (記憶) are often mixed up, but they answer different questions.
State: where things stand now
Quotation obtained
Legal review not yet finished
Manager approved phase one
Changes as the task moves, and usually stops mattering once the task ends
Memory: what may be valuable later
User preferences, such as liking one-page summaries
Project background, such as its name and goals
Common formats and long-term settings
Useful across many tasks, but needs periodic checking for staleness
Warning
Memory does not mean saving every conversation forever. There should be a reason for remembering something, and the user should be able to see, change and delete it. Personal or confidential data should not be remembered just because it is convenient.
A simple test: "Will this still be needed next week or next month, on a different task?" If yes, it is a candidate for Memory. If it only concerns this task's progress, it is State.
Check yourself
In a purchasing task, "the quotation is in, but legal has not reviewed it yet". Which type is this, and why?
Key takeaway: State says where things stand; Memory keeps what stays valuable. A person decides and updates both.
Practice
6 min
Tool and Retrieval Results, and a Classification Exercise
Tool / retrieval results are data an AI has just looked up during a task, such as a database query, a web search, a RAG (檢索增強生成) result or an API response. Once they enter the context, they need checking like anything else.
Which source did it come from?
Which date and version is the data?
Is it complete, or only a fragment that was found?
Now go to the Practice page. You will get 20 pieces of information; place each into one of the seven context types and try to explain why. Some can fit two types. In that case, think about the role it plays in this task.
While preparing a purchasing evaluation, the AI brings back a price list from retrieval. It looks complete, but the file is marked as a version from three years ago. What is the most appropriate handling?
Key takeaway: Data brought back by retrieval or tools also needs its source, date and version checked.
Recap
6 min
Recap: Classify First, Then Choose
Done
When you see a piece of information, ask: which type of context is it, and what role does it play in this task?
Seven types: Instructions, User Context, Task Context, Reference Knowledge, Conversation History, State / Memory, Tool / Retrieval Results
Reference knowledge is usually large, but each task needs only the relevant part
History needs trade-offs, and important constraints should be restated and checked
State is current progress; Memory is what stays valuable later
Tool and retrieval results still need their source, date and version checked
Once you know the kinds, the next question is whether all of it deserves to be seen by the AI. Module 3 offers a set of criteria.