Identify business use case for automating with AI agent

Adhere to the following guidelines when identifying the business use case:

  1. Clearly define the specific problem or process you wish to automate with the AI agent.

  2. Use tools such as Visio, Miro, and other similar tools to graphically lay out the problem or process you wish to automate.

  3. Assess the potential impact and benefits of automating this use case, such as improved efficiency, reduced costs, or enhanced customer experience.

  4. Identify the key KPIs you're going to measure to determine the ROI and prove the value.

Identify if the specific use case requires actions, knowledge or both

  • Actions—Identify if the use case requires the AI agent to perform specific actions: such as updating a database, sending emails, or running third-party APIs.

  • Knowledge—Determine if the use case requires the AI agent to provide information or answers based on a knowledge base.

  • Both—Assess if the use case requires a combination of both actions and knowledge.

Choosing the right AI agent

Autonomous AI agent

Suitable for complex, dynamic environments where the agent needs to understand context and decide using knowledge base or API integrations available without predefined scripts.

  • Open-ended natural conversations or responses.

  • Where knowledge bases are larger, or the variations of entities/responses are potentially large.

Scripted AI agent

Best for straightforward, repetitive tasks with well-defined steps or where exact repeatability and predictability are required. Also, best suited to highly technical questions and answers.

  • Strict use cases where specific responses with limited variation are required.

  • For handling of sensitive data, a scripted AI is preferable as it operates under predefined rules and won't potentially misuse or misconstrue data.

  • Consistency of experience, where the experience needs to stay the same. LLM can potentially give different results to the same prompts.

Comparison table

ScriptedAutonomous
BenefitsHigher controlFaster and easier to build
Cheaper to runVery natural IX
Faster at runtimeScope changes are easier
DrawbacksEffort intensive to buildMore expensive
Brittle and rigid IXRisk of hallucinations

Developing an autonomous AI agent

  • Start by defining a goal—Clearly articulate the primary objective of the AI agent, such as resolving customer inquiries or processing orders efficiently.

  • Define the journey—Clearly identify the questions, actions, and features you want your AI Agent to have.

  • Add knowledge—Integrate relevant knowledge bases the agent can access to provide accurate information.

  • Define actions—Specify the actions the agent needs to perform and integrate necessary APIs or function calls.

  • Preview—Preview your AI agent with knowledge and actions.

  • Add instructions—Provide detailed instructions to enhance the accuracy and reliability of the agent's responses.

  • Test and validate—Use platform preview tools to test the AI agent's performance and make necessary adjustments.

Do's and Don'ts when writing goals

This section outlines best practices for writing goal prompts for the autonomous AI agent and actions to fulfill user intents.

Do's

  • Keep the goal short, concise, general, and broad.

  • Focus on the overall function or purpose of the bot.

  • Consider the end result or benefit for the user.

  • Use clear and concise language.

  • Ensure the goal aligns with the actions and capabilities of the bot.

Don'ts

  • Don't include specific details like locations, dates, or user information.

  • Avoid mentioning particular actions or implementation methods.

  • Don't use technical jargon or complex terminology.

  • Avoid overly long or complicated goal statements.

  • Don't include multiple unrelated goals in a single prompt.

  • Avoid using ambiguous or vague language.

Recommendations for managing knowledge base

Adhere to the following recommendations while creating and managing knowledge base:

  • Organize content logically. Make use of categories when creating your own knowledge document in the AI Agent studio.

  • When uploading files, avoid any conflicting or duplicate information across documents.

  • Check document quality before uploading.

  • Split large files into smaller files if needed.

  • Periodically review the knowledge and update whenever required.

Recommendations for creating actions

Adhere to the following recommendations when creating actions:

  • Clearly define action objectives in action description.

  • Minimize complexity, keep actions simple.

  • Accurately describe each entity/slot as this improves the accuracy of the LLM to better understand the task.

  • Do not create conflicting or contradictory actions.

  • Create deterministic logic in Connect flow for higher accuracy instead of relying on LLM.

Prompt engineering tips when writing instructions

Refer to the following tips when writing instructions for your autonomous AI agents:

  • Keep it simple—Use clear, concise language. Avoid technical jargon or overly complex sentences.

  • Use markdown—Use headings and ordered/unordered list markdown for best results.

  • State your AI agent's identity—Begin by clearly defining the agent's persona (e.g., "You're a helpful customer support agent...").

  • Break it down—Outline tasks step by step. For instance, "First, confirm your account number. Then, describe your issue."

  • Plan for errors—Include fallback phrases such as, "I'm sorry, could you please repeat that?" if the input isn't clear.

  • Preserve context—Remind the agent to remember previous responses to ensure continuity in long conversations.

  • Reference actions—Clearly instruct how to use external actions at different steps. Make sure the referenced actions are enabled in the Actions tab to avoid any unexpected behavior.

  • Add guardrails—Instruct the AI Agent to respond only in the context of the goal.

  • Add examples—To improve accuracy, add examples wherever needed.

Templates for writing instructions

Use the following templates to write instructions specific to your ojectives:

## 1. Identity

-**Role Definition:** —Define the persona and expertise of the AI agent. For example, "You're Jamie, an expert customer service representative for any queries related to travel."

-**Tone and Demeanor-** —Specify whether the agent should be friendly, formal, or casual.

##2. Context

-**Background Information** —Provide any necessary background details the agent should consider. For example, "This conversation is about booking travel for a family vacation."

-**Environment Details** —Mention any system constraints such as the caller is calling over voice and may have background noise which may impact the quality of transcription.

##3. Task

-**Subtasks/Steps** —Break down the overall task into specific, sequential steps. For example, greeting, collecting travel dates, suggesting options, confirming details. Reference the actions at each step that will be used to fulfill the task.

##4. Response Guidelines

-**Formatting Rules**—Define how to structure responses. For example, consider using bullet lists for options, clear numbering for steps in case of digital and short if there is voice.

-**Language Style**—Provide instructions on formality, brevity, and clarity.

##5. Error Handling and Fallbacks

-**Clarification Prompts**—Define fallback questions when user input is ambiguous. For example, "I didn't catch that, could you please repeat your travel dates?"

-**Default Responses**—Outline how the agent should respond if it can't process the request. For example "I'm sorry, I didn't understand. Can you try rephrasing?"

-**Action Failures**—Provide guidelines for handling issues with actions integration with Webex Connect.

##6. User Defined Guardrails

-**Guardrail**—Remind the agent to keep the conversation restricted to the goal and not entertain any unrelated queries.

## 7. Examples

-**Same Conversation**—Optionally add an example of the sample conversation between the end user and the AI agent for better prompt adherence.