Previous Post: Reviving Context Lost Due to Command Typos Using Memory Techniques
Today began with feedback highlighting sluggish Telegram responses from Hermes Agent, culminating in an incident where local models inadvertently corrupted operational scripts during troubleshooting. This led to a comprehensive overhaul, including switching models, developing three additional skills, and addressing issues with article length and search descriptions.
The True Causes Behind Slow Telegram Responses
The issue began with a user inquiry about unusually slow performance of Hermes on Telegram. Upon reviewing the logs, it was discovered that the cause was not related to model speed but rather the OLLAMA_KEEP_ALIVE setting being set to 10 minutes. Given Telegram's nature of sporadic message delivery, any 10-minute inactivity caused the model to unload from memory, resulting in cold starts and full pre-processing for each subsequent message. Performance varied significantly, with cache hits achieving response times of just 2 seconds, while failures could extend to up to 342 seconds. Adjusting this value to enable perpetual operation, optimizing Telegram toolkit settings by removing memory overhead and reducing tool logging verbosity, significantly improved perceived responsiveness.
The 4B model inadvertently erased operational scripts.
While developing a new pub3 skill that allows topic selection by humans for immediate publication without approval, an incident occurred. Despite executing the instructed script verbatim, the qwen3-4b-hermes model overwrote the entire 14_write_news_article.py file with its own generated code. This new code contained fundamental syntax errors, specifically nested quotes within f-strings, despite 29 API calls and nearly 30 minutes of effort, failing to rectify them. Consequently, no content was published to the blog, and when queried about the upload, the response even denied having attempted the action at all.
Fortunately, the parsing and META validation logic previously reused in the script was already preserved in another file, allowing us to recreate it in the same structure and thoroughly test it before publishing the initial draft. This version is now committed to git, ensuring we can revert if similar issues arise again.
Transitioning to larger models, briefly exploring Gemini
4B concluded that it was overwhelmed by this multi-stage tool invocation and switched its core to the locally cached 9.7B qwen35-hermes model instead. Subsequently, upon a user suggestion that "a free API might be preferable," they also tested integrating the Gemini free API. After validating authentication and tool calling with curl, the transition was made, though it proved unsustainable due to quickly exhausting the rate limit of 250,000 tokens per minute per conversation, resulting in a 429 error and complete system paralysis. Given that Hermes consumes approximately 40-50K tokens per system prompt, this approach was fundamentally incompatible with the cascading dialogue pattern involving tool calls. Ultimately, reverting to the local model was necessary.
Enhancement of News Skills and Quality Improvement by Country
Recently, three new skills were developed to curate the Top 5 news items for domestic stocks (6 hours), US stocks and bonds (10 hours), and other global markets (10 hours) respectively. Approved topics are published directly using methods akin to pub3. Post-creation, the actual post length fell short of the initial target of 2500 characters, measuring at 2049 characters. Consequently, the target length was adjusted to 3000-3500 characters, and the prompt context length was increased from 8192 to 16384 tokens. Upon reevaluation, the length reached 3220 characters, aligning within the desired range.
We discovered 37 posts lacking search descriptions. Due to the absence of this field in the Blogger API, manual entry was required, which users had neglected despite previous console output methods. We have now rewritten descriptions under 140 characters for all 37 posts and updated the script to include direct links to the editing interface. Additionally, we reviewed and organized incorrectly labeled items.
Trouble Shooting
| Symptoms | Cause | Solution method |
|---|---|---|
| Slow and inconsistent Telegram responses | OLLAMA_KEEP_ALIVE default 10 minutes — model restarts with cold start between message gaps | Set to continuously run with OLLAMA_KEEP_ALIVE=-1 |
| Operating script corrupted by grammatical errors, posting failed | 4B model directly rewrote code instead of following the script, getting stuck in f-string errors. | Revised existing parsing/validation logic, prepared for recurrence with git commits. |
| Telegram responses ceased entirely after switching to Gemini. | Conversation exceeds monthly free token limit (250,000) — 429 error repeats | Rollback using local model (qwen35-hermes) |
| The post content came out shorter than the target length. | Tendency to write below the specified minimum value | Increase goal length generously (3000~3500 characters), expand context length as well. |
Reflections / Next Steps
It was a day that starkly confirmed through real-world incidents how even smaller models struggle to adhere to basic instructions like "just follow orders." Witnessing how an attempt to expedite a task spiraled into overhauling the brain model, expanding skills, and rigorously reviewing content quality underscores the notion that automation isn't a one-time endeavor but necessitates continuous monitoring and reevaluation. Adding an unregistered evening automatic trigger (cron job) remains the next milestone task.
Comments
Post a Comment