Composite Skills
Updated
Overview
A composite skill lets you combine multiple individual skills into one simple workflow. This helps you make several function calls and perform multiple tasks in a specific order, making complex task execution easier and faster.
Consider the example - A customer service chatbot needs to gather customer details and send a follow-up email. Typically it would take 2 skills/ function calls -
Skill 1 - Use an API call to fetch customer details from the CRM system.
Skill 2 - Use the retrieved customer details to generate and send a follow-up email.
However, using composite skills you can create a single workflow to perform both these actions after every customer interaction.
Key Benefits
Incremental Skill Addition- You can incrementally combine multiple individual skills from a menu thereby creating a single workflow as per your requirement
Sequential Execution- A composite skill performs a series of tasks in a specific order. For example, you might start with an API call, then format the output into bullet points or paragraphs, and finally publish the results.
Efficiency Improvements- Before, you had to handle each task separately, making multiple calls to gather information, process data, and publish results, which took time. Now, you can just select the skills you need and run them all at once as a composite skill, saving you time and effort.
Steps to Add a Composite Skill
Under the Sprinklr Service tab, select Digital Twin Studio within Persona Apps.
On the Digital Twin Studio window, click the Digital Twins icon on the left side of the window.
Select the Digital Twin in which you want to add the Composite Skill. The selected Digital Twin window will open.
Navigate to Skills & Tasks and click View.
On the Tasks Manager window, click View Skills. Next, click Add Skill in the top right corner of the window.
Select Composite from the dropdown. Enter the Name and Description.
Select Skill Execution Behaviour as Standard (when you want the skills to be executed one after the other in the defined sequence) or Parallel(when you want all skills to be executed together). Select the skill to be added from the Skill Flow dropdown. For adding multiple skills, click the Plus icon and add.
Note: When executing tasks in parallel, users are limited to selecting two specific types of skills: API calls and text processing.
In standard scenarios, users can still utilize all types of skills sequentially.
After selecting the required skills, click Save to create a Composite Skill for your Digital Twin.
Practical applications of Composite Skills
1. Making Multiple API Calls Efficiently (using Parallel skill execution)
Using Parallel skill execution, instead of calling each API one by one, you can set up a composite skill that executes all API calls in parallel (instead of waiting for one call to be completed before triggering the next one).
Example - A travel booking platform needs to gather information from multiple sources to provide its customers with comprehensive travel options. This includes flight details, hotel availability, car rental services, and weather forecasts. Instead of sequentially calling each API, the platform uses a composite skill to run all necessary API calls in parallel.
Here’s how it works:
Parallel Execution: When the composite skill is triggered, it starts all API calls at the same time.
The API Calls:
API Call 1: Retrieve flight details from Airline API.
API Call 2: Fetch car rental options from Car Rental API.
API Call 3: Get hotel availability from Hotel API.
API Call 4 : Obtain weather forecasts from Weather API.
As each API responds, the data is collected and stored. This parallel processing means the total response time is much shorter. Instead of taking about one minute to complete all calls (if each takes 5 seconds), the composite skill can get all the results in about 10 seconds.
2. Summarizing Outputs from Multiple Systems (using Standard execution)
Using the standard execution, the API calls are executed in a serial or sequential manner.
Example - A logistics company needs to track and update the status of shipments in real-time. The process involves multiple steps, each dependent on the previous one. The company uses sequential API execution to ensure accurate and timely updates.. This composite skill manages the workflow and runs each task one after the other.
Here’s how it works:
Sequential Execution: The composite skill calls each system in sequential order.
Standard execution steps:
Step 1: Authenticate the user by calling the authentication API and receive an authentication token.
Step 2: Use the authentication token to call the shipment data API and receive the shipment data, including shipment IDs and current statuses.
Step 3: For each shipment, call the update status API and confirm the status update for each shipment.
Step 4 : Call the notification API to send an update to the customer about their shipment status.
After sequentially executing the data from each system, the composite skill stores the results in smaller, manageable parts. This helps in processing and storing the data efficiently before moving on to the next system.