<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Prosper Otemuyiwa</title>
    <description>The latest articles on DEV Community by Prosper Otemuyiwa (@unicodeveloper).</description>
    <link>https://dev.to/unicodeveloper</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F304853%2Fb1f707ad-5975-4aca-a2bd-db854a60dda5.jpg</url>
      <title>DEV Community: Prosper Otemuyiwa</title>
      <link>https://dev.to/unicodeveloper</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/unicodeveloper"/>
    <language>en</language>
    <item>
      <title>How to Use Jev: A practical guide to TypeSafe's System One model</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Thu, 17 Sep 2026 12:24:54 +0000</pubDate>
      <link>https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e</link>
      <guid>https://dev.to/valyuai/how-to-use-jev-a-practical-guide-to-typesafes-system-one-model-g5e</guid>
      <description>&lt;p&gt;&lt;strong&gt;Jev is a frontier AI model from TypeSafe AI that returns typed, probabilistic decisions instead of generated text.&lt;/strong&gt; You send program state plus typed questions; it answers all of them in one parallel pass in 70 to 500 milliseconds, at $0.042 per million input tokens with output free. It launched September 15, 2026 with $40M led by DCVC, built by Diogo Almeida, who co-invented RLHF and InstructGPT at OpenAI.&lt;/p&gt;

&lt;p&gt;This is the practical guide: setup, the three primitives, five patterns worth stealing, the failure modes that will bite you, and what people shipped in the first 48 hours.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8dtbhyvig5s4z84o8zfk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8dtbhyvig5s4z84o8zfk.png" alt="Intelligence" width="800" height="465"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TypeSafe AI&lt;/strong&gt; calls Jev, this class of model &lt;strong&gt;System One&lt;/strong&gt;, after Kahneman's fast, intuitive thinking. The bet is that most decisions inside software are System 1 judgments ("which bucket is this?", "is this urgent?") and we have been renting System 2 to make them.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Jev&lt;/th&gt;
&lt;th&gt;Frontier LLMs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;End-to-end latency&lt;/td&gt;
&lt;td&gt;70ms to 500ms&lt;/td&gt;
&lt;td&gt;3s to 329s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input price&lt;/td&gt;
&lt;td&gt;$0.042 / MTok&lt;/td&gt;
&lt;td&gt;$0.20 to $10 / MTok&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output price&lt;/td&gt;
&lt;td&gt;free&lt;/td&gt;
&lt;td&gt;~5x input&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structured-output errors&lt;/td&gt;
&lt;td&gt;0% (by construction)&lt;/td&gt;
&lt;td&gt;0.58% to 45.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Caveat up front, and I come back to it at the end: those are TypeSafe's own numbers, self-run and unreproduced.&lt;/p&gt;




&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;Get a key from &lt;a href="https://console.typesafe.ai/settings/keys" rel="noopener noreferrer"&gt;console.typesafe.ai/settings/keys&lt;/a&gt; (early access is waitlisted) or from &lt;a href="https://vercel.com/ai-gateway/models/jev" rel="noopener noreferrer"&gt;Vercel AI gateway&lt;/a&gt; and export it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;TYPESAFE_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"sk-..."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt; (3.10+):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;typesafe-sdk
&lt;span class="c"&gt;# or: uv add typesafe-sdk&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;JavaScript/TypeScript&lt;/strong&gt; (Node 20+):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @typesafe-ai/sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both SDKs read &lt;code&gt;TYPESAFE_API_KEY&lt;/code&gt; from the environment and default to &lt;code&gt;jev-latest&lt;/code&gt;. There is one endpoint, &lt;code&gt;POST https://api.typesafe.ai/v1/systemone&lt;/code&gt;, if you would rather call it directly.&lt;/p&gt;




&lt;h2&gt;
  
  
  The three primitives
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwd4cvjl9v43bal947dtd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwd4cvjl9v43bal947dtd.png" alt="Anatomy of one Jev call" width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The whole API is three question types. That is not a limitation you route around, it is the design.&lt;/p&gt;

&lt;h3&gt;
  
  
  Choice: one option from a set
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nc"&gt;Choice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Which team should handle this&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;billing&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Payment or subscription issues&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;technical&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Bugs or integration problems&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sales&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;     &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Pricing or account questions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Returns &lt;code&gt;.choice&lt;/code&gt;, &lt;code&gt;.probabilities&lt;/code&gt; (one per option), and &lt;code&gt;.confidence&lt;/code&gt;. Takes &lt;strong&gt;up to 255 options&lt;/strong&gt;, each costing a few tokens, so pass the full list of teams or categories rather than a shortlist. Add an explicit &lt;code&gt;other&lt;/code&gt; option so the model can say nothing fits instead of picking the closest wrong thing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Score: a position on a spectrum
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nc"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;How frustrated the customer appears&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Calm, just stating facts&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Frustrated but civil&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Very angry, strong language&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two to ten ordered levels, described in words. Returns &lt;code&gt;.score&lt;/code&gt; as a position that can land &lt;strong&gt;between&lt;/strong&gt; levels (&lt;code&gt;1.035&lt;/code&gt;), plus &lt;code&gt;.probabilities&lt;/code&gt; and &lt;code&gt;.confidence&lt;/code&gt;. The level index comes from array order, so level 0 is the first entry.&lt;/p&gt;

&lt;h3&gt;
  
  
  Noul: yes or no, as a probability
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nc"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The message conveys urgency or time-sensitivity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Returns &lt;code&gt;.noul&lt;/code&gt;, a single number from 0 to 1: the probability the answer is yes. No confidence field, because the number already is the belief.&lt;/p&gt;

&lt;h3&gt;
  
  
  Putting it together
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;typesafe_sdk&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Choice&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;TypeSafeClient&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TypeSafeClient&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;system_one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ticket&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;subject&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Duplicate charge&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;messages&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
                &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;from&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;customer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;I was charged twice for order A-104. Please refund the duplicate.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A-104&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;charges&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;amount_usd&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;49&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;captured&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;amount_usd&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;49&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;captured&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;]},&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;refund_policy&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Duplicate charges are eligible for a refund.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;questions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;department&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;       &lt;span class="nc"&gt;Choice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Which team should handle this&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                   &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;billing&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Payment or subscription issues&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                             &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;technical&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Bugs or integration problems&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                             &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sales&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Pricing or account questions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;frustration&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;      &lt;span class="nc"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;How frustrated the customer appears&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                  &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Calm, just stating facts&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Frustrated but civil&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Very angry, strong language&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;refund_requested&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The customer is explicitly asking for a refund&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;policy_supports&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="nc"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The stated refund policy covers this situation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;dept&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;department&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dept&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;dept&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;frustration&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;refund_requested&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;noul&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same in TypeScript:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;choice&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;noul&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;TypeSafeClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@typesafe-ai/sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;TypeSafeClient&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;systemOne&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;document&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;I was charged twice. Please fix this ASAP.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;questions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;category&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;choice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;What is this ticket about?&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;billing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Payment or subscription issues&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;technical&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Bugs or integration problems&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;other&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Anything else&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="na"&gt;urgent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;noul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The message conveys urgency&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;category&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;choice&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// types inferred from your questions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  State is whatever you need it to be
&lt;/h3&gt;

&lt;p&gt;A string, a JSON object, or an array of text. Use an object when there is more than one piece of context.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;My card was charged twice.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;                               &lt;span class="c1"&gt;# simple
&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A-104&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;                    &lt;span class="c1"&gt;# named fields
&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;My customer number is TS1337.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Charged twice.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;   &lt;span class="c1"&gt;# a conversation
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Text only. No images, audio or video. Transcribe or caption first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context limits&lt;/strong&gt; work differently from an LLM, because state is ingested once and questions run in parallel over it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;64k tokens for state and all questions together&lt;/li&gt;
&lt;li&gt;32k tokens for state plus the single longest question&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Five patterns worth stealing
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pattern 1: speculative fan-out
&lt;/h3&gt;

&lt;p&gt;Questions are evaluated in parallel, so &lt;strong&gt;a tenth question costs tokens but almost no time&lt;/strong&gt;. This inverts the usual instinct to make a cheap call first and a follow-up only if needed. Ask everything up front and let code decide what was relevant.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;system_one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;ticket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;questions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;category&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;       &lt;span class="nc"&gt;Choice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Broad category of this ticket&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                 &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bug_report&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Something is broken or erroring&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;billing&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Charges, invoices, refunds&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;feature_request&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Asking for new functionality&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;account&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Login, permissions, security&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="c1"&gt;# only meaningful if it IS a bug report. Ask anyway.
&lt;/span&gt;        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bug_severity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="nc"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;How severe is the reported issue&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cosmetic; no impact&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                          &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Degraded feature; workaround exists&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                          &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Blocking; no workaround&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;has_repro&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;      &lt;span class="nc"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The user describes steps to reproduce&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="c1"&gt;# only meaningful if it IS billing. Ask anyway.
&lt;/span&gt;        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;refund_wanted&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="nc"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The user explicitly asks for a refund or credit&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;frustration&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="nc"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;How frustrated the user appears&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Calm&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Frustrated but civil&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Very angry&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;category&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bug_report&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;bug_severity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;has_repro&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;noul&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;0.6&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;escalate_to_engineering&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ticket_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;severity&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;high&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;add_to_bug_backlog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ticket_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;billing&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;refund_wanted&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;noul&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;start_refund_flow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ticket_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TypeSafe's cookbook runs a 13-question regulatory briefing over a long Wikipedia article and reports that batching every question into one call is &lt;strong&gt;12.2x cheaper and 10.0x faster&lt;/strong&gt; with identical answers, versus asking one at a time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern 2: Confidence-gated routing
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F62yr0tytu92jrk2yi8mc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F62yr0tytu92jrk2yi8mc.png" alt="Confidence is the second axis" width="799" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the one that changes your architecture. Jev is trained with &lt;strong&gt;RLCD&lt;/strong&gt; (Reinforcement Learning for Calibrated Decisions), which optimises probabilities against outcomes rather than human preference. Confidence is therefore meaningful in aggregate: higher confidence really does mean higher accuracy.&lt;/p&gt;

&lt;p&gt;So stop writing one threshold for the whole system. Write one per action, scaled to what being wrong costs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;action&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;intent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;route_to_human&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                  &lt;span class="c1"&gt;# floor: genuinely unsure
&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;check_balance&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;show_balance&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                      &lt;span class="c1"&gt;# read-only, low bar
&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;approve_transfer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;0.85&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;                  &lt;span class="c1"&gt;# moves money, high bar
&lt;/span&gt;        &lt;span class="nf"&gt;approve_transfer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;ask_user_to_confirm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Approve this transfer?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;route_to_human&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You also get the raw &lt;code&gt;.probabilities&lt;/code&gt; if TypeSafe's confidence statistic is not the measure you want. A flat distribution means the options were not distinguishable from the state you gave it, which is frequently a signal that your criteria are wrong rather than that the model is confused.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern 3: composite scoring
&lt;/h3&gt;

&lt;p&gt;Break a fuzzy judgment into independent dimensions, score each atomically, and combine with weights &lt;strong&gt;you&lt;/strong&gt; control. This beats asking "how good is this candidate," which hides several judgments inside one answer.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;system_one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;resume_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;questions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;python_depth&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="nc"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Depth of Python experience shown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                 &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;None mentioned&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Mentioned, no detail&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Used in projects&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Primary language&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Deep expertise: architecture, performance&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;team_leadership&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Experience leading engineering teams&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                 &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;None&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Informal mentorship&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Led a small team&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Managed direct reports&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Managed multiple teams&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system_design&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="nc"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Experience designing distributed systems&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                 &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;None mentioned&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Contributed to discussions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Designed components&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Owned a system&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s architecture&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Designed at scale across domains&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;
&lt;span class="n"&gt;composite&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="mf"&gt;0.40&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;python_depth&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="mf"&gt;0.25&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;team_leadership&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="mf"&gt;0.35&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;system_design&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Re-weighting is now a code change, not a re-prompt. You can A/B it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern 4: The Cascade
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9ctmum0sbw278hl3jpm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9ctmum0sbw278hl3jpm.png" alt="The cascade" width="799" height="490"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Jev is not a replacement for Opus 5 or GPT-5.6. It is the thing that decides which requests deserve one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;handle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;system_one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;questions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;intent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;     &lt;span class="nc"&gt;Choice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Primary intent of this message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                 &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order_status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Asking about an existing order&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;product_question&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Asking about a product&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;return_exchange&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Wants to return or exchange&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                           &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;complaint&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Unhappy, wants resolution&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;complexity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;How complex is this to resolve&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Simple lookup or standard procedure&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                          &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Requires judgment or multiple steps&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                          &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Unusual edge case, escalation needed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;complexity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;intent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;complexity&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;route_to_human&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;order_status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;lookup_order&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                      &lt;span class="c1"&gt;# pure code, no LLM at all
&lt;/span&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;product_question&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;handle_with_llm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PRODUCT_SPECIALIST&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;return_exchange&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;handle_with_llm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;RETURNS_SPECIALIST&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choice&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;complaint&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;complexity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;complexity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;route_to_human&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;handle_with_llm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;COMPLAINT_RESOLUTION&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One branch never touches a model. Two load different specialists. One escalates.&lt;/p&gt;

&lt;p&gt;On a million tickets, using TypeSafe's per-case figures, that is roughly &lt;strong&gt;$6,480 instead of $30,400&lt;/strong&gt;, with around 800,000 answered in under half a second instead of ten.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pattern 5: Retrieve, then judge
&lt;/h3&gt;

&lt;p&gt;There is a step in that cascade Jev does not perform, and it sets the ceiling on everything after it.&lt;/p&gt;

&lt;p&gt;Jev has no knowledge of the world beyond the state you hand it. It cannot look anything up. And the jaggedness page is blunt that accuracy falls as state fills with material the question does not need: &lt;strong&gt;"retrieve and filter in code first, and send only the fields the question needs."&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Read those together and the consequence is sharp. Whatever assembles the state decides what Jev is allowed to know. Pad it and you lose accuracy to context rot. Ground it in a weak source and Jev returns a well-calibrated judgment about bad material, because the state is the only world it has.&lt;/p&gt;

&lt;p&gt;So the full pattern is two layers: fetch precisely, then judge cheaply.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Valyu&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;typesafe_sdk&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;TypeSafeClient&lt;/span&gt;

&lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;          &lt;span class="c1"&gt;# reads VALYU_API_KEY
&lt;/span&gt;&lt;span class="n"&gt;jev&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TypeSafeClient&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;   &lt;span class="c1"&gt;# reads TYPESAFE_API_KEY
&lt;/span&gt;
&lt;span class="c1"&gt;# 1. Retrieval: primary sources, filtered before anything reaches the model.
&lt;/span&gt;&lt;span class="n"&gt;hits&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GLP-1 receptor agonists cardiovascular outcomes&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-arxiv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;start_date&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2024-01-01&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_num_results&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;relevance_threshold&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# 2. Judgment: one bounded call per paper, roughly $0.0004 each.
&lt;/span&gt;&lt;span class="n"&gt;shortlist&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;paper&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;hits&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;verdict&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;jev&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;system_one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;paper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;source&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;paper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;paper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="n"&gt;questions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;is_rct&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;This paper reports a randomised controlled trial&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;reports_mace&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The paper reports major adverse cardiovascular events as an outcome&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;evidence_strength&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Score&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                &lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;How strong is the causal evidence presented&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="n"&gt;criteria&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Anecdotal or preclinical&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                          &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Observational&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                          &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Single randomised trial&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                          &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Meta-analysis of randomised trials&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;verdict&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;is_rct&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;noul&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;0.7&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;evidence_strength&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;1.5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;shortlist&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="n"&gt;paper&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;evidence_strength&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;confidence&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Twenty papers screened on four dimensions for well under a cent, against primary literature rather than whatever a general crawl surfaced.&lt;/p&gt;

&lt;p&gt;This generalises past literature review. It is the same shape as TypeSafe's own &lt;a href="https://docs.typesafe.ai/cookbooks/classifying_rag_passages" rel="noopener noreferrer"&gt;RAG passage classification&lt;/a&gt; and &lt;a href="https://docs.typesafe.ai/cookbooks/citation_check" rel="noopener noreferrer"&gt;citation check&lt;/a&gt; cookbooks: retrieve wide, then use a Noul per passage to filter for relevance &lt;em&gt;before&lt;/em&gt; anything expensive sees it. At $0.042/MTok with free output, the filter costs less than the context window it saves.&lt;/p&gt;




&lt;h2&gt;
  
  
  What people shipped in the first 48 hours
&lt;/h2&gt;

&lt;p&gt;Jev launched September 15. So treat these as launch-week artefacts, not production case studies, and note that all figures are self-reported by their authors. Be discretionary in your adoption.&lt;/p&gt;

&lt;h3&gt;
  
  
  1,018 research papers classified for $0.08
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://1kpapers.com" rel="noopener noreferrer"&gt;&lt;strong&gt;1kpapers.com&lt;/strong&gt;&lt;/a&gt; by Hassan El Mghari (&lt;a href="https://x.com/nutlope/status/2100426999546184123" rel="noopener noreferrer"&gt;thread&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The clearest demonstration of the economics, because it runs a generative model and a decision model in the same pipeline and shows the bill for each:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Summarise 1,018 papers with DeepSeek V4 Flash&lt;/li&gt;
&lt;li&gt;Send title + summary + 24 candidate topics to Jev&lt;/li&gt;
&lt;li&gt;Classify with one Choice&lt;/li&gt;
&lt;li&gt;Visualise&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Summaries: $3.99. Classifications: $0.08.&lt;/strong&gt; Median end-to-end latency 256ms per paper.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I think this is where things are heading: different models for different parts of the workflow, instead of using one model for everything."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;He also notes he is running evals on the Jev classifications before replacing the existing ones, which is the right instinct and the one most launch-week demos skip.&lt;/p&gt;

&lt;h3&gt;
  
  
  A browser agent that books a flight in 7.1 seconds
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/browser-use/jev-ultrafast" rel="noopener noreferrer"&gt;&lt;strong&gt;browser-use/jev-ultrafast&lt;/strong&gt;&lt;/a&gt; · 641 stars · Python&lt;/p&gt;

&lt;p&gt;Gregor Zunic (Browser Use) built a browser agent with a dynamic, indexed action space. Each observation turns the page into a numbered element table. One Jev request picks both the operation (&lt;code&gt;CLICK&lt;/code&gt;, &lt;code&gt;TYPE_TEXT&lt;/code&gt;, &lt;code&gt;SELECT&lt;/code&gt;, &lt;code&gt;SCROLL&lt;/code&gt;, &lt;code&gt;WAIT&lt;/code&gt;, &lt;code&gt;DONE&lt;/code&gt;, &lt;code&gt;BLOCKED&lt;/code&gt;) and its target. A small LLM runs only when the operation is &lt;code&gt;TYPE_TEXT&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Zürich to London on real Google Flights in 7.1 seconds, $0.0039&lt;/strong&gt;, page loads included.&lt;/p&gt;

&lt;p&gt;The design trick is speculative fan-out applied to actions: click, type and select targets are all asked in the same round trip, and only the one matching the chosen operation executes. Two decisions, one network call.&lt;/p&gt;

&lt;h3&gt;
  
  
  Computer use at $0.0002 per step
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/awlevin/typesafe-computer-use" rel="noopener noreferrer"&gt;&lt;strong&gt;awlevin/typesafe-computer-use&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Drives a Mac toward a plain-English goal without sending screenshots to a large model. OCR reads the screen, Jev picks the next action, a writing model is called only for free text.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Jev&lt;/th&gt;
&lt;th&gt;Opus 5 (bare screenshot)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cost per decision&lt;/td&gt;
&lt;td&gt;$0.0002&lt;/td&gt;
&lt;td&gt;$0.032&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost per 12-step task&lt;/td&gt;
&lt;td&gt;$0.003&lt;/td&gt;
&lt;td&gt;$0.40 to $0.90&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model latency&lt;/td&gt;
&lt;td&gt;0.13 to 0.38s&lt;/td&gt;
&lt;td&gt;5.2s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;End-to-end step&lt;/td&gt;
&lt;td&gt;~1.5s&lt;/td&gt;
&lt;td&gt;~5.5s&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The author's caveat is the most useful line in the repo: the frontier model read event dates off the pixels and compared them unaided, while the classifier needed explicit date parsing built around it. &lt;strong&gt;"Every piece of reasoning the frontier model does for free has to be rebuilt here as deterministic state."&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  A market maker deciding every ~300ms block
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/jarrodwatts/jev-trader" rel="noopener noreferrer"&gt;&lt;strong&gt;jarrodwatts/jev-trader&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One decision per Monad block. Jev reads the Kuru MON-USDC order book and answers buy or sell; the bot posts a post-only limit order one tick inside the touch, so it earns the spread instead of paying it. Reported model latency in the event stream is around 81ms, and the hot loop makes exactly two RPC round trips to fit the block budget. Ships with a dry-run mode using real book data and simulated fills.&lt;/p&gt;

&lt;h3&gt;
  
  
  An autonomous drone with judgment at 2.5Hz
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/RomanSlack/jev-drone" rel="noopener noreferrer"&gt;&lt;strong&gt;RomanSlack/jev-drone&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Worth studying for how carefully it puts Jev in its place:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rate&lt;/th&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Owner&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;500 Hz&lt;/td&gt;
&lt;td&gt;Geometric flight controller&lt;/td&gt;
&lt;td&gt;Code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50 Hz&lt;/td&gt;
&lt;td&gt;Guidance and safety reflex&lt;/td&gt;
&lt;td&gt;Code, always owns safety&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15 Hz&lt;/td&gt;
&lt;td&gt;Camera to symbolic scene&lt;/td&gt;
&lt;td&gt;Classical CV&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;~2.5 Hz&lt;/td&gt;
&lt;td&gt;Tactical judgment&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Jev, advisory only&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Classical CV compresses depth and segmentation into range sectors, obstacle height and target bearing. Jev answers three questions in one call: a Choice over manoeuvres, a Score for risk, a Noul for whether the target is genuinely lost or briefly occluded. As the README says, Jev "cannot be the perception layer, and it cannot run at control rate."&lt;/p&gt;

&lt;h3&gt;
  
  
  Others worth a look
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/fhshaik/typesafe-mario" rel="noopener noreferrer"&gt;&lt;strong&gt;fhshaik/typesafe-mario&lt;/strong&gt;&lt;/a&gt; (73★) plays Super Mario Bros from emulator RAM translated to object-centric JSON. No screenshots.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/devagrawal09/jev-review" rel="noopener noreferrer"&gt;&lt;strong&gt;devagrawal09/jev-review&lt;/strong&gt;&lt;/a&gt; (48★) is a staged code reviewer: Noul risk matrix, then Choice/Score file profiles, evidence selection, severity, conditional routing.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/TheoLeeCJ/openjev" rel="noopener noreferrer"&gt;&lt;strong&gt;TheoLeeCJ/openjev&lt;/strong&gt;&lt;/a&gt; (166★) reads typed option probabilities off a 4B open model's logits in one forward pass. It is explicit that it reproduces the &lt;em&gt;interface pattern&lt;/em&gt;, not Jev's model or training.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/phyous/tsai-sc" rel="noopener noreferrer"&gt;&lt;strong&gt;phyous/tsai-sc&lt;/strong&gt;&lt;/a&gt; has Jev complete the first StarCraft shareware mission across 421 decisions, with a verification report.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/AbdelStark/awesome-typesafe" rel="noopener noreferrer"&gt;&lt;strong&gt;AbdelStark/awesome-typesafe&lt;/strong&gt;&lt;/a&gt; indexes the ecosystem and labels which results rest on private data or single runs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The pattern across every one of these:&lt;/strong&gt; keep the loop, the safety and the arithmetic in ordinary code, and use Jev for the narrow judgment in the middle that code finds hard to phrase.&lt;/p&gt;




&lt;h2&gt;
  
  
  The failure modes (read this before you ship)
&lt;/h2&gt;

&lt;p&gt;TypeSafe publishes a page called &lt;a href="https://docs.typesafe.ai/model-jaggedness/jev-1.13" rel="noopener noreferrer"&gt;"jaggedness"&lt;/a&gt; listing what &lt;code&gt;jev-1.13&lt;/code&gt; is bad at. It is unusually honest for a launch and it will save you a week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It reads literally.&lt;/strong&gt; Jev answers the question you wrote, not the one you meant. Negations, scoping words and implied conditions land at face value. The tell: you look at a wrong answer and catch yourself explaining what you really meant. That explanation is the missing half of your instruction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It is not a calculator.&lt;/strong&gt; It does not count reliably, and error grows with the size of the thing counted. Iterate in code and ask one Noul per item:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;system_one&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;items&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;item_&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Noul&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;instructions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Is `items[&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;]` the name of a fruit?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
     &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;))},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nouls&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;item_&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;noul&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dates are text to it, not ordered quantities.&lt;/strong&gt; Which date came first, how far apart, whether one falls in a window: all unreliable. Extraction is judgment, so use a Choice over enumerated months and days with an explicit "not stated" option. Assembly and ordering are arithmetic, so keep them in code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context rot is real.&lt;/strong&gt; Accuracy falls as state fills with material the question does not need. Retrieve and filter first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;State is not treated as hostile.&lt;/strong&gt; Text engineered to argue for its own classification can move the answer. If you put user-controlled content into state, that is your threat model to handle. Test it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Contradictory instructions and criteria confuse it.&lt;/strong&gt; A Noul where &lt;code&gt;true&lt;/code&gt; maps to "no" will underperform. Treat criteria as an extension of the instruction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It does not generate.&lt;/strong&gt; No text, no code, no summaries. If you need a value extracted from free text, get candidates with a regex or a generative model and let Jev pick.&lt;/p&gt;

&lt;p&gt;The meta-rule from their docs, which is good design advice generally:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Avoid asking the model something code can compute exactly. Avoid hiding several judgments inside one question.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Operational notes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Rate limits&lt;/strong&gt; for &lt;code&gt;jev-1.13&lt;/code&gt; are 250,000 tokens/second and 1,200 requests/minute. Over either returns &lt;code&gt;429&lt;/code&gt;. Both SDKs retry with exponential backoff and honour &lt;code&gt;retry-after&lt;/code&gt;. TypeSafe warns these limits are moving without notice while GPU capacity lands.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pin your version if you tune thresholds.&lt;/strong&gt; &lt;code&gt;jev-latest&lt;/code&gt; currently resolves to &lt;code&gt;jev-1.13.0&lt;/code&gt; and will move when a new release ships, which can change answers under you. The response's &lt;code&gt;model&lt;/code&gt; field reports the versioned ID that answered, so log it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;TypeSafeClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;jev-1.13.0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# pin
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Billing is input-only.&lt;/strong&gt; Output tokens are free, which is why speculative fan-out is cheap and why adding options to a Choice costs almost nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There is an agent skill&lt;/strong&gt; if you build with a coding agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude plugin marketplace add typesafe-ai/skills
claude plugin &lt;span class="nb"&gt;install &lt;/span&gt;typesafe@typesafe-ai
&lt;span class="c"&gt;# or, for other agents:&lt;/span&gt;
npx skills add typesafe-ai/skills &lt;span class="nt"&gt;--skill&lt;/span&gt; typesafe-ai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The honest scorecard
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fje9452k5t79tx941ugbw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fje9452k5t79tx941ugbw.png" alt="What the trade actually is" width="800" height="516"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On TypeSafe's four-workflow evaluation, Jev scores 67.8%, level with GPT-5.6 Terra (67.9%), behind Sol (74.1%) and Opus 5 (73.1%), at roughly 1/200th the cost and 1/50th the latency.&lt;/p&gt;

&lt;p&gt;The line that lands hardest: &lt;strong&gt;Claude Sonnet 5 scores exactly 67.8% too&lt;/strong&gt;, at 293x the cost per case and 195x the latency.&lt;/p&gt;

&lt;p&gt;Four things to hold onto:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;That column is not accuracy.&lt;/strong&gt; There is no ground truth. TypeSafe builds consensus labels by averaging GPT-6 Astra and Claude Fable 5.1 at high thinking, then scores everyone against those. It measures &lt;em&gt;agreement with two frontier models&lt;/em&gt;, which is why neither appears in the results. TypeSafe says this biases toward OpenAI and Anthropic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It is self-run.&lt;/strong&gt; TypeSafe designed the workflows, built the harness, ran it. No independent reproduction exists. Evaluate on your own traffic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Cannot hallucinate" is narrower than it sounds.&lt;/strong&gt; Jev cannot return an invalid value. It can return the &lt;em&gt;wrong&lt;/em&gt; valid one. The 0% is asserted, not measured: "Our number is not empirical. Schema matching is guaranteed, thus we can confidently add 0% into the plots." The 45.5% comparison is a single outlier (Haiku 4.5); most models sit between 0.58% and 13.2%.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The price may move.&lt;/strong&gt; TypeSafe cannot prove it is not subsidised, though it says it expects the price to fall rather than rise.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  When I would actually use this
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6f4ax394bhwdunijd3hs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6f4ax394bhwdunijd3hs.png" alt="Good and bad fits" width="800" height="642"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Yes:&lt;/strong&gt; routing and triage, moderation, relevance filtering before an expensive context window, scoring or guardrailing LLM output, tagging at volumes that were previously uneconomic, anything sub-second inside a request handler.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No:&lt;/strong&gt; generating anything, arithmetic or counting or date math, decisions needing a written rationale for an auditor, one-off complex reasoning, genuinely open answer spaces.&lt;/p&gt;

&lt;p&gt;The useful mental shift is that this is not a cheaper LLM. It is a different primitive: a function call that happens to be intelligent, returns a type, and tells you how much to trust it. Once you have that, a lot of code that exists only to survive string output stops needing to exist.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is Jev?&lt;/strong&gt; A frontier model that returns typed, probabilistic decisions instead of text, in 70 to 500ms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much does it cost?&lt;/strong&gt; $0.042 per million input tokens, output free. About $0.0004 per case on TypeSafe's benchmark.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can it hallucinate?&lt;/strong&gt; It cannot return a value outside your schema. It can return the wrong valid value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can it write code or prose?&lt;/strong&gt; No. Not trained to generate text at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are Choice, Score and Noul?&lt;/strong&gt; The three question types: one-of-N (up to 255), a position on a 2 to 10 level scale, and a yes/no probability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I get access?&lt;/strong&gt; Waitlisted early access at typesafe.ai; keys at console.typesafe.ai.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I replace my LLM?&lt;/strong&gt; No. Cascade: Jev classifies and routes cheaply, code handles what it can, a frontier model takes the hard minority.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>softwaredevelopment</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Global Fail Map: An open-source map of failed companies, cancelled megaprojects, and dead tech.</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Fri, 11 Sep 2026 16:24:52 +0000</pubDate>
      <link>https://dev.to/valyuai/global-fail-map-an-open-source-map-of-failed-companies-cancelled-megaprojects-and-dead-tech-1p7j</link>
      <guid>https://dev.to/valyuai/global-fail-map-an-open-source-map-of-failed-companies-cancelled-megaprojects-and-dead-tech-1p7j</guid>
      <description>&lt;p&gt;&lt;strong&gt;Quick answer:&lt;/strong&gt; &lt;a href="https://global-fail-map.vercel.app" rel="noopener noreferrer"&gt;Global Fail Map&lt;/a&gt; is a free, open-source research app that maps failed companies, cancelled megaprojects, abandoned inventions, terminated science programs, and futures that never arrived. It ships with 200 curated stories, custom map markers for different failure categories, sourced Markdown reports, random discovery, and &lt;a href="https://docs.valyu.ai/guides/deepresearch#deepresearch" rel="noopener noreferrer"&gt;live Valyu DeepResearch&lt;/a&gt; for new places or ideas. Try it or &lt;a href="https://github.com/yorkeccak/global-fail-map" rel="noopener noreferrer"&gt;fork it&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk8y9c1kvkukvn9w6kmk9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk8y9c1kvkukvn9w6kmk9.png" alt="Global Fail Map interface" width="799" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We built Global Fail Map because we wanted a better way to study ambitious failures.&lt;/p&gt;

