Cumulate component in DeepPavlov Dream

Hi guys,

Hope you are all well !

I would like to create an advanced telegram bot for my website, and I have some questions about dockerization and loading some components.

Is it possible to cascade a chat message over Socialbot, Text QA, ODQA, Ranking, Entity recognition, Intent classification, Insult detection ? And give the user the best response as possible following rules/scenarios I can specify ?

How to load all these component if I use the the dp-dream-demos as base for docker deploy ?

Do you have an advanced bot implementation dockerized as an example ?

Thanks in advance for your insights and inputs on those questions.


1 Like

Hi! Not only it is possible, this is precisely what DeepPavlov Dream has been designed for!

You’re already on the right path. dp-dream-demos has a basic demo in main branch, and you can also pick an experimental one in the moonbase-ai-demo branch to get better understanding of how to put more than one skill and multiple annotators into the system.

While we’ll do a talk at NVIDIA GTC Fall 2020 soon (October 8) with full info, as well as publish a blog post, in the meantime you can grasp some concepts in here.

First, you’ll need to add all services you want to docker-compose.yml, in a manner like this:

Full file is here: docker-compose.yml

Second, you’ll need to add required services to /agent/pipeline_conf.json like this:

Full file is here: pipeline_conf.json

Third, you’ll have to add some sort of a server that will run your desired component and provide API that is compatible with the DeepPavlov Agent pipeline.

For skills it’s easy; take a look at line 282 in of the harvesters_maintenance_skill.

For annotators, it might be a bit more nuanced. Highly recommend you to study things thoroughly in the repo. To better understand the details, keep in mind the idea that each component has to involve one of the state_manager_methods, and use both dialog_formatter and response_formatter.

Sample code is provided in these two branches of the dp-dream-demos repo, though not for everything.

Fourth, you might also find useful to consult with the code of DeepPavlov Agent to better understand the flow. Take into account that for the purpose of these demos we use the non-default version of the Agent, but a bit newer one, see requirements.txt in /agent.

Finally, consult with the overview of our original Dream socialbot (one we’ve built for Alexa Prize 2019) and it’s architecture to get better understanding of the entire flow:

Read Technical Report

We will continue open sourcing components of our Dream socialbot in the coming months, so we’ll be happy to provide more guidance over the time.

Oh, and feel free to ask further questions in this thread. We’ll be happy to help!

Thanks for your quick reply, I ll give a shot this morning ! :slight_smile:

I have a suggestion for deeppavolv agent.

Why don’t you use pynng and the surveyor pattern for distibuting queries to several services ?


Thanks for your insights and inputs on that

1 Like

Hi guys,

Hope you are doing all well !

Just as a quick intro, my setup is a server 32Cores/240Go RAM/3xGPU GeForce GTX 1080 Ti. And, I built the moonbase-ai-demo branch and I have some problems.

  • To the question “what is arxiv ?”, it replies “no answer for that”
  • It is slowish ^^

Do I have to load more models ?


1 Like

Speaking of the DP Agent design, I think our founder can give a better perspective than me.
Speaking of the demo, well, I think this is what we’re discussing in TG group, am I right?

If not, well, moonbase-ai-demo just has an example of two skills - goal-oriented (with primitive intent and slots) and chit-chat (AIML-based). It doesn’t provide any Factoid functionality.

We’ll publish an example with Factoid skill example soon :slight_smile: