Gpt-35-turbo response comes with multiple blank lines \n\n

I have a prompt like"…, Format everything in Markdown and include the language used for code snippets in Markdown".
The response from it always come with multiple \n\n. Does anyone have idea about it? I do wanna keep blank lines (something it is necessary), but not multiple blank lines.

The example of response:
“Great! Practicing spoken English is essential for improving your fluency and confidence. Here are a few ways you can practice:\n\n1. Conversations: Engage in conversations with native English speakers or language partners. You can find language exchange partners online or join language exchange communities. Practice speaking about various topics and ask for feedback on your pronunciation and grammar.\n\n2. Language Apps: Utilize language learning apps that offer speaking exercises and conversation practice. Some popular apps include Duolingo, HelloTalk, and Tandem. These apps provide opportunities to practice with native English speakers or language learners from around the world.\n\n3. Speaking Clubs: Join local speaking clubs or language exchange groups in your area. These clubs often organize meetups or events where you can practice speaking English with other learners or native speakers.\n\n4. Shadowing: Listen to English audio or video recordings and try to imitate the pronunciation, intonation, and rhythm. This technique is called shadowing and helps improve your spoken English skills.\n\n5. Role-Playing: Role-playing scenarios can be a fun and effective way to practice speaking English. Act out different situations, such as ordering food at a restaurant or making a phone call, to simulate real-life conversations.\n\nRemember, consistency is key. Make it a habit to practice speaking English regularly, even if it’s just a few minutes each day. Don’t be afraid to make mistakes and embrace the learning process. Keep challenging yourself and you’ll see improvement over time. Good luck!”

If you need to keep the \n formatting a specific way you can take the reply and perform a regex on it or simply parse the string for \n\n pairs and replace then with \n the AI will often give variable output formatting so it’s best to sanitise it yourself externally.


Welcome to the OpenAI community @ivanliang0818

In your case the token [207] has to be set a negative logit bias.

1 Like