#How to write long-form content without repetitions via the API

12 messages · Page 1 of 1 (latest)

left sequoia
#

I have written a program that is supposed to write an article of the desired length based on a given topic.
Of course I know the token limit, which is why I include summaries of the already written sections in the prompt. However, it still happens very often that the individual text sections contain repetitions of the previous sections. Is there any way to prevent this? All approaches I have tried lead to the same result. But it must be possible to write long articles via the API with a few thousand words that do not contain repetitions.
My process currently looks like this
I have the individual section titles generated
I iterate each section and in the prompt say something like "Write me a section on the subtopic ->paragraph headline<- that belongs to an article that covers the ->topic<-.
You've already written about the following ->summaries<-. Avoid repetition...

maiden mantle
#

That’s kindof like what the frequency penalty setting is for, I think. You should also try variant prompts, to see if they do any better. Good luck!

left sequoia
#

Unfortunately the frequency penalty doesn't help me, because I can't have the whole article written in one prompt (tokens would be exceeded). And since each call is context-free, the API of course doesn't know which phrases it has already used in other sections. Unfortunately, sending along summaries also quickly runs up against the token limit.

wicked cairn
#

Perhaps the subtopics are just too close to each other. Try breaking up the article into topics that don't overlap too much and ask it to focus on the specific topic without touching on topics: <previous topics list>.

opal zenith
#

if not, migrate

spare mist
#

share a fuller sample prompt if you'd like and I can try to transform it so it avoids over repetition, @left sequoia

left sequoia
#

many months (and models) later there is still no working solution available...
Tried the whole day to generate a 1200 words article without any repetitions (= in one api call). But even with the 16k model of 3.5 turbo the response is limited to 4096 tokens.

Any ideads or advices to fix this endless issue?

#

Here is a sample prompt (generates a german article):
I Want You To Act As A Content Writer Very Proficient SEO Writer Writes Fluently German.

You have the task to create an article for the following table of contents, which is exactly 1200 words long:

  1. Einführung in das Tomatenschneiden
    1.1 Warum Tomaten schneiden wichtig ist (Gesundheitliche Vorteile, Kulinarische Vorteile)
    1.2 Die richtige Auswahl der Tomaten (Reife Tomaten, Unreife Tomaten)
  2. Vorbereitung zum Tomatenschneiden
    2.1 Benötigte Werkzeuge (Messer Auswahl, Schneidebrett Auswahl)
    2.2 Sicherheitsmaßnahmen (Sicheres Schneiden, Vermeidung von Kontamination)
  3. Techniken zum Tomatenschneiden
    3.1 Grundlegende Schneidetechniken (Würfeln, Scheiben schneiden)
    3.2 Fortgeschrittene Schneidetechniken (Julienne schneiden, Concassé schneiden)
  4. Anwendung von Tomatenschneidetechniken
    4.1 Tomaten in Salaten (Griechischer Salat, Caprese Salat)
    4.2 Tomaten in Hauptgerichten (Tomatensauce, Gefüllte Tomaten)

Additionally you have the following information:

#
  • The article is about "Tipps und Techniken zum richtigen Schneiden von Tomaten"
  • The content must be 100% German
  • The content must be formatted in markdown
  • The first level points (e.g "1.","2." etc) of the Table of Contents should be included as h2 (##) without the numbers, the second level points (e.g "1.1","1.2" etc) as h3 (###) without the numbers and the key points in the brackets serve only for the contentwise orientation with the writing of the paragraph
  • The bracketed information from the table of contents are content bullet points for the h3 section. They do not constitute a section in their own right and should not be used as headings.
  • Important terms shall be highlighted and lists shall be displayed correctly.
  • A line-break should be inserted every 4-5 sentences
  • The article should be written in your own words and not copied and pasted from other sources
  • Content must be written in informal "we" language that engages to the reader
  • Content should be written in a journalistic style as written by a human (informal tone, with personal pronouns, kept simple, active voice, with rhetorical questions and incorporate analogies and metaphors)
  • The article must maintain a keyword density of min 0.5% for the term "Tomate schneiden"
  • Repetition should be avoided so that each paragraph contains unique content
  • The article should not contain superfluous information about the word count, keywords or the like.
  • The main heading of the article ("Tipps und Techniken zum richtigen Schneiden von Tomaten") should not appear in the article
  • The article must not contain placeholders and should be ready for publication without any further editing

Now write an awesome formatted 1200-words article which is ready to publish and respond with 4429 completion_tokens

#

response is only about 750 words of content