<?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: cv-by-jd.com</title>
    <description>The latest articles on DEV Community by cv-by-jd.com (@cv-by-jd).</description>
    <link>https://dev.to/cv-by-jd</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%2F4258440%2F6676622f-064b-45c2-bef2-77b6d800f439.png</url>
      <title>DEV Community: cv-by-jd.com</title>
      <link>https://dev.to/cv-by-jd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cv-by-jd"/>
    <language>en</language>
    <item>
      <title>How running out of API credits taught us to put every LLM call behind one gateway</title>
      <dc:creator>cv-by-jd.com</dc:creator>
      <pubDate>Tue, 24 Nov 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/cv-by-jd/our-prompt-cache-wasnt-getting-hits-on-openrouter-until-we-pinned-the-provider-3ka9</link>
      <guid>https://dev.to/cv-by-jd/our-prompt-cache-wasnt-getting-hits-on-openrouter-until-we-pinned-the-provider-3ka9</guid>
      <description>&lt;p&gt;This is a story about a failure that never showed up as an error. Our LLM credits ran out at one provider, nothing crashed, and users got stuck in a loop we didn't know about. Fixing it led us to route every model call through a single gateway, OpenRouter. Soon after that move we found a second silent failure: prompt caching wasn't working at all.&lt;/p&gt;

&lt;p&gt;If you call more than one LLM provider in production, or you rely on prompt caching to keep costs down, I hope this saves you from both mistakes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The situation
&lt;/h2&gt;

&lt;p&gt;I'm the founder of &lt;a href="https://cv-by-jd.com" rel="noopener noreferrer"&gt;CV by JD&lt;/a&gt;. People upload their resume, paste a job description, and we rewrite the resume for that job. Then a separate scoring step gives the new resume a match score from 0 to 100, with tips on what's still missing.&lt;/p&gt;

&lt;p&gt;Behind one "optimize" click there are several separate model calls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a chat model rewrites the resume&lt;/li&gt;
&lt;li&gt;a model pulls the requirements out of the job description&lt;/li&gt;
&lt;li&gt;a model writes tips specific to this resume&lt;/li&gt;
&lt;li&gt;a vision model reads text from uploaded images&lt;/li&gt;
&lt;li&gt;a fact-checking model checks each line of the rewrite against the original resume, so we never add something the person didn't say&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's how those calls reached the models before the change, and after it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Before                                   After
 ──────                                   ─────
 Our server ──▶ OpenAI                    Our server ──▶ OpenRouter ──▶ OpenAI
            ──▶ Google Vertex AI                                   ──▶ DeepSeek hosts
            ──▶ OpenRouter ──▶ others                              ──▶ Qwen hosts
 (a key, a bill and an error format       (one key, one bill, one error format)
  for each provider)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;em&gt;provider&lt;/em&gt; is a company that runs models and sells access to them, such as OpenAI. A &lt;em&gt;gateway&lt;/em&gt; like OpenRouter sits in front of many providers and gives you one API for all of them.&lt;/p&gt;

&lt;p&gt;For most of these calls we keep an ordered list of models, cheapest first. If the first model fails, the next one tries. I'll call that list the &lt;strong&gt;ladder&lt;/strong&gt; and each model on it a &lt;strong&gt;tier&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Model names in this post reflect our setup in November 2026. We change models often as we learn what works, so treat them as examples, not recommendations.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How we got here
&lt;/h2&gt;

&lt;p&gt;The setup grew one feature at a time. Each time we added a step, we picked whichever model looked best for it and added that provider's client library (SDK). After a few months, our server talked to OpenAI directly, to Google's Vertex AI directly, and to OpenRouter for a few tiers.&lt;/p&gt;

&lt;p&gt;Each provider came with its own API key, its own way of authenticating, its own billing page and its own error format. Most steps had backup models from other providers, so they could survive one provider failing. Two steps had no backup at all: pulling requirements out of the job description, and writing resume-specific tips. Both used a single OpenAI model, and together they produce the tips users see next to their score.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;One day our OpenAI credits ran out.&lt;/p&gt;

