Programming Diary #40: Spotlight on reliability, security, and fairness in the Thoth project
Introduction
It's hard to believe it's been more than 2 months since my last programming diary entry. This is not because I've been inactive, but rather because time spent describing progress takes away from actual productivity - and programming is much more fun than writing. However, describing progress is important, too. So, today, I'm making this a priority.
In the activity and reflections section of today's post, I'll be talking about the Thoth project, since that has basically been my only area of focus when I had time for programming.
Before I get in to the main body, I'd suggest that the most important contribution of the last 2 months was the completion of this June 19th post: Here is a complete framework for a Generation-5 voting service. I invite you to bookmark and read it if you haven't already. Whether the Thoth project succeeds or fails, I believe the framework it uses is a roadmap that anyone can follow to create positive change in the Steem ecosystem.
The key assumption that (I believe) makes this framework valuable is my long-standing and often-stated opinion that:
rewards + audience is more valuable than rewards alone |
This framework attempts to harness that observation to the benefit of both authors and investors.
So now, on to the diary...
A framework for a generation-5 voting service (source)
Background
I guess nobody will have been surprised to learn that nearly all of my programming time has been spent working with Thoth. Since it has been so long between updates, I asked perplexity.ai to review my git log, and the AI said that I have completed the following activities during the intervening time.
Stats:
- Total commits: 44 (Jun 14 – Aug 3, 2025)
- Merges: 13+ feature branches and PRs
(There are also some more changes pending that still need to be tested, pushed, and merged.)
The AI also listed these as the top-level accomplishments:
Key Achievements:
- Stronger reliability via strict config and validation.
- Secure API key handling.
- Improved fairness in delegation/beneficiary logic.
- Better AI integration and individualized user engagement.
- Continuous, well-documented iterative development with frequent testing.
So let's dig a little deeper into those topics
Activity Descriptions
Stronger reliability via strict config and validation.
One of the frustrating things about testing Thoth has been when I let a typo sneak into the configuration file that it's using to determine the amounts of its beneficiary settings. This is bad because a single run can take 2 or 3 hours (or more), and many times the error wouldn't be discovered until Thoth tried to post.
So, I added some validation right at the front so that it will find errors and fail immediately, instead of waiting and failing after a few hours. This will help me with my testing activities, but it's also important for any operators who might eventually make use of the code to run their own Thoth instance.
Secure API key handling.
Another challenge with testing is that API keys and posting keys can be stored in a config file. This is fine if it's sitting, protected, on a private computer. But, when I'm pushing changes to the github repo I'm always afraid of accidentally including my personal keys in the repo's configuration template file. I'm pretty sure that I haven't done this yet, but I suppose it was just a matter of time 'til I slipped.
So, I changed the code to pull values from environment variables. They can still be included in a config file, but that will not be a recommended configuration. This means that I (and anyone who contributes to the code) will be less likely to accidentally leak keys that should remain private.
Improved fairness in delegation/beneficiary logic.
This one has been a real challenge. The problem with randomness is that it's random. So, you can't look at one post and tell if a random pick was fair or not. You can't even look at five or ten posts and make that determination.
In the daily posting, however, I was seeing some picks that made me question the fairness, so I took a careful look at it. I didn't find any problems with the selection mechanism, but I was still suspicious so I also asked Gemini, Microsoft Copilot, Claude, and perplexity all to work through it with me a few times. The AIs sometimes hallucinated bias problems and suggested improvements, but in the end they have all concluded that the selection mechanism is fair.
Additionally, I wrote a short driver program that runs the selection algorithm tens of thousands of times and reports its results. From those results, the algorithm also seems fair.
I'm still not 100% convinced that it's right, though (my wife says my name should have been "Thomas"), so I invite others to look through the logic. The goal is that someone should be selected as a beneficiary with a frequency that is in proportion to their delegation amount. The relevant code is here for the shuffling, here for posts, and here for replies.
Fairness to delegators and fairness to authors are critical to this project, so I would appreciate as much scrutiny as possible.
Better AI integration and individualized user engagement.
This was another substantial challenge. When I started this project, the only free AI that I knew of was Mistral-Nemo-12B-Instruct-2407 from ArliAI, so that's what I was using. Somewhere along the way I learned that gemini-2.0-flash is available for free, so I switched to that.
After a while, though, I wanted to make sure that none of the changes had broken the ArliAI model, so I switched back and ran a test. Wasn't I surprised to learn that Mistral-Nemo-12B-Instruct-2407 wasn't available any more? And worse, their free tier models are now reasoning models from the Qwen3-14B family.
Thoth did not handle reasoning well at all. It was so bad that I eventually had to make separate prompt templates for the Qwen3-14B family and the gemini family.
I also learned that gemini-2.5-pro is also available for free, so that's what Thoth is using now. It should also work with Qwen3-14B, but Gemini seems far superior with the current system and user prompts. Eventually, I'd like to get away from the practice of customizing prompts for each model, but maybe it's necessary.
The rate limit for gemini-2.5-pro is 100 calls per day. With 2 posts and 5 replies per day, Thoth is consistently under 60, so for now it is comfortably under the limit for free API calls. ArliAI has no daily cap, but it does not support any parallelism (which Thoth doesn't need, anyway).
Continuous, well-documented iterative development with frequent testing.
Nothing to say about this. Thanks perplexity!😉
One more thing: Posting frequency
The AI didn't pick up on this, but there's one more change that I want to highlight.
When I first imagined the Thoth project, the idea was to discover a bunch of posts and write a single post that contained summaries of all of them. In June, it occurred to me that this would require Thoth to post 10 top-level posts per day in order to maximize stake usage for its delegators.
Obviously, however, ten posts per day in someone's feed would be far too many. So I adopted a different strategy, which I think is superior. Now, Thoth finds all of the posts and writes a summary blog post as it's top-level post. It follows that post with an individualized reply for each of the curated articles. So now, Thoth can maximize voting for delegators while limiting its feed appearances to two per day. (If we had more beneficiary slots, it could be done in just one daily feed appearance.)
The AI doesn't understand this context, but I think this was actually a very important change.
Reflections
Three topics for reflections today: appreciation for delegators, voters, and positive feedback; the arrival of downvotes; and unexpected side-effects.
Thank you to the community
Community feedback
Everyone who has taken the time to provide textual feedback to the project has expressed a positive viewpoint. Authors have confirmed that Thoth's summaries have been accurate, and readers have expressed appreciation for articles that they would never have seen without Thoth.
Thank you, especially to @massola, and @solperez for ongoing and consistent feedback.
If Thoth is going to be a change agent for improving the Steem ecosystem, this sort of feedback is necessary.
Delegators
The @thoth.test account is up to about 22,000 SP, and more than half of that is not from my accounts. So thank you very much to @massola, @steempromoution, @cub1, @chriddi, and @the-gorilla. Thoth can only prove itself with backing from the community, so your delegations are vital to proving the project.
Voters
The key for a generation-5 voting service to be able outcompete a generation-4 service rests in its abilities to attract organic votes. It will have a hard time winning unless real people are voting for the authors that it finds.
To that end, Thoth is trying to find content that real people will actually read and vote for.
In a sense, I guess we have a three-legged stool, where authors, delegators, and voters make the service possible.
So, I am very appreciative towards the people who are supporting @thoth.test and the authors it finds with your votes.
The arrival of downvotes
Unfortunately, the @thoth.test account seems to have picked up an anti-fan club, too. These voters haven't told me the reasons for their downvotes, but I suspect it's more about retaliation for participation in an anti-spam downvote trail than it is about the things that @thoth.test is posting.
At any rate, it's disappointing because the collateral damage is that authors are blocked from participating in the #lifetime-rewards experiment. The @thoth.test account is only keeping 2.5% of rewards. Everything else goes to authors, delegators, and @null. Thus, many of the people being harmed by this downvote campaign are not the people being targeted.
I'll do what I can to try to counter the downvotes with my own accounts, and I have noticed that other voters are already doing the same, so thank you to those voters. At present downvote levels, I don't see this as a threat to the project's continuance. Hopefully, that will remain true as time passes.
Unexpected side-effects
As I've been developing Thoth, I have noticed two benefits from the account that I totally did not expect when I started. First is that in testing the program I'm finding all sorts of interesting content that I would never have seen without it. For example, this was a fascinating post with an interesting video from 2016 and here's a nice rendition of "O mio Babbino caro" from 2020. Without Thoth, I don't know that those posts exist.
The second benefit is related, but it has to do with languages. If I can't tell what a post in my feed is about, my personal tendency is to scroll past foreign language posts that I can't read without translation. However, Thoth gives me English language summaries. I can't tell you how many times I've read a summary by Thoth and decided that I'd like to read it, and only then discovered that the post was written in Spanish or German. At that point, I'm far more likely to click through and go through the effort of translating it to English.
It may be that one of Thoth's most compelling use-cases is to provide single-language summaries of multi-language articles. This is something that wasn't on my radar at all when I started the project.
Conclusion
I think the past two months have ushered in good deal of useful progress, including improvements to Thoth in aspects of reliability, security, and fairness. This progress has involved improvements in handling config file errors, more secure handling of API keys and wallet passwords, updates to prompt handling to work with Gemini and Qwen3-14B families of models, scrutinizing the beneficiary selections for fairness, and adopting a new approach to optimize voting while minimizing feed appearances.
Overall, positive feedback has been dominant from the community, with the only exception being a downvote trail which has attached itself to the test account.
I hope the community will check out the @thoth.test account and see what it's doing. Whether it's done through Thoth or some other vehicle, I think that the Generation 5 voting service can be a positive change agent for the Steem ecosystem in the future.
I also renew my invitation for other developers to contribute to the effort. I honestly think this has tremendous untapped potential for the ecosystem, and it deserves to move faster than what I can do alone. The repo is here.
Thank you for your attention!
Postcript:
I just noticed, a moment ago, that ArliAI has now replaced Qwen3-14B with the Gemma3-27B family in the free tier, so... I have no idea whether Thoth will work with that API now😉.
Things are looking great!
I've been surprised by the quality of some of the content you've found - in a couple of cases, users who have left approximately 2 years ago and would very much like to see return. One of which now has about 2.3 million YouTube subscribers but was completely ignored by the community at the time.
I wonder if there's an opportunity to find similar people now - before they follow the same path?
With regards to downvotes, I have wondered if I remove my delegation, whether these will end. I feel that the downvotes have nothing to do with you or the project, but to do with a long-term attack by this individual against me. I'll soon be writing another "Downvote Compensation" post - aware that this doesn't help the beneficiaries that you're trying to support... but will compensate the total loss quite comfortable. Perhaps something to consider for when these rewards arrive at your doorstep.
In the mean time, as you've already seen, I'll just vote more. More consistently (it's now automated to vote everything @thoth.test self-votes) and at a higher percent. Which I'll happily continue to increase if the attacks continue. He gets 3 downvotes per day (before he starts losing curation power which I know upsets him) which are weaker than my equivalent 3 upvotes and if he focusses on you, then he can't downvote the other annoying accounts (like @bullionstalker) which I suspect are more harmful to his already shattered reputation. Not forgetting @anti.abuse which he seems to dislike too.
It's an interesting consideration though - it essentially means that you need a base voting power that makes the downvotes meaningless in comparison to the return to delegators.
0.00 SBD,
0.00 STEEM,
2.40 SP
Yeah, that's the same with the existing delegation bots, too. They only really took off after the downvotes stopped. I think my biggest weakness for demonstrating the possibilities is the size of the wallet. Even without downvotes, a substantial base is also helpful for attracting delegators. Either a large stake or lots of upvotes (or both) is necessary to provide competitive returns to delegators (especially if an operator insists on burning 25% of author rewards).
It would be interesting to see what would happen if the Steemit team ran Thoth as a curator of the month with their own account and stake for a few months. ;-) I'd bet that they'd peel some delegators away from the more destructive services - or else force those services to adopt a less harmful approach.
Yeah, I followed him, and I noticed when he stopped posting. That was disappointing. A pre-2020 Steemit team member was the one brought him here.
I had started an influencers list some years ago, but I never maintained it. In the course of running Thoth, I have learned that the inactive influencer list is much bigger than I had realized, though. Of the four active ones that I knew at the time, I see that three are still active with posting now.
I think that keeping them (and any others we could find) is probably more about audience than rewards. Encourage engagement with their posts and teach them how they can use Steem to reward their fans/followers in ways that they can't do on other platforms.
0.00 SBD,
0.42 STEEM,
0.42 SP
I hadn't considered that. Definitely worth an application as it's different from the Status Quo which is what the platform most definitely needs!
Although - the perception that the Steemit stake is a delegation service is perhaps a step too far.
It's interesting - none receive much in the way of interaction at the moment.
0.00 SBD,
0.00 STEEM,
0.53 SP
Yeah, after years of near-zero engagement, I'm sure they see it mostly as a link-dropping platform at this point. skycorridors used to reply to comments on her posts here, but I think the last time I left a comment to her it went unanswered.
OTOH, last I knew (years ago), Hive whales were actively downvoting her.... so I guess it could be worse. ;-)
It might be, although they could set their own rewards to zero if they wanted to offset that criticism. (that wouldn't be my recommendation, though)
My guess is that the JS announcement back in January pertained to a Tron-developed LLM that was going to be connected to Steem, and based on his subsequent post a week or so later, I guess it was a disappointment. Assuming that's right, and if they ever get that model up to snuff, Thoth could provide a good way to showcase it. If they use the OpenAI format for their API, it's probably easy enough to plug in to their model.
0.00 SBD,
0.42 STEEM,
0.42 SP
I read the comments of the proposal to connect Steemit, Hive and Blurt on Hive and there are similar complaints there about an inactive user base. On the surface, Hive looks more active than Steemit but in reality, it appears to be a similar story to us where most content just gets ignored (presumably there's a lot of cross-posting so this probably isn't surprising). They also have the self-destructive tendency of just downvoting for fun, rather than for a purpose.
It wouldn't surprise me if we never discover what JS was really referring to in that tweet.
0.00 SBD,
0.00 STEEM,
0.51 SP
I think you're right, but I keep hoping...
0.00 SBD,
0.42 STEEM,
0.42 SP
Me imagino que invertiste mucho tiempo para escribir este post, y siento que era necesario hacerlo.
Antes que nada debo decirte que a través de @thot.test he sentido que he hecho un buen trabajo en la plataforma desde que estoy acá, pues, ha escogido varias de mis publicaciones, lo cual ha significado para mí una motivación extra para continuar posteando textos de calidad, sin dejarme seducir por lo fácil.
Pero, esa es mi apreciación y, tal vez yo esté equivocada.
Me alegra que hayas publicado este texto, pues una amiga, que es muy buena bloguera, @genomil estaba preocupada porque Thot había seleccionado algunas de sus publicaciones, y pensaba que podía tratarse de un spam. Le hice saber de lo que se trataba y quedó conforme. Pero sin una explicación como esta es bastante probable que la gente recurra a dar votos negativos.
¿Sabes? Tengo deseos de hacer algo productivo con mis SP, y cuando hablo de productivo me refiero a votar publicaciones de calidad y también a fortalecer mi cuenta. En esa misma línea está @wakeupkitty. ¿Será posible juntar fuerzas para hacer visibles a los usuarios que se merecen más respaldo, no porque sean mis amigos, sino porque realmente se lo merecen, entre estos me permito mencionar a: @evagavilan, @marcybetancourt, @cruzamilcar63, @blessedlife, @genomil, @hljott y @acostacazorla, entre otros.
0.00 SBD,
0.61 STEEM,
0.61 SP
Thank you for sharing on steem! I'm witness fuli, and I've given you a free upvote. If you'd like to support me, please consider voting at https://steemitwallet.com/~witnesses 🌟
@remlaps, this is a fantastic update on the Thoth project! It's exciting to see the progress made in the last two months, especially with the improvements to reliability, security, and fairness. The AI integration and the new approach to posting frequency are particularly interesting.
Your dedication to ensuring fairness in beneficiary selection is commendable, and I appreciate the open invitation for community scrutiny on the code. It's great to see positive feedback from users and delegators, and your reflections on the unexpected side-effects, like discovering content in different languages, are insightful.
The Generation 5 voting service framework you've outlined has great potential for the Steem ecosystem. I encourage everyone to check out @thoth.test and consider contributing to this innovative project! Keep up the excellent work!