← Back to Build an AI Agent in Python From Scratch

Module: Memory and Context

Practice Test: Memory and Context

Keep long chats inside the context window, add long-term memory with embeddings, and make retrieval a tool.

9 questions. 15 minutes. You need at least 7 right to pass. This test is optional. It does not mark any lesson complete and it does not count towards your certificate.

Time left: 15:00

1. Why does trim_history cut only at user message boundaries?

2. What went wrong with the first one line summary prompt on the small model?

3. What is the main weakness of trimming compared with summarizing?

4. Why are the vectors normalized to length 1?

5. Why does recall run in code on every turn instead of as a tool?

6. The restaurant question did not retrieve 'Asha is vegetarian.' What helped?

7. What does check_answer catch?

8. Why were citation labels changed from chunk numbers to labels like [g0]?

9. What does the fallback answer_with_forced_retrieval do?