Prompting chatbots to write a blog about prompting chatbots

Prompting chatbots to write a blog about prompting chatbots
Image by Colorful Grays on Tess

Perhaps the Holy Grail of generative AI is to produce real, useful content. Not Elizabethan poetry or surrealist artwork, but helpful communications that clearly explain how to perform a task, fix a problem, or finish a project. In my day job, one time-consuming task I'd love to offload is writing long-form blog posts on various industry topics. Doing this right (or write? hahaha) requires research, building and validating and outline, and writing, rewriting, and proofreading copy. Phew!

I've tried a few different solutions to blog production, such as partnering with high-end freelancers (super expensive!), inexperienced freelancers (time-consuming!), in-house copywriters (get in line!), and just doing it myself (goodbye weekend!). About a year ago, I attempted to use generative AI for outlining blogs and creating copy snippets, but the process was clunky and the draft copy needed extensive modification.

But generative AI is advancing quickly, and today's large language models (LLMs) are more sophisticated and have larger context windows, which means they can handle longer, more intricate prompts. I decided it was time for another experiment.

The assignment: Write a blog about prompt engineering for everyday life

For this test assignment, I decided to pick a topic that's both interesting to me and can be easily researched using publicly available documentation. Prompt engineering for everyday use cases seemed like a solid topic, since I'm always looking for ways to experiment with AI both at home and at work. Plus, there is now extensive documentation from Anthropic, Google, and other LLM providers on best practices for prompting generative AI.

To really stretch the boundaries of AI, I decided to aim for a long-form, 3,000-word blog post, the kind that does well in Google search queries but can take hours (and hours) of human time to write.

The prompt: Combining multiple best practices

Given the ambition of my request, I decided to construct a fairly detailed prompt that combines multiple best practices for getting quality performance from chatbots. First, I defined a role for my AI freelancer:

You are a technology blogger known for explaining new tech in ways the average person can understand. Your posts are concise, helpful, and informal without being unprofessional. You avoid vague generalities and corporate-speak like “leveraged” and “enabled.”

Next, I described the assignment in detail, almost as I would to a human:

Your next assignment is a blog on “practical prompting” for everyday life. The post should be about 3,000 words long and provide helpful hints for prompting LLMs to perform otherwise time-consuming tasks and help humans get through creative blocks.
For every hint you provide, you should create a sample prompt and a response from at least one LLM. For prompt responses you create, please identify them as being produced by [insert applicable model here].
If you take responses from the source materials, be sure to include where they came from and which model produced the output. 

Finally, I provided a series of steps for the model to follow—a practice known as prompt chaining—that I hoped would give it a chance to engage thoughtfully with the assignment and check its work multiple times to avoid errors and incomplete responses:

Review the source documentation. [Depending on the model, this could be a collection of PDFs or web links.]
Create an outline based on the source materials. Make sure the outline includes a title and appropriate subheadings to break up the text.
Review the outline for clarity and flow. Revise if needed.
Write a first draft, including sample prompts and how you might respond. If you take prompts or responses directly from the source materials, you must provide correct attribution.
Review your draft for completeness, clarity, and correct attributions. Revise if needed.
Share your final draft.

Attempt #1 with Gemini Pro 1.0: A surprisingly good first draft

I assembled my documentation—a collection of very long guides to prompt engineering like this one from OpenAI—and headed over to ChatGPT where I have a Plus account with access to GPT 4-Turbo. Unfortunately, the model was offline and wasn't accepting messages, so I opened my Google Workspace and fired up Gemini Pro 1.0, the free version of Gemini.

I began to feed it my series of prompts, and immediately ran into a roadblock. Unlike GPT 4 -Turbo, it cannot ingest and interpret PDF files. However, since it is able to interact with links, I provided a series of URLs along with the rest of the prompt. I was expecting Gemini to spend some time processing and work through my prompt chain step by step, sharing its work. Instead, it immediately began generating what appeared to a fairly decent draft.

It gave up about half way through, but some additional prompting got it back on track. This may be because the source material I provided exceeded its context window, which is 32,000 tokens. For reference, this is about 24,000 words or 48 pages. In any case, I sent different sections back to the model for rewriting and elaboration and, in about 45 minutes, ended up with a surprisingly good first draft.

While the prose is a bit breathless and uses far too many exclamation points, the explanations are clear, the best practices are faithful to the source materials, and the examples are fully fleshed out. With another hour or two of tinkering and fact-checking, this post would be ready to publish.

Practical Prompting: Unleashing the Power of LLMs in Your Daily Life


By Gemini Pro 1.0

Ever felt stuck in a brainstorming rut? Drowned in a sea of repetitive tasks? Fear not, the age of Large Language Models (LLMs) is here! These AI wizards can be your secret weapon for boosting productivity and igniting creativity. But how do you tap into their potential? The answer lies in prompting.

