- a good life
- Posts
- I Spent 7 Days Obsessing Over Claude 3 Prompt Strategies For Writing—Here's what I Learned...
I Spent 7 Days Obsessing Over Claude 3 Prompt Strategies For Writing—Here's what I Learned...
I went a little crazy this week.
I started diving deep.
Like, deep deep
Into prompt engineering techniques—specifically for writing.
Why you ask?
Because I’m a nerd.
Jk (sort of)
What I really am interested in is just how far we can take prompting to yield the highest quality output in writing.
I’m talking generated writing, comprehensive analysis of your own writing, and everywhere in between.
So that’s just what I plan to share with you today:
All the techniques I’ve learned & how you can use them
The results I’ve seen & what you can expect
All the problems I faced & helpful resources I found
And there’s a lot I won’t put in here.
Just know you’re getting the highest value learnings from all those hours I spent/wasted.
Now, let’s talk about where my head was at coming into this, and then go over some of the experiments I ran.
My Experience & Thoughts Coming Into This
I had some previous experience and knowledge coming into this (such as this prompt engineering course here and building my own tools).
The key things I knew going into this were:
Structured data in prompts helps models understand better (JSON, toml, etc)
Length is strength—not a guarantee, but when done well, it can help the model narrow its focus on the task at hand.
Make explicit denotations (e.g., XML tags, Markdown, etc)
Expertise makes a world of difference
And let’s unpack that last point–expertise.
This is such an underestimated aspect of prompt engineering.
I see people on LinkedIn that complain about AI generated content being “too generic” and “easy to pick out”.
I say the person complaining doesn’t have good prompts. Period.
“Why don’t they have good prompts, Michael?”
I’m glad you asked!
Be a Generalist, Appreciate the Specialist (Expert)
They don’t have the expertise to get the most out of the models—even if they could, they wouldn’t be able to validate if the output is good.
That is why I have been absorbing as much information about writing (copywriting, marketing, creative, etc.) since the beginning of the year.
To develop some level of knowledge for myself and to have sources of expertise to draw inspiration from.
Experts have a specialized set of skills and wealth of specific domain experience—they are a necessity for the generalist.
Luckily, we generalists can borrow from these fountains of knowledge to use in our own ways with AI.
Be a generalist—appreciate the specialist.
As you collect these nuggets of gold, you should put them in what I call an Inspiration Reservoir—your source of raw information, insights, learnings, etc. Let’s talk about this a bit more
Inspiration Reservoir
If you’re a creator, marketer, entrepreneur—I don’t care what.
You should have a place where you store, organize and review:
Ideas
Inspirations
Swipe Files (for copy, for prompts, specific domain knowledge etc)
This is how you can manage AI more effectively—by again, reducing your own cognitive overhead.
Put the expert knowledge in a place you can find it.
And then when you need it?
Summon it like Harry Potter:
“acio copywriting expert input”
Now that you know where my head was at, let’s jump into the experiments.
Cookin’ in the Lab with Claude
A brief overview of the experiments I ran:
Ontologies to define a more focused framework for Claude
Claude 3 tweet performance Analysis
Crafting writing persona configurations
I applied the methods from each experiment to content repurposing (newsletter to tweets or LinkedIn posts).
Let’s see what I found!
Ontologies & LLMs
What’s an ontology?
Ontologies are structured representations of knowledge within a specific domain (in the context of AI).
They define concepts, relationships, and properties in a way that enables logical reasoning and inference.
This allows AI systems to derive new insights based on existing knowledge and relationships (shoutout to my friend Shep Bryan for turning me onto this).
How Can We Use Ontologies for Better Output in Generated Writing?
This is where we get into some interesting stuff.
I spent hours poring over ontologies and iterating with Claude 3 to help generate refined ontology frameworks.
The key is to feed the model a well-defined structure of the core concepts, attributes, and relationships for a given writing domain.
For example, I created an ontology for persuasive copywriting that defined elements like:
the ideal tone (engaging, conversational)
voice (authoritative, confident)
persuasion techniques (logic, evidence, appealing to reader's needs)
rules for strong opinions (well-informed, balanced, fact-based).
How did I develop this ontology, you ask?
My process is as follows:
Create a prompt to generate an Ontology development framework and feed it to Claude.
Create another prompt that leverages the ontology development framework generated from step 1 and takes a user input for the domain area the ontology will be about—Claude will then generate this ontology from this prompt.
Start a chat with the generated ontology to inform Claude of the framework is should stick to and then continue as you wish.
Side note—I used Anthropic’s Metaprompt to help refine each of the prompts in this flow (more on metaprompts later).
From one of my chat’s with Claude 3
The model was able to produce much more focused, impactful persuasive writing samples.
I believe there is a huge opportunity to develop comprehensive ontologies for various writing verticals and use them to supercharge AI writing tools.
It takes time to thoughtfully map out the key concepts and relationships, but the payoff in output quality is immense.
Claude 3 For Tweet Analysis & Improvement
During my experimentation, the question popped into my head:
How can I use LLMs to better understand why my high performing tweets performed well?
So that’s what I set out to do.
I had already done this once but recently formalized the process into:
Export tweet data from twitter analytics dashboard
Run Claude 3 through a series of prompts analyzing the text content of my tweets to find patterns and create a profile of a high-preforming tweets of my profile (my “content success profile”).
Use this analysis to help inform the model on how it should write tweets based on a newsletter
You can find a more in depth overview of that process in this video here:
And I also created a free walkthrough guide which you can find here.
I am happy with the results I’ve gotten so far.
The key component that makes this work is the ability for Claude to match its writing style to mine.
It’s able to do this because I feed it a generated analysis of my high performing tweets (along with some other info) from a previous step—then it can reference the traits identified in my writing style from the analysis to write like me.
It also helped me understand what type of post performs best for me.
For example, it noticed that medium form posts and posts about Austin have done well in the past—I decided to take Claude’s advice on what to write about here and it was one of the top performance tweets last week:
What do I love about Austin?
Well a lot of things...
But one big thing I've noticed (and love) in particular is this concept I call:
"Who are you?"
VS.
"What do you do?"
Austin has the "Who are you?" energy.
What are you talking about, Michael?
Let me explain:… twitter.com/i/web/status/1…
— Michael Daigler (@michaeldaigler_)
12:56 PM • Apr 7, 2024
That is why I like this experiment.
Because Claude can help you generate drafts based on what performs well for you and you can also use the model to be like a coach.
Telling you what kinds of posts are doing well so you can incorporate those traits into your tweets when writing yourself.
If you’re stuck on a thread or one-off tweet, definitely try this method out to see how you can improve your twitter engagement.
With that out of the way, moving onto my next experiment.
Making Writing Personas With (and for) Claude
For this experiment, I started by having Claude help me craft a JSON configuration of a writing persona:
This is what it gave me:
Then, I used the configuration in the following prompt:
You are an expert ghostwriter and copywriter.
Your goal is to help me write a full blown LinkedIn post that discusses concepts from my latest newsletter which I will provide in <newsletter> tags.
For the writing, you should adhere to your writing persona configuration below.
The numbers associated with the traits are scored out of 10 and inform you on the strength of that trait so you know how much that trait influences the writing:
<writing_persona_configuration>
{
"persona_name": "The AI Copywriting Entrepreneur",
"base_traits": {
"profession": {
"copywriter": 10,
"marketing_expert": 9,
"content_creator": 8,
"AI_developer": 7,
"entrepreneur": 8,
"community_builder": 7
}
},
"writing_traits": {
"writing_style": {
"engaging": 9,
"persuasive": 9,
"clear": 8,
"concise": 7
},
"tone": {
"confident": 9,
"friendly": 7,
"authoritative": 8,
"inspiring": 8
},
"voice": {
"active": 9,
"conversational": 8,
"empathetic": 8
},
"emoji_usage": no emojis,
"hashtag_usage": no,
"language": {
"casual": 7,
"accessible": 9,
"jargon-free": 8
}
},
"psychological_understanding": {
"motivation_targeting": 9,
"fear_targeting": 8,
"desire_targeting": 9
},
"references": {
"copywriters": [
"David Ogilvy",
"Gary Halbert",
"Joe Sugarman"
],
"copywriting_styles": [
"AIDA (Attention, Interest, Desire, Action)",
"PAS (Problem, Agitate, Solve)",
"The 4 Ps (Promise, Picture, Proof, Push)"
]
}
}
<writing_persona_configuration/>
This configuration above, is not meant to be who you write as actually—never reference who you are, just write as if you were the person you are ghostwriting for.
For the linkedin post, use the following examples as inspiration of how you can format and angle the post:
<examples>
{$EXAMPLES}
</examples>
Here is the newsletter you need to repurpose:
<newsletter>
{$NEWSLETTER}
<newsletter/>
Begin!
I pasted the draft of this newsletter where $NEWSLETTER is.
Next, I created a list of examples I thought performed well on LinkedIn and pasted those where $EXAMPLE is.
Here’s what I got back:
Not bad at all (and I’m probably gonna post this one)!
The approach of scoring traits out of ten and giving the model that understanding intuitively made sense to me and I’m happy I listened to myself.
I make this point to say that you should run experiments as an artist would with their works—do what feels right, test new techniques, have fun with it.
Other Findings & Resources
“The Prompt Library”
So, I thought I was familiar with Anthropic’s documentation but I had no idea they had a curated library of prompts for a variety of use cases!
They’re not all great…
But some of them are actually not a bad starting point so I will share a few of those now:
Lesson Planner–can use for courses
Prose Polisher–refine your content with advanced copywriting technique suggestions
Motivational Muse–Generates motivational messages based on input—for my dudes that love the platitudes, this one goes out to you (and me too lol)
Tweet Sentiment Analyzer–analyze sentiment of other peoples tweets with this and understand what emotions they are evoking
Brand Build–Craft a design brief for a holistic brand identity.
Okay that’s good for now.
I wanted to share these and just make y’all aware that this is a thing.
Anthropic Meta-Prompts
What is a MetaPrompt
A Meta prompt is a prompt engineering tool designed to solve the "blank page problem"—it helps give you a starting point to iterate on.
All you need to do is enter your task, and optionally the names of the variables you'd like Claude to use in the template.
Then you'll be able to run the prompt that comes out on any examples you like.
Things to note:
This is designed for single-turn question/response prompts, not multiturn.
The Metaprompt is designed for use with Claude 3 Opus—generating prompts with other models may lead to worse results.
The prompt you'll get at the end is not guaranteed to be optimal by any means, so don't be afraid to change it!
My Thoughts on The Results
The results so far have been promising.
By understanding the anatomy of my best performing tweets, I was able to prompt Claude to write tweets in a similar style and structure.
It's still early, but initial signs point to increased engagement.
This concept of using AI to analyze your own content and create a "success profile" that you feed back into the model is really powerful.
I can see this being a valuable technique not just for tweets, but for optimizing all sorts of content - emails, articles, scripts, product descriptions, etc.
I'm excited to keep experimenting with this approach and see how much further we can push AI-powered content optimization.
That’s all for now, folks!
‘Til next time, much love and peace y’all 🤠