Excerpt |
---|
The FAQ stage does a semantic comparison of a sentence against questions and its respective answer (using TensorFlow), if the confidence value is in the threshold, it will create a tag holding the question and answer. |
This recognizer uses a frozen Universal Sentence Encoder TensorFlow model to encode (using sentence embedding vectors) a list of Frequently Asked Questions. Then tags sentences that match a question/answer pair given a specified threshold of accuracy with the question/answer from the FAQ. Most recently the FAQ also can use Saga Python Bridge to encode the sentence with different algorithms.
Operates On: Lexical Items with TOKEN and possibly other flags as specified below.
Library: saga-fag-stage
Saga_is_recognizer
Include Page | ||||
---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Saga_config_stage | ||
---|---|---|
| ||
"questions": "saga_provider:saga_faq", "tagWith": "question", "modelPath": "./tf-model", "threshold": 0.6, "useTensorFlow": true, "evalAnswers": true, "modelName": "bert-base-uncased", "version": "1", "hostname": "localhost", "port": 5000, |
Saga_graph |
---|
V---------------------[Any analytics available for Internal Sites? Why are dogs always hungry?]---------------------V ^----------[Any analytics available for Internal Sites? ]-----------V---------[Why are dogs always hungry?]---------^ ^-[Any]-V-[analytics]-V-[available]-V-[for]-V-[Internal]-V-[Sites?]-^-[Why]-V-[are]-V-[dogs]-V-[always]-V-[hungry?]-^ ^----------------------------[{question}]---------------------------^ |
Info |
---|
No vertices are created in this stage |
Description of resource.
Saga_json | ||
---|---|---|
| ||
"_id" : "KGAAJGsBemSwA0nZTLXA", "tag": "animals", "question" : "This is a cat?", "answer" : "That's a tiger", "fields" : { "questionVector" : [ 0.058885570615530014, -0.002637901809066534, ... ], "answerVector" : [ 0.34535465645635530014, 0.002342342343453453, ... ], "url" : "https://isthisacat.com" . . . additional fields as needed go here . . . } "confAdjust": 0.95 |
Note |
---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||||||
---|---|---|---|---|---|---|---|---|
|
Parameter | ||||
---|---|---|---|---|
|
Parameter | ||||||
---|---|---|---|---|---|---|
|
These will all be added to the interpretation graph with the SEMANTIC_TAG flag.
Tip |
---|
Tags are hierarchical representations of the same intent. For example, {city} → {administrative-area} → {geographical-area} |
Include Page | ||||
---|---|---|---|---|
|