Create Logic Flow using Orchestration Instructions Part 1
1. Create Logic Flow using Orchestration Instructions Part 1
Your agent works, but it could be smarter. The difference between an okay agent and a great agent comes down to instructions. Let me show you what I mean. Let's navigate back to Sales Intelligence Agent. Go ahead and edit. We're going to look at the orchestration instructions that we looked at at the previous module. They're functional. The agent knows when to use Cortex Analyst versus Cortex Search, but that's all they do. Real agents need more guidance. They need to know what not to do. They need to understand edge cases. They need guardrails. We'll add all of that. There are two types of instructions you can configure. Orchestration instructions, which guides the tool selection and defines the agent's boundaries and scope. Then response instructions, which can control the output format and tone. We'll work on orchestration first. This is decision logic. When does the agent use Cortex Analyst? When does it use Search? When does it use both? The agent needs explicit guidance. Add this to your existing orchestration instruction. Type for quantitative questions requiring numbers, percentages, or calculations. Always use the Sales Metric View tool first. Only use the Sales Conversation Search tool if the Sales Metric View tool returns no data. Why this rule? Research from the Snowflakes AI team shows explicit hierarchies reduce tool selection errors by 40 to 60%. The word always removes ambiguity. Structured data is faster and more deterministic than Search. This creates predictable behavior. Let's prevent tool confusion. Though Cortex agents should not have this problem, providing explicit boundaries is a good practice. So let's ensure our agent will not try to write SQL against text fields when they should be using Search. The next boundary will stop that behavior. Let's type for conversation analysis or conversations about what customer said. Always use Sales Conversation Search tool. Do not attempt to query conversations through the Sales Metric View tool. Now we can specify which triggers each tool. Type questions containing words like win rate, average, total, revenue, or count. Indicate quantitative analysis. Use the Sales Metrics View tool. Now let's add more triggered words. Questions containing words like concerns, objections, discussed, mentioned, or conversation indicate qualitative analysis. Use the Sales Conversations Search tool. These are signal words. They help the agent classify questions before selecting tools. Pattern matching reduces routing errors. Here is an advanced pattern. Type, if the Sales Metric View tool returns empty results, explain that clearly. Do not search conversations as a fallback unless the question also has qualitative aspects. Why? Empty results carry information. If someone asks for win rate by region and you don't track region, that is meaningful. Don't hide it by searching conversations. Be honest about the data gaps. Let's try these new instructions. Click Save. Now type, what's our win rate for Enterprise Suite? Watch the tool usage. The agent goes straight to the Sales Metric View tool. No hesitation. It recognizes win rate as quantitative. One tool call, fast, efficient. That's the hierarchy working. Let's try a conversation query. Type, what objections came up in premium security for Enterprise Suite? Do not search conversations as a fallback. If someone asks for win rate by region, what objections came up in premium security deals? The agent goes straight to Cortex Search. It recognizes objections as qualitative. It's looking through conversations, finding patterns. This is the correct tool selection. Now let's try a complex one. Type, what's the average deal size for deals where price was discussed? Watch this. The agent queries the sales metric table for average deal size, then searches conversations for mentions of price, then filters the metrics based on which deals had pricing conversations. Both tools, coordinated, perfect. Your orchestration instructions are getting smarter. The agent knows which tool to use and when. In the next video, we'll add boundaries and response formatting.2. Let's practice!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.