Skip to content

AI 103 · Module 1

From Context to Agent Memory

If an AI no longer finishes a single task but keeps working, what does it need to remember?

Start Section 1
0 / 6 completed
Sync my progressJoin a session to keep progress across devices and share it with your instructor

Info

After you join, your completed lesson numbers are sent to your instructor together with your learner code, so they can see your progress. Use the codes your instructor gave you, and do not enter your name, company secrets or other personal data. Progress is kept with the rest of that session's data.

Learning objectives

  • Distinguish Prompt, Context, Memory, Knowledge and Skills, and explain how context and memory differ
  • Explain why a persistent agent needs memory beyond a single context window
  • Tell working, short-term and long-term memory apart, and recognize episodic, semantic, user, task and organizational memory
  • Use the Use Now, Keep Temporarily, Remember Long-Term, Do Not Store framework to decide how a piece of information should be handled

The Problem

8 min

The Assistant That Starts from Zero Every Time

In AI 102 you learned to decide what an AI should know for one task. But many real assignments are not one-off. An assistant that helps you every week faces a different problem: what should carry over from one session to the next?

Work scenario

A procurement officer uses an AI assistant every Monday to prepare a supplier follow-up list. Each Monday she has to explain again: use the three-bullet summary format, skip suppliers already resolved, and remember that last week the team agreed to wait for a revised quotation.

Two things are happening here. First, the model only sees what is inside its context window (上下文視窗) right now; when the session ends, or the window fills up, earlier content is no longer visible to it. Second, the officer is paying a repeating cost for information that could have been kept.

  • Her formatting preference (stable, worth keeping)
  • The decision to wait for a revised quotation (specific, has a date, may expire)
  • Today's scratch calculation (useful now, not worth keeping)
  • A supplier contact's personal phone number (should probably not be stored at all)

Warning

The opposite mistake is just as costly. An agent that remembers everything collects noise, outdated facts and information it should never have kept. The question is not "can it remember?" but "what should it remember?"

Key takeaway: A persistent agent needs memory, but the skill is choosing what to keep, not keeping everything.

Core Concepts

9 min

Context versus Memory

Context is what the AI can see while doing the current task. Memory (記憶) is information deliberately kept outside the current window so that it can be brought back later. Memory is not the same as context: something in memory only helps once it is selected and placed back into the context.

Five terms this course keeps apart
TermThe question it answersExample (illustrative)
Prompt (提示詞)What should the AI do, and how?"Prepare this week's supplier follow-up list in three bullets."
Context (上下文)What can the AI see right now?This week's supplier sheet and the current instruction
Memory (記憶)What did it keep from before?The team agreed last week to wait for a revised quotation
Knowledge (知識)What reference material is it grounded in?The current procurement policy
Skills (技能)How does it perform a repeatable task?The steps for a supplier follow-up review
How memory reaches the task
  1. Memory: information kept from earlier work
  2. Select: choose only what this task needs
  3. Context: the selected memory joins the current window
  4. AI Output: produced from context, then reviewed by a person

This course follows one storyline: Know, Remember, Retrieve, Organize, Act, Optimize. This module is the "Remember" step, and it starts by asking what deserves to be remembered at all.

Check yourself

Last week a user told an assistant, "always give me summaries as three bullets". In a new session this week the assistant returns long paragraphs. What is the most likely reason?

Last week a user told an assistant, "always give me summaries as three bullets". In a new session this week the assistant returns long paragraphs. What is the most likely reason?

Key takeaway: Context is what the AI sees now; memory is what was kept for later. Memory only helps once it is selected back into context.

10 min

Types of Memory

People use "memory" for many different things. It helps to sort by three questions: how long does it last, what kind of content is it, and whose is it? The categories below overlap on purpose; one item can be described along all three.

Three ways to classify memory (illustrative)
DimensionTypeWhat it isExample (illustrative)
DurationWorking Memory (工作記憶)What the agent holds while doing this step; it is the current contextThe three rows of the sheet being compared right now
DurationShort-Term Memory (短期記憶)Kept for the current session or a short project, then discardedIntermediate results from today's task
DurationLong-Term Memory (長期記憶)Kept across sessions and tasks until updated or forgottenThe user's preferred report format
ContentEpisodic Memory (情節記憶)A specific event with time and placeLast Tuesday's call ended with an agreement to send a revised quote
ContentSemantic Memory (語意記憶)A general fact or rule, detached from any single eventPurchases above NT$50,000 need three quotations
ScopeUser Memory (使用者記憶)Belongs to one personPrefers three-bullet summaries
ScopeTask Memory (任務記憶)Belongs to one piece of ongoing workThe follow-up list is waiting on two suppliers
ScopeOrganizational Memory (組織記憶)Shared by a team or organization; needs clear ownershipThe department's agreed naming rule for files

