Data: From Business Records To Model Inputs · Lesson 15

How AI Apps Store Memory And State

Retained information needs a purpose, scope and source priority. A remembered statement is evidence that something was said, not automatic authority for a fact or action.

Study And Save Progress

Watch The Lesson

5 min 40 sec

Read the video transcript

Our fictional returns assistant remembers that a customer prefers short answers. It also retains an earlier statement that every item can be returned within 30 days. When a new question arrives, which memory should influence the answer? Follow a preference, a policy claim and a pending task through their different sources and controls.

Remembering something does not establish its authority. Memory in an AI application can mean retained conversation, a preference, a summary or workflow state. Conversation context is the material supplied to the current model call. Persistent state lives beyond that call in a store or service. An application can retrieve stored information into context,

but that does not by itself update model weights. Separate the learning process, request-time evidence and retained state in the architecture. For this customer, a scoped preference for brief explanations can guide presentation. The authoritative order facts remain in the operational source, and the applicable policy comes from its controlled evidence path. A pending return request can keep its order

identifier and a status such as awaiting review. That state records progress; it does not authorize a refund or establish that a return was completed. Suppose the remembered statement says all returns allow 30 days. Its source is a prior user message. Under our fictional purchase-date policy rule, the current question may require another version or a product exception.

Keep the remembered statement's date, source and uncertainty, then verify the applicable policy. The application needs a conflict rule that favors the relevant authoritative evidence for this question. A generated summary should not silently become the policy source. Summaries can lose essential qualifications. An earlier statement that a customer thinks an item may be unopened can

become unopened if the uncertainty is dropped. The shortened memory can then bias later answers repeatedly. Preserve important uncertainty and source identity, and inspect the underlying conversation when needed. A shorter representation changes what information survives; it is a transformation requiring checks. Correction needs an update path. If the user changes the preference from brief to detailed,

update the scoped active preference rather than merely appending a contradictory note and hoping it wins retrieval. If an earlier policy claim is unsupported, preserve it only as a dated statement when there is a permitted purpose, and prevent it from overriding the policy path. Define what is current, what is historical, and which records should expire or be removed.

OpenAI's February 13, 2024 memory announcement describes saved information that can influence later chats, with controls for reviewing and deleting memories. The page explains that deleting a chat does not erase its saved memories. It now also contains separately dated later updates. That historical design illustrates why the conversation and a retained preference need distinct update and removal paths.

It does not specify the settings available in every current account or prove that deleting a memory removes learned model parameters. Test the representations your application actually retains. LangGraph's memory documentation gives a concrete framework example: thread-scoped state and cross-thread stores have different recall scopes. Its persistence documentation distinguishes checkpoints from application-defined stored data and notes that in-memory

storage does not survive a process restart. These capabilities depend on configuration. A namespace is an organizing mechanism, not proof that our application's access controls and retention are correct. Design memory with a purpose, user or task scope, source, update rule, retention period and access policy. Decide which user controls are appropriate and how corrections propagate.

Test a 2nd customer's request, a resumed task, a changed preference and a conflicting source. State what should remain available after a restart and verify the chosen storage. No universal retention duration or claim that every conversation should be kept is supplied here. Return to the request. Use the preference only for style,

obtain current order facts through authorized lookup, retrieve the applicable policy, and inspect the pending task's real status before taking a step. Keep the evidence and state identities with the response. If they conflict or required information is missing, ask for clarification or hold the affected action. Familiarity with the customer cannot substitute for authorization. Here is the checkpoint.

Why should a remembered user statement not be treated as authoritative current policy? Think about what that memory actually records and what determines applicability. It records a statement with a source, date and uncertainty. The appropriate policy source and effective version determine the relevant rule. Keep the statement's meaning distinct from

verified current or historical policy evidence, and resolve conflicts before relying on it. For practice, separate a preference, a pending task and an unsupported policy claim. Design a correction and a restart test without assuming that storing more history makes the service reliable. Our assistant becomes useful through purposeful, scoped state and clear source priorities.

Next we will trace rights, access, retention and deletion across the different representations the application creates.

Main Point

Retained information needs a purpose, scope and source priority. A remembered statement is evidence that something was said, not automatic authority for a fact or action.

Key Points

1. Follow three retained items

In the fictional service, “brief answers” is a user preference. “All returns allow 30 days” is an earlier user claim, with uncertain applicability. “Awaiting review” is a pending task status. None should be silently substituted for current order facts, an applicable policy version or authorization to issue a refund.

Supply the relevant state to the current context while keeping provenance. A purchase-date policy question can require historical evidence; the newest version or the latest retrieved memory is not automatically the applicable source. State the conflict rule and inspect missing facts.

2. Correct the transformation

A summary changing “I think it may be unopened” into “unopened” removes uncertainty. Preserve the qualifier or revisit its source. If the preference changes, make the new active value explicit and treat older history under a permitted retention purpose. Appending contradictory statements without an update rule can repeatedly retrieve the wrong state.

3. Bound the implementation

LangGraph's memory and persistence documentation distinguishes thread checkpoints, cross-thread stores and their configuration. In-memory storage differs from durable storage across restart. These are framework mechanisms, not evidence that our service isolates users or deletes all copies. [LG-MEM;LG-STATE]

Record purpose, scope, source, date, uncertainty, active/history status, update rule, retention and access. Test cross-user isolation, changed preferences, task resumption and authority conflicts. The worksheet asks for expected behaviors; no actual memory service was created or tested.

4. A dated example

OpenAI's February 13, 2024 memory announcement describes saved information that can influence later chats, with controls for reviewing and deleting memories. The page explains that deleting a chat does not erase its saved memories. It now also contains separately dated later updates. That historical design illustrates why the conversation and a retained preference need distinct update and removal paths. It does not specify the settings available in every current account or prove that deleting a memory removes learned model parameters. Test the representations your application actually retains.

5. Bringing the lesson together

The remembered preference can shape presentation, while a prior policy claim keeps its provenance and uncertainty. You can now define separate correction, restart and removal tests for each retained state.

Learning Checks

Attempt each answer before expanding the reasoning.

M13-L15-Q01

Why should a remembered user statement not be treated as authoritative current policy? Think about what that memory actually records and what determines applicability.

Show reasoning

It records a statement with a source, date and uncertainty. The appropriate policy source and effective version determine the relevant rule. Keep the statement's meaning distinct from verified current or historical policy evidence, and resolve conflicts before relying on it.

Sources

Learner Materials

Download Lesson 15 Learner Materials

Use the supplied fictional cases and templates for practice.

Practice

Write your answer, compare it with the model answer and decide what to revisit. These written checkpoints are self-assessed.

Here is the checkpoint. Why should a remembered user statement not be treated as authoritative current policy? Think about what that memory actually records and what determines applicability.

Show The Model Answer

It records a statement with a source, date and uncertainty. The appropriate policy source and effective version determine the relevant rule. Keep the statement's meaning distinct from verified current or historical policy evidence, and resolve conflicts before relying on it.

Compare your reasoning with the model answer. These written checks are self-assessed.

Open Practice And Save Your Work