0
0
Agentic AIml~20 mins

Memory persistence and storage in Agentic AI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Memory Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Memory Persistence in Agentic AI

Which of the following best describes memory persistence in an agentic AI system?

AThe process of storing and retrieving information across multiple sessions to maintain context.
BA technique to compress data to reduce storage space without retaining any context.
CA method to erase all stored data after each interaction to protect privacy.
DThe ability of the AI to remember information only during a single session without saving it.
Attempts:
2 left
💡 Hint

Think about how an AI keeps track of past conversations over time.

Predict Output
intermediate
2:00remaining
Output of Memory Storage Simulation Code

What is the output of the following Python code simulating a simple memory storage for an agentic AI?

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'))
Aclean the house\nNot found
Bclean the house\nNone
CNot found\nNot found
DNone\nNot found
Attempts:
2 left
💡 Hint

Check what happens when a key is missing in the dictionary.

Model Choice
advanced
2:00remaining
Choosing a Storage Model for Long-Term Memory

Which storage model is best suited for an agentic AI that needs to store large amounts of unstructured data for long-term memory persistence?

ATemporary cache that clears data after each session.
BNoSQL document store that allows flexible schema and horizontal scaling.
CIn-memory dictionary with limited size and no backup.
DRelational database with fixed schema and strict tables.
Attempts:
2 left
💡 Hint

Consider flexibility and scalability for unstructured data.

Hyperparameter
advanced
2:00remaining
Hyperparameter Affecting Memory Retention Duration

In an agentic AI system using a memory persistence mechanism, which hyperparameter directly controls how long information is retained before being discarded?

ALearning rate
BBatch size
CMemory decay rate
DNumber of hidden layers
Attempts:
2 left
💡 Hint

Think about what controls forgetting or fading of stored information.

🔧 Debug
expert
2:00remaining
Debugging Memory Retrieval Error

Given the following code snippet for an agentic AI's memory retrieval, what error will occur when running it?

Agentic AI
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'))
ATypeError
BAttributeError
CIndexError
DKeyError
Attempts:
2 left
💡 Hint

What happens when you try to access a dictionary key that does not exist?