&lt;p&gt;The two single-model steps started failing. The code around them handled the failure the way it was written to: it fell back to generic tips. Those tips looked like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Improve your keywords.&lt;/strong&gt; [Fix this]&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The "Fix this" button sends the tip to the model that rewrote the resume and asks it to apply the change. But "Improve your keywords" doesn't name any specific missing requirement, so applying it changed nothing the score looks at. The score stayed flat, the same tip came back, and the user could click it again, and again.&lt;/p&gt;

&lt;p&gt;From the user's side, the product looked broken. From our side, everything looked fine. There were no 500s and no error pages, and no alert fired, because a billing failure at one provider wasn't wired to any alert. We found out from user feedback.&lt;/p&gt;

&lt;p&gt;The real problem was that billing failures were invisible. We had several providers, several dashboards and no alert.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we researched
&lt;/h2&gt;

&lt;p&gt;We went through every model call in the codebase and asked three questions of each one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Which provider does it use, and what happens if that provider fails?&lt;/strong&gt; Most calls could fall back to another provider. A couple couldn't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How would we find out about a failure?&lt;/strong&gt; For a billing failure, we mostly wouldn't. Each provider reported it in its own format, on its own dashboard.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What else do we need from the provider layer?&lt;/strong&gt; Per-request privacy settings, such as asking that the request isn't stored or used for training. Access to the fact-checking model, which we call through OpenRouter. And the ability to try a new model without adding another client library.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The options we found
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Good&lt;/th&gt;
&lt;th&gt;Bad&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Keep the direct providers and add billing alerts to each one&lt;/td&gt;
&lt;td&gt;No migration&lt;/td&gt;
&lt;td&gt;Still several keys, bills and error formats. Every new provider adds more.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Run our own proxy (for example, LiteLLM)&lt;/td&gt;
&lt;td&gt;Full control over routing and logging&lt;/td&gt;
&lt;td&gt;Another service to deploy, secure and keep up to date&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Move to a different managed gateway&lt;/td&gt;
&lt;td&gt;Similar benefits&lt;/td&gt;
&lt;td&gt;We'd still need OpenRouter for the fact-checking model, so we'd have two gateways&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Put everything behind OpenRouter&lt;/td&gt;
&lt;td&gt;Already in use for part of the ladder and for the fact-checking model. One key, one bill, one error format.&lt;/td&gt;
&lt;td&gt;Every model call now depends on one company&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What we chose, and why
&lt;/h2&gt;

&lt;p&gt;We moved every call to OpenRouter. For us it was the simplest way to get down to one key, one bill and one error format without running another service ourselves, and we already depended on it for the fact-checking model. The ladder still uses models from several vendors (DeepSeek, Qwen and OpenAI), but all of them are reached through one API.&lt;/p&gt;

&lt;p&gt;Then we fixed the things that had let the failure go unnoticed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Every step now has a ladder.&lt;/strong&gt; No call depends on a single model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Billing failures are recognised and alerted on.&lt;/strong&gt; Providers don't send a special "you're out of credit" signal. You get an ordinary-looking error. So we treat HTTP 402 as "out of money", and we also treat a 401, 403 or 429 that mentions credit or quota in its message the same way. That sends an alert, rate-limited per key so it doesn't flood the channel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Each key has a spend limit.&lt;/strong&gt; A bug in a loop can't run up an unlimited bill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy settings travel with the request.&lt;/strong&gt; The fact-checking calls ask for no data collection and zero data retention, and aren't allowed to move to another host.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model versions are pinned.&lt;/strong&gt; OpenRouter offers floating aliases such as &lt;code&gt;~deepseek/deepseek-flash-latest&lt;/code&gt;, which move to new versions automatically. We use the dated ID instead (&lt;code&gt;deepseek/deepseek-v4.1-flash-1017&lt;/code&gt;), so the model only changes when we deploy the change.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We accepted one real trade-off. OpenRouter is now a single point of failure. If it goes down, every tier goes down together. Before, we looked redundant, but two steps had no backup, so one provider failing could still break the product without anyone hearing about it. A single dependency we alert on has been easier to live with than several we didn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  The second problem: prompt caching quietly stopped working
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The situation
&lt;/h3&gt;

&lt;p&gt;Our chat system prompt is over 20,000 tokens and identical on every request. Providers such as DeepSeek cache a prompt prefix they've seen recently and charge much less to reuse it. With a prompt this large, caching makes up a big part of the cost of every request.&lt;/p&gt;

