<?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: Shanthosh</title>
    <description>The latest articles on DEV Community by Shanthosh (@msalways).</description>
    <link>https://dev.to/msalways</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3812997%2Fa38d89b9-7863-4adf-aeef-8e402f854c4e.jpeg</url>
      <title>DEV Community: Shanthosh</title>
      <link>https://dev.to/msalways</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/msalways"/>
    <language>en</language>
    <item>
      <title>💊 The Dashboard Simulation is Lying to You: Why I Built Redpillx</title>
      <dc:creator>Shanthosh</dc:creator>
      <pubDate>Sun, 08 Mar 2026 15:02:39 +0000</pubDate>
      <link>https://dev.to/msalways/the-dashboard-simulation-is-lying-to-you-why-i-built-redpillx-12m3</link>
      <guid>https://dev.to/msalways/the-dashboard-simulation-is-lying-to-you-why-i-built-redpillx-12m3</guid>
      <description>&lt;p&gt;You take the &lt;strong&gt;Blue Pill&lt;/strong&gt;, the story ends. You go back to writing&lt;br&gt;
&lt;strong&gt;400‑line &lt;code&gt;if/else&lt;/code&gt; blocks&lt;/strong&gt; to handle every single JSON schema from&lt;br&gt;
Stripe, Shopify, and GitHub. You keep paying OpenAI &lt;strong&gt;$0.50 every&lt;br&gt;
time&lt;/strong&gt; a user wants to see a bar chart of their own data. You stay in&lt;br&gt;
the &lt;strong&gt;"Context Window" prison&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You take the &lt;strong&gt;Red Pill&lt;/strong&gt;, you stay in Wonderland, and I show you &lt;strong&gt;how&lt;br&gt;
Deep the data profiling goes&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Problem: The "Generic Function" Trap
&lt;/h2&gt;

&lt;p&gt;Every service---Stripe, GitHub, Jira, or your own internal&lt;br&gt;
database---exposes data differently. As a developer, you usually face&lt;br&gt;
two painful choices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Choice A:&lt;/strong&gt; Write a custom parser for every single API provider.
&lt;em&gt;(Goodbye, weekend.)&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Choice B:&lt;/strong&gt; Dump a 5MB JSON payload into an LLM and watch your API
bill explode while the model hallucinates math that doesn't exist.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What I wanted was &lt;strong&gt;Choice C&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A plug‑and‑play SDK where the &lt;strong&gt;LLM acts as the Architect&lt;/strong&gt;, but a&lt;br&gt;
high‑performance engine (like Polars) acts as the &lt;strong&gt;Contractor&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  The Redpill Philosophy: Profile, Don't Dump
&lt;/h2&gt;

&lt;p&gt;Most AI tools fail because they try to be &lt;strong&gt;too smart&lt;/strong&gt;. They scan&lt;br&gt;
everything, which is slow and expensive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Redpillx&lt;/strong&gt; takes a different approach.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;local Data Profiler&lt;/strong&gt; inspects a &lt;strong&gt;small sample (default: 100&lt;br&gt;
rows)&lt;/strong&gt; of your data first.&lt;/p&gt;
&lt;h3&gt;
  
  
  Benefits
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Context Window Freedom&lt;/strong&gt;&lt;br&gt;
We only send the &lt;strong&gt;shape (schema)&lt;/strong&gt; of your data to the LLM.&lt;br&gt;
Whether you have &lt;strong&gt;10 rows or 1 million rows&lt;/strong&gt;, the token cost stays&lt;br&gt;
the same.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deterministic Math&lt;/strong&gt;&lt;br&gt;
The LLM generates a &lt;strong&gt;ChartSpec&lt;/strong&gt; (the instructions).&lt;br&gt;
The actual calculation happens &lt;strong&gt;locally&lt;/strong&gt; using &lt;strong&gt;Polars (Python)&lt;/strong&gt;&lt;br&gt;
or our optimized &lt;strong&gt;JavaScript execution engine&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;
  
  
  🛠️ Tutorial: Building Your First Dynamic Chart
&lt;/h1&gt;

