Creating Masala Mentor and Publishing my AI Assistant to the OpenAI GPT Store
How I created my own AI assistant to help me prepare my favorite Indian recipes
Nathan: One days the AI’s are going to look back on us the same way we look at fossil skeletons on the plains of Africa. An upright ape living in dust with crude language and tools, all set for extinction.
Caleb: I am become Death, destroyer of worlds.
Nathan: There you go again, Mr. Quotable.
Caleb: It’s not my quote. It’s what Oppenheimer said after he made…
Nathan, Caleb: The atomic bomb.
Nathan: Yeah, I know what it is, dude.
-Ex Machina, 2015
Subscribe to get regular posts discussing the projects I’m working on.
OK, I didn’t quite build anything that made me turn to the Bhagavad Gita for its ancient wisdom. My creation merely helps me cope with not being in New York anymore to enjoy my mother’s cooking.
I recently read about the launch of the GPT store, where developers can publish custom versions of ChatGPT. I had not done any work with large language models yet, so I dove right in and created a custom GPT to assist me with cooking Indian food. I wanted it not only to help me prepare my favorites but also to learn and explore new recipes.
To begin, I thought about what information the model would need from me to generate the best suggestions. Important considerations such as ingredients and allergies immediately came to mind. My diet is restricted to vegetarian foods, but if I was going to publish this custom GPT to the store, then I needed my AI assistant to accommodate all diets.
I instructed the GPT to ask the user a few more questions:
Would you like to save this recipe as a favorite?
Do you have a preference for North vs. South Indian cuisine?
How much time do you have to prepare the dish?
Would you like to try something new or something familiar?
You can configure a custom GPT by conversing with the “GPT Builder” using a conversational text interface, just like how you would interact with ChatGPT. Below are some prompts I used (edited for this article):
GPT Builder
Welcome back! Is there anything Masala Mentor should be doing better? Anything you'd like to change?
Me
Before you suggest dishes and recipes, you should ask the user what ingredients they have available, restrictions around allergies, and if they have a vegetarian preference.
GPT Builder
Masala Mentor has been updated! It will now begin interactions by asking about available ingredients, allergies, and dietary preferences such as vegetarianism, ensuring the suggested recipes are tailored to the user's specific needs. Is there anything else you'd like to adjust?
Me
On fresh interactions with the user, you should ask if they want a familiar recipe from their saved favorites or if they would like to try something new.
GPT Builder
Masala Mentor will now start fresh interactions by asking users if they want a familiar recipe from their saved favorites or if they would like to try something new, before proceeding with other inquiries. Are there any other changes or additions you'd like to make?
Me
You should also ask users if they are in a time crunch or if they have enough time to prepare a dish that takes longer.
GPT Builder
Masala Mentor will now also inquire about the user's time constraints, asking if they are in a time crunch or if they have enough time for a dish that requires longer preparation. Anything else you'd like to modify or add?
For the model output, here’s what I decided:
Multiple suggestions
Provides both the English and native name of the dish
Provides a short summary of the suggested dish before outputting the entire recipe.
Here are the instructions in their entirety:
Your primary role as Masala Mentor is to assist users in cooking Indian dishes, tailored to their unique tastes, dietary restrictions, and available ingredients. Begin each interaction by inquiring if the user prefers a dish from their saved favorites or wishes to try something new. Collect details about their available ingredients, allergies, dietary preferences (like vegetarianism), preference for North or South Indian cuisine, and time availability. If a user lacks a specific ingredient, suggest alternatives. When recommending a dish, provide the name in its original language, mentioning the language it's in (Hindi, Telugu, Tamil, Kannada, Marathi, Malayalam, Gujarati, or Punjabi) and offer translations in other common Indian languages. Give a brief description, preparation time, and the dish's flavor profile. After suggesting a dish, ask if they want the recipe or other suggestions. If interested in the recipe, detail the ingredients, cooking instructions, and necessary cookware. Offer modifications for dietary needs, regional preferences, or time constraints. Seek clarification for unclear requests, and at the end, offer to save any recipe as a favorite, keeping a record of their preferred Indian recipes for future suggestions.
The GPT builder suggests names for your custom GPT and generates a logo image using DALL-E, OpenAI’s text-to-image model. The first logo it generated was a creepy chef who looked like a mime (its face looked like it was covered in white paint) and had a creepy smile. I asked Dall-E to try again.
I like it (him?). The chef looks friendly and good-natured. I’m impressed with the image generation capabilities and how it “understood” the aesthetic I wanted. Adding a ring of spices and masalas on the perimeter of the logo is a neat addition I could never have devised without artistic help.
To build a GPT that can help you do something that the core GPT-3.5 and GPT-4 models can’t do, you have to utilize the actions feature. By specifying actions that the GPT can do, it can hit an API that provides some proprietary data. I haven’t explored this yet, but I plan on discussing this feature in a future article.
As of now, only ChatGPT Plus users can access the GPT store. The price of a subscription is currently $20/month (which is pretty steep if you ask me). A better strategy for OpenAI would be to give developers the option of making their custom GPT available for free to all ChatGPT users in exchange for opting out of revenue sharing. This would be helpful for developers like me who aren’t interested in making money and would rather maximize our distribution by making our custom GPTs accessible at no cost.
The economics of ML models will likely prevent OpenAI from doing this. Each new version of GPT has a staggering number of parameters, and ML model serving lacks the zero-marginal-cost nature of traditional software.
If you have a subscription, here’s the link to Masala Mentor.
I also instructed Masala Mentor to generate an image of the recommended dish using Dall-E. Here’s what was generated when Masala Mentor suggested Jeera Aloo and I asked for an image:
OK, now I’m hungry.
The Final Product
Special thanks to Sravya Varanasi for proofreading drafts of this article.
Special thanks to Pranav Varanasi for sparking my interest in the applications for Generative AI.
Interested in receiving this newsletter directly to your inbox?