&lt;p&gt;After consolidating, we made DeepSeek V4.1 Flash the first model on the ladder, partly because its cached input is so cheap.&lt;/p&gt;

&lt;h3&gt;
  
  
  The problem
&lt;/h3&gt;

&lt;p&gt;We record the number of cached prompt tokens on every request, and it was close to zero. We were paying full price for the same 20,000 tokens on every call.&lt;/p&gt;

&lt;h3&gt;
  
  
  What we researched
&lt;/h3&gt;

&lt;p&gt;OpenRouter's documentation on provider routing explained it. A model whose weights are public, like this one, is served by many different hosting companies, about 50 when we checked, and each host keeps its own cache. By default OpenRouter spreads requests across them, so consecutive requests usually landed on different hosts, and each one found a cold cache.&lt;/p&gt;

&lt;p&gt;Here's a simple way to picture it. Imagine 50 coffee shops that each remember your order, but only if you go back to the same shop. If you're sent to a random shop every morning, nobody ever remembers you.&lt;/p&gt;

&lt;h3&gt;
  
  
  The options we found
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Accept it&lt;/td&gt;
&lt;td&gt;Full input price on every request&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Send a session ID, so OpenRouter keeps a conversation on one host&lt;/td&gt;
&lt;td&gt;Cache hits inside a conversation, but every new conversation starts cold&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pin a provider order, so every request goes to the same one or two hosts&lt;/td&gt;
&lt;td&gt;All users share one warm cache for the shared system prompt&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  What we chose, and why
&lt;/h3&gt;

&lt;p&gt;Our big, expensive prefix is the system prompt, and it's the same for every user. Pinning gives everyone the same warm cache, so we chose that:&lt;/p&gt;

&lt;p&gt;Here, &lt;code&gt;deepinfra/fp8&lt;/code&gt; is one hosting company's build of the model, and &lt;code&gt;deepseek&lt;/code&gt; is DeepSeek's own API:&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="n"&gt;modelKwargs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;provider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;order&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'deepinfra/fp8'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'deepseek'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;allow_fallbacks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On the next request, 22,272 of the roughly 22,400 prompt tokens (about 99%) came from the cache instead of being billed at full price. At DeepSeek's cached-token price, that made input on our most common call roughly ten times cheaper.&lt;/p&gt;

&lt;p&gt;Two details make this work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;allow_fallbacks: true&lt;/code&gt;&lt;/strong&gt; means that if both pinned hosts are down, OpenRouter may use any other host for the same model. Only if that also fails does our ladder move on to a different model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The system prompt has to stay exactly the same.&lt;/strong&gt; Anything that changes per request, such as today's date, the user's resume or the job description, goes in a later message. A single timestamp at the top of the system prompt is enough to make every request a cache miss.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What you can take from this
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A fallback that hides a failure can be worse than the failure.&lt;/strong&gt; Our generic tips kept the page working and made the problem invisible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat "out of credit" as its own kind of error&lt;/strong&gt;, with its own alert. It doesn't look like an outage, so normal error monitoring misses it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look for steps that depend on a single model.&lt;/strong&gt; One of them will be the step that breaks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On a multi-host gateway, prompt caching may not work by default.&lt;/strong&gt; Pin the provider, keep the prefix constant, and measure cached tokens instead of assuming.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;If you consolidate on one gateway, decide on purpose that you accept the single point of failure.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you run production traffic through a model gateway, I'm curious how you handle that single point of failure. Did you find a setup that was worth the extra complexity?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>openrouter</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Don't ask an LLM for a score: how we rebuilt our resume match score</title>
      <dc:creator>cv-by-jd.com</dc:creator>
      <pubDate>Sun, 22 Nov 2026 08:36:11 +0000</pubDate>
      <link>https://dev.to/cv-by-jd/our-resume-scorer-said-100100-four-times-in-a-row-heres-how-we-rebuilt-it-1jd4</link>
      <guid>https://dev.to/cv-by-jd/our-resume-scorer-said-100100-four-times-in-a-row-heres-how-we-rebuilt-it-1jd4</guid>
      <description>&lt;p&gt;If you're thinking about asking an LLM to rate something out of 100, this post is for you. It's the story of how our resume match score went wrong in production, what we found when we dug in, the approaches we compared, and the design we settled on. The short version: let a language model &lt;em&gt;understand&lt;/em&gt; the input, let a classifier (a model that only picks from multiple-choice answers and says how sure it is) make narrow &lt;em&gt;judgments&lt;/em&gt;, and let your own code do the &lt;em&gt;arithmetic&lt;/em&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The situation