&lt;p&gt;Let's see how easy it is to &lt;strong&gt;exit the simulation.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Installation
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# For the JS/TS fans&lt;/span&gt;
npm &lt;span class="nb"&gt;install &lt;/span&gt;redpillx

&lt;span class="c"&gt;# For the Python / Data Science crew&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;redpillx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. The "Bring Your Own LLM" Setup
&lt;/h2&gt;

&lt;p&gt;Redpillx doesn't lock you into any specific provider.&lt;/p&gt;

&lt;p&gt;You bring the &lt;strong&gt;brain (LLM)&lt;/strong&gt;.&lt;br&gt;
Redpillx provides the &lt;strong&gt;muscle (execution engine)&lt;/strong&gt;.&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;Redpill&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;redpillx&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="nx"&gt;OpenAI&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;openai&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;openai&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;OpenAI&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;apiKey&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;OPENAI_API_KEY&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;rp&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;Redpill&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setLlm&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;messages&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;res&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;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&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;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-4o-mini&lt;/span&gt;&lt;span class="dl"&gt;"&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="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;choices&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="nx"&gt;message&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;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. Generate &amp;amp; Execute
&lt;/h2&gt;

&lt;p&gt;Point Redpillx at &lt;strong&gt;any JSON data&lt;/strong&gt; and ask a question in &lt;strong&gt;plain&lt;br&gt;
English&lt;/strong&gt;.&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;myData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;tickets&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="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;open&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;priority&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="c1"&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;// 1. The Architect creates the plan (Chart Spec)&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;spec&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;rp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generateSpec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;myData&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Show me ticket count by status&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// 2. The Executor performs the calculation locally&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="nx"&gt;rp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;myData&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;result&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="cm"&gt;/*
Output:
[
  { x: "open", y: 42, labelX: "Status", labelY: "Count" }
]
*/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧬 Why This Works
&lt;/h2&gt;

&lt;p&gt;Because the Spec is separate from the Data, it becomes reusable.&lt;/p&gt;

&lt;p&gt;If your data updates every minute, you &lt;strong&gt;don't need to call the LLM&lt;br&gt;
again&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Just run:&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="nx"&gt;rp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;spec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;newData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you're done.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  ⚡ &lt;strong&gt;Sub‑millisecond execution&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  🧠 &lt;strong&gt;LLM used only once&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  💰 &lt;strong&gt;Zero extra tokens&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🤝 Credits &amp;amp; Inspiration
&lt;/h2&gt;

&lt;p&gt;This project stands on the shoulders of giants:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PyGWalker&lt;/strong&gt;&lt;br&gt;
A massive inspiration for how interactive data exploration should be&lt;br&gt;
feel.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;OpenCode&lt;/strong&gt;&lt;br&gt;
For supporting the spirit of open‑source collaboration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;OpenRouter&lt;/strong&gt;&lt;br&gt;
For making it easy to test the SDK against dozens of models (Llama,&lt;br&gt;
Claude (GPT) with a single API.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📦 Get Started
&lt;/h2&gt;

&lt;p&gt;The project is &lt;strong&gt;fully open‑source&lt;/strong&gt; and ready for contributions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;JavaScript SDK&lt;/strong&gt;&lt;br&gt;
GitHub -- &lt;a href="https://github.com/Msalways/red-pill-js" rel="noopener noreferrer"&gt;red-pill-js&lt;/a&gt; | &lt;a href="https://www.npmjs.com/package/redpillx" rel="noopener noreferrer"&gt;NPM&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Python SDK&lt;/strong&gt;&lt;br&gt;
GitHub -- &lt;a href="https://github.com/Msalways/red-pill-py" rel="noopener noreferrer"&gt;red-pill-py&lt;/a&gt; | &lt;a href="https://pypi.org/project/redpillx/" rel="noopener noreferrer"&gt;PyPI&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Question
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Which pill will you take?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let me know in the comments how you're dealing with the &lt;strong&gt;" Dashboard&lt;br&gt;
Tax"&lt;/strong&gt; in your apps 👇&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>powerplatform</category>
    </item>
  </channel>
</rss>