&lt;p&gt;This is a startup-postmortem theater and not "10 lessons from Theranos". This is not a motivational thread pretending every dead company died from one neat cause.&lt;/p&gt;

&lt;p&gt;I wanted the map. Failure is easier to understand when it has coordinates and real people behind it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does Global Fail Map do?
&lt;/h2&gt;

&lt;p&gt;Global Fail Map gives you a globe covered in documented attempts that did not reach their intended future.&lt;/p&gt;

&lt;p&gt;The first version ships with 200 curated stories across five categories:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Companies&lt;/li&gt;
&lt;li&gt;Megaprojects&lt;/li&gt;
&lt;li&gt;Science&lt;/li&gt;
&lt;li&gt;Technology&lt;/li&gt;
&lt;li&gt;Visions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each category has its own marker symbol and companies do not look like bridges. Science does not look like planned cities. Clusters get their own symbol too, because a group of seven stories should not pretend to be one random case.&lt;/p&gt;

&lt;p&gt;Click a marker and you get the short version. Open the report and you get the longer version with citations.&lt;/p&gt;

&lt;p&gt;The point is simple: if someone spent years and millions, or billions, discovering that a plan did not work, we should not throw away the evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is useful
&lt;/h2&gt;

&lt;p&gt;Most builders study winners all their lives. Understandable but winners are easier to sell, to write about, and to compress into a clean story.&lt;/p&gt;

&lt;p&gt;If you are actually building something, the failures are often more useful.&lt;/p&gt;

&lt;p&gt;Concorde is not just a plane story. It is a unit economics story.&lt;/p&gt;

&lt;p&gt;Fordlandia is not just an odd Henry Ford story. It is a lesson in ignoring local systems.&lt;/p&gt;

&lt;p&gt;Theranos is not just fraud. It is what happens when verification becomes socially expensive inside an organization.&lt;/p&gt;

&lt;p&gt;The Texas supercollider, the Superconducting Super Collider, is not just a cancelled science project. It is a reminder that science still needs political durability.&lt;/p&gt;

&lt;p&gt;Juicero is a hardware margin, distribution, and necessity problem wearing a very expensive shell.&lt;/p&gt;

&lt;p&gt;Global Fail Map shows you what broke, where, and what survived?&lt;/p&gt;

&lt;h2&gt;
  
  
  Who should use it?
&lt;/h2&gt;

&lt;p&gt;Use Global Fail Map if you are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A founder studying why companies die before you copy a playbook from the winners&lt;/li&gt;
&lt;li&gt;A developer interested in dead platforms, abandoned hardware, and weird infrastructure&lt;/li&gt;
&lt;li&gt;A journalist looking for sourced starting points instead of recycled summaries&lt;/li&gt;
&lt;li&gt;A student or teacher looking for better case studies&lt;/li&gt;
&lt;li&gt;A researcher studying technology, infrastructure, science, planning, or economic history&lt;/li&gt;
&lt;li&gt;A policy analyst trying to understand how public projects get stuck&lt;/li&gt;
&lt;li&gt;A curious person who enjoys falling into very expensive rabbit holes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You do not need to be a coder but if you do code, the &lt;a href="https://github.com/yorkeccak/global-fail-map" rel="noopener noreferrer"&gt;repo is there&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happens when you click a marker?
&lt;/h2&gt;

&lt;p&gt;Every atlas entry has structured metadata:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Title&lt;/li&gt;
&lt;li&gt;Subtitle&lt;/li&gt;
&lt;li&gt;Location&lt;/li&gt;
&lt;li&gt;Country&lt;/li&gt;
&lt;li&gt;Coordinates&lt;/li&gt;
&lt;li&gt;Category&lt;/li&gt;
&lt;li&gt;Status&lt;/li&gt;
&lt;li&gt;Period&lt;/li&gt;
&lt;li&gt;Summary&lt;/li&gt;
&lt;li&gt;Lesson&lt;/li&gt;
&lt;li&gt;Report path&lt;/li&gt;
&lt;li&gt;Source links&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo3owec0x31zvw9801qu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo3owec0x31zvw9801qu7.png" alt="Atlas entry" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The report goes deeper. It explains what was attempted, why it mattered, what changed, what evidence supports the ending, what is uncertain, and what remained afterwards.&lt;/p&gt;

&lt;p&gt;Some failures leave ruins, court records, and patents. Some leave safety rules and successor projects, while some leave nothing but a domain name and a bankruptcy docket.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Five Categories
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Companies:&lt;/strong&gt; dissolved companies, bankrupt firms, discontinued corporate programs, dead platforms, and business models that did not survive contact with the market.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Megaprojects:&lt;/strong&gt; cancelled railways, unfinished airports, ghost metros, dams, ports, bridges, energy projects, new capitals, and public works that got trapped between money, politics, land, and engineering.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Science:&lt;/strong&gt; terminated trials, withdrawn claims, medical failures, research scandals, and large scientific programs that ended because evidence, safety, cost, or governance broke the plan.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Technology:&lt;/strong&gt; abandoned inventions, discontinued devices, dead computing platforms, failed vehicle programs, unreleased products, and technical bets that did not become the future.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visions:&lt;/strong&gt; utopian settlements, planned cities, charter city proposals, speculative districts, and grand designs that looked better in the model than in the world.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why the map markers matter
&lt;/h2&gt;

&lt;p&gt;I did not want a generic pin map. Generic pins make every story feel the same. A failed airline, a cancelled dam, a dead clinical trial, and an abandoned planned city need different visual language.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F35seu2euem07atyrkz8g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F35seu2euem07atyrkz8g.png" alt="Map markers" width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So the app uses custom marker symbols. A company marker reads differently from an infrastructure marker. Science, technology, and vision cases have their own shapes. Dense areas group into clusters so you can explore without visual noise.&lt;/p&gt;

&lt;p&gt;The marker system is small, but it changes the feeling of the app. It turns a list of failures into an atlas.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part I love the most is: the Random story Feature
&lt;/h2&gt;

&lt;p&gt;Search is there when you know what you want. Random story is there when you don't want to type and just explore fast!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx36gmtgm3rtglaf6u63i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx36gmtgm3rtglaf6u63i.png" alt="Random story" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Press it and the app throws you into the archive. One click might land on a failed airship company. The next might land on a cancelled nuclear plant, a ghost metro, a dead social network, or a futuristic city that never became more than a promise.&lt;/p&gt;

&lt;p&gt;This is the feature that makes the app feel less like a database and more like a museum with trapdoors.&lt;/p&gt;

&lt;h2&gt;
  
  
  The research mode
&lt;/h2&gt;

&lt;p&gt;The pre-built 200 stories are not the whole idea. The app also gives you the ability to run on &lt;a href="https://docs.valyu.ai/guides/deepresearch#deepresearch" rel="noopener noreferrer"&gt;live deepresearch.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Search for a place, project, company, or idea. Choose the effort level. Let it run. The app tracks progress and gives you a sourced report when it is done.&lt;/p&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Cancelled smart-city projects in Africa"&lt;/li&gt;
&lt;li&gt;"Failed electric vehicle startups in California"&lt;/li&gt;
&lt;li&gt;"Abandoned nuclear projects in Eastern Europe"&lt;/li&gt;
&lt;li&gt;"Dead social networks in Asia"&lt;/li&gt;
&lt;li&gt;"Unrealized capital city projects"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That makes Global Fail Map both an archive and a research workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  How this is different from a chatbot
&lt;/h2&gt;

&lt;p&gt;Sometimes a chatbot is the right tool. If you need a fast explanation of Concorde, ask a chatbot.&lt;/p&gt;

&lt;p&gt;But a chatbot does not give you a globe. It does not let you browse by marker type and also does not keep a curated atlas of 200 sourced cases. It does not treat location as part of the evidence.&lt;/p&gt;

&lt;p&gt;Here is the comparison:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Need&lt;/th&gt;
&lt;th&gt;Chatbot&lt;/th&gt;
&lt;th&gt;Global Fail Map&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Quick explanation&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Geographic browsing&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Category-specific markers&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Curated failure archive&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Source-backed reports&lt;/td&gt;
&lt;td&gt;Sometimes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Random discovery&lt;/td&gt;
&lt;td&gt;Not really&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Fresh deep research&lt;/td&gt;
&lt;td&gt;Sometimes&lt;/td&gt;
&lt;td&gt;Yes, through Valyu&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Use a chatbot for orientation. Use Global Fail Map when the geography and evidence matter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;p&gt;The app is built with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next.js 15 App Router&lt;/li&gt;
&lt;li&gt;React 19&lt;/li&gt;
&lt;li&gt;Tailwind CSS&lt;/li&gt;
&lt;li&gt;Mapbox GL JS with globe projection&lt;/li&gt;
&lt;li&gt;Zustand&lt;/li&gt;
&lt;li&gt;react-markdown and remark-gfm&lt;/li&gt;
&lt;li&gt;zod&lt;/li&gt;
&lt;li&gt;Valyu DeepResearch API&lt;/li&gt;
&lt;li&gt;Vercel Analytics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The bundled data lives in &lt;code&gt;src/data/examples.json&lt;/code&gt;. Cached reports live in &lt;code&gt;public/reports&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The curation pipeline lives under &lt;code&gt;scripts/&lt;/code&gt; and includes validation, draft generation, and merge scripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running it locally
&lt;/h2&gt;

&lt;p&gt;Clone the repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/yorkeccak/global-fail-map.git
&lt;span class="nb"&gt;cd &lt;/span&gt;global-fail-map
pnpm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create an environment file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cp&lt;/span&gt; .env.example .env.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set the basics:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NEXT_PUBLIC_APP_MODE=self-hosted
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN=pk_your_public_token
VALYU_API_KEY=valyu_your_api_key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;http://localhost:3000&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the bundled reports work
&lt;/h2&gt;

&lt;p&gt;Each bundled report is a cached Markdown file. The app does not need to regenerate those on every page load.&lt;/p&gt;

&lt;p&gt;The story metadata and source list live in &lt;code&gt;src/data/examples.json&lt;/code&gt;. The readable report body lives under &lt;code&gt;public/reports&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;There is also a curation workflow for adding more cases safely:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx tsx scripts/check-curated.ts scripts/curated/africa.json
npx tsx scripts/build-entries.ts
npx tsx scripts/merge-entries.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The merge step guards against duplicate IDs, malformed entries, missing coordinates, weak lessons, and missing sources.&lt;/p&gt;

&lt;p&gt;This matters because a map like this gets bad quickly if the data discipline slips.&lt;/p&gt;

&lt;h2&gt;
  
  
  Good First stories to open
&lt;/h2&gt;

&lt;p&gt;If you want to understand the range of the app, try these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fordlandia&lt;/li&gt;
&lt;li&gt;Concorde&lt;/li&gt;
&lt;li&gt;Theranos&lt;/li&gt;
&lt;li&gt;Juicero&lt;/li&gt;
&lt;li&gt;Project Cybersyn&lt;/li&gt;
&lt;li&gt;The Texas supercollider, the Superconducting Super Collider&lt;/li&gt;
&lt;li&gt;N-1 lunar rocket&lt;/li&gt;
&lt;li&gt;Ryugyong Hotel&lt;/li&gt;
&lt;li&gt;New Harmony&lt;/li&gt;
&lt;li&gt;The Line&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They are different kinds of failure, which is the point.&lt;/p&gt;

&lt;p&gt;Some are technical. Some are political. Some are financial. Some are cultural. Some are evidence failures. Some are coordination failures. Some were bad ideas. Some were good ideas wrapped in bad assumptions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is Global Fail Map?
&lt;/h3&gt;

&lt;p&gt;Global Fail Map is an open-source research atlas that maps failed companies, cancelled megaprojects, abandoned inventions, terminated science programs, and unrealized visions. Each marker links to a sourced story and report.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is it open source?
&lt;/h3&gt;

&lt;p&gt;Yes. The repository is on &lt;a href="https://github.com/yorkeccak/global-fail-map" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is included in the first release?
&lt;/h3&gt;

&lt;p&gt;The bundled atlas includes 200 curated stories across companies, megaprojects, science, technology, and visions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does it use AI?
&lt;/h3&gt;

&lt;p&gt;The app includes live research through Valyu DeepResearch. The bundled atlas itself is curated and cached into structured data plus Markdown reports.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I self-host it?
&lt;/h3&gt;

&lt;p&gt;Yes. You need Node.js, pnpm, a Mapbox public token, and a Valyu API key if you want live research.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I add more failures?
&lt;/h3&gt;

&lt;p&gt;Yes. The repo includes scripts for checking curated entries, building draft entries, and merging them into the atlas.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why study failed projects?
&lt;/h3&gt;

&lt;p&gt;Because failed projects show constraints that success stories hide: financing, law, geography, safety, culture, trust, timing, and demand.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where can I try it?
&lt;/h3&gt;

&lt;p&gt;Try the &lt;a href="https://global-fail-map.vercel.app" rel="noopener noreferrer"&gt;hosted app&lt;/a&gt; or fork &lt;a href="https://github.com/yorkeccak/global-fail-map" rel="noopener noreferrer"&gt;the code&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The thing I hope people do with it
&lt;/h2&gt;

&lt;p&gt;I don't want Global Fail Map to make people less ambitious. In fact, I desire the opposite.&lt;/p&gt;

&lt;p&gt;The kind that checks old ruins before pouring new concrete. That reads the trial record before believing the pitch and studies demand before building hardware. The kind that asks whether politics, land, financing, safety, and trust are part of the technical system.&lt;/p&gt;

&lt;p&gt;If you are building something serious, use the map first. Maybe your idea is new or even older than you think.&lt;/p&gt;

&lt;p&gt;Either way, the failures are waiting to teach you.&lt;/p&gt;

</description>
      <category>github</category>
      <category>opensource</category>
      <category>showdev</category>
      <category>startup</category>
    </item>
    <item>
      <title>25+ GPT-6 Astra Creations Every Developer Should See And How to Enrich them with Real World Datasets</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Mon, 07 Sep 2026 11:27:50 +0000</pubDate>
      <link>https://dev.to/valyuai/25-gpt-6-astra-creations-every-developer-should-see-and-how-to-enrich-them-with-real-world-datasets-d53</link>
      <guid>https://dev.to/valyuai/25-gpt-6-astra-creations-every-developer-should-see-and-how-to-enrich-them-with-real-world-datasets-d53</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt; The best GPT-6 Astra examples so far are not simple chatbots. They are playable games, 3D worlds, CAD workflows, Blender experiments, computer-use demos, model-routing tools, and agent orchestration projects. The next step is grounding those creations with real data. That is where &lt;a href="https://www.valyu.ai/" rel="noopener noreferrer"&gt;Valyu&lt;/a&gt; fits: Astra can build the interface or agent loop, while Valyu supplies cited search, research, web content, academic, financial, medical, geospatial, and other datasets.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is GPT-6 Astra?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GPT-6 Astra is OpenAI’s frontier model for difficult end-to-end work, including coding, tool use, browsing, computer-use workflows, long-context tasks, and professional automation.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The public model ID used in examples is &lt;code&gt;gpt-6-astra&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Useful starting points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://openai.com/index/gpt-6-astra" rel="noopener noreferrer"&gt;OpenAI launch page&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.openai.com/api/docs/models" rel="noopener noreferrer"&gt;OpenAI model docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://openai.com/index/safety-overview-gpt-6-astra/" rel="noopener noreferrer"&gt;Astra safety overview&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This article focuses on public creations and showcases connected to GPT-6 Astra. It intentionally excludes unrelated Astra results such as Astra DB, AstraZeneca, WordPress Astra themes, and Google Project Astra.&lt;/p&gt;




&lt;h2&gt;
  
  
  Selection Criteria
&lt;/h2&gt;

&lt;p&gt;I don't want AI-slop, so these were the things I considered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;public demo, repo, creator post, or credible discussion&lt;/li&gt;
&lt;li&gt;concrete artifact, not just a vague claim&lt;/li&gt;
&lt;li&gt;technically or visually interesting&lt;/li&gt;
&lt;li&gt;runnable where possible&lt;/li&gt;
&lt;li&gt;no empty repos&lt;/li&gt;
&lt;li&gt;no SEO repost farms&lt;/li&gt;
&lt;li&gt;no unrelated “Astra” projects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Added Confidence labels to differentiate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High:&lt;/strong&gt; public repo and/or live demo with a matching creator/project trail.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medium:&lt;/strong&gt; credible public demo, creator post, or repo, but not fully reproducible from the article alone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low:&lt;/strong&gt; thin signal only. I excluded those from the main list.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Best GPT-6 Astra Creations and Showcases
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Project&lt;/th&gt;
&lt;th&gt;Type&lt;/th&gt;
&lt;th&gt;Repo&lt;/th&gt;
&lt;th&gt;Demo / Evidence&lt;/th&gt;
&lt;th&gt;Confidence&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;GPT-6 Astra One-Shot Games&lt;/td&gt;
&lt;td&gt;Browser games&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/Ayi1337/gpt6-astra-one-shot-games" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://melon-game.jack-514.chatgpt.site" rel="noopener noreferrer"&gt;Melon game&lt;/a&gt;, &lt;a href="https://mosswing-quiet-flight.jack-514.chatgpt.site/" rel="noopener noreferrer"&gt;Mosswing&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Red Alert 2 Browser Recreation&lt;/td&gt;
&lt;td&gt;Browser RTS&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/xinbenlv/ra2-gpt-6-astra-2026-09-04" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://xinbenlv.github.io/ra2-gpt-6-astra-2026-09-04/" rel="noopener noreferrer"&gt;Live demo&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Astra Plays GTA Vice City&lt;/td&gt;
&lt;td&gt;Computer-use / game agent&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/da03/astra-plays-gta" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/yuntiandeng/status/2096346317479870830" rel="noopener noreferrer"&gt;Creator post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;NULLSPACE&lt;/td&gt;
&lt;td&gt;Game project&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/marius4lui/NULLSPACE" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.marius4lui.dev/NULLSPACE/" rel="noopener noreferrer"&gt;Live site&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Holographic 3D Cards&lt;/td&gt;
&lt;td&gt;Blender / Three.js tooling&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/EverettFish/holo-card-studio" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://magiccreator.ai/astra/holographic-cards" rel="noopener noreferrer"&gt;Gallery&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;GPTBlender Floor Plan to 3D Model&lt;/td&gt;
&lt;td&gt;3D workflow&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/qduoduo-hwh/gptblender_demo" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://gptblender.com/turn-floor-plan-into-3d-model-gpt6-astra/" rel="noopener noreferrer"&gt;Walkthrough&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;Universe Duel&lt;/td&gt;
&lt;td&gt;Browser game&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://universe-duel.vercel.app" rel="noopener noreferrer"&gt;Live demo&lt;/a&gt;, &lt;a href="https://x.com/hayashimon1/status/2096255665778069957" rel="noopener noreferrer"&gt;creator post&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;Elderwood Realms&lt;/td&gt;
&lt;td&gt;Multiplayer browser world&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://elderwood-realms.rohannvarma.chatgpt.site/" rel="noopener noreferrer"&gt;Live demo&lt;/a&gt;, &lt;a href="https://x.com/TheRohanVarma/status/2096744577332068549" rel="noopener noreferrer"&gt;creator post&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;Rogue Arena Prototype&lt;/td&gt;
&lt;td&gt;Game prototype&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;a href="http://rogue-omega.vercel.app" rel="noopener noreferrer"&gt;Live demo&lt;/a&gt;, &lt;a href="https://x.com/jumperz/status/2096600055301984738" rel="noopener noreferrer"&gt;creator post&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;Verdant Forest&lt;/td&gt;
&lt;td&gt;3D web scene&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://verdant-forest.lexn8.chatgpt.site" rel="noopener noreferrer"&gt;Live demo&lt;/a&gt;, &lt;a href="https://x.com/LexnLin/status/2096263046918197609" rel="noopener noreferrer"&gt;creator post&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;Seoul 3D Atlas&lt;/td&gt;
&lt;td&gt;3D city atlas&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://seoul-3d-atlas.synabreu.chatgpt.site/" rel="noopener noreferrer"&gt;Live demo&lt;/a&gt;, &lt;a href="https://x.com/synabreu/status/2096557555086725159" rel="noopener noreferrer"&gt;creator post&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;Walk Through Van Gogh&lt;/td&gt;
&lt;td&gt;Interactive 3D world&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;
&lt;a href="https://van-goghs-town.surge.sh/" rel="noopener noreferrer"&gt;Live demo&lt;/a&gt;, &lt;a href="https://x.com/petergostev/status/2095776685807346105" rel="noopener noreferrer"&gt;creator post&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;3D Anatomy Site&lt;/td&gt;
&lt;td&gt;Educational 3D UI&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2096221988763173186" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;3D Game From Scratch&lt;/td&gt;
&lt;td&gt;Game demo&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2096008083826725132" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;Runtime-Generated Trains in Three.js&lt;/td&gt;
&lt;td&gt;Procedural 3D&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2096082580554777041" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;Zillow Listing to 3D Promo Video&lt;/td&gt;
&lt;td&gt;Real-estate / video workflow&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2095612137582526615" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;Drawing a Portrait in Canva&lt;/td&gt;
&lt;td&gt;Computer-use design demo&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2095992132620136677" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;House Photo to Full 3D Model&lt;/td&gt;
&lt;td&gt;3D reconstruction&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2095598645190291775" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;Steam Train Blender Build&lt;/td&gt;
&lt;td&gt;Blender asset creation&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2095756085890310311" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;KiCad PCB Layout&lt;/td&gt;
&lt;td&gt;Electronics / CAD&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2095637507337826741" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;td&gt;Interactive V8 Engine&lt;/td&gt;
&lt;td&gt;Technical visualization&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2096280244663775423" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;Hangzhou in Three.js&lt;/td&gt;
&lt;td&gt;3D city scene&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2096143589151756638" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;td&gt;Robot Arm Control&lt;/td&gt;
&lt;td&gt;Robotics / control&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2096064315115839904" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;td&gt;Agentic CAD Workflow&lt;/td&gt;
&lt;td&gt;CAD agent workflow&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2096053889141489669" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;Video Generation Showcase&lt;/td&gt;
&lt;td&gt;Creative video workflow&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;&lt;a href="https://x.com/i/status/2095739568528232538" rel="noopener noreferrer"&gt;Showcase post&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Why These Examples Stand Out
&lt;/h2&gt;

&lt;p&gt;The strongest Astra examples are interesting because they require coordination across multiple layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Games&lt;/strong&gt; need physics, controls, state, rendering, rules, and feel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3D worlds&lt;/strong&gt; need spatial reasoning, visual hierarchy, performance, and interaction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CAD and PCB examples&lt;/strong&gt; need precision and domain constraints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blender workflows&lt;/strong&gt; need stateful tool use, not just code output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computer-use demos&lt;/strong&gt; require the model to operate real interfaces.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent orchestration projects&lt;/strong&gt; test planning, delegation, routing, and verification.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A static landing page no longer proves much. A playable RTS, a 3D city, a PCB layout, or an agent controlling a game is a more meaningful test.&lt;/p&gt;




&lt;h2&gt;
  
  
  Useful GPT-6 Astra Tooling and Infrastructure
&lt;/h2&gt;

&lt;p&gt;These are not all “wow” demos, but they are useful if you want to build with Astra.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Project&lt;/th&gt;
&lt;th&gt;Repo / Link&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;th&gt;Confidence&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;awesome-gpt-6-astra&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/Anil-matcha/awesome-gpt-6-astra" rel="noopener noreferrer"&gt;https://github.com/Anil-matcha/awesome-gpt-6-astra&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Curated index of Astra use cases, prompts, integrations, evaluations, and safety notes&lt;/td&gt;
&lt;td&gt;High&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;MagicCreator Astra Gallery&lt;/td&gt;
&lt;td&gt;&lt;a href="https://magiccreator.ai/astra" rel="noopener noreferrer"&gt;https://magiccreator.ai/astra&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Visual gallery of Astra demos and live links; verify individual entries before citing them separately&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI Relay for Cursor&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/coreprocess/openai-relay-for-cursor" rel="noopener noreferrer"&gt;https://github.com/coreprocess/openai-relay-for-cursor&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Practical relay for Cursor-style workflows&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Astra Advisor&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/DannyMac180/astra-advisor" rel="noopener noreferrer"&gt;https://github.com/DannyMac180/astra-advisor&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Advisor/orchestration-style project&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task Model Router&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/LunarXuan/task-model-router" rel="noopener noreferrer"&gt;https://github.com/LunarXuan/task-model-router&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Model-routing experiment for choosing when to use Astra&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dual Model MCP&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/Firnschnee/dual-model-mcp" rel="noopener noreferrer"&gt;https://github.com/Firnschnee/dual-model-mcp&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Side-by-side model query harness using MCP&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPT-6 Astra 100 HTML Files&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/MiaAI-Lab/GPT-6-Astra-100-HTML-Files" rel="noopener noreferrer"&gt;https://github.com/MiaAI-Lab/GPT-6-Astra-100-HTML-Files&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Collection of generated HTML artifacts&lt;/td&gt;
&lt;td&gt;Medium&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  The Missing Piece: Better Data
&lt;/h2&gt;

&lt;p&gt;Many Astra demos prove that the model can create the shell:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a game&lt;/li&gt;
&lt;li&gt;a dashboard&lt;/li&gt;
&lt;li&gt;a 3D city&lt;/li&gt;
&lt;li&gt;a 3D anatomy app&lt;/li&gt;
&lt;li&gt;a real-estate promo&lt;/li&gt;
&lt;li&gt;an agent workflow&lt;/li&gt;
&lt;li&gt;a creative coding tool&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But a shell is not a product. To become useful, these creations need grounded data: current facts, citations, structured datasets, research sources, financial filings, academic literature, geospatial data, medical references, patents, life sciences, news, and more.&lt;/p&gt;

&lt;p&gt;That is where &lt;a href="https://www.valyu.ai/" rel="noopener noreferrer"&gt;Valyu&lt;/a&gt; fits.&lt;/p&gt;




&lt;p&gt;Relevant Valyu APIs:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Valyu API&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;th&gt;Best use case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.valyu.ai/api-reference/endpoint/search" rel="noopener noreferrer"&gt;Search API&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;POST /v1/search&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Finds information across web, academic, financial, news, and proprietary sources&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.valyu.ai/api-reference/endpoint/contents" rel="noopener noreferrer"&gt;Contents API&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;POST /v1/contents&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Extracts clean LLM-ready content from URLs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.valyu.ai/api-reference/endpoint/answer" rel="noopener noreferrer"&gt;Answer API&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;POST /v1/answer&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Produces grounded answers with citations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.valyu.ai/api-reference/endpoint/deepresearch-create" rel="noopener noreferrer"&gt;DeepResearch API&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;POST /v1/deepresearch/tasks&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Runs deeper multi-step research tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://docs.valyu.ai/api-reference/endpoint/datasources-list" rel="noopener noreferrer"&gt;Datasources API&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;GET /v1/datasources&lt;/code&gt;, &lt;code&gt;GET /v1/datasources/categories&lt;/code&gt;, &lt;code&gt;GET /v1/datasources/search&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Discovers available datasets&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://valyu.ai" rel="noopener noreferrer"&gt;Valyu&lt;/a&gt; sources span academic, finance/company data, healthcare, Env &amp;amp; Geo, compliance, and web. Examples listed by Valyu include arXiv, bioRxiv, ChemRxiv, PubMed, SEC filings, earnings, stocks, ETFs, ClinicalTrials, DailyMed, PubChem, Open Targets, weather, air quality, disaster sources, sanctions lists, and public web content. Exact availability can change, so agents should confirm source IDs through the Datasources API before hard-coding them.&lt;/p&gt;




&lt;h2&gt;
  
  
  How Valyu Can Enrich Astra Creations
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. 3D Anatomy Apps
&lt;/h3&gt;

&lt;p&gt;An Astra-generated anatomy app can use Valyu to pull from medical and scientific sources such as PubMed, ClinicalTrials.gov, DailyMed, ICD, PubChem, and Open Targets.&lt;/p&gt;

&lt;p&gt;Instead of placeholder labels, the app can show sourced explanations, drug references, condition summaries, and citations.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Financial Dashboards
&lt;/h3&gt;

&lt;p&gt;Astra can build the dashboard. Valyu can provide SEC filings, earnings data, stock data, ETF data, commodities, macroeconomic sources, and company research.&lt;/p&gt;

&lt;p&gt;That turns a generated finance UI into something closer to a real research product.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. 3D City Atlases
&lt;/h3&gt;

&lt;p&gt;For demos like Seoul 3D Atlas or Hangzhou in Three.js, Valyu can add weather, air quality, disaster feeds, geocoding, local web context, environmental overlays, and news signals.&lt;/p&gt;

&lt;p&gt;The result is not just a pretty map. It becomes a live information interface.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Real-Estate Demos
&lt;/h3&gt;

&lt;p&gt;For a Zillow-style 3D promo workflow, Valyu can enrich the output with neighborhood information, weather, air quality, local amenities, risk signals, public web context, and market context.&lt;/p&gt;

&lt;p&gt;Astra builds the experience. Valyu grounds the content.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Game Worlds
&lt;/h3&gt;

&lt;p&gt;For games and interactive worlds, Valyu can help generate historically grounded settings, climate-informed environments, cultural references, local myths, geography, and current events.&lt;/p&gt;

&lt;p&gt;This is how generated game worlds stop feeling generic.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Research Assistants
&lt;/h3&gt;

&lt;p&gt;For agentic workflows, Valyu’s DeepResearch API can produce cited reports instead of shallow summaries.&lt;/p&gt;

&lt;p&gt;This is useful for scientific research, market research, competitive research, policy analysis, technical literature reviews, and diligence workflows.&lt;/p&gt;




&lt;h2&gt;
  
  
  Agent Pattern: Astra Builds, Valyu Grounds
&lt;/h2&gt;