&lt;/h2&gt;

&lt;p&gt;I'm the founder of &lt;a href="https://cv-by-jd.com" rel="noopener noreferrer"&gt;CV by JD&lt;/a&gt;. Job seekers upload their resume and paste a job description. We rewrite the resume for that specific job, using only facts from the original, and then show a match score out of 100 with a short list of what's still missing.&lt;/p&gt;

&lt;p&gt;That score is what people act on. Imagine you're applying for a backend role and you see:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Match: 64/100&lt;/strong&gt;&lt;br&gt;
The posting asks for "production experience with Kubernetes", and your resume doesn't show it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now you know what to do. If you've run Kubernetes in production, you add it. If you haven't, you know this job is a stretch. A score like this is only useful if it's stable, specific to the job and honest. If it jumps around, or says 100 when it shouldn't, people stop trusting the whole product.&lt;/p&gt;

&lt;h3&gt;
  
  
  How it works, in one picture
&lt;/h3&gt;

&lt;p&gt;When you click "Optimize", three things happen:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Your browser                      Our server
 ────────────                      ──────────
 resume + job description  ───▶   1. A language model rewrites the resume
                                   2. A scoring step rates the new resume
                                      against the job (0 to 100)
 shows the new resume      ◀───   3. Sends back the resume and the score
 and the score

 If step 2 failed: the server sent back the resume with no score, and
 the page in the browser worked out a rough score of its own.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This post is about step 2, the scoring step. That last line, the browser's backup score, turns out to matter a lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  How we got here
&lt;/h2&gt;

&lt;p&gt;We've been through three versions of the scoring step. I'll call them V1, V2 and V3.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;V1&lt;/strong&gt; was the obvious one. After rewriting the resume, we sent it to a chat model along with the job description and a prompt describing six categories: keywords, formatting, relevant experience, skills, education and measurable achievements. The model returned points for each category plus some written feedback, and our code added up the total.&lt;/p&gt;

&lt;p&gt;In real use, three things kept bothering us:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The same input didn't always give the same score.&lt;/strong&gt; Generative models aren't deterministic. A user who changed one word and saw their score move several points had no way to tell whether the change helped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The number and the advice came apart.&lt;/strong&gt; They were generated separately, so the feedback could praise "strong keyword coverage" next to a weak keyword score.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The model was grading its own work.&lt;/strong&gt; Often the same model had just written the resume it was scoring.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So in &lt;strong&gt;V2&lt;/strong&gt; we moved scoring to a classifier: a model that doesn't write text, but picks one answer from a fixed list of options and reports how likely each option is. (More on the one we use below.) V2 asked the same small set of general questions about every resume and job, and turned the answers into points.&lt;/p&gt;

&lt;p&gt;V2 also kept the backup from the diagram. If scoring failed, the web page calculated its own score from a few simple rules, such as "has an email address". The user couldn't tell the two kinds of score apart.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;A few days after V2 went live, a user emailed us. Their first two resumes had scored 71 and 62. Then they tailored four more resumes to four different jobs, and every one scored 100 out of 100, with no suggestions at all.&lt;/p&gt;

&lt;p&gt;Four perfect scores for four different jobs is clearly wrong, and it was worse than useless. Someone relying on it would send applications they had no chance with, and never learn why.&lt;/p&gt;

&lt;p&gt;We traced the four 100s. None came from the classifier. They came from the browser's backup score, whose rules gave points for having an email address, a LinkedIn link, the word "experience", more than 500 words and an action verb. Almost every resume meets all of those, so almost every resume scored 100. Whenever the real score failed, users saw a perfect score instead of no score.&lt;/p&gt;

&lt;p&gt;That raised a bigger question. The backup only appeared when the real scoring step failed, so why was it failing so often? When we checked production, 38% of optimizations had no stored score.&lt;/p&gt;

&lt;p&gt;The first fix took minutes. We deleted the backup score. If there's no real score, the app now says "score unavailable" and shows no number. A blank is annoying, but it doesn't mislead anyone.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we researched
&lt;/h2&gt;

