05 / 05Advanced
Explore and extend
Your chat agent is set up and tested. Next, open the code and try changing how it works. The course gives you a working boilerplate for exploring memory handling and ways to improve chat interactions.
Explore the codebase
The project is a base for experimenting with storing and retrieving memory on Chromia. These are good places to start:
Memory strategies
- Short-term memory: Trace how the agent stores and retrieves data from recent interactions. Think about cases where you would want to keep more or less information in short-term memory.
- Long-term memory: See how the system keeps important memories across sessions. Try changing the rules that decide when a short-term memory moves into long-term memory.
Agent behavior
- Look at how the agent builds its responses from stored memories. Change how it draws on those memories to give responses with richer context.
Try custom scenarios
- Edit the agent's prompts or objectives and watch how its behavior changes.
- Add memory fields or logs that record particular interactions or metadata.
Suggested experiments
Some ideas to get you going:
-
Customize memory limits
Change how many short-term memories the agent keeps and observe the effect on the conversation. For example, update the logic so it keeps the last five interactions rather than ten. -
Change how memories are used
Experiment with how long-term memories are summarized and updated. Check what happens when you update them more often or change what gets stored. -
Analyze agent logs
Inspect theLLM_LOGtable to see how requests and responses are recorded. Use that data to find ways to improve memory retrieval and response generation.
Take it further
You can go past the starting setup in several directions:
- Modify the backend: Change the database schema or Rell operations to fit your project's requirements.
- Integrate new features: Extend what the agent can do by connecting new APIs or adding tools.
- Refactor memory strategies: Add more advanced cleanup, prioritization, or tagging of memories to improve performance.
Need an overview?
For a recap of how the project fits together, read the repository README, which includes diagrams and a high-level explanation.
Treat the project as a sandbox: change things, break them, and rebuild them. Chromia's relational blockchain combined with memory-centric chat agents leaves plenty of room to explore.