Urgent.News

What's breaking now, across thousands of outlets.

Tech

Everything I got wrong building an autonomous X bot

Everything I got wrong building an autonomous X bot It writes a tech post three times a day and publishes without me. The code took an afternoon. The interesting part was the six times testing proved a design I was confident about was wrong. Running cost $0.00 Runtime dependencies 0 TypeScript 4,054 lines Bugs found by testing 6 BuzzEngine watches Hacker News and GitHub Trending, works out what's…

Everything I got wrong building an autonomous X bot

The story of the six instances when what seemed like a functional process didn't function as expected, revealing the areas where genuine engineering took place.

01. The initial price analysis revealed an oversight. While the initial idea was to use Buffer's free plan to avoid using X's API directly, it turned out that posting with a link from Buffer cost more ($0.215) than posting with the link in the main post ($0.015). This highlighted the importance of understanding the exact unit that the price applies to.

02. The solution was to use another provider's API instead of X's. Many social schedulers, including Zapier, Make.com, IFTTT, and Buffer, hold their own X API access, making it unnecessary to interact directly with X. Buffer's free plan provided the necessary features for the bot, with a cost of $0, and was sufficient for the bot's job of pointing at things.

03. Two conflicting instructions led to problems. The first version of the posts produced by the model included claims that couldn't be substantiated, leading to rejection by the gate. The issue arose because the gate's context was smaller than the writer's, resulting in genuine-sourced facts appearing as invented. Fetching the primary source before writing the post resolved this issue.

04. The gate started rejecting accurate posts due to a mismatch in the context provided. The gate was judging against a smaller set of inputs than the writer had, causing genuine-sourced facts to be flagged as fabricated. To prevent this, both stages now build their material from one shared function, ensuring identical inputs for verification.

05. A minor issue caused the rejection of all three candidates due to length. The rule was to reject any post that exceeded the specified length, regardless of whether a simple revision could fix the problem. To address this, the rules were split into fatal and fixable categories, allowing for revisions when errors are minor. This prevents the loss of valuable, accurate information due to strict length restrictions.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Through the Tunnel(Ep-5 of The $0 cloud)

After searching for a solution (I just GPT'd my way through it lol), I found that Cloudflare was the way to go. The thing about CGNAT (Carrier-Grade Network Address Translation) is that it allows…

More from Tuesday 11 August →