Repository navigation
Conversation
|
I noticed that Claude generated the NEWS entry with “Contributed by Stan,” but Stan is only a co-author in this PR, not the original author. I found that this is caused by the example NEWS entry including the "Contributed by ..." parts, so Claude want to use one, but It does not know the real name that the contributor wants to use here and may hallucinate one from history commits or it's training data. I updated the generated prompt to remove this part in the NEWS entry, now it works well on Claude. |
|
I'm not keen on this. I expect it will result in NEWS files that are far too verbose. |
|
This was discussed among core devs and the consesus is we'd much prefer writing a better instructions for contributors to understand and learn on how to write an effective and meaningful news entry, than to write how to prompt the LLM on how to do it. So instead of adding how to prompt your LLM to write the entry, I opened https://github.com/python/devguide/pull/1928/changes for the contributors, and I will link to this from blurb-it and add a tip box so it will be helpful. |
This adds a button that generates a prompt for users to copy into a web AI chat assistant, such as ChatGPT, Claude, Gemini or DeepSeek, to help write a NEWS entry.
When doing triage, I noticed that many new contributors have trouble writing a proper NEWS entry. This can be especially hard for people who are not native English speakers, or who are not familiar with RST and Sphinx markup. Reviewers often need to help fix the wording, the RST syntax, or the inline markup.
LLM (or AI) are good at this kind of writing task. But a direct LLM integration would be more complicated. We don't have free tokens for users, server-side AI calls could be abused and may introduce security issues. Let contributors to provide their own API keys are also not suitable, many contributor also may not have an API key.
Then I came up with an idea, it's a simpler approach that only generates a prompt. The prompt includes links to the issue, pull request, diff, changed files API, and guidance on how to write a NEWS entry. Users can paste it into a web AI chat assistant and use the result as a reference, which has a free usage quota.
I tested this with ChatGPT, Claude, Gemini and DeepSeek. For changes without very huge diffs, they can produce useful NEWS entry drafts as a reference.
The screen shot:
An generated prompt example for python/cpython#2210:
Generate result by Claude: