TIA Deep Learning NLU Engine

TIA Deep Learning NLU Engine

An NLU Engine using Deep Learning to power Artificially Intelligent Assistants

Artificial Intelligence

  • 0 Collaborators

  • 3 Followers

    Follow

Description

TIA is an NLU Engine created with Tensorflow, TFLearn and Mitie. The project has been created to power my home IoT network and will be integrated into TechBubble Technologies products.

After developing products/prototypes using platforms such as API.ai and I learned a lot about the inner workings of an NLU Engine. I decided to build my own and implement features that were not currently supported in these platforms that I believe are required for this type of platform.

I had looked into RasaNLU as a possible solution to creating my engine, but I felt it was very bulky and it also lacked features such as context management, intent actions and a few other features I believe are needed in an NLU engine.

My current version is built in less than 600 lines of code in 3 files making it a more lightweight solution than I have come across as of yet. At the moment classifiers are used for the intent and entity classification, the rest of the engine features are made up of logic, part of future development will be to implement additional classifiers/extractors where possible to replace certain features of the engine.

I used TFLearn as I have never really spent much time on it before and decided to try it out. The engine uses a deep learning neural network with fully connected layers and uses a softmax activation function to output classification probabilities.

Mitie is used for entity extraction although, this reduces the speed of the response due to catering for multiple users with multiple models, and having to load them on each API call, this will be one area that I will be looking to improve on, without entity extraction and processing the response time is a couple of seconds, with, it is sometimes up 5-7 seconds.

So far I am quite happy with the results, accuracy on correct intent classifications is around 0.99 and I use a threshold of 0.75.

CURRENT FEATURES:

  • Updatable default responses
  • Trained / interfaced via API
  • Intent classification
  • Intent classification threshold sent as API parameter
  • Entity training / classification
  • Entity synonym training / classification
  • Dialogue context management
  • Automatic dialogue context resetting if user changes conversation
  • Intent actions
  • Multiple models / users
  • Repetition handling
  • Updatable repetition responses
  • Updatable repetition ignore count
  • Updatable repetition ignore count cutoff
  • Served on secure Nginx server

FUTURE FEATURES INCLUDE:

  • Internal actions for updating user details such as name, age, location etc
  • Slotfilling with automatic cancellation if user changes conversation, no more getting stuck in loops!
  • Sentiment analysis
  • Webhooks
  • Managed via TechBubble ARC
  • Hosted on Colfax

AREAS THAT HAVE IMPROVED THE ENGINE:

  • Automatic Dialogue Resetting: One issue with other services I have used was getting caught in a loop when contexts were set. In my implementation, once the context has been incorrectly matched, if the following intent does not match the context it will reset the context and provide the response to the current intent request.

  • Post Entity Processing: A lot of the time on other services I have used, when the intent has been matched and entity has been matched, it would return the correct response and entity type, but the wrong entity definition, in my case, it would break the application as entity definitions are what matches the actions to the relevant entry in the database. This would lead to situations such the client being redirected to a product page that did not exist. In my implementation, fallback responses can be added to the data, the engine will check to see if there is a valid entity reference or synonym that matches, and if not will return one of the provided fallbacks, also, it will clear the entity totally if no actual entity was provided in the training data for that intent.

  • Repetition Management: None of the services I used handled repetition, in my implementation repeat limits can be set and a repeat string which will be added to the beginning of the response for each repeat count. I response before the repeat limit, the bot will respond with a predefined warning that it will no longer respond to the question / statement if asked again, and then if asked again will ignore the user for the duration of a predefined time period.

Video

Links

Standard aidl

Standard nlu

Adam

Adam M. added photos to project TIA Deep Learning NLU Engine

Medium 50becfed 423b 4733 b4ba 89f02dda8e4d

TIA Deep Learning NLU Engine

TIA is an NLU Engine created with Tensorflow, TFLearn and Mitie. The project has been created to power my home IoT network and will be integrated into TechBubble Technologies products.

After developing products/prototypes using platforms such as API.ai and I learned a lot about the inner workings of an NLU Engine. I decided to build my own and implement features that were not currently supported in these platforms that I believe are required for this type of platform.

I had looked into RasaNLU as a possible solution to creating my engine, but I felt it was very bulky and it also lacked features such as context management, intent actions and a few other features I believe are needed in an NLU engine.

My current version is built in less than 600 lines of code in 3 files making it a more lightweight solution than I have come across as of yet. At the moment classifiers are used for the intent and entity classification, the rest of the engine features are made up of logic, part of future development will be to implement additional classifiers/extractors where possible to replace certain features of the engine.

I used TFLearn as I have never really spent much time on it before and decided to try it out. The engine uses a deep learning neural network with fully connected layers and uses a softmax activation function to output classification probabilities.

Mitie is used for entity extraction although, this reduces the speed of the response due to catering for multiple users with multiple models, and having to load them on each API call, this will be one area that I will be looking to improve on, without entity extraction and processing the response time is a couple of seconds, with, it is sometimes up 5-7 seconds.

So far I am quite happy with the results, accuracy on correct intent classifications is around 0.99 and I use a threshold of 0.75.

CURRENT FEATURES:

- Updatable default responses
- Trained / interfaced via API
- Intent classification
- Intent classification threshold sent as API parameter
- Entity training / classification
- Entity synonym training / classification
- Dialogue context management
- Automatic dialogue context resetting if user changes conversation
- Intent actions
- Multiple models / users
- Repetition handling
- Updatable repetition responses
- Updatable repetition ignore count
- Updatable repetition ignore count cutoff
- Served on secure Nginx server