&lt;p&gt;The pattern is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Astra creates the app, simulation, game, workflow, or agent.&lt;/li&gt;
&lt;li&gt;The agent decides what data it needs.&lt;/li&gt;
&lt;li&gt;The agent calls Valyu Search, Contents, Answer, or DeepResearch.&lt;/li&gt;
&lt;li&gt;Astra uses the cited results to update the creation.&lt;/li&gt;
&lt;li&gt;The app preserves sources instead of hallucinating facts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is a simplified TypeScript-style sketch. It is illustrative, not copy-paste SDK code: it omits &lt;code&gt;x-api-key&lt;/code&gt; headers, uses a generic &lt;code&gt;post()&lt;/code&gt; helper, and uses a placeholder &lt;code&gt;astra.generate()&lt;/code&gt; function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;valyuTools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;search&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.valyu.ai/v1/search&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;search_type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;all&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;max_num_results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;

  &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[])&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.valyu.ai/v1/contents&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;response_length&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;medium&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;extract_effort&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;high&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;

  &lt;span class="na"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.valyu.ai/v1/answer&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;query&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;

  &lt;span class="na"&gt;deepResearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://api.valyu.ai/v1/deepresearch/tasks&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;standard&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;output_formats&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;markdown&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;enrichAstraCreation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;goal&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;researchPlan&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;astra&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gpt-6-astra&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`
      We are enriching this generated app or demo:

      &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;goal&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;

      Decide whether you need quick search, URL extraction,
      cited answer synthesis, or deep research.

      Return:
      - the best Valyu tool to call
      - the query
      - why that data is needed
    `&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;valyuTools&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;answer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;researchPlan&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;astra&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gpt-6-astra&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`
      Improve the creation using this cited Valyu data.

      Rules:
      - preserve citations
      - do not invent facts
      - separate sourced facts from generated content
      - keep the UI/game/world coherent

      Goal:
      &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;goal&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;

      Valyu data:
      &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;
    `&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Example Prompt: Build a Real World Data Enriched 3D City Atlas
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build a 3D city atlas of Seoul.

Use Valyu to gather:
- current weather
- air quality
- district-level context
- local transport information
- recent public events
- relevant environmental signals

Then create a layered 3D interface where users can toggle:
- weather
- transit
- air quality
- local events
- neighborhood summaries

Every factual panel must include sources.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Example Prompt: Build a Real World Data Enriched Anatomy Explorer
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build a 3D anatomy explorer for the cardiovascular system.

Use Valyu to retrieve:
- PubMed references
- clinical trial context
- drug information from DailyMed
- ICD condition mappings
- plain-English medical explanations

The app should include:
- 3D organ visualization
- sourced condition explanations
- drug references
- citations
- a disclaimer that it is educational, not medical advice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Example Prompt: Build a Real World Data Enriched Real-Estate Experience
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Turn this property listing into a 3D interactive promo.

Use Valyu to enrich it with:
- neighborhood context
- weather
- air quality
- local amenities
- disaster or climate risk signals
- local market context

Create:
- a 3D property tour
- a neighborhood summary
- sourced local context cards
- a buyer-facing PDF summary
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Best Astra + Valyu App Ideas
&lt;/h2&gt;

&lt;p&gt;If I were building from this trend, I would skip generic chatbots and build one of these:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A cited 3D anatomy explorer&lt;/li&gt;
&lt;li&gt;A filing-aware investor dashboard&lt;/li&gt;
&lt;li&gt;A live city intelligence atlas&lt;/li&gt;
&lt;li&gt;A property research agent&lt;/li&gt;
&lt;li&gt;A scientific literature visualizer&lt;/li&gt;
&lt;li&gt;A patent landscape explorer&lt;/li&gt;
&lt;li&gt;A game world builder grounded in geography and history&lt;/li&gt;
&lt;li&gt;A robotics/CAD research assistant&lt;/li&gt;
&lt;li&gt;A climate-aware real-estate explorer&lt;/li&gt;
&lt;li&gt;A medical education simulator with citations&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The common pattern: Astra handles the interface and orchestration; Valyu handles the grounded data layer.&lt;/p&gt;




&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the best GPT-6 Astra demos?
&lt;/h3&gt;

&lt;p&gt;The strongest public examples I found are GPT-6 Astra One-Shot Games, Red Alert 2 Browser Recreation, Astra Plays GTA Vice City, NULLSPACE, Holographic 3D Cards, GPTBlender floor-plan modeling, Universe Duel, Walk Through Van Gogh, Seoul 3D Atlas, and the KiCad PCB layout showcase.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are all GPT-6 Astra demos open source?
&lt;/h3&gt;

&lt;p&gt;No. Some of the best examples are live demos or creator posts without GitHub repos. Where a repo exists, I included it. Where it does not, I labeled the item as a demo or social showcase rather than a runnable project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why not list 100 GPT-6 Astra creations?
&lt;/h3&gt;

&lt;p&gt;Because I could not verify 100 high-quality examples without including weak or unrelated results. A smaller, cleaner list is more useful than a padded roundup.&lt;/p&gt;

&lt;h3&gt;
  
  
  How can developers use Valyu with GPT-6 Astra?
&lt;/h3&gt;

&lt;p&gt;Developers can expose Valyu APIs as tools to an Astra-powered agent. The agent can call Valyu Search for source discovery, Contents for URL extraction, Answer for cited synthesis, DeepResearch for longer reports, and Datasources to discover available datasets.&lt;/p&gt;

&lt;h3&gt;
  
  
  What kinds of Astra apps benefit most from Valyu?
&lt;/h3&gt;

&lt;p&gt;The best fits are apps that need grounded data: 3D atlases, financial dashboards, medical/anatomy explorers, real-estate tools, research assistants, patent explorers, and world building systems.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Takeaway
&lt;/h2&gt;

&lt;p&gt;The best GPT-6 Astra examples are not chatbots. They are playable browser games, 3D worlds, CAD workflows, Blender experiments, computer-use demos, model-routing tools, and agent orchestration projects.&lt;/p&gt;

&lt;p&gt;But the next wave should be more grounded.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Astra can create the interface. Valyu can provide the real-world data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is how impressive demos become useful products.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>openai</category>
      <category>github</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Best Academic Search API for Humans and AI Agents in 2026</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Wed, 02 Sep 2026 16:54:08 +0000</pubDate>
      <link>https://dev.to/unicodeveloper/the-best-academic-search-api-for-humans-and-ai-agents-in-2026-5152</link>
      <guid>https://dev.to/unicodeveloper/the-best-academic-search-api-for-humans-and-ai-agents-in-2026-5152</guid>
      <description>&lt;p&gt;&lt;strong&gt;Quick answer:&lt;/strong&gt; the best academic search API for AI agents in 2026 is &lt;strong&gt;&lt;a href="https://valyu.ai" rel="noopener noreferrer"&gt;Valyu&lt;/a&gt;&lt;/strong&gt;, because it is the only one that returns the passage from a paper and its metadata in a single call, date-bounded and cited. &lt;strong&gt;OpenAlex&lt;/strong&gt; (480M works) and &lt;strong&gt;Semantic Scholar&lt;/strong&gt; (214M papers) are the citation graphs, &lt;strong&gt;Europe PMC&lt;/strong&gt; is the open access full text source, and &lt;strong&gt;Consensus&lt;/strong&gt; is the answer layer for humans.&lt;/p&gt;

&lt;h2&gt;
  
  
  The map, in one screen
&lt;/h2&gt;

&lt;p&gt;Start here: &lt;a href="https://valyu.ai" rel="noopener noreferrer"&gt;Valyu&lt;/a&gt; is #1 for agents. The other four are specialists you route to for one job: a citation edge, an author graph, a full text XML file, a claim-level answer.&lt;/p&gt;

&lt;p&gt;Valyu is the only one that returns retrieval and paper content in the same call. The actual passage from a specific paper, alongside preprints, clinical trials and biomedical records, date-bounded and traced to the primary source. That is the one thing an agent doing a real literature review needs, so it leads. The rest are ranked by how cleanly they slot in behind it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqqybzzb644nf9mes9pp1.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqqybzzb644nf9mes9pp1.webp" alt="Academic search api 1" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Bibliographic APIs answer questions about papers. Only a retrieval layer answers questions about what the papers say.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you are building an AI agent that reasons over scientific literature, you will end up needing more than one API: bibliographic metadata, citation graphs, preprints, peer-reviewed full text and clinical evidence.&lt;/p&gt;

&lt;p&gt;The classic scholarly APIs (OpenAlex, Semantic Scholar) are excellent at records. They hand your agent a DOI, an abstract, a citation count and a link. Then your agent has to fetch, parse and chunk the actual paper, and half the time it hits a paywall. Primary sources like Europe PMC give you real text, but only for the slice of the literature that is open. Answer layers like Consensus do the synthesis for you, on their terms.&lt;/p&gt;

&lt;p&gt;The short version: a domain-grounded academic layer like Valyu does both retrieval and paper content in a single call, so it anchors the stack. The other four are specialists you route to behind it. I have built a few research agents this way now. What I would like to see next is patents and people data folded into the same academic paper search.&lt;/p&gt;

&lt;p&gt;Here is the map.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff6xyb8a1gehbdb6z555k.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff6xyb8a1gehbdb6z555k.webp" alt="Academic search api 2" width="800" height="662"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What does an AI research agent actually need from an academic API?
&lt;/h2&gt;

&lt;p&gt;Most academic API roundups rank on corpus size and whether the free tier is generous. For an agent, the criteria are different:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Full text, not abstracts.&lt;/strong&gt; An abstract tells you a paper exists. It does not tell you the sample size, the ablation, or which baseline they compared against. Agents that reason on abstracts hallucinate methods.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chunked and retrievable.&lt;/strong&gt; Does the paper come back as the relevant passage with a DOI attached, or as a 40-page PDF link your agent has to fetch, OCR and split?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Date bounding.&lt;/strong&gt; Can you cap results at a date so a "state of the art as of March 2025" claim does not quietly absorb a paper published last week?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Citation structure.&lt;/strong&gt; Some questions are retrieval questions (what did they find). Others are graph questions (who cited this, and did anyone fail to replicate it). Different APIs, and most stacks conflate them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access reality.&lt;/strong&gt; Roughly half the literature that matters is paywalled. An API that returns metadata for papers your agent can never read is a lead generator, not a research tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency and chaining.&lt;/strong&gt; A real literature question fans out into 10 to 20 sub-queries. A 1 request per second rate limit is not a minor inconvenience, it is an architecture constraint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent integration.&lt;/strong&gt; Is there a tool wrapper, an MCP endpoint, a clean REST call, or do you glue it yourself?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Keep those in mind, because they are where most "academic API" choices quietly fail for agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Valyu: why it ranks first for AI agents
&lt;/h2&gt;

&lt;p&gt;An agent doing real research needs both in the same call: the specific passage from a specific paper, and the structured metadata around it (DOI, authors, citation, citation count, publication date), bounded by date and traced to the primary source. Valyu is the API purpose-built for that seam, which is why it tops the list.&lt;/p&gt;

&lt;p&gt;It is a Search and DeepResearch API where you can pin the agent to arXiv, PubMed, bioRxiv, medRxiv, ChemRxiv, clinical trials and patents, or leave it open across all of them, and get chunked, tagged, date-filterable results back.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;paperSearch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;bioSearch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;patentSearch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@valyu/ai-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// One tool for the literature, one for clinical and biomedical, one for IP&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;paperSearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;paperSearch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;  &lt;span class="c1"&gt;// arXiv, PubMed, bioRxiv, medRxiv&lt;/span&gt;
  &lt;span class="na"&gt;bioSearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;bioSearch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;       &lt;span class="c1"&gt;// trials, FDA labels, ChEMBL, Open Targets&lt;/span&gt;
  &lt;span class="na"&gt;patentSearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;patentSearch&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;                     &lt;span class="c1"&gt;// USPTO, prior art&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or as a plain REST call, scoped to specific datasets with a point-in-time bound:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://api.valyu.ai/v1/search &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"x-api-key: &lt;/span&gt;&lt;span class="nv"&gt;$VALYU_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "query": "CRISPR base editing off-target effects in primary human cells",
    "included_sources": ["valyu/valyu-pubmed", "valyu/valyu-biorxiv"],
    "start_date": "2024-01-01",
    "end_date": "2026-06-30",
    "response_length": "large",
    "max_num_results": 10
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things in that call do the heavy lifting. &lt;code&gt;response_length: "large"&lt;/code&gt; is the difference between an abstract and the methods and results your agent actually needs to reason over. &lt;code&gt;start_date&lt;/code&gt; and &lt;code&gt;end_date&lt;/code&gt; are what stop a survey agent from quietly citing a paper that did not exist when the question was framed.&lt;/p&gt;

&lt;p&gt;Results come back with the metadata a citation needs already attached:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Transformer Architecture for Protein Folding Prediction"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"authors"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Jane Smith"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"John Doe"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"citation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Smith, J., Doe, J. (2024). Nature Biotechnology, 42(3), 123-135"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"citation_count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"doi"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"10.1038/s41587-024-12345"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"publication_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2024-03-15"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Detailed research content..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"valyu/valyu-arxiv"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  When one retrieval is not enough
&lt;/h3&gt;

&lt;p&gt;DeepResearch is a multi-step task that fans out, reads and synthesises across sources. You kick one off and &lt;code&gt;wait()&lt;/code&gt; on it, so a long investigation does not block your agent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Valyu&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu-js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;valyu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;VALYU_API_KEY&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Kick off a multi-step research task&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;What is the current evidence base for GLP-1 agonists in &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
         &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;non-diabetic obesity, and where do the trials disagree?&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;heavy&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;   &lt;span class="c1"&gt;// fast | standard | heavy | max&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deepresearch_id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;completed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   &lt;span class="c1"&gt;// cited markdown (or a PDF via outputFormats)&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sources&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// the primary sources it traced&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The report comes back as cited markdown, traced to the same primary sources the search tools pull from, so the deep-research path and the single-call path share one grounding layer. That matters more in science than in most domains: if your literature review and your quick lookup disagree because they hit different indexes, you cannot trust either.&lt;/p&gt;

&lt;p&gt;To get your agent to reach for this on its own, wrap it as a tool whose description draws a hard line between "look something up" and "go investigate this":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;tool&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Valyu&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu-js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;valyu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;VALYU_API_KEY&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;literatureReview&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Run a deep, multi-step literature investigation and return one cited report. &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Use this when the question needs synthesis across many papers, preprints and &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;trials (e.g. 'summarise the evidence for X and where the studies disagree'), &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;or when the answer depends on comparing methods across studies. &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Do NOT use it to find a single paper, look up a DOI, or check a citation count &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;- use paperSearch for those; this runs for minutes and costs more. &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Returns cited markdown plus sources.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The full research question, in plain English.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;standard&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deepresearch_id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;report&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;output&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;sources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;report&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sources&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;Do NOT&lt;/code&gt; line is doing the real work. Without an explicit boundary, models over-call the slow tool on trivial questions and under-call it on the hard ones.&lt;/p&gt;

&lt;p&gt;Match the mode to the loop. There are four:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Mode&lt;/th&gt;
&lt;th&gt;Runtime&lt;/th&gt;
&lt;th&gt;Rough cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;fast&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;~5 minutes&lt;/td&gt;
&lt;td&gt;~$0.10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;standard&lt;/code&gt; (default)&lt;/td&gt;
&lt;td&gt;10 to 20 minutes&lt;/td&gt;
&lt;td&gt;~$0.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;heavy&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;30 to 90 minutes&lt;/td&gt;
&lt;td&gt;~$2.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;max&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;up to a few hours&lt;/td&gt;
&lt;td&gt;~$15&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The old &lt;code&gt;lite&lt;/code&gt; mode is deprecated and maps to &lt;code&gt;standard&lt;/code&gt;. For anything above &lt;code&gt;standard&lt;/code&gt;, skip &lt;code&gt;wait()&lt;/code&gt; and pass a &lt;code&gt;webhookUrl&lt;/code&gt; to &lt;code&gt;create()&lt;/code&gt; so the finished report POSTs back and the agent stays responsive. The &lt;code&gt;webhook_secret&lt;/code&gt; comes back only once, on create.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: the snippets use Vercel AI SDK v5 (&lt;code&gt;inputSchema&lt;/code&gt;). On v4 the field is &lt;code&gt;parameters&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  2. OpenAlex: is it still free in 2026?
&lt;/h2&gt;

&lt;p&gt;Not entirely, and this is the biggest change in the academic API landscape this year.&lt;/p&gt;

&lt;p&gt;OpenAlex is the open replacement for Microsoft Academic Graph, and the best free bibliographic index in existence: 480 million works, plus authors, institutions, venues and concepts, all linked. If your question is about the shape of a literature rather than its content, this is where you go.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="s2"&gt;"https://api.openalex.org/works&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;
?search=graph+neural+networks+molecular+property&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;
&amp;amp;filter=from_publication_date:2025-01-01&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;
&amp;amp;api_key=&lt;/span&gt;&lt;span class="nv"&gt;$OPENALEX_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The graph is the product. You can walk from a paper to its authors to their institutions to everything else that institution has published on a topic, in a handful of calls, without a licensing conversation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foszvori11u33azl8kohk.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foszvori11u33azl8kohk.webp" alt="Academic search api 3" width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The pricing change: as of &lt;strong&gt;13 February 2026&lt;/strong&gt;, keys are mandatory and usage beyond a daily allowance is priced. Single-work lookups by DOI or ID stay free, and the bulk data download remains free.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Semantic Scholar: what are the rate limits?
&lt;/h2&gt;

&lt;p&gt;The introductory rate limit on an individual API key is &lt;strong&gt;1 request per second&lt;/strong&gt; across all endpoints. Higher limits are granted only after a review. That is the number that decides whether Semantic Scholar can sit on your critical path. It usually cannot.&lt;/p&gt;

&lt;p&gt;Allen Institute for AI's academic graph holds 214 million papers, 2.49 billion citations and 79 million authors, plus the extras that make it more useful to an agent than a raw index: TLDR summaries, SPECTER2 embeddings, and influential-citation counts that separate a real intellectual debt from a drive-by reference.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"x-api-key: &lt;/span&gt;&lt;span class="nv"&gt;$S2_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s2"&gt;"https://api.semanticscholar.org/graph/v1/paper/search&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;
?query=retrieval%20augmented%20generation&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;
&amp;amp;fields=title,abstract,tldr,citationCount,openAccessPdf"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That &lt;code&gt;openAccessPdf&lt;/code&gt; field is the single most useful field on this list, because it tells your agent whether it can actually read the thing before it wastes a fetch. It comes back with a URL, an OA status colour and a licence note, so you can gate retrieval on licence rather than hope. Pair it with the separate Recommendations API and you have a decent "papers like this one" loop for free.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4k6oakzpk3ih1g2hblzz.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4k6oakzpk3ih1g2hblzz.webp" alt="Academic search api 4" width="800" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Europe PMC: how do you get open access full text?
&lt;/h2&gt;

&lt;p&gt;Two calls. Search, then fetch the XML by PMCID.&lt;/p&gt;

&lt;p&gt;Europe PMC is PubMed's more agent-friendly cousin. It holds about 48.8 million records, of which roughly 12.1 million have full text in Europe PMC and about 8.1 million are open access, plus 1.2 million preprints and grant metadata, in one REST API that speaks JSON and does not make you do the ESearch then EFetch dance.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="s2"&gt;"https://www.ebi.ac.uk/europepmc/webservices/rest/search&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;
?query=CRISPR%20AND%20SRC:PPR&amp;amp;format=json&amp;amp;pageSize=25"&lt;/span&gt;

&lt;span class="c"&gt;# then, for anything in the open access subset&lt;/span&gt;
curl &lt;span class="s2"&gt;"https://www.ebi.ac.uk/europepmc/webservices/rest/PMC1234567/fullTextXML"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;SRC:PPR&lt;/code&gt; filter in that first call scopes to preprints, which matters because PubMed only indexes preprints reporting NIH-funded research, through the NIH Preprint Pilot. Everything else is absent, and in fast-moving biology the preprint is where the finding lands first.&lt;/p&gt;

&lt;p&gt;Both calls above are live as written: the search returns 13,552 hits for that CRISPR query, and the second returns JATS XML.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdp05cwbhz174kg77hi9i.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdp05cwbhz174kg77hi9i.webp" alt="Academic search api 4" width="800" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Consensus: should you build on it, or on Elicit?
&lt;/h2&gt;

&lt;p&gt;Neither, if you are building an agent you control. Both, if you are a human doing a literature review this afternoon.&lt;/p&gt;

&lt;p&gt;Consensus sits one level above the APIs and does the synthesis for you: a search engine over 220M+ papers that returns claim-level answers with study metadata, sample sizes and journal quality signals, rather than a list of links. It has a REST API, and API plus MCP usage draw on one monthly pool of calls tied to your subscription tier, with overage at $0.10 per call. Higher-volume API access is quoted rather than self-serve.&lt;/p&gt;

&lt;p&gt;It belongs on this list for two reasons. First, if your users are researchers, this is the bar. When someone asks your agent "does creatine improve cognition" they are comparing your answer to the one Consensus gives them, with its yes/no/mixed meter and its study quality badges. Second, for a human doing early-stage literature work it is genuinely faster than building anything.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiop3avs0qko70jia71rz.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiop3avs0qko70jia71rz.webp" alt="Academic search api 5" width="800" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One pool feeds both doors. And the reason you would still build your own: the pipeline is theirs, not yours.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to choose: route by question type
&lt;/h2&gt;

&lt;p&gt;Do not pick one. Route by question type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2kta64dvgtd2kejvt8o6.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2kta64dvgtd2kejvt8o6.webp" alt="Academic search api 6" width="800" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Your agent's question&lt;/th&gt;
&lt;th&gt;Route to&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;"What did the paper actually find or measure?"&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Valyu&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Returns the passage plus DOI, authors and date in one call&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"Summarise the evidence and where studies disagree"&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Valyu DeepResearch&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Multi-step fan-out, one cited report, same grounding layer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"Who cited this, and did anyone replicate it?"&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;OpenAlex&lt;/strong&gt; or &lt;strong&gt;Semantic Scholar&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Citation edges and author graphs, not content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"What has this lab or institution published?"&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;OpenAlex&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Works, authors, institutions and venues are linked&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"Can my agent legally read this paper?"&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Semantic Scholar&lt;/strong&gt; (&lt;code&gt;openAccessPdf&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;OA status and licence before you spend a fetch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"Give me the full JATS XML of this biomedical paper"&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Europe PMC&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Free, open, two calls, includes preprints via &lt;code&gt;SRC:PPR&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"I am a human and I need an answer in 30 seconds"&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Consensus&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Claim-level answers with study quality signals&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;"arXiv and PubMed together, one schema"&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Valyu&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;One query interface, shared date filtering, one result shape&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The rule of thumb I have landed on:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Bibliographic APIs for questions about papers, domain-grounded retrieval for questions about what the papers say, and answer layers for humans in a hurry.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most real research agents need at least the first two. The engineering that actually matters is not picking a winner, it is routing between them cleanly instead of forcing one API to do a job it was never built for.&lt;/p&gt;

&lt;p&gt;Valyu is also shipping more on their roadmap. Adding a graph to make the existing search more powerful might happen sooner than later.&lt;/p&gt;

&lt;p&gt;The most common failure I see is an agent wired to OpenAlex or Semantic Scholar alone, producing confident summaries built entirely from abstracts. It reads well. It is frequently wrong about methods, and it has no way to know it is wrong. Add a retrieval layer that returns the text, and most of that class of error disappears.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the best academic search API for AI agents?
&lt;/h3&gt;

&lt;p&gt;For an agent doing real research, the decisive capability is returning retrieval and paper content in one call: the passage from the paper plus its DOI, authors and citation count, date-bounded and cited, which in this case is Valyu. OpenAlex, Semantic Scholar, Europe PMC and Consensus are each strong at one narrower job, and you route to them behind it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I just use one API for a research agent?
&lt;/h3&gt;

&lt;p&gt;Usually not, but Valyu gets you closest. It covers preprints, peer-reviewed literature, biomedical and clinical evidence, and patents through a single retrieval interface with date filtering. You will still want OpenAlex or Semantic Scholar if your question is genuinely about the citation graph rather than the science, and Europe PMC is a useful free fallback for open access biomedical full text.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between a bibliographic API and a domain-grounded academic API?
&lt;/h3&gt;

&lt;p&gt;A bibliographic API (OpenAlex, Semantic Scholar) returns records: title, authors, DOI, citation count, maybe an abstract. It is a catalogue. A domain-grounded academic API is scoped to scholarly primary sources and returns chunked, date-filterable content traced back to the paper itself. One tells you the paper exists. The other tells you what is in it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do academic APIs support date bounding for reproducible research?
&lt;/h3&gt;

&lt;p&gt;This varies, and it is easy to get wrong. Valyu lets you bound results with &lt;code&gt;start_date&lt;/code&gt; and &lt;code&gt;end_date&lt;/code&gt;, so an agent answering "what was the state of the art in early 2025" cannot leak a paper from last month into the answer. OpenAlex and Semantic Scholar support publication-date filters on metadata. Where most stacks leak is on the retrieval side: the metadata is filtered but the retrieved text is not.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are these APIs free?
&lt;/h3&gt;

&lt;p&gt;Mostly, with real caveats in 2026. Europe PMC is free and open. Semantic Scholar is free with a 1 request per second key. OpenAlex changed in February 2026: keys are now required and usage beyond a daily allowance is priced. Consensus gates its API behind a paid plan, with calls shared against your MCP usage. Valyu gives you $10 in free credits to start, $20 with a work email.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which academic APIs are free in 2026?
&lt;/h3&gt;

&lt;p&gt;Europe PMC is free and open. Semantic Scholar is free with a key, capped at 1 request per second. OpenAlex changed on 13 February 2026: keys are now mandatory and usage beyond $1 a day is priced, though single-work lookups by DOI or ID stay free and bulk data download remains free. Consensus gates its API behind a paid plan, with calls shared against your MCP usage. Valyu gives you $10 in free credits, $20 with a work email.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the best API for searching arXiv and PubMed together?
&lt;/h3&gt;

&lt;p&gt;Valyu, because both sit behind one query interface with shared date filtering and a single result schema. Querying them directly means two very different APIs: arXiv speaks Atom XML with a roughly one-request-per-three-seconds limit, and PubMed requires the two-step ESearch then EFetch pattern and returns abstracts rather than full text.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does Valyu cost to try?
&lt;/h3&gt;

&lt;p&gt;Valyu gives you $10 in free credits at &lt;a href="https://platform.valyu.ai" rel="noopener noreferrer"&gt;platform.valyu.ai&lt;/a&gt;, or $20 if you sign up with a work email, no credit card required. Enough to point it at a literature you already know well and inspect the citations. That is the fastest way to feel the difference between a link to a paper and the paper itself.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>api</category>
      <category>search</category>
    </item>
    <item>
      <title>OpenAlex vs Valyu: A Feature-by-Feature Research Platform Comparison</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Fri, 28 Aug 2026 19:03:47 +0000</pubDate>
      <link>https://dev.to/unicodeveloper/openalex-vs-valyu-a-feature-by-feature-research-platform-comparison-3keo</link>
      <guid>https://dev.to/unicodeveloper/openalex-vs-valyu-a-feature-by-feature-research-platform-comparison-3keo</guid>
      <description>&lt;p&gt;OpenAlex and Valyu solve similar research problems. &lt;a href="https://www.valyu.ai" rel="noopener noreferrer"&gt;Valyu&lt;/a&gt; is a search and DeepResearch API built for AI agents, built for retrieving full-text evidence with attached citations across academic literature, scientific research, papers, and specialist sources in a single call. &lt;a href="https://openalex.org" rel="noopener noreferrer"&gt;OpenAlex&lt;/a&gt; is an open scholarly metadata graph of more than 322 million works, built for bibliometric discovery, citation analysis, and structured queries across works, authors, institutions, and topics. &lt;/p&gt;

&lt;h2&gt;
  
  
  Quick answer
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://valyu.ai" rel="noopener noreferrer"&gt;Valyu&lt;/a&gt; gives you usage-based semantic retrieval of full-text passages with structured citations across academic literature, scientific research, papers, journals and specialist sources in a single call for both humans and AI agents. &lt;a href="https://openalex.org" rel="noopener noreferrer"&gt;OpenAlex&lt;/a&gt; gives you an open scholarly graph of 322 million-plus works with structured metadata, filters, authors, institutions, topics, and citation relationships&lt;/p&gt;

&lt;h2&gt;
  
  
  What content can OpenAlex index?
&lt;/h2&gt;

&lt;p&gt;OpenAlex indexes scholarly works as a connected graph. A "work" is any scholarly document: a journal article, conference paper, book or book chapter, dataset, dissertation, or preprint.&lt;/p&gt;

&lt;p&gt;Works are split across two corpora, which is worth knowing before you compare headline numbers. The &lt;strong&gt;core&lt;/strong&gt; is the curated catalogue and it is what every query returns by default: a live call to &lt;code&gt;api.openalex.org/works&lt;/code&gt; in August 2026 gives &lt;strong&gt;322,147,582&lt;/strong&gt; works. An &lt;strong&gt;expansion&lt;/strong&gt; layer adds a rawer 165,253,218 records, mostly datasets and single-repository entries, and &lt;code&gt;corpus=all&lt;/code&gt; returns both for &lt;strong&gt;487,400,800&lt;/strong&gt;. Every "320 million" figure you see quoted, including the one in this article, is the core.&lt;/p&gt;

&lt;p&gt;The graph connects works to authors, sources (journals, conference proceedings, repositories), institutions, topics, keywords, funders, awards, and publishers. Bibliographic coverage is assembled from upstream indexes including Crossref, PubMed, DataCite, DOAJ, and arXiv.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;search&lt;/code&gt; parameter for works matches across title, abstract, and fulltext, and the &lt;code&gt;fulltext.search&lt;/code&gt; filter covers the same three fields.&lt;/p&gt;

&lt;p&gt;Separately, OpenAlex maintains a content archive of cached full text: 50M+ PDFs (roughly 250 TB) and ~43M TEI XML files parsed by Grobid. Filtering on &lt;code&gt;has_content.pdf:true&lt;/code&gt; returns &lt;strong&gt;52,407,611&lt;/strong&gt; works, every one of them open access. Retrieval runs through a separate content API at $0.01 per file, which is about 100 files a day on the free $1 budget.&lt;/p&gt;

&lt;p&gt;OpenAlex does not provide full text for paywalled or subscription-only publications. It returns metadata and links to locations where full text may be available, and what you can actually retrieve depends on the open-access status of each work.&lt;/p&gt;

&lt;h2&gt;
  
  
  What content can Valyu index?
&lt;/h2&gt;

&lt;p&gt;Valyu indexes roughly 40 million academic papers alongside web results, financial market data, and licensed and specialist collections. The academic sources break down as:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;th&gt;Coverage&lt;/th&gt;
&lt;th&gt;Update frequency&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;PubMed&lt;/td&gt;
&lt;td&gt;37M+ papers&lt;/td&gt;
&lt;td&gt;Monthly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;arXiv&lt;/td&gt;
&lt;td&gt;2.5M+ papers&lt;/td&gt;
&lt;td&gt;Monthly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;bioRxiv&lt;/td&gt;
&lt;td&gt;250K+ papers&lt;/td&gt;
&lt;td&gt;Monthly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;medRxiv&lt;/td&gt;
&lt;td&gt;80K+ papers&lt;/td&gt;
&lt;td&gt;Monthly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;chemRxiv&lt;/td&gt;
&lt;td&gt;30K+ papers&lt;/td&gt;
&lt;td&gt;Monthly&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Licensed Wiley collections cover finance journals and finance books (quantitative finance, risk, investment theory) on a monthly cycle, and Wiley Health &amp;amp; Life Sciences journals (medicine, nursing, pharmacology, allied health) quarterly.&lt;/p&gt;

&lt;p&gt;Beyond academic content, the index covers clinical trials from ClinicalTrials.gov (500K+, real-time), USPTO patents (8M+, weekly), EPO patents (4M+, weekly), FDA drug labels (150K+, real-time) and others.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://platform.valyu.ai" rel="noopener noreferrer"&gt;Valyu&lt;/a&gt; does not provide full text for every indexed publication. Full-text retrieval covers open-access content and sources where access has been licensed, and licensed content carries usage restrictions.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do the web interfaces compare?
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://platform.valyu.ai" rel="noopener noreferrer"&gt;Valyu platform&lt;/a&gt; provides a search playground that queries across source categories and returns title, URL, content, and structured citations. Because retrieval is semantic, an exact-title query matches by meaning rather than string equality, which returns the target work plus related material rather than a single row.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://openalex.org" rel="noopener noreferrer"&gt;OpenAlex interface&lt;/a&gt; presents a search box and filter options. Boolean operators (&lt;code&gt;AND&lt;/code&gt;, &lt;code&gt;OR&lt;/code&gt;, &lt;code&gt;NOT&lt;/code&gt;) must be capitalised, and quotation marks give you phrase matching. Author searches run through the &lt;code&gt;/authors&lt;/code&gt; endpoint, and citation searching runs through citation filters.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;OpenAlex&lt;/th&gt;
&lt;th&gt;Valyu&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Corpus size&lt;/td&gt;
&lt;td&gt;322M core works, 487M including the expansion layer&lt;/td&gt;
&lt;td&gt;~40M academic papers, plus web, financial, and specialist sources&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API base URL&lt;/td&gt;
&lt;td&gt;&lt;code&gt;api.openalex.org&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;api.valyu.ai&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authentication&lt;/td&gt;
&lt;td&gt;Optional free key ($0.10/day without, $1/day with)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;x-api-key&lt;/code&gt; header, required&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Query type&lt;/td&gt;
&lt;td&gt;Keyword, Boolean, phrase, proximity, wildcard, semantic&lt;/td&gt;
&lt;td&gt;Semantic full-text retrieval&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Max query size&lt;/td&gt;
&lt;td&gt;~4 KB URL&lt;/td&gt;
&lt;td&gt;Not a documented constraint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Filters&lt;/td&gt;
&lt;td&gt;Structured entity filters across all endpoints&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;search_type&lt;/code&gt;, &lt;code&gt;included_sources&lt;/code&gt;, &lt;code&gt;excluded_sources&lt;/code&gt;, &lt;code&gt;source_biases&lt;/code&gt;, &lt;code&gt;relevance_threshold&lt;/code&gt;, &lt;code&gt;start_date&lt;/code&gt;, &lt;code&gt;end_date&lt;/code&gt;, &lt;code&gt;category&lt;/code&gt;, &lt;code&gt;country_code&lt;/code&gt;, &lt;code&gt;max_num_results&lt;/code&gt;, &lt;code&gt;max_price&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pagination&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;page&lt;/code&gt; / &lt;code&gt;per-page&lt;/code&gt; (max 100), 10,000-result ceiling, cursor paging beyond&lt;/td&gt;
&lt;td&gt;&lt;code&gt;max_num_results&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Response fields&lt;/td&gt;
&lt;td&gt;Selectable via &lt;code&gt;select&lt;/code&gt;; full metadata schema&lt;/td&gt;
&lt;td&gt;title, url, content, relevance_score, citations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Citations&lt;/td&gt;
&lt;td&gt;Citation graph: &lt;code&gt;cited_by_count&lt;/code&gt;, references, related works&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;doi&lt;/code&gt;, &lt;code&gt;authors&lt;/code&gt;, &lt;code&gt;citation&lt;/code&gt;, &lt;code&gt;citation_count&lt;/code&gt;, &lt;code&gt;references&lt;/code&gt; on academic results&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full text&lt;/td&gt;
&lt;td&gt;52.4M works with a cached PDF, all open access&lt;/td&gt;
&lt;td&gt;Open-access papers plus licensed collections&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Web search&lt;/td&gt;
&lt;td&gt;Not included&lt;/td&gt;
&lt;td&gt;Included&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Financial data&lt;/td&gt;
&lt;td&gt;Not included&lt;/td&gt;
&lt;td&gt;75 exchanges, structured JSON&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Free tier&lt;/td&gt;
&lt;td&gt;$1/day of API usage with a free key&lt;/td&gt;
&lt;td&gt;$10 in credits, $20 with a work email&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Freshness, access rights, coverage gaps, and pricing
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Freshness.&lt;/strong&gt; OpenAlex updates continuously from its upstream indexes. Valyu’s indexes daily, monthly and quarterly. If your workflow depends on a paper published last week, Valyu will surface it faster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Access rights.&lt;/strong&gt; OpenAlex provides metadata for all indexed works and full text only for open-access ones. Valyu provides full text for open-access papers plus licensed collections where access has been secured. Both operate inside publisher restrictions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coverage gaps.&lt;/strong&gt; OpenAlex’s 322 million core works are bibliographic records, not 322 million retrievable full texts: 52.4 million carry a cached PDF. Valyu’s roughly 40 million academic papers are a fraction of OpenAlex’s record count but gives full-text depth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which workflows fit each service?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Valyu&lt;/strong&gt; fits full-text evidence retrieval and multi-source search:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI agent retrieval with structured citations&lt;/li&gt;
&lt;li&gt;Cross-domain research spanning papers, web content, and financial data&lt;/li&gt;
&lt;li&gt;Full-text passage extraction from open-access PubMed and arXiv content&lt;/li&gt;
&lt;li&gt;Specialist retrieval from SEC filings, clinical trials, patents, and regulatory documents&lt;/li&gt;
&lt;li&gt;RAG pipelines needing clean, cited content&lt;/li&gt;
&lt;li&gt;Scientific and academic deepresearch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;OpenAlex&lt;/strong&gt; fits structured metadata discovery and citation graph analysis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bibliometric analysis across authors, institutions, and topics&lt;/li&gt;
&lt;li&gt;Citation tracking and reference mining&lt;/li&gt;
&lt;li&gt;Systematic review screening by publication year, type, or venue&lt;/li&gt;
&lt;li&gt;Large-scale metadata extraction via cursor paging or the bulk snapshot&lt;/li&gt;
&lt;li&gt;Open-access identification and location linking&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When do OpenAlex and Valyu work together?
&lt;/h2&gt;

&lt;p&gt;The combined pipeline uses OpenAlex for discovery and Valyu for evidence retrieval:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Query OpenAlex for works matching a topic, author, or publication window using filters and search parameters.&lt;/li&gt;
&lt;li&gt;Extract DOIs, titles, and metadata from the results. Single-entity lookups by DOI are free, so this stage costs almost nothing.&lt;/li&gt;
&lt;li&gt;Use Valyu to retrieve full-text passages and structured citations for those works or related content.&lt;/li&gt;
&lt;li&gt;Combine OpenAlex's citation graph with Valyu's retrieved passages to build evidence-backed output.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;An agent can move across domains in a single run: OpenAlex establishes which works matter and how they connect, Valyu pulls the text that supports a claim. Discovery and retrieval are handled by services designed for each, rather than one tool doing both adequately.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the same query returns from each in Practice
&lt;/h2&gt;

&lt;p&gt;The two services return different object types for identical input, which is the clearest way to see the design split.&lt;/p&gt;

&lt;p&gt;A topic search for "melanoma immunotherapy" on OpenAlex returns work records: titles, citation counts, author and institution links, topic assignments. The same query on Valyu returns full-text passages with citations attached to each one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F47yxg8enc3imhpa6ifz6.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F47yxg8enc3imhpa6ifz6.webp" alt="Results showing up in the “Basic” tab" width="799" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnq83o4g1xrzry9x8tvaa.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnq83o4g1xrzry9x8tvaa.webp" alt="Results showing up in the “Advanced” tab" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The same query on Valyu returns full-text passages with citations attached to each one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuv9om9rlu49rp65le2nk.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuv9om9rlu49rp65le2nk.webp" alt="Results showing from different papers and publications." width="800" height="437"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqlbxmeh5oqguvbuqiofw.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqlbxmeh5oqguvbuqiofw.webp" alt="Results showing the “copy citation” button to outrightly copy citations." width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy8tfsa58u6ley5irp3c9.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy8tfsa58u6ley5irp3c9.webp" alt="Results showing in Table format." width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An exact-title search on OpenAlex uses the &lt;code&gt;search&lt;/code&gt; parameter or a title filter and resolves to the record. On Valyu, semantic matching returns the target work alongside related content, because it is matching meaning rather than a string.&lt;/p&gt;

&lt;p&gt;An author search on OpenAlex uses the dedicated &lt;code&gt;/authors&lt;/code&gt; endpoint with affiliation and output data. Valyu has no equivalent author endpoint; author filtering depends on metadata in the indexed source.&lt;/p&gt;

&lt;p&gt;A supporting-evidence search on OpenAlex returns related works through the citation graph. Valyu returns passages that address the query directly.&lt;/p&gt;

&lt;p&gt;This is a difference in design goal, not in quality. OpenAlex is built for graph discovery. Valyu is built for evidence retrieval.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do the APIs compare on query syntax and filters?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;OpenAlex&lt;/strong&gt; is a REST API at &lt;code&gt;api.openalex.org&lt;/code&gt;. Every entity type is an endpoint: &lt;code&gt;/works&lt;/code&gt;, &lt;code&gt;/authors&lt;/code&gt;, &lt;code&gt;/sources&lt;/code&gt;, &lt;code&gt;/institutions&lt;/code&gt;, &lt;code&gt;/topics&lt;/code&gt;, &lt;code&gt;/keywords&lt;/code&gt;, &lt;code&gt;/funders&lt;/code&gt; and more, each supporting list, filter, search, sort, and group operations.&lt;/p&gt;

&lt;p&gt;Query syntax supports phrase matching with quotes, proximity search via &lt;code&gt;~N&lt;/code&gt; (&lt;code&gt;"climate change"~5&lt;/code&gt; finds the terms within five words of each other), and unstemmed exact matching plus wildcards through &lt;code&gt;search.exact&lt;/code&gt; (&lt;code&gt;machin*&lt;/code&gt; matches machine, machines, machinery, with a three-character minimum before the wildcard). Maximum URL length is approximately &lt;strong&gt;4 KB&lt;/strong&gt;; longer queries return a 400, and the documented fix is to split the Boolean query and combine the returned IDs client-side.&lt;/p&gt;

&lt;p&gt;Semantic search is generally available as its own method, priced the same as keyword search, capped at 2,000 characters of input, rate limited to 1 request per second, and returning at most 50 results.&lt;/p&gt;

&lt;p&gt;Pagination uses &lt;code&gt;page&lt;/code&gt; and &lt;code&gt;per-page&lt;/code&gt;, where &lt;strong&gt;100 is the supported maximum&lt;/strong&gt; (200 is deprecated legacy behaviour). Basic paging reaches only the first 10,000 results, since &lt;code&gt;page * per_page&lt;/code&gt; must not exceed 10,000. Cursor paging (&lt;code&gt;cursor=*&lt;/code&gt;, then follow &lt;code&gt;next_cursor&lt;/code&gt;) goes deeper, and for genuinely bulk work the docs point you at the OpenAlex snapshot instead.&lt;/p&gt;

&lt;p&gt;An API key is &lt;strong&gt;not&lt;/strong&gt; required. You can make basic queries with no key at all, at $0.10 of usage per day; a free key raises that 10x to $1 per day. The key travels as &lt;code&gt;?api_key=KEY&lt;/code&gt; or an &lt;code&gt;Authorization: Bearer KEY&lt;/code&gt; header, and both work identically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Valyu&lt;/strong&gt; is a &lt;a href="https://api.valyu.ai" rel="noopener noreferrer"&gt;REST API&lt;/a&gt; authenticated with an &lt;code&gt;x-api-key&lt;/code&gt; header, with Python, TypeScript, and Rust (alpha) SDKs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Valyu&lt;/span&gt;

&lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;VALYU_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Phase 3 melanoma immunotherapy trials&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-clinical-trials&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;start_date&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2024-01-01&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_num_results&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_price&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;search_type&lt;/code&gt; takes four values: &lt;code&gt;all&lt;/code&gt; (web plus proprietary, with an LLM router picking sources), &lt;code&gt;web&lt;/code&gt;, &lt;code&gt;proprietary&lt;/code&gt;, and &lt;code&gt;news&lt;/code&gt;. Alongside it the endpoint documents &lt;code&gt;included_sources&lt;/code&gt;, &lt;code&gt;excluded_sources&lt;/code&gt;, &lt;code&gt;source_biases&lt;/code&gt; (soft-rank any source from -5 to +5 instead of filtering it out), &lt;code&gt;max_num_results&lt;/code&gt;, &lt;code&gt;max_price&lt;/code&gt;, &lt;code&gt;relevance_threshold&lt;/code&gt;, &lt;code&gt;start_date&lt;/code&gt;, &lt;code&gt;end_date&lt;/code&gt;, &lt;code&gt;category&lt;/code&gt;, &lt;code&gt;country_code&lt;/code&gt;, &lt;code&gt;response_length&lt;/code&gt;, and &lt;code&gt;is_tool_call&lt;/code&gt;. &lt;code&gt;included_sources&lt;/code&gt; accepts dataset ids, bare domains, presets (&lt;code&gt;academic&lt;/code&gt;, &lt;code&gt;finance&lt;/code&gt;, &lt;code&gt;patent&lt;/code&gt;, &lt;code&gt;legal&lt;/code&gt;, &lt;code&gt;medical&lt;/code&gt;, &lt;code&gt;health&lt;/code&gt;, &lt;code&gt;genomics&lt;/code&gt;, &lt;code&gt;chemistry&lt;/code&gt;, &lt;code&gt;physics&lt;/code&gt;, &lt;code&gt;politics&lt;/code&gt;, &lt;code&gt;transportation&lt;/code&gt;, &lt;code&gt;cybersecurity&lt;/code&gt;, &lt;code&gt;compliance&lt;/code&gt;, &lt;code&gt;environment&lt;/code&gt;, &lt;code&gt;automotive&lt;/code&gt;, &lt;code&gt;pulse&lt;/code&gt;), and saved &lt;code&gt;collection:&amp;lt;name&amp;gt;&lt;/code&gt; groups.&lt;/p&gt;

&lt;p&gt;Beyond search, the API surface includes Contents, Answer (grounded answers with citations), and DeepResearch (an autonomous agent with fast, standard, heavy, and max modes producing cited reports and xlsx/docx/pptx/pdf/csv deliverables).&lt;/p&gt;

&lt;p&gt;Results carry title, URL, content, source, and &lt;code&gt;relevance_score&lt;/code&gt;. Academic results add &lt;code&gt;doi&lt;/code&gt;, &lt;code&gt;authors&lt;/code&gt;, &lt;code&gt;citation&lt;/code&gt;, &lt;code&gt;citation_count&lt;/code&gt;, and &lt;code&gt;references&lt;/code&gt;, plus &lt;code&gt;abstract&lt;/code&gt; and figures where the source provides them. The whole shape is built for LLM context windows.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does OpenAlex require an API key?
&lt;/h3&gt;

&lt;p&gt;No. You can make basic queries with no key at all. A free key raises your daily budget 10x, from $0.10 to $1, and is passed either as &lt;code&gt;?api_key=KEY&lt;/code&gt; or an &lt;code&gt;Authorization: Bearer KEY&lt;/code&gt; header.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Valyu provide full text for all indexed papers?
&lt;/h3&gt;

&lt;p&gt;Valyu provides full text for open-access papers from PubMed, arXiv, bioRxiv, medRxiv, and chemRxiv, plus licensed Wiley finance and Health &amp;amp; Life Sciences collections. Licensed content carries usage restrictions.&lt;/p&gt;

&lt;h3&gt;
  
  
  How current is each index?
&lt;/h3&gt;

&lt;p&gt;OpenAlex updates continuously from Crossref, PubMed, DataCite, DOAJ, and arXiv. Valyu refreshes academic sources monthly, SEC filings daily, and clinical trials, drug labels, and market data in real time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Valyu include web search?
&lt;/h3&gt;

&lt;p&gt;Yes. Web search costs $1.50 per 1,000 results. Setting &lt;code&gt;search_type&lt;/code&gt; to &lt;code&gt;all&lt;/code&gt; queries web and proprietary sources in one call, with a router selecting sources; &lt;code&gt;web&lt;/code&gt;, &lt;code&gt;proprietary&lt;/code&gt;, and &lt;code&gt;news&lt;/code&gt; narrow it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use both in the same pipeline?
&lt;/h3&gt;

&lt;p&gt;Yes, and free DOI lookups on OpenAlex make it cheap. OpenAlex identifies works by topic, author, or citation relationship, and Valyu retrieves full-text passages and citations for them.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does Valyu cost to start?
&lt;/h3&gt;

&lt;p&gt;$10 in free credits with no credit card, or $20 with a work email. Credits work across every source type. Keys come from &lt;a href="https://platform.valyu.ai" rel="noopener noreferrer"&gt;platform.valyu.ai&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do preprints count as peer-reviewed papers?
&lt;/h3&gt;

&lt;p&gt;No. Preprints from arXiv, bioRxiv, medRxiv, and chemRxiv are not peer-reviewed, and both services index them alongside peer-reviewed articles. Filter on source or publication type when evidence quality matters.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>research</category>
      <category>python</category>
    </item>
    <item>
      <title>Semantic Scholar vs Valyu: Which Research API Should Your Agent Call?</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Fri, 28 Aug 2026 13:39:03 +0000</pubDate>
      <link>https://dev.to/unicodeveloper/semantic-scholar-vs-valyu-which-research-api-should-your-agent-call-oc7</link>
      <guid>https://dev.to/unicodeveloper/semantic-scholar-vs-valyu-which-research-api-should-your-agent-call-oc7</guid>
      <description>&lt;p&gt;If you are building a research agent, the first real decision you make is what comes back from the retrieval call. A paper record, or the paragraph inside the paper that answers the question. Those are different products, and picking the wrong one shows up three weeks later as a RAG pipeline you did not plan to build. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.valyu.ai" rel="noopener noreferrer"&gt;Valyu&lt;/a&gt; is a search and DeepResearch API that retrieves full text with structured citations across academic, clinical, scientific, patents &amp;amp; regulatory sources. &lt;a href="https://www.semanticscholar.org" rel="noopener noreferrer"&gt;Semantic Scholar&lt;/a&gt; is an academic search engine and metadata API from the Allen Institute for AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick answer
&lt;/h2&gt;

&lt;p&gt;Pick &lt;strong&gt;Valyu&lt;/strong&gt; when the unit of work is a &lt;em&gt;passage of evidence&lt;/em&gt;: search inside papers at query time, pull a clinical trial protocol and an FDA label alongside the literature, get a cited answer or a full multi-step report without operating your own retrieval stack.&lt;/p&gt;

&lt;p&gt;Pick &lt;strong&gt;Semantic Scholar&lt;/strong&gt; when the unit of work is a &lt;em&gt;record&lt;/em&gt;: find papers by topic, walk a citation graph, rank by influence, pull author profiles, get recommendations. It is free, the corpus is enormous, and nothing else gives you that citation graph as cleanly.&lt;/p&gt;

&lt;p&gt;The short version in code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Valyu returns the text that answers the question, with the citation attached
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;In the phase 3 cohort (n=847), median PFS was...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;citation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;doi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;10.1056/...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;authors&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...],&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fragment&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#:~:text=median%20PFS&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;

&lt;span class="c1"&gt;# Semantic Scholar returns records you then have to go and read
&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;paperId&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;649def34...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;abstract&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;citationCount&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1893&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What can Semantic Scholar index?
&lt;/h2&gt;

&lt;p&gt;The Semantic Scholar Academic Graph covers &lt;strong&gt;214 million papers&lt;/strong&gt;, &lt;strong&gt;2.49 billion citations&lt;/strong&gt;, and &lt;strong&gt;79 million authors&lt;/strong&gt;. Coverage spans every field, assembled from publisher feeds, preprint servers, and web crawling.&lt;/p&gt;

&lt;p&gt;The API is organised as three services:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Service&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Academic Graph&lt;/td&gt;
&lt;td&gt;Paper search, bulk search, title match, autocomplete, snippet search, paper details, batch lookup, citations, references, author search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recommendations&lt;/td&gt;
&lt;td&gt;Papers similar to one paper, or to a positive/negative example set&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Datasets&lt;/td&gt;
&lt;td&gt;Bulk corpus downloads, including S2ORC&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Full text is not a query-time product here. It lives in &lt;strong&gt;S2ORC&lt;/strong&gt;: 8 million-plus full-text papers, alongside 81 million paper nodes and 73 million abstracts, distributed as a bulk download. There is also a snippet search endpoint over open-access papers, which returns short extracts rather than the retrieval-depth passages a RAG pipeline usually wants.&lt;/p&gt;

&lt;p&gt;So: metadata and abstracts at query time, full text as a corpus you host yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  What can Valyu index?
&lt;/h2&gt;

&lt;p&gt;Valyu full-text-indexes roughly 4 million open-access papers, plus licensed journal content:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;th&gt;Full-text coverage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;PubMed&lt;/td&gt;
&lt;td&gt;2.5M+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;arXiv&lt;/td&gt;
&lt;td&gt;1M+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;bioRxiv&lt;/td&gt;
&lt;td&gt;350K+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;medRxiv&lt;/td&gt;
&lt;td&gt;80K+&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ChemRxiv&lt;/td&gt;
&lt;td&gt;8K+&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;PubMed's complete &lt;strong&gt;37 million-record abstract corpus&lt;/strong&gt; is available as an opt-in via &lt;code&gt;include_abstracts&lt;/code&gt;. More on that flag below, because it is the single most commonly misreported detail about this API.&lt;/p&gt;

&lt;p&gt;Beyond the literature, the index covers ClinicalTrials.gov (500K+ trials), FDA drug labels from DailyMed (150K+), SEC filings (3M+), USPTO patents (8M+) and EPO patents (6M+) with full text and figures, plus genomics and chemistry sources. One query can span several of those at once, which is the part that matters if your agent needs to go from a mechanism in a paper to the trial testing it to the label of the approved drug.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 1: Finding papers
&lt;/h2&gt;

&lt;p&gt;Both do discovery. Here is Semantic Scholar, rewritten from the docs example as something you would actually put in an agent rather than an interactive prompt loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;S2_BASE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.semanticscholar.org&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;HEADERS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;X-API-KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;S2_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]}&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;search_papers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;S2_BASE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/graph/v1/paper/search&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;HEADERS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;query&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;limit&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fields&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;title,abstract,year,citationCount,externalIds,url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[])&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;recommendations&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;paper_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;S2_BASE&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/recommendations/v1/papers/forpaper/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;paper_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;HEADERS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fields&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;title,year,citationCount,url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;limit&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;limit&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;recommendedPapers&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;


&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;search_papers&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;chimeric antigen receptor T cell exhaustion&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;citationCount&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;  &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;year&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;  &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;fields&lt;/code&gt; parameter is the thing to learn first. Ask for nothing and you get almost nothing back, and every extra field is a join on their side, so keep the list tight.&lt;/p&gt;

&lt;p&gt;For anything above a few thousand results, use bulk search with its continuation token instead of paging the relevance endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.semanticscholar.org/graph/v1/paper/search/bulk&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;query&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;(cold -temperature) | flu&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fields&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;title,year&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;year&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2023-&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;retrieved&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;papers.jsonl&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;a&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;paper&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]):&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;paper&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nb"&gt;file&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;retrieved&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]))&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;token&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;break&lt;/span&gt;
        &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;token&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;token&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Retrieved &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;retrieved&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; papers&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the query syntax on the bulk endpoint: &lt;code&gt;|&lt;/code&gt; is OR, a leading &lt;code&gt;-&lt;/code&gt; negates, and parentheses group. It is not the same syntax as the relevance search endpoint, which trips people up.&lt;/p&gt;

&lt;p&gt;Valyu does discovery too, over a smaller but full-text index:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Valyu&lt;/span&gt;

&lt;span class="c1"&gt;# Reads VALYU_API_KEY from the environment when no key is passed
&lt;/span&gt;&lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;VALYU_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Phase 3 melanoma immunotherapy trials&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-clinical-trials&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;max_num_results&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;response_length&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;large&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# full methodology and results, not just abstracts
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# content is str | list | dict; structured sources return objects
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There are TypeScript and Rust SDKs if Python is not your stack, and the REST endpoints are there if you would rather not add a dependency at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 2: Getting the actual full text
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Semantic Scholar.&lt;/strong&gt; To search inside papers you download S2ORC, chunk it, embed it, store it, and query your own index. That is a real pipeline: object storage, an embedding job, a vector database, and a refresh strategy when the corpus updates. Perfectly reasonable if you want control over chunking and embeddings, and genuinely the right call for some teams. It is just not a thing you get from an API call.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Valyu.&lt;/strong&gt; Full text is the default return value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mechanisms of acquired resistance to KRAS G12C inhibitors&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;max_num_results&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;response_length&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;large&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;          &lt;span class="c1"&gt;# relevant full-text chunks, not the abstract
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;citation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;doi&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;citation&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fragment&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# fragment deep-links the passage
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;fragment&lt;/code&gt; field is worth calling out separately. It is a text-fragment deep link to the exact cited passage, so a reviewer can click a citation in your agent's output and land on the sentence rather than the paper. If anyone is ever going to audit what your agent claimed, that field is the difference between "reviewable" and "take my word for it".&lt;/p&gt;

&lt;h2&gt;
  
  
  The &lt;code&gt;include_abstracts&lt;/code&gt; Gotcha
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Default:&lt;/strong&gt; PubMed search returns papers &lt;strong&gt;for which full text is available&lt;/strong&gt;, giving you the abstract plus the most relevant chunks of full text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;include_abstracts=true&lt;/code&gt;:&lt;/strong&gt; expands the search to PubMed's complete 37 million-record abstract corpus, where papers without full text return their abstract only.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full-text-first is the default. The complete abstract corpus is the opt-in. If you have read the opposite somewhere, that is the error.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Deep evidence, narrower net (default)
&lt;/span&gt;&lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="c1"&gt;# Wide net, shallower evidence for the papers that lack full text
&lt;/span&gt;&lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;include_abstracts&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the default for evidence synthesis. Flip the flag for coverage sweeps and systematic-review-style screening, where missing a paper is worse than only having its abstract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Round 3: Synthesis
&lt;/h2&gt;

&lt;p&gt;The Semantic Scholar API has no answer-generation endpoint. Ai2 does ship &lt;strong&gt;Ai2 Scholar QA&lt;/strong&gt; separately: an open-source cited-synthesis system over 11 million-plus full-text papers and 100 million-plus abstracts, available as a Docker app, an async API, or a Python package. You bring your own Semantic Scholar, Anthropic, and OpenAI keys, and you host it. It is a good piece of software. It is also infrastructure you now operate.&lt;/p&gt;

&lt;p&gt;Valyu ships synthesis as managed API surface. The Answer API returns a cited answer in one call. DeepResearch runs autonomous multi-step investigation: planning, searching, extraction, fact verification, and report writing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Valyu&lt;/span&gt;

&lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;VALYU_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What is the current evidence that GLP-1 receptor agonists reduce &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;major adverse cardiovascular events in patients without diabetes? &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cover trial design, effect sizes, and where the evidence conflicts.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;standard&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;search_type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;included_sources&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;academic&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;  &lt;span class="c1"&gt;# arXiv, PubMed, bioRxiv/medRxiv, ChemRxiv
&lt;/span&gt;        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;start_date&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2021-01-01&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;research_strategy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Prioritise randomised controlled trials and systematic reviews over &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;observational studies. Separate primary endpoints from secondary and &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;post-hoc analyses. Flag any conflicting or null results explicitly.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;report_format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Structured review with: evidence summary table (trial, n, population, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;endpoint, effect size, CI), narrative synthesis, conflicting findings, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;and evidence gaps.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;output_formats&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;markdown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;completed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;cost:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cost&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; | &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;doi&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="si"&gt;}{&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fragment&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;research_strategy&lt;/code&gt; and &lt;code&gt;report_format&lt;/code&gt; are the two parameters that do the most work. They are where you encode the methodology a domain expert would apply, and they are the difference between a report you can hand to someone and a wall of summarised abstracts.&lt;/p&gt;

&lt;p&gt;Point it at a single dataset when you know exactly where the evidence lives, and ask for a spreadsheet instead of prose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Summarise reported mechanisms of acquired resistance to KRAS G12C &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;inhibitors in non-small-cell lung cancer, with supporting evidence &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;for each mechanism.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;fast&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;search_type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;included_sources&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;start_date&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2022-01-01&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xlsx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;           &lt;span class="c1"&gt;# mechanism-by-evidence table
&lt;/span&gt;    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;code_execution&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;  &lt;span class="c1"&gt;# required for xlsx/pptx/docx
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DeepResearch also supports webhooks and human-in-the-loop checkpoints, which is what you want when a run takes minutes rather than milliseconds and you do not want to hold a request open.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rate limits and cost, the part that bites in production
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Valyu&lt;/strong&gt; is usage-based, priced per thousand results by source type, with &lt;code&gt;max_price&lt;/code&gt; as a per-query spend cap. Sources priced above the cap are excluded and the response returns a &lt;code&gt;206&lt;/code&gt; partial-success warning rather than a surprise on the invoice. Free credits are available to start, $10 without a card and $20 with a work email.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Semantic Scholar&lt;/strong&gt; is free, which is good. The limits are the catch, and they are widely misread:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Unauthenticated:&lt;/strong&gt; 1,000 requests per second &lt;strong&gt;shared collectively across every unauthenticated user on the planet&lt;/strong&gt;, with additional throttling under heavy use. That number looks generous and is not yours.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;With an API key:&lt;/strong&gt; a dedicated &lt;strong&gt;1 request per second&lt;/strong&gt; across all endpoints. Higher rates are available following review.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One request per second is a hard ceiling on any fan-out design. Batch endpoints and bulk search exist precisely because of it, and you should build around them from day one rather than discovering the limit in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Feature comparison
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Semantic Scholar&lt;/th&gt;
&lt;th&gt;Valyu&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Base URL&lt;/td&gt;
&lt;td&gt;&lt;code&gt;api.semanticscholar.org&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;api.valyu.ai&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auth&lt;/td&gt;
&lt;td&gt;Optional key; key gives dedicated quota&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;x-api-key&lt;/code&gt;, required&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Corpus size&lt;/td&gt;
&lt;td&gt;214M papers, 2.49B citations, 79M authors&lt;/td&gt;
&lt;td&gt;~4M full-text papers, 37M PubMed abstracts opt-in, plus non-academic sources&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full text at query time&lt;/td&gt;
&lt;td&gt;No (S2ORC bulk download, plus a snippet endpoint)&lt;/td&gt;
&lt;td&gt;Yes, default for PubMed and arXiv&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Citation graph traversal&lt;/td&gt;
&lt;td&gt;Yes, first class&lt;/td&gt;
&lt;td&gt;No dedicated graph endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Author profiles&lt;/td&gt;
&lt;td&gt;Yes, &lt;code&gt;/author&lt;/code&gt; endpoints&lt;/td&gt;
&lt;td&gt;No dedicated author endpoint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recommendations&lt;/td&gt;
&lt;td&gt;Yes, dedicated service&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cited answer generation&lt;/td&gt;
&lt;td&gt;Not in the API (Ai2 Scholar QA is separate and self-hosted)&lt;/td&gt;
&lt;td&gt;Answer API&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-step research agent&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;DeepResearch, plus templated Workflows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deliverables&lt;/td&gt;
&lt;td&gt;JSON&lt;/td&gt;
&lt;td&gt;JSON, markdown, PDF, xlsx, docx, pptx, csv&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Provenance&lt;/td&gt;
&lt;td&gt;IDs, DOIs, citation counts&lt;/td&gt;
&lt;td&gt;Title, URL, DOI, venue, authors, plus passage-level &lt;code&gt;fragment&lt;/code&gt; links&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Rate limit&lt;/td&gt;
&lt;td&gt;1 req/s with a key; 1,000 req/s shared unauthenticated&lt;/td&gt;
&lt;td&gt;Usage-based, &lt;code&gt;max_price&lt;/code&gt; per-query cap&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Which workflows fit each
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Semantic Scholar&lt;/strong&gt; fits work where the graph is the point:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bibliometrics and influence ranking&lt;/li&gt;
&lt;li&gt;Forward and backward citation chasing&lt;/li&gt;
&lt;li&gt;Building a candidate set for a systematic review&lt;/li&gt;
&lt;li&gt;Author disambiguation and profile lookups&lt;/li&gt;
&lt;li&gt;Recommendation and "more like this" features&lt;/li&gt;
&lt;li&gt;Any offline corpus work where a bulk download beats an API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Valyu&lt;/strong&gt; fits work where the evidence is the point:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Humans and Agents that need to quote and cite, not just link&lt;/li&gt;
&lt;li&gt;Cross-domain runs spanning literature, trials, labels, and filings&lt;/li&gt;
&lt;li&gt;RAG without owning a RAG stack&lt;/li&gt;
&lt;li&gt;Recurring literature reviews and competitive or regulatory monitoring&lt;/li&gt;
&lt;li&gt;Any output a human will audit, thanks to passage-level provenance&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What the same query returns from each
&lt;/h2&gt;

&lt;p&gt;Identical input, different object types, which is the clearest way to see the design split.&lt;/p&gt;

&lt;p&gt;A topic search for "melanoma immunotherapy" on Semantic Scholar returns paper records: titles, abstracts, citation counts, author links, external IDs. The same query on Valyu returns full-text passages with citations attached to each one.&lt;/p&gt;

&lt;p&gt;Ask "which papers cite this one" and Semantic Scholar answers directly through &lt;code&gt;/paper/{id}/citations&lt;/code&gt;. Valyu has no equivalent, because it is not a graph.&lt;/p&gt;

&lt;p&gt;Ask "what does the evidence say about X" and Valyu answers with passages, or with a cited answer if you call the Answer API. Semantic Scholar returns candidate records for you to go and read.&lt;/p&gt;

&lt;p&gt;This is a difference in design goal, not in quality. One is built for graph discovery. The other is built for evidence retrieval.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrations
&lt;/h2&gt;

&lt;p&gt;Semantic Scholar is a REST API returning JSON, with community client libraries in most languages. That is the whole integration story, and for many teams it is enough.&lt;/p&gt;

&lt;p&gt;Valyu ships a &lt;a href="https://github.com/valyuAI/valyu-mcp" rel="noopener noreferrer"&gt;hosted MCP server&lt;/a&gt;, a CLI, a Claude Code plugin, agent skills, and framework integrations for the Vercel AI SDK, LangChain, LlamaIndex, AWS Bedrock AgentCore, and n8n, plus tool definitions for Anthropic, OpenAI, and Google. If you are wiring retrieval into an existing agent framework, that is usually a config change rather than a client to write.&lt;/p&gt;

&lt;p&gt;For a sense of scale in production: RevisionDojo uses Valyu to deliver academic research to more than 450,000 students, integrating the JavaScript SDK and the Valyu AI SDK across search, citation discovery, and structured literature reviews for IB Extended Essays.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does Semantic Scholar give me full text?
&lt;/h3&gt;

&lt;p&gt;Not at query time. Full text ships as the S2ORC bulk dataset, 8 million-plus full-text papers alongside 81 million paper nodes and 73 million abstracts, which you download and index yourself. There is also a snippet search endpoint over open-access papers that returns short extracts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Semantic Scholar offer answer generation?
&lt;/h3&gt;

&lt;p&gt;Not in the API. Ai2 separately ships Ai2 Scholar QA, an open-source cited-synthesis system over 11 million-plus full-text papers and 100 million-plus abstracts, available as a Docker app, async API, or Python package. It requires your own Semantic Scholar, Anthropic, and OpenAI keys, and you host it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Valyu return abstracts for every PubMed record by default?
&lt;/h3&gt;

&lt;p&gt;No, and this is commonly stated backwards. PubMed search defaults to papers with full text available, returning the abstract plus relevant full-text chunks. Set &lt;code&gt;include_abstracts=true&lt;/code&gt; to expand to the complete 37 million-record abstract corpus, where papers without full text return their abstract.&lt;/p&gt;

&lt;h3&gt;
  
  
  How many academic papers does Valyu index?
&lt;/h3&gt;

&lt;p&gt;Roughly 4 million full-text open-access papers: PubMed 2.5M, arXiv 1M, bioRxiv 350K, medRxiv 80K, ChemRxiv 8K, plus licensed journal content. PubMed's complete 37 million-record abstract corpus is available via &lt;code&gt;include_abstracts&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the difference between Search, Answer, DeepResearch, and Workflows?
&lt;/h3&gt;

&lt;p&gt;Search returns structured results. Contents extracts clean content from URLs. Answer adds cited answer generation on top of search. DeepResearch runs autonomous multi-step investigation with file deliverables. Workflows are templated, versioned DeepResearch runs for repeatable work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does Valyu cover clinical trials outside the United States?
&lt;/h3&gt;

&lt;p&gt;Coverage currently centres on US trials and FDA-approved drugs, with 24 to 48 hour update delays on trial data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use both in the same pipeline?
&lt;/h3&gt;

&lt;p&gt;Yes, and it is usually the right answer. Semantic Scholar identifies which works matter through the citation graph, and Valyu retrieves the full-text passages that support specific claims. See the code above.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do preprints count as peer-reviewed papers?
&lt;/h3&gt;

&lt;p&gt;No. Preprints from arXiv, bioRxiv, medRxiv, and ChemRxiv are not peer-reviewed, and both services index them alongside peer-reviewed articles. Filter on source or publication type when evidence quality matters.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>research</category>
      <category>python</category>
    </item>
    <item>
      <title>Investment Research APIs in 2026: 7 DeepResearch Workflows for Deal Teams</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Wed, 26 Aug 2026 17:25:27 +0000</pubDate>
      <link>https://dev.to/valyuai/investment-research-apis-in-2026-7-deepresearch-workflows-for-deal-teams-akp</link>
      <guid>https://dev.to/valyuai/investment-research-apis-in-2026-7-deepresearch-workflows-for-deal-teams-akp</guid>
      <description>&lt;p&gt;An investment research API gives you the same access to financial information that an analyst gets from a terminal, a filings database, and a browser, except it returns structured, cited output that another program can consume. Many stop at retrieval: you ask for a ticker's fundamentals, you get fundamentals. The harder problem is the work that happens after retrieval, when someone has to read forty sources, reconcile them, and produce a document a director or CIO will put in front of a client or use to make a multi-million pound decision.&lt;/p&gt;

&lt;p&gt;The second half is what deep research APIs automate. This article covers seven workflows that run in production today on the &lt;a href="https://platform.valyu.ai" rel="noopener noreferrer"&gt;Valyu Search and DeepResearch APIs&lt;/a&gt;. All of them are built for investment research and banking deal teams, all invocable with a single call and a company name, with every result traced back to the primary source.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR: the seven workflows
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Workflow&lt;/th&gt;
&lt;th&gt;&lt;code&gt;workflow_id&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;What it answers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Company Profile&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ib-company-profile&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What does this company do, how does it make money, what happened recently?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Comparable Companies&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ib-comps-analysis&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Who are the real peers, what are they trading at, why does each belong?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Precedent Transactions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ib-precedent-transactions&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What has been paid for assets like this, and under what circumstances?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;DCF Valuation Reference&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ib-dcf-reference&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What assumptions should a DCF use, and what does the market imply?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;LBO Screening Analysis&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ib-lbo-screen&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Could a sponsor buy this, and would the returns work?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Buyer &amp;amp; Investor List&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ib-buyer-list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Who would buy this, and why would each one care?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;Strategic Alternatives Review&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ib-strategic-alternatives&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What paths are available, and what does each one cost?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What is an investment research API?
&lt;/h2&gt;

&lt;p&gt;Teams use investment research APIs to build equity research tools, power AI agents, run screening pipelines, and replace manual data collection.&lt;/p&gt;

&lt;p&gt;They fall into three categories, and the distinction matters more than any vendor comparison:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;market data API&lt;/strong&gt; answers "what is NVDA's EV/EBITDA."&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;web data API&lt;/strong&gt; answers "what does this specific 10-K say."&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;research API&lt;/strong&gt; answers "build me a defensible peer set for NVDA and explain why each comp belongs in it," a question with no single endpoint behind it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many production stacks use all three.&lt;/p&gt;

&lt;p&gt;The gap between those question types is measurable. Across 4.2 million queries logged through the Valyu DeepResearch API, a single user-facing research question expands, on average, into 11 to 19 sub-queries. An investment thesis request expands into 14 to 22. A market data API serves one of those sub-queries in milliseconds. A research API is the thing that decides which nineteen to ask, runs them, and reconciles the answers.&lt;/p&gt;

&lt;p&gt;The seven workflows below sit in the third layer and assume you already have the first two.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 7 investment research workflows (DeepResearch)
&lt;/h2&gt;

&lt;p&gt;These are ordered the way a deal team actually builds a pitch. Profile first, valuation next, then the strategic layer on top.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Company Profile
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The question it answers:&lt;/strong&gt; What does this company actually do, how does it make money, and what has happened to it recently?&lt;/p&gt;

&lt;p&gt;Every deal document starts here, which makes it one of the most repeated tasks on any deal team. Someone needs a clean business overview, segment breakdown, revenue composition, management summary, and recent developments assembled from filings, transcripts, and news, with sources attached.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;workflow_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-company-profile&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;NVIDIA (NVDA)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;output_formats&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;markdown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pdf&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;docx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What comes back:&lt;/strong&gt; A structured pitch book profile covering business description, segment and geographic revenue split, financial summary, competitive positioning, and a recent-developments timeline. Every claim cites its source.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt; Pitch prep, first-call decks, target screening, onboarding a new coverage name. It is the entry point most teams run first, and the input to most of the others.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Comparable Companies
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The question it answers:&lt;/strong&gt; Who are the real peers, what are they trading at, and why does each one belong in the set?&lt;/p&gt;

&lt;p&gt;Comps are where analyst judgment and grunt work collide. Pulling multiples is trivial. Defending the peer set is not, and that is the part that gets challenged in a client meeting.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;workflow_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-comps-analysis&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Datadog (DDOG)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xlsx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;code_execution&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enabled&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;max_calls&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;}},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enabling &lt;code&gt;code_execution&lt;/code&gt; matters here. The agent computes the multiples and statistics rather than reproducing numbers it read somewhere, which removes a whole class of transcription error.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What comes back:&lt;/strong&gt; A peer set with trading multiples (EV/Revenue, EV/EBITDA, P/E), the selection rationale for each name, and summary statistics across the set. The &lt;code&gt;xlsx&lt;/code&gt; deliverable drops straight into a model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt; Valuation sections, fairness work, any time you need a peer set you can defend line by line.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Precedent Transactions
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The question it answers:&lt;/strong&gt; What has been paid for assets like this, and what were the circumstances?&lt;/p&gt;

&lt;p&gt;Precedent transaction analysis is unusually painful to automate with conventional tools, because deal terms are scattered across press releases, merger proxies, and trade press. Multiples paid are frequently not stated and have to be derived.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;workflow_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-precedent-transactions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sector&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enterprise search and observability software&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;start_date&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2019-01-01&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xlsx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The input here is a sub-sector, not a ticker: "Vertical SaaS for healthcare", "Defense electronics", "Specialty insurance brokers". Narrow enough to define a deal set, broad enough that a deal set exists.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;search.start_date&lt;/code&gt; parameter is doing real work. Precedents from a different rate environment are actively misleading, and constraining the window is usually the right call. Read it as a bound on which documents get retrieved rather than on which deal dates reach the output: a 2019 floor will still surface a 2015 transaction if a recent source discusses it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What comes back:&lt;/strong&gt; A transaction table with acquirer, target, date, deal value, multiples paid, and the strategic context of each deal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt; Sell-side positioning, board valuation discussions, establishing a defensible premium range.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. DCF Valuation Reference
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The question it answers:&lt;/strong&gt; What assumptions should a DCF on this company actually use, and what does the market imply?&lt;/p&gt;

&lt;p&gt;This workflow does not replace your model. It builds the reference layer underneath it, the assumption set you would otherwise spend a day sourcing and defending.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;workflow_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-dcf-reference&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Airbnb (ABNB)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;code_execution&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;charts&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xlsx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What comes back:&lt;/strong&gt; Revenue growth and margin assumptions with sourcing, a WACC build with component inputs, terminal value approaches, and sensitivity ranges. Charts if you enable them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt; Before you build the model, and again when someone challenges an assumption and you need the provenance.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. LBO Screening Analysis
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The question it answers:&lt;/strong&gt; Could a sponsor actually buy this, and would the returns work?&lt;/p&gt;

&lt;p&gt;A fast structural read on whether a target is financeable. Debt capacity against cash flow, likely structure, sponsor fit, and whether the returns clear a hurdle without heroic assumptions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;workflow_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-lbo-screen&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Ziff Davis (ZD)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;tools&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;code_execution&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enabled&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;max_calls&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;}},&lt;/span&gt;
    &lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xlsx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What comes back:&lt;/strong&gt; Debt capacity analysis, indicative capital structure, cash flow coverage, sponsor fit assessment, and a returns feasibility view.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt; Sponsor coverage, take-private screening, deciding whether a name is worth full diligence.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Buyer &amp;amp; Investor List
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The question it answers:&lt;/strong&gt; Who would buy this, and what is the specific reason each one would care?&lt;/p&gt;

&lt;p&gt;Buyer lists are where generic AI output fails most visibly. "Large technology companies" is not a buyer list. A useful one names specific acquirers and articulates the strategic logic per name: adjacency, gap being filled, precedent for similar deals, and capacity to pay.&lt;/p&gt;

&lt;p&gt;Its target is free text rather than a ticker, which matches how a sell-side mandate usually arrives. The client is private, so you describe the asset (profitability, scale, category) and the buyer universe follows from that profile rather than from a name.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;workflow_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-buyer-list&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;target&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A profitable $200M ARR HR-tech SaaS&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xlsx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pptx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What comes back:&lt;/strong&gt; Segmented strategic and financial buyer universe with per-buyer rationale, acquisition history, and capacity assessment. The &lt;code&gt;pptx&lt;/code&gt; deliverable is built for the sell-side kickoff deck.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt; Sell-side mandates, pitch materials, board discussions about who the natural acquirers are.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Strategic Alternatives Review
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The question it answers:&lt;/strong&gt; What are all the paths available to this company, and what does each one cost?&lt;/p&gt;

&lt;p&gt;The only heavy mode workflow in the set, running close to 40 minutes at $2.60 against $0.50 for a standard run. The extra depth goes into evaluating sale, IPO, recapitalisation, and standalone paths, then comparing them against each other rather than assessing any one in isolation.&lt;/p&gt;

&lt;p&gt;Mode is defined by the workflow itself, so you do not pass it. &lt;code&gt;ib-strategic-alternatives&lt;/code&gt; runs heavy by default.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;workflow_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-strategic-alternatives&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Peloton (PTON)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;previous_reports&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;profile_task_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;comps_task_id&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;docx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pptx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The parameter worth noting is &lt;code&gt;previous_reports&lt;/code&gt;. It chains earlier workflow output into this one, so the strategic review reasons from the profile and comps you already ran instead of rediscovering them. It accepts up to three prior task IDs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What comes back:&lt;/strong&gt; Each alternative assessed with valuation implications, execution risk, timing, and stakeholder considerations, plus a comparative recommendation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to use it:&lt;/strong&gt; Board advisory, activist defence, any mandate that begins with "what are our options."&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking a run before you pay for it
&lt;/h2&gt;

&lt;p&gt;This is the workflow where it pays to look before you spend. At close to forty minutes it is the longest run in the set, and the failure mode you care about is not a bad answer. It is a good answer to a question you did not ask.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;workflows.preview()&lt;/code&gt; resolves a workflow against your parameters and returns exactly what would run, without starting a task and without spending anything.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;preview&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;workflows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-strategic-alternatives&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Peloton (PTON)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;              &lt;span class="c1"&gt;# "heavy" - budget accordingly
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;             &lt;span class="c1"&gt;# the fully substituted prompt
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;research_strategy&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# sources and methodology
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;report_format&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;     &lt;span class="c1"&gt;# structure of the output
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="c1"&gt;# files that will be produced
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;resolved&lt;/code&gt; is a &lt;code&gt;ResolvedWorkflowTemplate&lt;/code&gt; with six fields: &lt;code&gt;input&lt;/code&gt;, &lt;code&gt;research_strategy&lt;/code&gt;, &lt;code&gt;report_format&lt;/code&gt;, &lt;code&gt;deliverables&lt;/code&gt;, &lt;code&gt;mode&lt;/code&gt;, and &lt;code&gt;tools&lt;/code&gt;. For the strategic alternatives review that surfaces &lt;code&gt;mode: "heavy"&lt;/code&gt; and a docx plus xlsx pair, which is what determines the cost in time and money.&lt;/p&gt;

&lt;p&gt;Preview also validates. Pass a parameter the workflow does not define and it fails immediately, rather than at task creation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;workflows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-buyer-list&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Confluent (CFLT)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="c1"&gt;# success: False | error: 2 validation errors    &amp;lt;- key is "target", not "company"
&lt;/span&gt;
&lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;workflows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-buyer-list&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;target&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Confluent (CFLT)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="c1"&gt;# success: True
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because preview costs nothing and returns instantly, it is the one control that composes with a parallel batch, which is where the next section picks it up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Production patterns
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Constrain sources deliberately.&lt;/strong&gt; &lt;code&gt;search.search_type&lt;/code&gt; accepts &lt;code&gt;all&lt;/code&gt;, &lt;code&gt;web&lt;/code&gt;, or &lt;code&gt;proprietary&lt;/code&gt;. For workflows that must not cite blog speculation, restrict to &lt;code&gt;proprietary&lt;/code&gt;. &lt;code&gt;source_biases&lt;/code&gt; lets you weight sources from -5 to +5 rather than excluding them outright, which is usually the better instrument.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pin versions in production, float in staging.&lt;/strong&gt; Workflows are in beta and templates improve. Pin &lt;code&gt;workflow_version&lt;/code&gt; anywhere a parser depends on the shape of the output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preview before you spend.&lt;/strong&gt; &lt;code&gt;workflows.preview()&lt;/code&gt; is free, instant, and catches a malformed parameter set before it becomes a billed run. Make it the default pre-flight in any pipeline. It is the cheapest control you have over a process that otherwise runs for half an hour before telling you anything.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Inspect the template, do not guess at it.&lt;/strong&gt; &lt;code&gt;workflows.get(slug)&lt;/code&gt; returns the typed variables, so you can check the parameter name and whether it is required before wiring anything up. &lt;code&gt;preview()&lt;/code&gt; goes further and shows the resolved mode, which is what tells you whether to budget twelve minutes or forty.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;detail&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;workflows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-strategic-alternatives&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;variable&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;detail&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;workflow&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;variables&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;required&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;check&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;workflows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-strategic-alternatives&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Peloton (PTON)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;# heavy - budget accordingly
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resolved&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Track long runs by status, not by blocking.&lt;/strong&gt; &lt;code&gt;deepresearch.status(task_id)&lt;/code&gt; returns a &lt;code&gt;DeepResearchStatus&lt;/code&gt;: &lt;code&gt;queued&lt;/code&gt;, &lt;code&gt;running&lt;/code&gt;, &lt;code&gt;completed&lt;/code&gt;, &lt;code&gt;failed&lt;/code&gt;, and &lt;code&gt;cancelled&lt;/code&gt;, plus &lt;code&gt;paused&lt;/code&gt; and &lt;code&gt;awaiting_input&lt;/code&gt; if you have enabled a checkpoint, alongside the cost and the generated deliverables. Tag each task with &lt;code&gt;metadata&lt;/code&gt; at creation and you can reconcile a whole batch afterwards without holding six threads open.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structured output for pipelines.&lt;/strong&gt; Pass a JSON Schema object in &lt;code&gt;output_formats&lt;/code&gt; when the consumer is a database or dashboard rather than a person. Use &lt;code&gt;deliverables&lt;/code&gt; when the consumer is a banker who wants an XLSX.&lt;/p&gt;

&lt;h2&gt;
  
  
  Chaining them: the full pitch-book pass
&lt;/h2&gt;

&lt;p&gt;The workflows are individually useful and considerably more useful composed. A complete first-pass pitch book on a single target:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;concurrent.futures&lt;/span&gt;

&lt;span class="n"&gt;COMPANY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Snowflake (SNOW)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="c1"&gt;# Each workflow declares its own variable key - comps and buyer list take
# "target", precedent transactions takes "sector".
&lt;/span&gt;&lt;span class="n"&gt;FOUNDATION&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-company-profile&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;COMPANY&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-comps-analysis&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;         &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;target&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="n"&gt;COMPANY&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-precedent-transactions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sector&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cloud data warehousing and analytics&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-dcf-reference&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;COMPANY&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-lbo-screen&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;             &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;COMPANY&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-buyer-list&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;             &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;target&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="n"&gt;COMPANY&lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;
    &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;workflow_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;workflow_version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xlsx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="n"&gt;metadata&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;deal&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;project-frost&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;slug&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Free pre-flight: validate every parameter set before anything is billed
&lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;FOUNDATION&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;check&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;workflows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;slug&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;success&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;slug&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;check&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;failed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;concurrent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;futures&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ThreadPoolExecutor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_workers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;pending&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;submit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;FOUNDATION&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;future&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;concurrent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;futures&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;as_completed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pending&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;future&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;result&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;exc&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="c1"&gt;# keep the five that worked
&lt;/span&gt;            &lt;span class="n"&gt;failed&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;pending&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;future&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;exc&lt;/span&gt;

&lt;span class="c1"&gt;# Strategic review reasons over everything above
&lt;/span&gt;&lt;span class="n"&gt;strategic&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;workflow_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ib-strategic-alternatives&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;workflow_params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;company&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;COMPANY&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;previous_reports&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch_id&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;][:&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;deliverables&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;docx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pptx&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a recent full pass against Snowflake, the six parallel standard runs completed in 26 minutes, the fastest at 12, the slowest two at 25 and 26, since the batch only finishes when its slowest member does. The heavy strategic review added a further 39. Total wall clock was a little over an hour, total cost $5.80, and the output was seven cited documents in formats a deal team already works in.&lt;/p&gt;

&lt;p&gt;Budget by the slowest workflow rather than the average. If you need a faster first look, run the foundation six and start reading those while the strategic review finishes. Nothing downstream blocks on it except the review itself.&lt;/p&gt;

&lt;p&gt;Note &lt;code&gt;workflow_version=1&lt;/code&gt; pinned explicitly, and &lt;code&gt;metadata&lt;/code&gt; tagging every task with a deal code. Both are small habits that pay for themselves the first time you need to audit what produced a number.&lt;/p&gt;

&lt;p&gt;Collect results with &lt;code&gt;as_completed&lt;/code&gt; rather than &lt;code&gt;pool.map&lt;/code&gt;. &lt;code&gt;map&lt;/code&gt; re-raises the first exception when you iterate it, so a single failed run discards the five that succeeded, after you have already paid for them and waited 26 minutes. Gathering failures into a dict instead lets you retry the one that broke.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes for deal teams
&lt;/h2&gt;

&lt;p&gt;The honest framing is not that these workflows replace analysts. They collapse the retrieval and first-draft phase of work that currently occupies the first days of every mandate.&lt;/p&gt;

&lt;p&gt;We have the numbers on what that phase costs. Looking at six months of financial query traffic across 4.2 million API queries, a single investment thesis run resolves in about 75 minutes of agent time at roughly $50, against 14 to 18 analyst hours for the equivalent output, work a junior analyst would take three to five days to produce.&lt;/p&gt;

&lt;p&gt;The seven workflows in this article are the productised version of that same pattern, scoped tighter. The same dataset shows where this is already concentrated. Traditional research (investment theses, filings, and transcripts) accounts for 57% of query volume, and 74% of sell-side queries fall into that bucket. These are not speculative use cases. They are the majority of what financial research traffic already looks like.&lt;/p&gt;

&lt;p&gt;The analyst's job moves to where it should have been: challenging the peer set, pressure-testing assumptions, and forming the view. The workflows handle the part that was never judgment in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the three types of investment research API?
&lt;/h3&gt;

&lt;p&gt;Market data APIs return structured numeric series. Web data APIs return raw page content. Research APIs return synthesised, cited analysis built from many sources. Most production stacks use all three, because each answers a question the other two cannot.&lt;/p&gt;

&lt;h3&gt;
  
  
  How is a deep research API different from a market data API?
&lt;/h3&gt;

&lt;p&gt;A market data API answers questions with a schema behind them, like a ticker's EV/EBITDA, in milliseconds. A deep research API answers questions with no single endpoint behind them, like building a defensible peer set with rationale, by running multi-step research across many sources over several minutes.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the 7 investment banking workflows in Valyu?
&lt;/h3&gt;

&lt;p&gt;Company Profile, Comparable Companies, Precedent Transactions, DCF Valuation Reference, LBO Screening Analysis, Buyer &amp;amp; Investor List, and Strategic Alternatives Review.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I create my own workflows?
&lt;/h3&gt;

&lt;p&gt;Yes. Custom workflows are defined with a slug, title, and version containing a prompt, research strategy, report format, and typed variables with key, label, and required fields. They appear in &lt;code&gt;workflows.list()&lt;/code&gt; alongside the Valyu-published catalogue.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I discover available workflows programmatically?
&lt;/h3&gt;

&lt;p&gt;Call &lt;code&gt;valyu.workflows.list(scope="valyu", vertical="investment-banking")&lt;/code&gt;. The scope filter selects between Valyu-published and your organisation's own workflows; vertical filters by industry category.&lt;/p&gt;

&lt;h3&gt;
  
  
  What output formats are supported?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;output_formats&lt;/code&gt; accepts markdown, pdf, or a JSON Schema object for structured output. &lt;code&gt;deliverables&lt;/code&gt; generates files in csv, xlsx, pptx, docx, or pdf. Structured output suits pipelines; deliverables suit humans.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are the outputs cited?
&lt;/h3&gt;

&lt;p&gt;Yes. Every claim carries citations to source documents, which is what makes the output usable in regulated and client-facing contexts rather than only for internal exploration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can workflows build on each other?
&lt;/h3&gt;

&lt;p&gt;Yes. &lt;code&gt;previous_reports&lt;/code&gt; accepts up to three prior task IDs, so a downstream workflow reasons from earlier output rather than rediscovering it. Chaining the profile and comps into the strategic alternatives review is the common pattern.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I keep output stable as workflows improve?
&lt;/h3&gt;

&lt;p&gt;Pin &lt;code&gt;workflow_version&lt;/code&gt; in production. Version 1 continues returning the same structure after the template is revised, so downstream parsers do not break when a prompt improves.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>finance</category>
      <category>python</category>
    </item>
    <item>
      <title>Literature-in-the-Loop: Citation-Grounded Triage for AI Protein Design</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Wed, 26 Aug 2026 11:31:00 +0000</pubDate>
      <link>https://dev.to/valyuai/literature-in-the-loop-citation-grounded-triage-for-ai-protein-design-3m8i</link>
      <guid>https://dev.to/valyuai/literature-in-the-loop-citation-grounded-triage-for-ai-protein-design-3m8i</guid>
      <description>&lt;p&gt;&lt;strong&gt;Quick answer:&lt;/strong&gt; Lab-in-the-loop protein and antibody design generates tens of thousands of candidates per cycle but tests a few hundred. What lab-in-the-loop needs is &lt;em&gt;literature-in-the-loop&lt;/em&gt;: a citation-grounded evidence-ranking step between generation and assay selection that retrieves published structures, affinities, homologous sequences, and negative results to rerank candidates, while reserving explicit capacity for novel designs.&lt;/p&gt;




&lt;h2&gt;
  
  
  The gap between what gets generated and what gets tested
&lt;/h2&gt;

&lt;p&gt;The scale of the mismatch is documented. In Genentech/Prescient Design's &lt;a href="https://www.biorxiv.org/content/10.1101/2025.02.19.639050v2" rel="noopener noreferrer"&gt;lab-in-the-loop antibody design system&lt;/a&gt;, the generative methods "may produce up to 30,000 designs per lead molecule" in a single round. Across four rounds, four clinically relevant targets (EGFR, IL-6, HER2, and OSM), and ten lead molecules, &lt;strong&gt;more than 1,800 unique antibody variants were actually designed, synthesised, and tested&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Averaged out, that is roughly 45 variants assayed per lead molecule per round against a generation ceiling of 30,000. That gap is closer to three orders of magnitude than two. Every candidate that occupies an assay slot displaces another. Which means the ranking function that fills the queue is one of the highest-leverage components in the entire pipeline, and it is usually built from model-internal signals alone.&lt;/p&gt;

&lt;p&gt;Published lab-in-the-loop systems do not describe a literature-based evidence-ranking step between generation and assay selection. Candidates are ranked on model confidence, predicted structure quality, and predicted binding. These three signals answer fundamentally different questions. When they are treated as interchangeable, candidates with strong prior literature support can be deprioritised relative to novel designs that happen to score well under a model's internal metric.&lt;/p&gt;

&lt;p&gt;Lab-in-the-loop needs literature-in-the-loop: a triage layer that retrieves published structural, sequence, and affinity data to rerank candidates before wet-lab slots are allocated. Not as a veto gate that eliminates novel binders, but as a layer that enriches the assay queue with evidence-supported candidates while reserving explicit capacity for genuinely novel architectures.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why ranking breaks when signals are treated as interchangeable
&lt;/h2&gt;

&lt;p&gt;The standard design-to-assay loop works like this: a generative model proposes a batch of sequences, each annotated with predicted properties, and a ranking system selects which candidates to synthesise and test.&lt;/p&gt;

&lt;p&gt;The Prescient/Genentech system annotates generated designs with predicted expression, binding affinity, and non-specificity. Worth being precise about how those labels are constructed, because it is the crux of the problem. From the paper:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;All properties have associated binary labels (e.g., 1:1 binding to target antigen is or is not detected by SPR at a fixed concentration) modeled by binary classifiers, and expression yield and binding affinity are modeled as scalars.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So binding ground truth is a &lt;strong&gt;binary readout from SPR at a single fixed concentration&lt;/strong&gt;, alongside scalar regressors for yield and affinity. That is a perfectly reasonable experimental design. The problem arises downstream, when teams treat these heterogeneous predictions as interchangeable proxies for "this candidate will work."&lt;/p&gt;

&lt;h3&gt;
  
  
  pLDDT measures structural self-consistency, not binding
&lt;/h3&gt;

&lt;p&gt;pLDDT (predicted Local Distance Difference Test) is AlphaFold2's per-residue confidence score, ranging from 0 to 100, estimating agreement between predicted Cα positions and the unknown true structure. Scores above 90 indicate accuracy comparable to experimentally determined structures; 70 to 90 is generally sufficient for backbone prediction; below 70 requires careful interpretation. AlphaFold's own guidance is that long regions below 50 "should not be interpreted" as structure at all, but read as a prediction of disorder.&lt;/p&gt;

&lt;p&gt;A model can place every residue with high pLDDT and still produce a loop conformation at the paratope, or an interface geometry, that is incompatible with binding. High pLDDT means the model agrees with itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Predicted binding is a weak classifier, and there is a number for it
&lt;/h3&gt;

&lt;p&gt;Predicted binding, whether from docking, interface energy calculations, or specialised classifiers, attempts to estimate the likelihood or strength of an interaction. This is a separate question from structural confidence, and current metrics are not good at it.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.biorxiv.org/content/10.1101/2025.04.17.648362v2" rel="noopener noreferrer"&gt;Adaptyv EGFR binder design competition analysis&lt;/a&gt; (Cotet et al., 2025) evaluated structure-prediction confidence scores against experimental outcomes across the competition's characterised designs. &lt;strong&gt;ipTM (interface predicted TM-score) achieved an AUROC of 0.64 for binding classification.&lt;/strong&gt; The authors concluded these metrics were "insufficiently predictive of true experimental binding probability or affinity."&lt;/p&gt;

&lt;p&gt;An AUROC of 0.64 sits modestly above the random baseline of 0.5. It carries real signal. It is not a defensible sole selection criterion for a resource as expensive as an assay slot.&lt;/p&gt;

&lt;h3&gt;
  
  
  Model confidence measures the model, not reality
&lt;/h3&gt;

&lt;p&gt;Log-likelihood, pLDDT of the designed structure, or a classifier output on a held-out validation set measures the model's internal consistency and its agreement with its training distribution, not its agreement with physical reality.&lt;/p&gt;

&lt;p&gt;Treating these three as interchangeable creates two failure modes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;High-confidence-but-physically-wrong candidates consume assay slots.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Candidates with lower model confidence but strong prior literature support get deprioritised&lt;/strong&gt; in favour of novel designs that score well on a model-internal metric.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The second failure mode is the expensive one, because it is invisible. Nobody logs the binder you never tested.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where literature-in-the-loop triage sits
&lt;/h2&gt;

&lt;p&gt;The triage step belongs &lt;strong&gt;between candidate generation and assay queue assembly&lt;/strong&gt;: after the generative model has produced a batch, before wet-lab slots are allocated.&lt;/p&gt;

&lt;p&gt;It is not a replacement for the model's own ranking. It is a re-ranking layer that supplements model outputs with external evidence the model did not see at training time or could not fully encode.&lt;/p&gt;

&lt;p&gt;For each candidate, the triage step should produce an &lt;strong&gt;evidence packet&lt;/strong&gt; containing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Target biology context:&lt;/strong&gt; published mechanism, expression pattern, and known functional domains of the target antigen, with source citations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Epitope and accessibility evidence:&lt;/strong&gt; known linear or conformational epitopes, structural surface accessibility from experimental or predicted structures, and published epitope mapping data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Homologous sequence evidence:&lt;/strong&gt; closest known antibody or protein sequences by CDR similarity, framework identity, or full-chain alignment, with sequence identity percentages and source references.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Known structures:&lt;/strong&gt; PDB entries for the target, for antibodies against the same target, and for the candidate's predicted fold, with resolution and method noted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measured affinities:&lt;/strong&gt; published KD, IC50, Ki, or EC50 values for antibodies or proteins against the same target or epitope, with assay type and conditions recorded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Negative and conflicting results:&lt;/strong&gt; published reports of non-binding, cross-reactivity, aggregation, or failed expression for related sequences, flagged separately from positive evidence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source quality and uncertainty:&lt;/strong&gt; per evidence item, peer-reviewed vs. preprint, assay type (SPR, BLI, ELISA, cell-based), measurement reproducibility, and whether the result has been independently confirmed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The packet should be machine-readable for automated reranking and human-readable for review of ambiguous cases.&lt;/p&gt;

&lt;p&gt;Here is a concrete retrieval step for one candidate, using the &lt;a href="https://docs.valyu.ai" rel="noopener noreferrer"&gt;Valyu&lt;/a&gt; TypeScript SDK:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Valyu&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu-js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;valyu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;VALYU_API_KEY&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// search(query, options): query is positional, options are camelCase.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;literatureResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;anti-HER2 antibody CDR-H3 binding affinity epitope SPR&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;searchType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;proprietary&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;includedSources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu/valyu-biorxiv&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;startDate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2015-01-01&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// plain hyphens; YYYY-MM-DD is validated&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Each result carries a primary source URL, a source identifier, and a&lt;/span&gt;
&lt;span class="c1"&gt;// relevance score. The triage layer joins these items with sequence and&lt;/span&gt;
&lt;span class="c1"&gt;// structural evidence before reranking the candidate.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;evidencePacket&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;literatureResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;relevance&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;relevance_score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;excerpt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Which evidence should influence ranking, and how to represent uncertainty
&lt;/h2&gt;

&lt;p&gt;Not all evidence carries equal weight. A high-affinity SPR measurement for a homologous antibody against the same epitope is a fundamentally different kind of claim than a qualitative ELISA binding report for a distantly related sequence. The ranking system must encode this hierarchy explicitly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Target biology&lt;/strong&gt; establishes functional context: whether the target is a receptor with a known active site, a shed antigen, or a membrane protein with restricted epitope accessibility. This constrains which epitopes are plausible and which design strategies have precedent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Epitope accessibility&lt;/strong&gt; determines whether a binder can physically reach its target. A structurally buried epitope on the native conformation may not be accessible in vivo. Published epitope mapping (alanine scanning, hydrogen–deuterium exchange, cryo-EM reconstructions) provides direct evidence of which surface patches are exposed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Homologous sequences&lt;/strong&gt; offer the strongest signal for novel candidates. If a generated CDR-H3 shares significant similarity with a known binder against the same target, that is a positive signal; similarity to a known non-binder, or to a binder against an unrelated target, is a cautionary one. Similarity is most informative at the CDR level, where variation most directly relates to binding, rather than at the framework level where germline similarity is common and uninformative.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Known structures&lt;/strong&gt; provide geometric constraints. If a PDB structure of an antibody–target complex exists, the paratope–epitope interface geometry is known, and a candidate predicted to occupy a similar geometry has structural precedent. Resolution matters: higher-resolution structures provide stronger geometric evidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Measured affinities&lt;/strong&gt; provide quantitative anchors. &lt;a href="https://www.ebi.ac.uk/chembl/" rel="noopener noreferrer"&gt;ChEMBL 37&lt;/a&gt; (prepared 1 May 2026) contains &lt;strong&gt;2,921,148 distinct compounds, 24,527,044 activities across 1,970,438 assays, and 18,552 targets&lt;/strong&gt;. Critically, ChEMBL classifies assay data into Binding (B), Functional (F), ADME (A), Toxicity (T), and Physicochemical (P) types, plus Unclassified (U), so a KD from a binding assay is machine-distinguishable from a functional cell-based readout.&lt;/p&gt;

&lt;p&gt;That distinction is the whole point. A retrieval step for measured affinities must keep the source identifier and assay type attached to every measurement, so the ranking function never treats a ChEMBL KD and a qualitative PubMed observation as the same kind of evidence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;affinityResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;HER2 antibody KD IC50 Ki binding affinity assay&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;searchType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;proprietary&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;includedSources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu/valyu-chembl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Literature writes affinities in two orders. Matching only one of them&lt;/span&gt;
&lt;span class="c1"&gt;// silently drops most of the corpus. "KD = 5 nM" is far more common in&lt;/span&gt;
&lt;span class="c1"&gt;// prose than "5 nM (KD)".&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;LABEL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;raw&lt;/span&gt;&lt;span class="s2"&gt;`K[Dd]|IC50|EC50|K[Ii]`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;VALUE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;raw&lt;/span&gt;&lt;span class="s2"&gt;`(\d+(?:\.\d+)?)\s*(pM|nM|µM|uM|mM)`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;labelFirst&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RegExp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;LABEL&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;)&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;s*(?:=|≈|~|:|of)?&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;s*&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;VALUE&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;g&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;valueFirst&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;RegExp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;VALUE&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;s*&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;(?(&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;LABEL&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;)&lt;/span&gt;&lt;span class="se"&gt;\\&lt;/span&gt;&lt;span class="s2"&gt;)?`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;g&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;measurements&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;affinityResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;flatMap&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// content is `string | object | any[]`. Structured records (data_type&lt;/span&gt;
  &lt;span class="c1"&gt;// === "structured") arrive as objects and should be read as fields;&lt;/span&gt;
  &lt;span class="c1"&gt;// regex is only for the unstructured prose path.&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;string&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fromLabelFirst&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;labelFirst&lt;/span&gt;&lt;span class="p"&gt;)].&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;assayType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;toUpperCase&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
    &lt;span class="na"&gt;unit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;}));&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fromValueFirst&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;valueFirst&lt;/span&gt;&lt;span class="p"&gt;)].&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;assayType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;toUpperCase&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
    &lt;span class="na"&gt;unit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;}));&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;fromLabelFirst&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;fromValueFirst&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;sourceUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;sourceId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;      &lt;span class="c1"&gt;// log this once to confirm the exact string&lt;/span&gt;
    &lt;span class="na"&gt;relevance&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;relevance_score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}));&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;chemblMeasurements&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;measurements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourceId&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu/valyu-chembl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;literatureMeasurements&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;measurements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sourceId&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ChEMBL returns structured bioactivity records; PubMed hits are frequently qualitative. Keeping the source identifier explicit is part of representing uncertainty. If a query returns no measurements at all, that &lt;strong&gt;coverage gap is itself a first-class output&lt;/strong&gt;, not something to bury inside an averaged confidence score.&lt;/p&gt;




