Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

The Intent stage does a semantic comparison of a sentence against possible intents (using TensorFlow or a Neural Network on the Python Bridge), if the confidence value is in the threshold, it will create a tag holding the intent.


This recognizer uses a frozen Universal Sentence Encoder TensorFlow model to encode (using sentence embedding vectors) a list of intents. Then tags sentences that match an intent given a specified threshold of accuracy with the intent from the list of possible intents.

Operates On:  Lexical Items with TOKEN and possibly other flags as specified below.

Saga_is_recognizer

Library: saga-intent-stage


Include Page
Generic Configuration Parameters
Generic Configuration Parameters

Configuration Parameters

  • Parameter
    summarySwitch between Neural Network using Python Bridge or Universal Sentence Encoder using Tensorflow.
    defaultNeural Network (false)
    nameNeural Network - Universal Sentence Encoder
    typeboolean
    requiredtrue

    • Both options have their own set of configurations and change on the UI if one or the other is checked.

Configuration Parameters (Neural Network)

  • Parameter
    summaryHost where the Python-Bridge is running.
    defaultlocalhost
    namelocalhost
  • Parameter
    summaryPort where the Python Bridge is running.
    default5000
    namePort
    typeinteger
  • Parameter
    summaryModel to be used for the intent recognizer
    defaultNone
    nameSelect Model
    requiredtrue
  • Parameter
    summaryVersion to be used for the recognizer.
    defaultNone
    nameSelect Version
    requiredtrue
  • Parameter
    summaryPercentage of similarity to be accepted by the recognizer. A higher threshold would mean closer results but less similarities found, a lower threshold would find more similarities but less closer results.
    default0.6
    nameMatch Threshold
    typedouble
    requiredtrue
  • Parameter
    summaryList of tags to be normalized by the recognizer.
    defaultNone
    nameNormalize Tags
    typestring array
  • Parameter
    summaryList of tags to be removed by the recognizer.
    defaultNone
    nameRemove Tags
    typestring array


Configuration Parameters (Universal Sentence Encoder)

  • Parameter
    summaryPercentage of similarity to be accepted by the recognizer. A higher threshold would mean closer results but less similarities found, a lower threshold would find more similarities but less closer results.
    default0.6
    nameMatch Threshold
    typedouble
    requiredtrue
  • Parameter
    summaryList of tags to be normalized by the recognizer.
    defaultNone
    nameNormalize Tags
    typestring array
  • Parameter
    summaryList of tags to be removed by the recognizer.
    defaultNone
    nameRemove Tags
    typestring array


Code Block
languagejs
Saga_config_stage
boundaryFlagstext block split
"atLeastOneFlag": []
"boundaryFlags": ["SENTENCE_SPLIT", "TEXT_BLOCK_SPLIT"]
"confidenceAdjustment": 1
"debug": false
"dontProcessFlags": []
"hostname": "localhost"
"intents": "saga-provider:saga_intent"
"modelName": "bert-base-uncased"
"modelPath": "tf-models/use/"
"normalizeTags": []
"port": 5000
"removeTags": []
"requiredFlags": []
"skipFlags": []
"threshold": 0.6
"useTensorFlow": false
"version": "1"
"_encrypt": []


Example Output

saga_graph
Code Block
languagetext
themeFadeToGrey
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?]-^ 
^----------------------[{internalSiteIntent}]-----------------------^ 


Output Flags

Lex-Item Flags:

  • SEMANTIC_TAG - Identifies all lexical items which are semantic tags.
  • INTENT - Placed on all the tokens which passed the minimal threshold.

Vertex Flags:

Info

No vertices are created in this stage