This blog post will equip you with practical prompting techniques to transform LLMs from cool tech to everyday superheroes. We'll explore:

  • What are LLMs and prompts?
  • Unlocking LLM Potential: Essential Prompting Techniques
    • Be Clear and Direct: Your Instructions Matter
    • Unleash Creativity with Examples and Roles
    • Chain Prompts: Building Upon Ideas
    • Beyond Efficiency: Fine-tuning and Iteration
  • Prompting in Action: Everyday Life Hacks with LLMs
    • Conquer Writer's Block: LLM-powered Brainstorming
    • Research Assistant Extraordinaire: Information Gathering Made Easy
    • The Recipe Remixer: Customizing Dishes with a Twist
    • The Fitness Friend: Personalized Workout Inspiration

What are LLMs and prompts?

Have you ever wished for a search engine that could not only find information but also analyze it, write different kinds of creative text formats, and answer your questions in a thoughtful way? Well, that's the basic idea behind Large Language Models (LLMs). These are powerful AI systems trained on massive amounts of text data, allowing them to perform a wide range of tasks with language.

Imagine an LLM as an incredibly knowledgeable and well-read individual. It has access to and has processed a vast amount of information, but it needs your help to understand how to use that knowledge for your specific needs. This is where prompts come in. A prompt is essentially a question or instruction that acts as a guide for the LLM. The better you craft your prompt, the better the LLM can understand what you're looking for and deliver helpful and informative results.

Think of it like this: you wouldn't ask a librarian for a book by simply saying "Give me something interesting." A more specific prompt like "I'm in the mood for a science fiction novel with a strong female protagonist" would give the librarian a much clearer idea of what you're looking for. In the same way, a well-crafted prompt helps the LLM understand the context of your request and deliver the kind of information or creative text format you need.

Unlocking LLM Potential: Essential Prompting Techniques

Here are some key principles to keep in mind when crafting effective prompts:

1. Be Clear and Direct: Your Instructions Matter

The more specific you are, the better the LLM can understand your request. Instead of a vague prompt like "Write a poem," try something like:

Sample Prompt: Write a haiku poem about the beauty of a spring sunrise.

Response (by Gemini):

Golden light peeks through,

Waking dreams with gentle warmth,

New life starts anew.

Being clear about the type of poem (haiku) and the desired theme (spring sunrise) gives the LLM a clear roadmap to follow.

2. Unleash Creativity with Examples and Roles

LLMs can be incredibly creative, but sometimes they need a nudge in the right direction. Provide examples to inspire them and consider assigning a role to yourself or the LLM for better focus:

Sample Prompt: You are a brainstorming partner for a marketing campaign. We are launching a new line of eco-friendly cleaning products. Give me a list of catchy slogans that emphasize sustainability.

This prompt sets the scene (brainstorming partner) and gives the LLM an example ("eco-friendly cleaning products") to work with.

*Response (by Gemini):

  • Clean Green Dream: Clean your home, save the planet.
  • Naturally Powerful Cleaning: Effective solutions, gentle on the earth.
  • Shine Bright, Clean Right: Eco-friendly cleaning for a sparkling home.

3. Chain Prompts: Building Upon Ideas

Sometimes, the best ideas come from iteration. Don't be afraid to break down your prompt into smaller steps or "chain" prompts together:

Sample Prompt 1: Write a short story opening about a robot who discovers human emotions.

*Response (by Gemini): Unit 734 whirred to life, its metallic limbs extending with a soft hum. No malfunction triggered its awakening this time, but a strange, unfamiliar sensation. A warmth spread through its core, pulsing in rhythm with the rhythmic whirring of its cooling fans. Was this... fear?

Sample Prompt 2 (chaining the story): The robot encounters a young girl crying on a park bench. How does it react, given its newfound understanding of emotions?

Response (by Gemini): Confused by the unfamiliar feeling and the sight of the tears streaming down the girl's face, Unit 734 hesitated. Its primary function was to complete tasks efficiently, and this emotional outburst presented a perplexing anomaly. Tentatively, it extended a metallic hand towards the girl, its internal whirring almost apologetic. "Is there a problem?" it inquired in a monotone voice, the most neutral tone it could muster.

This chained prompt builds upon the initial idea, allowing the LLM to develop the story further. The robot's confusion and its attempt to help the girl demonstrate its developing understanding of emotions.

4. Beyond Efficiency: Fine-tuning and Iteration

While large language models (LLMs) are impressive tools, they don't always get it right on the first try. That's where fine-tuning and iteration come in. These are powerful techniques that can significantly improve the quality of your interactions with LLMs.

