Strategies for Generating Longer Content with GPT-4

Hi everyone, I’m using GPT-4 to create detailed lessons for a course, aiming for 2000-3000 words per lesson, but at present, I find myself limited to generating content that spans 600-900 words per lesson. Does anyone have tips or strategies to efficiently generate longer, high-quality content with GPT-4? Thanks!

Hey there and welcome to the community!

I know that as of late, GPT-4 has been much more finicky and weird about generating long responses. Perhaps diving the larger lesson plan into sections and prompting for extensive responses in each section could easily stack up to 2-3k words?

Thanks! That’s a great tip about splitting the lesson plan. I’ll give that a try!

1 Like

I answered a similar question here: Any luck getting specific word count? - #3 by siavosh87

The easiest way is to include an example in your prompt, where the example contains a high quality detailed lesson with the word count that you are looking for. The downside is that your prompt will be longer and therefore cost more.

If you don’t care about the cost, then the ideal solution would be to include two good examples in your prompt, and then you should get the desired word count. If cost is an issue, then I would actually try using gpt-3.5-turbo but using a prompt where you have 3-4 really good high quality examples in your prompt of the type of output you want produced. There’s a chance that doing this with gpt-3.5-turbo may give you the same quality as gpt-4.

1 Like

Hi @siavosh87 - but can you confirm that you have actually achieved outputs of the magnitude of 1200+ words in one API call through few shot? It has never worked for me personally, even when I included lenghty examples in the prompt. If yes, then I’d be genuinely curious to understand how you’ve approached it.

Actually - I will just correct myself. I just managed to achieve longer content by trying something I hadn’t tried before.

That involved providing the model as reference the detailed target structure of an output I wanted it to produce down to the level paragraphs. That enabled me to achieve an output of up to 2,100 words in one API call. I used gpt-4-0125-preview for the test.

The below was the structure I provided it with. In my case I asked it to create 6 sections (using the pattern below, spelled out for each section) - it achieved only four sections plus the conclusion but that yielded 2,100 words. I did not include examples as context - it only had as input some other research report.

Quick additional note after more testing: When I included in the detailed structure breakdown additional qualifiers such as “long paragraph”, “very long paragraph” or “short paragraph”, this further helped steer the length of the output. The results are not yet consistent and I typically achieved outputs in the range from 1,500-2,250 words. I also tried further breaking it down to the level of sentences for each paragraph but that just led to more API calls time-outs lol.

Structure

Title

Section 1

Sub-section 1.1.
Paragraph a
Paragraph b

Sub-section 1.2.
Paragraph a
Paragraph b

Sub-section 1.3.
Paragraph a
Paragraph b

Section 2

Sub-section 2.1.
Paragraph a
Paragraph b

Sub-section 2.2
Paragraph a
Paragraph b

Sub-section 2.3.
Paragraph a
Paragraph b

Conclusion

1 Like