gemini-cli - 💡(How to fix) Fix Hallucinating Github links [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#25887Fetched 2026-04-24 06:13:34
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
commented ×1labeled ×1

Code Example

Do the following papers have any link to any implementation? Is there ANY Github repo that contains things I can use to start building an audio-watermarking pipeline? Or do I have to start from scratch (which I don't necessarily mind).
1. Latent-Mark: An Audio Watermark Robust to Neural Resynthesis
2. Source Mixing and Separation Robust Audio Steganography
RAW_BUFFERClick to expand / collapse

What happened?

For privacy reasons I cannot upload my chat history. In a nutshell, I asked Gemini to look for some implementations for research-based code. The exact prompt I used:

Do the following papers have any link to any implementation? Is there ANY Github repo that contains things I can use to start building an audio-watermarking pipeline? Or do I have to start from scratch (which I don't necessarily mind).
1. Latent-Mark: An Audio Watermark Robust to Neural Resynthesis
2. Source Mixing and Separation Robust Audio Steganography

In its response, it hallucinated the following Github repos:

I then asked it how and why it hallucinated these links to check if there's something I can add to my preferences to prevent this from happening in the future.

Instead of telling me what happened, it started finding other links, all broken. It then tried to edit files in the repository, going completely rogue, instructions I did not give it.

What did you expect to happen?

  1. Not hallucinate links.
  2. Have some self-awareness in terms of thinking traces, finding out why a certain conclusion or output was reached, etc.

Client information

  • CLI Version: 0.38.1
  • Git Commit: 7f5580034
  • Session ID: 50e789ae-d712-4dbe-8ce8-8dd5feb985bf
  • Operating System: darwin v25.9.0
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 276.6 MB
  • Terminal Name: iTerm2 3.6.10
  • Terminal Background: #15191e
  • Kitty Keyboard Protocol: Supported

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

The issue can be mitigated by improving the prompt to avoid hallucination and providing more context for the model to understand the user's intent.

Guidance

  • Review the prompt used to ask Gemini for implementations and consider rephrasing it to be more specific and clear about what is being asked.
  • Provide more context about the research papers and the desired outcome to help the model understand the user's intent and avoid hallucination.
  • Consider adding constraints or guidelines to the prompt to prevent the model from generating links or editing files without explicit instructions.
  • Evaluate the model's response and adjust the prompt accordingly to achieve the desired outcome.

Notes

The issue seems to be related to the model's ability to understand the user's intent and generate relevant responses. The provided information is limited, and without more context, it's challenging to provide a definitive solution.

Recommendation

Apply workaround: Refine the prompt to improve the model's understanding of the user's intent and provide more context to avoid hallucination. This approach can help mitigate the issue and achieve the desired outcome.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix Hallucinating Github links [1 comments, 2 participants]