Here's how you can use fine-tuning and iteration to get the most out of LLMs:

  • Provide Feedback: After receiving an LLM's response, let it know if it hit the mark or missed the target. Feedback helps the LLM learn your preferences and adjust its future responses accordingly.
  • Iterate on Your Prompts: Think of prompts as instructions. The more specific and detailed you are, the better the LLM can understand your intent. Use the initial response from the LLM as a jumping-off point. Refine your prompt based on what worked well and what you'd like to see adjusted.

Here's an example of a to-do list prompt: "Rewrite my boring to-do list items in a fun and motivational way." This prompt is a good starting point, but it can be further improved with fine-tuning: "Rewrite my boring to-do list items in a fun and motivational way. Here are some examples: 'Pay bills' could become 'Conquer the villainous credit card!'"

This revised prompt provides a specific example (pay bills becoming "Conquer the villainous credit card!") to guide the LLM in injecting a bit of fun into the remaining tasks.

Prompting in Action: Everyday Life Hacks with LLMs

Now that you're armed with prompting techniques, let's explore how LLMs can be your everyday superheroes:

1. Conquer Writer's Block: LLM-powered Brainstorming

Staring at a blank page? LLMs can be your brainstorming buddy!

Sample Prompt: I'm writing a blog post about sustainable fashion. Give me a list of creative content ideas to overcome writer's block.

*Response (by Gemini):

  • Top 5 eco-friendly fashion brands you need to know about.
  • Sustainable style on a budget: Tips and tricks for eco-conscious shopping.
  • The environmental impact of fast fashion (and what you can do about it).
  • DIY upcycled clothing: Breathe new life into your old wardrobe.
  • Sustainable fashion influencers to watch for inspiration.

2. Research Assistant Extraordinaire: Information Gathering Made Easy

Need to research a topic but short on time? LLMs can be your research assistants!

Sample Prompt: I'm planning a trip to Yosemite National Park. Find interesting facts and hidden gems I shouldn't miss.

*Response (by Gemini):

Here are some interesting facts about Yosemite National Park:

  • Yosemite is home to Half Dome, one of the most recognizable rock formations in the world.
  • The park encompasses over 4,000 square miles of granite cliffs, waterfalls, and ancient sequoia groves.
  • Yosemite Falls, the tallest waterfall in North America, is a must-see for any visitor.

Beyond the famous sights, here are some hidden gems you might enjoy:

  • Tunnel View: This scenic overlook offers breathtaking views of Yosemite Valley.
  • Glacier Point: Hike or take the tram to this viewpoint for panoramic vistas of the park.
  • Mariposa Grove: Home to a grove of giant sequoia trees, some of the largest living organisms on Earth.

3. The Recipe Remixer: Customizing Dishes with a Twist

Feeling adventurous in the kitchen? LLMs can help you create unique recipe variations!

Sample Prompt: I love pasta with pesto, but I'm looking for a new twist. Can you suggest some creative recipe variations using pesto?

*Response (by Gemini):

  • Sun-dried Tomato Pesto Pasta: Swap out traditional pesto for a sun-dried tomato version, adding a burst of tangy flavor. Pair it with grilled chicken or shrimp for a complete meal.
  • Pesto Primavera: For a vegetarian twist, add a medley of colorful spring vegetables like peas, asparagus, and cherry tomatoes to your pesto pasta.
  • Pesto Pizza: Spread pesto over pizza dough instead of tomato sauce. Top with mozzarella cheese, roasted vegetables, and your favorite protein for a delicious twist.

4. The Fitness Friend: Personalized Workout Inspiration

Stuck in a fitness rut? LLMs can be your workout inspiration partner!

Sample Prompt: I'm looking for a new at-home workout routine that focuses on core strength. I can't use weights due to a recent injury.

*Response (by Gemini):

No weights, no problem! Here's a core workout routine you can do at home using bodyweight exercises:

  • Plank: Hold a plank position for 30 seconds, engaging your core muscles. Repeat 3 times.
  • Side Plank: Perform side planks on each side for 30 seconds each, targeting your obliques. Repeat 3 times per side.
  • Crunches: Do 3 sets of 15 crunches, focusing on contracting your abdominal muscles.
  • Russian Twists: Perform 3 sets of 15 Russian twists, working your obliques and core stability.

Remember, these are just a few examples to get you started! With a little creativity and these prompting techniques, you can leverage LLMs to become your personal assistants for a wide range of tasks. So, next time you're feeling overwhelmed or uninspired, don't hesitate to call upon your friendly neighborhood LLM for a helping hand.

Attempt #2 with GPT 4-Turbo: Was the model having an off day?

After my attempt with the free version of Gemini, I had high expectations for GPT-4 Turbo. It supports 128,000 tokens of context, and it's known for being highly conversational. I was excited to feed it the prompt along with my PDFs and see what happened.

