Supademo Logo

Check knowledge for answer to question

Create a tool for checking if an FAQ knowledge table contains the answer to a customer question or not. It will return the answer or "I don't know".
Get Started
Blurred step underneath chapter
Demo Image 2
Demo Image 3

FAQ-EMAIL: Check knowledge for answer to question

S

Updated: Jun 27, 2024

Description

Create a tool for checking if an FAQ knowledge table contains the answer to a customer question or not. It will return the answer or "I don't know".

Steps

1
Check knowledge for answer to question
2
On the tools page, click "New".
3
Click on "Create Tool".
4
Give it the name “Check knowledge for answer to question”.
5
Video step
6
Click the plus button to give your tool an icon or a custom image.
7
Describe what your tool does.
8
Then, click on "Add data".
9
Search for your custom FAQ dataset (mine has two columns, one for “Question” and one for “Answer”.
10
Click on your dataset to add it to your tool as knowledge.
11
Click on "Add input".
12
Click on "Text input".
13
Give it the name "Question".
14
Video step
15
Give it a description, e.g. “Question to search knowledge for answer to”.
16
Video step
17
Provide an example question that there is an answer to in your FAQ table (it doesn't have to be worded the same).
18
Video step
19
Click on the small cog to open input settings.
20
Click on “Set current value” to set the question as the default test question (so you don’t have to type it in every time).
21
Give it a descriptive variable name, e.g. question.
22
Video step
23
Then, click on "Add step".
24
Click on the LLM tool step.
25
Write a prompt to describe how you want your LLM to answer a question found in the knowledge table (and how to handle cases where it can't). Copy the prompt on the next page to get a feel for how to do this.
26
The key things here are: Pull in question and knowledge inputs with the variable syntax: .
27
Click on the plus button to add another tool step.
28
Add the "Convert string to JSON" tool step.
29
Add the output from the previous step as the input for this step, by using variable syntax:
30
Click "Run all" to test the tool retrieves the answer to the question correctly.
31
Change the question to one there isn't an answer for in the FAQ knowledge table.
32
Click "Run all" again.
33
Video step
34
It should have admitted it doesn't know based on the prompt we wrote in the LLM step.
35
Save your tool.
FAQ-EMAIL: Check knowledge for answer to question