Inspiration

Food has always been a great avenue for us to learn about different cultures, and testing our knowledge on a global scale is always a fun challenge. This is like a mixture of games such as geoGuessr and TimeGuessr, mixed in with food, allowing people to learn about new cuisines and dishes while having fun.

What it does

  1. The application uses a dataset, which is a list of all countries.
  2. It randomly selects a country from said dataset.
  3. Names a famous dish from said country.
  4. Generates two images: one of the country's landmark and the second of the famous dish.
  5. Using a chatbot, gives players three attempts to guess the country based on the given information. On the player's last attempt, give them a hint.
  6. If they guess correctly, congratulate them and give them the recipe for the dish. 6b. Else, reveal the country and give them the recipe for the dish.

How we built it

We chained multiple widgets together.

  1. RandomCountry Widget - LLM widget which uses Claude model with a Temperature = 1 and Top P = 0 to improve its randomization of country selection outputs.
  2. Interesting Food Fact - LLM widget also using Claude but with a temperature of 0 so we could get predictable outputs. It gets input from RandomCountry to generate famous food from there.
  3. Country Hint and Image of food - Uses StableDiffusion XL model for image generation, opting for a photographic style to generate better images of respective places to better help players.
  4. CountryGuesser - this LLM chatbot was prompt-engineered to act as a host for a game giving you 3 guesses. Using Claude again with a 0.7 temperature to allow for some variation in its behavior towards players to keep it fresh.

Overview of chaining: [Country dataset] <-- [randomCountry]<---[LandmarkImage, famousDish, chatbotCheck] [famousDish]<-- [famousDishImage]

Challenges we ran into

  1. Country Randomization - Initially we didn't have the country dataset; we allowed the model to pick countries randomly. However, we noticed it would only pick 3 countries a majority of the time: Germany, Belgium, and India. So we introduced a list of countries, without the numbers; however, it was selecting a certain few again. We changed the prompts to no avail. So we decided to number the countries, and this drastically improved the randomization of the model.

  2. Country Reveal - Throughout the beginning of the development, many of the widgets would end up revealing the country, e.g., food from the UK is Fish and Chips. To tackle this, we explicitly told the models how to output data and what not to include. 2a. Chatbot - This was extra tricky, and when testing, we played as bad actors to see if we could break the game. After multiple iterations, the prompt we have now was best suited for the use case.

  3. Image Generation of Obscure Dishes - The model struggles to produce images of some dishes. For example, Nsima, the national dish of Malawi, which is similar to fufu. The model produced two people standing in a mountainous area.

Accomplishments that we're proud of

  • Having an interactive game that works as intended.
  • creating chain of thought process between models

What we learned

Sometimes you have to talk to the LLM models as if they're children and tell them everything explicitly, not making assumptions that they fully understand you.

What's next for Dish2Country - Guessing game

  • Implement a points system to allow players to track their scores.
  • Enable connection to external systems, including an API linking to recipes of dishes.

Built With

  • partyrock
Share this project:

Updates