Add a Text Processing Skill
Updated
Overview
The Text Processing skill in Sprinklr AI Agent simplifies API responses by converting them into readable formats. It works with the API skill to handle large datasets and allows custom formatting to match user needs.
Key Benefits
Improved Readability: Converts complex API data into clear, easy-to-understand formats for quicker decision-making.
Customizable Formats: Allows tailoring of data presentation to fit specific business needs.
Faster, Accurate Responses: Speeds up processing and reduces errors, enhancing customer satisfaction.
Use Case: Customer Service Support with Text Processing Skill
In a customer service scenario, an agent needs to quickly interpret data from multiple APIs to assist a customer. Using the Text Processing Skill, the agent can receive API responses in a clear, structured format, making the data easy to understand and act upon.
For instance, when a customer inquires about their order status, the Text Processing Skill automatically formats the API response to present key information such as order details, shipping status, and expected delivery date. This streamlined presentation allows the agent to provide a faster, more accurate response, improving the overall customer experience by reducing response time and minimizing the risk of errors.
Steps to Create a Text Processing Skill
Refer to this article for detailed steps on adding a skill to an AI Agent.
On the Skills window, click Add Skill in the top right corner of the window and select Text Processing from the dropdown.
On the Gen AI Text Processing window, enter the skill Name and Description.
Guidelines for Skill Names:
Be Clear and Direct: Use action-oriented, unambiguous verbs.
Keep It Concise: Aim for 2-4 words that clearly describe the function's purpose.
Avoid Generic Names: Ensure the name is distinct from other functions.
Use a Noun or Output Indicator: Reflect the returned value (such as fetch_exchange_rate, not convert_money).
Guidelines for Skill Descriptions:
Start with a Clear Action Verb: Use verbs like "Retrieves," "Fetches," or "Generates."
Clearly State Function Purpose: Describe what the function does without assuming prior knowledge.
Mention Key Inputs: Include relevant inputs, but avoid specifying types (handled separately).
Specify Expected Output: Clarify what the function returns.
Keep it Concise: Aim for a description under 20 words.
In the System Prompt field, define the rules of text processing you want to implement, that is, how you would like the API response to be processed, including the constraints and requirements. Example prompt: Extract the company name and location from the API response and convert it into a readable format, and display the information in bullet points with smileys.
Enter the Gen AI Output Adapter under User Text.
User Text: It is the variable in which the API Output is stored. Please write the variable in the format-$ {variable}.
Enter the Output Variable to store and display the output.
Enable the Chunking toggle if required.
Chunking:
Enables users to set the Chunk Size and Chunk Overlap Size when processing large outputs.
Chunk Size: Defines the size of each chunk in tokens (Min: 1024, Max: 4096).
Chunk Overlap Size: Specifies the number of overlapping tokens between chunks to prevent data loss (Min: 256, Max: 820).
Enable the Extract Fields toggle if required.
Extract Fields: Allows users to extract specific variables from data for reuse in other assets or workflows.
Function Name: Name assigned to the variable extraction function.
Function Description: Area to describe the data mapping logic using a clear and structured prompt.
Configure Fields: Define multiple fields by specifying the Name, Description, Type, whether the field is Required (Yes/No), and if it supports multiple values.
Click Save to add the Text Processing Skill to your AI Agent.