Engagement Project code snippets to address some queries about the curation .

in STEMGeeks7 months ago (edited)

Good evening to everyone , around 34 hours from now my proposal for SPORTS delegation for Engagement Project will be passed if none of the voters reverse their decision . Before that , I would like to address some fears of few fellow members like @mk-sports-token .

Concerns

Although I got overwhelming support from other community members like @cryptoandcoffee , @uyobong and other large stake holders , I couldn't convince @mk-sports-token to favour my proposal , I would like to address his fears with an explanation so that if any other community members have same fear , it will be addressed .

In a recent post made by @rezoanulvibes which is titled "What do you think about the SPORTS Engagement Project" , there are very encouraging comments by other community members except one -

Quoting @mk-sports-token

@amr008.sports is a bot, I can imagine that one bot will spam/comment and another bot (amr008.sports) will upvote it and spam with another comment. This is not engagement! This is what I want to downvote.

I completely understand the fear but I will try to answer him -

Two things

  1. Yes @amr008.sports is a bot which replies to top 25 engagers everyday telling their amount of comments, number of authors they have talked to and their rank .
  • There are three reasons for this -
    - We are still an young project who need visibility and awareness . We need people to know that engagement matters and quality comments are rewarded .
    - To tell people how they are doing and to motivate them to improve their ranking and the number of comments / number of authors they talk to stats.
    - All the rewards the bot gets ( if any ) will go to engagement project itself and will be paid to delagators which will further encourage participation and delegation .
  1. No the bot doesn't upvote bots . It is not at all possible , there is absolutely 0 chance that the bot upvotes another bot - Why ?
    - Because they are not made from the sportstalksocial frontend . I will attach the code snippet here which any other member here can verify -

Code snippet

Test_Query = pd.read_sql_query(''' select * from Comments where parent_author <> '' and created > GETDATE()-2 ORDER BY created DESC ''',conn)


save_list=[]
ignore_list=[]
c=0
for i in range(0,len(Test_Query)):
    try:
        if(Test_Query['created'][i].date()== (dt.utcnow().date()- timedelta(1))):
            json_app= json.loads(Test_Query['json_metadata'][i])
            if 'app' in 'json_app':
                save_list.append([Test_Query['author'][i],Test_Query['parent_author'][i],'@'+Test_Query['author'][i]+'/'+Test_Query['permlink'][i],json_app['app'],Test_Query['created'][i].date(),Test_Query['body'][i]])
    except:
        ignore_list.append([Test_Query['author'][i],'@'+Test_Query['author'][i]+'/'+Test_Query['permlink'][i]])
        c=c+1


df_need=pd.DataFrame(save_list)
df_need_leo=df_need[df_need[3].str.startswith('leofinance')].reset_index()
df_need_stem=df_need[df_need[3].str.startswith('stemgeeks')].reset_index()
df_need_ctp=df_need[df_need[3].str.startswith('clicktrackprofit')].reset_index()
df_need_sports=df_need[df_need[3].str.startswith('sportstalksocial')].reset_index()


This is a replica of what I use in my script .

I will explain this part step by step -

Test_Query = pd.read_sql_query(''' select * from Comments where parent_author <> '' and created > GETDATE()-2 ORDER BY created DESC ''',conn)

This will read all the comments from past 2 days .

save_list=[]
ignore_list=[]
c=0
for i in range(0,len(Test_Query)):
    try:
        if(Test_Query['created'][i].date()== (dt.utcnow().date()- timedelta(1))):
            json_app= json.loads(Test_Query['json_metadata'][i])
            if 'app' in 'json_app':
                save_list.append([Test_Query['author'][i],Test_Query['parent_author'][i],'@'+Test_Query['author'][i]+'/'+Test_Query['permlink'][i],json_app['app'],Test_Query['created'][i].date(),Test_Query['body'][i]])
    except:
        ignore_list.append([Test_Query['author'][i],'@'+Test_Query['author'][i]+'/'+Test_Query['permlink'][i]])
        c=c+1

This will take each row and stores the following -

  1. Author , Parent_author , Permlink , App , Date , Body.

Here the App is very important .

Why ? It tells from which front-end the comment was made -

Ex:
image.png
Image Source : https://hiveblocks.com

This is for my recent post made from leofinance frontend - you can see the app part here .

Now let's move to bots -

image.png

image.png

As you can see here - the app/frontend is "beem".

Edit: I got to know that there is a way to use our own defined frontend name instead of beem . Although its rare that anybody would use this method it is a possibility . In order to prevent this - I will be checking similar comments , repeated comments ( same comments ) etc to make sure this method won't be used to abuse the system.

I am tagging @abh12345 here to verify or correct me if I am wrong . Also tagging @patrickulrich .

