Introduction
Large Language Models (LLMs) are incredibly versatile, but they sometimes need guidance to perform specific tasks correctly. At FlowHunt, we’ve been exploring the power of one-shot prompting to teach our LLM how to create perfect YouTube embeds directly in WordPress posts through our integration. This technique has dramatically improved the accuracy and efficiency of content creation for our users.
What is One-Shot Prompting?
One-shot prompting is a technique where you provide an LLM with a single example of the desired output format or behavior. Unlike zero-shot prompting (where no examples are given) or few-shot prompting (which uses multiple examples), one-shot strikes a balance between efficiency and effectiveness.
The beauty of one-shot prompting lies in its simplicity: show the model once, and it can replicate the pattern.
The YouTube Embed Challenge
WordPress offers various ways to embed YouTube videos, but the process isn’t always intuitive, especially for users who aren’t familiar with WordPress’s block editor or shortcodes. Our goal was to enable users to simply enter a topic or product, and have our LLM find relevant YouTube videos and generate the proper embedding code through the FlowHunt WordPress integration.
Initially, our LLM struggled with consistent formatting and sometimes produced incompatible embedding methods. This is where one-shot prompting came to the rescue.

Our One-Shot Prompting Solution
Here’s the exact prompt we implemented to solve the YouTube embed problem:
CopyVideos: Are there video tutorials or product overviews about the input? Summarize their content and find YouTube videos related to the input and present them in HTML embedding format.
example of embedding:
"<iframe width="560" height="315" src="https://www.youtube.com/embed/LSHlL0d1Odw?si=N1WpGJij-nv35gNh" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>"
---START INPUT---
{input}
---
This simple but effective prompt does several key things:
- Clearly states the task: find video tutorials and product overviews related to the input
- Requests a summary of video content
- Provides a complete example of the exact iframe embed format required
- Uses a clear input structure with delimiters (—START INPUT— and —)
The example shows the LLM:
- The exact iframe structure needed for YouTube embeds
- All necessary attributes (width, height, allowfullscreen, etc.)
- The proper YouTube embed URL format (using /embed/ instead of /watch?v=)
Results and Benefits
After implementing this one-shot prompting approach, we observed:
- Near-perfect accuracy in properly formatted YouTube embeds
- Consistent responsive video formatting across different devices
- Significant time savings for content creators who previously had to manually search for and embed relevant videos
- Improved content quality with automatically curated relevant video content
For our FlowHunt users, this meant they could focus on creating written content while the LLM handled the technical aspects of finding and embedding relevant videos.
Why One-Shot Works Better Than Alternatives
We experimented with several approaches:
- Zero-shot prompting: Simply asking the LLM to “find and embed YouTube videos” resulted in inconsistent formats and occasionally problematic iframe code.
- Detailed instructions without examples: While providing technical specifications improved results, the LLM still made formatting errors without seeing a concrete example.
- Few-shot prompting: Using multiple examples worked well but was overkill for this task and increased token usage unnecessarily.
One-shot prompting proved to be the sweet spot – providing just enough guidance without wasting resources.
Beyond YouTube: Extending the Pattern
We’ve since applied the same one-shot prompting technique to other embedding scenarios:
- Twitter/X posts
- Instagram posts
- various formatting
Each follows a similar pattern: show one perfect example, then let the LLM replicate it.
Depending on the size and complexity of the LLM it might be necessary to really emphasize on the fact that the example is indeed only an example and not exactly what we want from the LLM. because in smaller models we can see that the example in the one shot prompting ca bleed through the output and ruin the answer.
Implementing One-Shot Prompting in Your FlowHunt Workflows
If you’re using FlowHunt for content creation, you can easily implement one-shot prompting in your own workflows:
- Create a template that includes your one-shot example
- Set up a variable to capture the user’s input
- Configure the LLM to process the input using the pattern from your example
- Send the output directly to WordPress through our integration
This approach can be adapted for virtually any structured output you need your LLM to generate consistently.
Text to Image Prompt Generator from URL
Transform URLs into AI image prompts with FlowHunt. Visualize content, enhance creativity, and boost engagement effortlessly!