More flexibility in the Content Summarization experiment#510
Conversation
…oup block with paragraphs inside. This allows more control over the contents, for instance if you want bullets
…d those in the editor and front-end
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #510 +/- ##
=============================================
+ Coverage 67.23% 67.30% +0.07%
- Complexity 1054 1055 +1
=============================================
Files 65 65
Lines 5024 5026 +2
=============================================
+ Hits 3378 3383 +5
+ Misses 1646 1643 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Updated both of these (as well as cleaned up some outdated and/or unneeded docs) |
I've tweaked it a bit and seems better to me now though still not always perfect, open to any suggestions there, noting we can't fully control what the LLM decides to return. |
jeffpaul
left a comment
There was a problem hiding this comment.
Seems to work better with copy output now, thanks!



What?
Instead of using a paragraph block variation, use a group block variation to output our summary. Add some basic styles to make a clear distinction between this section and the rest of the content.
Why?
At the moment the Content Summarization experiment outputs a summary within a paragraph block variation. This means if you want a summary that is multiple paragraphs or a bulleted list instead of paragraphs, you'd have to manually do that and then you lose the connection to the AI Summary block variation. This breaks styling and breaks any regeneration of the summary.
A better approach is taken in this PR where we use a group block variation instead, which allows you to have any number of blocks within it. So we output the summary as one or more paragraphs but then a user can convert those to list items, add extra paragraphs or add a heading to the section. And none of these changes lose that AI Summary block connection.
We could look to add additional settings in the future to output as list items instead of paragraphs but for now, this at least allows users to do this themselves.
Also adding in some basic styling, both in the editor and the front-end, to make a clear distinction between these summary section and the rest of the content. Kept this really basic so sites can override those styles easily with their own.
How?
Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Sonnet 4.6
Used for: Review various approaches (block variations, patterns, custom blocks) and putting a plan together once we settled on an approach. It executed on that plan and then refining and testing done by me
Testing Instructions
npm i && npm run buildGenerate Summaryblock in the sidebar and click itRegenerate Summarybutton and ensure that overwrites the block. You will lose any edits you madeScreenshots or screencast
Changelog Entry