Solution Overview for Business Users / Version 2512.0
Table Of ContentsPlaybooks are a way to teach KIO how to perform complex tasks. They are written in natural language and can be easily extended or modified. KIO loads playbooks at runtime, so you can add new playbooks, or modify existing ones, without having to restart and/or redeploy KIO. You can think of Playbooks as a no-code scripting tool that allows you to guide KIO through a complex workflow.
In general, if you find yourself writing more prompt text than you'd like, or if KIO often misunderstands you, unless you're very specific, that's not ideal. But it's a good sign that you might want to create a Playbook for that task.
A playbook's structure is rather simple: It has a id, a name, a description, and a steps section. The name is just for your information, the description is what KIO will look at when choosing one or more appropriate playbooks given the user's input, and the steps section is the detailed explanation of what you want KIO to do.
Look at one of CoreMedia's default playbooks (optimize-seo.md):
id: @coremedia/optimize-seo name: Optimize Metadata for SEO description: Use this when the user asks to generate and/or optimize SEO (metadata) steps: * Check if the content item you want to optimize inherits from `CMTeasable` (typical examples are `CMArticle`, `CMChannel`, and others). If it doesn't, then tell the user the type of the actual content item, and that it is not sensible to generate SEO metadata for it. * Otherwise, do the following: * For property `htmlTitle`, create plain text that can be used as "HTML title" in a web page with a maximum length of 100 characters. * For property `htmlDescription`, create plain text that can be used as "HTML meta description" in a web page with a maximum length of 400 characters. * For property `keywords`, create a comma-separated list of lower-case keywords with maximum length of 900 characters. * At the end update the content.
Example 12.1. Example playbook: optimize-seo.md
This is an example of a simple playbook that extracts good metadata like htmlTitle
and keywords by looking at a content item's "payload", and applies them to the
same content item.
When KIO has this playbook available, you can be rather short in your prompt:
> optimize SEO for this
< To optimize the SEO for the content, I'll first check if it inherits from `CMTeasable`. If it does,
I'll proceed to generate the HTML title, meta description, and keywords. Let's start by examining
the content to determine its type.
< The content item [Annual Report on fiscal 2020 - 7128](http://studio/content/7128) is of type
`CMArticle`, which inherits from `CMTeasable`. I will proceed to optimize the SEO metadata.
### SEO Metadata Optimization
- **HTML Title**: 'Annual Report 2019: Financial Highlights & Insights'
- **HTML Description**: 'Explore the Annual Report on the fiscal year 2019, featuring insights from
our press conference and calls with investors and analysts.'
- **Keywords**: 'annual report, fiscal 2019, financial achievements, press conference, investor
insights, analyst conference, company report, financial overview'
I will now update these properties in the system.
< The SEO optimization for the content [Annual Report on the Fiscal Year 2019 - 7128]
(http://studio/content/7128) has been successfully completed. Here are the updates:
- **HTML Title**: Annual Report 2019: Financial Highlights & Insights
- **HTML Description**: Explore the Annual Report on the fiscal year 2019, featuring insights from
our press conference and calls with investors and analysts.
- **Keywords**: annual report, fiscal 2019, financial achievements, press conference, investor
insights, analyst conference, company report, financial overview
If you need further adjustments or have any other requests, feel free to let me know!Example 12.2. SEO optimization prompt example
As you can see, KIO is internally prompted to explain the steps that it plans, and its internal reasoning, in rather great detail to the user. This seems sensible to ensure that the user understands what KIO is doing, and why it is doing it.
KIO will examine the description of the playbook to pick the correct playbook(s). Therefore, it's good practice to explain in reasonable detail what the playbook does, and how it relates to a certain user's intent. It has been proven to work well to also give a few concrete examples of what the user might ask. This is like a prompting best practice called few shot prompting. Here's an example of a good playbook description:
Use this when the user asks to assign taxonomy tags to a content item. Typical user prompts are "assign tags", "tag this content", or similar.


