Jump to main content

Generate Recipes from YouTube Videos with AI

1
2
3
4
5
28 reviews

Abstract

This project explores how large language models (LLMs) can generate recipes from YouTube cooking videos. In this science project, you will learn how LLMs interpret language and how prompt design can affect results.

Summary

Areas of Science
Difficulty
Method
Time Required
Very Short (≤ 1 day)
Prerequisites

None

Material Availability

Readily available

Cost
Very Low (under $20)
Safety

No issues

Credits
Science Buddies is committed to creating content authored by scientists and educators. Learn more about our process and how we use AI.

Objective

To experiment with LLMs and prompt engineering to create, compare, and evaluate AI-generated recipes from video transcripts.

Introduction

Large language models (LLMs) are powerful AI systems that have been trained on huge amounts of text from the internet, books, and other sources. They can understand and create human-like language, which allows them to answer questions, write stories or essays, summarize information, and even generate recipes. Some popular examples of LLMs are ChatGPT, Gemini, Copilot, and Grok.

As LLMs become more common, a new skill called prompt engineering has become very useful. Prompt engineering means learning how to write clear and specific prompts (or instructions) to get the best results from an AI model. The way you ask a question can make a big difference in how the model responds–small changes in wording can lead to very different answers.

Watch this video to learn more about prompt engineering:

In this project, you will explore how to use LLMs to create text recipes from online cooking videos. Trying to follow along with these videos can be annoying if you have to pause the video at each step (Figure 1), so extracting the recipe in text form can be helpful. By using video transcripts and experimenting with different prompts, you can see how well LLMs can understand cooking steps, organize them into recipes, and even add details like ingredient substitutions or difficulty ratings.

Image Credit: letsKWOOWK
Figure 1. Screenshot from a YouTube cooking video.

Terms and Concepts

Questions

Bibliography

To learn more about prompt engineering:

We are using OpenAI Whisper model for transcription generation:

Materials and Equipment

Experimental Procedure

This project follows the Engineering Design Process. Confirm with your teacher if this is acceptable for your project, and review the steps before you begin.

Generating YouTube Transcripts

  1. On YouTube, find 10 recipe videos that you would like to generate recipes from.
    1. Make sure the videos include spoken narration, since we will use their transcripts to create the recipe.
  2. Open the video description and scroll down to the bottom. You will see a button called “Show transcript.” If you click on that button, a new box with the transcript will appear.
    1. To get rid of the time stamps, click on the three dots on the top right corner of the transcript box and then select “Toggle timestamps.”
    2. Note: Not all YouTube videos will have transcripts.
  3. Copy and paste the transcript into a text editor like Google Docs or Notepad. Give each separate transcript its own title or header in the document, or save each one in a different file. 
    1. Repeat step 4 for each of the 10 videos.

Experimenting with Recipe Generation and Prompt Engineering

  1. Watch one of the videos you selected yourself and write down the recipe.
  2. Think about the criteria you will use to evaluate the AI-generated recipe. For example:
    1. Does the recipe have any errors in ingredient quantities? If so, how many errors?
    2. Does the recipe have any steps out of order? If so, how many?
    3. Does the recipe have any hallucinations or seemingly fabricated information that cannot be verified?
    4. Is the recipe's format easy to follow? Is the language easy to read?
  3. Create a data table that you can use to evaluate the recipes based on your specific criteria.
    Swipe left to see more
    Table 1. Example data table. You can add more rows to the table for additional videos and new prompts.
    Video Prompt Criteria #1 Criteria #2 Criteria #3 ... Notes
  4. Generate a recipe from the video transcript using a basic prompt and evaluate the recipe.
    1. Choose an LLM like ChatGPT.
    2. Enter a prompt like “Make a recipe from this video transcript.” and then paste in the video transcript.
    3. Record your notes and observations in the data table you created.
  5. Repeat step 4 for your remaining videos. Make sure you use the same LLM and prompt each time.
  6. Now, this is where prompt engineering starts. Try modifying or adding something to your prompt. Here are several ideas to help you start, but you should only change one thing at a time.
    1. “Add ingredient alternatives to make this recipe vegan."
    2. “Include a difficulty rating.”
    3. “Add estimated preparation and cooking times.”
    4. “Make the recipe more detailed for someone who is inexperienced in cooking.”
    5. “Make the recipe more concise for someone who is experienced in cooking.”
    6. “Write the recipe so that the ingredients and quantities are built into the steps instead of having a separate ingredient list before the recipe.”
  7. Repeat step 4 with your new prompt. If necessary, you should also rewrite the recipes yourself. For example, if you are going to prompt the AI to write a detailed recipe for an inexperienced chef, you should write the recipes in that style yourself so you can compare the results.
  8. Continue to iterate and experiment with different prompts.
    1. How accurate is the LLM overall in determining the correct basic recipe based on the video transcript?
    2. What prompt gives you the best results for the format and style of a text recipe?
icon scientific method

Ask an Expert

Do you have specific questions about your science project? Our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.

Variations

Try exploring different ways to generate and compare recipes:

  • Compare different language models for recipe generation: Test how various AI tools handle recipe generation, such as ChatGPT, Gemini, Copilot, and Grok.
  • For videos without a transcript, you can use the OpenAI Whisper model to generate a transcript. You can download the Python notebook to do so here
  • Compare different transcription models for extracting video text: In the Python notebook, several speech-to-text (Whisper) model sizes are available (some are commented out). You can uncomment the model you want to use (and comment out the others) to switch between them. Try running the tiny, small, medium, and large models to see how the accuracy and detail of the video transcript change.
  • Experiment with different languages: Generate recipes in languages other than English, or even translate between languages. For best results, set the model to large. You can find more information about available models here: Hugging Face – OpenAI Whisper Models.
  • Ask an AI image model to generate a picture of the finished dish based on the text recipe.
  • Give an LLM a picture of a finished dish, and ask it to generate a recipe just based on the picture.

Careers

If you like this project, you might enjoy exploring these related careers:

Career Profile
Many aspects of peoples' daily lives can be summarized using data, from what is the most popular new video game to where people like to go for a summer vacation. Data scientists (sometimes called data analysts) are experts at organizing and analyzing large sets of data (often called "big data"). By doing this, data scientists make conclusions that help other people or companies. For example, data scientists could help a video game company make a more profitable video game based on players'… Read more

News Feed on This Topic

 
, ,

Cite This Page

General citation information is provided here. Be sure to check the formatting, including capitalization, for the method you are using and update your citation, as needed.

MLA Style

Ngo, Tracey. "Generate Recipes from YouTube Videos with AI." Science Buddies, 10 Nov. 2025, https://www.sciencebuddies.org/science-fair-projects/project-ideas/ArtificialIntelligence_p032/artificial-intelligence/recipe_generation?from=Blog. Accessed 10 June 2026.

APA Style

Ngo, T. (2025, November 10). Generate Recipes from YouTube Videos with AI. Retrieved from https://www.sciencebuddies.org/science-fair-projects/project-ideas/ArtificialIntelligence_p032/artificial-intelligence/recipe_generation?from=Blog


Last edit date: 2025-11-10
Top
Free science fair projects.