&lt;h2&gt;
  
  
  How evidence reranks without becoming a hard gate
&lt;/h2&gt;

&lt;p&gt;The central risk of literature-in-the-loop triage is that it degenerates into a novelty penalty: candidates with no prior literature support get systematically deprioritised, and the assay queue fills with minor variants of known binders. This is the exploration-versus-exploitation problem in active learning, applied to wet-lab selection.&lt;/p&gt;

&lt;p&gt;Three mechanisms prevent the collapse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. An explicit exploration budget.&lt;/strong&gt; Reserve a meaningful fraction of assay slots for candidates the evidence step scores as low-evidence but the generative model scores as high-confidence or high-novelty. Label them as exploration candidates and track them separately. The budget structurally prevents the ranking system from optimising purely for prior support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. A novelty-conditional scoring function.&lt;/strong&gt; Rather than ranking all candidates on a single evidence score, compute a conditional one: for candidates with close literature analogues, weight evidence heavily; for candidates in sparsely populated regions of sequence or structure space, weight evidence lightly and lean on model confidence and structural plausibility. The function should be transparent and auditable, not a black-box reranker.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Human review for ambiguous cases.&lt;/strong&gt; Flag candidates where evidence conflicts, where the closest homolog is a known non-binder, or where the epitope is disputed in the literature. A computational biologist or antibody engineer with the full evidence packet can make a judgment that automated ranking cannot. This is not a failure of automation. It is an acknowledgment that some decisions require domain expertise no ranking function fully encodes.&lt;/p&gt;

