<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>whysooraj&#x27;s Portfolio - jev</title>
    <subtitle>Portfolio showcasing projects and research.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://blog.sooraj.fun/tags/jev/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://blog.sooraj.fun/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-10-04T00:00:00+00:00</updated>
    <id>https://blog.sooraj.fun/tags/jev/atom.xml</id>
    <entry xml:lang="en">
        <title>Why I&#x27;m Ditching LLMs for System 1 Decision Engines (Jev, Laya &amp; Building an Instant File Organizer)</title>
        <published>2026-10-04T00:00:00+00:00</published>
        <updated>2026-10-04T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://blog.sooraj.fun/blog/why-im-ditching-llm-classifiers-for-laya/"/>
        <id>https://blog.sooraj.fun/blog/why-im-ditching-llm-classifiers-for-laya/</id>
        
        <content type="html" xml:base="https://blog.sooraj.fun/blog/why-im-ditching-llm-classifiers-for-laya/">&lt;p&gt;&lt;strong&gt;TL;DR:&lt;&#x2F;strong&gt; LLMs are great at writing essays, but using a 7B+ token-generating LLM to decide whether a file is an invoice or a resume is slow, expensive, and prone to hallucinations. I&#x27;ve been exploring non-autoregressive &quot;System 1&quot; decision engines like &lt;strong&gt;TypeSafe Jev&lt;&#x2F;strong&gt; and &lt;strong&gt;Laya&lt;&#x2F;strong&gt;, and built a sub-35ms local file organizer called &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;whysooraj&#x2F;laya-file-organizer&quot;&gt;laya-file-organizer&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;the-flaw-in-llm-based-routing-classification&quot;&gt;The Flaw in LLM-Based Routing &amp;amp; Classification&lt;&#x2F;h2&gt;
&lt;p&gt;If you&#x27;ve built AI workflows or agent swarms recently, you&#x27;ve probably hit this wall:&lt;&#x2F;p&gt;
&lt;p&gt;To classify a ticket, route an agent call, or decide what folder a file belongs in, you end up making an API request to GPT-4o-mini or Ollama. You write a complex system prompt, define a Pydantic schema, and wait 500ms to 2 seconds while the model generates tokens letter-by-letter just to output &lt;code&gt;{&quot;category&quot;: &quot;billing&quot;}&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;It feels absurd:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Latency Overhead&lt;&#x2F;strong&gt;: You&#x27;re waiting hundreds of milliseconds for token generation when you just needed a categorical decision.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Cost &amp;amp; Rate Limits&lt;&#x2F;strong&gt;: Every trivial routing decision eats into token budgets.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Hallucination Risk&lt;&#x2F;strong&gt;: Text generation models can fail schema parsing or output unexpected text.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Human brains don&#x27;t work like this. When you look at an invoice, you don&#x27;t draft a 500-word essay in your head to decide it belongs in your &lt;em&gt;Expenses&lt;&#x2F;em&gt; folder — you recognize it instantly. That&#x27;s &lt;strong&gt;System 1 thinking&lt;&#x2F;strong&gt;.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;enter-jev-and-laya-non-autoregressive-decision-engines&quot;&gt;Enter Jev and Laya: Non-Autoregressive Decision Engines&lt;&#x2F;h2&gt;
&lt;p&gt;Recently, a new paradigm of decision models has emerged, pioneered by frameworks like &lt;strong&gt;TypeSafe Jev&lt;&#x2F;strong&gt; and &lt;strong&gt;Laya&lt;&#x2F;strong&gt; (built by &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;NandhaKishorM&#x2F;laya&quot;&gt;NandhaKishorM&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
&lt;p&gt;Instead of generating text, these models work in a &lt;strong&gt;single forward pass&lt;&#x2F;strong&gt; (~30ms on CPU or GPU). You pass text in, and get calibrated typed decisions back:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;choice&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt;: Categorical picks among discrete criteria (e.g. &lt;code&gt;financial&lt;&#x2F;code&gt;, &lt;code&gt;documents&lt;&#x2F;code&gt;, &lt;code&gt;code&lt;&#x2F;code&gt;).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;score&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt;: Ordinal ratings (e.g. urgency 1 to 5).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;noul&lt;&#x2F;code&gt;&lt;&#x2F;strong&gt;: Calibrated probability $P(\text{true})$ for yes&#x2F;no statements.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;jev-vs-laya&quot;&gt;Jev vs. Laya&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;TypeSafe Jev&lt;&#x2F;strong&gt;: Established the benchmark for typed decision protocols, introducing schema-constrained classification without text generation.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Laya&lt;&#x2F;strong&gt;: Takes this concept further with a &lt;strong&gt;multilingual router&lt;&#x2F;strong&gt;, supporting 100+ languages natively. Laya runs on optimized transformer backends (ModernBERT and mmBERT) trained with &lt;strong&gt;Reinforcement Learning against Strictly Proper Scoring Rules (RLCD)&lt;&#x2F;strong&gt;. It provides calibrated confidence scores and built-in abstention gates (&lt;code&gt;min_confidence&lt;&#x2F;code&gt;), so the model tells you when it&#x27;s genuinely unsure.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;what-i-built-laya-file-organizer&quot;&gt;What I Built: &lt;code&gt;laya-file-organizer&lt;&#x2F;code&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;To test Laya&#x27;s capabilities in a real-world scenario, I built &lt;strong&gt;&lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;whysooraj&#x2F;laya-file-organizer&quot;&gt;laya-file-organizer&lt;&#x2F;a&gt;&lt;&#x2F;strong&gt; — a local CLI utility that organizes messy directories (like &lt;code&gt;~&#x2F;Downloads&lt;&#x2F;code&gt;) into structured folders automatically.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;architecture&quot;&gt;Architecture&lt;&#x2F;h3&gt;
&lt;pre&gt;&lt;code&gt;File ──&amp;gt; Extract (Name, Extension, 1KB Sample) ──&amp;gt; Laya Router (1 Forward Pass ~33ms)
                                                             │
