Combination of NLG and callback channel

Hey,

I’m just reading about NLG and it looks great for our use case. I just want to validate with you one thing: We’re using callback channel. If NLG responses are stored on the same machine where the callback is sent afterwards, is it safe to save one step and ignore callback?

Because how it would work:

  1. User writes a message. Message is received into our app.
  2. Message is sent to Rasa server
  3. Rasa server predicts the response
  4. Rasa server sends a request to NLG endpoint (our app) “hey, give me a response text for this”
  5. NLG responds, rasa takes a text
  6. Rasa sends a text to the callback endpoint (our app)
  7. Response is being resent to the user in the callback endpoint.

So now - is it safe to omit steps 5, 6 and 7? So this would happen:

  1. User writes a message. Message is received into our app.
  2. Message is sent to Rasa server
  3. Rasa server predicts the response
  4. Rasa server sends a request to NLG endpoint (our app) “hey, give me a response text for this”
  5. NLG responds with text, but also sends the response text to the user directly
  6. Rasa sends the text to the callback endpoint, but it’s being ignored

Just seems to me like there is one extra and needless step :slight_smile:

Hey @mbukovy

is it save to save one step and ignore callback

Based on the workflow you’ve described, I assume you want to send the callback-to-the-user along with a request for the NLG server itself, so that NLG can answer back. That would be against the ideas of split responsibilities and micro-services imo.

What is the main concern here? I don’t assume your users to experience any delays, since you’ve mentioned that the bot and the NLG run on the same machine.

@degiz thanks for reply. Sorry for the typo, corrected

is it safe to save one step and ignore callback

since you’ve mentioned that the bot and the NLG run on the same machine

No. The callback channel (App) and NLG runs on the same machine. Rasa runs separately. So there will be sort of a ping-pong

  1. App -> Rasa (send message)
  2. Rasa -> App (retrieve a text form NLG)
  3. Rasa -> App (send actual message to callback channel)

And the concern is, that there are 2 calls to the same machine one after another. It could be merged into one call maybe…?

Hey @mbukovy

I see, thanks for the explanation!

IMO the use case when the NLG and the App are on the same machine is quite rare. We’d still try to cover more generic use case.