Part 2: Prompt Engineering for Growth: Creating Viral Wizarding Content
DEV Community

Part 2: Prompt Engineering for Growth: Creating Viral Wizarding Content

The Next Problem

After solving authentication and getting AWS Lambda to post to X, I found myself staring at a new challenge. The infrastructure worked. The API worked. The automation worked. But there was one small issue. There was no content. Every post still had to be written manually.

The original vision for WizardThoughts wasn't just automation. The goal was autonomy. I wanted a system that could:

  • Generate ideas
  • Create content
  • Create artwork
  • Publish automatically

To make that happen, I needed the bot to think for itself.

Enter Amazon Bedrock

Amazon Bedrock became the content engine behind the project. Rather than building custom AI infrastructure, Bedrock provided access to foundation models through a simple API.

My first objective was straightforward: Generate a motivational quote inspired by a magical wizarding world. The first prompt looked something like this:

Generate a motivational quote. Requirements:
- Under 240 characters
- Suitable for X

Technically, it worked. The quality wasn't great.

The Generic AI Problem

The first quotes sounded like every motivational page on the internet. Examples looked like:

  • Believe in yourself and great things will happen.
  • Success comes to those who never give up.

Perfectly valid. Perfectly boring.

The problem wasn't the model. The problem was the instructions. I had accidentally built a generator for the world's most forgettable content.

The Realisation

Most people approach AI prompting as a writing exercise. I started viewing it as product design. The prompt wasn't just generating text. The prompt was defining the personality of the account.

Every instruction influenced:

  • Engagement
  • Shareability
  • Memorability
  • Follower growth

The goal wasn't: Generate content.

The goal became: Generate content that people want to interact with.

That changed everything.

Reverse Engineering Engagement

I started looking at the types of posts that consistently perform well on social media. Certain patterns emerged repeatedly.

Curiosity

People love unanswered questions. Examples:

  • What if...
  • Have you ever...
  • Imagine if...

Curiosity creates a psychological need for resolution. People stop scrolling.

Nostalgia

Wizarding World fans are incredibly nostalgic. Posts that trigger memories often outperform pure motivational content. For example:

Remember when discovering a new spell felt like endless possibility?

The post isn't selling anything. It's creating a feeling.

Identity

People engage with content that reinforces their identity. Instead of "Work hard and succeed," I started generating posts like:

Every wizard begins as a student.

The same lesson. A more relevant story.

Conversation

The biggest breakthrough came from discussion-driven posts. Instead of broadcasting messages, I wanted the account to invite participation. For example:

If you could learn one magical skill in real life, would you choose courage, wisdom, or luck?

Simple. Yet far more likely to generate replies.

Redesigning the Prompt

Eventually I completely replaced the original prompt. Instead of asking for a motivational quote, I asked the model to create different content categories.

Generate ONE of the following at random:
1. Inspirational wizarding quote
2. Magical life lesson
3. "What if..." wizarding thought
4. Wizarding world observation
5. Unpopular magical opinion
6. Question that encourages replies
7. Nostalgia-based magical post
8. Magic and mindset lesson

This single change dramatically improved output variety. The account stopped sounding like a quote generator. It started sounding like a personality.

Designing for Followers

Follower growth wasn't going to come from posting more. It was going to come from posting better. Every prompt was designed around three objectives.

1. Stop The Scroll

The first sentence had to create interest. Examples:

  • What if...
  • Imagine...
  • Most wizards...

Hooks matter. Without them, nothing else matters.

2. Reward The Reader

A post should leave someone with:

  • An insight
  • A question
  • A feeling
  • A memory

Something worth taking away.

3. Encourage Action

Not every post should ask for engagement. But some should. Questions became a deliberate part of the content strategy.

Which magical lesson has helped you most in real life?

Simple. Yet effective.

Generating Images Too

At this point another problem appeared. The text was improving. The visuals didn't exist. I wanted the model to create image prompts alongside the content. So the prompt evolved again.

Instead of returning:

{ "quote": "" }

It now returned:

{ "quote": "", "imagePrompt": "" }

For example:

{
  "quote": "What if the strongest magic has always been the courage to keep going when the path ahead is uncertain? #Magic #WizardingWorld #Mindset",
  "imagePrompt": "Young wizard standing on a cliff overlooking a glowing magical castle at sunrise, cinematic fantasy artwork, magical atmosphere, rich colours, volumetric lighting, highly detailed, no text"
}

Now every post automatically contained the instructions needed to generate matching artwork.

Storing Content in DynamoDB

Once content generation was working, the next step was persistence. Every generated post was stored in DynamoDB. The structure looked like:

{
  "PostId": "post-123456",
  "Content": "...",
  "ImagePrompt": "...",
  "Status": "Pending",
  "ImageStatus": "Pending"
}

This transformed DynamoDB into the workflow engine for the entire platform. Everything became state-driven. No manual tracking required.

One Unexpected Problem

Large language models are not always obedient. Despite explicitly asking for JSON, the model occasionally returned valid JSON wrapped in Markdown code fences rather than raw JSON. For example:

{ "quote": "...", "imagePrompt": "..." }

My parser expected raw JSON. The model decided to be helpful. Unfortunately, that helpfulness immediately broke the workflow.

The lesson? Never trust model output. Always validate and clean responses before processing them. It was a small issue, but an important one.

Measuring Success

The interesting thing about prompt engineering is that success isn't measured by whether the model responds. It's measured by whether the audience responds. A technically perfect answer can still be terrible content.

What mattered was:

  • Likes
  • Replies
  • Shares
  • Follows

Those became the real evaluation metrics. The AI wasn't writing for me. The AI was writing for the audience.

Lessons Learned

Three lessons stood out.

  1. Prompting Is Product Design - Every instruction affects behaviour. Every sentence influences output quality. A prompt is not a command. It's a specification.

  2. Variety Drives Engagement - People don't follow accounts that repeat the same idea. Randomising content categories increased quality and prevented repetition.

  3. The Model Is Not The Product - Bedrock generated the content. But the real value came from prompt design, workflow design, and distribution design. The model was just one component in a larger system.

What's Next?

By this point, WizardThoughts could:

  • โœ… Generate original content
  • โœ… Produce engagement-focused posts
  • โœ… Create image prompts
  • โœ… Store content automatically

But something was still missing. The account had words. It had ideas. It had personality. What it didn't have was artwork.

In Part 3, we'll build the visual side of the platform using Stability AI, Amazon S3, and automated image generation. Because on social media, attention may start with words. But it is often captured by images.

Next: Part 3 - AI Art at Scale: Generating Fantasy Images with Bedrock and Stability AI

Comments

No comments yet. Start the discussion.