NLP training/process usage

Thanks for creating this very elaborate set of nodes, quite impressive work.

I want to use the NLP nodes, and although the documentation is quite detailed, I think I am missing some pointers for training/saving/processing model(s). Documentation mentions that training takes time, is this reflected on the save node ? (ie. when it is done?) or is it immediately saved ?

I followed the example as shown here.
Instead of using output of any of the chat clients into the process node, i want to test it with some input strings, what is the process node expecting in terms of input ? (object ? string ?) Whatever i inject, there is no response.

Also when looking at the output of the load node it shows:

Is this as expected ?

Thanks atom6,

1 - training takes time if your model includes a lot of intents and entities, in most of the case it’s just a couple of seconds
2 - Yes, it’s immediately saved, are experiencing some delays?
3 - I’m afraid is not possible, it checks for a regular platform message, the node is tightly coupled with the chat context, so it needs a real platform message to work. When I need to test a NLP model I generally use Telegram (it’s super quick to setup) or you can use the Simulator in Mission Control
4 - The NLP load node loads the model in memory and then outputs in the msg.payload. What you see there is the NLP.js manager (it can be useful in some situation if some special customizations are required)

3 - I’m afraid is not possible, it checks for a regular platform message, the node is tightly coupled with the chat context, so it needs a real platform message to work.

Thanks for the detailed answer, this limits my use case. I was just interested in the NLP part, it could potentially making (general) flows easier when there is some sense of context, but if it is coupled to chats i cannot use it.

Can you explain a little more of your use case? Perhaps it’s worth implementing if there is no workaround for this

The use case is more like an experiment in creating a general purpose “router” within node-red, meaning some source sends data in, nlp processes it and can route/translate it to some destination.

“Normally” one would/could use a switch node and capture/route a hard-coded rule in conjunction with a change/function node. What if we can introduce some “intelligence” within node-red that automatically routes/translates.

eg.
source: mqtt → [intent/process/rule] → dest: homekit out
source: alexa → [intent/process/rule] → dest: mqtt out

I might oversimplify the problem in my mind, most of my time in node-red is spend on translation/formatting to the right payload format for destinations.

Ok, let me check if I can decouple the two things easily.

I’ll get back to you in few days

1 Like

Ok, try node-red-contrib-chatbot@1.0.9

Added plain strings process to NLP.js process node (https://www.notion.so/redbot/NLPjs-Process-bbc3deb2d39a4b338fc6515eee337cd4)