The code already read every comment
I run a script (insta_engage.py) that auto-replies to Instagram comments. It reads each incoming comment, checks the language, decides whether to reply, and writes the reply if it does.
Once that decision was made, the comment itself was gone. If someone wrote "please make an app like this" or "why doesn't this feature work," the bot read it, decided whether to answer, and moved on. It read comments every day and kept none of what they said.
Is your automation reading an input, using it for one decision, and throwing it away?
I only noticed because I had already changed the Threads engage script first. That change pulled demand signals out of normal comments and logged them. The Instagram script has the same structure, but it didn't have that change. Each channel has its own script, so an improvement in one doesn't carry over to the other on its own.
Replying and demand are different questions
The reply logic asks, "should I answer this comment now?" The demand question is, "what does this comment want?" Both look at the same comment, but they ask different things. If the bot only has reply logic, nobody ever asks the second question.
So I scoped the fix like this:
- Don't touch reply behavior.
- Give every normal comment one demand tag.
- Log the tagged results to a file so the content generation loop can read them later.
Would you go straight to an LLM classifier here, or start with rules?
The fix: five rule-based tags and one jsonl line
I started with rules. Every normal comment gets one of five tags:
app_request: asking for an appcomplaint: a complaintfeature_request: asking for a featurequestion: a questiongeneral: everything else
Each result is appended as a line to logs/demand.jsonl. Auto-reply works the same as before. The whole change is 22 lines added and 1 removed in insta_engage.py, plus 8 test lines in test_engage_lang.py.
The reason for rules was simple. At this stage I didn't need accurate classification as much as I needed the signal to stop disappearing. Once the raw comments are saved, I can swap the classifier later and rerun it. A comment I don't save now can never be recovered.
Self-check
- Does your automation read inputs that it uses for one decision and then drops without a record?
- If you have the same script per channel, did an improvement to one also land in the others?
- For the logs you saved "to analyze later," does any code actually read them today?
The honest part
All this change produced is one file and five tags. I haven't checked how accurately the rule-based tags sort comments. The commit message only says the generation loop will mine this file "later," and no code in this commit reads it. Right now the file records demand, but nothing has used it to make a decision yet. I don't know what it will end up changing.