Text diagrams generated by ChatGPT often have misaligned arrows / vertical positioning

I’ve noticed a recurring issue when ChatGPT generates text-based diagrams, especially during algorithm explanations.

The intended meaning is that j, i, and the arrows should align vertically with specific positions in the text below. However, the arrows or labels are often visually shifted, so the spatial relationship is incorrect.

This happens frequently with:

  • Pointer/index diagrams
  • Unicode arrows such as ↓, ↑, and →
  • ASCII-style algorithm visualizations
  • Strings or arrays where labels are positioned above specific indices

The main problem is that these diagrams depend on exact horizontal positioning. Even a shift of one character makes the diagram misleading or difficult to understand.

For example, if an arrow is supposed to identify the beginning of a substring, it may appear one or more positions to the left or right of the actual character it refers to.

Expected behavior:

Text diagrams generated by ChatGPT should preserve the intended column alignment so that labels, arrows, pointers, and other markers line up with the corresponding elements below them.

Actual behavior:

The diagrams often look approximately correct, but the vertical column alignment is incorrect. Arrows and labels may be shifted horizontally from the elements they are supposed to indicate.

I’m not sure whether this originates from the model generating the wrong number of spaces, from rendering/font behavior, or from a combination of both.

One possible rendering-related cause could be Unicode characters such as arrows being displayed using a fallback font with different glyph metrics from the primary monospace font. However, I have also seen cases where the generated spacing itself appears to be incorrect.

This is particularly noticeable in explanations of algorithms and data structures, where ChatGPT frequently uses text diagrams to show pointer positions, indices, substring boundaries, arrays, trees, or DP states.

It would be useful if ChatGPT could generate these diagrams in a way that guarantees consistent positional alignment, or if the rendering system could ensure consistent character metrics within preformatted text.

I can provide screenshots and additional examples if needed.