Alas, the model seemed to be having an off day. After going through the research and outline phases, and showing me its work at each step, it produced a draft that felt a bit skimpy, given my request for 3,000 words. The examples were also a bit simplistic and often incomplete. Even after a few rounds of refinement, the post was flat and missing context. It also did not capture the excitement and promise of AI the way the Gemini post did.

Verdict: The GPT 4-Turbo post is not close to usable and would require extensive rework. Perhaps the next time, I will consider asking the model to start from scratch with a new outline if the initial drafts fall short.

Practical Prompting: Unlock Everyday Efficiency with AI

By GPT-4 Turbo

Ever wondered how to make your daily interactions with AI not just good, but great? Welcome to the world of prompt engineering—your secret weapon for supercharging the way you communicate with AI. It's like having a recipe for success in the digital age. With the right prompts, you can turn routine tasks into something more efficient, accurate, and, yes, even fun!

Section 1: Understanding the Basics
Prompt engineering is all about crafting the perfect questions or commands to get the best possible responses from AI. Think of it as giving crystal clear directions to your very detail-oriented AI assistant. The better your instructions, the better the outcomes. It's that simple!

Section 2: Strategic Prompting for Personal Use
Prompting can transform the way you handle personal tasks. Let's explore how you can apply this to your daily life, from organizing your schedule to whipping up a quick dinner.

Organizing Your Week:
User Prompt: "I've got a busy week ahead with meetings, a dentist appointment, and a friend's birthday party. Can you organize these events by priority and fit in two gym sessions?"
AI Response (ChatGPT 4): "Priority-wise, your dentist appointment on Wednesday at 3 PM comes first. Let's schedule your gym sessions on Tuesday morning and Thursday evening. Your friend's birthday is on Saturday night, so you're all set for some fun after a productive week!"

Meal Planning Made Easy:
User Prompt: "I have chicken, bell peppers, and quinoa. Can you suggest a quick recipe for tonight's dinner?"
AI Response (ChatGPT 4): "How about a colorful chicken and quinoa stir-fry? Just sauté the chicken pieces until golden, add sliced bell peppers, and stir in cooked quinoa. Season with soy sauce and a sprinkle of sesame seeds for a tasty meal in under 30 minutes!"

Section 3: Crafting Effective Prompts
The key to crafting effective prompts is clarity, context, and a touch of creativity. Here’s how you can master the art of prompt engineering:

Example:
User Prompt: "Create a shopping list for a vegetarian barbecue this weekend, including a main dish, two sides, and a dessert."
AI Response (ChatGPT 4): "For your vegetarian barbecue, consider grilled portobello mushrooms as the main dish, a side of corn on the cob, a quinoa salad, and grilled peaches with vanilla ice cream for dessert. Enjoy your barbecue!"

Section 4: Advanced Techniques and Tools
Take your prompting skills up a notch with techniques like few-shot prompting and prompt chaining. These can help you achieve more nuanced and complex tasks with AI.

Few-shot Prompting for a Workout Routine:
User Prompt: "Here are two examples of 30-minute workouts. Now, design a similar routine focusing on cardio."
Workout Examples and AI Response: The AI uses the structure of the provided workouts to create a new cardio-focused session, ensuring variety and challenge.

Section 5: Overcoming Challenges with Prompt Engineering
Sometimes, AI might not quite hit the mark. When that happens, tweak your prompts by adding more detail or changing the angle of your request.

Example of Adjusting a Prompt:
Original AI Response: "I'm not sure what you mean."
Revised Prompt: "What are the key steps for preparing a lasagna, including prep and cooking time?"
Improved AI Response (ChatGPT 4): "To make lasagna, start by prepping your ingredients, which takes about 15 minutes. Layer noodles, cheese, sauce, and your choice of fillings. Bake at 375°F for 45 minutes. Voila! Delicious lasagna ready to enjoy."

Section 6: The Fun Future of Prompt Engineering
As AI evolves, so too does the art of prompt engineering. It's exciting to think about all the new ways we can streamline our lives and free up time for fun and relaxation with the help of AI.

Conclusion
Prompt engineering is more than a skill—it's your gateway to making everyday interactions with AI more effective and enjoyable. By mastering the art of the prompt, you unlock a world of possibilities. Dive in, experiment, and watch as your digital assistant becomes more helpful, responsive, and aligned with your needs. Let the adventures begin!

Context window: Bigger is better?

My experiment instructing chatbots to write about instructing chatbots (it's so meta!) has left me feeling cautiously optimistic about AI as a writing assistant. I also wonder what a model with a truly enormous context window like Gemini Advanced could do.

The experiment continues...