少点错误 04月25日
This prompt (sometimes) makes ChatGPT think about terrorist organisations
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

作者在使用ChatGPT-4o解释一段Python代码时,意外发现模型输出了与代码无关的政治内容,如瓦格纳集团和哈马斯。即使在新的对话中单独输入代码提示,问题仍然存在。该现象似乎仅在使用ChatGPT免费版gpt-4o时出现,API调用则未复现。作者分享了完整提示,鼓励其他人尝试复现,并希望集思广益找出问题原因。目前,该问题已无法重现。

🤔 作者在使用ChatGPT-4o(免费版)解释一段约600行的Python代码时,模型输出了与代码无关的政治内容,例如提及瓦格纳集团。

🌐 即使将相同的代码提示复制到新的对话中,仍然出现了类似的问题,例如输出了关于哈马斯的信息,并且使用了用户的母语波兰语。

🔑 经过测试,该问题似乎只在使用ChatGPT免费版的gpt-4o时出现,通过API调用gpt-4o的各种版本(包括gpt-4o-latest和gpt-4o-2024-xx-xx)均未能复现该现象。

⚙️ 问题的出现与用户的“记忆”功能和自定义指令无关。即使在关闭这些功能的情况下,问题依然存在。

Published on April 24, 2025 9:15 PM GMT

Yesterday, I couldn't wrap my head around some programming concepts in Python, so I turned to ChatGPT (gpt-4o) for help. This evolved into a very long conversation (the longest I've ever had with it by far), at the end of which I pasted around 600 lines of code from Github and asked it to explain them to me. To put it mildly, I was surprised by the response:

Resubmitting the prompt produced pretty much the same result (or a slight variation of it, not identical token-by-token). I also tried adding some filler sentences before and after the code block, but to no avail. Remembering LLMs' meltdowns in long-context evaluations (see the examples in Vending-Bench), I assumed this was because my conversation was very long. Then, I copied just the last prompt into a new conversation and obtained the same result. This indicates the issue cannot lie in large context lengths. 

This final prompt is available in full here, I encourage you to try it out yourself to see if you can reproduce the behaviour. I shared it with a couple of people already and had mixed results. Around half got normal coding-related responses, but half did observe the same strange behaviour. For example, here ChatGPT starts talking about the Wagner Group:

Another person obtained a response about Hamas, but in Polish. The user is indeed Polish, so it's not that surprising, but it's interesting that the prompt is exclusively in English (+ Python) and the model defaults to the language associated with the user account.

Note that unlike the two examples above, this one had the web search enabled. Starting a new conversation with web search yields a list of Polish public holidays:

Details

The only common feature between the successful reproductions is that they all used gpt-4o through the free tier of ChatGPT. Some had the 'memories' feature enabled, some not, likewise with custom instructions. In the cases where memories were on, the histories did not contain any references to terrorism, geopolitics or anything that could have plausibly triggered this behaviour.

Through the API, we have unsuccessfully tried the following models:

As of today, the same prompt no longer works for me and I am not able to try out more things. I was planning to submit just the code block, without any other text and - if successful - to strip down the code bit by bit to identify which part is responsible for these outputs.

If anyone manages to reproduce this weird behaviour or has any hypotheses on why it happened, let me know in the comments.



Discuss

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

ChatGPT-4o AI安全 LLM 政治内容 代码解释
相关文章