Skip to content

Excerpt Generation #11

Closed

Description

@jeffpaul

Feature Overview & Value

Summary:

This feature generates a concise, AI-powered summary of a post or page, designed to populate the native WordPress excerpt field. It provides a clear, editable preview of the content that can be used in archive views, RSS feeds, search results, and SEO contexts. The generation is triggered automatically and outputs a single, neutral-toned summary that the user can accept or revise.

Why it matters:

Many WordPress users don’t create custom excerpts, leading to empty archive previews and poor search visibility. At the same time, writing a good summary takes time and effort—especially when the purpose of the excerpt isn’t always clear to users. This feature solves that by giving users a high-quality default they can use as-is or refine, supporting both usability and discoverability without disrupting content workflows.

Use Cases:

  • A first-time user isn’t sure what the excerpt field does and benefits from a default that "just works."
  • A user wants to quickly create a summary that works across feeds and search.
  • An editor wants a structured, readable preview they can tweak for SEO or clarity.

User Interaction Flow

Overview:

The excerpt is generated automatically when there is sufficient post or page content, reducing friction for the user and ensuring a functional summary is available even if the excerpt field is never manually touched. Users retain full control to edit, replace, or delete the AI-generated excerpt.

Behavior Details

  1. Automatic Generation
  • When post or page content reaches a minimum threshold (e.g., ~100 words), and no excerpt exists, the system automatically generates one using AI.
  • Do we regenerate this excerpt as the content changes? If we want to auto-generate this, we should do that at publish time so we're only having to process once.
  • Each request costs money so we need to determine if having this automatically run is desired. Someone may want more control over when (or if) this is triggered.
  • Its also worth considering adding this to the PrePublish Panel (if we don't auto-generate an excerpt), prompting a user to generate an excerpt if none exists yet
  • The excerpt is placed into the standard excerpt field.
  1. Visibility & Editability
  • The excerpt appears wherever the field is normally surfaced (e.g., in the sidebar under "Excerpt").
  • The user can edit the AI-generated excerpt directly, like any manually written summary.
  1. Optional Regeneration (non-blocking)
  • A small "Regenerate excerpt" or "Replace with new suggestion" link may be included below the field for users who want a new draft.
  • Open to discussion as to whether this is required for MVP or should be a potential enhancement post-MVP?
  1. Persistence and Overrides
  • If the user edits or deletes the excerpt, their version is preserved and not overwritten.
  • Regeneration is only triggered again if the user explicitly clears and requests it.
  1. Error Handling
  • If the AI call fails, the excerpt field remains empty with no user disruption.
  • Optionally display fallback message: "Couldn’t generate excerpt. You can write your own or try again later."
  1. Length and Format:
  • Target 1–2 sentences or approximately 30–60 words.
  • Clean plain-text output optimized for readability in archive feeds and search previews.
  • No list formatting, markdown, or structured HTML.

Editability and Control:

  • The excerpt is always editable in the standard excerpt field.
  • The AI-generated version serves as a starting point, not a lock-in.
  • No tone or style customization is offered in the MVP to keep the experience simple and focused.

Technical Requirements (High-Level)

AI Input Requirements:

  • Title (as ensuring there’s no duplication as excerpts are often shown on the frontend right after a title)
  • Full post or page content
  • Truncated to ~500–1000 words if necessary to stay within token limits
  • No user input or configuration required

AI Output Requirements:

  • One suggested excerpt string
  • Must be plain text
  • Should target 30–60 words or 1–2 sentences

Trigger Conditions:

  • Automatically triggered once post/page content reaches a minimum threshold (~100 words) and no excerpt exists
  • Only triggered once per post unless the field is cleared and regeneration is requested manually

Fail States & UX Expectations:

  • If the AI response fails, nothing is written to the excerpt field
  • Optional fallback message appears to inform the user without blocking them

Model Agnosticism:

  • Should work with any model integrated via the AI Services plugin (OpenAI, Claude, self-hosted, etc.)

Privacy & Config:

  • API keys handled via AI Services
  • Content is sent only during generation; no persistence or telemetry is stored without user consent

Extensibility Notes:

  • Regeneration capability can be added later
  • Future versions may support excerpt style presets or goal-oriented summarization

Design mockups

Version 1

Image

Version 2

Image

Props to Lina Wiezkowiak for the product definition, Rachael Cortellessa for the designs, and Darin Kotter for technical review of both.

Activity

  1. added this to the milestone on Aug 26, 2025
  2. moved this to In discussion / Needs decision in WordPress AI Roadmapon Aug 26, 2025
  3. nholzmann commented on Aug 26, 2025

    @nholzmann

    Regarding the automatic generation behavior - I think we need to provide users more control over when this triggers. Since each API request has a cost, we should consider either:

    1. A plugin settings option to enable/disable auto-generation entirely. (Recommendation would be auto-generation would be off by default.) This would let site admins control whether excerpts are generated automatically or only on-demand, helping manage API costs and giving teams more control over their content workflow.
    2. An inline trigger icon (as an alternate variant; perhaps if auto-generation is off) next to the excerpt field - similar to how other AI writing assistants work. This would make it explicitly user-initiated while keeping the UI clean and discoverable. The icon could appear when the excerpt field is empty and content meets the minimum threshold.

    Both approaches would address the cost concerns while maintaining the feature's accessibility for users who want it.

  4. nholzmann commented on Aug 26, 2025

    @nholzmann

    Strong +1 on adding this to the PrePublish Panel. If we're not auto-generating excerpts by default, the pre-publish check would be a perfect compromise:

    • It catches the common case where users forget to add an excerpt before publishing
    • It's non-intrusive but ensures content has proper excerpts for SEO/feeds
    • It gives users a clear decision point: 'Generate excerpt', 'Write my own', or 'Publish without excerpt'
    • It only triggers once at the most relevant moment (right before publish)

    This would be especially valuable for first-time users who might not even know the excerpt field exists or why it matters. The pre-publish prompt could include a brief explanation of why excerpts improve content discoverability.

  5. swissspidy commented on Aug 26, 2025

    @swissspidy
    Member

    In version 1, why is excerpt generation tied to featured image generation? As I user I don't necessarily want to do these in sequence, nor do I think the image should be based off the excerpt. It should be based off my whole post (content + title + metadata)

  6. Ref34t commented on Aug 27, 2025

    @Ref34t
    Contributor

    @nholzmann's cost concerns are valid. A progressive approach could work well:

    1. Manual trigger by default - Icon next to excerpt field
    2. Smart auto-detection - Only suggest when excerpt is empty AND content > 100 words
    3. User preference - Setting to enable auto-generation for power users
  7. karmatosed commented on Sep 8, 2025

    @karmatosed
    Member

    To me, this feature needs to be easy and where you need it. I wonder if that is the case right now though in the mockups and let me unpack that.

    I would like simply to see where you would expect the excerpt to be typed, this option. Unless I am mistaken this is in v1 showing it ‘on’ by default. I can see that as an option but it reads as only AI. I would also go one further. Why not in that box show a generated excerpt and allow it to be removed or used? I know this needs testing, but perhaps it could be a happy delight for some or a setting at least. It might not be what everyone wants at all.

    I would love to explore not using a modal. To me, the more we mesh this within the existing interface the better. What could that look like?

  8. karmatosed commented on Sep 23, 2025

    @karmatosed
    Member

    I have tried to synthesis this feedback into some next steps, hope this helps at least find a direction through.

    Overall

    These are points raised by more than one person.

    • More control would be good to provide and was noted across a few pieces of feedback. This included on/off settings for auto-generation. A point was made about API costs and giving teams control. This might be useful to consider across other implementations.
    • Adding this to the pre-publish panel was strongly agreed on.
    • Modals again were called out as perhaps not the best option over meshing into the existing interface, after all there are excerpts already.
    • Perhaps the best flow is simply to focus on pre-publish and/or in the excerpt itself, then consider other approaches after v1.

    Unique feedback to consider

    These weren’t agreed upon points but worth considering as strong feelings from individuals with valid reasons.

    • It was called out it appears that expert generation in v1 is tied to image generation. This feels a strange link and it should be based off whole post.
    • One piece of feedback was raised about by default auto-generating in the excerpt box and seeing what happens with that, this would avoid the modal.

    New features

    Features people would like considered to be added.


    • An inline ’icon’ as a variant, next to excerpt field. Although this again brings up the othering of ‘AI’ with the sparkles to activate. It shouldn’t go against the how can this be integrated feedback.

    Thank you everyone who gave feedback. @jeffpaul hope this helps.
I would recommend this moves to iterations now with design.

  9. added
    Needs DesignTo have specific design work done
    and removed
    Needs Design FeedbackTo get input as to whether needs design or feedback on existing work
    on Sep 23, 2025
  10. 3 remaining items

  11. jamesmorrison commented on Nov 24, 2025

    @jamesmorrison
    Contributor

    @dkotter @jeffpaul I've created a PR that adds the backend functionality for generating excerpts; like Titles this offers 3 options by default (this might need adjustment).

    I've added unit tests but noted that several of these are skipped here - the API credentials are missing here, so I've tested this with CURL / Postman and added screenshots showing the responses I received.

    Please let me know if there are any questions or feedback here!

  12. moved this from In discussion / Needs decision to Needs review in WordPress AI Roadmapon Nov 25, 2025
  13. moved this from Needs review to In progress in WordPress AI Roadmapon Dec 1, 2025
  14. modified the milestones: 0.1.1, 0.2.0 on Dec 2, 2025
  15. moved this from Done to Needs review in WordPress AI Roadmapon Dec 10, 2025
  16. moved this from Needs review to Done in WordPress AI Roadmapon Jan 13, 2026
  17. added a commit that references this issue on Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions