# deb(AI)te

Project for Hack the North 2024.

## 💡 Inspiration

The idea for deb(AI)te was born from the desire to help people improve their presentation, critical thinking, and debating skills in a fun and interactive way. By integrating fun AI-driven characters with distinct personalities and expertise, users can engage in dynamic, real-time debates in a low-pressure environment. The aim is to make learning these essential skills more engaging and accessible for real-world purposes.

## ❓ What it does

deb(AI)te allows users to participate in structured debates against AI opponents. Users choose a debate topic, and the AI, customized with different difficulty levels, responds as an expert in the field. The user gets 30 seconds to prepare an argument and then present using their speech. After the user is done, the AI will provide their argument as to why their stance is superior. Then, the system uses a rating mechanism to assess both performances and provides constructive feedback on their arguments, helping the user to improve over time. The application leverages speech-to-text functionality for seamless interaction and AWS Polly for high-quality text-to-speech responses from the AI characters.

## 🧰 How we built it

We built deb(AI)te using JavaScript, React, and Tailwind CSS. We integrated AWS Transcribe and Polly for speech-to-text and text-to-speech functionality. The debate engine is powered by Cohere. Each of the characters' personalities and debate tactics are fed into Cohere giving the user a unique debate experience. As well the judging is also processed by Cohere giving feedback on the user's debate on three different categories - Creativity, Logic, and Flow. Cohere analyzes the data given by the user through the speech-to-text functionality to give meaningful feedback. The more confident and factual the user's speech, the higher the rating they will achieve.

## 🤔 Challenges we ran into

One challenge was creating AI personalities that were both engaging and realistic without straying into sensitive or controversial topics. As well, balancing the AI's difficulty levels in a way that challenges the user while providing valuable learning opportunities took significant fine-tuning.

## 🏆 Accomplishments that we're proud of

We’re proud to have created a fully functional debate platform within such a limited time period. Making each of the AI personalities was very fun and exciting as well as seeing our ideas come to fruition. We are also proud of how the UI/UX turned out including the artwork that was created to support the project.

## 🧠 What we learned

Through this project, we learned how to effectively integrate voice-based AI functionalities, refine prompt engineering, and handle real-time user interactions in a web-based application.

## 👉 What's next for deb(AI)te

* More personalities to debate against.
* Online play where you can challenge your debating skills against real people from across the world.
## Inspiration

Debates have been around since the birth of society, with argumentative reasoning being a skill humans have continually strived to perfect. However, debates are often emotionally charged, which can cloud judgment and weaken the effectiveness of arguments. We've seen this a lot in debate space and we think using AI to aide and guide users in the communication can help with calming down the debate and giving users the ability to improve their reasoning skills.

## What it does

Cicero allows for debate practice with an emotionally intelligent AI. It will be able to figure out when you are feeling uncomfortable or angry.

## How we built it

We were able to accomplish it with the help of the EVI, the Empathic Voice Interface using the Hume API. The front end uses Next.js, typescript, and react. The backend uses Python and Flask.

## Challenges we ran into

We had trouble with running the Hume APIs on our local machine for a big portion of the Hackathon. Streaming video with web sockets was also something we were having trouble.

## Accomplishments that we're proud of

We were able to figure out implement the EVI system on the website. Also, we are proud with our debate AI that is clever with responses.

## What we learned

We were able to learn about the Hume API and building a full-stack AI application.

## What's next for CiceroAI

Improving the UI/UX to be more user-friendly. Finetuning the model for better debate responses. Trying to do a better application of the Expression Measurement API with livestreaming. We can also implement a database for user to review history.
## Inspiration

After the recent hurricanes in Florida, one of our team members who is from Florida had damage to their house. Normally, the process for filing an insurance claim after disaster is extremely cumbersome, requiring proof of all items and their value that were in the house before the disaster. This is very hard for disaster victims to prove in such a tough situation, which dissuades many people from filing insurance claims that cover the full value of all the items they lost.

## What it does

Our app allows homeowners to record a video of their house, while our innovative AI automatically catalogues all items in your house and their approximate value. After a disaster, you an rescan your house and we automatically suggest items that might be lost to add to your insurance claim, with image proof of the before and after.

## How we built it

Our frontend is built with next.js. Our backend uses Flask and sqllite. We also use xrpl in order to put items on the blockchain for proof of their existence before the disaster. Here are the steps our AI uses to process videos and pictures into items:

1. The video is stitched together into a large panorama with OpenCV
2. We use YOLOv8 and Meta's segment anything model to generate areas of interest on the image.
3. We use Hyperbolic's inference (Qwen2 VL7B) to analyze each area and decide if it is an object to record and find its estimated monetary value
4. We place all images in ChromaDB to group/count items of the same type and match images before and after disaster. We originally used ResNet for our embedding for the vector database in order to compare items, but later found all-MiniLM-L6-v2 to work better for vector encoding. The ResNet embeddings were too high dimensional.
5. We generate a pdf claim to submit to the insurance company based on items that didn't appear after the disaster and were added by the user.

## Challenges we ran into

1. Segmentation problem: We tried a lot of different things in order to segment images well. We tried the segment everything model, SAM+yolo, and tried asking gemini to bounding boxes (it's the only vision language model that advertises this capability). We found SAM+yolo worked the best by far but only after lots of iteration and tuning.
2. System Design: lots of iteration required and thinking about the customer. For simplicity chose to host a single AWS EC2 instance although seriously considered hosting multiple servers for each general task like segmentation.
3. Video Panorama: How do you do segmentation on a video without getting duplicate items across frames? Our solution was to turn the video into a large image and run our machine learning on this image.
4. CORS struck us once again.

## Accomplishments that we're proud of

Super fast Segment Everything + Yolo + recognition + grouping pipeline that robustly recognized and catalogued items from video.
Well designed and aesthetic front-end.

## What we learned

There are no power outlets in SF. We learned how to deploy an EC2 instance, and also how to use vector databases.

## What's next for CLaiM

We would like to