<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Andrey Khayrullaev</title>
    <description>The latest articles on DEV Community by Andrey Khayrullaev (@a_r200).</description>
    <link>https://dev.to/a_r200</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4248104%2Fd4c64505-69be-4553-adc5-13b6eb785c9f.png</url>
      <title>DEV Community: Andrey Khayrullaev</title>
      <link>https://dev.to/a_r200</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/a_r200"/>
    <language>en</language>
    <item>
      <title>Reply, hide, like or say nothing: how our AI comment bot decides</title>
      <dc:creator>Andrey Khayrullaev</dc:creator>
      <pubDate>Mon, 16 Nov 2026 16:12:17 +0000</pubDate>
      <link>https://dev.to/a_r200/reply-hide-like-or-say-nothing-how-our-ai-comment-bot-decides-2khi</link>
      <guid>https://dev.to/a_r200/reply-hide-like-or-say-nothing-how-our-ai-comment-bot-decides-2khi</guid>
      <description>&lt;p&gt;I'm Andrey, co-founder of &lt;a href="https://reply200.com" rel="noopener noreferrer"&gt;Reply200&lt;/a&gt;, an AI comment moderation and auto-reply tool for Facebook, Instagram, TikTok and YouTube. When people hear "comment bot", they picture a script that answers everything. Writing the reply is the easy part. The hard part is deciding, for each comment, whether to answer at all.&lt;/p&gt;

&lt;p&gt;This post is about how we make that call, and what four different platform APIs forced on the design.&lt;/p&gt;

&lt;h2&gt;
  
  
  One comment, one action
&lt;/h2&gt;

&lt;p&gt;Every comment gets exactly one action:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;reply&lt;/strong&gt; in the page's own voice&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;hide&lt;/strong&gt; it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;like&lt;/strong&gt; it&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;ignore&lt;/strong&gt; it on purpose&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We chose one action over "reply to everything" because replying to everything is what makes a page look automated. A fan who writes "lol" doesn't need an answer. Someone tagging a friend doesn't either. A question about shipping does.&lt;/p&gt;

&lt;p&gt;A simplified version of the shape (TypeScript for readability, not our production code):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nc"&gt;Platform&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'facebook'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'instagram'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'tiktok'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'youtube'&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nc"&gt;Placement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'ad'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'post'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'video'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'live'&lt;/span&gt;
&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nc"&gt;Action&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'reply'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'hide'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'like'&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s1"&gt;'ignore'&lt;/span&gt;

&lt;span class="kd"&gt;interface&lt;/span&gt; &lt;span class="nc"&gt;Verdict&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Action&lt;/span&gt;
  &lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What the model reads
&lt;/h2&gt;

&lt;p&gt;A comment on its own is not enough to judge it. "Is this real?" under an ad and the same words under a cooking video are different comments. So each comment is read together with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the post or ad it sits under: the caption, plus a description of the image or video&lt;/li&gt;
&lt;li&gt;where it sits: ad, organic post, video or live stream&lt;/li&gt;
&lt;li&gt;the thread around it&lt;/li&gt;
&lt;li&gt;the commenter's recent comments on the same page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Placement changes the goal. Under an ad, the goal is the click. Buyers read the comments before they tap the button, so an unanswered "do you ship to Canada?" or a scam link under the creative costs money. On an organic post, the goal is the conversation, and real criticism stays up. On a live stream, replies have to be short.&lt;/p&gt;

&lt;h2&gt;
  
  
  What gets hidden
&lt;/h2&gt;

&lt;p&gt;Moderation works by meaning, not keyword lists. We hide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;links and masked links&lt;/li&gt;
&lt;li&gt;promo pitches: "use my code", "sign up at", "download the app"&lt;/li&gt;
&lt;li&gt;comments promoting another brand, game or service&lt;/li&gt;
&lt;li&gt;accounts posing as the page, with a name the same as or close to the page's&lt;/li&gt;
&lt;li&gt;requests for money, sob stories included&lt;/li&gt;
&lt;li&gt;copy-paste waves: the same text repeated on a post, by one author or several&lt;/li&gt;
&lt;li&gt;people pushing others to contact them ("PM me", "add me"), judged from their recent comments&lt;/li&gt;
&lt;li&gt;insults and slurs aimed at the page&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When we catch a spammer, their other visible comments on that post go too. On Facebook, images, GIFs and stickers in comments are checked as well.&lt;/p&gt;

&lt;p&gt;What we never hide: a fan tagging a friend, price and discount-code questions, and real criticism on organic posts. Under ads the line moves. A comment calling the ad fake or a scam, or trashing the product, costs clicks, so there it gets hidden.&lt;/p&gt;

