Memory and visualization

A challenge that I wanted to tackle this week was memory, more specifically, the persistence of ideas that are generated by the LLMs.

Another challenge that I wanted to tackle this week was visualization, in other words, strategies to visualize such data.

Memory

The first order of business was creating a memory storage that wasn’t a simple data structure like an array. I decided on a PostgreSQL database to store data. PostgreSQL is robust as hell.

This required updating relevant interfaces to use the Message struct as a way to pass data around instead of primitive types:

type MemoryService interface {
Save(context.Context, memory.Message) error
Retrieve(context.Context, string, int) ([]memory.Message, error)
}

Visualization

There are different visualization options to observe the evolution of a language. The fundamental visualization would be being able to observe what the LLMs are discussing. The second visualization would be a list of all the vocabulary being used. Finally the third visualization would be the language changing over time.

Here is a list of ideas I have come up with for the language changing over time.

Heartbeat

This is a frequency visualization using a ā€œheartbeatā€. A heartbeat would be something akin to the status of how much a language is changing. For example, visualization using a sin wave that is changed more and more progressively over time according to some parameters generated by the LLMs is one options.

This adds depth to the meaning of understanding what a language is because sound itself is just a sum of many sine waves put together. Although the LLMs will not communicate using sound, the language’s evolution can be visualized as a sum of sine waves over time. This is a parallel to sound.

Rather than showing ā€œtalkingā€, this could be shown in its place. This would show that they are having a conversation.

Space movement

LLM agents can be represented visually as beings, like:

  1. Blocks on a grid.
  2. Unique avatars.

These agents would exist in 2D or 3D space and move around like in relation to each other.

Translation

Having a text being translated I think is the most personally compelling option for me, especially something that is meaningful. Multiple iterations of a translation displayed on a screen would also be a compelling way to see change over time.

Sentence by sentence could be retranslated over time as well, similar to git diffs or substituting characters in and out in realtime.

Translatable material

  1. UN Universal Declaration of Human Rights
  2. A short story (by an author, or me).
  3. Book passage. Possible books include:
    • The Savage God: A Study of Suicide: Interesting since Toki Pona was a language that served the author a purpose to combat mental illness and troubles.
    • When the Body Says No: For similar reasons above.
    • The Stuff of Thought: A book about language and its meaning. Ironic.
← back to blog posts