GPT-4o Enablement Can Result in Hyperlink Hallucinations #149

Open
opened 2026-02-16 00:17:00 -05:00 by yindo · 0 comments
Owner

Originally created by @adreichert on GitHub (Jun 13, 2024).

Originally assigned to: @hexapode on GitHub.

Summary

When GPT-4o mode is enabled LlamaParse "transforms the document into an image per page and uses OpenAI GPT-4o to convert it into Markdown." When no custom instruction is used, this causes the incorrect handling of hyperlinks:

  • Image conversion results in the loss of information about the destination URLs
  • GPT-4o then assumes all underlined text is a hyperlink inserts a usually-incorrect destination URL

We observed the following issues.

  • Links aren't correctly parsed. We observed the issue when underlined hyperlinks pointing to sign-in pages were replaced by links pointing to the top-level page.
  • Any underlined text turned into hallucination URLs. For example underlined Amazon would parse to [Amazon](https://www.amazon.com)
  • Some links were rendered empty Markdown links [text](#)

Workaround

In testing, adding instructions "Don't render Markdown links" prevented links from appearing in the parsed markdown.

Example

I parsed following PDF using the Web UI at https://cloud.llamaindex.ai/parse.
demo.pdf

  • Without custom instructions, the Youtube hyperlink, which isn't underlined, is ignored. Underline text is turned into links.
# DEMO

In the original PDF, the last word of this sentence is a link.

Underlined text is turned into links.
- [Amazon](https://www.amazon.com)
- [Wordle](https://www.nytimes.com/games/wordle/index.html)
- [Mark Zuckerberg’s Facebook page](https://www.facebook.com/zuck)
  • With the custom instruction, this was avoided
# DEMO

In the original PDF, the last word of this sentence is a link.

Underlined text is turned into links.
- Amazon
- Wordle
- Mark Zuckerberg’s Facebook page
Originally created by @adreichert on GitHub (Jun 13, 2024). Originally assigned to: @hexapode on GitHub. # Summary When GPT-4o mode is enabled LlamaParse "transforms the document into an image per page and uses OpenAI GPT-4o to convert it into Markdown." When no custom instruction is used, this causes the incorrect handling of hyperlinks: * Image conversion results in the loss of information about the destination URLs * GPT-4o then assumes all underlined text is a hyperlink inserts a usually-incorrect destination URL We observed the following issues. * Links aren't correctly parsed. We observed the issue when underlined hyperlinks pointing to sign-in pages were replaced by links pointing to the top-level page. * Any underlined text turned into hallucination URLs. For example underlined *Amazon* would parse to `[Amazon](https://www.amazon.com)` * Some links were rendered empty Markdown links `[text](#)` # Workaround In testing, adding instructions "Don't render Markdown links" prevented links from appearing in the parsed markdown. # Example I parsed following PDF using the Web UI at https://cloud.llamaindex.ai/parse. [demo.pdf](https://github.com/user-attachments/files/15814212/demo.pdf) * Without custom instructions, the Youtube hyperlink, which isn't underlined, is ignored. Underline text is turned into links. ``` # DEMO In the original PDF, the last word of this sentence is a link. Underlined text is turned into links. - [Amazon](https://www.amazon.com) - [Wordle](https://www.nytimes.com/games/wordle/index.html) - [Mark Zuckerberg’s Facebook page](https://www.facebook.com/zuck) ``` * With the custom instruction, this was avoided ``` # DEMO In the original PDF, the last word of this sentence is a link. Underlined text is turned into links. - Amazon - Wordle - Mark Zuckerberg’s Facebook page ```
yindo added the bug label 2026-02-16 00:17:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_cloud_services#149