Which of the following best describes memory persistence in an agentic AI system?
Think about how an AI keeps track of past conversations over time.
Memory persistence means the AI can save information beyond a single session, allowing it to recall past interactions and maintain context.
What is the output of the following Python code simulating a simple memory storage for an agentic AI?
class Memory: def __init__(self): self.storage = {} def remember(self, key, value): self.storage[key] = value def recall(self, key): return self.storage.get(key, 'Not found') memory = Memory() memory.remember('task', 'clean the house') print(memory.recall('task')) print(memory.recall('deadline'))
Check what happens when a key is missing in the dictionary.
The method recall returns the stored value if the key exists; otherwise, it returns 'Not found'.
Which storage model is best suited for an agentic AI that needs to store large amounts of unstructured data for long-term memory persistence?
Consider flexibility and scalability for unstructured data.
NoSQL document stores handle unstructured data well and scale horizontally, making them ideal for long-term memory persistence in agentic AI.
In an agentic AI system using a memory persistence mechanism, which hyperparameter directly controls how long information is retained before being discarded?
Think about what controls forgetting or fading of stored information.
The memory decay rate controls how quickly stored information fades or is removed, affecting retention duration.
Given the following code snippet for an agentic AI's memory retrieval, what error will occur when running it?
class AgentMemory: def __init__(self): self.data = {} def store(self, key, value): self.data[key] = value def retrieve(self, key): return self.data[key] memory = AgentMemory() memory.store('goal', 'learn AI') print(memory.retrieve('plan'))
What happens when you try to access a dictionary key that does not exist?
Accessing a missing key in a dictionary raises a KeyError in Python.