Skip to content

Summarizers

Let’s get you started with AI in a Box summarizers. This guide will walk you through understanding summarizers and creating your own summarizers.

What is a Summarizer?

A summarizer is a way to create a few-shot to ensure a better formatted result. This is done by creating a few handcrafted examples to the large language model server. This allows the model to understand the context of the summarization and provide a better result.

Included Summarizers

AI in a Box comes with a few summarizers out of the box. These summarizers are designed to help you get started with your summarization tasks. The summarizers included are:

  • Incident
  • Change Request
  • Problem
  • Request
  • Request Item

If you look at them they should look similar to how email templates are created in ServiceNow. This is because they are designed to be used in a similar way.

Let’s look at two examples.

Incident

Incident Template
Number: {{number}}
Caller: {{caller_id}}
Channel: {{contact_type}}
Short Description: {{short_description}}
Assigned To: {{assigned_to}}
Assignment Group: {{assignment_group}}
Opened: {{opened_at}}
Resolved: {{resolved_at}}
Resolution Notes: {{close_notes}}
Duration: {{calendar_duration}}
Current State: {{state}}
Comments: {{comments}}
Work Notes: {{work_notes}}

Note the curly brackets, {{}}. These are used to find the current records fields. The value returned is the display value of the field.

Request Item

Request Item Template
Number: {{number}}
Item: {{cat_item}}
For: {{requested_for}}
State: {{state}}
Stage: {{stage}}
Approvals: {{__related__sysapproval_approver__sysapproval=[[sys_id]]__approver,state}}
{{__all_variables__}}
{{comments}}

You can see there’s something special going on.

Approvals has some long string, lets break it down.

1 2 3 4
{{__related__sysapproval_approver__sysapproval=[[sys_id]]__approver,state}}
  1. The __related__ is a special start string.
  2. The first part is the table name, sysapproval_approver.
  3. The second part is the query, sysapproval=[[sys_id]].
  4. The last part is the fields, approver,state.
  5. This tells the summarizer to return the approver and state fields from the table.

Next, {{__all_variables__}} is a special string that tells the summarizer to return all the variables from the request item.

You can see the code that parses this in the scribeAjax script include under the getSummarizerTemplate function.