Playing with LLMs – TheLatest and cook.ai.

Over the past few weeks, I have been obsessed with the potential of LLMs. I’m sure most of my friends and family are sick to death of me ranting and raving about what was just released on any particular day. Papers, news, Spaces and repos. I’m aiming to take as much of it in as I can. With every new article or paper published I find myself becoming even more obsessed with the idea of making AI technologies consumable to the masses. Currently, outside of ChatGPT and some select web-based applications, custom LLM-based AI is only available to those with some verse in API-based coding. Very little focus is currently being placed in developing frameworks that make it easy for folks who don’t code to solve their own individual problems.

So, in addition to building a LangChain-based framework with an intuitive, simple and clean UI, I have also spent my time building fun LLM-based applications that would help serve parts of my daily life to better understand the steps that such a framework would have to automate behind the curtain for a non-technical user to engage with it. Here are some of my favourites:

TheLatest

Given the speed of which the AI, language models and and human-computer interaction fields research is being published, it’s a wonder anyone can keep up. YouTube channels like AI Explained have been a godsend for the masses, but even they can be a few days behind (and as demonstrated in his latest work, struggling to cram only a single week’s worth of updates into a single update video and having to add to his edit as things come out in near real time. Check out his work!).

TheLatest aims to solve this problem. It is a GPT-powered Flask application which summarises the latest arXiv research papers in AI (or any other research field) for easy consumption. It takes in an OpenAI key and your email as arguments, as well as preferences for how you’d like the information ot be summarised. Simply select a catagory of interest and you’ll have the latest papers published that day.

You’ll have to pardon the unstyled front-end, but that will be for later should it be deployed somewhere.

Got time in the morning and want to replace your morning paper? Extend the number of sentences and request more papers for a lengthy read and if desired. Not versed in the lingo of the field? Change the readability of the papers, from a simplified ELI5-style reading level all the way to being as technical as the paper gets.

The two latest papers from the Compuation and Language catagory of arXiv at the reading level of a 12 year old.

In addition to papers, I am adding a scrape catagory-relevant GitHub repos and sub-Reddits, to also add some pieces to a desired summary. I aim to host TheLatest in an EC2 instance and have it act as a morning newsletter! Let me know if this would be of interest to you, dear reader.

Check out the GitHub repo here.

cook.ai

For many, cooking and baking is a delightful and rewarding endevour. For me though, I can’t say I’ve ever been much of a fan. In the kitchen I am a person who strives to find the path of least resistance to food – both in terms of time, money and food wastage. And when you’re cooking for yourself, regressing to an optimal on all three fronts seems impossible. So if I want to keep myself alive, I find myself stuck choosing to do one of the following:

  • Meal prepping in bulk – economically sound, but I will need to spend several hours of my weekend doing so, then eat the same thing all week. That’s no fun.
  • Finding a recipe I like, spending half an hour buying groceries, spending 45 minutes to an hour cooking, and then eating leftovers for a day or two, all at usually a hefty cost.
  • Eating cheap frozen meals from Aldi – $2.99 and of a specific variety, but they carry an even heavier cost: my personal dignity.
  • Meal boxes – expensive individual meals which combine the avoidable effort of cooking with the per-meal price of shopping poorly.

There had to be a better way – so I developed cook.ai.

cook.ai will start by suggesting a set of recipes for a selected meal (e.g. Dinner). At first, this set was generated by Alpaca7B (ChatGPT’s open-source little cousin), before realising that it made far more sense to not have an LLM randomly come up with things and instead simply search through the millions of recipes previously prepared by actual people available online.

First, you set some parameters. I call them cooking preferences. Not fussed on cooking time? No worries. Dietary requirements? Easy as. Like me and don’t want to spend more than 15 minutes on the endevour? No problemo. cook.ai will then suggest recipes it finds that match your preferences.

When you select a recipe, cook.ai will suggest a new set of reciepes based on the ingredients list from the previous. The aim here is to minimise food wastage, as very rarely do peanut oil or chives come available to purchase in 1/2 tablespoon quantitites. By doubling up on at least 70% (default but adjustable) of ingredients, we can save on both food spoiling, the number of unique ingredients needing to be purchased (both time and money), all whilst enjoying meals that fit in with my scheduled time to make them and keeping what I eat fresh and unique.

You recursively repeat this process until you have all the recipes needed to fill out the desired time window (most shop each week, so 7 days seems reasonable as a default).

Finally, when an ingredients list is put together, cook.ai leveages the APIs of both Whisk and Woolworths (neither of them are what I would call “publically available” APIs, but there are workarounds) to map the ingredients and their quantities to available items at Woolies and build you a shopping list. (If desired, we can also search for the same or similar items at Coles to price match, but their search APIs do not map to items as well as the Whisk/Woolworths ones do). If you add your Woolworths Online credentials, cook.ai can even add all of those items to a cart and have them either prepared for click-and-collect or home delivered at the push of a single button. Talk about easy.

cook.ai is currently only available as a Flask app instance running locally, at the repository here.

A new website.

A new website is in the works, hopefully moving off of WordPress. Stay tuned.

Leave a Reply

Your email address will not be published. Required fields are marked *