Generative Agents: Interactive Simulacra of Human Behavior
I wrote up some notes from reading this paper here: <a href="https:&#x2F;&#x2F;hachyderm.io&#x2F;@ianbicking&#x2F;110175179843984127" rel="nofollow">https:&#x2F;&#x2F;hachyderm.io&#x2F;@ianbicking&#x2F;110175179843984127</a><p>But for convenience maybe I&#x27;ll just copy them into a comment...<p>It describes an environment where multiple #LLM (#GPT)-powered agents interact in a small town.<p>I&#x27;ll write my notes here as I read it...<p>To indicate actions in the world they represent them as emoji in the interface, e.g., &quot;Isabella Rodriguez is writing in her journal&quot; is displayed as<p>You can click on the person to see the exact details, but this emoji summarization is a nice idea for overviews.<p>A user can interfere (or &quot;steer&quot; if you are feeling generous) the simulation through chatting with agents, but more interestingly they can &quot;issue a directive to an agent in the form of an &#x27;inner voice&#x27;&quot;<p>Truly some miniature Voice Of God stuff here!<p>I&#x27;ll see if this is detailed more later in the paper, but initially it sounds like simple prompt injection. Though it&#x27;s unclear if it&#x27;s injecting things into the prompt or into some memory module...<p>Reading &quot;Environmental Interaction&quot; it sounds like they are specifying the environment at a granular level, with status for each object.<p>This was my initial thought when trying something similar, though now I&#x27;m more interested in narrative descriptions; that is, describing the environment to the degree it matters or is interesting, and allowing stereotyped expectations to basically &quot;fill in&quot; the rest. (Though that certainly has its own issues!)<p>They note the language is stilted and suggest later LLMs could fix this. It&#x27;s definitely resolvable right now; whatever results they are getting are the results of their prompting.<p>The conversations remind me of something Nintendo would produce, short, somewhat bland, but affable. They must have worked to make the interactions so short, as that&#x27;s not GPT default style. But also every example is an instruction, so it might also have slipped in.<p>Memory is a big fixation right now, though I&#x27;m just not convinced. It&#x27;s obviously important, but is it a primary or secondary concern?<p>To contrast, some other possible concerns: relationships, mood, motivations, goals, character development, situational awareness... some of these need memory, but many do not. Some are static, but many are not.<p>To decide on which memories to retrieve they multiply several scores together, including recency. Recency is an exponential decay of 1% per hour.<p>That seems excessive...? It doesn&#x27;t feel like recency should ever multiply something down to zero. Though it&#x27;s recency of access, not recency of creation. And perhaps the world just doesn&#x27;t get old enough for this to cause problems. (It was limited to 3 days, or about 50% max recency penalty.<p>The reflection part is much more interesting: given a pool of recent memories they ask the LLM to generate the &quot;3 most salient high-level questions we can answer about the subjects in the statements?&quot;<p>Then the questions serve to retrieve concrete memories from which the LLM creates observations with citations.<p>Planning and re-planning are interesting. Agents specifically plan out their days, first with a time outline then with specific breakdowns inside that outline.<p>For revising plans there&#x27;s a query process where there is observation, then turning the observation into something longer (fusing memories&#x2F;etc), and then asking &quot;Should they react to the observation, and if so, what would be an appropriate reaction?&quot;<p>Interviewing the agents as a means of evaluation is kind of interesting. Self-knowledge becomes the trait that is judged.<p>Then they cut out parts of the agent and see how well they perform in those same interviews.<p>Still... the use of quantitative measures here feels a little forced when there&#x27;s lots of rich qualitative comparisons to be done. I&#x27;d rather see individual interactions replayed and compared with different sets of functionality.<p>They say they didn&#x27;t replay the entire world with different functionality because each version would drift (which is fair and true). But instead they could just enter into a single moment to do a comparison (assuming each moment is fully serializable).<p>I&#x27;ve thought about updating world state with operational transforms in part for this purpose, to make rewind and effect tracking into first-class operations.<p>Well, I&#x27;m at the end now. Interesting, but I wish I knew the exact prompts they were using. The details matter a lot. &quot;Boundaries and Errors&quot; touched on this, but that section was 4x the size, there&#x27;s a lot to be said about the prompts and how they interact with memories and personality descriptions.<p>...<p>I realize I missed the online demo: <a href="https:&#x2F;&#x2F;reverie.herokuapp.com&#x2F;arXiv_Demo&#x2F;" rel="nofollow">https:&#x2F;&#x2F;reverie.herokuapp.com&#x2F;arXiv_Demo&#x2F;</a><p>It&#x27;s a recording of the play run.<p>I also missed this note: &quot;The present study required substantial time and resources to simulate 25 agents for two days, costing
thousands of dollars in token credit and taking multiple days to complete&quot;<p>I&#x27;m slightly surprised, though if they are doing minute-by-minute ticks of the clock over all the agents then it&#x27;s unsurprising. (Or even if it&#x27;s less intensive than that.)<p>You can look at specific memories: <a href="https:&#x2F;&#x2F;reverie.herokuapp.com&#x2F;replay_persona_state&#x2F;March20_the_ville_n25_UIST_RUN-step-1-141&#x2F;2160&#x2F;Sam_Moore&#x2F;" rel="nofollow">https:&#x2F;&#x2F;reverie.herokuapp.com&#x2F;replay_persona_state&#x2F;March20_t...</a><p>Granularity looks to be 10 seconds, very short! It&#x27;s not filtering based on memories being expected vs interesting memories, so lots of &quot;X is idle&quot; notes.<p>If you look at these states the core information (the personality of the person) is very short. There&#x27;s lots of incidental memories. What matters? What could just be filled in as &quot;life continued as expected&quot;?<p>One path to greater efficiency might be to encode &quot;what matters&quot; for a character in a way that doesn&#x27;t require checking in with GPT.<p>Could you have &quot;boring embeddings&quot;? Embeddings that represent the stuff the eye just passes right over without really thinking about it. Some of training up a character would be to build up this database of disinterest. Perhaps not unlike babies with overconnected brains that need synapse pruning to be able to pay attention to anything at all.<p>Another option might be for the characters to compose their own &quot;I care about this&quot; triggers, where those triggers are low-cost code (low cost compared to GPT calls) that can be run in a tighter loop in the simulation.<p>I think this is actually fairly &quot;believable&quot; as a decision process, as it&#x27;s about building up habituated behavior, which is what believable people do.<p>Opens the question of what this code would look like...<p>This is a sneaky way to phrase &quot;AI coding its own soul&quot; as an optimization.<p>The planning is like this, but I imagine a richer language. Plans are only assertive: try to do this, then that, etc. The addition would be things like &quot;watch out for this&quot; or &quot;decide what to do if this happens&quot; – lots of triggers for the overmind.<p>Some of those triggers might be similar to &quot;emotional state.&quot; Like, keep doing normal stuff unless a feeling goes over some threshold, then reconsider.