Effective AI Prompt Writing Using the ROCSE Framework

Selvin Ortiz

9 months ago

AI prompt writing is the bridge between human creativity and the power of generative artificial intelligence. This intersection allows for the creation of content that is both engaging and precisely aligned with your intentions.

However, creating effective prompts that lead to desired outcomes can often seem daunting.

Prompt writing is essentially the art of writing text designed to guide AI models towards producing specific outcomes. This process involves clearly communicating your intent, context, and desired style to the AI, enabling it to understand and fulfill your creative or informational needs effectively. The better the prompt, the more accurate and aligned the AI's output will be with your goals.

Quick Example

Below is a prompt example that generates a photo of a goat using DALL-E 3:

✍️ Generate an image of a single goat eating grass in a vast open field. It is during the golden hour, so the sun is low on the horizon, casting a warm, golden light that gently illuminates the goat's fur, highlighting its texture. The field should be lush and green, and the overall atmosphere serene and peaceful.

Prompts can start simple when you're just experimenting but they can get quite long when you're trying to fine-tune your results. There are several techniques you can use to ensure that you're prompts are effectively written to generate great results.

A Prompt Writing Framework

After two years of writing prompts with varying degrees of difficulty and for different use cases, I decided to create my own framework.

ROCSE is a simplified yet powerful approach to distill the process of prompt writing.

Here are the key elements in my ROCSE framework:

1. Role

This involves defining the perspective or expertise that the AI should adopt, setting the stage for the tone and depth of the generated content.

2. Objective

A clear objective guides the AI towards the desired output, ensuring focus and relevance in the content it generates.

3. Context

Providing the AI with necessary background or situational details enables it to produce responses that are more nuanced and applicable.

4. Style

The style dictates the tone, format, and structure of the AI's output, ensuring that it meets the creator's expectations and resonates with the intended audience.

5. Extras

These are the finishing touches that refine the prompt, including specific details or requirements that enhance the relevance and quality of the AI-generated content.

By applying the ROCSE framework, you can navigate the complexities of AI prompt writing with greater ease and confidence. Whether it's generating artistic pieces, crafting marketing content, or automating mundane tasks, ROCSE empowers you to harness the full potential of AI in a structured and effective manner.

Effective Prompts Using ROCSE

Below are a few examples using my framework. You can copy/paste these straight into your AI model of choice, be it ChatGPT, Gemini, or Claude.

Example 1: Writing a Blog Post about Sustainable Living

  • Role: An expert in sustainable living
  • Objective: To inform readers about easy steps to reduce their carbon footprint
  • Context: Considering the current environmental crisis and the average person's lifestyle
  • Style: Informative yet engaging, with actionable advice
  • Extras: Include statistics on waste reduction and energy savings

✍️ Write an informative yet engaging blog post as an expert in sustainable living, aiming to inform readers about easy steps to reduce their carbon footprint. Consider the current environmental crisis and the average person's lifestyle. Include actionable advice, supplemented with statistics on waste reduction and energy savings.

Example 2: Creating a Science Fiction Story

  • Role: A science fiction writer
  • Objective: To craft a short story about a dystopian future where AI governs humanity
  • Context: In a world where AI's development has surpassed human control
  • Style: Dark and immersive, with complex characters
  • Extras: The story should revolve around a rebellion led by a group of hackers

✍️ Craft a short science fiction story as a writer, about a dystopian future where AI governs humanity, set in a world where AI's development has surpassed human control. The tone should be dark and immersive, with complex characters. Focus on a rebellion led by a group of hackers.

Example 3: Generating Educational Content for Children

  • Role: A children's educational content creator
  • Objective: To produce a fun, engaging story that teaches basic math concepts
  • Context: Aimed at children aged 6-8, introducing addition and subtraction
  • Style: Light-hearted, colorful, and interactive
  • Extras: Include talking animals as characters to explain math concepts

✍️ Produce a fun, engaging story as a children's educational content creator, teaching basic math concepts of addition and subtraction to children aged 6-8. The style should be light-hearted, colorful, and interactive, with talking animals as characters to explain math concepts.

Example 4: Highlighting the Upside of Working from Home

  • Role: A workplace culture consultant
  • Objective: To articulate the benefits of remote work for employees and employers
  • Context: In the post-pandemic era, where remote work has become more common
  • Style: Optimistic and persuasive, with real-life examples
  • Extras: Reference recent studies on productivity and employee well-being

✍️ Write an optimistic and persuasive article as a workplace culture consultant, articulating the benefits of remote work for both employees and employers in the post-pandemic era. Use real-life examples and reference recent studies on productivity and employee well-being.

Example 5: Generating an Image of a Serene Home Office

  • Role: A digital artist
  • Objective: To create an image that embodies the tranquility and efficiency of a home office
  • Context: Intended for an audience considering transitioning to remote work
  • Style: Realistic with warm colors, emphasizing a spacious and organized setup
  • Extras: Include elements like a large window with a garden view, a comfortable chair, and an array of plants

✍️ Create a realistic image with warm colors as a digital artist, embodying the tranquility and efficiency of a home office for an audience considering remote work. Emphasize a spacious and organized setup with a large window overlooking a garden, a comfortable chair, and plants.

Example 6: Visualizing a Digital Nomad Lifestyle

  • Role: A illustrator
  • Objective: To illustrate the freedom and flexibility of the digital nomad lifestyle
  • Context: For a blog post targeting professionals interested in working from anywhere
  • Style: Inspirational and vibrant, showcasing diverse locations
  • Extras: Feature a person working on a laptop in different settings: a beach, a café, and a mountain top

✍️ Illustrate the freedom and flexibility of the digital nomad lifestyle as an illustrator for a blog post targeting professionals interested in working from anywhere. The style should be inspirational and vibrant, showcasing a person working on a laptop in diverse locations: a beach, a café, and a mountain top.

These examples demonstrate how the ROCSE framework can be applied to generate precise and targeted AI prompts across different genres and objectives.

Closing

I have a lot more to share on the topic of AI Prompt Writing but I need to stop here for now. I'll be updating this article with a few links, more resources, and more examples.

Selvin Ortiz at desk

Who wrote this article?

Selvin Ortiz👋

I'm a software engineer and content creator.
I help brands develop software and content strategies 🚀

On this blog, I write about software development, emerging technology, technical leadership, and content creation ✨

My Most Recent Posts

My Most Recent YouTube Videos

Subscribe to My Newsletter 💌

Delivered straight to your inbox once a month. I’ll send you a curated list of my latest content, top tech tips, and exclusive insights.

Once Monthly
I’ll email you a curated list with my latest content and best tech tips.
No Spam
I pledge to never share or sell your info, and will never send you junk.