AI-Prompt Writing is Similar to Web Design

In the past few days, I’ve come to understand how AI prompts are structured, and it’s been quite the revelation. As someone with a background in web design, I see prompts in a way that’s much like piecing together HTML elements.

It’s all about clear directives and purpose, where every element plays its part. Interestingly, prompts follow a similar logic: They are essentially elements(requests) with criteria(attributes) that guide the outcome.

How does AI understand it all, yet not every time?

Talking to AI is a bit like having a conversation with someone who’s read the entire internet but occasionally misses the point. We throw in a request, and the AI spits out a response based on what it knows. The magic happens when we craft precise, clear prompts. The clearer we are, the better the output. It’s like giving directions – be vague, and you’ll end up lost; be specific, and you’re golden.

But how does AI generate responses so damn fast?

AI isn’t exactly thinking – it’s more of a ‘pattern-spotter’. When we type our prompts, it breaks the words into little pieces called tokens, then sorts them based on what it’s learned from previous data. This ‘contextual understanding‘ helps it come up with something that (hopefully) makes sense. But, as we know, it’s not always perfect. Sometimes you’ll get absolute nonsense, but other times, with the right nudge, it hits the nail on the head.

Here’s where web design and prompt-engineering are similar:

Now, let me explain what I’ve learned about building a solid prompt. Here are the commonly used sections:

1. **<task>**: This describes the main action or request.
   - Example: <task>Generate a short story set on a tropical island.</task>
2. **<condition>**: Specifies any conditions or constraints.
   - Example: <condition>Keep the word count under 500.</condition>
3. **<style>**: Defines the tone, mood, or style.
   - Example: <style>Use a humorous and light-hearted tone.</style>
4. **<length>**: Sets the word count or size of the output.
   - Example: <length>200-300 words.</length>
5. **<focus>**: Highlights the main subject or theme.
   - Example: <focus>The theme of friendship.</focus>
6. **<audience>**: Identifies who the output is for.
   - Example: <audience>For a young adult readership.</audience>
7. **<context>**: Provides any necessary background info.
   - Example: <context>The characters are childhood friends reconnecting after years apart.</context>
8. **<output format>**: Specifies the desired output format.
   - Example: <output format>Provide as a bullet-point list.</output format>
9. **<duration>**: Sets any time constraints.
   - Example: <duration>Complete within 15 minutes.</duration>
10. **<references>**: Requests any specific sources or references.
    - Example: <references>Refer to classic literary works on friendship.</references>

Focus, length, and context, are the extra tools that fine-tune the final result, much like media queries ensure a website looks sharp on every screen size.

You can see how creating structured prompts is like building a website with HTML and CSS. Each part of the prompt has a job to do.

  • The task is like the body tag, telling the AI what action to take.
  • The condition is your CSS, setting the boundaries and rules.
  • The style defines the tone, much like choosing a colour palette or font for a site.

Wow, there is a similarity to Web Design!

Like designing a webpage, prompts work best when structured. Every section acts as a guide to ensure the final product is exactly what’s needed. Whether I’m building a webpage or crafting a story prompt, both require the same thoughtful approach. Knowing how to break down tasks, add constraints, and define the style or tone – these are crucial in both worlds.

The more specific we are, the more likely we’ll get exactly what we’re after. Much like in web design, where every tag has its place, each part of the prompt plays a role in shaping the final output – whether it’s generating text, code, or art.

It’s incredible how similar these processes are, and it all comes down to clarity and direction. Now, whenever I need to draft something – whether a story or a website – I’ll always use this method.

Postscript:

1. Thanks to a very good friend both IRL and on Facebook, I was recently invited to join a FB group of AI Prompt Writers. I discovered many of them are copy-writers, so they use AI to both improve/enhance their output, plus additionally to seek information online that can help improve a client’s marketability, online presence, professional vs casual online content. Using AI again, they put all the client’s competitors into a database to determine how they are able to hold the market so successfully – and then use their copy-writing skills to produce a new campaign for their client.
I openly applaud it. Some AI-tinfoil-hat-wearers might not agree, that’s their prerogative.

2. One of my window-cleaning clients is a marketing consultant in Adelaide. I asked her if she uses AI in her job – and her instant response was “No way, I have a brain, I can do what it does.” I chose not to respond. But I did think “Yes, yet how fast can you produce the information to assist your client?” That’s where using AI is so beneficial. What might have taken weeks or months to compile can now be achieved in minutes. OK, it’s not that simple.

3. Now that I know the sections listed above, whenever I see a simple prompt, I immediately say to myself “Let’s break this down and build it up“, meaning let me change your request so the AI gets EVERY bit of information, then simplify to remove contradictions, then create a PROMPT. I actually enjoy this.

4. But first I have study to start and finish. I didn’t do any study with my web-design efforts, I picked it up very quickly. Whilst I can understand the basics of Python and AI, I want to know more. I want to help more people discover, realise and learn this – even though I am still a beginner on this journey of learning!

Post-PostScript:

I don’t know how helpful this has been for anyone else, but I found it cathartic to write this down. Aha, that’s right, I typed this blog post in *60* minutes – with minimal AI.


Discover more from The Entrepreneurial Life of Stephen Mitchell

Subscribe to get the latest posts sent to your email.

Comments are closed.

Website Powered by WordPress.com.

Up ↑

Discover more from The Entrepreneurial Life of Stephen Mitchell

Subscribe now to keep reading and get access to the full archive.

Continue reading