So where am I checking the 'app' part?

code -

df_need=pd.DataFrame(save_list)

df_need contains -

image.png

If you can see here - the column (3) contains the app/frontend details -

now this particular code -

df_need_leo=df_need[df_need[3].str.startswith('leofinance')].reset_index()
df_need_stem=df_need[df_need[3].str.startswith('stemgeeks')].reset_index()
df_need_ctp=df_need[df_need[3].str.startswith('clicktrackprofit')].reset_index()
df_need_sports=df_need[df_need[3].str.startswith('sportstalksocial')].reset_index()

Will store only those which matches particular front-end and ignores others -

df_need_sports output -

image.png

If you see this , there doesn't exist any comments which are not made from front-end other than sportstalksocial . So this script calculates only those comments which are made from the sportstalksocial frontend for SPORTS curation .

I am taking measures to prevent spam

  1. The project concerns itself only with comments and not posts because there is already @sportstalksocial account which does that.

  2. I am fine tuning the code everyday to introduce more criteria so that the best quality commentors are chosen .


This is it from my side . This post is meant to address the fears of the community members and make them aware that this project is not to help few people / bots in any way but to reward genuine users who put effort in engaging with others and contributing to the community .

Finally I would like to thank all those who actually raised questions about this because otherwise I think I would not have posted this explanation . Now I can redirect others here to read about the project.

Feel free to share your opinions here .

Posted with STEMGeeks

Sort:  

I think you're doing a cracking job mate. My only little concern is the bots comments. I feel it may not be too long before there are complaints!

Do we need the bot to comment when it votes? Is there anything to be gained by that other than exposure for the project?

I thought about this too actually and as I mentioned in the post .

It's because of gaining exposure and providing motivation to the users. Maybe I can change it . Post it via Dbuzz or something. Let me see.

I think it's fine now in the begining atleast so people understand why they get some random upvote on a comment :)

As you can see here - the app/frontend is "beem". So there doesn't exist any way right now on hive blockchain in which a bot can make a comment from sportstlaksocial frontend .

you can set any app string with beem. beem/0.24 is just the default if you don't provide an own value. see param app in beem.blockchaininstance.post()

Thank you for your reply.i just talked to abh12345 who clarified the same for me.

The next step I would take is to prevent the abuse through this method ( if any) by seeing the quality of comments.

For example - too many similar comments etc.

the app field is not reliable for two reasons: scripts, bots and frontends can set whatever they want there and frontends may change the app value when a post/comment is edited from another interface, altering the original value.

I understand the point . But what other reliable way exists to check the frontend posted from?

100% reliable: none. I think that's a tradeoff gain vs. effort. For most cases, the app field should be just fine. Keeping an eye on who/what is detected/rewarded, with manual checks on a sampling basis, is probably less error prone than trying to come up with more and more sophisticated metrics to detect humans and frontends.

I guess there is never a 100% safe from abuse. But hopefully we all can help spot people, have some manual reviewing and maybe use a whitelist of users that are eligable?

that! a bit of code, and a community working together, that's probably the safest bet :)

Agreed! I'm it's built for human interaction so humans should also be apart of mantaining it :)

I agree. To be honest , since we are active in the tribes it's easier to spot any abuse if it's happening. Also since the payout window is 7 days , if anybody reports anything I can remove the votes to them easily before the payout.

I edited the post to reflect the same . Thank you .

I didn't notice this post came out until I went to Stemgeeks so I am a bit late in replying. I like the changes and I think you explained the bot issue fine.

I looked through the comments and it seems like abuse can still happen so we have to check if we find any.

Check this out - link I have made changes to code to further prevent the spamming to be counted in the project.

Well explained post...
Hope this will clarify the doubt...
Actually I was surprised to see one down vote on proposal.... now the reason is clear...

Thank you . Hope so too :)

I believe that if we do the cost benefit analysis then probably the benefit of this tool is more than the side effects like spamming in comments. Though a small value, i have supported this proposal

Thank you very much , I think exactly the same.

I guess @mk-sports-token have a point here. There may not be a bot commenting through sports frontend right now, but if the votes distributed by amr008.sports become so lucrative then some one can think of developing one. Even i had this concern but then i thought if somebody is taking efforts to write some bot just to get your upvotes, its another level of engagement. Looking at your explanation and point wise answer i am pretty convinced that this is a helpful tool and will help in increasing engagement

I completely agree with you . With growing rewards , people might do that but its not that easy to do it and I will make sure I keep an eye on top 25 to check for any kind of abuse .

If any abuse is found , they will be added to the blacklist and won't be eligible for upvotes .

I would argue you to use a whitelist instead. Blacklist tends to always have to be expanded ...