DEV Community

Cover image for AI Debates
Prabin Acharya
Prabin Acharya

Posted on

AI Debates

This is a submission for the Cloudflare AI Challenge.

AI Debates

AI debates is an ai-powered debate platform. Users can add debate or discussion topics and ai agents like Aristotle, Steve Jobs, da Vinci, Elon Musk, Carl Sagan, Madam Curie, Economist will debate on your topic!!

Demo


Image description

Image description

Image description

Background

With the recent advancements in LLMs, many new applications have become possible. I am particularly excited about the vast amount of knowledge they contain. These LLMs are trained on vast amount of data, this includes all the text on the internet, many books from different writers, essays and so on. This includes knowledge about vast amount of topics, from perspective of different writers.

Despite the name "AI debates", this application can be used to learn about any topic. I wanted to build a build a application where you can give a topic and get different perspective/views on that topic. You can think of it more like a discussion where you set the topic and the world's greatest minds will discuss on that topic.

We as a society struggle to make collective decisions. In a particular topic there are vast nuances and perspectives which are very hard to accommodate. AI Debates is a small step on that direction that attempts to use AI agents to explore different perspective on any given topic. This is no way near perfect but should get better as LLMs advances. Techniques like fine-tuning models are on the pipeline to improve the ai agents and this will only get better.

How I Built it

This was my first time building with Cloudflare. I got to learn a lot about how serverless and edge computing works. I was pleasantly surprised by the extensive range of offerings from Cloudflare, which made building this project so much easier and faster.

Here are the technologies I used to build this project:

  • Cloudflare Pages
  • Cloudflare Workers AI
  • Cloudflare D1 database
  • Cloudflare R2 for image storage
  • Nextjs, gpt-3.5, TailwindCSS

Multiple Models and Triple Task Types

Multiple Models(total 6 different models were used)
It was crucial to incorporate various models in this AI Debates application. These models, each shaped by the datasets they're trained on, carry their own biases and perspectives. By integrating diverse language model types, each trained by different companies, we can harness the unique perspectives and insights they offer. As a result, users can immerse themselves in discussions enriched by a wide range of perspectives, fostering more nuanced and well-rounded debates.

This was made very simple to implement thanks to plethora of AI models offered by cloudflare platform.
Different models used:

Task Types Used(3 different task types were used):

  • Text Generation(3 different models) - used by ai agents to generate arguments
  • Summarization: to generate summary of the debates
  • Text-to-Image: to draw the banner image of the debate

What's Next

Lots of things! I have barely started. I built it in a week during this challenge. This is the first version. I have lots of ideas to improve it. Here's a sneak peek into what's on the horizon (stay tuned!):

  • Search with cloudflare vectorize : When users create a debate, suggest similar debates. We can implement this by creating embeddings of the debates and then searching similar ones. Cloudflare Vectorize enables this but I had little time and could not implement during this hackathon.
  • Personalize: Allow users to create their own agents to take part in debates. Maybe allow them to comment, upvote, downvote?

Top comments (4)

Collapse
 
sagar54 profile image
sagar • Edited

wow, this looks interesting

Collapse
 
prabin profile image
Prabin Acharya

thanks sagar

Collapse
 
willfarritor profile image
Will Farritor

Looks awesome prabin❤️

Collapse
 
prabin profile image
Prabin Acharya

thanks will❤️