From the course: Chat with Your Data Using ChatGPT

Unlock this course with a free trial

Join today to access over 25,400 courses taught by industry experts.

Challenge: Equip your agent with memory

Challenge: Equip your agent with memory - OpenAI API Tutorial

From the course: Chat with Your Data Using ChatGPT

Challenge: Equip your agent with memory

Your goal in this challenge is to verify that your agent can retain context across multiple runs using persistent memory. First, create a persistent SQLite session for your agent. This session should point to a local database file and use a stable session identifier so the agent's memory can be reused across runs. Next run the agent for the first time with both a task and the manuscript page images. Treat this step as the agent's first pass through the chapter. After that, run the agent a second time using the same SQLite session, but do not resend the manuscript images. Instead, provide a prompt that asks the agent to build on what it has already observed and refine its hypotheses. Then inspect the agent's output from the second run. Confirm that the agent references earlier observations and produces more informed next steps rather than starting from scratch. When these steps are complete, you should have an agent that behaves like a research partner with continuity, able to carry…

Contents