- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
an hour ago
This is a personal experiment with ServiceNow’s Build Agent for the #BuildWithBuildAgent challenge. What follows are my field notes and findings.
Cue the rain-soaked alleyway and a detective with too many questions. The narrated version sets the scene before we dive into the technical case file.
Prompt
My prompt for my final run through with the Build Agent are in italics below. While I entered all of the text below in one prompt, I have divided it up to call out my intentions with the different parts of the prompt.
Describe the application - You can provide more details in this part of the prompt if you want to get down to the table and specific fields you're looking for but I opted not to do so in this case as I wanted to see what the AI came up with first, knowing I can probably refine this after with little difficulty
Build an application to manage a gift exchange event (like Secret Santa). The application should be flexible enough to run multiple gift exchange events (multi-tenancy).
The application should have user-onboarding features: Interested participants should be able to sign up. The sign up form should include some questions about the participants preferences (as example: brand names, colours, hobbies) so that gift givers have some idea of what to get.
The app should offer a choice of matching algorithms so that event organizers can choose how participants will be matched up with each other.
Assume that both event administrator and participants are users in the platform and exist in the Users table. Reference the Users table where appropriate and leverage any data already stored there like name and email address without duplicating the data.
Specify the roles for the application - I found that this was helpful in refining the roles and ACLs created as I didn't specify this in my first run though, and the roles and ACLs generated were not as I had expected.
The app should have two roles: event administrator and gift-exchange participant. Event administrators should be able to create, read, and edit gift their own exchange event. Event administrators should not be able to view or edit another administrator's gift exchange event. Participants should be able to sign up for one or more gift-exchange events, and see and modify their own sign-ups and their own preferences. Participants should not be able to see other participant information. The only information a participant can see are the preferences of another participant that they have been matched to. Event administrators should be able to see the details of all the participants that have signed up for their event.
Specify the notifications/communication required - This was another lesson-learned from my first run through of prompting the Build Agent. Don't forget to include request for any other artifacts that you may want. Notifications are just one example.
The app should include email notifications for participants - for example, a confirmation when they sign up to an event, a notification if they've been matched with a recipient, reminders for when gifts are due
Specify the user interfaces required - I had this prompt in some of my trials (in an attempt to save on the number of prompts) but in the end excluded it as I found the Build Agent really struggled to create a fully functional React UI in under ten prompts.
Once you've created the application tables and logic, create React User Interfaces (UI) for both the administrator persona and the participant persona. The UI should allow each persona to perform the all actions available to their role. The UI should be accessible and WCAG 2 compliant.
Generate Demo Data - Yet another lesson learned from previous run-throughs with the Build Agent: it only generated demo data for one of the tables it created for my application and not all of them until I prompted it to.
Include demo data for all tables.
The Application
The Build Agent created 167 Application Files [sys_metadata] in 14 different classes.
I didn't specify the table structure and fields but was impressed with the fields that it came up with, including some fields I hadn't thought of initially, and the options for the drop down choice fields. But, perhaps because I didn't ask, the AI didn't think to arrange the default form layout in an intuitive way (eg. note the placement of Registration Start Date & Registration End Date).
Also interesting were the Business Rules and System Properties it thought of on its own as I didn't specifically prompt for them.
The Build Agent also said it would generate Script Includes for the matching algorithm, but when I looked at the Script Includes it created, the complex code for the participant matching algorithms were not there and definitely no functions matching the choice options it provided in the event form.
Other Observations
The first few times I ran through the Build Agent, it created a beautiful React UI for the application but the UI never worked. On one attempt, I had to use 3 prompts to fix an issue with the UI and ran out of prompts before it was fully functional. On another attempt, I had to keep prompting it to add functionality that was missing from the UI, and found the UI changing somewhat drastically and in unexpected ways as it tried to build the new functionality into the UI. Even then, it was never fully functional before I ran out of prompts.
One another run-through, I asked the Build Agent to create a Workspace instead. It took 5 prompts with 3 'continue' prompts to get it to a state that it thought was complete and the result was a React UI page rather than the platform Workspace that I had hoped for.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Watch me lose my patience with my AI sidekick...
Create a workspace for the Event Administrator persona. While you're at it, connect the demo data together so a sample participant is participating in an actual event that is available in the system.
No. I don't need updates on the scripts or the application design. I need User Interfaces created as a Workspace in the platform. Create the Workspace.
Yes, continue and fix the remaining build errors, deploy the complete workspace, and test the full functionality.
Continue
Continue
Continue. Do not prompt me again until the workspace is completed and deployed.
The outcome 🫠
