Adding Memories to Your AI Application
In the previous chapter, we learned how to use planners to give our users the ability to ask our application to perform actions that we did not program explicitly. In this chapter, we are going to learn how to use external data, so that we can bring recent information and keep information between user sessions. For now, we are going to use small amounts of external data that our users may have given us by saving it to memory. Learning how to use memory will enable us to greatly expand the capabilities of AI models.
This is a building block for the next chapter, in which we are going to learn techniques to use amounts of data that vastly exceed the context window of existing models. As you may remember, a context window is the maximum size of the input you can send to an AI service. By using memory, you can save a large amount of data and only send portions of the data in each call.
We will start by understanding how LLMs convert words into...