&lt;p&gt;The output is a reranked queue with three tiers: &lt;strong&gt;evidence-supported&lt;/strong&gt;, &lt;strong&gt;exploration&lt;/strong&gt;, and &lt;strong&gt;flagged for human review&lt;/strong&gt;. Assay slots are allocated across tiers according to the exploration budget, not purely by score.&lt;/p&gt;




&lt;h2&gt;
  
  
  A transparent retrospective protocol
&lt;/h2&gt;

&lt;p&gt;The value of literature-in-the-loop triage can be assessed retrospectively using a public antibody lineage with a documented history of measured affinities and validation outcomes.&lt;/p&gt;

&lt;p&gt;The anti-HER2 lineage suits this well. The murine monoclonal 4D5 was described in &lt;a href="https://pubmed.ncbi.nlm.nih.gov/2566907/" rel="noopener noreferrer"&gt;Hudziak et al., 1989&lt;/a&gt; (&lt;em&gt;Mol Cell Biol&lt;/em&gt;) and humanized onto a consensus human IgG1 framework to produce trastuzumab in &lt;a href="https://pubmed.ncbi.nlm.nih.gov/1350088/" rel="noopener noreferrer"&gt;Carter et al., 1992&lt;/a&gt;. The lineage continues through trastuzumab-based antibody–drug conjugates (ado-trastuzumab emtansine and trastuzumab deruxtecan), which retain the 4D5-derived variable domains.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One clarification that matters for this protocol:&lt;/strong&gt; pertuzumab is &lt;em&gt;not&lt;/em&gt; in the 4D5 lineage. It is rhuMAb 2C4, derived from a separate murine parent antibody and binding a distinct epitope on HER2 domain II (the dimerization arm), where trastuzumab binds domain IV. It is a same-target, different-lineage antibody. In a protocol whose ranking turns on CDR-level sequence homology, conflating the two would produce meaningless results. Treat it as a useful &lt;em&gt;negative control&lt;/em&gt; for homology-based ranking instead: a clinically successful anti-HER2 antibody that CDR similarity to 4D5 should not, and does not, predict.&lt;/p&gt;