&lt;p&gt;Next we went through every missing score in the logs and grouped them by cause.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A rule was throwing away good results.&lt;/strong&gt; If the classifier was torn on any category (say 45% "met" and 40% "partly met"), V2 threw away the whole score. Education questions caused most of this, especially on postings with rules like "must graduate between June 2027 and June 2028". About half of all missing scores came from this one check.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Some "job descriptions" were just a title.&lt;/strong&gt; If someone pastes "DevOps Engineer" and nothing else, there's nothing to match against. The classifier rightly said there wasn't enough evidence, and we showed nothing. That was about a fifth of the missing scores.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;General questions blurred two different things.&lt;/strong&gt; One general education question can't tell "does this job need a degree?" apart from "does this candidate have one?". It even read a "Great Place to Work Certified" badge in a company blurb as a certification the candidate needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hard requirements barely counted.&lt;/strong&gt; A student graduating in the wrong year for an internship could still score highly, because eligibility was one small part of one category.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We also tested how the classifier behaved with better questions. We extracted the real requirements from a sample of postings and asked about each one separately. The answers became much more decisive. A question about a graduation window that the candidate clearly missed came back "not met" with high probability, where the general education question had been unsure.&lt;/p&gt;

&lt;p&gt;So the classifier wasn't the main problem. Our questions were.&lt;/p&gt;

&lt;h2&gt;
  
  
  The options we found
&lt;/h2&gt;

