Combine Embeddings with Functions

In this AI series we covered how to set up functions to enable data capture like email addresses etc, and also how to upload all your FAQ's to embeddings. So in this module you'll discover how to move users from asking questions to quickly moving them into your conversions flows using one simple condition.

How it works

In the previous module 'error handling' we spoke about how to use the scoring to help with directing users to the right flows and also decreasing hallucinated responses. And what parts of the response we'd like to save to use later on, for example the heading and the content.

So this is how we use the 'heading' from the embeddings to quickly move users to our function flows to capture data.

Let's take a look at the Embedding Match and Completion action.

Highlighted is the Head line. If you remember that when creating your embeddings you were required to create a heading, just like a title. This helps the AI search for the information. OK, so as we asked the AI "How much is the pro plan?" we get the response as expected. now the AI understands our intent it shows the correct data based on that. So let's save the heading into a custom field which we can use in the next condition step.

Setting up the condition step: Once you open the condition step, look for the custom field that you saved the heading to. In our example we used {{embed_Heading}} as you'll see in the 'IF' bar.

Next select the operator 'IS' and the value is set to whatever your heading that you intend to filter, ours in this case would be 'Product Pricing and Plan Details. Now let's add this condition in to the flow.

Let's zoom in a little further.

Once you have added the condition in o the flow, you can now direct the user to different parts of your workflows. So as we're focusing on the plans and pricing in this example, we're sending the user to the plans and pricing flow which is in our main flow. If the heading does not contain 'Product Pricing and Plan Details' the AI will respond to whatever the question was.

You can set up multiple headings in the conditions node and simply link out to follow on flows. We direct out of the embeddings so we can use the power of AI to capture user data and convert them easier. Basically you could use this simple setup for embeddings and filtering headings as your complete automated assistant. Pretty easy ah!

Last updated