Repository navigation
Excerpt Generation #11
Description
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
- 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
excerptfield.
- 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.
- 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?
- 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.
- 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."
- 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
Version 2
Props to Lina Wiezkowiak for the product definition, Rachael Cortellessa for the designs, and Darin Kotter for technical review of both.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
nholzmann commentedon Aug 26, 2025
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:
Both approaches would address the cost concerns while maintaining the feature's accessibility for users who want it.
nholzmann commentedon Aug 26, 2025
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:
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.
swissspidy commentedon Aug 26, 2025
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)
Ref34t commentedon Aug 27, 2025
@nholzmann's cost concerns are valid. A progressive approach could work well:
karmatosed commentedon Sep 8, 2025
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?
karmatosed commentedon Sep 23, 2025
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.
Unique feedback to consider
These weren’t agreed upon points but worth considering as strong feelings from individuals with valid reasons.
New features
Features people would like considered to be added.
Thank you everyone who gave feedback. @jeffpaul hope this helps. I would recommend this moves to iterations now with design.
3 remaining items
jamesmorrison commentedon Nov 24, 2025
@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!
Merge pull request #11 from westonruter/feature/add_better_prompt_tip