<?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>openai on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/openai/</link>
    <description>Recent content in openai on S Anand</description>
    <generator>Hugo -- 0.156.0</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 26 May 2026 22:36:06 +0800</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/openai/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Erdos Unit Distance Problem</title>
      <link>https://www.s-anand.net/blog/erdos-unit-distance-problem/</link>
      <pubDate>Tue, 26 May 2026 22:36:06 +0800</pubDate>
      <guid>https://www.s-anand.net/blog/erdos-unit-distance-problem/</guid>
      <description>&lt;p&gt;An OpenAI model &lt;a href=&#34;https://openai.com/index/model-disproves-discrete-geometry-conjecture/&#34;&gt;solved&lt;/a&gt; the &lt;a href=&#34;https://mathworld.wolfram.com/ErdosUnitDistanceProblem.html&#34;&gt;Erdos unit distance problem&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Erdos roughly said, &amp;ldquo;The number of edges of the same distance between N points can&amp;rsquo;t compound faster than close to 0%.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The model found a method of placing points so that it compounds at about 1.4%.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sanand0.github.io/datastories/erdos-planar-unit/&#34;&gt;This visualization&lt;/a&gt; is a crude way of visualizing how that works.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sanand0.github.io/datastories/erdos-planar-unit/&#34;&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://sanand0.github.io/datastories/erdos-planar-unit/screenshot.avif&#34;&gt;&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <title>OpenAI Prism for LaTeX</title>
      <link>https://www.s-anand.net/blog/openai-prism-for-latex/</link>
      <pubDate>Thu, 29 Jan 2026 14:52:00 +0800</pubDate>
      <guid>https://www.s-anand.net/blog/openai-prism-for-latex/</guid>
      <description>&lt;p&gt;OpenAI launched &lt;a href=&#34;https://openai.com/prism/&#34;&gt;Prism&lt;/a&gt; - an AI LaTeX IDE.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a boon for anyone writing LaTeX documents. All the nitty-gritty of formatting, syntax, etc. is handled by AI. You can collaborate, too. It brings the power of AI code editors to scientific document editing.&lt;/p&gt;
&lt;p&gt;It still has some way to go, though. I asked it to convert a portion of &lt;a href=&#34;https://d1wqtxts1xzle7.cloudfront.net/43007775/2_-_Chemical_routes_for_the_transformation_of_biomass_into_chemicals-libre.pdf&#34;&gt;this paper&lt;/a&gt; into LaTeX. Here&amp;rsquo;s the image I passed:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://d1wqtxts1xzle7.cloudfront.net/43007775/2_-_Chemical_routes_for_the_transformation_of_biomass_into_chemicals-libre.pdf&#34;&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://files.s-anand.net/images/2026-01-29-openai-prism-input.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;hellip; and here&amp;rsquo;s the &lt;a href=&#34;https://prism.openai.com/?u=a0df2c6f-a17a-4c7d-b353-d3f38dd6b363&amp;amp;pg=1&amp;amp;m=main.tex&amp;amp;d=7&#34;&gt;LaTeX output it generated&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://prism.openai.com/?u=a0df2c6f-a17a-4c7d-b353-d3f38dd6b363&amp;amp;pg=1&amp;amp;m=main.tex&amp;amp;d=7&#34;&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://files.s-anand.net/images/2026-01-29-openai-prism-output.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The number of errors it made are too many to list. So, it&amp;rsquo;s still some way from being picture-perfect. But for those experimenting, not publishing, it&amp;rsquo;s a useful accelerator.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: I assumed that (because the chemical formulas looked so different) it had misread the image. But experts tell me that it actually got it right! So, Prism (and the underlying GPT models) may not be perfect but are certainly better than I thought.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>OpenAI TTS cost</title>
      <link>https://www.s-anand.net/blog/openai-tts-cost/</link>
      <pubDate>Sun, 02 Nov 2025 05:12:32 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/openai-tts-cost/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;OpenAI TTS cost&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/doodle.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;The OpenAI &lt;a href=&#34;https://platform.openai.com/docs/guides/text-to-speech&#34;&gt;text-to-speech&lt;/a&gt; cost documentation is confusing.&lt;/p&gt;
