With gAIa, we give every tree a voice, but not every voice is the same. Beyond that, not every tree’s history is the same. Some trees have been caught up in historic events, or hold a particularly iconic position within the landscape of our cities. Below we’ll detail our novel memory and persona system that gives each tree its own persistent identity, and allows them to recall stories from their past, and even evolve their memories, interlinking them and strengthening them over time through repeated recollection.
Persona System
On first interaction, each tree is given a core identity which is based on their intrinsic characteristics; species, and whether its native or an exotic import, the year it was planted, the location in which it lives, and its physical size; height, trunk diameter, etc..
We may have an aged, native Dutch Elm, speaking with wisdom and characteristic mannerisms of a local Dutchie, or an imported Fan Palm whose tropical persona has taken root in the similarly sandy soil of one of De Pijp’s shady public gardens.
Then, as time goes on, and some trees begin to collect tales of their life from interactions with city dwellers, or simply weathers some particularly powerful storms, we employ our episodic memory system to enrich this baseline persona.
Episodic memory
Most AI chatbots are stateless — they forget everything between sessions. Some more advanced models collect and organise information through interactions with the user, to provide a personalised experience. In our case, the agents represent the shared public forest, so we designed a system that could collate these memories across sessions, and between users. This is our episodic memory system.
It categorises memories into one of five types; Conversation, Question, Observation, Interaction, Reflection. Each potential memory is analysed for content, and given an importance score (0.0–1.0), as well as an emotional valence (−1.0 to +1.0). Importance scales approximately like so;
casual chat (0.3) → care event (0.5) → health concern (0.7) → major event (1.0)
With all of its context and previous memories, we can allow the tree agent to decide itself which new information is most relevant, and which can be discarded. Much like the short-term memory of humans, this allows us to discard the specifics of everyday conversations, while storing those most emotionally potent details. Similarly, if something banal is repeated many times, even that becomes lodged in our memory.
Memory Linking
Just like our human experience of memory, we needed a way to interconnect and relate the various incoming memories for a given tree. To do this, we use cosine similarity between the vector-embeddings of each memory. Once it passes a given threshold, we create a link, of one of four types;
- temporal (sequence)
- causal (cause → effect)
- thematic (same topic)
- emotional (shared feeling)
This allows the trees to have a natural, associative recall, not just direct lookups, e.g. a memory about a storm can be linked to a pruning that happened in the following week. New events can be easily associated with any similar historical ones, or similarly emotional ones.
Memories are naturally recalled, before a response is even begun, in case the user is discussing something directly related to any particular memories, but just like you might expect, when asked directly “Do you remember …”, the agents can search into their memories to see if anything rings a bell.
Overall, we think this gives gAIa’s trees a more natural conversational tone, and prevents the tree personas from becoming stale. And the memory evolution and linking process gives the trees a sense of awareness as we talk to them in the mighty stand. You can try it out today; find some tree species you like, or perhaps a particularly prominent tree in your neighbourhood, and let it know about its connection to your city, or your life, and watch the evolution!