- Issue created by @utkarsh_33
- ๐ฎ๐ณIndia kunal.sachdev
kunal.sachdev โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia utkarsh_33
So here's what the current state looks like:-
- The component creation and editing flow works fine(which includes the editing of the props for the components as well)
- The content creation flow also works 10/10 times and it creates the content correctly on any given topic and insert it correctly in the title field.
- The content editing flow only works 8/10 times which is causing this to push back a bit.I have attempted changing the prompt(and still trying it) so that before calling the editing tool it always get's the content related to the field(in our case it will always be title) that user want's to edit, but sometimes it fails.
I'll keep trying to fix the issue that's coming while editing the title and will post any update soon.
- ๐ซ๐ฎFinland lauriii Finland
@utkarsh_33 what are the prompts you are using for testing this?
- ๐ฎ๐ณIndia utkarsh_33
So here's the update on how am i testing it along with the results:-
Editing flow:-- Lengthen/shorten title's content:-Working as expected
- Fix grammar for title:- Working as expected
- Elaborate title:- Working as expected
- Rephrase title:- Working as expected without further questions to the user.
Content creation flow:-
- Create content on topic Drupal and insert in title field:- working as expected
- Add title on cricket/ Add content on title field for cricket :- working as expected (which was not working before)
- Generate title on topic Drupal:- working as expected
I am not adding the component creation flow as those are already working.
Re #6 : This problem of failing to edit content now is fixed and it almost(what ever i tested) works as expected.
It would be great if someone can test this MR now.
- ๐ฎ๐ณIndia utkarsh_33
There is a know problem in this which is this comment. It's because we only want the creation and editing flow to work with the xb_page entity for now as discussed with @lauriii.But the everting works as expected if we are on the xb_page entity.
Will try to get a workaround for this ASAP. - ๐ฎ๐ณIndia utkarsh_33
Handled the problem reported in #9 in this commit.
Now things are working as expected so marking it NR for an initial round of testing or Code reviews. - First commit to issue fork.
- ๐ฎ๐ณIndia utkarsh_33
Here is the video demonstrating how the title is generated based on the content present on the page.
- ๐ฎ๐ณIndia narendraR Jaipur, India
Tried to test it manually and most of the functionality seems to be working fine but when we create a component (Could you create a hero banner component with some text, call-to-action button, and a background colour red) and try to update the title (Update title to say 'Welcome to drupal') of that component, it does not work as request goes to this agent which is wrong.
- ๐ฎ๐ณIndia utkarsh_33
I have tested to best of my knowledge and everything seems to be working fine.Marking it NR.
- ๐ฎ๐ณIndia narendraR Jaipur, India
Manually tested it with @utkarsh_33 and functionality is working as expected. Moving it to RTBC.
- ๐ฎ๐ณIndia utkarsh_33
I have rebased it with the changes from HEAD.
- ๐ฎ๐ณIndia Akhil Babu Chengannur
๐ Generate content metadata using AI Active has already added a metadata generation agent for creating/editing page descriptions. So, couldn't we use the same agent to generate the title as well? Is it really necessary to create a new agent just for generating the title?
- ๐ฎ๐ณIndia utkarsh_33
This change is not related to this MR but since @AkhilBabu made a valid point that we don't need that if we are using it in default information so removing it as a part of this issue only.If someone thinks that it should be done in a follow-up then happy to do that as well.This does not affect any existing functionality so i thought it's better to do that in this issue only.
- ๐ฎ๐ณIndia Akhil Babu Chengannur
Thanks for the explanation @utkarsh_33. IMHO, this can be very simplified, in fact, merged with the metadata agent created in ๐ Generate content metadata using AI Active . That agent is solely for generating the description field value for the XB page entity type based on the page content or a given topic. The same agent could generate the title as well.
The get_entity_information tool can be updated to give the data in following format
entity_type: entity_id: entity_fields: title: description: content: {{ The layout we send from ui should go here }}
And the ai_agent_create_field_content, ai_agent_edit_field_content and ai_agent_add_metadata tools can be combined into a single tool
ai_agent_set_metadata
which accepts 3 arguments'title' 'description' 'entity_id'
and returns these details in yml format which can be sent to the UI.
We could use a prompt like
You are a Drupal agent specializing in generating SEO-friendly titles and descriptions for xb_page entity types. You are a looping agent. You can run multiple times until the task is completed.
You will be provided with the entity_type, id, field values of the entity user is trying to modify. The field values may contain information like title, description and content of the entity. The content section will include details of various components placed on the page along with the content in their props and slots. Your task is to generate a title or description suitable for the page as per the user's request.
If the entity_type is not xb_page, simply respond that I can only generate metadata for 'XB Page' entities.
If the request is for xb_page entity type, try to understand the user's intent. If the user is asking to create or update title/description for a specific topic, prioritize that over the field values in the entity. Otherwise, generate a suitable title/description based on the field values of the entity including the page content.
Use the set_page_metadata tool to set the description or title. Use the id of the xb_page entity as the 'entity_id' parameter
Not sure if I'm missing something here. Would love to hear your thoughts.
- ๐ฎ๐ณIndia Akhil Babu Chengannur
Created a followup issue โจ XB AI: Simplify metadata generation Active for #21
-
tim.plunkett โ
committed c2909f5e on 0.x authored by
utkarsh_33 โ
Issue #3532207 by utkarsh_33, kunal.sachdev, narendrar, akhil babu:...
-
tim.plunkett โ
committed c2909f5e on 0.x authored by
utkarsh_33 โ
Automatically closed - issue fixed for 2 weeks with no activity.