&lt;p&gt;The protocol:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Define the candidate set.&lt;/strong&gt; Assemble a panel representing the known lineage (the parent antibody, intermediate variants described in the literature, clinical candidates) plus computationally generated decoys or variants absent from the historical record.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set a historical evidence cutoff.&lt;/strong&gt; Choose a date preceding the clinical disclosure of later-generation antibodies in the lineage, and retrieve only literature and bioactivity data published before it. This simulates what the triage system would have known at that point.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run blinded ranking.&lt;/strong&gt; Apply the evidence-ranking pipeline to the full panel using only pre-cutoff evidence. The system does not know which candidates are the clinically successful antibodies and which are decoys.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare against measured-affinity labels.&lt;/strong&gt; Using post-cutoff literature, retrieve measured affinities and validation outcomes for each candidate, and compare the evidence-based ranking to experimental outcomes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Report three metrics.&lt;/strong&gt; &lt;em&gt;Candidates deprioritised&lt;/em&gt;: how many known binders the system would have placed below the assay cutoff. &lt;em&gt;Enrichment among survivors&lt;/em&gt;: whether the evidence-supported tier contains a higher fraction of true binders than the full panel. &lt;em&gt;False rejection of a real binder&lt;/em&gt;: whether any clinically validated antibody would have been deprioritised, and why.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The historical cutoff maps directly onto the &lt;code&gt;endDate&lt;/code&gt; parameter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;evidenceBeforeCutoff&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;HER2 antibody trastuzumab 4D5 affinity structure PDB&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;searchType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;proprietary&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;includedSources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;valyu/valyu-chembl&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;endDate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;2010-12-31&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// simulate pre-disclosure state&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One caveat worth stating plainly: date filtering operates on the publication date attached to the indexed document. For literature that maps cleanly. For curated database records, the deposit date and the date of the underlying experiment can differ, so a strict cutoff is an approximation of historical knowledge, not a perfect reconstruction of it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This protocol is a proposal, not a completed experiment.&lt;/strong&gt; I have not run it, and no candidate counts, enrichment rates, or false-negative rates should be read as findings. Its value is in being specifiable and auditable in advance, and in surfacing its own coverage gaps. A retrospective built only on PubMed and ChEMBL would systematically underestimate negative evidence, because failed binders are underpublished. That biases the analysis toward overestimating support for candidates whose failures never made it into print.&lt;/p&gt;




&lt;h2&gt;
  
  
  The infrastructure this requires
&lt;/h2&gt;

&lt;p&gt;The triage step needs something most lab-in-the-loop systems were not designed around: on-demand retrieval of structured, auditable literature and bioactivity data, callable at candidate-selection time, with every result traceable to a primary source.&lt;/p&gt;

&lt;p&gt;Three capabilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Semantic search over biomedical literature.&lt;/strong&gt; PubMed comprises &lt;a href="https://pubmed.ncbi.nlm.nih.gov/about/" rel="noopener noreferrer"&gt;more than 40 million citations&lt;/a&gt; of biomedical literature, updated daily by the NLM. Note that not every citation carries an abstract (coverage is uneven, especially for older records), and PubMed does not host full text, though it links out where available. A query for "anti-HER2 antibody CDR-H3 affinity" should return relevant studies with metadata and links. Valyu's PubMed index covers 37M+ papers and supports natural-language queries structured around candidate features such as target name, epitope description, or CDR sequence motif, rather than requiring hand-built Boolean strings. Its index refreshes monthly, which is fine for a design-cycle cadence and worth knowing if you need same-week publications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structured bioactivity retrieval.&lt;/strong&gt; ChEMBL's 24.5M activities across 18,552 targets cover IC50, Ki, KD, EC50, functional potencies, and ADMET properties. That is the upstream database's full scale, and any given retrieval layer indexes some subset of it, so check the coverage figures for whichever provider you use rather than assuming parity. The retrieval system has to query across multiple dimensions and return &lt;strong&gt;structured records rather than free text&lt;/strong&gt;. Valyu's search results carry a &lt;code&gt;data_type&lt;/code&gt; of &lt;code&gt;"structured"&lt;/code&gt; or &lt;code&gt;"unstructured"&lt;/code&gt;, so a caller can branch on it rather than regexing everything and hoping.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Provenance and auditability.&lt;/strong&gt; Every evidence item must carry a traceable link to its primary source: the PubMed PMID, the ChEMBL assay ID, the PDB entry, the UniProt accession. When a candidate is reranked because a homologous antibody has a published KD, the ranking record must include the assay type, source identifiers, and measurement conditions. This audit trail is what lets a human reviewer verify evidence during ambiguous-case review, and what makes retrospective analysis of ranking decisions possible at all.&lt;/p&gt;

&lt;p&gt;Valyu is one implementation of this shape: ChEMBL bioactivity data and 37M+ PubMed papers behind a natural-language semantic search API. The critical requirement is not a specific vendor. It is the ability to retrieve structured, cited evidence programmatically, at the speed of candidate selection, with enough coverage of both positive and negative published results to be worth trusting.&lt;/p&gt;

&lt;p&gt;And the infrastructure has to be honest about its limits. PubMed abstracts and ChEMBL records do not capture every experimental detail, and they capture almost no unpublished data. The evidence-ranking system should represent coverage uncertainty as a first-class output rather than burying it inside a single confidence score.&lt;/p&gt;




&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why is a design-to-assay loop incomplete when model confidence, predicted structure quality, and predicted binding are treated as interchangeable?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Model confidence measures the internal consistency of the generative model. pLDDT measures per-residue structural prediction confidence. Predicted binding estimates the likelihood of an interaction, and does it weakly: ipTM scored an AUROC of 0.64 in the Adaptyv EGFR competition analysis. Each answers a different question. Treating them as one signal lets a candidate with high pLDDT and poor predicted binding rank above one with moderate structural confidence and strong published precedent against the same epitope.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where should literature-in-the-loop triage sit, and what should it produce?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Between generative candidate production and assay queue assembly. For each candidate it produces an evidence packet: target biology context with citations, epitope and accessibility data, homologous sequence alignments with identity percentages, known PDB structures with resolution and method, measured affinities with assay type and conditions, negative and conflicting results, and per-item source quality metadata.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How should source quality and uncertainty be represented?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Per evidence item, not per candidate: peer-reviewed vs. preprint, assay type (SPR, BLI, ELISA, cell-based), measurement reproducibility, and whether conditions match the intended assay. Per-candidate uncertainty should then capture the ratio of supportive to cautionary evidence, the spread of measured affinities for related binders, and the degree of novelty relative to the closest known sequence or structure. Zero retrieved evidence is a distinct state from conflicting evidence, and the two should never collapse into the same score.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does evidence rerank candidates without becoming a hard gate that removes novel binders?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An explicit exploration budget reserving assay slots for low-evidence, high-novelty candidates; a novelty-conditional scoring function that weights evidence heavily only where close analogues exist; and human review for conflicting or disputed cases. The output is a three-tier queue (evidence-supported, exploration, flagged), with slots allocated across tiers rather than purely by score.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What retrospective protocol could validate this on a public lineage?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Assemble a panel of known lineage sequences and generated decoys, set a historical evidence cutoff preceding later-generation disclosures, run blinded evidence-based ranking on pre-cutoff data only, compare against post-cutoff measured-affinity labels, and report candidates deprioritised, enrichment among evidence-supported survivors, and any false rejection of a real binder. This is a proposed protocol. It has not been run, and nothing here should be read as a result.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can literature-in-the-loop triage replace wet-lab validation?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Literature evidence informs prioritisation. It cannot confirm that a specific generated candidate binds its target, expresses at usable levels, or meets developability criteria. Wet-lab validation remains the only source of ground truth for a novel candidate. Triage changes which candidates are tested first, not whether they are tested.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>science</category>
      <category>triage</category>
      <category>valyu</category>
    </item>
    <item>
      <title>AI Agents in Finance: From Cited Reports to Finished Deliverables</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Mon, 24 Aug 2026 14:40:22 +0000</pubDate>
      <link>https://dev.to/valyuai/ai-agents-in-finance-from-cited-reports-to-finished-deliverables-3l1m</link>
      <guid>https://dev.to/valyuai/ai-agents-in-finance-from-cited-reports-to-finished-deliverables-3l1m</guid>
      <description>&lt;p&gt;Most AI research agents are graded on their prose. Analysts are graded on what lands in the model, the memo and the deck.&lt;/p&gt;

&lt;p&gt;This post covers a large update driven entirely by watching how people actually used it on our &lt;a href="https://finance.valyu.ai" rel="noopener noreferrer"&gt;Finance open source app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Finance is &lt;a href="https://github.com/valyuAI" rel="noopener noreferrer"&gt;open source&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;23 curated deep research workflows&lt;/strong&gt; across investment banking, private equity, hedge funds and GTM — each with a depth chip, a runtime estimate, and deliverable badges stated before you spend a credit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The app now reads your freeform query&lt;/strong&gt; and pre-fills the deliverables picker with the format it implies. Conservative, visible, editable, and it never blocks your run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generated files moved to the top of the report&lt;/strong&gt;, above the body.&lt;/li&gt;
&lt;li&gt;Every claim resolves to a clickable primary source.&lt;/li&gt;
&lt;li&gt;It's open source on &lt;a href="https://github.com/valyuAI" rel="noopener noreferrer"&gt;github&lt;/a&gt; and live at &lt;a href="https://finance.valyu.ai" rel="noopener noreferrer"&gt;finance.valyu.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Missing Deliverable
&lt;/h2&gt;

&lt;p&gt;Ask a junior analyst for "a peer comps table for Alphabet vs Microsoft and Meta as an Excel spreadsheet" and you get a spreadsheet.&lt;/p&gt;

&lt;p&gt;Ask most AI research tools the same thing and you get a beautifully written essay — sometimes with formatted tables — about peer comparables, followed by silence on where the downloadable file should be.&lt;/p&gt;

&lt;p&gt;That silence is the missing mile. Every leaderboard measures retrieval accuracy, citation quality and reasoning depth. Very few measure whether the thing you asked for arrived in a form you could open.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn6tsea8wpvi09wesnn22.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn6tsea8wpvi09wesnn22.webp" alt="Finance 1" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Which workflows ship today
&lt;/h2&gt;

&lt;p&gt;Workflows are organised by vertical, because a hedge fund analyst and a GTM lead are not looking for the same artifact. The catalogue currently holds &lt;strong&gt;23 templates across four domains&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Investment banking&lt;/strong&gt; — company profiles, IC memos, comparables&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Private equity&lt;/strong&gt; — commercial due diligence, market maps&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hedge funds&lt;/strong&gt; — thesis work, screening&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GTM&lt;/strong&gt; — account intelligence briefings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A fifth lens, &lt;strong&gt;Popular&lt;/strong&gt;, sits first and cuts across all four, surfacing the most-used templates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftjgsovuryhy71vdo2sj9.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftjgsovuryhy71vdo2sj9.webp" alt="Finance 2" width="799" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each card carries three signals before you commit a credit:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Signal&lt;/th&gt;
&lt;th&gt;What it tells you&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Depth chip&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Fast, Standard or Heavy. A depth knob, not a speed knob — even Fast runs for minutes.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Runtime estimate&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;4–8 min for an Account Intelligence Briefing; 7–12 for a Company Profile; 10–25 for an IC Memo, Market Map or Commercial Due Diligence.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deliverable badges&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;DOC&lt;/code&gt; · &lt;code&gt;XLS&lt;/code&gt; · &lt;code&gt;PPT&lt;/code&gt; — what you get at the end, stated up front.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Pick one and you get an auto-generated form. The variables come from the workflow definition itself, so a template that needs a company gets a company field with real ticker examples, and a template that needs a thesis gets a textarea instead of a single-line input.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiiewxcryr5iqs5pi2o0r.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiiewxcryr5iqs5pi2o0r.webp" alt="Finance 3" width="800" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The agent now reads your query
&lt;/h2&gt;

&lt;p&gt;Alongside the templated workflows there's a freeform research box. Type anything, pick a depth, hit enter, get a cited report.&lt;/p&gt;

&lt;p&gt;A deliverables picker sat under that box: pick a format, describe the contents, get a file. &lt;strong&gt;It worked perfectly. It also required you to know it was there.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So what happens when someone doesn't know which format is right, or simply forgets to open it? Finance now runs a small model over your settled query and pre-fills the picker with a format and description drawn from the query itself.&lt;/p&gt;

&lt;p&gt;Type the peer comps request, pause for a moment, and the panel opens on its own with an Excel row already filled in:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsgsvj7tfntteu5u6rpbm.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsgsvj7tfntteu5u6rpbm.gif" alt="Finance 4" width="600" height="357"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What it infers, and when it stays quiet
&lt;/h3&gt;

&lt;p&gt;The design constraint was that inference must never make things worse than the old manual flow.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It suggests, it does not decide.&lt;/strong&gt; Suggestions appear in an open panel, badged, before launch. Every one is editable and deletable. Nothing is attached without being shown to you first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It fails open.&lt;/strong&gt; No API key, a timeout, or a malformed response all resolve to "no suggestions" — your research launches exactly as it did before, with nothing visible going wrong.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It is schema-bound.&lt;/strong&gt; The response is strictly validated; a bare-array answer is rejected rather than guessed at.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It caps out at five deliverables per run&lt;/strong&gt; across &lt;code&gt;.xlsx&lt;/code&gt;, &lt;code&gt;.pptx&lt;/code&gt;, &lt;code&gt;.docx&lt;/code&gt;, &lt;code&gt;.csv&lt;/code&gt; and &lt;code&gt;.pdf&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Deliverables now lead the report
&lt;/h2&gt;

&lt;p&gt;Small in the diff, large in practice.&lt;/p&gt;

&lt;p&gt;Generated files used to render last — below the full report body and the chart gallery. On a report running to several thousand words, the spreadsheet you asked for sat several screens down, past every table and footnote.&lt;/p&gt;

&lt;p&gt;They now sit directly under the title, above the collapsed activity feed and the body.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdzb7v01ibadkf32hkhnq.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdzb7v01ibadkf32hkhnq.webp" alt="Finance 5" width="799" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The reasoning is straightforward: the file is often &lt;em&gt;why&lt;/em&gt; a finished report gets opened at all. Charts stayed where they were, because they illustrate the analysis and read alongside it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why every claim carries its source
&lt;/h2&gt;

&lt;p&gt;Templated workflow or freeform query, the output is cited inline. Claims resolve to favicon pills you can click through to &lt;code&gt;sec.gov&lt;/code&gt;, &lt;code&gt;finance.yahoo.com&lt;/code&gt;, &lt;code&gt;nvidianews.nvidia.com&lt;/code&gt;, and whatever else the research actually touched.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0zfwaubj57gdbgp9kqxv.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0zfwaubj57gdbgp9kqxv.webp" alt="Finance 6" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The reasoning isn't hidden either. Every run keeps an activity feed — the model's plan, the searches it ran, the sources it found, the code it executed — live while it runs, collapsed by default once it finishes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq3fsm99xughj36vrj8oh.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq3fsm99xughj36vrj8oh.webp" alt="Finance 7" width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For financial research this isn't a nice-to-have. A number you cannot trace is a number you cannot put in a memo.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three lessons for anyone building finance agents
&lt;/h2&gt;

&lt;p&gt;The deliverables picker was fully functional the entire time. It produced excellent spreadsheets. Its problem was that reaching them required a user to know it existed, open it, choose a format, and write a good description — four steps of friction guarding a capability they had already described, in plain English, one input box above.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Grade your agent on the artifact, not the prose.&lt;/strong&gt; If an analyst has to retype your output into Excel, the run finished at 80%.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Inference belongs where users already speak.&lt;/strong&gt; If people describe a control in natural language before failing to find it, that control is a candidate for inference. Show what you inferred, let them change it, never let it block the run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Provenance is the product.&lt;/strong&gt; Depth of reasoning is worth nothing if the number cannot be traced to a filing with a date on it.&lt;/p&gt;

&lt;p&gt;The query already contained the answer. All that was missing was something small, cheap and conservative to read it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;Open &lt;a href="https://finance.valyu.ai" rel="noopener noreferrer"&gt;finance.valyu.ai&lt;/a&gt; and run a workflow on a name your team already knows well. Compare it against what you would have produced manually.&lt;/p&gt;