Files Moved &amp;lt;── Sorted Category &amp;amp; Junk Check &amp;lt;───────────────┘
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Context Sampler&lt;&#x2F;strong&gt;: Extracts the filename, file size, extension, and the first 1KB of text (for text, JSON, code, or CSV files).&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Laya Predictor&lt;&#x2F;strong&gt;: Passes the context through &lt;code&gt;laya.Router&lt;&#x2F;code&gt; to query two typed decisions simultaneously:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;category&lt;&#x2F;code&gt;: &lt;code&gt;Financial&lt;&#x2F;code&gt;, &lt;code&gt;Documents&lt;&#x2F;code&gt;, &lt;code&gt;Code_and_Logs&lt;&#x2F;code&gt;, &lt;code&gt;Media&lt;&#x2F;code&gt;, &lt;code&gt;Archives_and_Installers&lt;&#x2F;code&gt;, &lt;code&gt;Other&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;is_temporary_junk&lt;&#x2F;code&gt;: Yes&#x2F;No probability check.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Instant Execution&lt;&#x2F;strong&gt;: If junk probability &amp;gt; 70%, file moves to &lt;code&gt;Junk_Candidates&#x2F;&lt;&#x2F;code&gt;. If confidence &amp;lt; 50%, it moves safely to &lt;code&gt;Uncertain&#x2F;&lt;&#x2F;code&gt;. Otherwise, it routes directly to its target folder.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h3 id=&quot;performance-experience&quot;&gt;Performance &amp;amp; Experience&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Speed&lt;&#x2F;strong&gt;: Sorting 50 files takes ~1.5 seconds total on standard CPU.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Zero Cloud Leak&lt;&#x2F;strong&gt;: No API keys, no network calls after initial model load, 100% private.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Accuracy&lt;&#x2F;strong&gt;: Invoices with strings like &lt;code&gt;&quot;Invoice #402 due April 10&quot;&lt;&#x2F;code&gt; get classified as &lt;code&gt;Financial&lt;&#x2F;code&gt; with &lt;strong&gt;0.96 confidence&lt;&#x2F;strong&gt; instantly.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;hr &#x2F;&gt;
&lt;h2 id=&quot;what-s-next&quot;&gt;What&#x27;s Next?&lt;&#x2F;h2&gt;
&lt;p&gt;Replacing generative LLMs with dedicated decision engines like Laya for routing, triage, and filtering is one of the most practical AI speedups I&#x27;ve implemented.&lt;&#x2F;p&gt;
&lt;p&gt;Check out the code on GitHub:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;📦 &lt;strong&gt;Project&lt;&#x2F;strong&gt;: &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;whysooraj&#x2F;laya-file-organizer&quot;&gt;whysooraj&#x2F;laya-file-organizer&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;⚙️ &lt;strong&gt;Laya Engine&lt;&#x2F;strong&gt;: &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;NandhaKishorM&#x2F;laya&quot;&gt;NandhaKishorM&#x2F;laya&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
</feed>
