Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A proposal for federated chatbots for distributed information access

A proposal for federated chatbots for distributed information access

Presentation for a paper in the 37th annual European Simulation and Modelling Conference, October, 23-26. Toulouse. France.

Fernando Tricas García

October 26, 2023
Tweet

More Decks by Fernando Tricas García

Other Decks in Research

Transcript

  1. A proposal for federated chatbots for distributed
    information access
    37th annual European Simulation and Modelling Conference
    Fernando Tricas Garc´
    ıa
    [email protected]
    https://webdiis.unizar.es/~ftricas/
    October, 26th, 2023
    A proposal for federated chatbots for distributed information access

    View full-size slide

  2. Agenda
    Introduction
    The proposal
    Some lessons, conclussions
    A proposal for federated chatbots for distributed information access

    View full-size slide

  3. The proposal
    We would like:
    ▶ Getting information from several IoT devices (machines, ...)
    ▶ We will attach a chatbot to each relevant device
    ▶ No modifications in the original system
    ▶ Very flexible way of obtaining information
    A proposal for federated chatbots for distributed information access

    View full-size slide

  4. The proposal
    We would like:
    ▶ Getting information from several IoT devices (machines, ...)
    ▶ We will attach a chatbot to each relevant device
    ▶ No modifications in the original system
    ▶ Very flexible way of obtaining information
    ▶ Chatbots can be a good way to interact with IoT devices.
    ▶ Sometimes there can be good reasons to have more than one
    chatbot
    ▶ Cooperation/coordination is a good property.
    A proposal for federated chatbots for distributed information access

    View full-size slide

  5. The proposal
    So, we are proposing:
    ▶ An architecture for several chatbots
    ▶ Users interacting with them
    ▶ Interaction between bots
    ▶ Requesting actions for other bots
    ▶ Collecting the replies.
    ▶ Lightweight, and it can use public infrastructure providing an
    easy way to start a project with it.
    A proposal for federated chatbots for distributed information access

    View full-size slide

  6. The architecture
    A proposal for federated chatbots for distributed information access

    View full-size slide

  7. The architecture
    ▶ Several computers attached to different machines
    ▶ Each of them is connected to a communication channel
    Telegram, Slack, Discord, Gitter, IRC, ...
    ▶ Users can connect to some of these communication channels
    (or many).
    ▶ Adding more information sources =⇒ adding more bots.
    ▶ It’s up to us select the channels.
    A proposal for federated chatbots for distributed information access

    View full-size slide

  8. Coordination and Cooperation
    ErrForward backend
    ▶ Using Command and Control (C&C) techniques.
    A proposal for federated chatbots for distributed information access

    View full-size slide

  9. Example
    A proposal for federated chatbots for distributed information access

    View full-size slide

  10. Bot actions
    When a bot receives a request from some user it will check if it
    can fulfil the command:
    ▶ If it can, it will:
    1. Execute the action,
    2. Write a message to the user with the reply.
    A proposal for federated chatbots for distributed information access

    View full-size slide

  11. Bot actions
    ▶ if not, it will post the command to the common channel and
    it will wait to see if there is a reply.
    fw temp
    A proposal for federated chatbots for distributed information access

    View full-size slide

  12. Bot actions
    ▶ if not, it will post the command to the common channel and
    it will wait to see if there is a reply.
    fw temp
    A proposal for federated chatbots for distributed information access

    View full-size slide

  13. Bot actions
    ▶ if not, it will post the command to the common channel and
    it will wait to see if there is a reply.
    fw temp
    ▶ The other bots will read this command and check whether
    they can execute it or not:
    1. Do I know this command?
    2. Can I execute this command with these parameters?
    A proposal for federated chatbots for distributed information access

    View full-size slide

  14. Bot actions
    ▶ Hopefully, one of them will be able to execute it, so it will:
    1. Delete the message requesting the action from the channel.
    2. Execute the action.
    3. Write a new message in the common channel which embeds
    the reply.
    A proposal for federated chatbots for distributed information access

    View full-size slide

  15. Bot actions
    ▶ Hopefully, one of them will be able to execute it, so it will:
    1. Delete the message requesting the action from the channel.
    2. Execute the action.
    3. Write a new message in the common channel which embeds
    the reply.
    A proposal for federated chatbots for distributed information access

    View full-size slide

  16. Bot actions
    Each one of the other bots, will be able to read (while available)
    the reply and will check if:
    ▶ Is this reply for me?
    Hopefully, one of them will be the originator of the command.
    It will then:
    1. Delete the message with the reply.
    2. Write a message to the requesting user with the information.
    A proposal for federated chatbots for distributed information access

    View full-size slide

  17. We wanted to have a bot, but not to program a bot
    ErrBot
    https://errbot.io/
    A proposal for federated chatbots for distributed information access

    View full-size slide

  18. errbot
    ▶ Simple to build upon
    ▶ Batteries included
    ▶ Sharing
    ▶ Community
    A proposal for federated chatbots for distributed information access

    View full-size slide

  19. errbot
    ▶ Simple to build upon
    Extending Errbot and adding your own commands can
    be done by creating a plugin, . . .
    ▶ Batteries included
    ▶ Sharing
    ▶ Community
    A proposal for federated chatbots for distributed information access

    View full-size slide

  20. errbot
    ▶ Simple to build upon
    ▶ Batteries included
    Multiple server backends
    ▶ Sharing
    ▶ Community
    A proposal for federated chatbots for distributed information access

    View full-size slide

  21. errbot
    ▶ Simple to build upon
    ▶ Batteries included
    ▶ Sharing
    ▶ Community
    ▶ Free Software // Libre Software
    https://github.com/errbotio/errbot/
    A proposal for federated chatbots for distributed information access

    View full-size slide

  22. But it had some limitations
    A proposal for federated chatbots for distributed information access

    View full-size slide

  23. So we developed a plugin for this
    Parasitic infrastructure
    A plugin, using the standard mechanism.
    https://github.com/fernand0/err-forward
    ▶ Slack (Proof of concept)
    A proposal for federated chatbots for distributed information access

    View full-size slide

  24. Some lessons
    ▶ The interface is important (CLI)
    ▶ Text based
    ▶ Commands must be well thought in order to be practical and
    useful (easy to type, short, meaningful...)
    ▶ Concurrence issues have been managed
    ▶ Many of them delegated to the infrastructure
    A proposal for federated chatbots for distributed information access

    View full-size slide

  25. Conclusions
    ▶ We can have access to the information from several places
    (mainly Telegram, IRC)
    ▶ Easy to manage and to get access to the information (think
    local, use anywhere)
    ▶ Scalable
    Moreover... (not only IoT)
    ▶ APIs are important to access information. Web scrapping too.
    A proposal for federated chatbots for distributed information access

    View full-size slide

  26. Any questions, suggestions,
    ideas, ...
    [email protected]
    A proposal for federated chatbots for distributed information access

    View full-size slide