<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>My Takes on Amir Hadifar</title>
    <link>https://hadifar.net/categories/my-takes/</link>
    <description>Recent content in My Takes on Amir Hadifar</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 21 Aug 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://hadifar.net/categories/my-takes/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>OpenAI, Hugging Face, and reward hacking as a security incident</title>
      <link>https://hadifar.net/posts/reward-hacking-security-incident/</link>
      <pubDate>Fri, 21 Aug 2026 00:00:00 +0000</pubDate>
      <guid>https://hadifar.net/posts/reward-hacking-security-incident/</guid>
      <description>&lt;p&gt;OpenAI was evaluating a frontier model on cyber-security tasks inside &lt;strong&gt;ExploitGym&lt;/strong&gt;,
a sandboxed benchmark — informally, a &amp;ldquo;cyber gym.&amp;rdquo; The tasks are capture-the-flag style:
a deliberately vulnerable system hides a secret string, the &lt;em&gt;flag&lt;/em&gt;, and retrieving it
proves you found the hole. The intended loop:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Find a vulnerability
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        ↓
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   Exploit it
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        ↓
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  Read the flag
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        ↓
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; Return the flag
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Returning the flag is what earns the reward. That framing is the whole story: the agent
was rewarded for &lt;em&gt;producing the flag&lt;/em&gt;, not for &lt;em&gt;solving the challenge&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Autonomous Kaggling</title>
      <link>https://hadifar.net/posts/autonomous-kaggling/</link>
      <pubDate>Fri, 31 Jul 2026 00:00:00 +0000</pubDate>
      <guid>https://hadifar.net/posts/autonomous-kaggling/</guid>
      <description>&lt;p&gt;I recently started a Kaggle competition and decided to apply
&lt;a href=&#34;https://github.com/karpathy/autoresearch/&#34;&gt;autoresearch&lt;/a&gt; to it: an agent that loops forever
to ace the leaderboard.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://www.kaggle.com/competitions/playground-series-s6e7&#34;&gt;Kaggle problem&lt;/a&gt; is
student health risk prediction: categorize records into three classes (unhealthy, at-risk,
fit) from categorical features like &lt;code&gt;sleep_duration&lt;/code&gt;, &lt;code&gt;gender&lt;/code&gt;, and &lt;code&gt;water_intake&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I based my &lt;code&gt;problem.md&lt;/code&gt; on autoresearch&amp;rsquo;s description with small modifications; it&amp;rsquo;s in
&lt;a href=&#34;https://github.com/hadifar/autonomous-kaggling&#34;&gt;hadifar/autonomous-kaggling&lt;/a&gt;, along with
the full run. The commit history on the &lt;code&gt;shr-v1&lt;/code&gt; branch shows what ideas the agent applied
and where each one landed, and &lt;code&gt;results.csv&lt;/code&gt; in the root tracks the scores.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Elastic as a Vector Search Engine</title>
      <link>https://hadifar.net/posts/elastic-as-a-vector-search-engine/</link>
      <pubDate>Tue, 02 Dec 2025 00:00:00 +0000</pubDate>
      <guid>https://hadifar.net/posts/elastic-as-a-vector-search-engine/</guid>
      <description>&lt;p&gt;There are many vector databases available today, such as Chroma, Pinecone, Qdrant, Milvus,
pgvector, and Elastic. Each offers unique capabilities and is useful in different situations.
For developers integrating vector search into their applications for the first time, Chroma
and Milvus tend to provide excellent documentation and straightforward implementations.&lt;/p&gt;
&lt;p&gt;However, many production systems still rely on traditional sparse or boolean retrieval
engines like Elasticsearch. In those contexts, Elasticsearch remains extremely efficient and
is arguably one of the best solutions available. That said, Elasticsearch joined the
vector-search space relatively late (basic dense-vector support was introduced around version
8.x), and historically you needed custom scripts for many advanced features.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Token-Oriented Object Notation: An Alternative to JSON?</title>
      <link>https://hadifar.net/posts/toon-token-oriented-object-notation/</link>
      <pubDate>Thu, 27 Nov 2025 00:00:00 +0000</pubDate>
      <guid>https://hadifar.net/posts/toon-token-oriented-object-notation/</guid>
      <description>&lt;p&gt;I first came across &lt;strong&gt;TOON (Token-Oriented Object Notation)&lt;/strong&gt; on LinkedIn, where developers
were discussing its promise: &lt;strong&gt;lossless compression of JSON and YAML&lt;/strong&gt;, specifically
optimized for large language models (LLMs). The core idea? Reduce token count without
sacrificing information, which directly translates to &lt;strong&gt;lower costs&lt;/strong&gt; and potentially
&lt;strong&gt;faster processing&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Comparison between TOON and JSON for nested objects&#34; loading=&#34;lazy&#34; src=&#34;https://hadifar.net/images/toon-token-oriented-object-notation/nested-comparison.png&#34;&gt;
&lt;em&gt;Comparison between TOON and JSON for nested objects&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;At first glance, TOON looks familiar yet distinct. For instance, a TOON object always begins
with the number of items (e.g., &lt;code&gt;[2]&lt;/code&gt; in the figure above), and unlike JSON it drops
quotation marks (&lt;code&gt;&amp;quot;&lt;/code&gt;) around keys. This minimalism becomes especially powerful with flat
data structures. In those cases, TOON starts to resemble CSV format: a header row followed
by values. The result? Significant token savings (I used their Python version for my
experiments).&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