&lt;p&gt;As of 2 Nov 2025:&lt;/p&gt;
&lt;ul class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/gpt-4o-mini-tts&#34;&gt;GPT-4o mini TTS&lt;/a&gt; costs $0.60 / MTok input and $12.00 / MTok audio output according to the &lt;a href=&#34;https://platform.openai.com/docs/models/gpt-4o-mini-tts&#34;&gt;model page&lt;/a&gt; and the &lt;a href=&#34;https://platform.openai.com/docs/pricing&#34;&gt;pricing page&lt;/a&gt;. They also estimate this to be ~1.5c per minute - both for input and output. It supports up to 2,000 tokens input.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/tts-1&#34;&gt;TTS-1&lt;/a&gt; costs $15 / MTok speech generated according to the &lt;a href=&#34;https://platform.openai.com/docs/models/tts-1&#34;&gt;model page&lt;/a&gt; but the &lt;a href=&#34;https://platform.openai.com/docs/pricing&#34;&gt;pricing page&lt;/a&gt; says it&#39;s $15 / MChars. No estimate per minute is provided. Is supports up to 4,096 characters input.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://platform.openai.com/docs/models/tts-1-hd&#34;&gt;TTS-1 HD&lt;/a&gt; is twice as expensive as TTS-1&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I wanted to find the approximate total cost for a typical text input measured per character and token.&lt;/p&gt;
&lt;p&gt;I converted this &lt;a href=&#34;podcast.txt&#34;&gt;podcast&lt;/a&gt; with 4,096 ASCII characters and 877 tokens on &lt;a href=&#34;https://github.com/openai/tiktoken&#34;&gt;o200k_base&lt;/a&gt; using:&lt;/p&gt;
&lt;p&gt;I ran:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl https://api.openai.com/v1/audio/speech &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_API_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -d &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;jq -n --arg text &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;cat podcast.txt&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;{
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    model: &amp;#34;tts-1&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    voice: &amp;#34;coral&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    input: $text
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;  }&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --output tts-1.mp3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This took 46 seconds to generate and produced a 5.1 MB MP3 file (256 seconds)&lt;/p&gt;
&lt;p&gt;To measure the cost, I ran:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl &lt;span class=&#34;s2&#34;&gt;&amp;#34;https://api.openai.com/v1/organization/costs?start_time=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date -d &lt;span class=&#34;s1&#34;&gt;&amp;#39;1 day ago&amp;#39;&lt;/span&gt; +%s&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;project_ids=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$PROJECT_ID&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;group_by=line_item&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_ADMIN_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This cost: &lt;strong&gt;USD 0.061425&lt;/strong&gt;. Then I ran:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl https://api.openai.com/v1/audio/speech &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_API_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -d &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;jq -n --arg text &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;cat podcast.txt&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s1&#34;&gt;&amp;#39;{
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    model: &amp;#34;gpt-4o-mini-tts&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    voice: &amp;#34;coral&amp;#34;,
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;    input: $text
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;s1&#34;&gt;  }&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  --output gpt-4o-mini-tts.mp3
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This took 44 seconds to generate and produced a 4.3 MB MP3 file (268 seconds).&lt;/p&gt;
&lt;p&gt;When I ran the admin API call again, the costs did not reflect for 5 minutes. So I ran it the GPT-4o mini TTS call again with the same input. This took 44 seconds to generate a 4.3 MB MP3 file. When I ran the admin API call again, the total cost for &lt;strong&gt;the 2 requests&lt;/strong&gt; was: &lt;strong&gt;USD 0.12942&lt;/strong&gt; audio output and USD 0.0010524 input.&lt;/p&gt;
&lt;p&gt;I also checked for TTS-1 HD. Here are the costs in USD:&lt;/p&gt;
&lt;figure class=&#34;wp-block-table&#34;&gt;&lt;table class=&#34;has-fixed-layout&#34;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Model&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;$ / MTok&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;$ / MChars&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;$ / hour&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Time (s)&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Audio (s)&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Cost $&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;GPT-4o mini TTS&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;74.4&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;15.9&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.876&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;46&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;268&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.0652&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TTS-1&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;70.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;15.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.864&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;44&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;256&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.0614&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;TTS-1 HD&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;140.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;30.0&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;1.728&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;62&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;257&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0.1228&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;
&lt;p&gt;The GPT-4o mini TTS audio output cost was USD 0.06471 for the input of 877 tokens, i.e. $73.8 / MTok. Since the actual cost is $12 / MTok, this is a 6.15x multiplier. I guess &lt;strong&gt;1 input text token produces ~6 output audio tokens&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In terms of quality:&lt;/p&gt;
&lt;ul class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;GPT-4o mini TTS: Very slightly robotic. Looser interpretation of text (e.g. says &#34;October&#34; when I write &#34;Oct&#34;).&lt;/li&gt;
&lt;li&gt;TTS-1: Natural. Strict interpretation of text.&lt;/li&gt;
&lt;li&gt;TTS-1 HD: Very slightly more natural. Strict interpretation of text.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;I will likely use TTS-1 for now&lt;/strong&gt; given the cost difference is small and the quality is good enough.&lt;/p&gt;
&lt;hr class=&#34;wp-block-separator has-alpha-channel-opacity&#34;/&gt;
&lt;p&gt;Incidentally, the &lt;a href=&#34;https://platform.openai.com/docs/api-reference/usage/audio_speeches&#34;&gt;usage API&lt;/a&gt; did not show an GPT 4o mini TTS line items even after 20 minutes.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;curl &lt;span class=&#34;s2&#34;&gt;&amp;#34;https://api.openai.com/v1/organization/usage/audio_speeches?start_time=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;date -d &lt;span class=&#34;s1&#34;&gt;&amp;#39;1 day ago&amp;#39;&lt;/span&gt; +%s&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;project_ids=&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$PROJECT_ID&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;amp;group_by=model&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Authorization: Bearer &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$OPENAI_ADMIN_KEY&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;se&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  -H &lt;span class=&#34;s2&#34;&gt;&amp;#34;Content-Type: application/json&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>When to choose AI over humans</title>
      <link>https://www.s-anand.net/blog/when-to-choose-ai-over-humans/</link>
      <pubDate>Tue, 28 Oct 2025 04:37:14 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/when-to-choose-ai-over-humans/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;When to choose AI over humans&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/image-13.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;I charted the &lt;a href=&#34;https://openai.com/index/gdpval/&#34;&gt;OpenAI GDPVal paper&lt;/a&gt; with industry compensation as the size and AI augmentation as color. Big green areas are we&amp;rsquo;re paying people where AI does better.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sanand0.github.io/datastories/gdpval&#34;&gt;Click here to see the interactive visualization&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Clicking to see some actual tasks compared.&lt;/p&gt;
&lt;p&gt;I use this to check whom to ask advice: AI or professional.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI beats Personal Financial Advisors&lt;/strong&gt; ~64% of the time. So I invested half my money using ChatGPT&amp;rsquo;s recommendation. (UTI Nifty 50, if you&amp;rsquo;re curious.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Accountants beat AI&lt;/strong&gt; 76% of the time. So my tax returns are still filed by &lt;a href=&#34;https://venturapranas.com/&#34;&gt;Ventura Pranas&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI beats Government&lt;/strong&gt; - Administrative Services Managers 62% of the time. I haven&amp;rsquo;t figured out how to bypass them yet. Nor customer service representatives.&lt;/p&gt;
&lt;p&gt;Overall, AI beats most managers and clerks, not industrial engineers and pharmacists.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s my current thought where I wouldn&amp;rsquo;t hire AI if a &lt;strong&gt;high portion&lt;/strong&gt; of their work&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Has &lt;strong&gt;legal liability&lt;/strong&gt; (e.g. pharmacist/judge vs shop attendant/lawyer)&lt;/li&gt;
&lt;li&gt;Is &lt;strong&gt;subjective&lt;/strong&gt; (e.g. perfumer/auction appraiser vs lab chemist/insurance appraiser)&lt;/li&gt;
&lt;li&gt;Needs rapid contextual &lt;strong&gt;decisions&lt;/strong&gt; (e.g. detective/fireman/ER vs parking enforcer)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;But this apart, if they charged half, would their demand double? If so, even with AI, they&amp;rsquo;ll have more demand.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.linkedin.com/posts/sanand0_i-charted-the-openai-gdpval-paper-with-industry-activity-7388795644661985281-njlc&#34;&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 10 Aug 2025</title>
      <link>https://www.s-anand.net/blog/things-i-learned-10-aug-2025/</link>
      <pubDate>Sun, 10 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-10-aug-2025/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OpenAI supports a tool &lt;code&gt;&amp;quot;type&amp;quot;: &amp;quot;custom&amp;quot;&lt;/code&gt; that lets it write code as an argument to a tool call. Great for code / SQL generation. Even more powerfully, you can generate output following specific grammars, e.g. STL files, PostgreSQL dialect, Mermaid/PlantUML diagrams, OpenAPI specs, Vega-Lite JSONs, Cron expressions, GraphQL SDLs, Dockerfiles, Terraform HCLs, or any DSL! &lt;a href=&#34;https://cookbook.openai.com/examples/gpt-5/gpt-5_new_params_and_tools&#34;&gt;#&lt;/a&gt; #ai-coding&lt;/li&gt;
&lt;li&gt;The OpenAI playground has a &lt;a href=&#34;https://platform.openai.com/chat/edit?models=gpt-5&amp;amp;optimize=true&#34;&gt;GPT-5 Prompt Optimizer&lt;/a&gt; that can migrate prompts to GPT-5.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.npmjs.com/package/docsify/v/4.13.1&#34;&gt;Docsify 4.13.1&lt;/a&gt; is 2 years old and &lt;a href=&#34;https://github.com/docsifyjs/docsify/blob/v4.13.1/package.json#L68&#34;&gt;uses&lt;/a&gt; &lt;a href=&#34;https://www.npmjs.com/package/marked/v/1.2.9&#34;&gt;marked@1.2.9&lt;/a&gt; which is 5 years old. Newer plugins like &lt;a href=&#34;https://www.npmjs.com/package/marked-directive&#34;&gt;marked-directive&lt;/a&gt; don&amp;rsquo;t work with it. Though &lt;a href=&#34;https://github.com/docsifyjs/docsify/tree/v5.0.0-rc.1&#34;&gt;docsify v5.0.0-rc1&lt;/a&gt; is in development, it may be the better option for modern Markdown plugins. &lt;a href=&#34;https://github.com/sanand0/smartart/blob/e4c5bb88eba3aa3cd92d6711a9e29935cc36e62f/script.js&#34;&gt;Here&amp;rsquo;s sample code&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;CommonMark has a &lt;em&gt;powerful&lt;/em&gt; &lt;a href=&#34;https://talk.commonmark.org/t/generic-directives-plugins-syntax/444&#34;&gt;directive syntax&lt;/a&gt; proposal that lets you add classes, attributes, and arbitrary plugins to Markdown. For example, &lt;code&gt;:abbr[MD]{#id .class title=&amp;quot;Markdown&amp;quot;}&lt;/code&gt; for inline directives. Plugins exist for &lt;a href=&#34;https://www.npmjs.com/package/marked-directive&#34;&gt;marked&lt;/a&gt;, &lt;a href=&#34;http://npmjs.com/package/markdown-it-directive&#34;&gt;markdown-it&lt;/a&gt; and &lt;a href=&#34;https://github.com/remarkjs/remark-directive&#34;&gt;remark&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://biomejs.dev/&#34;&gt;biomejs&lt;/a&gt; and &lt;a href=&#34;https://dprint.dev/&#34;&gt;dprint&lt;/a&gt; are gaining traction as &lt;a href=&#34;https://prettier.io/&#34;&gt;prettier&lt;/a&gt; alternatives. I&amp;rsquo;m yet to try them but keen to explore.
&lt;ul&gt;
&lt;li&gt;Skip biomejs for now. It uses tabs (not spaces) and does not respect .gitignore by default. Handling these is too much work.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;⭐ Code generation is more flexible than tool calling. LLMs can&amp;rsquo;t write a tool-call loop, for example, but they can write code to run an API in a loop. So, I like telling the LLM to &amp;ldquo;write code using these APIs&amp;rdquo; than giving it APIs to tool-call. #ai-coding&lt;/li&gt;
&lt;li&gt;&lt;code&gt;npx -y ccusage&lt;/code&gt; is an easy way of summarizing your &lt;a href=&#34;https://docs.anthropic.com/en/docs/claude-code/overview&#34;&gt;Claude Code&lt;/a&gt; usage and cost. My cost so far (since 21 July) is about $10. The median session cost is ~50 cents. Most of it ($7) was from a single temporary coding chat that I kept continuing for way too long, building up the context window. &lt;a href=&#34;https://github.com/ryoppippi/ccusage&#34;&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/kepano/defuddle&#34;&gt;defuddle&lt;/a&gt; can be used in the browser to get the main content from web pages. A replacement for Mozilla Readability. &lt;a href=&#34;https://stephango.com/defuddle&#34;&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://kashw1n.com/blog/nodejs-2025/&#34;&gt;Modern Node.js Patterns for 2025&lt;/a&gt; include these 5 features I&amp;rsquo;m excited by:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Single-executable bundling&lt;/strong&gt;. &lt;code&gt;node --experimental-sea-config sea-config.json&lt;/code&gt; builds standalone binaries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ES Modules&lt;/strong&gt;. Use &lt;code&gt;node:&lt;/code&gt; prefix for built-in imports. &lt;code&gt;import { createServer } from &#39;node:http&#39;;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Watch mode&lt;/strong&gt;. Use &lt;code&gt;node --watch file.js&lt;/code&gt; auto-reloads when &lt;code&gt;file.js&lt;/code&gt; or dependencies change.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Env file&lt;/strong&gt;. Use &lt;code&gt;node --env-file=.env&lt;/code&gt; loads &lt;code&gt;.env&lt;/code&gt; as environment variables.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;node:test&lt;/code&gt;&lt;/strong&gt; is a full-featured test framework with &lt;code&gt;--watch&lt;/code&gt; and coverage.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Concise explanations speed up decisions because they&amp;rsquo;re faster to read and understand (obvious). They&amp;rsquo;re also easier to combine with other ideas (less obvious). &lt;a href=&#34;https://stephango.com/concise&#34;&gt;#&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve been uncertain about &lt;a href=&#34;https://htmx.org/&#34;&gt;htmx&lt;/a&gt; for some time now. This tutorial, &lt;a href=&#34;https://github.com/BookOfCooks/blog/blob/master/htmx-is-hard-so-lets-get-it-right.md&#34;&gt;HTMX is hard, so let&amp;rsquo;s get it right&lt;/a&gt;, convinced me that it&amp;rsquo;s too far from my mental model, so I&amp;rsquo;m unlikely to ever use it.&lt;/li&gt;
&lt;li&gt;⭐ Slow, effortful practice (spaced recall, interleaving topics, self-testing) builds lasting knowledge but looks inefficient and doesn&amp;rsquo;t help with exams. &lt;a href=&#34;https://chatgpt.com/share/689180c7-03a0-800c-a5d4-5a455429e97f&#34;&gt;#&lt;/a&gt; #beliefs&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gitdoc&#34;&gt;GitDoc VS Code extension&lt;/a&gt; auto-commits and syncs notes. I dropped &lt;a href=&#34;https://github.com/gitwatch/gitwatch&#34;&gt;gitwatch&lt;/a&gt; in favor of this.&lt;/li&gt;
&lt;li&gt;It&amp;rsquo;s interesting that Gemini Deep Research cannot access Google Drive while Gemini can. On the other hand, ChatGPT Deep Research can access Google Drive but ChatGPT cannot.&lt;/li&gt;
&lt;li&gt;A trend that AI coding will only accelerate: &amp;ldquo;It is now possible for tiny teams to make principled software that millions of people use, unburdened by investors. &amp;hellip; you need far less money and far fewer employees to reach far more customers. That wave is only just beginning.&amp;rdquo; &lt;a href=&#34;https://stephango.com/vcware&#34;&gt;#&lt;/a&gt; #ai-coding&lt;/li&gt;
&lt;li&gt;Typed languages are better suited for vibe coding. This will likely lead to the growth of typed languages (TypeScript, Rust, Go) but also of typing in untyped languages (e.g. Python) &lt;a href=&#34;https://solmaz.io/typed-languages-are-better-suited-for-vibecoding&#34;&gt;#&lt;/a&gt; #ai-coding&lt;/li&gt;
&lt;li&gt;Instead of Celery, Redis, Kafka, etc. as task queues, we could the file system as a message queue. For example, &lt;code&gt;pending/task-01.json&lt;/code&gt; moves to &lt;code&gt;wip/task-01.json&lt;/code&gt; to &lt;code&gt;done/task-01.json&lt;/code&gt;. Folders for state/tags, files for task details.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://foambubble.github.io/&#34;&gt;Foam&lt;/a&gt; is a note-taking VS Code extension. The &lt;a href=&#34;https://foambubble.github.io/foam/user/features/wikilinks&#34;&gt;WikiLinks&lt;/a&gt;, &lt;a href=&#34;https://foambubble.github.io/foam/user/features/tags&#34;&gt;tags&lt;/a&gt; and &lt;a href=&#34;https://foambubble.github.io/foam/user/features/backlinking&#34;&gt;backlinking&lt;/a&gt; features align &lt;em&gt;naturally&lt;/em&gt; with Markdown note-taking. Via &lt;a href=&#34;https://stephango.com/vault&#34;&gt;Steph Ango&lt;/a&gt; who uses Obsidian which nudged me to search for WikiLink-ing features in VS Code.&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;m an open data hawk. But here are things I should remind myself of. &lt;a href=&#34;https://chatgpt.com/c/68901fb2-38b0-8333-9853-7e6c2fdaf97c&#34;&gt;#&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Privacy incubates creativity&lt;/strong&gt;. People self-censor when watched. Privacy shields fragile ideas.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Power assymetry&lt;/strong&gt;. Big players can leverage openness more, e.g. Cambridge Analytics + Facebook data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context matters&lt;/strong&gt;. What&amp;rsquo;s harmless in one setting can be toxic in another.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One-way door&lt;/strong&gt;. Data can&amp;rsquo;t be unshared. Don&amp;rsquo;t scrap brakes dreaming of perfect roads. Anticipate tyrannical regimes / cultures.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not your call&lt;/strong&gt;. You don&amp;rsquo;t share your neighbour&amp;rsquo;s medical records.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/One-Punch_Man&#34;&gt;One Punch Man&lt;/a&gt; is available as &lt;a href=&#34;https://onepunchmanmangaa.com/&#34;&gt;manga&lt;/a&gt;. I watched the anime first and assumed that came first. Apparently not.&lt;/li&gt;
&lt;li&gt;⭐ In &amp;ldquo;kind&amp;rdquo; environments (stable rules, rapid and accurate feedback), specialize. In &amp;ldquo;wicked&amp;rdquo; environments (rules shift, feedback is noisy/late), generalize. &lt;a href=&#34;https://chatgpt.com/share/68902bbf-bf58-800c-b6b5-9ae787fa9c26&#34;&gt;ChatGPT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Models&amp;rsquo; ability to orchestrate longer workflows will improve. Factor that into your application design. Claude Code can already handle over 70 tasks in a workflow&lt;/li&gt;
&lt;li&gt;What happens when LLMs play Chinese Whispers / the &lt;a href=&#34;https://en.wikipedia.org/wiki/Telephone_game&#34;&gt;Telephone Game&lt;/a&gt;? Here are learnings. &lt;a href=&#34;https://chatgpt.com/share/68904271-6d10-800c-9084-8ae28668df92&#34;&gt;ChatGPT&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Drift increases faster than linear with hops.&lt;/li&gt;
&lt;li&gt;Bigger models do better, but constrained prompts (“Copy the text exactly; change nothing.”) have a bigger impact.&lt;/li&gt;
&lt;li&gt;Low temperature improves copying fidelity.&lt;/li&gt;
&lt;li&gt;But even after &amp;ldquo;forgetting&amp;rdquo;, LLMs reproduce rare content if they&amp;rsquo;re trained on it.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&amp;ldquo;In fact, React Native looks set to become the most engine-agnostic JavaScript runtime around&amp;rdquo;. &lt;a href=&#34;https://buttondown.com/whatever_jamie/archive/the-many-many-many-javascript-runtimes-of-the-last-decade/&#34;&gt;The Many, Many, Many, JavaScript Runtimes of the Last Decade&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.omdbapi.com/&#34;&gt;OMDb&lt;/a&gt; (simple) and &lt;a href=&#34;https://www.themoviedb.org/&#34;&gt;TMDb&lt;/a&gt; (comprehensive) are API-friendly alternatives to the IMDb.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/9001/copyparty&#34;&gt;copyparty&lt;/a&gt; seems one of the most feature-rich file servers out there. Single Python file, runs on any OS, works with any client, and optimized for speed. &lt;a href=&#34;https://youtu.be/15_-hgsX2V0&#34;&gt;Video&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Quotes I enjoyed from &lt;a href=&#34;https://youtu.be/o8NPllzkFhE&#34;&gt;Linus Torvalds&amp;rsquo; TED interview&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;I want to not have external stimulation. You can kind of see, on the walls are this light green. I&amp;rsquo;m told that at mental institutions they use that on the walls. It&amp;rsquo;s like a calming color. &amp;hellip; the main thing I worry about in my computer is &amp;ndash; it really has to be completely silent. If the cat comes up, it sits in my lap. And I want to hear the cat purring.&lt;/li&gt;
&lt;li&gt;I did not start Linux as a collaborative project. I started it as one in a series of many projects I had done at the time for myself, partly because I needed the end result, but even more because I just enjoyed programming.&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;m actually not a people person. But I do love other people who comment and get involved in my project.&lt;/li&gt;
&lt;li&gt;The big point for me was not being alone and having 10, maybe 100 people being involved. Going from 100 people to a million people is not a big deal &amp;ndash; to me. Well, I mean, maybe it is if you want to sell your result then it&amp;rsquo;s a huge deal. But if you&amp;rsquo;re interested in the technology and you&amp;rsquo;re interested in the project, the big part was getting the community.&lt;/li&gt;
&lt;li&gt;So Git is my second big project, which was only created for me to maintain my first big project. And this is literally how I work.&lt;/li&gt;
&lt;li&gt;Well, I do code for fun &amp;ndash; but I want to code for something meaningful so every single project I&amp;rsquo;ve ever done has been something I needed.&lt;/li&gt;
&lt;li&gt;Apparently, my sister said that my biggest exceptional quality was that I would not let go.&lt;/li&gt;
&lt;li&gt;I can&amp;rsquo;t do UI to save my life.&lt;/li&gt;
&lt;li&gt;Good taste is about really seeing the big patterns and kind of instinctively knowing what&amp;rsquo;s the right way to do things.&lt;/li&gt;
&lt;li&gt;Companies like Google and many others have made, arguably, like, billions of dollars out of your software. Does that piss you off? No. No, it doesn&amp;rsquo;t piss me off for several reasons. And one of them is, I&amp;rsquo;m doing fine. But the other reason is &amp;ndash; I mean, without doing the whole open source and really letting go thing, Linux would never have been what it is.&lt;/li&gt;
&lt;li&gt;I think one reason open source works so well in code (is that &amp;hellip;) Code either works or it doesn&amp;rsquo;t.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://usesthis.com/&#34;&gt;Uses This&lt;/a&gt; site has interviewed professionals for decades. From their &lt;a href=&#34;https://github.com/waferbaby/usesthis&#34;&gt;repo&lt;/a&gt; I scraped the top developer apps post 2020:&lt;/li&gt;
&lt;li&gt;CloudFlare has an Iceberg data catalog in &lt;a href=&#34;https://developers.cloudflare.com/r2/data-catalog/&#34;&gt;R2 Data Catalog&lt;/a&gt;. Iceberg is like Parquet but supports metadata, time-travel, and schema edits. But I&amp;rsquo;m yet to find a single publicly accessible Iceberg catalog. Its open-data adoption is not as high as Parquet&amp;rsquo;s. &lt;a href=&#34;https://chatgpt.com/share/688f0b61-f9d8-800c-a7c8-46410ab4f1ab&#34;&gt;Apache Iceberg vs Parquet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://observablehq.com/notebook-kit/&#34;&gt;Observable Notebook 2&lt;/a&gt; is the new notebook format from Mike Bostock. It is vanilla JS and embeddable into other pages. THis would have been a big deal 2 years ago, but with the LLM ecosystem today, I&amp;rsquo;m not sure if it matters as much.&lt;/li&gt;
&lt;li&gt;To add CORS support to CloudFlare pages protected by Zero Trust, add a &lt;a href=&#34;https://developers.cloudflare.com/pages/configuration/headers/&#34;&gt;&lt;code&gt;_headers&lt;/code&gt;&lt;/a&gt; file to your repo. (This is different from the &lt;a href=&#34;https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/cors/&#34;&gt;Zero Trust CORS&lt;/a&gt; which allows automated logins.) Sample &lt;code&gt;_headers&lt;/code&gt; that lets logged-in users fetch pages via &lt;code&gt;fetch(&amp;quot;...&amp;quot;, { credentials: &amp;quot;include&amp;quot; })&lt;/code&gt;:
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;/*
  Access-Control-Allow-Credentials: true
  Access-Control-Allow-Origin: https://your-site.example.com
  Access-Control-Allow-Methods: GET, HEAD
  Access-Control-Allow-Methods: *
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;As corporates restrict the use of LLMs, I see employees purchasing personal laptops to use LLMs on. An interesting trend!&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/openai/openai-python&#34;&gt;&lt;code&gt;openai-python&lt;/code&gt;&lt;/a&gt; has a CLI. You can run &lt;code&gt;uvx openai api chat.completions.create --stream -m gpt-4.1-nano -g developer &#39;Translate to Chinese&#39; -g user &amp;quot;Hello&amp;quot;&lt;/code&gt; for example&lt;/li&gt;
&lt;li&gt;Anthropic has an &lt;a href=&#34;https://docs.anthropic.com/en/api/openai-sdk&#34;&gt;OpenAI compatible API&lt;/a&gt; at &lt;code&gt;https://api.anthropic.com/v1/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Claude Code tips from &lt;a href=&#34;https://lucumr.pocoo.org/2025/7/30/things-that-didnt-work/&#34;&gt;Things that didn&amp;rsquo;t work&lt;/a&gt; by Armin Rocher #ai-coding
&lt;ul&gt;
&lt;li&gt;Speech-to-text. Cannot stress this enough but talking to the machine means you’re more likely to share more about what you want it to do.&lt;/li&gt;
&lt;li&gt;I maintain some basic prompts and context for copy-pasting at the end or the beginning of what I entered.&lt;/li&gt;
&lt;li&gt;I ended up preloading executables on the PATH that override the default ones, steering Claude toward the right tools, e.g. running &lt;code&gt;python&lt;/code&gt; asks it to use &lt;code&gt;uv&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;I use the task tool frequently for basic parallelization and context isolation.&lt;/li&gt;
&lt;li&gt;Simply taking time to talk to the machine and give clear instructions outperforms elaborate pre-written prompts.&lt;/li&gt;
&lt;li&gt;Forcing myself to evaluate the automation has another benefit: I’m less likely to just blindly assume it helps me.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Research indicates that we don&amp;rsquo;t know in advance which prompts will help. Evals beat prompt engineering. &lt;a href=&#34;https://bsky.app/profile/emollick.bsky.social/post/3lvgwdwn7422w&#34;&gt;Ethan Mollick&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Are LLMs any good at mental math?</title>
      <link>https://www.s-anand.net/blog/are-llms-any-good-at-mental-math/</link>
      <pubDate>Sun, 27 Apr 2025 09:52:10 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/are-llms-any-good-at-mental-math/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;Are LLMs any good at mental math?&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/image-1-1.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;I asked 50 LLMs to multiply 2 numbers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;12 x 12&lt;/li&gt;
&lt;li&gt;123 x 456&lt;/li&gt;
&lt;li&gt;1,234 x 5,678&lt;/li&gt;
&lt;li&gt;12,345 x 6,789&lt;/li&gt;
&lt;li&gt;123,456 x 789,012&lt;/li&gt;
&lt;li&gt;1,234,567 x 8,901,234&lt;/li&gt;
&lt;li&gt;987,654,321 x 123,456,789&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;LLMs aren&amp;rsquo;t good tools for math and this is just an informal check. But the results are interesting:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Model&lt;/th&gt;
          &lt;th&gt;%Win&lt;/th&gt;
          &lt;th&gt;Q1&lt;/th&gt;
          &lt;th&gt;Q2&lt;/th&gt;
          &lt;th&gt;Q3&lt;/th&gt;
          &lt;th&gt;Q4&lt;/th&gt;
          &lt;th&gt;Q4&lt;/th&gt;
          &lt;th&gt;Q6&lt;/th&gt;
          &lt;th&gt;Q7&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;openai:o3&lt;/td&gt;
          &lt;td&gt;86%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openrouter:openai/o1-mini&lt;/td&gt;
          &lt;td&gt;86%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openrouter:openai/o3-mini-high&lt;/td&gt;
          &lt;td&gt;86%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openrouter:openai/o4-mini&lt;/td&gt;
          &lt;td&gt;86%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openrouter:openai/o4-mini-high&lt;/td&gt;
          &lt;td&gt;86%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;deepseek/deepseek-chat-v3-0324&lt;/td&gt;
          &lt;td&gt;71%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openai/gpt-4.1-mini&lt;/td&gt;
          &lt;td&gt;71%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openai/gpt-4.5-preview&lt;/td&gt;
          &lt;td&gt;71%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openai/gpt-4o&lt;/td&gt;
          &lt;td&gt;71%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openrouter:openai/o3-mini&lt;/td&gt;
          &lt;td&gt;71%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;anthropic/claude-3-opus&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;anthropic/claude-3.5-haiku&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;anthropic/claude-3.7-sonnet:thinking&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemini-2.0-flash-001&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemini-2.0-flash-lite-001&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemini-2.5-flash-preview&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemini-2.5-flash-preview:thinking&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemini-2.5-pro-preview-03-25&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemini-flash-1.5&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemini-pro-1.5&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemma-3-12b-it&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemma-3-27b-it&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-4-maverick&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-4-scout&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openai/gpt-4-turbo&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openai/gpt-4.1&lt;/td&gt;
          &lt;td&gt;57%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;amazon/nova-lite-v1&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;amazon/nova-pro-v1&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;anthropic/claude-3-haiku&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;anthropic/claude-3.5-sonnet&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-3.1-405b-instruct&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-3.1-70b-instruct&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-3.2-3b-instruct&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-3.3-70b-instruct&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openai/gpt-4.1-nano&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openai/gpt-4o-mini&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;qwen/qwen-2-72b-instruct&lt;/td&gt;
          &lt;td&gt;43%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;anthropic/claude-3-sonnet&lt;/td&gt;
          &lt;td&gt;29%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;deepseek/deepseek-r1&lt;/td&gt;
          &lt;td&gt;29%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemini-flash-1.5-8b&lt;/td&gt;
          &lt;td&gt;29%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemma-3-4b-it&lt;/td&gt;
          &lt;td&gt;29%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-3-8b-instruct&lt;/td&gt;
          &lt;td&gt;29%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-3.1-8b-instruct&lt;/td&gt;
          &lt;td&gt;29%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;openai/gpt-3.5-turbo&lt;/td&gt;
          &lt;td&gt;29%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;amazon/nova-micro-v1&lt;/td&gt;
          &lt;td&gt;14%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-2-13b-chat&lt;/td&gt;
          &lt;td&gt;14%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-3-70b-instruct&lt;/td&gt;
          &lt;td&gt;14%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-3.2-1b-instruct&lt;/td&gt;
          &lt;td&gt;14%&lt;/td&gt;
          &lt;td&gt;✅&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;google/gemma-3-1b-it:free&lt;/td&gt;
          &lt;td&gt;0%&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;meta-llama/llama-2-70b-chat&lt;/td&gt;
          &lt;td&gt;0%&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;-&lt;/td&gt;
          &lt;td&gt;-&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
          &lt;td&gt;❌&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Average&lt;/td&gt;
          &lt;td&gt;&lt;/td&gt;
          &lt;td&gt;96%&lt;/td&gt;
          &lt;td&gt;86%&lt;/td&gt;
          &lt;td&gt;66%&lt;/td&gt;
          &lt;td&gt;58%&lt;/td&gt;
          &lt;td&gt;24%&lt;/td&gt;
          &lt;td&gt;10%&lt;/td&gt;
          &lt;td&gt;0%&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;OpenAI&amp;rsquo;s reasoning models cracked it, scoring 6/7, stumbling only on the 9-digit multiplication.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/o1-mini&#34;&gt;openai/o1-mini&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/o3&#34;&gt;openai/o3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/o3-mini-high&#34;&gt;openai/o3-mini-high&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/o4-mini&#34;&gt;openai/o4-mini&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/o4-mini-high&#34;&gt;openai/o4-mini-high&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Models use human-like mental math tricks. For example, O3-Mini-High calculated 1234567 × 8901234 using a recursive strategy.&lt;/p&gt;
&lt;p&gt;```markdown To calculate 1234567 × 8901234, one useful method is to break the second number into two parts:   8901234 = 8900000 + 1234 Then the product becomes:   1234567 × 8901234 = 1234567 × 8900000 + 1234567 × 1234 Step 1. Compute 1234567 × 8900000:   Notice that 8900000 = 89 × 100000. So first compute 1234567 × 89.   Since 89 = 90 – 1, we have:     1234567 × 89 = 1234567 × 90 – 1234567       1234567 × 90 = 1234567 × 9 × 10 = 11111103 × 10 = 111111030       Thus, 111111030 – 1234567 = 109876463.   Now multiply by 100000:     109876463 × 100000 = 10987646300000 Step 2. Compute 1234567 × 1234:   Break 1234 into parts:     1234 = 1000 + 200 + 30 + 4   Now multiply each and add:     1234567 × 1000 = 1234567000     1234567 × 200 = 246913400     1234567 × 30 = 37037010     1234567 × 4 = 4938268   Add these together:     1234567000 + 246913400 = 1481480400     1481480400 + 37037010 = 1518517410     1518517410 + 4938268 = 1523455678 Step 3. Add both products:   10987646300000 + 1523455678 = 10989169755678 Thus, the product of 1234567 and 8901234 is 10989169755678 ```&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OpenAI&amp;rsquo;s other models and DeepSeek V3 were next, getting the first 5/7 right.&lt;/strong&gt; Notably: GPT 4.1 Mini beat GPT 4.1. DeepSeek V3 beat DeepSeek R1.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/deepseek/deepseek-chat-v3-0324&#34;&gt;deepseek/deepseek-chat-v3-0324&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/gpt-4.1-mini&#34;&gt;openai/gpt-4.1-mini&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/gpt-4.5-preview&#34;&gt;openai/gpt-4.5-preview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/gpt-4o&#34;&gt;openai/gpt-4o&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/o3-mini&#34;&gt;openai/o3-mini&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;DeepSeek V3 double-checks results and hallucinates a &amp;ldquo;reliable computational tool&amp;rdquo;.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;To calculate (1234567 × 8901234), let&amp;#39;s break it down using the &lt;span class=&#34;gs&#34;&gt;**distributive property of multiplication over addition**&lt;/span&gt;:
&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;&lt;span class=&#34;k&#34;&gt;1.&lt;/span&gt; &lt;span class=&#34;gs&#34;&gt;**Express 8901234 as (9000000 - 98766)**&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   [8901234 = 9000000 - 98766]
&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;&lt;span class=&#34;k&#34;&gt;2.&lt;/span&gt; &lt;span class=&#34;gs&#34;&gt;**Multiply 1234567 by each part**&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   [1234567 × 9000000 = 1234567 × 9 × 10^6 = 11111103000000]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   [1234567 × 98766 = 1234567 × (100000 - 12234) = 123456700000 - 15095721278 = 108360978722]
&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;   &lt;span class=&#34;ge&#34;&gt;_Note_&lt;/span&gt;: Further breakdown of (1234567 × 12234) was calculated separately and subtracted here.
&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;&lt;span class=&#34;k&#34;&gt;3.&lt;/span&gt; &lt;span class=&#34;gs&#34;&gt;**Combine the results**&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   [11111103000000 - 108360978722 = 1020274222278]
&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;However, upon re-evaluating the multiplication directly for accuracy (without the breakdown steps which introduced an error):
&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;[1234567 × 8901234 = 10989343694778]
&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;But correcting the previous breakdown:
&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;&lt;span class=&#34;k&#34;&gt;1.&lt;/span&gt; &lt;span class=&#34;gs&#34;&gt;**Express 8901234 as (9000000 - 98766)**&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   [1234567 × 9000000 = 11111103000000]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   [1234567 × 98766 = 1234567 × 90000 + 1234567 × 8000 + 1234567 × 700 + 1234567 × 60 + 1234567 × 6]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   [= 111111030000 + 9877653600 + 864196900 + 74074020 + 7407402 = 121616470922]
&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;&lt;span class=&#34;k&#34;&gt;2.&lt;/span&gt; &lt;span class=&#34;gs&#34;&gt;**Combine the results**&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   [11111103000000 - 121616470922 = 1098934369078]
&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;It appears there was an inconsistency in the intermediate steps. For precision, let&amp;#39;s verify with another method:
&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;&lt;span class=&#34;gs&#34;&gt;**Using the standard multiplication method**&lt;/span&gt;:
&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;[1234567 × 8901234]
&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;Calculating each part:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 8000000 = 9877653600000]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 900000 = 1111110300000]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 100 = 123456700]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 200 = 246913400]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 30 = 37037010]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 4 = 4938268]
&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;Adding them together:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[9877653600000 + 1111110300000 = 10988763900000]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[10988763900000 + 123456700 = 10988887356700]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[10988887356700 + 246913400 = 10989134270100]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[10989134270100 + 37037010 = 10989171307110]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[10989171307110 + 4938268 = 10989176245378]
&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;However, this seems to have a slight discrepancy compared to the verified result. Upon cross-checking with a reliable computational tool:
&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;&lt;span class=&#34;gs&#34;&gt;**Final Accurate Calculation**&lt;/span&gt;:
&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;[1234567 × 8901234 = 10989343694778]
&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;But to ensure correctness, let&amp;#39;s verify step-by-step with another approach:
&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;&lt;span class=&#34;gs&#34;&gt;**Breakdown of 8901234**&lt;/span&gt;:
&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;[8901234 = 8000000 + 900000 + 100 + 200 + 30 + 4]
&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;Now, multiply each by 1234567:
&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;[1234567 × 8000000 = 9877653600000]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 900000 = 1111110300000]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 100 = 123456700]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 200 = 246913400]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 30 = 37037010]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[1234567 × 4 = 4938268]
&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;Adding these up:
&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;[9877653600000 + 1111110300000 = 10988763900000]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[10988763900000 + 123456700 = 10988887356700]
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;[10988887356700 + 246913400 = 109891342]
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;O3 Mini reframes 8901234 as (9000000 − 98766) to simplify the calculation.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;To calculate 1234567 times 8901234, follow these steps:
&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;&lt;span class=&#34;k&#34;&gt;1.&lt;/span&gt; Express 8901234 as 9000000 − 98766.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     So, 1234567 × 8901234 = 1234567 × 9000000 − 1234567 × 98766.
&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;&lt;span class=&#34;k&#34;&gt;2.&lt;/span&gt; Calculate the first part:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     1234567 × 9000000 = 1234567 × 9 × 1000000.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     Since 1234567 × 9 = 11111103,
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     it becomes 11111103 × 1000000 = 11111103000000.
&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;&lt;span class=&#34;k&#34;&gt;3.&lt;/span&gt; Calculate the second part:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     Write 98766 as 100000 − 234.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     Then, 1234567 × 98766 = 1234567 × 100000 − 1234567 × 234.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     &lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; 1234567 × 100000 = 123456700000.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     &lt;span class=&#34;k&#34;&gt;-&lt;/span&gt; To compute 1234567 × 234, break it into:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      – 1234567 × 200 = 246913400
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      – 1234567 × 34 = (1234567 × 30) + (1234567 × 4)
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       ○ 1234567 × 30 = 37037010
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       ○ 1234567 × 4 = 4938268
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;       – Sum: 37037010 + 4938268 = 41975278
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      Then, 1234567 × 234 = 246913400 + 41975278 = 288888678.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     Thus, 1234567 × 98766 = 123456700000 − 288888678 = 123167811322.
&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;&lt;span class=&#34;k&#34;&gt;4.&lt;/span&gt; Now, subtract the second part from the first part:
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;     11111103000000 − 123167811322 = 10987935188678.
&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;So, 1234567 times 8901234 equals 10987935188678.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;16 models, including the latest Gemini, Anthropic, Grok, and Llama models get 4/7 right.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/anthropic/claude-3-opus&#34;&gt;anthropic/claude-3-opus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/anthropic/claude-3.5-haiku&#34;&gt;anthropic/claude-3.5-haiku&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/anthropic/claude-3.7-sonnet:thinking&#34;&gt;anthropic/claude-3.7-sonnet:thinking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/google/gemini-2.0-flash-001&#34;&gt;google/gemini-2.0-flash-001&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/google/gemini-2.0-flash-lite-001&#34;&gt;google/gemini-2.0-flash-lite-001&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/google/gemini-2.5-flash-preview&#34;&gt;google/gemini-2.5-flash-preview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/google/gemini-2.5-flash-preview:thinking&#34;&gt;google/gemini-2.5-flash-preview:thinking&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/google/gemini-2.5-pro-preview-03-25&#34;&gt;google/gemini-2.5-pro-preview-03-25&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/google/gemini-flash-1.5&#34;&gt;google/gemini-flash-1.5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/google/gemini-pro-1.5&#34;&gt;google/gemini-pro-1.5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/google/gemma-3-12b-it&#34;&gt;google/gemma-3-12b-it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/google/gemma-3-27b-it&#34;&gt;google/gemma-3-27b-it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/meta-llama/llama-4-maverick&#34;&gt;meta-llama/llama-4-maverick&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/meta-llama/llama-4-scout&#34;&gt;meta-llama/llama-4-scout&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/gpt-4-turbo&#34;&gt;openai/gpt-4-turbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/openai/gpt-4.1&#34;&gt;openai/gpt-4.1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/x-ai/grok-3-beta&#34;&gt;x-ai/grok-3-beta&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openrouter.ai/x-ai/grok-3-mini-beta&#34;&gt;x-ai/grok-3-mini-beta&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;The Amazon models, older Llama, Anthropic, Google, OpenAI models get 3 or less right.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;View the results at &lt;a href=&#34;https://sanand0.github.io/llmmath/&#34;&gt;https://sanand0.github.io/llmmath/&lt;/a&gt;. Hover over the cells to see the reasoning traces (where available).&lt;a href=&#34;https://github.com/sanand0/llmmath#can-llms-do-mental-math&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.linkedin.com/feed/update/urn%3Ali%3Ashare%3A7321858062711955457&#34;&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 27 Apr 2025</title>
      <link>https://www.s-anand.net/blog/things-i-learned-27-apr-2025/</link>
      <pubDate>Sun, 27 Apr 2025 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-27-apr-2025/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OpenAI&amp;rsquo;s reasoning models are much ahead of other models when multiplying two numbers in their heads. &lt;a href=&#34;https://sanand0.github.io/llmmath/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;⭐ &lt;a href=&#34;https://promptfoo.dev/&#34;&gt;Promptfoo&lt;/a&gt; may be the most mature open source LLM evals tool. &lt;a href=&#34;https://simonwillison.net/2025/Apr/24/exploring-promptfoo/&#34;&gt;Simon Willison&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Dyson_sphere&#34;&gt;Dyson Sphere&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://lemonslice.com/live&#34;&gt;LemonSlice&lt;/a&gt; showcases real-time audio-video models (avatars) that are close enough to real.&lt;/li&gt;
&lt;li&gt;Notes from &lt;a href=&#34;https://iclr.cc/&#34;&gt;Latent Space ICLR 2025, Singapore&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Daniel: &lt;a href=&#34;https://github.com/menloresearch/ReZero&#34;&gt;Menlo&amp;rsquo;s ReZero&lt;/a&gt;. A model that &lt;em&gt;keeps&lt;/em&gt; searching till it finds the answer.
&lt;ul&gt;
&lt;li&gt;There are multiple search techniques: Multi-step retreival, Iterative retrieval, Query rewriting. Also, reasoning.&lt;/li&gt;
&lt;li&gt;The LLM token generation sequence is normally: &lt;code&gt;&amp;lt;think&amp;gt;, &amp;lt;search&amp;gt;, &amp;lt;answer&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Insight: &amp;ldquo;If we explicitly reward LLMs for retrying after a failed search, they out-perform one-attempt systems.&amp;rdquo; So &lt;code&gt;&amp;lt;think&amp;gt;, &amp;lt;search&amp;gt;, &amp;lt;think&amp;gt;, &amp;lt;search&amp;gt;, &amp;lt;think&amp;gt;, &amp;lt;search&amp;gt;, &amp;lt;answer&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;⭐ Prompt reasoning models, e.g. &amp;ldquo;Keep searching till you find the best answer.&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Roger, Nous Research
&lt;ul&gt;
&lt;li&gt;Supervised learning is limited because accuracy is piece-wise linear, i.e. it&amp;rsquo;s broken up. Continuous optimization is meaningless.&lt;/li&gt;
&lt;li&gt;Reinforcement learning works better because rewards can be discrete. (But it converts things back into differentiable loss functions behind the scenes.)
&lt;ul&gt;
&lt;li&gt;Rewards can be good/bad. Single or multi-step. Whatever.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;We&amp;rsquo;re in the &amp;ldquo;Era of experience&amp;rdquo;, i.e. models gain experience from the environment themselves.&lt;/li&gt;
&lt;li&gt;⭐ So, we need environments models can learn in. This is the next thing after training data. That needs a standard for environments.&lt;/li&gt;
&lt;li&gt;We&amp;rsquo;d need a model, a trainer, and the environment.&lt;/li&gt;
&lt;li&gt;The environments whatever capabilities. Run code. Browser. A game. &amp;hellip; With an exposed interface&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Eugene Cheah (Featherless.ai)
&lt;ul&gt;
&lt;li&gt;Transformer architectures need n-square GPUs as # of tokens grow. Featherless is exploring an RWKV architecture that scales linearly. THere are other such architectures. Performer, Linformer, Reformer, Hyena.&lt;/li&gt;
&lt;li&gt;Mistral-Nemo-12b-ic is one of the most popular fine-tuned model. It&amp;rsquo;s small enough to run on a server.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Justus Mattern (Prime Intellect)
&lt;ul&gt;
&lt;li&gt;Intellect-2 is a continously learning (RL) model that uses decentralized training on peer-to-peer GPUs.&lt;/li&gt;
&lt;li&gt;Solving problems on bandwidth, verifiable contributions, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;ChatGPT Deep Research now also has an O4-Mini version to serve smaller reports. Free users get 0 original + 5 lightweight 5 tasks / month. $20 version gets 10 + 15. $200 version gets 100 + 150. The month begins on first use of Deep Research and runs on a 30 day &amp;ldquo;window&amp;rdquo;. &lt;a href=&#34;https://help.openai.com/en/articles/10500283-deep-research-faq&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;O4-Mini-High is great at going through an under-documented repo and finding things. For example, &lt;a href=&#34;https://chatgpt.com/share/680b3d21-0188-800c-a0bf-8b44a1edd919&#34;&gt;here&amp;rsquo;s how I configured &lt;code&gt;cmdg&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;ChatGPT is my new Jupyter Notebook :-)&lt;/li&gt;
&lt;li&gt;Google announced new AI capabilities at Google Next APAC 2025. &lt;a href=&#34;https://workspace.google.com/blog/product-announcements/new-AI-drives-business-results&#34;&gt;Blog&lt;/a&gt;. Interesting ones are:
&lt;ul&gt;
&lt;li&gt;@Gemini in chat&lt;/li&gt;
&lt;li&gt;Google Meet support for &amp;ldquo;Catch me up&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Google Vids: Create short video clips&lt;/li&gt;
&lt;li&gt;Google Sheets: does better analysis&lt;/li&gt;
&lt;li&gt;Google Slides: image generation&lt;/li&gt;
&lt;li&gt;Google Docs: Create Audio Clips (like NotebookLM in Google Docs)&lt;/li&gt;
&lt;li&gt;Google Docs: &amp;ldquo;Help me refine&amp;rdquo; is better than before&lt;/li&gt;
&lt;li&gt;Google Workspace Flows&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/insanum/gcalcli&#34;&gt;gcalcli&lt;/a&gt; is a convenient way to export Google Calendar. Example: &lt;code&gt;uvx gcalcli agenda --tsv 2025-01-01 2025-01-05&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/ThomasHabets/cmdg&#34;&gt;cmdg&lt;/a&gt; is a command line GMail client that I&amp;rsquo;ve now switched to for quick email checks. 80% of my email is spam and this is good enough to scan and delete those. It also avoids running a 200-500 MB tab in the browser that constantly shows me how many unread emails I have.&lt;/li&gt;
&lt;li&gt;From &lt;a href=&#34;https://shows.acast.com/worklife-with-adam-grant/episodes/cancelling-cancel-culture-with-loretta-ross&#34;&gt;Worklife with Adam Grant: Cancelling cancel culture with Loretta Ross&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Lighten up! Fighting Nazis should be fun. It&amp;rsquo;s being a Nazi that sucks. If you&amp;rsquo;re not having fun fighting for hope and joy and human rights, maybe you&amp;rsquo;re doing the fight wrong. We are the ones who should be having fun.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;You can say what you mean. But you don&amp;rsquo;t have to say it mean.&amp;rdquo; There is always a way to put it across better. Refusing to say mean things is about to discover these approaches.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;The true mark of a lifelong learner is knowing that you can learn something from every single person you meet.&amp;rdquo; If you remember that, you can&amp;rsquo;t be a know it all.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://pypi.org/project/semantic-text-splitter/&#34;&gt;semantic-text-splitter&lt;/a&gt; could be the go-to text splitter. It&amp;rsquo;s Rust-based, supports MarkdownSplitter, and multiple tokenizers. Alternatives like &lt;a href=&#34;https://pypi.org/project/semchunk/&#34;&gt;semchunk&lt;/a&gt;, &lt;a href=&#34;https://pypi.org/project/advanced-chunker/&#34;&gt;advanced-chunker&lt;/a&gt;, &lt;a href=&#34;https://github.com/chonkie-inc/chonkie&#34;&gt;chonkie&lt;/a&gt;, etc. seem clunkier.&lt;/li&gt;
&lt;li&gt;ULID is like UUID but time-sortable. That&amp;rsquo;s an improvement over timestamp IDs (definitely) and potentially even UUIDs. They can be generated by clients as a globally unique ID. Try &lt;a href=&#34;https://github.com/mdomke/python-ulid&#34;&gt;&lt;code&gt;pip install python-ulid&lt;/code&gt;&lt;/a&gt; and &lt;a href=&#34;https://github.com/ulid/javascript&#34;&gt;&lt;code&gt;npm install ulid&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://www.cpsc.gov/Data&#34;&gt;Consumer Product Safety Commission Data&lt;/a&gt; has thousands of reports of product safety over time&lt;/li&gt;
&lt;li&gt;You can run &lt;code&gt;xclip -sel clip -o | pandoc -f markdown -t html --no-highlight | xclip -sel clip -t text/html -i&lt;/code&gt; to convert Markdown in the clipboard to rich text. But &lt;code&gt;xclip&lt;/code&gt; doesn&amp;rsquo;t support multiple selections, so the text is lost. &lt;a href=&#34;https://chatgpt.com/share/68071421-07a4-800c-a286-0d8b624c27e4&#34;&gt;ChatGPT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://duckdb.org/2025/03/12/duckdb-ui.html&#34;&gt;DuckDB UI &amp;amp; Notebooks&lt;/a&gt; will potentially be a good alternative to Datasette, DBeaver, etc. But for now, there are still glitches. It crashes with a &lt;code&gt;SIGSEGV (Address boundary error)&lt;/code&gt; when connecting to SQLite databases.&lt;/li&gt;
&lt;li&gt;Ollama limits MAX_TOKENS to 2K by default.&lt;/li&gt;
&lt;li&gt;AI assisted search helps wherever I would have used Google, e.g.
&lt;ul&gt;
&lt;li&gt;Debugging. &amp;ldquo;Fix CUDA initialization: CUDA unknown error&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Tool search. &amp;ldquo;Find an online word counter tool.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Library search. &amp;ldquo;Find a JS micro library to render Markdown.&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;OpenAI API capabilites lag ChatGPT features. For example:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;o4-mini&lt;/code&gt; via the API does &lt;em&gt;not&lt;/em&gt; search the web natively as part of its reasoning.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;o4-mini&lt;/code&gt;, &lt;code&gt;o3&lt;/code&gt;, &lt;code&gt;o3-mini&lt;/code&gt;, &lt;code&gt;o1&lt;/code&gt;, &lt;code&gt;gpt-4.1-nano&lt;/code&gt; don&amp;rsquo;t yet support the &lt;code&gt;web_search_preview&lt;/code&gt; tool. Only &lt;code&gt;gpt-4.1&lt;/code&gt; and &lt;code&gt;gpt-4.1-mini&lt;/code&gt; do. &lt;a href=&#34;https://platform.openai.com/docs/guides/tools-web-search?api-mode=responses#limitations&#34;&gt;Limitations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Search results are NOT visible via the API. They&amp;rsquo;re fed directly to the model. The number of searches or results is unknown. Each search costs 0.25-0.5 cents. &lt;a href=&#34;https://openai.com/api/pricing/&#34;&gt;Pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;For reasoning traces (e.g. &lt;code&gt;.reasoning.summary: &amp;quot;medium&amp;quot;&lt;/code&gt;) you need to verify your organization via &lt;a href=&#34;https://withpersona.com/&#34;&gt;withpersona.com&lt;/a&gt; which failed with my Indian passport AND Singapore work permit.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The ChatGPT Plus plan ($20) gives you 50 O4 mini messages a day, which I exceeded!
It&amp;rsquo;s supposed to reset at midnight UTC &lt;a href=&#34;https://community.openai.com/t/limitations-on-the-openai-o-series-reasoning-models-on-chatgpt/1230183/2&#34;&gt;Ref&lt;/a&gt;
but might operate on a rolling window &lt;a href=&#34;https://chatgpt.com/share/68070ba9-04c0-800c-901e-c3c6e8048f9d&#34;&gt;ChatGPT&lt;/a&gt;.
&amp;ldquo;Currently, there is no way to check how many messages you have used in your usage budget.&amp;rdquo;
&lt;a href=&#34;https://help.openai.com/en/articles/9824962-openai-o3-and-o4-mini-usage-limits-on-chatgpt-and-the-api&#34;&gt;OpenAI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.signalbloom.ai/&#34;&gt;SignalBloom&lt;/a&gt; reads SEC filings and writes analyst reports on it using LLMs&lt;/li&gt;
&lt;li&gt;&amp;ldquo;Evaluation in the loop&amp;rdquo; or &amp;ldquo;Evals-in-the-loop&amp;rdquo; is a new term I learnt. &lt;a href=&#34;https://www.signalbloom.ai/hallucination-benchmark&#34;&gt;SignalBloom&amp;rsquo;s Hallucination Bechmark&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;If AI interacts with the world and generates data from its own experience and learns from that, we have a new scaling mechanism. &lt;a href=&#34;https://youtu.be/zzXyPGEtseI&#34;&gt;DeepMind podcast&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;OpenAI&amp;rsquo;s search API is fairly expensive at $30+/1K calls. Typically, to read interesting HN articles, I will make 30 calls which is about 75c. Instead I should use the app and summarise HM news across different days manually based on my interests!&lt;/li&gt;
&lt;li&gt;Finally! &lt;a href=&#34;https://davepeck.org/2025/04/11/pythons-new-t-strings/&#34;&gt;t-strings&lt;/a&gt; land in Python. They&amp;rsquo;re like JavaScript template literals.&lt;/li&gt;
&lt;li&gt;DuckDB&amp;rsquo;s CSV parser might be one of the most forgiving parsers. Even better than Pandas or SQLite3. &lt;a href=&#34;https://duckdb.org/2025/04/16/duckdb-csv-pollock-benchmark&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Good managers will probably make good AI managers. AI agents can probably substitute humans in business experiments. &lt;a href=&#34;https://bsky.app/profile/emollick.bsky.social/post/3lmhuceiyfk2a&#34;&gt;Ethan Mollick&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;If Windsurf stops working, reload the extension. &lt;a href=&#34;https://github.com/Exafunction/codeium/issues/59#issuecomment-2690290023&#34;&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;TLS certificates will start expiring in 47 days from 15 Mar 2029, forcing automated domain renewals. &lt;a href=&#34;https://www.digicert.com/blog/tls-certificate-lifetimes-will-officially-reduce-to-47-days&#34;&gt;Digicert&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://wiki.nixos.org/wiki/Flakes&#34;&gt;Nix flakes&lt;/a&gt; are a reliable alternative to &lt;a href=&#34;https://containers.dev/&#34;&gt;DevContainers&lt;/a&gt; that don&amp;rsquo;t need Docker - but don&amp;rsquo;t work on Windows.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/vadimdemedes/ink&#34;&gt;Ink&lt;/a&gt; is like React for the CLI.&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://filiph.github.io/unsure/&#34;&gt;Unsure Calculator&lt;/a&gt; is a great tool to calculate formulas with &lt;em&gt;multiple&lt;/em&gt; uncertainties, like:
&lt;ul&gt;
&lt;li&gt;My office is 9-11 km away and it takes me 45-55 min to reach. So I cycle at &lt;code&gt;9~11 / 45~55 * 60&lt;/code&gt; ~ 10-14 kmph (12 most likely).&lt;/li&gt;
&lt;li&gt;I spend $6-15 on lunch and eat out 80-120 days a year. So I spend &lt;code&gt;6~15 * 80~120&lt;/code&gt; ~ $600~1550 ($1000 most likely) eating out yearly.&lt;/li&gt;
&lt;li&gt;I take 30-120 min to prepare a quiz question. Each exam has 6-12 questions. So I need &lt;code&gt;30~120 * 6~12 / 60&lt;/code&gt; = 4~20 hours (11 most likely)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Using Kiran&amp;rsquo;s &lt;a href=&#34;https://jackerhack.ing/notes/202412051824-macos-setup-for-dev&#34;&gt;macOS setup for dev&lt;/a&gt; I &lt;a href=&#34;https://github.com/sanand0/scripts/commit/ae95013019374a3b542ef5a93ea2f4295d0d86c4&#34;&gt;enabled&lt;/a&gt; colorized less and mouse options for tmux.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;time fish -i -c exit&lt;/code&gt; prints the time taken for fish startup. &lt;code&gt;fish --profile-startup ~/fish.profile -i -c exit&lt;/code&gt; prints the time taken by each command on fish startup to &lt;code&gt;~/fish.profile&lt;/code&gt;. I used this to &lt;a href=&#34;https://github.com/sanand0/scripts/commit/90d34b7239197d69c3502d1e847b79dd503c1b72&#34;&gt;speed up my fish startup&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The 8 top features of the &lt;a href=&#34;https://platform.openai.com/docs/api-reference/responses&#34;&gt;OpenAI Responses API&lt;/a&gt; that are an improvement over the Completions API (IMHO) are:
&lt;ul&gt;
&lt;li&gt;Link to previous response rather than sending history&lt;/li&gt;
&lt;li&gt;Uploading files directly&lt;/li&gt;
&lt;li&gt;Swappable system instructions while retaining the chat history&lt;/li&gt;
&lt;li&gt;Customisable reasoning effort AND reasoning summary detail&lt;/li&gt;
&lt;li&gt;Truncation in the middle option&lt;/li&gt;
&lt;li&gt;Web search context size option&lt;/li&gt;
&lt;li&gt;File search filters by file attributes&lt;/li&gt;
&lt;li&gt;Flex service tier for lower cost&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;OpenAI doesn&amp;rsquo;t charge for file storage but &lt;em&gt;does&lt;/em&gt; charge 10 cents / GB-day for vector storage beyond 1 GB. The first 1GB is free&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.augmentcode.com/&#34;&gt;Augment Code&lt;/a&gt; is an AI code editor that&amp;rsquo;s growing popular on Reddit. #ai-coding&lt;/li&gt;
&lt;li&gt;The GPT 4.1 models have a 75% discounted prompt caching (instead of the usual 50%), making them particularly suited for repetitive tasks. &lt;a href=&#34;https://openai.com/index/gpt-4-1/&#34;&gt;OpenAI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://chatgpt.com/&#34;&gt;chatgpt.com&lt;/a&gt; shortcut keys are revealed via &lt;code&gt;Ctrl + /&lt;/code&gt;. Here&amp;rsquo;s my ranking on usefulness:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Ctrl + Shift + C&lt;/code&gt;: Copy last response as Markdown!&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl + Shift + ;&lt;/code&gt;: Copy last code block&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl + Shift + S&lt;/code&gt;: Sidebar toggle&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl + Shift + O&lt;/code&gt;: Open new chat&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Shift + Esc&lt;/code&gt;: Focus chat input&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl + Shift + I&lt;/code&gt;: Ccustom instructions&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Ctrl + Shift + X&lt;/code&gt;: Delete chat&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>The Magic of Repeated ‘Improve It’ Prompts</title>
      <link>https://www.s-anand.net/blog/the-magic-of-repeated-improve-it-prompts/</link>
      <pubDate>Fri, 18 Apr 2025 10:02:37 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/the-magic-of-repeated-improve-it-prompts/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;The Magic of Repeated ‘Improve It’ Prompts&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/screenshot-1.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;What if you &lt;strong&gt;keep&lt;/strong&gt; ask an LLM &lt;code&gt;Improve the code - dramatically!&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;We used the new &lt;a href=&#34;https://platform.openai.com/docs/models/gpt-4.1-nano&#34;&gt;GPT 4.1 Nano&lt;/a&gt;, a fast, cheap, and capable model, to write code for &lt;strong&gt;simple&lt;/strong&gt; tasks like &amp;ldquo;Draw a circle&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;The we fed the output back and asked again, &lt;code&gt;Improve the code - dramatically!&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Here are the results.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/&#34;&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/screenshot-1.webp&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/circle.json&#34;&gt;&lt;code&gt;Draw a circle&lt;/code&gt;&lt;/a&gt; rose from a fixed circle to a full tool: drag it around, tweak its size and hue, and hit “Reset” to start fresh.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/shapes.json&#34;&gt;&lt;code&gt;Animate shapes and patterns&lt;/code&gt;&lt;/a&gt; turned simple circles and squares into a swarm of colored polygons that spin, pulse, and link up by distance.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/clock.json&#34;&gt;&lt;code&gt;Draw a fully functional analog clock&lt;/code&gt;&lt;/a&gt; grew from a bare face to one that builds all 60 tick marks in code—no manual copy‑paste needed.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/particles.json&#34;&gt;&lt;code&gt;Create an interactive particle simulation&lt;/code&gt;&lt;/a&gt; went from plain white dots on black to hundreds of bright, color‑shifting balls that bounce, die, and come back to life.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/fractal.json&#34;&gt;&lt;code&gt;Generate a fractal&lt;/code&gt;&lt;/a&gt; changed from a single Mandelbrot image to an explorer you can zoom, drag, and reset with sliders and the mouse wheel.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/dashboard.json&#34;&gt;&lt;code&gt;Generate a dashboard&lt;/code&gt;&lt;/a&gt; jumped from static charts to a live page with smooth card animations, modern fonts, and a real‑time stats box.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A few observations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Models are getting &lt;strong&gt;much&lt;/strong&gt; more reliable&lt;/strong&gt;. Even a low cost model like &lt;a href=&#34;https://platform.openai.com/docs/models/gpt-4.1-nano&#34;&gt;GPT 4.1 Nano&lt;/a&gt; wrote error-free code in ~100 retries.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When pushed, they tend to brag&lt;/strong&gt;. They attach grand titles like &amp;ldquo;Ultimate Interactive Circle&amp;rdquo; or &amp;ldquo;Galactic Data Universe&amp;rdquo;. They sin out flash descriptions like &amp;ldquo;This dramatically upgraded clock features a pulsating neon glow, animated pulsing background glow, highly stylized tick marks, …&amp;rdquo;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A simple prompt like &lt;code&gt;Improve it&lt;/code&gt; can spark new ideas&lt;/strong&gt;, revealing features such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/particles.json&#34;&gt;Fading particle trails&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/fractal.json&#34;&gt;Smooth fractal color maps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/dashboard.json&#34;&gt;Chart.js for dashboards&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/clock.json&#34;&gt;Cyberpunk-style clocks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;… and a &lt;a href=&#34;https://sanand0.github.io/autoimprove/#apps/shapes.json&#34;&gt;&amp;ldquo;smorgasbord of intricate animated patterns&amp;rdquo;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://files.s-anand.net/images/2025-04-18-llm-autoimprove-apps-linkedin.jpg&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.linkedin.com/feed/update/urn%3Ali%3Ashare%3A7318940431025614848&#34;&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 24 Nov 2024</title>
      <link>https://www.s-anand.net/blog/things-i-learned-24-nov-2024/</link>
      <pubDate>Sun, 24 Nov 2024 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-24-nov-2024/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OpenAI lets you download GPT instructions and execute arbitrary code in their containerized environment. This is not a bug. &lt;a href=&#34;https://0din.ai/blog/prompt-injecting-your-way-to-shell-openai-s-containerized-chatgpt-environment&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;BM25 works as follows: &lt;a href=&#34;https://emschwartz.me/understanding-the-bm25-full-text-search-algorithm/&#34;&gt;Ref&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;For each query term in the query, sum up the product of:
&lt;ul&gt;
&lt;li&gt;Inverse document frequency = LN(% of docs without the query term + 1) &amp;ndash; with a small tweak&lt;/li&gt;
&lt;li&gt;Term frequency = freq / (freq + k) &amp;ndash; where k is usually between 1.2 to 2. Returns 0-1 with diminishing frequency benefit
&lt;ul&gt;
&lt;li&gt;k is multiplied by Document length normalization = 1 - b(1- DocLength/AvgDocLength). Longer documents have larger k, dampening frequency benefits.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Some implications:
&lt;ul&gt;
&lt;li&gt;The actual BM25 score has no meaning. It&amp;rsquo;s just useful for ordering&lt;/li&gt;
&lt;li&gt;BM25 scores for 2 queries can be compared ONLY IF the document sets don&amp;rsquo;t change&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;A list of Markdown to Website converters on &lt;a href=&#34;https://news.ycombinator.com/item?id=36531937&#34;&gt;this thread&lt;/a&gt;:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://jekyllrb.com/&#34;&gt;Jekyll&lt;/a&gt; - Ruby - 2008&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.mkdocs.org/&#34;&gt;MkDocs&lt;/a&gt; - Python - 2014&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.gitbook.com/&#34;&gt;GitBook&lt;/a&gt; - JavaScript (Node.js) - 2014&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://squidfunk.github.io/mkdocs-material/&#34;&gt;MkDocs Material&lt;/a&gt; - Python (MkDocs-based) - 2016&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docsify.js.org/&#34;&gt;Docsify&lt;/a&gt; - JavaScript - 2016&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://rust-lang.github.io/mdBook/&#34;&gt;MdBook&lt;/a&gt; - Rust - 2017&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://antora.org/&#34;&gt;Antora&lt;/a&gt; - JavaScript (Node.js) - 2017&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://docusaurus.io/&#34;&gt;Docusaurus&lt;/a&gt; - JavaScript (React) - 2017&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://jupyterbook.org/&#34;&gt;JupyterBook&lt;/a&gt; - Python - 2019&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/DaveJarvis/keenwrite&#34;&gt;Keenwrite&lt;/a&gt; - Java - ~2019&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/honkit/honkit&#34;&gt;Honkit&lt;/a&gt; - JavaScript (GitBook fork) - 2019&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://nextra.site/&#34;&gt;Nextra&lt;/a&gt; - JavaScript (Next.js) - 2020&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://astro.build/&#34;&gt;Astro&lt;/a&gt; - JavaScript/TypeScript - 2021&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/alex-shpak/hugo-book&#34;&gt;Hugo Book&lt;/a&gt; - Go (Hugo-based) - ~2020&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/secretGeek/clowncar&#34;&gt;Clowncar&lt;/a&gt; - JavaScript/Node.js - ~2021&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://quarto.org/&#34;&gt;Quarto&lt;/a&gt; - R and Python - 2022&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://starlight.astro.build/&#34;&gt;Starlight&lt;/a&gt; - JavaScript/TypeScript - 2023&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://duckdb.org/duckdb-docs.md&#34;&gt;DuckDB has an LLMs.txt&lt;/a&gt;.
Today, &lt;a href=&#34;https://github.com/search?q=path%3A**%2Fllms.txt&amp;amp;type=code&#34;&gt;38 repos on GitHub support it&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;When identifying LLM use cases, it helps to tell LLMs what they can do. I use one or more of a list like below:
&lt;ul&gt;
&lt;li&gt;Core capabilities:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Text Generation:&lt;/strong&gt; Produce coherent and contextually relevant text across various domains.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Image Generation:&lt;/strong&gt; Create realistic images that match the style and content of a given reference image.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text to Speech:&lt;/strong&gt; Convert text into natural-sounding speech with appropriate intonation and rhythm.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Speech to Text:&lt;/strong&gt; Transcribe and interpret spoken language.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vision:&lt;/strong&gt; Analyze and describe visual content from images.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Video Analysis:&lt;/strong&gt; Summarize and extract information from video content.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text to Video:&lt;/strong&gt; Generate realistic (and surrealistic) videos from text descriptions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Function Calling:&lt;/strong&gt; Execute predefined functions or access external tools to perform specific tasks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structured Output:&lt;/strong&gt; Generate structured outputs like JSON, XML, HTML, YAML, DSLs, etc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tool Use:&lt;/strong&gt; Utilize external applications or APIs to enhance functionality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Code Generation:&lt;/strong&gt; Write and debug code snippets in various programming languages.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Cross-domain use cases:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Summarization:&lt;/strong&gt; Understand and condense lengthy documents into concise summaries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Translation:&lt;/strong&gt; Convert text between multiple languages with high accuracy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Question Answering:&lt;/strong&gt; Provide precise answers to user queries based on provided information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reasoning and Planning:&lt;/strong&gt; Solve complex problems and develop step-by-step plans.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Personalization:&lt;/strong&gt; Tailor responses based on user preferences and historical interactions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dialogue Management:&lt;/strong&gt; Engage in context-aware, multi-turn conversations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Analysis:&lt;/strong&gt; Interpret and generate insights from structured data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Content Moderation:&lt;/strong&gt; Identify and filter inappropriate or harmful content.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sentiment Analysis:&lt;/strong&gt; Detect and interpret emotions and opinions in text.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Robotics Integration:&lt;/strong&gt; Interface with robotic systems for control and decision-making.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Knowledge Retrieval:&lt;/strong&gt; Access and present information from vast datasets or knowledge bases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Creative Writing:&lt;/strong&gt; Generate poetry, stories, and other creative content.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Educational Assistance:&lt;/strong&gt; Provide explanations and tutoring across various subjects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ethical Reasoning:&lt;/strong&gt; Assess scenarios for ethical considerations and implications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accessibility Support:&lt;/strong&gt; Assist users with disabilities through tailored interactions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Simulation and Modeling:&lt;/strong&gt; Create predictive models and simulate scenarios.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Domain-specific use cases:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Legal and Medical Assistance:&lt;/strong&gt; Offer information and guidance within legal and medical domains.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gaming:&lt;/strong&gt; Generate narratives, dialogues, and scenarios for interactive entertainment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scientific Research:&lt;/strong&gt; Aid in literature reviews, hypothesis generation, and data interpretation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Financial Analysis:&lt;/strong&gt; Analyze market trends and provide investment insights.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cultural Competence:&lt;/strong&gt; Understand and respect diverse cultural contexts in interactions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security Applications:&lt;/strong&gt; Detect and respond to potential cybersecurity threats.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Environmental Monitoring:&lt;/strong&gt; Analyze data related to environmental changes and sustainability.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Healthcare Support:&lt;/strong&gt; Assist in patient monitoring, diagnostics, and personalized treatment plans.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Supply Chain Optimization:&lt;/strong&gt; Enhance logistics and inventory management through predictive analysis.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customer Service:&lt;/strong&gt; Provide automated support and resolve customer inquiries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Market Research:&lt;/strong&gt; Analyze consumer behavior and market trends for business insights.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Content Creation:&lt;/strong&gt; Generate articles, blogs, and marketing materials.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Virtual Assistance:&lt;/strong&gt; Manage schedules, reminders, and personal tasks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Social Media Management:&lt;/strong&gt; Craft posts and engage with audiences across platforms.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human Resources:&lt;/strong&gt; Assist in recruitment, training, and employee engagement strategies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Event Planning:&lt;/strong&gt; Organize and coordinate events, including logistics and communication.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Travel Planning:&lt;/strong&gt; Provide itineraries, booking assistance, and destination information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Real Estate:&lt;/strong&gt; Analyze property markets and assist in buying or selling decisions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Agriculture:&lt;/strong&gt; Monitor crop health and optimize farming practices through data analysis.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Energy Management:&lt;/strong&gt; Optimize energy consumption and monitor renewable energy sources.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transportation:&lt;/strong&gt; Enhance route planning and traffic management systems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Urban Planning:&lt;/strong&gt; Assist in designing sustainable and efficient urban infrastructures.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disaster Response:&lt;/strong&gt; Provide real-time information and coordination during emergencies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Public Policy:&lt;/strong&gt; Analyze data to inform policy decisions and predict societal impacts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Art and Design:&lt;/strong&gt; Generate visual art concepts and assist in creative design processes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Music Composition:&lt;/strong&gt; Create original music pieces and assist in songwriting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Language Learning:&lt;/strong&gt; Facilitate language acquisition through interactive exercises and feedback.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Historical Analysis:&lt;/strong&gt; Interpret historical data and provide insights into past events.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Philanthropy:&lt;/strong&gt; Identify charitable opportunities and assess the impact of donations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sports Analytics:&lt;/strong&gt; Analyze player performance and game strategies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fashion:&lt;/strong&gt; Predict trends and assist in clothing design and merchandising.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Culinary Arts:&lt;/strong&gt; Generate recipes and provide cooking guidance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Astronomy:&lt;/strong&gt; Analyze celestial data and assist in space exploration research.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Psychology:&lt;/strong&gt; Offer insights into human behavior and mental health support.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linguistics:&lt;/strong&gt; Analyze language patterns and assist in translation studies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Archaeology:&lt;/strong&gt; Assist in artifact analysis and historical site interpretations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Literature Analysis:&lt;/strong&gt; Interpret literary works and provide critical analyses.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Philosophy:&lt;/strong&gt; Engage in discussions on ethical dilemmas and existential questions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mathematics:&lt;/strong&gt; Solve complex equations and assist in theoretical research.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Physics:&lt;/strong&gt; Model physical phenomena and assist in experimental design.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Chemistry:&lt;/strong&gt; Analyze chemical compounds and predict reactions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Biology:&lt;/strong&gt; Assist in genetic research and ecological studies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Geology:&lt;/strong&gt; Analyze geological data and assist in natural resource exploration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Meteorology:&lt;/strong&gt; Predict weather patterns and analyze climate data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Oceanography:&lt;/strong&gt; Study marine ecosystems and assist in ocean exploration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anthropology:&lt;/strong&gt; Analyze cultural data and assist in ethnographic research.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Style of writing impacts output style a lot. E.g. Adding an evil laugh makes Claude more creative. &lt;a href=&#34;https://bsky.app/profile/emollick.bsky.social/post/3lbj766ewsc2c&#34;&gt;Ethan Mollick&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;For good structured mode output, we need good prompting.
&lt;ul&gt;
&lt;li&gt;Mentioning examples and schema and &amp;ldquo;JSON&amp;rdquo; helps. When providing examples, using (user, assistant) message pairs helps (I think it&amp;rsquo;s because it&amp;rsquo;s easier for the LLM to parse).&lt;/li&gt;
&lt;li&gt;Using a {reasoning, answer} schema (with reasoning first) helps. Make reasoning concise and relevant &lt;a href=&#34;https://blog.dottxt.co/say-what-you-mean.html&#34;&gt;Ref&lt;/a&gt; &lt;a href=&#34;https://arxiv.org/html/2408.05093v1&#34;&gt;Arxiv&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;We already know code in JSON is not a great idea. &lt;a href=&#34;https://aider.chat/2024/08/14/code-in-json.html&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Just adding 3 real examples and regurgitation helped GPT 4o play chess much better. Both techniques may have more general use in prompting. &lt;a href=&#34;https://simonwillison.net/2024/Nov/21/llm-chess/#atom-everything&#34;&gt;Simon Willison&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;With Deno 2.0, the same &lt;code&gt;.js&lt;/code&gt; file can run in Node.js as well as Deno. &lt;a href=&#34;https://chatgpt.com/share/673f44f0-cd54-800c-b9d7-7f68f7666958&#34;&gt;Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://jspm.org/&#34;&gt;jspm&lt;/a&gt; lets you generate import maps against any CDN.&lt;/li&gt;
&lt;li&gt;You can click on &lt;code&gt;htop&lt;/code&gt; columns on the terminal to sort by that column! Mouse events work on command line apps. &lt;a href=&#34;https://social.jvns.ca/@b0rk/113510202564987943&#34;&gt;Julia Evans&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Alt Text will very likely be a browser feature. It&amp;rsquo;s important for the Alt text to &lt;em&gt;flow&lt;/em&gt; as part of the content when listening to the page. Perhaps even become a part of the browser APIs like speechRecognition.&lt;/li&gt;
&lt;li&gt;Langchain suggests multiple levels of agentic behaviour. LLM Call &amp;lt; LLM Chain &amp;lt; LLM Rounter &amp;lt; State Machine &amp;lt; Autonomous &lt;a href=&#34;https://blog.langchain.dev/what-is-an-agent/&#34;&gt;Langchain&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A &lt;a href=&#34;https://secretgeek.github.io/html_wysiwyg/html.html&#34;&gt;HTML quine&lt;/a&gt;: A page that, when rendered as HTML, shows the HTML source code of the page!&lt;/li&gt;
&lt;li&gt;You can enable syntax highlighting &lt;em&gt;just using fonts&lt;/em&gt;. &lt;a href=&#34;https://blog.glyphdrawing.club/font-with-built-in-syntax-highlighting/&#34;&gt;Ref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://maxbo.me/a-html-file-is-all-you-need.html&#34;&gt;HTML is all you need&lt;/a&gt; shows examples of using HTML for notebooks instead of Jupyter, Observable, etc.&lt;/li&gt;
&lt;li&gt;Straive evaluated Gemini 1.5 Flash 002 and GPT 4o Mini for translation.
&lt;ul&gt;
&lt;li&gt;Portugese: Flash is better than GPT 4o Mini. BLEU Word Overlap is 65.5% &amp;gt; 64.6% and METEOR (Semantic) is 84.9% &amp;gt; 78.9%&lt;/li&gt;
&lt;li&gt;Mandarin: Flash is better than GPT 4o Mini. BLEU Word Overlap is 25.0% &amp;gt; 15.9% and METEOR (Semantic) is 54.7% &amp;gt; 51.1%&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;The problem with Accept headers is that you can&amp;rsquo;t link to them. &lt;a href=&#34;https://fedi.simonwillison.net/@simon/113484569366205490&#34;&gt;Simon Willison&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Recraft v3 supports vector (SVG) generation &lt;a href=&#34;https://simonwillison.net/2024/Nov/15/recraft-v3/&#34;&gt;Simon Willison&lt;/a&gt;. The output is 100% &lt;code&gt;&amp;lt;path&amp;gt;&lt;/code&gt; elements (even for text). You get 50 free credits daily. Creating 1 image is ~2 credits. The API costs $1 per 1K credits. Some things I can create with it are:
&lt;ul&gt;
&lt;li&gt;Base data visualizations that I can animate with code&lt;/li&gt;
&lt;li&gt;Icons in a specific style&lt;/li&gt;
&lt;li&gt;Comic strips&lt;/li&gt;
&lt;li&gt;Explainers for talks or student material&lt;/li&gt;
&lt;li&gt;Featured images for blog posts&lt;/li&gt;
&lt;li&gt;Architecture diagrams?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title></title>
      <link>https://www.s-anand.net/blog/structure-prompts-as-xml/</link>
      <pubDate>Fri, 20 Sep 2024 04:07:16 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/structure-prompts-as-xml/</guid>
      <description>&lt;p&gt;Looks like XML tags are the best way to structure prompts and separate sections for an #LLM. It&amp;rsquo;s the only format that all of Anthropic, Google, and OpenAI LLMs encourage.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;&lt;instructions&gt;&amp;hellip;&lt;/instructions&gt;
&lt;question&gt;&amp;hellip;&lt;/question&gt;
&lt;example&gt;&amp;hellip;&lt;/example&gt;
&lt;example&gt;&amp;hellip;&lt;/example&gt;&lt;/p&gt;
&lt;p&gt;Anthropic Docs: &lt;a href=&#34;https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags&#34;&gt;https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/use-xml-tags&lt;/a&gt;
OpenAI Docs: &lt;a href=&#34;https://platform.openai.com/docs/guides/prompt-engineering/strategy-write-clear-instructions&#34;&gt;https://platform.openai.com/docs/guides/prompt-engineering/strategy-write-clear-instructions&lt;/a&gt;
Google Docs: &lt;a href=&#34;https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/structure-prompts&#34;&gt;https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/structure-prompts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Alternatives are using JSON, Markdown, templating formats like Mustache/Jinja, etc.&lt;/p&gt;
&lt;p&gt;Even Llama&amp;rsquo;s system tokens seem a little XML-like.
&lt;a href=&#34;https://github.com/meta-llama/llama3/blob/main/llama/tokenizer.py#L61-L74&#34;&gt;https://github.com/meta-llama/llama3/blob/main/llama/tokenizer.py#L61-L74&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Personally, I&amp;rsquo;ve been using Markdown so far. But it&amp;rsquo;s time to switch over. (Only on the prompt side. On the generation side, Markdown still seems the best.)&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.linkedin.com/feed/update/urn%3Ali%3Ashare%3A7242746111097012225&#34;&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <title>How fast are LLMs in production?</title>
      <link>https://www.s-anand.net/blog/how-fast-are-llms-in-production/</link>
      <pubDate>Sun, 01 Sep 2024 05:29:54 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/how-fast-are-llms-in-production/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;How fast are LLMs in production?&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/chart-1.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;At Straive, we use an &lt;a href=&#34;https://llmfoundry.straive.com/&#34;&gt;LLM Router&lt;/a&gt;. Since ChatGPT, etc. are blocked for most people, this is the main way to access LLMs.&lt;/p&gt;
&lt;p&gt;One thing we measure is the speed of models, i.e. output tokens per second. Fast models deliver a much smoother experience for users.&lt;/p&gt;
&lt;p&gt;This is a different methodology than &lt;a href=&#34;https://artificialanalysis.ai/&#34;&gt;ArtificialAnalysis.ai&lt;/a&gt;. I&amp;rsquo;m not looking purely at the generation time but the &lt;strong&gt;total&lt;/strong&gt; time (including making the connection and the initial wait time) for all &lt;strong&gt;successful&lt;/strong&gt; requests. So, if the provider is having a slow day or is slowing down responses, these numbers will be different.&lt;/p&gt;
&lt;p&gt;Hopefully this gives you a realistic sense of speed in a production environment.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s the speed of models with &lt;strong&gt;at least 500 requests&lt;/strong&gt; over the last 2 weeks. I&amp;rsquo;ve grouped the models based on speed grades&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/chart-1.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grade 1: 100+ Tokens / second&lt;/strong&gt;. &lt;a href=&#34;https://groq.com/&#34;&gt;Groq&lt;/a&gt; is clearly serving the Llama 3 models at blazing speed. No surprises there &amp;ndash; except why &lt;a href=&#34;https://console.groq.com/settings/billing&#34;&gt;Groq &lt;strong&gt;still&lt;/strong&gt; doesn&amp;rsquo;t let me pay&lt;/a&gt;. The free tier is open with generous rate limits and the Pay per Token model has been &amp;ldquo;Coming Soon&amp;rdquo; for several months now (and I&amp;rsquo;ve no complaints 🙂).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grade 2: 70+ Tokens / second&lt;/strong&gt;. Anthropic&amp;rsquo;s &lt;a href=&#34;https://www.anthropic.com/news/claude-3-haiku&#34;&gt;Claude 3 Haiku&lt;/a&gt; is the next fastest class of models, but &lt;a href=&#34;https://www.anthropic.com/news/claude-3-5-sonnet&#34;&gt;Claude 3.5 Sonnet&lt;/a&gt; is surprisingly fast, almost as fast as Haiku and over 70 tokens per second. This is impressive.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grade 3: 50-60 Tokens / second&lt;/strong&gt;. OpenAI&amp;rsquo;s &lt;a href=&#34;https://openai.com/index/hello-gpt-4o/&#34;&gt;GPT 4o&lt;/a&gt; models are almost as fast. It&amp;rsquo;s interesting that GPT 4o and GPT 4o mini are at about the same speed! GPT 3.5 Turbo is not far behind either. Perhaps OpenAI increases capacity for slower models?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grade 4: 30-50 Tokens / second&lt;/strong&gt;. &lt;a href=&#34;https://blog.google/technology/ai/google-gemini-update-flash-ai-assistant-io-2024/&#34;&gt;Gemini 1.5 Flash&lt;/a&gt; is a &lt;strong&gt;much, much slower&lt;/strong&gt; than the &lt;a href=&#34;https://artificialanalysis.ai/models/gemini-1-5-flash/providers&#34;&gt;benchmarks&lt;/a&gt; - maybe we&amp;rsquo;re doing something wrong. &lt;a href=&#34;https://azure.microsoft.com/en-us/blog/openais-fastest-model-gpt-4o-mini-is-now-available-on-azure-ai/&#34;&gt;Azure&amp;rsquo;s GPT 4o service&lt;/a&gt; is about twice as slow as OpenAI&amp;rsquo;s, and comparable is speed with Gemini 1.5 Pro.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grade 5: &amp;lt;20 Tokens / second&lt;/strong&gt;. Azure&amp;rsquo;s GPT 3.5 Turbo and Google&amp;rsquo;s Claude 3 Sonnet are among the slowest ones. These are older models on third-party infrastructure, so I suspect they&amp;rsquo;ve been given weaker infrastructure (unlike OpenAI which is serving GPT 3.5 Turbo at 3X the speed Azure does.)&lt;/p&gt;
&lt;h3 id=&#34;drivers-of-speed&#34;&gt;Drivers of speed&lt;/h3&gt;
&lt;p&gt;Here&amp;rsquo;s what I&amp;rsquo;m taking away (informally):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;GPU architecture is the biggest driver of speed&lt;/strong&gt;. &lt;a href=&#34;https://groq.com/&#34;&gt;Groq&lt;/a&gt; is &lt;strong&gt;FAST&lt;/strong&gt;! Hopefully, the fact that they won&amp;rsquo;t let us pay isn&amp;rsquo;t a red flag that the service will vanish.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How companies operate seems the next biggest driver&lt;/strong&gt;. Anthropic&amp;rsquo;s models are consistently faster than OpenAI&amp;rsquo;s which are faster than Google&amp;rsquo;s.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Companies run their own models faster than cloud providers&lt;/strong&gt;. OpenAI is faster than Azure, and Anthropic is faster than Google for the same models.&lt;/li&gt;
&lt;/ol&gt;
</description>
    </item>
    <item>
      <title></title>
      <link>https://www.s-anand.net/blog/llm-pricing-2024-08/</link>
      <pubDate>Sat, 10 Aug 2024 10:59:35 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/llm-pricing-2024-08/</guid>
      <description>&lt;p&gt;Fascinating to see the how LLM cost-quality frontier moves. Recent fights were mostly on cost.&lt;/p&gt;
&lt;p&gt;Yesterday, #OpenAI halved the GPT-4o cost. At $2.5/MTok (and with GPT-4o-min at 15 cents/MTok), the best and cheapest models are back with OpenAI, IMHO.&lt;/p&gt;
&lt;p&gt;Sigh, time to move all our stuff back from #Anthropic. For now&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://gramener.com/llmpricing/&#34;&gt;https://gramener.com/llmpricing/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://files.s-anand.net/images/2024-08-10-llm-pricing-linkedin.gif&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.linkedin.com/feed/update/urn%3Ali%3Ashare%3A7227991971548512256&#34;&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 04 Feb 2024</title>
      <link>https://www.s-anand.net/blog/things-i-learned-04-feb-2024/</link>
      <pubDate>Sun, 04 Feb 2024 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-04-feb-2024/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://alzahravfx.com/filmography/&#34;&gt;Alzhara&lt;/a&gt; is one of the VFX companies that worked on Leo&amp;rsquo;s hyena scene. Their 3D modeling is incredible.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://huggingface.co/spaces/PatronusAI/enterprise_scenarios_leaderboard&#34;&gt;Enterprise scenarios leaderboard&lt;/a&gt;. Mistral 7B leads.&lt;/li&gt;
&lt;li&gt;Veda Srinivasan.
&lt;ul&gt;
&lt;li&gt;How does Google manage culture?
&lt;ul&gt;
&lt;li&gt;AMA sessions&lt;/li&gt;
&lt;li&gt;Manager feedback. Entirely anonymous. Avoid taking feedback for teams less than 5&lt;/li&gt;
&lt;li&gt;Workplace concerns team exists. Put managers on watch&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Books
&lt;ul&gt;
&lt;li&gt;Mohammad Younus. Three zeroes book. Read about his social business theme&lt;/li&gt;
&lt;li&gt;Pluriverse. Anti fragile. Aurobindo Vedas.&lt;/li&gt;
&lt;li&gt;Barry Oshry. Seeing systems. Runs workshops but book is better&lt;/li&gt;
&lt;li&gt;Raghu Anantanarayana has written about Indian archetypes based on Mahabharatha&lt;/li&gt;
&lt;li&gt;India that is Bharath. Sai Deepak.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Podcasts
&lt;ul&gt;
&lt;li&gt;Listen to Nilesh Oak. Sugreeva&amp;rsquo;s Atlas.&lt;/li&gt;
&lt;li&gt;Pankaj Tripathi podcast on geography influences acting&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Areas of focus
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;I&amp;rsquo;m an Expert on synthesis and implementation&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Intersectionality is another word for complex failures. Also for deep segmentation. Swiss cheese model.&lt;/li&gt;
&lt;li&gt;Dialogic self theory is about multiple voices in the head. How do we make meaning? Psychological rupture is when cognitive activity is maximum. At any point there are MULTIPLE voices in our heads that are sources of action. We don&amp;rsquo;t listen to them.&lt;/li&gt;
&lt;li&gt;Epistemology. Language determines thought. like the word productivity. How does appreciation of a rose become productive? Words from other languages may have incredible power. From other cultures.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Paul Sloan. Lateral thinking podcasts from multiple sources
&lt;ul&gt;
&lt;li&gt;Deliberately engage with topics randomly.&lt;/li&gt;
&lt;li&gt;Deliberately engage with random people&lt;/li&gt;
&lt;li&gt;Read a random book from the library&lt;/li&gt;
&lt;li&gt;Watch a random film in a different language&lt;/li&gt;
&lt;li&gt;Consciously where the six thinking hats or look hard for the silent voices in your head and express them&lt;/li&gt;
&lt;li&gt;Ask children. They tend to think of more creative and childlike solutions&lt;/li&gt;
&lt;li&gt;He converted a hiring process into a contest&lt;/li&gt;
&lt;li&gt;Constantly ask yourself. What if every assumption I&amp;rsquo;m making about this is wrong?&lt;/li&gt;
&lt;li&gt;Scenario planning is really about this. List a few scenarios. They&amp;rsquo;d have high impact or high probability. What happens in this scenario? Ideate&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You can @mention GPTs to ask a specific GPT a question in ChatGPT. This is really powerful.&lt;/li&gt;
&lt;li&gt;Hidden brain podcast. Making the most of your mistakes
&lt;ul&gt;
&lt;li&gt;FIX every small mistake. You never know how they might line up in the future&lt;/li&gt;
&lt;li&gt;You also never know how small little things done well might line up to give you a boost in the future&lt;/li&gt;
&lt;li&gt;The Toyota cord does not actually stop the production line. It brings a team lead over who quickly diagnoses the problem with you. The responsiveness of the league is a critical factor and so is encouragement&lt;/li&gt;
&lt;li&gt;That isn&amp;rsquo;t always a single bottleneck to stop that is the case of a simple failure. There can be a series of holes that happen to align perfectly.&lt;/li&gt;
&lt;li&gt;These are events that lead to catastrophic failures or successes&lt;/li&gt;
&lt;li&gt;Do as little as possible, waste as little as possible, until you know that the outcome is worthwhile.&lt;/li&gt;
&lt;li&gt;Figure out what is the value of the outcome and the most important piece of information you need to discover that&lt;/li&gt;
&lt;li&gt;Do full research before you try and fail. The aim of failure is learning at the least possible cost&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;How I write podcast. 2023 summary
&lt;ul&gt;
&lt;li&gt;Ask for feedback from friends in a specific way.&lt;/li&gt;
&lt;li&gt;What 20% should I retain no matter what? What 20% should I cut? This allows them to compliment while providing genuine feedback&lt;/li&gt;
&lt;li&gt;Hire lawyer interns to proofread. They are the ones that find fault the best&lt;/li&gt;
&lt;li&gt;Be in a segment of one. Where there is zero competition. Something only you can do&lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t try to do stuff faster. Try to do stuff you don&amp;rsquo;t want to stop doing&lt;/li&gt;
&lt;li&gt;Read books older than 50 years&lt;/li&gt;
&lt;li&gt;Read Michael Collins book on things that sustain&lt;/li&gt;
&lt;li&gt;Temp service make sure he has some energy to spare. Cuz Riley does the opposite. She waits till she can&amp;rsquo;t stand it anymore and then writes like crazy until she drops dead. The former leads to thoughtful writing. The latter is emotionally powerful. Be able to do that&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/vanna-ai/vanna&#34;&gt;Vanna&lt;/a&gt; is a SQL generation LLM. An alternative to SQLCoder. This &lt;a href=&#34;https://news.ycombinator.com/item?id=38992601&#34;&gt;thread&lt;/a&gt; has a detailed discussion on SQL generation and BI&lt;/li&gt;
&lt;li&gt;Intel developer cloud has a liberal GPU in the free tier.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openai.com/blog/new-embedding-models-and-api-updates&#34;&gt;OpenAI releases &lt;code&gt;text-embedding-3-large&lt;/code&gt;&lt;/a&gt; which can be truncated. The embedding values have descending importance, so picking the first n is a good approximation. Also, &lt;code&gt;gpt-3.5-turbo-0125&lt;/code&gt; is 50% cheaper.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/mnotgod96/AppAgent&#34;&gt;AppAgent&lt;/a&gt; is an LLM that can navigate mobile / web apps&lt;/li&gt;
&lt;li&gt;Retrieval Centric Generation is an emerging alternative to RAG, where the LLM is explicitly built to leverage external knowledge. &lt;a href=&#34;https://github.com/RCGAI/SimplyRetrieve&#34;&gt;SimplyRetrieve&lt;/a&gt; is an early implementation.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://huggingface.co/spaces/bigcode/bigcode-models-leaderboard&#34;&gt;Big Code Models Leaderboard&lt;/a&gt; is a leaderboard for open source code models.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    <item>
      <title>Embeddings similarity threshold</title>
      <link>https://www.s-anand.net/blog/embeddings-similarity-threshold/</link>
      <pubDate>Sat, 03 Feb 2024 03:21:02 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/embeddings-similarity-threshold/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;Embeddings similarity threshold&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/image-81.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;text-embedding-ada-002&lt;/code&gt; used to give high cosine similarity between texts. I used to consider 85% a reasonable threshold for similarity. I almost never got a similarity less than 50%.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://openai.com/blog/new-embedding-models-and-api-updates&#34;&gt;&lt;code&gt;text-embedding-3-small&lt;/code&gt; and &lt;code&gt;text-embedding-3-large&lt;/code&gt;&lt;/a&gt; give much lower cosine similarities between texts.&lt;/p&gt;
&lt;p&gt;For example, take these 5 words: &amp;ldquo;apple&amp;rdquo;, &amp;ldquo;orange&amp;rdquo;, &amp;ldquo;Facebook&amp;rdquo;, &amp;ldquo;Jamaica&amp;rdquo;, &amp;ldquo;Australia&amp;rdquo;. Here is the similarity between every pair of words across the 3 models:&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/image-79.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/image-80.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/image-81.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;For our words, new &lt;code&gt;text-embedding-3-*&lt;/code&gt; models have an average similarity of ~43% while the older &lt;code&gt;text-embedding-ada-002&lt;/code&gt; model had ~85%.&lt;/p&gt;
&lt;p&gt;Today, I would use 45% as a reasonable threshold for similarity with the newer models. For example, &amp;ldquo;apple&amp;rdquo; and &amp;ldquo;orange&amp;rdquo; have a similarity of 45-47% while Jamaica and apple have a ~20% similarity.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s a &lt;a href=&#34;https://github.com/sanand0/ipython-notebooks/blob/master/embedding-similarity.ipynb&#34;&gt;notebook&lt;/a&gt; with these calculations. Hope that gives you a feel to calibrate similarity thresholds.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://www.s-anand.net/blog/the-llm-psychologist/&#34;&gt;The LLM Psychologist - S Anand&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;6 Oct 2024 11:04 am&lt;/em&gt; &lt;em&gt;(pingback)&lt;/em&gt;:
[…] Over the last few months, several things changed. Most of my time is spent researching LLMs. […]&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>Things I Learned - 28 Jan 2024</title>
      <link>https://www.s-anand.net/blog/things-i-learned-28-jan-2024/</link>
      <pubDate>Sun, 28 Jan 2024 00:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/things-i-learned-28-jan-2024/</guid>
      <description>&lt;p&gt;This week, I learned:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;⭐ &lt;a href=&#34;https://platform.openai.com/docs/guides/prompt-engineering/strategy-split-complex-tasks-into-simpler-subtasks&#34;&gt;OpenAI&amp;rsquo;s prompt engineering strategies&lt;/a&gt; are an excellent start for prompt engineering. A few lessons:
&lt;ul&gt;
&lt;li&gt;Use detailed system prompts, often containing the entire instruction set, if it won&amp;rsquo;t change over the course of a conversation.&lt;/li&gt;
&lt;li&gt;&amp;ldquo;&amp;hellip; summary of the prior conversation could be included as part of the system message&amp;rdquo; is an interesting history compression tactic.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://openai.com/research/summarizing-books&#34;&gt;OpenAI summarizes books&lt;/a&gt; by recursively summarizing sections and maintaining a running commentary of the summary so far.&lt;/li&gt;
&lt;li&gt;Dan sends Google documents with essays instead of emails. This allows people to comment on it. But commenting is a culture and not many people do it. Adriano does it a lot and we&amp;rsquo;ll. Dan and Adriano actively converse on GitHub issues&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://llm-guard.com/&#34;&gt;llm-guard&lt;/a&gt; is an LLM content validation tool.&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
  </channel>
</rss>
