This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
A team stores long-term agent memory in one container partitioned on the conversation thread identifier, matching the container that holds their conversation turns. Recall works in testing and gets steadily slower in production, and the request charge for recalling a returning customer's preferences grows with the length of that customer's history with the product. What explains the pattern?
The vector index is approximate, so its recall degrades as the number of stored vectors rises.
Long-term memory items are larger than conversation turns, so each one costs more request units to read.
Long-term memory is read across threads for one person, so partitioning on the thread scatters that person's memories across as many logical partitions as there are conversations for that person, and every recall fans out across all of them.
A developer sets a ttl of 2592000 on every conversation turn they write, expecting turns to disappear after 30 days. Months later, the container still holds every turn ever written. The items carry the ttl property with the correct value, and the container was created with no time to live configuration. What's the fix?
ttl
Change the item ttl to -1, which is the value that enables expiry for an individual item.
-1
Set DefaultTimeToLive on the container, either to -1 so each item's own ttl decides, or to a positive default the items can override.
DefaultTimeToLive
Add a background job that queries for turns older than 30 days and deletes them, because time to live doesn't apply to items written by an SDK.
An assistant recalls memories about the user and places them in the system message alongside its own instructions, because the system message is where the rules live. A user types a sentence containing an instruction. The extraction step stores it as a fact, and from then on, the assistant follows it in every session, including sessions the user isn't part of. Which characteristic of this failure makes it more serious than the same text arriving in a retrieved document?
The system message is processed before the user turn, so an instruction placed there always takes precedence over anything the user asks.
Embedding the text makes it retrievable by meaning, so it matches a wider range of questions than a keyword-matched document would.
The instruction is persistent: it was written into durable storage, so it survives the conversation that planted it and reaches sessions the person who planted it never joins.
A memory store holds a fact stating a customer's budget cap, and a later conversation establishes a higher cap. The team wants retrieval to stop returning the old value. A developer proposes deleting the old record because the new one replaces it. What's the stronger design, and why?
Keep the old record and set a supersession pointer on it to the new record's identifier, then filter out superseded records from retrieval queries.
Delete the old record, because a store holding two contradictory facts about the same subject can return either one, and removing the conflict is the only way to make retrieval deterministic.
Keep both records active and lower the confidence on the older one, so ranking naturally prefers the newer value.
A customer invokes their right to erasure. An engineer runs a delete against every conversation turn belonging to that customer and reports the request complete. A week later, the assistant greets the same customer by name and refers to a preference they stated last year. What was missed?
Time to live had already expired most of the turns, so the delete found fewer items than expected and left the rest behind.
Long-term memory is derived from the turns, so the facts, summaries, and profile built from them are separate copies in separate containers and survive the deletion of their source.
The delete removed the items but not their vector embeddings, which are stored in the vector index rather than in the container.
You must answer all questions before checking your work.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?