Get startedGet started for free

Creating Your Search Service

1. Creating Your Search Service

You built a semantic view for structured metrics. Now, we need to handle unstructured data, sales conversations, meeting notes, emails. This is text, you can't query with SQL. That's where Cortex Search comes in. It uses hybrid search, combining semantic understanding with keyword matching. Let's build one and see how it works. I'm in Snowflake. Navigate to AIML, then click Cortex Search. Click Create in the top right-hand corner. For our service database and schema, we're gonna choose Sales Intelligence for the database, and then Data for the schema. Name it Sales Conversation Search. Navigate to Sales underscore Intelligence. We're gonna pick Data for our schema, then select Sales underscore Conversations. And we're gonna click Next. Here's how hybrid search works. Semantic search understands meaning. If you search pricing objections, it finds too expensive, cost concerge, budget constraints. Keyword search finds exact matches. TechCorp finds actual mentions of TechCorp. Hybrid combines both for the better results. In search columns, check transcript underscore text. This is the full conversation text we wanna search. Now we're gonna select attribute columns. These provide context. Add customer name. This shows which customer each result is from. Add deal stage, sales rep, add conversation date, add deal value, and add product line. These don't get search, but they provide context for our results. Next, we get to add any other columns that we want to include. So we're gonna include the conversation ID. Next, set your target lag. This determines how fresh your search results need to be. Target lag is the maximum time your search index can fall behind changes to your source table. For Sales Intelligence use case, one hour works well. Select one hour from the dropdown. For the embedding model, Snowflake Arctic Embedded Medium version 1.5. And for the warehouse, we're gonna select Sales Intelligence Warehouse. Then click Create. The service is building. This takes a few seconds or a few minutes as it processes the conversations and then creates search indexes. There we go, it's done. Now let's give it a test. Go ahead and click Playground on the top. We're going to type integration concerns. Look at the first result. It's from TechCorp. The excerpt shows this discussion about integration timeline, legacy system X migration concerns. This is exactly what we wanted. Okay, let's go ahead and try another. Let's type pricing objections. The result shows small biz solutions talking about budget constraints and comparing to competitor Y. Even though they didn't use the word objections, semantic search understands that budget concerns are pricing objections. That's the power of semantic understanding. Okay, let's do one more. Let's go ahead and type TechCorp discovery call. This combines keyword matching for TechCorp with semantic understanding of the discovery call. It finds the exact conversation we want. Your search service is now ready. It can find conversation insights using natural language and handles both semantic and keyword searches. In the next video, we'll create the agent that ties the Cortex Analyst and Cortex Search together.

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.