&lt;p&gt;Every platform ships native filters, but Instagram's Hidden Words and Facebook's blocked words work by word lists, and a word list can't tell "this is a scam" from "is this a scam?".&lt;/p&gt;

&lt;h2&gt;
  
  
  Staying quiet is a feature
&lt;/h2&gt;

&lt;p&gt;The rule I'd defend hardest: when the bot has no reliable answer, it says nothing.&lt;/p&gt;

&lt;p&gt;Replies draw on three sources: the post itself, a per-page context library (shipping, prices, hours, returns), and general knowledge for questions that need none of the page's facts. If someone asks about a return policy the library doesn't hold, a confident guess is worse than silence. The owner sees the comment in the dashboard and answers it, and that manual answer goes into the library for next time.&lt;/p&gt;

&lt;h2&gt;
  
  
  A voice without prompts
&lt;/h2&gt;

&lt;p&gt;Nobody writes a system prompt for their page. The voice is built from what the page has already published: captions, past replies, the profile, media. Tone, slang, emoji habits and reply length come from there. Under ads, the voice is set per ad, so a reply fits that campaign's tone and audience.&lt;/p&gt;

&lt;p&gt;Each page also has a banned-phrases list, pre-filled with AI clichés like "great question". Those give a bot away faster than anything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pacing
&lt;/h2&gt;

&lt;p&gt;Instant replies look like a bot, to people and to platforms. Replies go out after a variable delay, by default somewhere between 30 seconds and 35 minutes, adjustable per page. Hiding spam doesn't wait.&lt;/p&gt;

&lt;p&gt;Before a reply goes out, we check the thread again. If the owner already answered by hand, their answer stands and ours is never posted. If the comment was deleted or hidden on the platform in the meantime, nothing is posted either.&lt;/p&gt;

&lt;p&gt;This is also the line between our kind of comment bot and the kind that gets accounts banned. Those post near-identical comments on other people's content, fast. Ours only acts on comments under the accounts you connect, through each platform's official API, and never comments on anyone else's posts.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the four APIs forced on us
&lt;/h2&gt;

&lt;p&gt;Same decision, four sets of rules. A few that shaped the code:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Likes don't exist everywhere.&lt;/strong&gt; Facebook (posts and ads) and TikTok let an app like a comment. Instagram and YouTube have no like call. So when the model decides "like" there, it becomes a deliberate ignore, and we record it as an ignore rather than a like we never sent.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;carryOut&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Verdict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;platform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Platform&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Action&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;canLike&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;platform&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'facebook'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;platform&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'tiktok'&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'like'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;canLike&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s1"&gt;'ignore'&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;TikTok replies max out at 150 characters.&lt;/strong&gt; A reply over the limit isn't posted at all. On our own replies from September, 99% of 22-word replies came in at 148 characters or fewer, so TikTok replies are asked for 22 words or fewer. Anything still too long is dropped, never cut mid-sentence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;On YouTube, hiding means "held for review", and it works once.&lt;/strong&gt; The API hides a comment by holding it for review, and YouTube keeps a held comment for up to 60 days. A comment that was held and then brought back can't be held again: the API answers with success and leaves it public. So on YouTube, the second hide is final. We store the window with each hide, so the dashboard knows how long an undo is still possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Account types matter.&lt;/strong&gt; Instagram works only on professional accounts (Creator or Business), and Instagram Live comments aren't available through Meta's API at all. Facebook works on Pages, not personal profiles or Groups.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Edits differ.&lt;/strong&gt; Our replies can be edited after posting on Facebook and YouTube. On Instagram and TikTok they can only be deleted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it runs
&lt;/h2&gt;

&lt;p&gt;Creators, brands and media buyers use it to hide spam, scam links and abuse, and to auto-reply to comments under their posts and ads. It covers Facebook Pages (posts, ads and live streams), Instagram professional accounts, TikTok and YouTube channels. The per-platform details are on the &lt;a href="https://reply200.com/tiktok-comment-bot/" rel="noopener noreferrer"&gt;TikTok comment bot&lt;/a&gt;, &lt;a href="https://reply200.com/facebook-comment-bot/" rel="noopener noreferrer"&gt;Facebook comment bot&lt;/a&gt;, &lt;a href="https://reply200.com/instagram-comment-moderation/" rel="noopener noreferrer"&gt;Instagram comment moderation&lt;/a&gt; and &lt;a href="https://reply200.com/youtube-comment-moderation/" rel="noopener noreferrer"&gt;YouTube comment moderation&lt;/a&gt; pages. Plans start at $29 a month, with a 7-day free trial (card required).&lt;/p&gt;

&lt;p&gt;Happy to answer questions in the comments, especially about the platform quirks.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>automation</category>
      <category>socialmedia</category>
    </item>
  </channel>
</rss>
