Allow summarize, analyze, suggest title and taxonomy terms based on the rendered HTML of the entity

Created on 25 November 2024, 27 days ago

Problem/Motivation

At the moment "AI Content Editing Tools" module adds the form elements in the right sidebar with all actions that it can help editors with, including Summary of the text, Analysis of the tone, Suggestion of title and taxonomy terms, etc. But the actions are limited to the values from entity fields, and unfortunately entity reference (revisions)/paragraphs are not supported.

Steps to reproduce

  1. Create a content type with entity reference revisions fields.
  2. Enable ai_content module
  3. Observe that entity reference revision field is not possible to select in any tool from the module

Proposed resolution

For some actions like summary, it would be nice to have a summary of the whole entity, not just one field, for example for "Preview text" of the node. It should be based on the whole entity content, not just one field. The same would be for title and taxonomy suggestions, as well as analysis of the tone of the text. It is hard to support paragraph fields on its own, but a rendered output of the entity in some view mode could be a solution. Like Search API module has a plugin that renders the entity in a selected view mode for using the content in the index, the same was AI module can use this output as a source for content analysis, suggestions, etc.

Another improvement might be, that the actions not necessary should appear in the right sidebar and the output should not be copied and then pasted to the correct field. For example, if the action is to suggest title, then the button "Suggest title" should be near the "Title" field. Maybe it should be open the dialog where the additional settings are, so the user can select based on what the title suggestion should be created, it could be the same form element as it is now, but also include the "Rendered HTML" of the node (entity) option.

The same approach can be added to Summary feature. If there is a field "Preview Text" or "Summary" on the entity, that is used for teaser view mode, for example, then the button for Summary creation should be near it (for example how AI Image Alt text module does, the "Generate" button is near the "Alt text" input field).

Remaining tasks

Decide on the concept how this should be best implemented.
Provide MR

User interface changes

The AI buttons should be rather added to the fields that support the output of the AI, then to the sidebar. There should be an option to populate the target field right away (where possible and reasonable) and do not rely on the user to copy the output to the field.

Feature request
Status

Active

Version

1.0

Component

Other Submodules

Created by

🇩🇪Germany a.dmitriiev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @a.dmitriiev
  • 🇬🇧United Kingdom MrDaleSmith

    Just to note https://www.drupal.org/project/ai/issues/3484358 📌 AI Content needs refactoring to use plugins Active introduced the ability to select values from fields held within paragraphs. I'm not sure about the proposed solution to this - generating an AIO version of a full page may lead to confusion when it comes to copying the right bit of the AI content into the right fields on the edit page, and getting suggestion for (non-Paragraph) referenced entities could get very confusing.

    Not a maintainer: just throwing in my 2p.

Production build 0.71.5 2024