# Issue with AI-generated text: Concatenated words without spaces

**URL:** <https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799>\
**Category:** Prompting\
**Tags:** api\
**Created:** [July 14, 2023, 10:53am UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799 "2023-07-14T10:53:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![miryam.ychen](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/miryam.ychen/32/33866_2.png) [@miryam.ychen](https://community.openai.com/u/miryam.ychen)\
**Post date:** [July 14, 2023, 10:53am UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799/1 "2023-07-14T10:53:35Z")

</div>

I am using openAI 3.5 to generate content. Lately I am getting outputs with a lot of concatenated words with no spaces. Literally some full sentences/paragraphs with all the words concatenated, with no spaces. Plus some grammar problems as well. Does anyone have a solution to similar problems? Thank you in advance.

---

<div class="post-metadata">

**Author:** ![miryam.ychen](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/miryam.ychen/32/33866_2.png) [@miryam.ychen](https://community.openai.com/u/miryam.ychen)\
**Post date:** [July 14, 2023, 11:01am UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799/3 "2023-07-14T11:01:59Z")

</div>

it’s been happening in the last few weeks consistently. It started happening maybe 1 out of 10 times, and now it happens pretty much every single time.

---

<div class="post-metadata">

**Author:** ![smuzani](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/smuzani/32/1897_2.png) [@smuzani](https://community.openai.com/u/smuzani)\
**Post date:** [July 14, 2023, 11:46am UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799/5 "2023-07-14T11:46:50Z")

</div>

Could you post a sample of what caused it to generate this content? I haven’t seen it do this, but often things like this are related to the conversation.

Does it still happen if you start a new conversation as opposed to continuing an old one?

---

<div class="post-metadata">

**Author:** ![miryam.ychen](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/miryam.ychen/32/33866_2.png) [@miryam.ychen](https://community.openai.com/u/miryam.ychen)\
**Post date:** [July 14, 2023, 11:56am UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799/6 "2023-07-14T11:56:46Z")

</div>

Sorry it’s not about chatgpt, which I have not seen this happen neither. The problem I am having is with the content generated using OpenAI API calls. The prompt used is quite simple, for example: You are a professional content writer, write an article about Summer. Use 6 paragraphs with 150 words in each.

---

<div class="post-metadata">

**Author:** ![EricGT](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/ericgt/32/20571_2.png) [@EricGT](https://community.openai.com/u/EricGT)\
**Post date:** [July 14, 2023, 12:01pm UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799/7 "2023-07-14T12:01:50Z")

</div>

> [@miryam.ychen](#):
>
> The problem I am having is with the content generated using OpenAI API calls.

Kindly ensure that you pay close attention to the category and tags you have selected.

The category `Prompting` leads us to understand you are talking about a ChatGPT prompt.  
The tag `chatgpt` further enforces this idea.

I would suggest considering making adjustments to both of them in order to better align with your chosen topic.

---

<div class="post-metadata">

**Author:** ![\_j](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/_j/32/766292_2.png) [@\_j](https://community.openai.com/u/_j)\
**Post date:** [July 14, 2023, 7:38pm UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799/8 "2023-07-14T19:38:28Z")

</div>

The solution is likely to specify and reduce the temperature parameter. Temperature can cause non-ideal token generation. Start with 0.0 and work up from there to 0.6 if you need varied outputs to the same inputs. Reduced quality of generation (quantization?) already now gives you a simulation of higher temperature.

A few examples in earlier context is all it takes to cause unbreakable “training” with the way gpt-3.5 is now paying more attention to prior biases.

More training on code and function calling may have also increased the weight given to the next token possibility being a word without the preceding space included in its token, such as functionName that includes camelCase.

---

<div class="post-metadata">

**Author:** ![daniel.yakubov](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/daniel.yakubov/32/2817_2.png) [@daniel.yakubov](https://community.openai.com/u/daniel.yakubov)\
**Post date:** [July 14, 2023, 8:23pm UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799/9 "2023-07-14T20:23:35Z")

</div>

On top of the most recent reply about temperature, you may also want to reduce top\_p - if it is 1 it can lead to the consideration of highly improbable next tokens in outputs

---

<div class="post-metadata">

**Author:** ![miryam.ychen](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/miryam.ychen/32/33866_2.png) [@miryam.ychen](https://community.openai.com/u/miryam.ychen)\
**Post date:** [July 17, 2023, 8:26am UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799/10 "2023-07-17T08:26:27Z")

</div>

Yes, I should have used the API Tag here, but the category is correct, as it is related to prompt engineering.

---

<div class="post-metadata">

**Author:** ![miryam.ychen](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/miryam.ychen/32/33866_2.png) [@miryam.ychen](https://community.openai.com/u/miryam.ychen)\
**Post date:** [July 17, 2023, 8:30am UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799/11 "2023-07-17T08:30:15Z")

</div>

Thank you for the info, I have tried with different temp, I do notice that with lower temperature it happens less often, but it still happens. When I started the project with GPT 3.5 (back in April-May) it rarely happened, now it is just constantly happening. However, using the same prompts and keeping all the other parameters constant - changing only the gpt model to gpt-4, this problem disappears… feels like I am forced to upgrade the model now.

---

<div class="post-metadata">

**Author:** ![miryam.ychen](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/miryam.ychen/32/33866_2.png) [@miryam.ychen](https://community.openai.com/u/miryam.ychen)\
**Post date:** [July 17, 2023, 8:31am UTC](https://community.openai.com/t/issue-with-ai-generated-text-concatenated-words-without-spaces/298799/12 "2023-07-17T08:31:22Z")

</div>

Thank you for the info, I’ll try it 🙂