FUTURE FEATURES INCLUDE:

- Internal actions for updating user details such as name, age, location etc
- Slotfilling with automatic cancellation if user changes conversation, no more getting stuck in loops!
- Sentiment analysis
- Webhooks
- Managed via TechBubble ARC
- Hosted on Colfax

AREAS THAT HAVE IMPROVED THE ENGINE:

- Automatic Dialogue Resetting: One issue with other services I have used was getting caught in a loop when contexts were set. In my implementation, once the context has been incorrectly matched, if the following intent does not match the context it will reset the context and provide the response to the current intent request.

- Post Entity Processing: A lot of the time on other services I have used, when the intent has been matched and entity has been matched, it would return the correct response and entity type, but the wrong entity definition, in my case, it would break the application as entity definitions are what matches the actions to the relevant entry in the database. This would lead to situations such the client being redirected to a product page that did not exist. In my implementation, fallback responses can be added to the data, the engine will check to see if there is a valid entity reference or synonym that matches, and if not will return one of the provided fallbacks, also, it will clear the entity totally if no actual entity was provided in the training data for that intent.

- Repetition Management: None of the services I used handled repetition, in my implementation repeat limits can be set and a repeat string which will be added to the beginning of the response for each repeat count. I response before the repeat limit, the bot will respond with a predefined warning that it will no longer respond to the question / statement if asked again, and then if asked again will ignore the user for the duration of a predefined time period.

Medium adam

Adam M. created project TIA Deep Learning NLU Engine

Medium 50becfed 423b 4733 b4ba 89f02dda8e4d

TIA Deep Learning NLU Engine

TIA is an NLU Engine created with Tensorflow, TFLearn and Mitie. The project has been created to power my home IoT network and will be integrated into TechBubble Technologies products.

After developing products/prototypes using platforms such as API.ai and I learned a lot about the inner workings of an NLU Engine. I decided to build my own and implement features that were not currently supported in these platforms that I believe are required for this type of platform.

I had looked into RasaNLU as a possible solution to creating my engine, but I felt it was very bulky and it also lacked features such as context management, intent actions and a few other features I believe are needed in an NLU engine.

My current version is built in less than 600 lines of code in 3 files making it a more lightweight solution than I have come across as of yet. At the moment classifiers are used for the intent and entity classification, the rest of the engine features are made up of logic, part of future development will be to implement additional classifiers/extractors where possible to replace certain features of the engine.

I used TFLearn as I have never really spent much time on it before and decided to try it out. The engine uses a deep learning neural network with fully connected layers and uses a softmax activation function to output classification probabilities.

Mitie is used for entity extraction although, this reduces the speed of the response due to catering for multiple users with multiple models, and having to load them on each API call, this will be one area that I will be looking to improve on, without entity extraction and processing the response time is a couple of seconds, with, it is sometimes up 5-7 seconds.

So far I am quite happy with the results, accuracy on correct intent classifications is around 0.99 and I use a threshold of 0.75.

CURRENT FEATURES:

  • Updatable default responses
  • Trained / interfaced via API
  • Intent classification
  • Intent classification threshold sent as API parameter
  • Entity training / classification
  • Entity synonym training / classification
  • Dialogue context management
  • Automatic dialogue context resetting if user changes conversation
  • Intent actions
  • Multiple models / users
  • Repetition handling
  • Updatable repetition responses
  • Updatable repetition ignore count
  • Updatable repetition ignore count cutoff
  • Served on secure Nginx server

FUTURE FEATURES INCLUDE:

  • Internal actions for updating user details such as name, age, location etc
  • Slotfilling with automatic cancellation if user changes conversation, no more getting stuck in loops!
  • Sentiment analysis
  • Webhooks
  • Managed via TechBubble ARC
  • Hosted on Colfax

AREAS THAT HAVE IMPROVED THE ENGINE:

  • Automatic Dialogue Resetting: One issue with other services I have used was getting caught in a loop when contexts were set. In my implementation, once the context has been incorrectly matched, if the following intent does not match the context it will reset the context and provide the response to the current intent request.

  • Post Entity Processing: A lot of the time on other services I have used, when the intent has been matched and entity has been matched, it would return the correct response and entity type, but the wrong entity definition, in my case, it would break the application as entity definitions are what matches the actions to the relevant entry in the database. This would lead to situations such the client being redirected to a product page that did not exist. In my implementation, fallback responses can be added to the data, the engine will check to see if there is a valid entity reference or synonym that matches, and if not will return one of the provided fallbacks, also, it will clear the entity totally if no actual entity was provided in the training data for that intent.

  • Repetition Management: None of the services I used handled repetition, in my implementation repeat limits can be set and a repeat string which will be added to the beginning of the response for each repeat count. I response before the repeat limit, the bot will respond with a predefined warning that it will no longer respond to the question / statement if asked again, and then if asked again will ignore the user for the duration of a predefined time period.

No users to show at the moment.

Bigger 0 1 ljevk biqzphmfzi4susp8vfqzs2f8 k40skhiqixosh ff840v73i5hzgsgh8nijsvo8i9azg7jyekmnng3hltazj7jt8nmnrhvp5qidq7eidnjkvmb3pm
  • Projects 0
  • Followers 0

Amita Kapoor

Lodhi Road, Near Airforce Bal Bharati School, New Delhi, Delhi 110003, India