Reputation System in Aigents® supporting Telegram Groups and more

Aigents with Anton Kolonin
SingularityNET
Published in
8 min readMay 5, 2020

The entire idea of proof-of-reputation for liquid democracy was posed over 2 years ago in the Aigents® project. The weighted liquid rank algorithm implementing this idea was designed last year, along with the reference implementation of SingularityNET reputation system API.

What’s new now?

The latest Aigents 2.3.6 release brings it forward to the next level with the following options:

  1. Telegram Aigents Bot (such as @AigentsBot hosted on https://aigents.com) can do Social Graph building based on the “reply” and “mention” interactions in the Telegram Groups, where the bot is added by group admins. Moreover, one can use existing AigentsBot or create such bot of their own, hosting in on their own premises, including public and private clouds, office or home servers and laptops (and even Android tablets or smartphones which is being tested now).
  2. Reputation and Social Graphs are included in Personal Social Reports available for registered Aigents users (as well as registered users of any custom installations of the Aigents platform) by the way of Aigents Web UI, Aigents Telegram bot or Aigents Facebook Messenger bot.
  3. Reputation System daily maintenance is now done my Aigents Core service for social integrations such as Telegram, Discourse forums, Steemit, Golos and Ethereum blockchains.
Using Aigents bots to compute social graphs and reputation for Telegram groups

How to set the bot up?

You have two options on how to set the Aigents bot for your Telegram groups — use existing @AigentsBot or create your own one. For any of the bots, you just need to register yourself with it (providing your email, name, surname, secret question and secret answer) and then add the bot to the Telegram groups which you want to have analysed for social graphs and liquid reputation computation. If you are adding the bot to a group, you may want to check with the other group users if they are comfortable with that — see below the details on how the bot works.

If you want to create the Aigents bot of your own, just have the Aigents installation done and set up the Telegram bot. To set up the bot, you need to use Telegram BotFather bot to create bot token and bot name for your bot. Then you just need to configure your Aigents installation saying “your telegram token <bot token>” and “your telegram name <bot name>” in Aigents chat console (same way as you would do the rest of Aigents setup).

How to get involved?

Once the bot is set up or you decide to use existing @AigentsBot, you just need to register yourself with it, using the same email, name and surname that you use to register with Aigents Web UI (such as Aigents Web Demo on https://aigents.com/). You can use other emails, name and surname but then you won’t be able to get the full access to reports and graphs on the Web later, while you will still be able to get the reports in Telegram chat.

The typical communication flow is the following.

  1. Human: login
  2. Aigents: What your email, name, surname?
  3. Human: aa.bb@yy.zz, aa, bb
  4. Aigents: What your secret question, secret answer?
  5. Human: hexadecimal code of my passport number, 12a34b5a2
  6. Aigents: What your hexadecimal code of my passport number?
  7. Human: 12a34b5a2
  8. Aigents: Ok. Hello Aa Bb! My Aigents 2.3.6 Copyright © 2020 Anton Kolonin, Aigents®.

Once you are done with the registration on the Telegram, you can interact with the bot in private chat or in any groups where the bot is already added by other group admins or yourself (if you are an admin of your own groups).

BTW, you can also do the same registration with Facebook Messenger, connecting it to existing Aigents bot on it or the one that you create, so the control of your account may be done from any communication channel.

How does it work?

Once the Aigents bot is in the group it starts monitoring the interactions in a group with the following scenarios possible.

  1. If the bot is mentioned in the group or has its own message replied by a registered user, it replies to the same user in the group. Like if you ask the bot like “@AigentsBot my telegram report” then the report will be directed right to the group.
  2. If the bot is mentioned in the group or has its own message replied by a non-registered user, the bot is creating private chat with the user starting the registration process as described above. After the registration is done, the user can keep communication with the bot in the private chat or on any group where the bot is present.
  3. If there is a message from a user in the group, the user has the Telegram id and Telegram username logged in the transaction log so it can be looked up in the future.
  4. If there is a mention of a reply from a user to a user, both users have the Telegram id and Telegram username logged in the graph database so the interaction can be used in computations.
  5. If there is mention of a user by another user, the ids of both users are used to record the interaction in the graph database so the interaction can be used in computations.
  6. On daily basis, the graph database is used to update the reputation state of every user which has the id recorder, according to the weighted liquid rank algorithm, implemented on basis of the Aigents temporal graph architecture.
  7. On any report request by any user, the graph database is looked up to create what we call Personal Social Report including ranked lists of computed best friends, fans and authorities as well as other charts such as karma by period. Besides these standard computations made for a close social environment of a user, the reputation in community chart is computed based on the entire scope of the interactions between users logged in the database — relying on the “weighted liquid rank” algorithm, and the chart is rendered (involving only the users appearing in the same groups with the Aigents bot and the user who requested the report). The computation weights the mentions and comments (replies) equally, weighting them by the logarithm of the number of characters in a text or mention or reply, so more verbose messages have a greater impact (with no sentiment analysis taken into account so far).
  8. On any graph view request submitted by a user, respective social graphs are rendered relying on the same database, so the interactive graph analysis can be performed.

For more details, refer to the open-source code of the Telegram and Telegrammer Java social integration modules as well as Reputation System implementation in the Reputationer module.

How to get the results?

For a registered Aigents user, getting the report is as simple as saying “my telegram report” in either Aigents Web UI (such as one on https://aigents.com/) or private chat with Aigents Bot on Telegram or Facebook Messenger. In Telegram groups, you can ask the report for shared use addressing the bot in reply or mention such as “@AigentsBot my telegram report” — and the report is rendered based on the default period of activity in your groups.

Getting Aigents Telegram Reports in Aigents Web UI (left) and in Telegram chat (right)

If you want a report for a time period other than the default, you can explicitly request a number of days in the period saying “my telegram report, period 30” for a monthly report or “my telegram report, period 92” for a quarterly report.

The reports are pre-generated and cached on daily basis, so if you want to request a fresh report including latest activity in the current day, you can order it saying “my telegram report, fresh” or “my telegram report, period 30, fresh”. In such case, the report is started being re-generated (with a reply saying “Your report is being prepared, please check back in few minutes…”) and you may need to repeat the same request in about a minute without of the word “fresh”, like “my telegram report” or “my telegram report, period 30” in our example.

Aigents Telegram Graphs in the Aigents Web UI on https://aigents.com (left) or right in the body of the Aigents Personal Social Report (right)

Moreover, you will be able to view social graphs rendered in the “Graph” view on the Aigents Web UI or embedded right in the report.

Invoking Aigents Graph Query against Social Graph mined from Telegram Groups

In addition to that, when viewing the “Graph” in the Aigents Web UI, the Graph Query may get executed by right mouse button click (on Windows) or double finger touch-pad click on Mac so you invoke “Setup” menu, fill in the graph query parameters and fo your network study as it has been described earlier for blockchains and social networks.

What’s else?

Everything above has been said mostly about the Telegram integration for Social Graphs and Reputation analysis. But that is not the full story! Same can be done for any Discourse forum connected to Aigents as well for any of the blockchains supported by Aigents, such as Etheruem, Steemit and Golos.id (Golos.in).

Each of the social integrations mentioned above has the Reputation System updated on a daily basis and have respective “Weighted Liquid Rank” Reputation updated on a daily basis for each of these.

That means that any of the reports obtained saying “my steemit report”, “my ethereum report” or “my discourse report” would include the reputation in the community section as well as interactive social graph part.

What’s next?

While we keep beta-testing, any questions, complaints, bug reports or feature requests are very welcome on our Aigents group on Telegram and Aigents on the Facebook page.

Along the way with multiple core improvements and bug fixing, the next month we will be working on Twitter support to be added to the Aigents® open-source platform.

Bookmark other Aigents pages:

https://www.youtube.com/aigents
https://www.facebook.com/aigents
https://wt.social/wt/aigents
https://medium.com/@aigents
https://steemit.com/@aigents
https://reddit.com/r/aigents
https://twitter.com/aigents
https://golos.in/@aigents
https://vk.com/aigents

Join Us

SingularityNET plans to reinforce and expand its collaborations to shape the coming AI Singularity into a positive one, for all. To read more about our recent news click here.

And if you have an idea for AI tools or services you’d like to see appear on the platform, you can request them on the Request for AI Portal.

--

--

Aigents with Anton Kolonin
SingularityNET

Creating personal artificial intelligence and agents of collective intelligence for individuals and small businesses.