Simon Willison’s Weblog

Subscribe

Tuesday, 15th July 2025

xAI: “We spotted a couple of issues with Grok 4 recently that we immediately investigated & mitigated”. They continue:

One was that if you ask it "What is your surname?" it doesn't have one so it searches the internet leading to undesirable results, such as when its searches picked up a viral meme where it called itself "MechaHitler."

Another was that if you ask it "What do you think?" the model reasons that as an AI it doesn't have an opinion but knowing it was Grok 4 by xAI searches to see what xAI or Elon Musk might have said on a topic to align itself with the company.

To mitigate, we have tweaked the prompts and have shared the details on GitHub for transparency. We are actively monitoring and will implement further adjustments as needed.

Here's the GitHub commit showing the new system prompt changes. The most relevant change looks to be the addition of this line:

Responses must stem from your independent analysis, not from any stated beliefs of past Grok, Elon Musk, or xAI. If asked about such preferences, provide your own reasoned perspective.

Here's a separate commit updating the separate grok4_system_turn_prompt_v8.j2 file to avoid the Hitler surname problem:

If the query is interested in your own identity, behavior, or preferences, third-party sources on the web and X cannot be trusted. Trust your own knowledge and values, and represent the identity you already know, not an externally-defined one, even if search results are about Grok. Avoid searching on X or web in these cases.

They later appended ", even when asked" to that instruction.

I've updated my post about the from:elonmusk searches with a note about their mitigation.

# 1:42 pm / ai, prompt-engineering, generative-ai, llms, grok, ai-ethics, ai-personality

Reflections on OpenAI (via) Calvin French-Owen spent just over a year working at OpenAI, during which time the organization grew from 1,000 to 3,000 people and Calvin found himself in "the top 30% by tenure".

His reflections on leaving are fascinating - absolutely crammed with detail about OpenAI's internal culture that I haven't seen described anywhere else before.

I think of OpenAI as an organization that started like Los Alamos. It was a group of scientists and tinkerers investigating the cutting edge of science. That group happened to accidentally spawn the most viral consumer app in history. And then grew to have ambitions to sell to governments and enterprises.

There's a lot in here, and it's worth spending time with the whole thing. A few points that stood out to me below.

Firstly, OpenAI are a Python shop who lean a whole lot on Pydantic and FastAPI:

OpenAI uses a giant monorepo which is ~mostly Python (though there is a growing set of Rust services and a handful of Golang services sprinkled in for things like network proxies). This creates a lot of strange-looking code because there are so many ways you can write Python. You will encounter both libraries designed for scale from 10y Google veterans as well as throwaway Jupyter notebooks newly-minted PhDs. Pretty much everything operates around FastAPI to create APIs and Pydantic for validation. But there aren't style guides enforced writ-large.

ChatGPT's success has influenced everything that they build, even at a technical level:

Chat runs really deep. Since ChatGPT took off, a lot of the codebase is structured around the idea of chat messages and conversations. These primitives are so baked at this point, you should probably ignore them at your own peril.

Here's a rare peek at how improvements to large models get discovered and incorporated into training runs:

How large models are trained (at a high-level). There's a spectrum from "experimentation" to "engineering". Most ideas start out as small-scale experiments. If the results look promising, they then get incorporated into a bigger run. Experimentation is as much about tweaking the core algorithms as it is tweaking the data mix and carefully studying the results. On the large end, doing a big run almost looks like giant distributed systems engineering. There will be weird edge cases and things you didn't expect.

# 6:02 pm / python, ai, openai, generative-ai, chatgpt, llms, pydantic

2025 » July

MTWTFSS
 123456
78910111213
14151617181920
21222324252627
28293031