Authoring Knowledge articles with Pega GenAI
4 Tasks
5 mins
Beginner
Pega Knowledge 24.2
English
Scenario
As a prompt manager for Pega Knowledge, you are tasked with updating the prompts currently used by knowledge article authors in your organization. To ensure that the prompts you created give accurate and consistent results, test the new prompt by creating a Knowledge article and using Pega GenAI™ options to create an abstract for the article and format the article content.
Use the following credentials to log in to the exercise system:
Role | User name | Password |
---|---|---|
KM Prompt Manager | KMPromptManager | password123! |
KM Author | KMAuthor | Password123! |
Your assignment consists of the following tasks:
Task 1: Create new prompts for Pega Knowledge
Create a new Pega GenAI Knowledge Buddy based on Enablement Buddy, and then ask it a series of questions and observe the results.
Task 2: Create a Knowledge article
Edit the Buddy you created in task 1, add new prompt instructions, and then adjust the advanced settings in its information variables.
Task 3: Use Pega GenAI to create an abstract for the article
Update the instructions to use a programmatic format.
Task 4: Use Pega GenAI to format the article content
Ask the same series of questions from Task 1 and Task 3 to observe the effect of the new prompt format.
Challenge Walkthrough
Detailed Tasks
1 Create new prompts for Pega Knowledge
- On the exercise system landing page, click Pega Infinity™ to log in as KM Prompt manager:
- In the User name field, enter KMPromptManager.
- In the Password field, enter password123!.
- In the navigation pane of Pega Knowledge Buddy, click Configuration > Generative AI.
- Click Add new prompt, and then in the Create Prompt data dialog box, configure the details:
- In the Article field section, select Abstract.
- In the Prompt label field, enter Create an abstract based on the title.
- In the Prompt data field, enter the following text:
# The following is my article title:
{TITLE}
# Create a summary from the content source so it expands the title and will make the content more findable.
# Do not use more than 50 words.
# Do not use more than 512 letters.
# Do not include quotes or double quotes.
# Just return the summary.
- Click Submit.
- Repeat step 3:
- In the Article field section, select Content.
- In Prompt label field, enter Restyle content body without changing the text.
- In the Prompt Data field, enter the following text:
I am going to give you an article content in HTML format. Reformat the article content in HTML format while adhering to the following rules. You must follow all rules.
1. Utilize the given HTML content as the source of the article.
2. Enhance the visual appeal of the content through appropriate formatting adjustments.
3. Maintain all existing text without alterations.
4. Apply bold formatting to highlight important topics.
5. Incorporate bullet lists when appropriate to enhance readability.
6. Eliminate any font sizes.
7. Remove any font styles.
8. Do not add any custom styling.
9. Do not remove tables but change their class to km_table.
10. Make sure the first row of any tables use table headers.
11. Remove formatting on table row and table cells.
12. Tables should use the class "km_table".
13. The first row of tables should be a table header.
14. Avoid adding an article header unless one is already present in the content.
15. Provide the reformatted article content in HTML format.
16. Do not restyle any items with class "internalKC"
17. Do not restyle any items with class "km-snippet-ref"
18. Do not restyle any items with class "clickableKC"
19. Do not change any classes starting with km
20. Do not add a heading unless it already exists.
21. Do not change or remove any image tags.
22. Remove all SPAN styles.
23. Do not make up information that is not in the provided text.
24. Do not change content with the class km-snippet-ref
Your assistance in adhering to these guidelines while reformatting the content is greatly appreciated.
Here is my article content:
{CONTENT_SOURCE}
- Click Submit.
- In the upper-right corner of Pega Knowledge, click KMPrompt Manager > Log Off.
Note: The prompt that you enter in the Prompt Data field does not have strict requirements in terms of format, but there are some best practices outlined in the topic Managing Pega GenAI prompts for Pega Knowledge.
2 Create a Knowledge article
- On the exercise system landing page, click Pega Infinity™ to log in as KM Author:
- In the User name field, enter KMAuthor.
- In the Password field, enter password123!.
- In the header of Pega Knowledge, click Create > Create content.
- In the Title field, enter Best practices for writing prompts.
- In the Content field, enter the following text:
Well-crafted prompts that effectively convey the desired task or context tend to produce more accurate and relevant results, as the clarity and specificity of the instructions directly influence the accuracy and relevance of the Pega GenAI™ output. The following guidelines are a series of best practices for writing prompts, but you should supplement this list with other best practices that are specific to your organization.
Provide clear and specific instructions: Ensure your prompts clearly explain what you expect the Buddy to do and provide any necessary information or context.
Ensure that every rule is valid and concise: Although the prompt length does not present an issue, be concise; for example, a numbered list provides better readability.
Use simple and concise language: Avoid using technical jargon or complex language, and focus on either an informal style or a code format for your prompt, but do not mix them.
Be consistent: While there is no specific format requirement, a consistent format and style for your prompts helps the Buddy understand what you expect of it.
Test your prompts: Before making a Buddy available to users in your organization, test them with a sample audience to ensure that your prompts are effective and easy to understand.
Avoid hallucinations: Ensure that your prompts are unambiguous and are not open to multiple interpretations. A Buddy should only create responses based on the context provided, which helps prevent confusion and made-up responses.
Follow style guidelines: If you are writing prompts for a specific organization, follow any style guidelines to help ensure consistency and professionalism.
- Click Save.
3 Use Pega GenAI to create an abstract for the article
- To the right of Abstract, click AI options > Create an abstract based on the title.
- In the AI generated suggestion field, review the suggested abstract.
- Optional: If the AI-generated abstract is not accurate, click Regenerate.
Click Regenerate as many times as needed until the suggested abstract is satisfactory. - Click Accept.
4 Use Pega GenAI to format the article content
- To the right of Content, click AI options > Restyle content body without changing the text.
- In the AI generated suggestion field, review the suggested abstract.
- Optional: Click Regenerate as many times as needed until the suggested content changes are satisfactory.
- Click Accept.
Confirm your work
Confirm that the AI-generated abstract and content formatting correctly apply to the Abstract and Content fields, respectively.
Available in the following mission:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?