Blog writing experiments with GPT4-Turbo and Claude
Getting AI-written prose to sound really human and match a person's individual writing style—or even a company's brand style—remains a serious challenge. In my experience, it takes a lot of time, effort, and careful prompting to coax a mediocre first draft from most large language models. These models also tend to get tired partway through if you ask them to write a post that's more than, say, 500 words long.
So far, my most successful attempts at blogging with language models have involved prompting them to research and build a blog outline, giving them a writing sample for reference, and then feeding them one section at a time to write. However, results can vary greatly from one prompt to the next and the process overall can be quite iterative and time-consuming.
Hoping to speed things up and potentially get better results, I recently ran some experiments combining prompts with automation in the form of a Python script.
Starting with a "lazy" model
Of the language models I've tried using for blog writing, ChatGPT-4 is perhaps the laziest, at least as of early May 2024. While your mileage may vary, I find it often gravitates to high-level summaries instead of deeper analysis and runs out of steam towards the middle of a draft. (It seems to be much better at debugging code and answering questions based on long documents.)
In other words, it made a great test case for my blog-generation script.
Crafting a reusable prompt-itecture
Because I wanted the script to be capable of generating virtually any kind of blog post, I set it up to ask the user—in this case, me—a series of questions to generate answers that can be combined into multiple prompts. Some of these questions relate to the identity of the blogger and how they like to write and others—e.g., the system prompt—and others are relevant to the specific blogging assignment.
If I were to run this script multiple times for the same blog, I would likely hard code the system prompt and eliminate that part of the question-response exercise.
A system prompt provides context for an AI model. It typically includes information about "who" the model should be when interacting with users and how it should answer questions. For example: "You are a world-class chef known for creative recipes. You also have a silly sense of humor and include puns in the title of every recipe you create."
On the other hand, a user prompt is the specific request you make to a model. For example: "I only have mustard, strawberries, and cheddar in the fridge. Combine these into a recipe."
A multi-step process
I also needed the script to mirror my most successful "co-blogging" process—asking the model for an outline and then feeding back each section of the outline as an individual prompt. I did this by prompting the AI to mark section names in the blog outline—as well as the introduction and conclusion—with ** and using Python functions to put section titles, section outline content, and each section's corresponding blog copy into a csv file:
I also included a Python function to combine all of the blog content into a single text file for convenience.
Tackling the style challenge
Of course, it's not enough for a blog draft to be complete and meet word count requirements. It also needs to sound like the author. To address this issue, I defined a supporting content text file in the script that can be used to feed writing samples and style guidelines to the model as part of the system prompt. In the case of this test, I used some samples of my own writing from this blog and other outlets.
Building and testing the script
Using ChatGPT as a copilot, I generated a script that failed right out of the gate. I fixed the first bug—outdated and malformed API calls—by replacing ChatGPT's code with code adapted from OpenAI's reference docs. Then I updated the logic in Python to treat the introduction and the conclusion as separate sections and aded print statements so I could see what was happening in the script moment by moment.
Finally, I tested the script, feeding it around 2,000 words of my writing and using it to generate blogs on a variety of random topics. While its interpretation of my style was a bit cringe and the copy often contained some characteristic AI-isms (e.g., "Hello, fill in group here!" "Let's dive in...") unless I asked specifically to avoid them, the overall results were somewhat better than what I typically have the patience to achieve through the ChatGPT interface—and a whole lot faster.
Each section was also fully developed and included more words than I requested. In fact, as you'll see in the example below, it seems like the model met its word count goals by restating information in different ways. This also suggests the prompts themselves may require some refining to ensure the model is fully aware that the sections must work together as a coherent post.
Doing more pull-ups without breaking a sweat
by GPT-4
Pull-ups are considered a cornerstone exercise in the world of fitness, revered for their profound impact on upper body strength. This single movement engages multiple muscle groups, including the back, arms, and shoulders, making it an efficient, full-body exercise. However, despite its effectiveness, mastering pull-ups can be daunting for many.
Enter the Grease the Groove (GTG) technique, developed by fitness guru Pavel Tsatsouline. This method isn’t about exhaustive repetition; rather, it's about consistency and frequency without approaching muscle fatigue. By performing sub-maximal sets of pull-ups throughout the day, GTG allows neuromuscular adaptations that can dramatically increase your pull-up numbers.
This technique is particularly useful for breaking through pull-up plateaus. By spreading out the effort throughout the day, GTG trains the body and mind to execute pull-ups more efficiently and effectively, making them progressively easier to perform. With consistent application, GTG can transform one's ability to conquer the pull-up bar.
Section 1: Understanding Grease the Groove (GTG)
Greasing the Groove (GTG), a term famously coined by Pavel Tsatsouline, revolves around a unique training methodology designed to enhance your strength in specific exercises. Pavel, with a distinguished background in shaping the Soviet Special Forces and a profound influence in kettlebell training, introduced GTG as a way to frequently practice strength exercises without pushing to fatigue. This technique shifts away from traditional workouts, emphasizing sub-maximal sets spread throughout the day.
The core idea here is surprisingly straightforward: integrate numerous sets of an exercise into your day, ensuring each is performed with impeccable form but never to the point of exhaustion. This approach not only helps in solidifying proper technique but also boosts neurological efficiency, enabling the body to perform movements more effectively. GTG stands out for its simplicity and profound effectiveness, making it a favored strength protocol especially among athletes looking to enhance performance in specific movements without the typical wear and tear of intense workouts.
Section 2: Implementing GTG for Pull-Ups
Implementing GTG (Grease the Groove) for pull-ups has been a game-changer in my fitness routine. Here’s how I set up my daily regimen: frequency and volume depend largely on my current fitness level and daily form. Instead of doing a max set, I spread my pull-ups throughout the day, performing sub-maximal sets to keep my muscles fresh and responsive. This could mean 5 pull-ups six times a day, provided my max is around 10-12 reps a set.
Form is crucial. Every rep should be executed with a focus on full range of motion—starting with a complete hang and pulling up until my chin clears the bar. This technique not only maximizes muscle engagement but also minimizes the risk of injuries, keeping the emphasis on controlled movements.
For accessibility, I installed a pull-up bar in my home office doorway. It reminds me to take a pull-up break and also integrates well into my daily life. This simple setup ensures I can stick to the GTG method consistently, making solid gains in both strength and technique.
Section 3: Complementary Training and Recovery
Crushing your pull-up goals doesn't stop at the bar. Incorporating complementary exercises is absolutely key. Priority one? Core strengthening. Think planks and leg raises to keep that midsection solid and supportive. Scapular health can't be ignored either. Exercises like scapular pull-ups or wall slides ensure these crucial stabilizers are up to the task, helping you avoid injury and improve efficiency.
Now, while Grease the Groove (GTG) has us frequently practicing at sub-maximal effort, rest and active recovery are non-negotiable. This includes light stretching or even yoga on your off days to keep muscles limber. The aim? Quick, effective recovery.
And let's chat nutrition—it’s your foundation. High-quality protein is essential for muscle repair, while carbs replenish your energy stores. Staying hydrated is also crucial for optimal muscle function. So, while you’re upping your pull-up count, keep these support strategies strong in your routine.
Conclusion
Throughout my journey with the Grease the Groove (GTG) method for enhancing pull-up performance, the brilliance lies in its simplicity and effectiveness. By integrating frequent, sub-maximal effort pull-ups into daily routines, I've noticed significant strength gains without feeling exhausted. This method is not just a workout; it's a seamless part of life that encourages our bodies to adapt efficiently.
Patience and consistency are paramount. Results don’t appear overnight but evolve through persistent effort. It's crucial to remain attentive to your body’s signals to sidestock overtraining, which can be a real setback. Keeping a log of your pull-up counts and how you feel each day helps in assessing progress and making necessary tweaks—ensuring continuous improvement without plateaus.
Opportunities to improve
While I think this Python script is a reasonable prototype, it still falls short of my goal of quickly producing a decent first draft of a blog in a specific style. Some ideas for extending and improving the script include:
Giving users the option to approve or reject outline section titles before the full outline is generated.
As noted above, adjusting the prompts to ensure the model understands that copy for each section will be combined into a single post
Asking the model to check the outline for redundancy and make revisions before generating the blog.
Asking the model to check the blog draft for redundancy and consistency with the reference style
Incorporating "humanization" rules into the system prompt, asking the AI not to use words and phrases strongly associated with AI writing.
If you're interested in testing this script, you can find the code on GitHub.
Trying the same approach with Claude
Since I've been meaning to test out Claude, Anthropic's answer to ChatGPT, I created a new version of the script and updated to call the Claude Opus model. The API calls failed the first couple of times, until I took a closer look at Anthropic's documentation and noticed that the system prompt should be passed as a high-level parameter and not as a message from the system "role."
Then I encountered another issue. During the process of passing individual sections to Claude for copywriting, this error appeared:
529 - overloaded_error
: Anthropic’s API is temporarily overloaded.
Most likely, I was accessing the API when Anthropic's servers were busy with other requests. For the purposes of this test, I adjusted the script to pass the outline to Claude in a single prompt, minimizing the total number of API calls. After trying the model on the grease-the-groove topic shown above, I ended up with a draft that was nicely written, informative, and true to the personal trainer POV I supplied as part of the system prompt.
Even better, Claude cited its sources in a way that should be easy to fact check.
Grease the Groove: The Secret to Mastering More Pull Ups
Every personal trainer knows the feeling - a client wants to perform their first unassisted pull up or rapidly increase their max reps, and they're looking to you for guidance. Enter the "grease the groove" technique, a highly effective method for boosting pull up performance that relies on frequent, low-intensity training sessions. By harnessing the power of skill specificity and neural adaptations, this Soviet-era practice can help your clients achieve their loftiest pull up goals.
Understanding the Grease the Groove Technique
The brainchild of former Soviet special forces trainer Pavel Tsatsouline, "greasing the groove" eschews training to failure in favor of submaximal, high-frequency sets (Contreras, 2014). A client who can perform 5 pull ups might do several sets of just 2-3 reps spread throughout the day. These sessions are short enough to avoid fatigue but frequent enough to ingrain motor patterns and neural drive to the working muscles (Schoenfeld, 2020). In essence, it's a way of practicing the skill of a pull up and laying the foundation for bigger strength gains.
Setting Up Your Grease the Groove Pull Up Program
To implement the grease the groove method, start by assessing your client's current pull up max. Take 40-50% of that number - so 2 reps for a 5RM - and have them perform 5-6 sets per day (Tsatsouline, 2000). The sets should be spaced at least 30-60 minutes apart, which makes this an ideal technique for clients training at home or with access to a pull up bar throughout the day. Aim for a total daily volume of 20-25 reps, adjusting based on the client's recovery and progress (Sommer, 2022).
Programming Considerations and Tips for Success
The key to effective grease the groove training is never working to failure. Each set should feel "fresh," like the client could perform a few additional reps if asked (Contreras, 2014). Technique is also paramount - sacrificing form to eke out more reps will only undermine progress. Over time, you can slowly increase volume by adding reps or using "ladder" workouts, but always prioritize performance quality. A 5 day on/2 day off schedule usually works well, and most clients will notice significant improvements after just a few weeks of dedicated practice (Schoenfeld, 2020).
With smart, consistent application of the grease the groove method, your clients will be well on their way to a new pull up PR. The beauty of this technique lies in its simplicity - no fancy equipment or trendy protocols required. By keeping submaximal practice quality high and trusting the process, you can help everyone from novices to more advanced athletes redefine their pull up potential.
References:
Contreras, B. (2014). Bodyweight Strength Training Anatomy. Human Kinetics.
Schoenfeld, B. (2020). Science and Development of Muscle Hypertrophy. Human Kinetics.
Sommer, C. (2022). Grease the Groove Essentials. Retrieved from https://gmb.io/grease-the-groove/
Tsatsouline, P. (2000). Power to the People!: Russian Strength Training Secrets for Every American. Dragon Door Publications.
Applying the original methodology
A few days later, I retested the original script that feeds Claude the blog outline for writing one section at a time. This time, everything worked as expected, and I ran the script several times, trying out different topics. Compared to the simpler script, it consistently generated longer posts—and Claude did a great job staying true to the persona defined in the system prompt. However, these longer posts, as you'll see in the example below, were sometimes a little repetitive, suggesting the model needed a better understanding of how sections should combine to make a post.
What to plant in May: Northwest Arkansas
by Claude
As an experienced gardener in Northwest Arkansas, I've learned that May is a pivotal month for planting. The last frost has typically passed, the soil is warming up, and the days are getting longer. It's the perfect time to get outside and start growing the garden of your dreams.
Gardening in this region comes with its own unique challenges and opportunities. Our climate is characterized by hot, humid summers and relatively mild winters. We also have a wide range of soil types, from rich, loamy bottomland to rocky, clayey hills. Understanding these factors is key to choosing the right plants for your garden.
When it comes to May planting, there are a few important things to keep in mind. First and foremost, you'll want to select plants that are well-suited to our growing conditions. This means opting for varieties that can handle the heat and humidity of our summers, as well as any soil limitations you may have.
In this post, we'll dive into some of the best plants for May planting in Northwest Arkansas. We'll cover everything from tried-and-true favorites like tomatoes and zucchini to lesser-known options that thrive in our unique climate. We'll also discuss tips for preparing your soil, starting seeds, and caring for your plants as they grow. By the end, you'll be well-equipped to create a thriving, productive garden this season.
Section 1: Cool-Season Vegetables to Plant in Early May
In early May, I always look forward to planting my cool-season vegetables here in Northwest Arkansas. The soil has warmed up enough for seeds to germinate, but the scorching summer temperatures haven't yet arrived. This window of mild weather between 40-75°F is ideal for crops like lettuce, spinach, radishes, peas, and carrots.
I start by direct sowing lettuce and spinach seeds in well-prepared beds. I love the range of colors and textures available, from deep green romaines to delicate red leaf varieties. For a continual harvest, I sow seeds every two weeks until late spring.
Radishes are another favorite of mine. They germinate quickly and are ready to harvest in as little as 20-30 days. I plant them densely and thin them as they grow, using the micro greens in salads.
No early May garden is complete for me without peas. I plant both shell peas for fresh eating and snow peas for stir-fries and salads. They take a bit longer, but are well worth the wait.
Finally, I always dedicate space to carrots. They require some patience and diligent weeding, but nothing beats the flavor of a freshly pulled carrot. I sow them thickly and thin them ruthlessly to give each carrot room to grow.
By focusing on these cool-season superstars in early May, I'm able to enjoy an abundant harvest of fresh veggies before the NW Arkansas summer heat sets in. The time spent planning and planting now pays delicious dividends later.
Section 2: Warm-Season Vegetables to Plant in Mid-Late May
Now that the risk of frost has passed and the soil is warming up, it's time to get my warm-season vegetables in the ground. I always eagerly anticipate planting tomatoes, peppers, squash, cucumbers, and green beans in mid to late May.
Tomatoes are the stars of my summer garden. Whether I'm growing cherry tomatoes for salads or big slicers for sandwiches, nothing beats the flavor of homegrown. I make sure the soil temperature is consistently above 60°F before transplanting my tomato seedlings. The same goes for peppers - both sweet varieties and hot chiles thrive in the heat of summer.
By late May, the ground is warm enough for direct seeding squash, cucumbers and beans. I like to plant a mix of zucchini and yellow squash, making sure to allow plenty of space for these vigorous plants to sprawl. Cucumbers are another must-have for summer salads and pickling. I plant both bush varieties and climbing types that will scramble up a trellis.
Green beans are easy and prolific. Bush beans begin producing earlier, but I also plant pole beans to extend the harvest. I sow them about 1 inch deep and 3-4 inches apart. Within 2 months, I'll be enjoying the unbeatable taste of tender, garden-fresh green beans.
The Old Farmer's Almanac advises that here in NW Arkansas, warm-season crops shouldn't go in until around May 15, once soil temps are reliably over 60°F. By planting tomatoes, peppers, squash, cukes and green beans at just the right time, I lay the groundwork for an abundant summer harvest. I can already taste those sun-ripened tomatoes and crisp cucumbers!
Section 3: Herbs to Plant in May
Herbs are some of my favorite plants to grow in the garden. Not only do they add wonderful flavors to recipes, but many of them are quite attractive too. Here in NW Arkansas, May is the ideal time to get several essential herbs planted.
This year, I'm focusing on five must-have culinary herbs: basil, cilantro, dill, parsley, and oregano. Sweet basil is a classic for pasta sauces, caprese salads and for making pesto. I like growing a few different varieties for interesting flavors and visual appeal. Cilantro is a staple in Mexican and Asian dishes. Although it has a tendency to bolt quickly in the heat, succession planting every 2-3 weeks provides a steady supply.
Dill is wonderful for pickling but I also love to use the fresh, feathery leaves in salads, egg dishes and sprinkled over fish. Parsley, both the curly and flat-leaf types, is a versatile herb that brings bright flavor and color to so many recipes. And what would pizza or pasta be without oregano? I'm growing both the classic Italian variety as well as the more decorative golden oregano.
According to Master Gardener Susan Reynolds, all of these herbs need 6-8 hours of sunlight daily and well-draining soil to thrive here. I've prepared a sunny raised bed amended with compost to provide the perfect growing conditions. By the end of May, my herb garden should be bursting with fragrant green goodness, ready to flavor our meals all summer long. I can't wait!
Section 4: Companion Planting Tips
Companion planting has become one of my favorite techniques to get the most out of my garden. I've found that by being strategic about which plants I place near each other, I can improve flavors, deter pests, and make the best use of my limited gardening space.
One of my go-to companion planting combos is basil and tomatoes. I always make sure to tuck a few basil plants in between my tomato vines. Not only does this save space, but many gardeners swear that basil actually improves the flavor of the tomatoes growing nearby. I have to agree - my tomatoes have never tasted better!
Another companion planting trick I use is interplanting carrots and onions. The strong scent of onions helps repel pesky insects that would otherwise munch on the carrots. Plus, these veggies grow well together since carrots are deep-rooted and onions have shallow roots.
I've also learned the importance of avoiding planting members of the same plant family right next to each other, a concept called "crop rotation". Apparently, closely related crops are prone to the same diseases and attract the same pests. So now, I make an effort to separate my tomatoes, peppers, and eggplants, which are all in the nightshade family.
To really maximize my harvest, I lean on intercropping - growing fast-maturing crops in between slower-growing ones. I also practice succession planting by sowing new seeds every few weeks for a continuous harvest. These techniques, combined with companion planting, keep my garden productive from spring through fall.
Conclusion
In conclusion, May is an exciting time for gardeners in Northwest Arkansas, as it marks the perfect opportunity to plant a wide variety of cool-season and warm-season vegetables and herbs. By selecting crops like lettuce, radishes, carrots, and peas for the cooler days, and tomatoes, peppers, squash, and beans for when temperatures rise, you can ensure a diverse and abundant harvest throughout the growing season. Experimenting with companion planting techniques, such as pairing tomatoes with basil or carrots with onions, can help maximize your garden's productivity and minimize pest issues.
Remember, gardening is a learning process, and the best way to improve your skills is by getting your hands dirty and trying new things. Don't be afraid to experiment with different varieties, planting techniques, and layouts to discover what works best for your unique garden space. If you need guidance along the way, consider reaching out to your local cooperative extension office or joining a gardening club in your area. These resources can provide invaluable advice, connect you with fellow gardeners, and help you troubleshoot any challenges you may encounter.
As you embark on your May planting adventure, embrace the joy and satisfaction that comes with nurturing your own homegrown produce. With a little patience, care, and a spirit of curiosity, you'll be well on your way to creating a thriving and bountiful garden that will nourish both body and soul. Happy gardening!
Taking it to the next level
Overall, I was impressed by how well Claude can learn from system prompts, inhabit its assigned "role", and produce nearly natural writing. I'm looking forward to seeing if I can get even better results by applying some of the enhancements I'm considering for the OpenAI version of this script.
The experiment continues...