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
"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,
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}]---------------------------^
No vertices are created in this stage
Description of resource.
"_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
These will all be added to the interpretation graph with the SEMANTIC_TAG flag.
Tags are hierarchical representations of the same intent. For example, {city} → {administrative-area} → {geographical-area}
_id ( type=string | required ) - Identifies the entity by unique ID. This identifier must be unique across all entries (across all dictionaries).
confAdjust ( type=boolean | required ) - Adjustment factor to apply to the confidence value of 0.0 to 2.0