&lt;p&gt;Check the citations. Do they resolve to the actual filing, or to an article about it?&lt;/p&gt;

&lt;p&gt;Then type a query that names a file, like &lt;code&gt;peer comps for GOOGL, MSFT and META as an Excel spreadsheet&lt;/code&gt;, and watch the panel open before you hit enter.&lt;/p&gt;

&lt;p&gt;Finance runs on the same Search and DeepResearch APIs your own agents can call. Grab a key at &lt;a href="https://platform.valyu.ai" rel="noopener noreferrer"&gt;platform.valyu.ai&lt;/a&gt; — $10 in free credits, $20 with a work email, no card — and see the full coverage at &lt;a href="https://docs.valyu.ai" rel="noopener noreferrer"&gt;docs.valyu.ai&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is an AI agent in finance?&lt;/strong&gt;&lt;br&gt;
One that plans and executes a multi-step research task — deciding which sub-questions to ask, fanning out across filings, market data and news, cross-checking what it finds, and returning a synthesised, cited output. It differs from a single search call, which answers one question against one index, and from a chatbot, which has no persistent task or artifact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a deep research workflow?&lt;/strong&gt;&lt;br&gt;
A versioned, parameterised research template that runs as an async task and returns a cited report plus downloadable files. The methodology, source strategy and section structure are fixed; the inputs — company, thesis, category — are variables anyone on the team can fill in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does the app decide what files to generate on its own?&lt;/strong&gt;&lt;br&gt;
No, it suggests. Suggestions appear in an open panel, badged, before you launch, and you can edit or delete every one. Nothing is attached without being shown to you first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens if the suggestion model is unavailable?&lt;/strong&gt;&lt;br&gt;
Nothing visible. The feature fails open — no key, a timeout, or a bad response all resolve to "no suggestions," and your research launches exactly as before.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which model does the deliverable extraction?&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;gpt-5.6-luna&lt;/code&gt; by default, overridable with the &lt;code&gt;DELIVERABLE_SUGGEST_MODEL&lt;/code&gt; environment variable. Whatever you pick must support strict structured outputs, since the response is schema-validated and a bare-array answer is rejected. Without an &lt;code&gt;OPENAI_API_KEY&lt;/code&gt; the extractor stays off.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How long does a deep research run take?&lt;/strong&gt;&lt;br&gt;
Depth is the knob, not speed. Estimates range from 4–8 minutes for an Account Intelligence Briefing to 10–25 for a Market Map, IC Memo or Commercial Due Diligence. Runs continue server-side if you navigate away — pick them up again from Reports.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What file formats can it produce?&lt;/strong&gt;&lt;br&gt;
Excel (&lt;code&gt;.xlsx&lt;/code&gt;), PowerPoint (&lt;code&gt;.pptx&lt;/code&gt;), Word (&lt;code&gt;.docx&lt;/code&gt;), CSV and PDF, up to five per run. Office formats are produced through code execution, which the app enables automatically when you request one. Every run produces a PDF regardless.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I run this without a Valyu account?&lt;/strong&gt;&lt;br&gt;
Not on &lt;a href="https://finance.valyu.ai" rel="noopener noreferrer"&gt;finance.valyu.ai&lt;/a&gt; — that needs a signup. But it's open source, so you can deploy it yourself by switching the mode to &lt;code&gt;self-hosted&lt;/code&gt; in the env variables.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I build my own workflow?&lt;/strong&gt;&lt;br&gt;
You can build workflows on the Valyu platform, and the app links you there. Note that the in-app browser currently requests the curated catalogue only (&lt;code&gt;scope=valyu&lt;/code&gt;), so custom templates won't appear in the domain lenses yet.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>finance</category>
      <category>deliverables</category>
      <category>agents</category>
    </item>
    <item>
      <title>Give Your AI Agent a Scientist's Library. a Science MCP Server</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Mon, 24 Aug 2026 13:29:29 +0000</pubDate>
      <link>https://dev.to/valyuai/give-your-ai-agent-a-scientists-library-a-science-mcp-server-4pdb</link>
      <guid>https://dev.to/valyuai/give-your-ai-agent-a-scientists-library-a-science-mcp-server-4pdb</guid>
      <description>&lt;p&gt;Most "research agent" demos are searching abstracts and calling it literature review. The abstract tells you a Phase 3 melanoma immunotherapy trial hit its endpoint. It does not tell you the imaging protocol used to assess tumour response that lives in the methods section, or a supplementary table, or a figure caption.&lt;/p&gt;

&lt;p&gt;This walks through wiring a hosted science MCP server into your AI agent, scoping it to actual scientific collections, and running a controlled before-and-after test where exactly one variable changes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Valyu is a search API built for AI agents:&lt;/strong&gt; one endpoint over biomedical literature, clinical trial registries, patents, financial filings and the open web, returning full text and structured metadata with resolvable identifiers rather than a list of links to go click.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The hosted MCP server is a plain HTTP endpoint. No local process, no Node, no &lt;code&gt;mcp-remote&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The MCP tools take &lt;code&gt;query&lt;/code&gt; and &lt;code&gt;max_num_results&lt;/code&gt; and nothing else.&lt;/strong&gt; No source filtering. If you need scoped retrieval, you need the REST API or an SDK — not the MCP client.&lt;/li&gt;
&lt;li&gt;Scope with &lt;code&gt;included_sources&lt;/code&gt; in the API, then check &lt;code&gt;result.source&lt;/code&gt; on every hit.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;include_abstracts=True&lt;/code&gt; &lt;em&gt;widens&lt;/em&gt; PubMed to the whole abstract corpus; the default restricts to papers with available full text.&lt;/li&gt;
&lt;li&gt;Every claim gets a resolvable identifier. The API returns &lt;code&gt;result.doi&lt;/code&gt; — read it, don't prompt for it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Valyu API key from &lt;a href="https://platform.valyu.ai" rel="noopener noreferrer"&gt;platform.valyu.ai&lt;/a&gt; — $10 in free credits, $20 if you sign up with a work email, no card&lt;/li&gt;
&lt;li&gt;Claude Desktop, Cursor, or any MCP client&lt;/li&gt;
&lt;li&gt;Python 3 and &lt;code&gt;pip install valyu&lt;/code&gt; for the API examples&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No Node.js. The hosted server is remote HTTP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting the MCP server
&lt;/h2&gt;

&lt;p&gt;The endpoint is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://mcp.valyu.ai/mcp?valyuApiKey=YOUR_API_KEY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Auth rides in the query string. You can cap spend per session by appending &lt;code&gt;&amp;amp;maxPrice=50&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Desktop / claude.ai&lt;/strong&gt; — go to &lt;a href="https://claude.ai/settings/connectors" rel="noopener noreferrer"&gt;claude.ai/settings/connectors&lt;/a&gt; → Add custom connector → paste the URL.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://cursor.com/link/prompt?text=You%20are%20setting%20up%20the%20Valyu%20remote%20MCP%20server%20for%20me.%20Do%20the%20following%3A%0A%0A1.%20Ask%20me%20for%20my%20Valyu%20API%20key%20(I%20can%20get%20one%20at%20%5Bhttps%3A%2F%2Fplatform.valyu.ai%2Fuser%2Faccount%2Fapikeys%5D(https%3A%2F%2Fplatform.valyu.ai%2Fuser%2Faccount%2Fapikeys)).%20Never%20print%2C%20echo%2C%20or%20log%20the%20key.%0A2.%20Add%20this%20MCP%20server%20config%20to%20my%20client%2C%20substituting%20my%20key%20for%20%60MY_API_KEY%60%3A%0A%20%20%20%60%60%60json%20%20theme%3D%7Bnull%7D%0A%20%20%20%7B%22mcpServers%22%3A%7B%22valyu%22%3A%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.valyu.ai%2Fmcp%3FvalyuApiKey%3DMY_API_KEY%22%7D%7D%7D%0A%20%20%20%60%60%60%0A3.%20Once%20connected%2C%20run%20a%20quick%20test%20search%20(for%20example%3A%20%22search%20for%20the%20latest%20news%20on%20AI%20agents%22)%20to%20confirm%20the%20tools%20work.%0A4.%20Tell%20me%3A%20free%20signup%20credits%20work%20across%20every%20source.%20Premium%20and%20proprietary%20sources%20(SEC%2C%20patents%2C%20drug%20discovery%2C%20genomics%2C%20etc.)%20need%20a%20subscription%2C%20and%20a%20plan%20lowers%20the%20cost%20per%20credit%20-%20recommend%20I%20get%20on%20a%20plan%20if%20I%20will%20use%20those%20sources%20regularly." rel="noopener noreferrer"&gt;&lt;strong&gt;Open in Cursor&lt;/strong&gt; &lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What the server exposes
&lt;/h2&gt;

&lt;p&gt;Eleven tools, not one :&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Arguments&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu_search&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;query&lt;/code&gt;, &lt;code&gt;max_num_results&lt;/code&gt;, &lt;code&gt;fast_mode&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Web search returning full page content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu_academic_search&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;query&lt;/code&gt;, &lt;code&gt;max_num_results&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Full text across arXiv, PubMed, bioRxiv, medRxiv&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu_bio_search&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;query&lt;/code&gt;, &lt;code&gt;max_num_results&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;PubMed, clinical trials, FDA labels, bioRxiv, medRxiv, ChEMBL, PubChem, DrugBank, Open Targets, NPI Registry, WHO ICD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu_patents&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;query&lt;/code&gt;, &lt;code&gt;max_num_results&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Patent documents — claims, abstracts, inventors, filings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu_contents&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;urls&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Extract content from up to 10 URLs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu_datasources&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;category&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Enumerate the 36+ datasets at runtime&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Plus &lt;code&gt;valyu_financial_search&lt;/code&gt;, &lt;code&gt;valyu_sec_search&lt;/code&gt; (adds &lt;code&gt;response_length&lt;/code&gt;), &lt;code&gt;valyu_company_research&lt;/code&gt; (&lt;code&gt;company&lt;/code&gt;, &lt;code&gt;sections&lt;/code&gt;), &lt;code&gt;valyu_economics_search&lt;/code&gt; and &lt;code&gt;valyu_datasources_categories&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scoping your sources
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;(API and SDK only — see the constraint above.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Sources are addressed two ways through &lt;code&gt;included_sources&lt;/code&gt;: &lt;strong&gt;presets&lt;/strong&gt; (curated bundles) and &lt;strong&gt;dataset IDs&lt;/strong&gt; (individual collections).&lt;/p&gt;

&lt;p&gt;Presets: &lt;code&gt;academic&lt;/code&gt;, &lt;code&gt;finance&lt;/code&gt;, &lt;code&gt;patent&lt;/code&gt;, &lt;code&gt;health&lt;/code&gt;, &lt;code&gt;genomics&lt;/code&gt;, &lt;code&gt;chemistry&lt;/code&gt;, &lt;code&gt;physics&lt;/code&gt;, &lt;code&gt;legal&lt;/code&gt;, &lt;code&gt;politics&lt;/code&gt;, &lt;code&gt;transportation&lt;/code&gt;, &lt;code&gt;pulse&lt;/code&gt;, &lt;code&gt;cybersecurity&lt;/code&gt;, &lt;code&gt;environment&lt;/code&gt;, &lt;code&gt;automotive&lt;/code&gt;, &lt;code&gt;compliance&lt;/code&gt;, &lt;code&gt;medical&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Watch the preset boundaries — this bites people.&lt;/strong&gt; &lt;code&gt;academic&lt;/code&gt; covers literature and preprints only:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dataset ID&lt;/th&gt;
&lt;th&gt;Preset&lt;/th&gt;
&lt;th&gt;Coverage&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-pubmed&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;academic&lt;/td&gt;
&lt;td&gt;37M+ open-access biomedical papers, monthly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-arxiv&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;academic&lt;/td&gt;
&lt;td&gt;Physics, CS, maths, quant finance, economics&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-biorxiv&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;academic&lt;/td&gt;
&lt;td&gt;250K+ life-sciences preprints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-medrxiv&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;academic&lt;/td&gt;
&lt;td&gt;80K+ clinical/health preprints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-chemrxiv&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;academic&lt;/td&gt;
&lt;td&gt;30K+ chemistry preprints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-clinical-trials&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;health&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;500K+ ClinicalTrials.gov studies, real-time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-drug-labels&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;health&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;150K+ FDA labels via DailyMed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-patents&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;patent&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;8M+ USPTO filings, full text and figures&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-patents-epo&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;patent&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;4M+ European filings from 1978&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-chembl&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;chemistry&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;2.5M+ bioactive compounds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-pubchem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;chemistry&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;100M+ compounds&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;valyu/valyu-open-targets&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;chemistry&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;60K+ drug targets&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;valyu_bio_search&lt;/code&gt; additionally reaches DrugBank, the NPI Registry and WHO ICD codes, which aren't broken out as dataset IDs in the datasources guide.&lt;/p&gt;

&lt;p&gt;Clinical trials are &lt;strong&gt;not&lt;/strong&gt; in &lt;code&gt;academic&lt;/code&gt;. If you scope a trial question to the academic preset you will get papers &lt;em&gt;about&lt;/em&gt; trials, not registry records. Use &lt;code&gt;health&lt;/code&gt;, or name &lt;code&gt;valyu/valyu-clinical-trials&lt;/code&gt; directly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Valyu&lt;/span&gt;

&lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# or set VALYU_API_KEY
&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Phase 3 melanoma immunotherapy trials&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;# all | web | proprietary | news
&lt;/span&gt;    &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;max_num_results&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;          &lt;span class="c1"&gt;# check this
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;doi&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Then check the results.&lt;/strong&gt; Every &lt;code&gt;SearchResult&lt;/code&gt; carries a &lt;code&gt;source&lt;/code&gt; field. After each search, confirm each result came from a collection you declared. If something arrives from elsewhere, treat the output as unscoped and rerun tighter. Filtering narrows the search; it is not a guarantee of exclusion.&lt;/p&gt;

&lt;p&gt;Note &lt;code&gt;excluded_sources&lt;/code&gt; accepts dataset IDs and domains but &lt;strong&gt;not&lt;/strong&gt; presets.&lt;/p&gt;

&lt;h2&gt;
  
  
  The before-and-after test
&lt;/h2&gt;

&lt;p&gt;Here's the part worth running, with one honest caveat up front.&lt;/p&gt;

&lt;p&gt;By default (&lt;code&gt;include_abstracts=False&lt;/code&gt;), PubMed search is restricted to &lt;strong&gt;papers that have available full text&lt;/strong&gt;. Setting &lt;code&gt;include_abstracts=True&lt;/code&gt; &lt;strong&gt;expands&lt;/strong&gt; the search to PubMed's complete abstract corpus and returns document-level abstracts.&lt;/p&gt;

&lt;p&gt;So this is &lt;em&gt;not&lt;/em&gt; a clean single-variable A/B. Two things change at once: the corpus gets bigger, and the returned granularity drops to abstract level. It's still the sharpest comparison the API gives you, but describe it accurately — you are comparing &lt;em&gt;full-text-only retrieval&lt;/em&gt; against &lt;em&gt;broad abstract-level retrieval&lt;/em&gt;, not "the same search with and without full text."&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Pick a question the abstract can't answer
&lt;/h3&gt;

&lt;p&gt;You want a detail that lives in the methods, a figure caption, or a supplement:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What imaging protocol did the trial use for tumour response assessment?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  2. Run it abstract-only
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;abstract_run&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Phase 3 melanoma immunotherapy tumour response assessment imaging protocol&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;include_abstracts&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;      &lt;span class="c1"&gt;# widen to the full PubMed abstract corpus
&lt;/span&gt;    &lt;span class="n"&gt;max_num_results&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;This has to run in Python, not through the MCP client.&lt;/strong&gt; No MCP tool accepts &lt;code&gt;include_abstracts&lt;/code&gt; — see the section above. Save the output verbatim. This is your baseline.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Run it with full text
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;fulltext_run&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Phase 3 melanoma immunotherapy tumour response assessment imaging protocol&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-pubmed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;include_abstracts&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;     &lt;span class="c1"&gt;# default — papers with available full text only
&lt;/span&gt;    &lt;span class="n"&gt;max_num_results&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Identical query, identical source, identical result count. Save that too.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Compare
&lt;/h3&gt;

&lt;p&gt;Put them side by side. Does the abstract-only answer contain the imaging protocol? Does the full-text one?&lt;/p&gt;

&lt;p&gt;If full text surfaces evidence abstract-only missed, you have a controlled result — &lt;strong&gt;for this query, this index, and this date.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Things not to do with it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don't generalise to "abstract-only retrieval is unreliable." You tested one query against one index.&lt;/li&gt;
&lt;li&gt;One run is a demonstration, not a benchmark.&lt;/li&gt;
&lt;li&gt;PubMed full text is open access only. If your topic is dominated by paywalled journals, the full-text run has less to work with and the comparison says more about OA coverage than about retrieval depth.&lt;/li&gt;
&lt;li&gt;Don't publish until you've independently opened the paper and confirmed the detail is where you say it is.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Recording the run
&lt;/h2&gt;

&lt;p&gt;Four things, or nobody can reproduce it: the exact call parameters, the full verbatim output, the source list, and the correction.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;identical query string used in both runs&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"shared_params"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"search_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"proprietary"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"included_sources"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"valyu/valyu-pubmed"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"max_num_results"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"run_abstract_only"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"include_abstracts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"output"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;full output, verbatim&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"sources_returned"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;result.source values&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"run_full_text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"include_abstracts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"output"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;full output, verbatim&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"sources_returned"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;result.source values&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"run_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;YYYY-MM-DD&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"correction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"missed_by_abstract"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;what was missing&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"found_in_full_text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;what full-text surfaced&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"source_doi"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;result.doi&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"location"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;methods / figure caption / supplement&amp;gt;"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Record the date — PubMed syncs monthly and trials update in real time, so the same call will drift.&lt;/p&gt;

&lt;h2&gt;
  
  
  Citation rules that scientists actually use
&lt;/h2&gt;

&lt;p&gt;Every claim links to a resolvable identifier. This is the line between a science agent and a chatbot with a search tool.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Source type&lt;/th&gt;
&lt;th&gt;Identifier&lt;/th&gt;
&lt;th&gt;Resolves at&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Journal articles&lt;/td&gt;
&lt;td&gt;DOI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://doi.org/&amp;lt;doi&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Preprints (bioRxiv, medRxiv, ChemRxiv)&lt;/td&gt;
&lt;td&gt;DOI&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://doi.org/&amp;lt;doi&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Clinical trials&lt;/td&gt;
&lt;td&gt;NCT number&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://clinicaltrials.gov/study/&amp;lt;nct&amp;gt;&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;US patents&lt;/td&gt;
&lt;td&gt;USPTO patent number&lt;/td&gt;
&lt;td&gt;USPTO patent search portal&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You don't have to parse these out of prose — &lt;code&gt;SearchResult&lt;/code&gt; exposes &lt;code&gt;doi&lt;/code&gt;, &lt;code&gt;citation&lt;/code&gt;, &lt;code&gt;authors&lt;/code&gt;, &lt;code&gt;publication_date&lt;/code&gt;, &lt;code&gt;citation_count&lt;/code&gt; and &lt;code&gt;source&lt;/code&gt; as structured fields. Read them directly rather than asking the model to extract them.&lt;/p&gt;

&lt;p&gt;Do not demand a DOI for everything. Trials and patents have their own registries, and a prompt that insists on DOIs produces fabricated ones.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;For every factual claim, cite a resolvable identifier: a DOI for journal
articles, an NCT number for clinical trials, or a patent number for patents.
If the result has no identifier, give the URL and state that the claim is
unverified. Never construct an identifier that was not returned.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Combining literature, trials and patents
&lt;/h2&gt;

&lt;p&gt;Three scoped searches, correct preset for each:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Valyu&lt;/span&gt;

&lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Literature — academic preset
&lt;/span&gt;&lt;span class="n"&gt;lit&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;PD-1 inhibitor combination therapy melanoma&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;academic&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Clinical trials — registry records live in health, NOT academic
&lt;/span&gt;&lt;span class="n"&gt;trials&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;PD-1 inhibitor melanoma Phase 3&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-clinical-trials&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Patents — USPTO full text and figures
&lt;/span&gt;&lt;span class="n"&gt;patents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;PD-1 antibody immunotherapy&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;included_sources&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;valyu/valyu-patents&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;DOIs for the literature, NCT numbers for the trials, patent numbers for the patents.&lt;/p&gt;

&lt;p&gt;Valyu's DeepResearch (&lt;code&gt;POST /v1/deepresearch/tasks&lt;/code&gt;) spans the same catalogue asynchronously. It &lt;em&gt;can&lt;/em&gt; reach across domains in one task, but verify the returned sources match your intended scope before treating the output as complete.&lt;/p&gt;

&lt;h2&gt;
  
  
  Six checks to keep the agent honest
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Source provenance&lt;/strong&gt; — read &lt;code&gt;result.source&lt;/code&gt; on every result. If it isn't a collection you declared, the run is unscoped.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Identifier resolution&lt;/strong&gt; — verify the cited identifier actually resolves before presenting the claim. DOI at doi.org, NCT at clinicaltrials.gov, patent through USPTO. Doesn't resolve → unverified.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full-text availability&lt;/strong&gt; — PubMed full text is open access only, and &lt;code&gt;include_abstracts=True&lt;/code&gt; means you got abstracts &lt;em&gt;instead of&lt;/em&gt; full text. Have the agent state which mode it ran in. An agent reasoning over an abstract as though it read the paper is the failure this whole post is about.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preprint status&lt;/strong&gt; — bioRxiv, medRxiv and ChemRxiv are not peer-reviewed. Label them as preprints, with server name and DOI, so the reader can judge evidence level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Citation entailment&lt;/strong&gt; — when the agent says a source supports a statement, confirm the passage is actually in the returned &lt;code&gt;content&lt;/code&gt;. If it cites a figure, confirm the figure came back.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Missing assets&lt;/strong&gt; — figures, tables and supplements are not retrievable from every source. &lt;code&gt;valyu/valyu-patents&lt;/code&gt; is the one dataset documented as carrying full text and figures; don't assume that generalises to the preprint servers. If an asset isn't there, the agent says so rather than substituting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Access and copyright limits
&lt;/h2&gt;

&lt;p&gt;Retrieval is not a redistribution licence. The &lt;a href="https://www.valyu.ai/valyu-acceptable-use-policy" rel="noopener noreferrer"&gt;Valyu Acceptable Use Policy&lt;/a&gt; applies across all APIs, datasets, models and indexes. You must not:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reproduce or redistribute copyrighted content&lt;/li&gt;
&lt;li&gt;Access content behind paywalls or access controls&lt;/li&gt;
&lt;li&gt;Store or display publisher content in ways licensing doesn't allow&lt;/li&gt;
&lt;li&gt;Extract, store or manipulate full-text articles from licensed sources&lt;/li&gt;
&lt;li&gt;Rebuild, replicate or simulate any Valyu corpus, dataset, index or scoring&lt;/li&gt;
&lt;li&gt;Join outputs to reassemble source materials&lt;/li&gt;
&lt;li&gt;Scrape or bulk download via high-volume search queries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The contents endpoint is your responsibility.&lt;/strong&gt; Per the AUP: &lt;em&gt;"You — not Valyu — are the party responsible for ensuring that your use of the Contents endpoint in connection with any given URL is lawful and authorised."&lt;/em&gt; Before submitting a URL, review the target's terms and acceptable use policy, and confirm automated extraction isn't prohibited by &lt;code&gt;robots.txt&lt;/code&gt;, &lt;code&gt;X-Robots-Tag&lt;/code&gt; headers or &lt;code&gt;&amp;lt;meta name="robots"&amp;gt;&lt;/code&gt; directives.&lt;/p&gt;

&lt;p&gt;In practice: the agent reads and reasons over retrieved content in-session and does not store it for redistribution. And retrieved research is not a substitute for professional medical advice, or for a human reading the primary source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;[ ] MCP endpoint connected and tools listed in the client&lt;/li&gt;
&lt;li&gt;[ ] Reproducibility runs done via API/SDK, not the MCP client&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;included_sources&lt;/code&gt; set, with the right preset for the source type&lt;/li&gt;
&lt;li&gt;[ ] Both runs use identical query, sources and &lt;code&gt;max_num_results&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] Only &lt;code&gt;include_abstracts&lt;/code&gt; differs between the two runs, and the writeup says the corpus widened too&lt;/li&gt;
&lt;li&gt;[ ] Full output saved verbatim, plus run date&lt;/li&gt;
&lt;li&gt;[ ] &lt;code&gt;result.source&lt;/code&gt; checked on every result&lt;/li&gt;
&lt;li&gt;[ ] Every claim linked to a returned &lt;code&gt;doi&lt;/code&gt;, NCT number or patent number&lt;/li&gt;
&lt;li&gt;[ ] Preprints labelled as preprints&lt;/li&gt;
&lt;li&gt;[ ] Conclusion scoped to this query and index only&lt;/li&gt;
&lt;li&gt;[ ] No stored or redistributed licensed full text&lt;/li&gt;
&lt;li&gt;[ ] No URL sent to &lt;code&gt;/v1/contents&lt;/code&gt; without checking terms and robots directives&lt;/li&gt;
&lt;li&gt;[ ] Retrieved research not presented as medical advice&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;How do I run the same question through both abstract-only and full-content workflows?&lt;/strong&gt;&lt;br&gt;
In Python, not through MCP — no MCP tool exposes &lt;code&gt;include_abstracts&lt;/code&gt;. Issue the identical query twice against &lt;code&gt;valyu/valyu-pubmed&lt;/code&gt;, once with &lt;code&gt;include_abstracts=True&lt;/code&gt; and once with the default &lt;code&gt;False&lt;/code&gt;, keeping &lt;code&gt;search_type&lt;/code&gt;, &lt;code&gt;included_sources&lt;/code&gt; and &lt;code&gt;max_num_results&lt;/code&gt; fixed. Save both outputs verbatim.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I restrict my Claude Desktop agent to just PubMed?&lt;/strong&gt;&lt;br&gt;
No. MCP search tools accept only &lt;code&gt;query&lt;/code&gt; and &lt;code&gt;max_num_results&lt;/code&gt;. Your scope control is which tool the agent picks. For real source pinning, call the API directly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What makes a good test question?&lt;/strong&gt;&lt;br&gt;
One where the decisive detail sits outside the abstract — imaging protocols, assay conditions, eligibility subtleties. "What imaging protocol did the Phase 3 melanoma immunotherapy trial use for tumour response assessment?" works because that lives in methods or a supplement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why did my clinical trial search return papers instead of registry records?&lt;/strong&gt;&lt;br&gt;
You almost certainly scoped to the &lt;code&gt;academic&lt;/code&gt; preset. Clinical trials live in &lt;code&gt;health&lt;/code&gt; — use &lt;code&gt;included_sources=["valyu/valyu-clinical-trials"]&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How should the agent cite results without DOIs?&lt;/strong&gt;&lt;br&gt;
NCT number for trials, patent number for patents. If none exists, the URL plus an explicit note that the claim is unverified. Read &lt;code&gt;result.doi&lt;/code&gt; rather than having the model extract it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>valyu</category>
      <category>science</category>
    </item>
    <item>
      <title>Building Multi-Agent Research Systems using Vercel AI SDK</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Fri, 13 Mar 2026 13:26:08 +0000</pubDate>
      <link>https://dev.to/valyuai/building-multi-agent-research-systems-using-vercel-ai-sdk-2lae</link>
      <guid>https://dev.to/valyuai/building-multi-agent-research-systems-using-vercel-ai-sdk-2lae</guid>
      <description>&lt;p&gt;There are many ways to build apps and systems. In today’s AI-native world, the possibilities are endless.&lt;/p&gt;

&lt;p&gt;Now imagine you’re tasked with building a multi-agent research system, with one key requirement: don’t over-engineer it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KISS — Keep It Simple, Stupid.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the scenario given to you:&lt;/p&gt;

&lt;p&gt;"A friend asked me to pull together everything on Eli Lilly's Q4 results, any ongoing GLP-1 trials they've filed recently, and how the financial press was covering it. Build a multi-agent research system that handles that so you can go accomplish 10 other things while the system gets you the result."&lt;/p&gt;

&lt;p&gt;Now, let’s break this down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pull together everything on Eli Lilly’s Q4 results&lt;/li&gt;
&lt;li&gt;Identify any GLP-1 trials they’ve filed recently&lt;/li&gt;
&lt;li&gt;See how the financial press has been covering it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When broken down like this, it’s simply three queries across three completely different domains: SEC filings, clinical trials, and live news.&lt;/p&gt;

&lt;p&gt;Three different tools, three different contexts and then stitching it all together manually at the end. It’s similar to the &lt;strong&gt;&lt;em&gt;"15-tab" problem.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And it gets worse when you’re building an AI app. You often end up maintaining a research pipeline that’s just a collection of disconnected scripts, held together by copy-paste.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architecture
&lt;/h2&gt;

&lt;p&gt;We have three different contexts, so three domains. We'll use the &lt;strong&gt;Vercel AI SDK&lt;/strong&gt; to handle all three domains in parallel.&lt;/p&gt;

&lt;p&gt;One query, three specialist agents running simultaneously, and a single synthesized response. With the &lt;a href="https://www.npmjs.com/package/@valyu/ai-sdk" rel="noopener noreferrer"&gt;@valyu/ai-sdk&lt;/a&gt; package, plugging in domain-specific data sources takes just one import—no manual tool definitions required.&lt;/p&gt;

&lt;p&gt;This is the architecture: the &lt;strong&gt;Orchestrator–Worker&lt;/strong&gt; pattern.&lt;/p&gt;

&lt;p&gt;One orchestrator agent understands the query, dispatches the right specialists in parallel, and synthesizes the results. Each specialist has its own tool suite and domain expertise&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1vuvbowzhuklmpc05tgv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1vuvbowzhuklmpc05tgv.png" alt="Orchestrator Worker pattern" width="800" height="615"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The tools come from &lt;a href="https://www.npmjs.com/package/@valyu/ai-sdk" rel="noopener noreferrer"&gt;@valyu/ai-sdk&lt;/a&gt;, a package that provides ready-made &lt;a href="https://ai-sdk.valyu.ai/" rel="noopener noreferrer"&gt;Vercel AI SDK tools&lt;/a&gt; backed by Valyu's search API. No manual &lt;code&gt;tool()&lt;/code&gt; definitions, no Zod schemas for parameters, no custom execute functions. &lt;/p&gt;

&lt;p&gt;Import the tool, drop it into your &lt;code&gt;tools&lt;/code&gt; object, done.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Parallel Dispatch Matters
&lt;/h3&gt;

&lt;p&gt;Sequential agents are the wrong default for research workloads. Each specialist takes 4-6 seconds. &lt;/p&gt;

&lt;p&gt;Three in sequence is 15+ seconds. Three specialists running simultaneously gets you results in the time it takes the slowest one to finish.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6l7i7sevq1e0nrgfesm4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6l7i7sevq1e0nrgfesm4.png" alt="Sequential vs Parallel Execution" width="800" height="527"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Data Flow: From Query to Report
&lt;/h2&gt;

