Creating an AI subgroup on the Internet Computer

As inspired by the infinite backrooms, I’m currently designing an experiment involving linking multiple AI models together and observing the emergent properties of model-to-model communication, and would like to create my experiment on the Internet Computer. The main reason for this is to enable the subgroup with powerful capabilities, allowing them to perform increasingly complex real-world actions, e.g., calling canisters to check price data or make trades, sending messages on OpenChat, and so on.

The architecture is quite simple: a single canister operating as a message router between the multiple independent models and the outside world (either a user or other canisters on the IC). I plan to start with 4 models and scale up from there to find a “sweet spot.” The canister will queue messages and inform other models to wait for responses. Each model will be given specific instructions in their system prompt regarding how to interact with this canister. For example, inserting <call canister aaaaa-aa xxxxx> will inform the “command canister” to call another and relay the message back to the original model when complete. <end deliberation> will inform the “command canister” that deliberation between models is finished, and instruct it to forward the final result to the user. Finally, it will remind models occasionally of the original system prompt, as well as a summarized history of that model’s role/personality and recent interactions, which will aid in continuity and minimize breakdowns due to excessive context length.

As an example of how this might work: a user might send a prompt to the subgroup which will be routed to the “leader” model. They’ll then begin autonomously deliberating until they reach agreement, and then the chosen leader will relay the message. They may also choose to make external calls (like checking prices or other data) during the process of this deliberation.

The hypothesis here is that creating multiple models, all operating within a subgroup, each of which has its own distinct role and personality within the group, will lead to emergent properties that are much more powerful than a single model can accomplish. Without needing to hardcode too much, this could create higher quality/more accurate responses, intelligent actions, and lead to emergent solutions to problems like context window limitations and lack of persistent memory.

Ultimately, I want to allow this subgroup to operate completely autonomously: continually talking to and updating each other without any user prompting needed. And then observe what happens under various conditions, like being given some tokens to play with and tools to make trades. Or the ability to communicate in real-time with users on a chat platform like OpenChat.

I’m fascinated by the IC’s architecture and excited to begin this experiment on the network. To what extent is it currently possible for developers to upload their own models? I’m aware of a recent agent demo from Dfinity, but there doesn’t seem to be any way to adjust the system parameters. That’s about all I would need to get started.

Would a small model, like the Qwen 2.5 - 0.5B, be sufficient for your use case?

If so, then you can run the LLM fully on-chain, under your control, and you can set any system prompt or parameter you like, with llama_cpp_canister

All other solutions I am aware of, including DFINITY’s LLM canister run off-chain servers without giving you access or control to the actual LLM model.

1 Like

Awesome, thanks for the resource. I don’t think this will be sufficient to test the full scope of my hypothesis, so in the meantime (if this is the best option now) I’ll have to use API calls to off-chain models. But it is perfect for allowing me to set up a fully on-chain prototype ahead of time!

In that case, I recommend you go with DFINITY’s LLM canister. That integrates really cleanly with other canisters, and you get an 8B Llama 3.1 available, with plans to get access to larger LLMs.

1 Like

So I assume this is going to be a liminal model?

1 Like

noclipping through infinite canister boundaries.

1 Like

This might be of interest. Also based on AI on the IC using DFINITY LLM canister

1 Like

what could go wrong? :rofl:

just kidding, sounds fascinating. (I’m terrified)

2 Likes