Info

Not every type is safe to keep automatically. Personal and organizational memory carry privacy and ownership questions that Module 2 turns into a policy.
Check yourself

An agent recalls, "In last Tuesday's supplier call we agreed to send a revised quotation by Friday." Which kind of memory is this closest to?

An agent recalls, "In last Tuesday's supplier call we agreed to send a revised quotation by Friday." Which kind of memory is this closest to?

Key takeaway: Ask how long, what kind and whose. One piece of information can be long-term, episodic and user-specific at once.

Decision Framework

8 min

Use Now, Keep Temporarily, Remember Long-Term, Do Not Store

When new information appears, an agent (and the person designing it) can ask one question in order: what should happen to this?

Memory decision framework
  1. Use Now: needed only for this step, so it stays in current context
  2. Keep Temporarily: useful for this session or project, then let go
  3. Remember Long-Term: stable, reusable, worth keeping, and appropriate to keep
  4. Do Not Store: sensitive, unnecessary or unauthorized, so it must not be kept
  1. Will it still matter after this task?
    If not, use it now and let it go. Most information belongs here.
  2. Is it stable and likely to be reused?
    A preference or a settled rule may deserve long-term memory. A one-off number does not.
  3. Is it appropriate to keep?
    Personal data, confidential material and secrets fail this test even when they would be convenient to have.
  4. Is it better looked up than remembered?
    Documents that change, or live values, are usually retrieved from the source when needed rather than copied into memory. Module 3 develops this.

Warning

Do Not Store is a real decision, not a leftover. Company secrets, client personal data, passwords and keys should not be placed into an AI conversation or a memory store unless it is authorized and designed for that purpose.
Check yourself

While asking for help drafting an email, a user mentions a client's ID number in passing. Under the framework, what is the best handling?

While asking for help drafting an email, a user mentions a client's ID number in passing. Under the framework, what is the best handling?

Key takeaway: Most information is used now and let go. Keeping something long-term is a deliberate choice, and some things must not be stored at all.

Practice

8 min

Practice: Memory Decision Exercise

Below are 8 illustrative pieces of information. For each, choose one category, then discuss with a peer or the instructor. Some cases can reasonably go two ways; what matters is that you can explain your reasoning. Do not enter real company secrets, client personal data or any unauthorized sensitive information in this exercise.

8 pieces of information (decide for yourself)
CaseInformationThink about
1The user's request: "shorten this paragraph"Will it matter after this task ends?
2The user said, "I always want three-bullet summaries, please remember that"Stable, reusable, and the user asked for it
3An intermediate total calculated in step 2 of today's taskUseful this session, but for how long?
4The leave policy, revised every quarterWould a saved copy stay correct?
5A client's national ID number mentioned in passingIs it needed? Is it appropriate to keep?
6The decision in last week's meeting to postpone the launch by two weeksA specific decision with a date; who owns it?
7A password pasted into the chat by mistakeWhat should happen, and what should the person do?
8Today's exchange rateWould remembering it help tomorrow?
  • Current Context: needed for this step only
  • Temporary Memory: kept for the session or project, then dropped
  • Long-Term Memory: kept across tasks, with a clear reason and owner
  • External Knowledge: leave it at its source and retrieve it when needed
  • Do Not Store: must not be kept
Check yourself

The employee handbook is 80 pages and revised every quarter. An agent needs to answer a leave question. Which handling fits best?

The employee handbook is 80 pages and revised every quarter. An agent needs to answer a leave question. Which handling fits best?

Key takeaway: Deciding what happens to each piece of information is the skill. A person still owns the decision to keep something long-term.

Recap

7 min

Recap: From "What Does It Know" to "What Does It Keep"

Done

Before an agent keeps anything: should it be used now, kept temporarily, remembered long-term, or not stored at all?

AI 102: What should the AI know for this task?

  • Choose relevant, trusted, current context
  • Decide what not to provide
  • Work within one task

AI 103: What should the agent keep over time?

  • Separate context from memory
  • Classify what to use, keep, remember or not store
  • Work across sessions and tasks

Human, AI, Human still applies: a person defines what may be remembered, the agent applies it, and a person reviews and remains responsible for what was kept. The next module turns this into a design: how should agent memory be created, used, updated and forgotten?

Key takeaway: Memory is a designed decision, not an automatic feature: use now, keep temporarily, remember long-term, or do not store.

What next?