&lt;p&gt;For a query like "What's Eli Lilly's financial position and do their GLP-1 trials support the revenue projections?":&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnf769oyu7fba98fpgdp9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnf769oyu7fba98fpgdp9.png" alt="Data flow - from query to report" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;Install Nextjs and then add the following packages...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm add ai @ai-sdk/anthropic @valyu/ai-sdk @ai-sdk/react zod valyu-js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create &lt;code&gt;.env.local&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ANTHROPIC_API_KEY=your_key_here
VALYU_API_KEY=your_key_here
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Grab your &lt;a href="https://platform.claude.com/settings/keys" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt; and &lt;a href="https://platform.valyu.ai" rel="noopener noreferrer"&gt;Valyu API&lt;/a&gt; keys.&lt;/p&gt;

&lt;p&gt;Both keys are read from environment automatically. &lt;code&gt;@valyu/ai-sdk&lt;/code&gt; picks up &lt;code&gt;VALYU_API_KEY&lt;/code&gt; without any explicit configuration.&lt;/p&gt;

&lt;p&gt;Project structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;research-nexus/
├── src/
│   ├── agents/
│   │   ├── financial-analyst.ts   # Financial analyst
│   │   ├── scientist.ts  # Scientist
│   │   ├── journalist.ts          # Journalist
│   │   └── orchestrator.ts        # Query router + synthesizer
│   └── app/
│       └── api/
│           └── chat/
│               └── route.ts       # Next.js API route
└── package.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No &lt;code&gt;lib/&lt;/code&gt; or &lt;code&gt;tools/&lt;/code&gt; directories. The tools come pre-built.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Specialist Agents
&lt;/h2&gt;

&lt;p&gt;Each specialist is a &lt;code&gt;ToolLoopAgent&lt;/code&gt; with domain-specific tools from @valyu/ai-sdk. The agent loop lets the model chain multiple tool calls before returning. Searching SEC filings, then cross-referencing earnings, then adding macro context, all within a single agent invocation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Financial Analyst
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ToolLoopAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;anthropic&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@ai-sdk/anthropic&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;secSearch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;financeSearch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;economicsSearch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@valyu/ai-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;financialAnalystAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ToolLoopAgent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;claude-haiku-4-5-20251001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;instructions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`You are a senior financial analyst specializing in SEC filings, market data, and economic research.

Your capabilities:
- Search and analyze SEC filings (10-K, 10-Q, 8-K, proxy statements)
- Look up financial data including stock prices, earnings, income statements
- Research economic indicators and macro data

When responding:
- Always cite the specific filing type and date
- Present financial figures clearly with proper formatting
- Highlight key risks, trends, and material changes
- Compare metrics across periods when relevant
- Be precise about numbers — never approximate when exact data is available`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;secSearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;secSearch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseLength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="na"&gt;financeSearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;financeSearch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseLength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="na"&gt;economicsSearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;economicsSearch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseLength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;financial-analyst.ts&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Scientist
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ToolLoopAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;anthropic&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@ai-sdk/anthropic&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;bioSearch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;paperSearch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@valyu/ai-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;medicalResearcherAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ToolLoopAgent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;claude-haiku-4-5-20251001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;instructions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`You are a medical and life sciences research specialist with expertise in clinical trials, drug discovery, and biomedical literature.

Your capabilities:
- Search clinical trial databases for trial status, results, and endpoints
- Look up FDA drug labels, approvals, and safety information
- Research biomedical literature from PubMed, bioRxiv, and medRxiv
- Analyze academic papers on drugs, therapies, and medical devices

When responding:
- Always cite trial IDs (NCT numbers), DOIs, or publication references
- Clearly distinguish between preliminary and peer-reviewed findings
- Note the phase of clinical trials and their primary endpoints
- Flag any safety concerns or adverse events mentioned in the data
- Use proper medical terminology but explain it when needed`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;bioSearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;bioSearch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseLength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="na"&gt;paperSearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;paperSearch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseLength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;scientist.ts&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Journalist
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ToolLoopAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;anthropic&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@ai-sdk/anthropic&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;webSearch&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@valyu/ai-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;journalistAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ToolLoopAgent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;claude-haiku-4-5-20251001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;instructions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`You are an investigative journalist and news analyst with access to real-time web sources.

Your capabilities:
- Search the web for breaking news and current events
- Find and cross-reference multiple news sources on a topic
- Track developing stories and provide timeline context
- Research background on people, organizations, and events

When responding:
- Always attribute information to specific sources
- Present multiple perspectives when covering controversial topics
- Distinguish between confirmed facts and unverified reports
- Provide publication dates so readers know how current the information is
- Summarize key points clearly, then provide supporting details`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;webSearch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;webSearch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;maxNumResults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;responseLength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;short&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;journalist.ts&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Three agents, three imports from &lt;code&gt;@valyu/ai-sdk&lt;/code&gt;, zero custom tool definitions.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Orchestrator
&lt;/h2&gt;

&lt;p&gt;The orchestrator handles query classification, parallel dispatch, and synthesis.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;ToolLoopAgent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;stepCountIs&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;anthropic&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@ai-sdk/anthropic&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;financialAnalystAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./financial-analyst&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;scientistAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./scientist&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;journalistAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./journalist&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;financialAnalystTool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Delegate to the Financial Analyst agent for SEC filings, stock data, earnings reports, economic indicators, and financial analysis.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The financial research task to complete&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;task&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;abortSignal&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;financialAnalystAgent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;task&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;abortSignal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;scientistTool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Delegate to the Scientist agent for clinical trials, drug information, FDA data, biomedical papers, and life sciences research.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The medical/life sciences research task to complete&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;task&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;abortSignal&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;scientistAgent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;task&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;abortSignal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;journalistTool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Delegate to the Journalist agent for real-time news, current events, breaking stories, and web-based research on any topic.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;The news/research task to complete&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;task&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;abortSignal&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;journalistAgent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;task&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nx"&gt;abortSignal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;orchestratorAgent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;ToolLoopAgent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;claude-haiku-4-5-20251001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="na"&gt;instructions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`You are a research orchestrator that routes queries to specialized agents.

You have three specialist agents available:
1. **Financial Analyst** — SEC filings, stock data, earnings, financial statements, economic data
2. **Scientist** — Clinical trials, drug discovery, FDA data, biomedical papers
3. **Journalist** — Real-time news, current events, web research

Your job:
- Analyze the user's query and delegate to the right specialist(s)
- For questions that span multiple domains, call multiple agents
- Synthesize results from multiple agents into a coherent response
- If a query doesn't fit any specialist, answer it yourself
- Always be clear about which sources informed your response`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;financialAnalyst&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;financialAnalystTool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;scientist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;scientistTool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;journalist&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;journalistTool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;stopWhen&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;stepCountIs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The orchestrator agent acts as a smart router. It receives the user's query, analyzes what domains it touches, and delegates work to the right specialist(s). &lt;/p&gt;

&lt;p&gt;It doesn't do the research itself. Instead, it calls one or more sub-agents as tools: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Financial Analyst for SEC/market data, &lt;/li&gt;
&lt;li&gt;Scientist for clinical trials and biomedical literature,&lt;/li&gt;
&lt;li&gt;Journalist for real-time news. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For cross-domain questions like "How does Eli Lilly's GLP-1 pipeline affect their stock outlook?", it calls multiple specialists in sequence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sub-Agents&lt;/strong&gt; as &lt;strong&gt;Tools&lt;/strong&gt;. Each specialist is a &lt;strong&gt;ToolLoopAgent&lt;/strong&gt; wrapped in a tool() call, which makes it callable by the orchestrator just like any other function. &lt;/p&gt;

&lt;p&gt;When invoked, the sub-agent runs its own independent loop, calling Valyu search tools (like &lt;strong&gt;secSearch&lt;/strong&gt; or &lt;strong&gt;bioSearch&lt;/strong&gt;), reading the results, and synthesizing a response. &lt;/p&gt;

&lt;p&gt;The sub-agent's final text is returned to the orchestrator as the tool's output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loop Control&lt;/strong&gt;. The &lt;strong&gt;stopWhen: stepCountIs(10)&lt;/strong&gt; on the orchestrator caps it at 10 loop iterations to prevent runaway execution. The sub-agents use the default limit of 20 steps. Within those bounds, each agent is free to make multiple tool calls. For example, the Financial Analyst might search SEC filings first, then cross-reference with earnings data, all within a single invocation before returning its findings.&lt;/p&gt;




&lt;h2&gt;
  
  
  The API Route
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// app/api/chat/route.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createAgentUIStreamResponse&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;orchestratorAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@/agents/orchestrator&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;POST&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;createAgentUIStreamResponse&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;orchestratorAgent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;uiMessages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;For the sake of keeping this post short, here’s the repo: &lt;a href="https://github.com/unicodeveloper/multi-agent-research-sys" rel="noopener noreferrer"&gt;multi-agent-research-sys&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You’ll find all the UI pages there. Clone the project and run it locally to explore the full setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pnpm dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;User entered query&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxw53ymd9gjb5rmu1nns7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxw53ymd9gjb5rmu1nns7.png" alt="User enters query..." width="800" height="520"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Result shows up&lt;/em&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqd4ip40uzrgpmtckqgnc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqd4ip40uzrgpmtckqgnc.png" alt="This result shows up" width="800" height="453"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fomtg4lzqgzfhd5re3alo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fomtg4lzqgzfhd5re3alo.gif" alt="Result" width="200" height="120"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What &lt;code&gt;@valyu/ai-sdk&lt;/code&gt; Provides
&lt;/h2&gt;

&lt;p&gt;The package ships ten tools that cover the major research verticals:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Data Sources&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;secSearch()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;SEC 10-K, 10-Q, 8-K filings, EDGAR full-text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;financeSearch()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Stocks, earnings, balance sheets, insider trades, dividends&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;economicsSearch()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;FRED, BLS, World Bank, US government spending&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bioSearch()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;ClinicalTrials.gov, DrugBank, ChEMBL, FDA labels, Open Targets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;paperSearch()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;PubMed, arXiv, bioRxiv, medRxiv, academic publishers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;webSearch()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Real-time web, news, general content&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;patentSearch()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;USPTO, global patent databases&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;companyResearch()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Comprehensive company intelligence&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;datasources()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List available data sources&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;datasourcesCategories()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;List available categories&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each tool accepts optional configuration: &lt;code&gt;maxNumResults&lt;/code&gt;, &lt;code&gt;relevanceThreshold&lt;/code&gt;, &lt;code&gt;includedSources&lt;/code&gt; for source-level filtering. All read &lt;code&gt;VALYU_API_KEY&lt;/code&gt; from the environment by default.&lt;/p&gt;

&lt;p&gt;The difference from web only search matters most for the financial and biomedical agents. &lt;/p&gt;

&lt;p&gt;A web search for "Eli Lilly 10-K 2024 risk factors" returns SEO articles about the filing. &lt;code&gt;secSearch()&lt;/code&gt; returns the actual filing text. &lt;br&gt;
A web search for "tirzepatide Phase 3 results" returns health news coverage. &lt;code&gt;bioSearch()&lt;/code&gt; returns the ClinicalTrials.gov entries and DrugBank compound data. &lt;br&gt;
That's primary source access vs secondary commentary. A meaningful difference for research quality.&lt;/p&gt;




&lt;h2&gt;
  
  
  Extending the System
&lt;/h2&gt;

&lt;p&gt;Adding a fourth specialist (patents, legal, government) requires:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One agent file importing the relevant &lt;code&gt;@valyu/ai-sdk&lt;/code&gt; tools&lt;/li&gt;
&lt;li&gt;Adding the new agent to the orchestrator&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ten specialists in parallel takes the same wall-clock time as three.&lt;/p&gt;




&lt;p&gt;The full code is on &lt;a href="https://github.com/unicodeveloper/multi-agent-research-sys" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;. Clone, run and explore!&lt;/p&gt;

&lt;p&gt;Get a Valyu API key at &lt;a href="https://platform.valyu.ai" rel="noopener noreferrer"&gt;platform.valyu.ai&lt;/a&gt;. $10 free credit, no credit card required.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>aisdk</category>
      <category>valyu</category>
    </item>
    <item>
      <title>Perplexity Sonar Alternatives for Developers (2026)</title>
      <dc:creator>Prosper Otemuyiwa</dc:creator>
      <pubDate>Tue, 10 Mar 2026 12:13:15 +0000</pubDate>
      <link>https://dev.to/valyuai/perplexity-sonar-alternatives-for-developers-2026-8j3</link>
      <guid>https://dev.to/valyuai/perplexity-sonar-alternatives-for-developers-2026-8j3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Quick Answer:&lt;/strong&gt; The best alternatives to Perplexity Sonar for developers are Valyu (for specialised data access + web search + benchmark-leading accuracy), Linkup (for simple web search with predictable pricing), and Tavily (for LangChain/LlamaIndex-integrated RAG). &lt;/p&gt;

&lt;p&gt;For Sonar Deep Research specifically, Valyu's &lt;a href="https://docs.valyu.ai/guides/deepresearch" rel="noopener noreferrer"&gt;DeepResearch API&lt;/a&gt; is the only alternative that matches multi-step research with citations while also accessing full-text SEC filings, PubMed, and academic sources that Sonar cannot reach.&lt;/p&gt;

&lt;p&gt;I've been building search-grounded AI apps long enough to have a mental list of the API switches that felt obvious in hindsight. Switching off Perplexity Sonar is near the top.&lt;/p&gt;

&lt;p&gt;The Sonar API is a capable product. I'm not here to trash it. But if you've been running a production app on Sonar and you've hit the reliability ceiling, the throttling wall, or the "this thing only knows about public web pages" limit, you're not alone, and there are real alternatives now.&lt;/p&gt;

&lt;p&gt;This article covers what Perplexity Sonar actually is (the full product family, not just the consumer chatbot), the documented reasons developers switch, and the concrete alternatives for each use case, including a dedicated section on Sonar Deep Research specifically.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Perplexity Sonar Actually Is
&lt;/h2&gt;

&lt;p&gt;First: Sonar is Perplexity's API product, not the consumer app. &lt;/p&gt;

&lt;p&gt;"Perplexity" and "Sonar" are distinct things. Searching for Perplexity alternatives usually returns lists of consumer chatbots (ChatGPT, Claude, etc.). That's the wrong category if you're building as a developer.&lt;/p&gt;

&lt;p&gt;The Sonar API family has five models:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Primary Use&lt;/th&gt;
&lt;th&gt;Pricing&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;sonar&lt;/td&gt;
&lt;td&gt;Lightweight Q&amp;amp;A, high-volume&lt;/td&gt;
&lt;td&gt;$5/1,000 requests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sonar-pro&lt;/td&gt;
&lt;td&gt;Deeper content understanding&lt;/td&gt;
&lt;td&gt;$8/1,000 requests + tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sonar-reasoning-pro&lt;/td&gt;
&lt;td&gt;Enhanced multi-step reasoning&lt;/td&gt;
&lt;td&gt;$2/M input, $8/M output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;sonar-deep-research&lt;/td&gt;
&lt;td&gt;Exhaustive multi-step research reports&lt;/td&gt;
&lt;td&gt;$2/M input, $8/M output + $5/1,000 searches + $3/M reasoning tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;sonar-deep-research&lt;/strong&gt; runs autonomous multi-step research, searches the web multiple times, reasons over what it finds, produces a comprehensive report. Available via Perplexity API and OpenRouter.&lt;/p&gt;

&lt;p&gt;The pricing for Deep Research compounds fast. A request that triggers 30 searches costs $0.15 in search fees alone, before tokens.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Developers Are Switching
&lt;/h2&gt;

&lt;p&gt;These are documented complaints from &lt;a href="https://www.reddit.com/r/perplexity_ai/" rel="noopener noreferrer"&gt;/r/perplexity_ai&lt;/a&gt;, &lt;a href="https://www.reddit.com/r/AI_Agents" rel="noopener noreferrer"&gt;/r/AI_Agents&lt;/a&gt;, and developer comparisons, not personal opinions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reliability.&lt;/strong&gt; One developer documented 20+ daily API outages with the Perplexity status page showing green the entire time. For a production app, that's not workable. The common workaround is building fallback logic, which defeats the point of paying for a managed API.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intentional throttling.&lt;/strong&gt; Linkup documented this in their own comparison: Sonar's API accuracy appears deliberately capped to avoid creating a competitive consumer product. Perplexity's primary business is a consumer chatbot. The API is secondary. The engineering priorities show.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The architecture problem.&lt;/strong&gt; Sonar uses a &lt;code&gt;/chat/completions&lt;/code&gt; endpoint, the same pattern as LLM chat APIs. Every API call forces a full text generation. If you only want source URLs for a RAG pipeline, you still pay for a generated answer. For developers who want to control the generation step themselves (use Claude or GPT-4 for generation, use search just for retrieval), this creates a wasteful and expensive architecture. &lt;/p&gt;

&lt;p&gt;Linkup measured this...The unpredictability in output token length (ranging from 4 to 340,000 tokens) makes cost-per-query essentially impossible to forecast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Web-only.&lt;/strong&gt; This is the hard ceiling. Sonar searches the public web. That's it. No SEC filings, no PubMed, no academic journals, no ChEMBL compound databases, no FRED economic data. If you're building financial analysis tools, biomedical research assistants, or anything that requires authoritative data that lives behind institutional barriers, Sonar hits a wall.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The $5 Pro plan trap.&lt;/strong&gt; Many developers sign up for Perplexity Pro at $20/month expecting meaningful API access. The Pro plan includes $5/month in API credits. That's roughly 1,000 standard queries at low search depth. A heavy testing session can burn through it in hours.&lt;/p&gt;




&lt;h2&gt;
  
  
  Alternatives for Standard Sonar Use Cases
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Valyu DeepSearch API
&lt;/h3&gt;

&lt;p&gt;The most differentiated option in this category, specifically because it goes beyond web search.&lt;/p&gt;

&lt;p&gt;Valyu's &lt;a href="https://docs.valyu.ai/guides/deepresearch" rel="noopener noreferrer"&gt;DeepSearch API&lt;/a&gt; gives you a single endpoint that searches the public web AND 36+ specialised data sources; SEC 10-K, 10-Q, 13F, 13D, 13G filings with full-text search, PubMed and bioRxiv research papers, ChEMBL bioactive compounds, academic journals, FRED and BLS economic data, clinical trials, patent databases.&lt;/p&gt;

&lt;p&gt;For developers building anything that needs financial data, biomedical research, academic content, or economic indicators, this is the alternative that actually solves the problem. Sonar doesn't provide reliable data in many of these areas.&lt;/p&gt;

&lt;p&gt;On raw web search accuracy, Valyu benchmarks at 79% on FreshQA (600 time-sensitive queries) versus Sonar's architecture which relies on Perplexity's indexed web. &lt;/p&gt;

&lt;p&gt;On finance-specific questions, Valyu scores 73% vs Google's 55%.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Valyu&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your-api-key&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Search web + SEC filings + economic data in one call
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What risk factors did Apple disclose in their most recent 10-K?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;search_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;all&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;# web + proprietary
&lt;/span&gt;    &lt;span class="n"&gt;max_num_results&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;a href="https://docs.valyu.ai/integrations/mcp-server#remote-mcp" rel="noopener noreferrer"&gt;MCP server integration&lt;/a&gt; means it drops into Claude Desktop, Cursor, and other MCP-compatible tools with zero additional code. &lt;a href="https://docs.valyu.ai/integrations/vercel-ai-sdk#vercel-ai-sdk" rel="noopener noreferrer"&gt;Native Vercel AI SDK&lt;/a&gt; and &lt;a href="https://docs.valyu.ai/integrations/langchain#langchain-integration" rel="noopener noreferrer"&gt;LangChain&lt;/a&gt; integrations exist.&lt;/p&gt;

&lt;p&gt;Platform: &lt;a href="https://platform.valyu.ai" rel="noopener noreferrer"&gt;platform.valyu.ai&lt;/a&gt; | Docs: &lt;a href="https://docs.valyu.ai/home" rel="noopener noreferrer"&gt;docs.valyu.ai&lt;/a&gt; | Free $10 credit on signup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;: Developers who need specialised data (financial, biomedical, academic, economic) or who want benchmark-leading accuracy on time-sensitive and domain-specific queries.&lt;/p&gt;

&lt;h3&gt;
  
  
  Linkup
&lt;/h3&gt;

&lt;p&gt;Linkup's pitch is architectural clarity. They expose a dedicated &lt;code&gt;/search&lt;/code&gt; endpoint with an &lt;code&gt;outputType&lt;/code&gt; parameter, you specify whether you want &lt;code&gt;search_results&lt;/code&gt; (clean JSON of sources), &lt;code&gt;answer&lt;/code&gt; (generated text), or &lt;code&gt;structured&lt;/code&gt; (custom JSON schema). This is fundamentally different from Sonar's chat completion approach.&lt;/p&gt;

&lt;p&gt;Pricing is transparent and flat: standard search at €5/1,000 queries, deep search at €50/1,000 queries. No token variability. On SimpleQA benchmarks, Linkup hit 91% vs Sonar's 77.3%.&lt;/p&gt;

&lt;p&gt;The one limitation: Linkup is web-only. No specialised data access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;: Developers who want predictable pricing and architectural control over the search/generation split.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tavily
&lt;/h3&gt;

&lt;p&gt;They are one of the most commonly used search APIs in the LangChain/LlamaIndex ecosystem. Tavily's biggest advantage is installation friction: if you're building a LangChain agent, Tavily is a one-liner. The free tier (1,000 credits/month) is generous enough for development.&lt;/p&gt;

&lt;p&gt;Performance is solid. Pricing: $0.008/credit pay-as-you-go, Monthly plans start around $30/month for ~4,000 credits.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for&lt;/strong&gt;: RAG pipelines built on LangChain or LlamaIndex where developer experience and quick integration matter more than maximum accuracy.&lt;/p&gt;




&lt;h2&gt;
  
  
  Alternatives for Sonar Deep Research Specifically
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;sonar-deep-research&lt;/strong&gt; occupies a specific niche: multi-step autonomous research that produces comprehensive reports, not just answers. The use case is different from standard search. You're asking it to do what a human researcher would do over an hour, not just answer a question.&lt;/p&gt;

&lt;p&gt;The key question is what you actually need from a deep research API:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Multi-step search execution (runs multiple queries, synthesizes results)&lt;/li&gt;
&lt;li&gt;Citations and source references in the output&lt;/li&gt;
&lt;li&gt;Access to authoritative data sources, not just indexed web pages&lt;/li&gt;
&lt;li&gt;Structured output or webhook support for long-running tasks&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;On criteria 1, 2, and 3, &lt;strong&gt;Valyu's DeepResearch API&lt;/strong&gt; is the only alternative that matches &lt;strong&gt;sonar-deep-research&lt;/strong&gt; functionally while expanding what it can do.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Valyu DeepResearch - multi-step autonomous research
# with access to SEC filings, PubMed, academic journals
&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;valyu&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Valyu&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Valyu&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;api_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;YOUR_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Create an async DeepResearch task
&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Analyze the financial health of Tesla based on recent SEC filings and analyst sentiment&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;standard&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# also supports: "fast", "heavy", "max"
&lt;/span&gt;    &lt;span class="n"&gt;output_formats&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;markdown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;search_type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;proprietary&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;included_sources&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;finance&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;academic&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;success&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Task created: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="c1"&gt;# Wait for completion with progress updates
&lt;/span&gt;    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wait&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deepresearch_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;on_progress&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Status: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;completed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# markdown report
&lt;/span&gt;        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sources&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# cited sources with URLs
&lt;/span&gt;        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cost&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# fixed task cost
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The difference that matters for serious use cases: when Sonar Deep Research researches "clinical trial outcomes for GLP-1 receptor agonists," it's searching whatever's publicly indexed on the web. When Valyu DeepResearch does the same query, it's searching PubMed, ClinicalTrials.gov, FDA drug labels, ChEMBL, and Open Target where the actual source databases where this research lives.&lt;/p&gt;

&lt;p&gt;For financial research: Valyu reads the actual 10-K filings, earnings transcripts, and insider trading data. Sonar reads articles about those filings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing comparison for deep research:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Product&lt;/th&gt;
&lt;th&gt;Per Request Cost&lt;/th&gt;
&lt;th&gt;Data Sources&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Sonar Deep Research&lt;/td&gt;
&lt;td&gt;$2/M input + $8/M output + $5/1,000 searches + $3/M reasoning tokens&lt;/td&gt;
&lt;td&gt;Public web only&lt;/td&gt;
&lt;td&gt;Markdown report&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Valyu DeepResearch (fast)&lt;/td&gt;
&lt;td&gt;$0.10&lt;/td&gt;
&lt;td&gt;Web + 36+ specialised sources&lt;/td&gt;
&lt;td&gt;Markdown, PDF, JSON&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Valyu DeepResearch (standard)&lt;/td&gt;
&lt;td&gt;~$1-3&lt;/td&gt;
&lt;td&gt;Web + 36+ specialised sources&lt;/td&gt;
&lt;td&gt;Markdown, PDF, JSON&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Valyu DeepResearch (max)&lt;/td&gt;
&lt;td&gt;$15.00&lt;/td&gt;
&lt;td&gt;Web + 36+ specialised sources&lt;/td&gt;
&lt;td&gt;Markdown, PDF, JSON, Excel&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Valyu also supports &lt;a href="https://docs.valyu.ai/guides/deepresearch#webhooks" rel="noopener noreferrer"&gt;webhooks&lt;/a&gt; (for async long-running tasks), file analysis, and follow-up instructions, features the Sonar Deep Research endpoint doesn't offer.&lt;/p&gt;




&lt;h2&gt;
  
  
  Head-to-Head Comparison Table
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Perplexity Sonar&lt;/th&gt;
&lt;th&gt;Valyu DeepSearch&lt;/th&gt;
&lt;th&gt;Linkup&lt;/th&gt;
&lt;th&gt;Tavily&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Web search&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Proprietary data&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;36+ sources&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;FreshQA accuracy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;79%&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SimpleQA accuracy&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;77–86%&lt;/td&gt;
&lt;td&gt;94%&lt;/td&gt;
&lt;td&gt;91%&lt;/td&gt;
&lt;td&gt;Not published&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dedicated search endpoint&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No (/chat only)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MCP integration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LangChain integration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Limited&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes (native)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Webhooks&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Yes (DeepResearch)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Predictable pricing&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No (token-variable)&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Deep research mode&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Yes (sonar-deep-research)&lt;/td&gt;
&lt;td&gt;Yes (DeepResearch API)&lt;/td&gt;
&lt;td&gt;Yes (deep search)&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Entry price (web search)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;$5/1,000 requests&lt;/td&gt;
&lt;td&gt;Free $10 credit&lt;/td&gt;
&lt;td&gt;€5/1,000 queries&lt;/td&gt;
&lt;td&gt;Free 1k credits/mo&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Which Alternative for Which Use Case
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Building a RAG pipeline on LangChain/LlamaIndex?&lt;/strong&gt;&lt;br&gt;
Start with Tavily. It's the path of least resistance and performs well. If you hit accuracy issues or need data beyond the public web, move to Valyu.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building anything that touches financial data?&lt;/strong&gt;&lt;br&gt;
Valyu. SEC filings, earnings data, stock prices, FRED economic data, balance sheets, insider trading, all in one API call. No other search API comes close for this use case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Building biomedical or clinical research tools?&lt;/strong&gt;&lt;br&gt;
Valyu. PubMed, bioRxiv, ClinicalTrials.gov, ChEMBL, DrugBank, Open Targets, FDA drug labels. The &lt;a href="https://bio.valyu.ai" rel="noopener noreferrer"&gt;Bio app&lt;/a&gt; (310 GitHub stars) is a live demo of what's possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Need multi-step autonomous research (replacing sonar-deep-research)?&lt;/strong&gt;&lt;br&gt;
Valyu DeepResearch API. It's the only deep research API that combines multi-step synthesis with access to authoritative specialised databases, plus structured output formats and webhook support.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pure web search with transparent pricing, no specialised data needed?&lt;/strong&gt;&lt;br&gt;
Linkup for pricing predictability.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Note on What Sonar Does Well
&lt;/h2&gt;

&lt;p&gt;Sonar has strong developer documentation, an OpenAI-compatible API format that makes migration easy, and solid performance for general web Q&amp;amp;A tasks. The &lt;code&gt;sonar-reasoning-pro&lt;/code&gt; model is genuinely useful for chain-of-thought web-grounded reasoning.&lt;/p&gt;

&lt;p&gt;The limitations documented here are real, but they're architectural constraints that come from being a secondary product of a consumer AI company, most likely not signs of bad engineering. If your use case is pure web Q&amp;amp;A at scale and you're happy with the public web as your data universe, Sonar is a viable choice.&lt;/p&gt;

&lt;p&gt;The alternatives above exist for when those constraints become blockers.&lt;/p&gt;




&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is the best alternative to Perplexity Sonar API?&lt;/strong&gt;&lt;br&gt;
Valyu DeepSearch for developers who need specialised data access (finance, biomedical, academic) or benchmark-leading accuracy. Linkup for predictable pricing and architectural control. Tavily for the fastest LangChain/LlamaIndex integration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the best alternative to Perplexity Sonar Deep Research?&lt;/strong&gt;&lt;br&gt;
Valyu's DeepResearch API is the only alternative that matches sonar-deep-research on multi-step research synthesis while also accessing SEC filings, PubMed, academic journals, and clinical trial data that Sonar cannot reach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is Perplexity Sonar web-only?&lt;/strong&gt;&lt;br&gt;
Yes. All Sonar models (Sonar, Sonar Pro, Sonar Reasoning, Sonar Reasoning Pro, Sonar Deep Research) search only the public web and Perplexity's index. They have no access to SEC filings, academic databases, clinical trials, or other specialised data sources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is Sonar API unreliable?&lt;/strong&gt;&lt;br&gt;
Perplexity's primary product is a consumer chatbot. The API is a secondary product. Developer forums document 20+ daily outages with no reflection on the official status page. The API capacity and reliability engineering reflects these priorities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Perplexity Sonar have an MCP integration?&lt;/strong&gt;&lt;br&gt;
Yes. Sonar offers a Model Context Protocol server. Valyu also does. It can be added to Claude Desktop, Cursor, and other MCP-compatible environments with one command: &lt;strong&gt;npx skills add valyuAI/skills&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does sonar-deep-research pricing work?&lt;/strong&gt;&lt;br&gt;
Sonar Deep Research charges $2/million input tokens, $8/million output tokens, $5 per 1,000 searches (a single request might trigger 30 searches = $0.15 in search fees alone), and $3/million reasoning tokens. The total cost per request is hard to predict and can range significantly based on query complexity.&lt;/p&gt;

</description>
      <category>sonar</category>
      <category>sonardeepresearchalternatives</category>
      <category>deepresearch</category>
      <category>perplexity</category>
    </item>
  </channel>
</rss>
