ChatGPT often shortens its answers, making them less usable, as if it were intentionally programmed to do so

I give it 319 lines of HTML code and ask it to change some item styles and adjust their appearance. It returns only 95 lines as if that were the entire page, throwing out 60% of the content. I tell it, ‘Look, I gave you 319 lines, and you gave me back only 95. You fixed some things, but you ruined everything else.’ It returns 95 lines to me again.

This happens often—when the page becomes too big, it stops helping, and I have to send it piece by piece, then manually add back what it changed.

Why does ChatGPT struggle with a large number of lines and try to shorten them? Is it programmed to do that to save resources? Is there a way to bypass this? I understand that it’s trying to do as little work as possible, but when I ask it to create a menu with 20 elements and it gives me back just four, expecting me to add the rest myself—it’s frustrating. Does it really expect me to write 16 <li> tags manually?

I know I’ve gotten lazy, but still…"**

My question is: Why, when I give it 319 lines of code and ask it to make changes, does it not simply insert the changes and return the rest of the code in one piece? Instead, it shortens it as much as possible and expects me to write everything else myself. This only happens with large pieces of code; with short pieces, it works just fine.

How to Get Full Code Outputs Without Shortening

Here are some strategies that force ChatGPT to return all lines without missing content:

Explicitly Demand “Full Code Output”

Use a directive like:

*"You must return the ENTIRE modified code without removing any lines. *
Preserve all formatting, spacing, and structure. "

If you are unable to fit the full output, notify me instead of truncating it.

This helps override its summarization instincts.

Use Sectioned Modifications

If GPT still refuses to return the full page, split your request:

  • First, say: “Show only the modified sections of the code.”
  • Then, say: “Now, merge these changes into the full 319-line document without omitting anything.”

This forces it to apply edits in two logical steps instead of trying to optimize in one go.

Add “Preserve Unchanged Sections”

GPT often assumes that unchanged code can be ignored. Tell it:

“Do not summarize Include ALL unchanged sections of the original document. Return the full file without omission”

This makes it less likely to delete what it thinks is “redundant.

Use Smaller Chunks for Step-by-Step Edits

If the response is still cut off, break the task into smaller modifications:

  • Instead of one huge request, ask it to edit only 50-100 lines at a time.
  • Then say: “Merge all modifications into the full document without omitting any part.”

This method forces it to keep track of all changes.

Ask for a File Output Instead

If your plan is to copy-paste from ChatGPT, a better way is to ask it to generate a downloadable file:

"Write the updated 319-line HTML document into a .txt file.
Preserve all formatting and return it as an attachment."

This sometimes bypasses truncation since AI generated files don’t follow the same length restrictions as direct responses.


Wrapping it all up…

The model isn’t intentionally trying to be lazy or cut corners its default behavior prioritizes concise outputs, even when you don’t want that.
By giving explicit instructions and breaking tasks into logical steps, you can force it to respect the full document structure without cutting content.

Hope this helps! Has anyone else experienced similar issues? :rocket:

2 Likes

Is there a particular model that does a better job of not shortening the answers? Applying all of the bandaids suggested here isn’t ideal.

Yes, it’s name is Claude 3.7 Sonnet and he’s what OpenAI wishs they could create… Seriously, best AI coder yet…

2 Likes