&lt;p&gt;We compared four ways to produce the score against a simple list of needs: repeatable, specific to the job, explainable, working in any language (some of our users don't write in English), and cheap enough to run on every optimization.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;What's good&lt;/th&gt;
&lt;th&gt;What's bad&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A better prompt for the chat model&lt;/td&gt;
&lt;td&gt;Smallest change&lt;/td&gt;
&lt;td&gt;Still not repeatable. The model still grades its own rewrite.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Keyword matching in code&lt;/td&gt;
&lt;td&gt;Perfectly repeatable, almost free&lt;/td&gt;
&lt;td&gt;Misses synonyms and paraphrase. English-only. Easy to game by pasting keywords into the resume.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A second LLM acting as a judge&lt;/td&gt;
&lt;td&gt;Understands meaning, works in any language&lt;/td&gt;
&lt;td&gt;Costly on every request. Still a free-text verdict you have to parse and calibrate.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A classifier answering job-specific questions, with the maths in code&lt;/td&gt;
&lt;td&gt;Typed answers with probabilities. Fast and cheap. The scoring rules live in our code.&lt;/td&gt;
&lt;td&gt;It can't decide what to ask, so we have to generate good questions first.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The classifier we use is called JEV. It's available as an early-access model on OpenRouter, a service that gives you one API for many different AI models. JEV doesn't write text. You give it some evidence and a set of multiple-choice questions, and for each question it returns the option it picked and a probability for every option:&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="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"choice"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"choice"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"not_met"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"confidence"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.93&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"probabilities"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"met"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.02&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"partial"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"not_met"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.93&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;
  
  
  What we chose, and why
&lt;/h2&gt;

&lt;p&gt;For V3, we kept the classifier and fixed the part that was actually broken: the questions. Here's the whole flow at a glance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Job posting ──▶ 1. A language model lists the requirements, each with an exact
                    quote, and code checks every quote is really in the posting
                 2. The classifier answers one question per requirement
                    (met / partly met / not met)
                 3. Code turns the answers into the score
                 4. Code turns the same answers into the feedback
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's how it works on an example.&lt;/p&gt;

&lt;p&gt;Say the posting includes:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"3+ years of Python in production. Experience with AWS is a plus. Applicants must be graduating between June 2027 and June 2028."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And the resume shows two years of Python at an internship, and a degree completed in 2025.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: turn the posting into requirements.&lt;/strong&gt; A language model reads only the job description, never the resume, and lists its requirements. Each one has a type, an importance, and a quote copied exactly from the posting:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python in production. Must-have. "3+ years of Python in production"&lt;/li&gt;
&lt;li&gt;AWS. Nice to have. "Experience with AWS is a plus"&lt;/li&gt;
&lt;li&gt;Graduation window. Must-have eligibility rule. "must be graduating between June 2027 and June 2028"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then plain code checks that each quote really appears in the posting. If the model paraphrased or invented a requirement, it's dropped. This one check is what stopped company badges and benefits from becoming fake requirements.&lt;/p&gt;

&lt;p&gt;We store this list under a hash of the posting's text. Anyone who scores against the same posting later gets exactly the same questions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: ask one question per requirement.&lt;/strong&gt; For each requirement, the classifier answers: met, partly met, or not met? In our example, Python comes back mostly "partial", AWS "not met", and the graduation window clearly "not met". A few general questions about the resume itself, such as formatting, are asked alongside.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: let code do the maths.&lt;/strong&gt; Each category score averages the relevant answers, weighted by the classifier's probabilities, so 70% "met" counts for more than 40% "met". Because the graduation rule is a must-have and clearly not met, the total is capped at a low ceiling, however strong the rest of the resume is. This candidate ends up with a low score, and the reason is right at the top of their feedback. The model never sees the final number.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: build the feedback from the same answers.&lt;/strong&gt; The unmet must-haves become the suggestions, quoting the posting: "This posting requires 'must be graduating between June 2027 and June 2028', and your resume doesn't show that you meet it." The number and the advice come from the same answers, so they can't contradict each other.&lt;/p&gt;

&lt;p&gt;We also fixed the two simpler causes from our research. When the classifier is unsure, we still compute the score, using its probabilities as they are, instead of discarding the result. And a title-only "job description" gets a general resume-quality score, with "paste the full job description" as the first suggestion.&lt;/p&gt;

&lt;p&gt;We chose this design because it was the only option that met every need on our list. It's repeatable because the questions are cached and the maths is ours. It's specific because the questions come from the posting. It's explainable because every lost point traces back to a quoted requirement. It isn't tied to English, because nothing depends on keyword lists. And a classifier call costs a fraction of a cent.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed
&lt;/h2&gt;

&lt;p&gt;Before switching, we tested V2 and V3 on 60 real resume and job pairs, including 25 that V2 had failed to score.&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;No score&lt;/th&gt;
&lt;th&gt;Same score (±3) when run again&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;V2&lt;/td&gt;
&lt;td&gt;38%&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;V3&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;V3, without the stored requirement lists&lt;/td&gt;
&lt;td&gt;0%&lt;/td&gt;
&lt;td&gt;88%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The last row shows why storing the requirement list matters. When we re-extracted requirements on every run, one extraction occasionally found an eligibility rule that another missed, and in two cases the score moved by more than ten points.&lt;/p&gt;

&lt;p&gt;We also checked that, on the resumes V2 had scored, V3 put them in a similar order. It did, except that resumes failing an eligibility rule now score lower, as they should.&lt;/p&gt;

&lt;h2&gt;
  
  
  The same pattern works for fact-checking
&lt;/h2&gt;

&lt;p&gt;After every rewrite, we also check that the new resume doesn't invent anything, and we use the same approach. Each line of the rewritten resume becomes a question: is it supported by the original resume, does it add a fact the person never gave us, or is the evidence unclear?&lt;/p&gt;

&lt;p&gt;One lesson here came the hard way. Our first version put a threshold on the classifier's &lt;code&gt;confidence&lt;/code&gt; field. On a resume copied word for word, where every line was obviously supported, confidence came back at 0.31, and the check blocked real users. The field didn't mean "how likely this answer is right", which is what we'd assumed. We switched to the full probability distribution. Now we block a line only when the classifier is fairly sure it's invented. Unsure answers never block the user. A rejected line gets one repair attempt and, if that fails too, it's left out.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you can take from this
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A fallback that invents an answer is worse than no answer.&lt;/strong&gt; Our browser backup score did more harm than the failures it covered for. Show "unavailable" instead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't ask a generative model for a number.&lt;/strong&gt; Ask it to understand and structure the input, then compute the number yourself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If you use a classifier, most of the quality comes from the questions.&lt;/strong&gt; Generate them from the actual input, and keep them stable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check every extracted quote against the source in code.&lt;/strong&gt; It's cheap, and it catches a surprising amount of invention.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Find out what a confidence field actually measures&lt;/strong&gt; before you put a threshold on it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you've built scoring or grading on top of LLMs, I'd like to hear how you kept it stable. Did you find anything better than caching the questions?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>architecture</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
