#Preventing repetition

1 messages · Page 1 of 1 (latest)

copper cove
#

Got any tips for preventing LLMs repeating themselves? I currently have:^

  • Tell it in prompt to never repeat (lol)
  • check if the reply exists in the prompt
  • Remove all special chars, remove spaces and newlines, make it lowercase, convert strange chars to ascii
  • calculate levenshtein distance from all previous messages
    And if any of those happen, it requests a new completion, until to doesn't. But still LLMs love repeating themselves so much
stray houndBOT
#

Hi @copper cove. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The knowledge sources provided do not contain specific information on preventing language models from repeating themselves. However, they do provide some general tips on optimizing the performance of LLMs (Large Language Models) which might be helpful.

For instance, one of the guides on OpenAI's platform discusses the importance of prompt engineering in optimizing LLMs for accuracy. It suggests that you can teach the model the style you're looking for by showing rather than telling. This might involve providing the model with examples of the kind of output you want, which could potentially help in reducing repetition.

Another guide discusses various ways to improve latency, including hard-coding, pre-computing, leveraging UI, and traditional optimization techniques. While these methods are not specifically aimed at reducing repetition, they might help in improving the overall performance of your LLM, which could indirectly help in addressing the repetition issue.

It's also worth noting that OpenAI's Moderation API can help reduce the frequency of unsafe content in your completions. While this is not directly related to repetition, it might be useful in improving the quality of the output generated by your LLM.

Finally, it's important to remember that LLMs are extremely powerful and versatile, and are sometimes used in cases where a faster classical method would be more appropriate. Identifying such cases may allow you to cut your latency significantly, which could potentially help in reducing repetition.

For more specific advice on preventing repetition in LLMs, you might want to consult OpenAI's documentation or reach out to their support team.

#

@copper cove kapa.ai is still learning and improving, please let us know how it did by reacting below