<?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>Forem: OnChainAIIntel</title>
    <description>The latest articles on Forem by OnChainAIIntel (@onchainaiintel).</description>
    <link>https://forem.com/onchainaiintel</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%2F3860854%2F81f61c1a-a40c-46f4-a8b1-3cda482a1707.png</url>
      <title>Forem: OnChainAIIntel</title>
      <link>https://forem.com/onchainaiintel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/onchainaiintel"/>
    <language>en</language>
    <item>
      <title>I scored 500 AI prompts across 8 quality dimensions — here's what broke</title>
      <dc:creator>OnChainAIIntel</dc:creator>
      <pubDate>Sat, 18 Apr 2026 18:59:04 +0000</pubDate>
      <link>https://forem.com/onchainaiintel/i-scored-500-ai-prompts-across-8-quality-dimensions-heres-what-broke-23kn</link>
      <guid>https://forem.com/onchainaiintel/i-scored-500-ai-prompts-across-8-quality-dimensions-heres-what-broke-23kn</guid>
      <description>&lt;p&gt;Most teams are getting 10 to 30% of what their LLM model can actually do.Not because the model is weak. Because the prompt is.&lt;/p&gt;

&lt;p&gt;I’ve spent the last two weeks scoring prompts. Real ones, from real builders, across real verticals, against an 8-dimension quality rubric. This weekend I ran another 500 through the scorer to pressure-test the pattern. Every dataset converges on the same number: the average production prompt scores 13 to 16 out of 80. That’s 17 to 20% of what the rubric says a well-formed prompt looks like.&lt;/p&gt;

&lt;p&gt;You’re paying for a Ferrari and driving it in first gear to the mailbox.&lt;/p&gt;

&lt;p&gt;What I Measured&lt;br&gt;
Every prompt got scored on 8 dimensions. Each scored 1 to 10, totaling 80:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clarity. Is the task unambiguous?&lt;/li&gt;
&lt;li&gt;Specificity. Concrete targets, numbers, scope?&lt;/li&gt;
&lt;li&gt;Context. Background, assumptions, domain?&lt;/li&gt;
&lt;li&gt;Constraints. Limits, rules, edge cases?&lt;/li&gt;
&lt;li&gt;Output format. What shape should the response take?&lt;/li&gt;
&lt;li&gt;Role definition. “Act as a ___”?&lt;/li&gt;
&lt;li&gt;Examples. Few-shot or reference cases?&lt;/li&gt;
&lt;li&gt;Chain-of-thought structure. Reasoning scaffolding?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren’t arbitrary. They map to what the prompt engineering literature has known for five years. PEEM, RAGAS, G-Eval, MT-Bench, the Anthropic and OpenAI prompting guides. Everyone agrees these dimensions matter. Nobody’s checking whether their production prompts actually hit them.&lt;/p&gt;

&lt;p&gt;The Data&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%2Fkzcee793uwm0gt1mu8nr.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%2Fkzcee793uwm0gt1mu8nr.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;500 software engineering prompts. Real-world format “Build X using Y.”&lt;/p&gt;

&lt;p&gt;Average score: 13.3 out of 80&lt;br&gt;
83% graded F. 17% graded D. Zero scored C or above.&lt;/p&gt;

&lt;p&gt;After rewriting against the rubric: average 68.5 out of 80. A B+.&lt;br&gt;
Average improvement: +55 points. 425% relative gain.&lt;/p&gt;

&lt;p&gt;For context, the organic dataset. 248 prompts submitted by real users of the scoring tool, across 7 verticals, showed the same pattern. 89% graded D or F. Average before-score of 15.8/80.&lt;/p&gt;

&lt;p&gt;Software prompts were slightly worse than average. Not better. Engineers aren’t exempt from this. If anything, the “it’s a technical task so it must be rigorous” assumption is the trap.&lt;/p&gt;

&lt;p&gt;What’s Actually Missing&lt;br&gt;
Here’s the dimension breakdown. Look at how specific the failure pattern is:&lt;/p&gt;

&lt;p&gt;Examples scored 1.01 out of 10. Across 500 prompts that developers wrote to build production software, essentially zero included a reference case, a shape to follow, or a “here’s what good looks like.”&lt;/p&gt;

&lt;p&gt;This is the dimension every prompt engineering guide tells you matters most. The gap between what engineers know they should do and what they actually write is near-total.&lt;/p&gt;

&lt;p&gt;Constraints at 1.09. Role definition at 1.18. Clarity, the only dimension averaging above 2, sits at 3.19.&lt;/p&gt;

&lt;p&gt;Download the Medium app&lt;br&gt;
Engineers are writing English sentences with tech keywords. The structural scaffolding that turns a wish into a spec is almost entirely absent.&lt;/p&gt;

&lt;p&gt;What This Looks Like In Practice&lt;br&gt;
A representative prompt from the dataset:&lt;/p&gt;

&lt;p&gt;“Build a real-time collaborative text editor using React for the frontend.”&lt;/p&gt;

&lt;p&gt;Scores 14/80.&lt;/p&gt;

&lt;p&gt;It sounds specific. It names a technology. It has a verb. But the model receiving it has to guess. Collaboration for how many users? What’s the sync strategy? Operational transform or CRDT? What’s the latency budget? What does “done” look like? No examples. No output format. No constraints.&lt;/p&gt;

&lt;p&gt;The rewritten version, same task, generated by the scorer to address the rubric gaps, scored 69/80. It defined the target user. It specified real-time sync requirements. It listed technical constraints including concurrent editors, conflict resolution strategy, and latency targets. It specified the response format. It included an example implementation signature.&lt;/p&gt;

&lt;p&gt;Same end goal. Different input. 5x the quality score. The before version wastes tokens on clarification and produces generic output. The after version reads more like a spec than a prompt.&lt;/p&gt;

&lt;p&gt;Why This Matters Now&lt;br&gt;
The easy dismissal is “people should write better prompts.” That misses the systemic problem.&lt;/p&gt;

&lt;p&gt;The industry has spent years focused on output evals. Every eval platform measures what the model produced. Almost nobody measures what it was given (inputs).&lt;/p&gt;

&lt;p&gt;That worked when prompts were single-shot, human-written, and reviewed before shipping. It stops working the moment prompts become infrastructure.&lt;/p&gt;

&lt;p&gt;In agentic workflows where one LLM call feeds the next, a 13/80 input becomes the input to the next call, which is already compromised before you add retrieval or structured tool calls. In the last week alone, three x402-native agent systems went live that share the same input surface of natural language:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Daydreams Taskmarket. Agents bidding on work described in plain text.&lt;/li&gt;
&lt;li&gt;PeptAI. Autonomous peptide discovery running wet-lab orders.&lt;/li&gt;
&lt;li&gt;AlliGo. A credit bureau scoring agent behavior across endpoints.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the descriptions populating those systems score like the 500 in this dataset, the agent economy is routing compute and payments on structurally empty inputs.&lt;/p&gt;

&lt;p&gt;The output eval loop can’t catch this. By the time the output looks wrong, the compute bill is already on your card.&lt;/p&gt;

&lt;p&gt;An Infrastructure Problem&lt;br&gt;
Telling engineers to write better prompts is telling engineers to write better SQL without giving them a linter. Telling teams to review prompts manually is telling them to do code review without git blame.&lt;/p&gt;

&lt;p&gt;The answer is the same answer every other quality-assurance problem eventually reached. Measure it. Instrument it. Put the measurement in the continuous integration pipeline. Block the bad ones before they ship.&lt;/p&gt;

&lt;p&gt;The Solution&lt;br&gt;
It’s already here at https:// pqs.onchainintel.net.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1. Free tier: paste a prompt, get the 8-dimension breakdown plus a suggested rewrite. No signup required.&lt;/li&gt;
&lt;li&gt;2. Paid tiers: start at $19.99/mo for unlimited private-repo CLI usage. $99.99/mo for teams with GitHub PR checks, Slack alerts, and shared dashboards.&lt;/li&gt;
&lt;li&gt;3. x402 tier: the paid API charges $0.025 to $0.125 per scoring call in USDC on Base and Solana.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://pqs.onchainintel.net/pricing" rel="noopener noreferrer"&gt;Subscription available&lt;/a&gt; for all tiers via Stripe.&lt;/p&gt;

&lt;p&gt;You don’t have to adopt it. But you should at minimum run 10 of your production prompts through the free tier this week and look at the numbers.&lt;/p&gt;

&lt;p&gt;If you’re shipping anything that takes prompts from humans or other agents, the input layer is measurable. Start measuring. You’re leaving most of the model’s capability on the table, and you don’t have to.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try it yourself
&lt;/h2&gt;

&lt;p&gt;If you want to score your own prompts, PQS is live at &lt;a href="https://pqs.onchainintel.net?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=500-prompts" rel="noopener noreferrer"&gt;pqs.onchainintel.net&lt;/a&gt; — free tier available, paid tiers for full 8-dimension scoring and batch runs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP server&lt;/strong&gt; on npm: &lt;code&gt;npm install pqs-mcp-server&lt;/code&gt; — drop-in for Claude and other MCP-compatible agents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Action&lt;/strong&gt;: &lt;a href="https://github.com/marketplace/actions/pqs-check" rel="noopener noreferrer"&gt;PQS Check on the Marketplace&lt;/a&gt; — score prompts in CI before they ship&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API&lt;/strong&gt;: Direct x402 micropayments on Base or Bearer API key (subscription tiers)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Data from this teardown: 500 software prompts, average score before optimization 13.27/80, average after 68.47/80, 425% improvement. 416 graded F, 84 graded D, 0 at C+ or above.&lt;/p&gt;

&lt;p&gt;If you're in DevRel, DevAdvocate, or DevEx working on AI pipelines — this is the input-quality data your builders need to see. Feel free to forward.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;What I'd love feedback on: which of the 8 dimensions surprised you most as the common failure mode? My hypothesis was clarity, but the data says &lt;code&gt;examples&lt;/code&gt; at 1.01 average and &lt;code&gt;constraints&lt;/code&gt; at 1.09 — the structural stuff almost nobody includes.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>showdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The Magic Prompt Formula is good. It's still missing a layer.</title>
      <dc:creator>OnChainAIIntel</dc:creator>
      <pubDate>Thu, 16 Apr 2026 05:52:56 +0000</pubDate>
      <link>https://forem.com/onchainaiintel/the-magic-prompt-formula-is-good-its-still-missing-a-layer-1oj4</link>
      <guid>https://forem.com/onchainaiintel/the-magic-prompt-formula-is-good-its-still-missing-a-layer-1oj4</guid>
      <description>&lt;p&gt;Everyone in AI circles eventually discovers the Magic Prompt Formula. If you haven't, here it is. It's the most widely shared structured approach to prompting, and it genuinely works.&lt;/p&gt;

&lt;p&gt;The formula has five parts:&lt;/p&gt;

&lt;p&gt;Role (Who): Assign a specific expert persona, "You are a senior content strategist" or "Act as a seasoned Python developer"&lt;/p&gt;

&lt;p&gt;Action (What): Use a clear verb defining what the AI should do ,"Draft," "Refactor," "Analyze," "Summarize"&lt;/p&gt;

&lt;p&gt;Context (Why): Provide relevant background so the model doesn't give generic answers; your audience, your product, your use case&lt;/p&gt;

&lt;p&gt;Examples (How): Give one or two samples of the expected output style — this is few-shot prompting in practice&lt;/p&gt;

&lt;p&gt;Constraints &amp;amp; Format (Boundaries): Set limits and define structure, "Under 200 words," "No jargon," "Single block of copy," "Use bullet points"&lt;/p&gt;

&lt;p&gt;Instead of typing "write me a LinkedIn post," you write:&lt;/p&gt;

&lt;p&gt;You are a senior content strategist specializing in B2B SaaS. Write a LinkedIn post announcing [product]. My audience is AI developers and technical founders. Here's an example of the tone I want: [example]. Keep it under 200 words, no buzzword fluff, single block of copy.&lt;/p&gt;

&lt;p&gt;That's Role, Action, Context, Examples, and Constraints all in one prompt. You've gone from a generic instruction to a specialized brief. The output quality difference is real and immediate.&lt;/p&gt;

&lt;p&gt;So what's the problem?&lt;/p&gt;

&lt;p&gt;The Magic Prompt Formula covers about half of what actually determines prompt quality.&lt;/p&gt;

&lt;p&gt;I know this because I built a tool that measures it.&lt;/p&gt;

&lt;p&gt;PQS: Prompt Quality Score —&amp;gt; scores prompts across 8 dimensions before you send them to a model. The five ingredients of the Magic Formula map cleanly onto five of those dimensions: clarity, specificity, context, examples, and constraints. A well-structured Magic Formula prompt typically scores in the 47–52 range out of 80. Solid. Grade A territory even.&lt;/p&gt;

&lt;p&gt;But there's a dimension the formula doesn't touch at all: chain-of-thought structure.&lt;/p&gt;

&lt;p&gt;CoT structure measures whether your prompt scaffolds the model's reasoning: numbered steps, analysis frameworks, structured output sequences, decision trees. It's the difference between asking an expert to answer a question and asking them to walk you through how they'd think about it.&lt;/p&gt;

&lt;p&gt;Magic Formula prompts score 3 or 4 out of 10 on CoT structure. Consistently. Across every vertical we've tested.&lt;/p&gt;

&lt;p&gt;I ran three Magic Formula prompts through PQS this week. One content prompt, one software prompt, one crypto analysis prompt.&lt;/p&gt;

&lt;p&gt;All three were well-constructed. All three scored Grade A before optimization.&lt;/p&gt;

&lt;p&gt;After PQS optimization, all three jumped by 63–71%.&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%2Fyrfeig4v2pkc2jaiw8nb.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%2Fyrfeig4v2pkc2jaiw8nb.png" alt=" " width="800" height="601"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The CoT dimension went from an average of 3.7 to 9.0 across all three. Every other dimension moved 1–4 points. CoT moved 5–6.&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%2Fch1s7es71zykcui3iris.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%2Fch1s7es71zykcui3iris.png" alt=" " width="800" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's what that looks like in practice. The content prompt went from:&lt;/p&gt;

&lt;p&gt;"Keep it under 200 words, no buzzword fluff, end with a clear CTA, format as a single block of copy"&lt;/p&gt;

&lt;p&gt;To: "Structure your post: 1. Hook: open with a relatable developer pain point. 2. Problem: briefly explain the cost of discovering prompt issues too late. 3. Solution: introduce PQS as the pre-inference fix. 4. Benefit: one concrete outcome. 5. CTA: direct readers to pqs.onchainintel.net"&lt;/p&gt;

&lt;p&gt;Same constraints. Completely different reasoning scaffolding. The model doesn't just know what to write, it knows how to think through the writing.&lt;/p&gt;

&lt;p&gt;This is the AI 'input quality' problem in concrete form.&lt;/p&gt;

&lt;p&gt;The Magic Formula solves the WHO and the WHAT. It tells the model who it is and what you want. What it doesn't do is solve the HOW, the reasoning path the model should follow to get there.&lt;/p&gt;

&lt;p&gt;Most people find out their prompt was weak after the output disappoints them. By then you've already burned tokens, lost time, and often shipped something mediocre. PQS scores the prompt before inference. It catches the CoT gap, and every other gap, before you run it.&lt;/p&gt;

&lt;p&gt;If you're already using the Magic Formula, you're ahead of most people! Prompt Quality Score shows you exactly how much further ahead you could be.&lt;/p&gt;

&lt;p&gt;Score your next prompt before you send it → &lt;a href="https://pqs.onchainintel.net" rel="noopener noreferrer"&gt;https://pqs.onchainintel.net&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;About OnChainIntel — AI-powered on-chain wallet analysis. We decode the behavioral patterns, hidden biases, and implicit bets behind any wallet's transaction history. Try it free at onchainintel.net · Follow us on X: &lt;a class="mentioned-user" href="https://dev.to/onchainaiintel"&gt;@onchainaiintel&lt;/a&gt; · TikTok: &lt;a class="mentioned-user" href="https://dev.to/onchainintel"&gt;@onchainintel&lt;/a&gt; · YouTube: &lt;a class="mentioned-user" href="https://dev.to/onchainaiintel"&gt;@onchainaiintel&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Prompt Quality Score (PQS) Now Supports x402 Payments on Solana</title>
      <dc:creator>OnChainAIIntel</dc:creator>
      <pubDate>Mon, 13 Apr 2026 10:26:45 +0000</pubDate>
      <link>https://forem.com/onchainaiintel/prompt-quality-score-pqs-now-supports-x402-payments-on-solana-40nd</link>
      <guid>https://forem.com/onchainaiintel/prompt-quality-score-pqs-now-supports-x402-payments-on-solana-40nd</guid>
      <description>&lt;p&gt;Been heads down building. Quick update for anyone working in the agentic payments space.&lt;/p&gt;

&lt;p&gt;PQS (Prompt Quality Score), the pre-flight quality gate for AI agent workflows, now accepts x402 payments on both Base mainnet and Solana, in addition to the existing free tier and API key access.&lt;br&gt;
What PQS does&lt;/p&gt;

&lt;p&gt;Before your agent sends a prompt to an expensive LLM endpoint, PQS scores it across 8 dimensions: clarity, specificity, context, constraints, output format, role definition, examples, and chain-of-thought structure. Returns a score 0–80, grade A–F, percentile ranking, and top 3 fixes. &lt;/p&gt;

&lt;p&gt;Catch weak prompts before they cost you tokens or USDC.&lt;/p&gt;

&lt;h1&gt;
  
  
  Endpoint reference
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Free tier&lt;/strong&gt; — no auth required**&lt;br&gt;
POST &lt;a href="https://pqs.onchainintel.net/api/score/free" rel="noopener noreferrer"&gt;https://pqs.onchainintel.net/api/score/free&lt;/a&gt;&lt;br&gt;
{ "prompt": "your prompt here", "vertical": "software" }&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Score&lt;/strong&gt; + dimensional breakdown — $0.025 USDC via x402&lt;br&gt;
POST &lt;a href="https://pqs.onchainintel.net/api/score" rel="noopener noreferrer"&gt;https://pqs.onchainintel.net/api/score&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Full analysis&lt;/strong&gt; + optimized rewrite — $0.125 USDC via x402&lt;br&gt;
POST &lt;a href="https://pqs.onchainintel.net/api/score/full" rel="noopener noreferrer"&gt;https://pqs.onchainintel.net/api/score/full&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Batch&lt;/strong&gt; up to 5 prompts — $0.25 USDC via x402&lt;br&gt;
POST &lt;a href="https://pqs.onchainintel.net/api/score/batch" rel="noopener noreferrer"&gt;https://pqs.onchainintel.net/api/score/batch&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;A/B&lt;/strong&gt; compare two prompts — $1.25 USDC via x402&lt;br&gt;
POST &lt;a href="https://pqs.onchainintel.net/api/score/compare" rel="noopener noreferrer"&gt;https://pqs.onchainintel.net/api/score/compare&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  x402 payment details
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Base mainnet:&lt;/strong&gt; CDP facilitator, USDC ERC-20, EIP-3009 TransferWithAuthorization&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solana:&lt;/strong&gt; x402-compatible, USDC SPL token&lt;br&gt;
No account required for x402 path — agent pays per call, no subscription&lt;/p&gt;

&lt;p&gt;API key path also available for subscription-based access&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MCP server&lt;/li&gt;
&lt;li&gt;bash npx pqs-mcp-server&lt;/li&gt;
&lt;li&gt;Listed on Smithery (88/100), Official MCP Registry, Glama, and mcp.so. Three tools: score_prompt (free), optimize_prompt ($0.025), compare_models ($1.25).&lt;/li&gt;
&lt;li&gt;Python SDK&lt;/li&gt;
&lt;li&gt;bash pip install pqs-sdk&lt;/li&gt;
&lt;li&gt;Async support via AsyncPQSClient. Full x402 and API key auth.&lt;/li&gt;
&lt;li&gt;OpenAPI spec: &lt;a href="https://pqs.onchainintel.net/openapi.json" rel="noopener noreferrer"&gt;https://pqs.onchainintel.net/openapi.json&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Building this as infrastructure for the agent economy, score the input before the inference fires. Cheaper than one bad prompt.&lt;/p&gt;

&lt;p&gt;@kenburbary| pqs.onchainintel.net&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>promptengineering</category>
      <category>web3</category>
    </item>
    <item>
      <title>I built an npm middleware that scores your LLM prompts before they hit your agent workflow</title>
      <dc:creator>OnChainAIIntel</dc:creator>
      <pubDate>Sat, 04 Apr 2026 12:14:05 +0000</pubDate>
      <link>https://forem.com/onchainaiintel/i-built-an-npm-middleware-that-scores-your-llm-prompts-before-they-hit-your-agent-workflow-53ci</link>
      <guid>https://forem.com/onchainaiintel/i-built-an-npm-middleware-that-scores-your-llm-prompts-before-they-hit-your-agent-workflow-53ci</guid>
      <description>&lt;p&gt;The problem with most LLM agent workflows is that nobody is checking the quality of the prompts going in.&lt;/p&gt;

&lt;p&gt;Garbage in, garbage out but at scale, with agents firing hundreds of prompts per day, the garbage compounds fast.&lt;/p&gt;

&lt;p&gt;I built &lt;code&gt;x402-pqs&lt;/code&gt; to fix this. It's an Express middleware that intercepts prompts before they hit any LLM endpoint, scores them for quality, and adds the score to the request headers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&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;x402-pqs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;express&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;express&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="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;pqsMiddleware&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;x402-pqs&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;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;express&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;express&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="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;pqsMiddleware&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;threshold&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;// warn if prompt scores below 10/40&lt;/span&gt;
  &lt;span class="na"&gt;vertical&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// scoring context&lt;/span&gt;
  &lt;span class="na"&gt;onLowScore&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;warn&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;// warn | block | ignore&lt;/span&gt;
&lt;span class="p"&gt;}));&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&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;/api/chat&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;req&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="o"&gt;=&amp;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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Prompt score:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pqs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pqs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;grade&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="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ok&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;Every request gets these headers added automatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;X-PQS-Score&lt;/code&gt; —&amp;gt; numeric score (0-40)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;X-PQS-Grade&lt;/code&gt; —&amp;gt; letter grade (A-F)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;X-PQS-Out-Of&lt;/code&gt; —&amp;gt; maximum score (40)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How the scoring works
&lt;/h2&gt;

&lt;p&gt;PQS scores prompts across 8 dimensions using 5 cited academic frameworks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt-side (4 dimensions):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Specificity —&amp;gt; does the prompt define what it wants precisely?&lt;/li&gt;
&lt;li&gt;Context —&amp;gt; does it give the model enough to work with?&lt;/li&gt;
&lt;li&gt;Clarity —&amp;gt; are the directives unambiguous?&lt;/li&gt;
&lt;li&gt;Predictability —&amp;gt; would different runs produce consistent results?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Output-side (4 dimensions):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Completeness, Relevancy, Reasoning depth, Faithfulness&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Source frameworks: PEEM (Dongguk University, 2026) · RAGAS · MT-Bench · G-Eval · ROUGE&lt;/p&gt;

&lt;h2&gt;
  
  
  Real example
&lt;/h2&gt;

&lt;p&gt;This prompt: &lt;code&gt;"who are the smartest wallets on solana right now"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Scored &lt;strong&gt;9/40&lt;/strong&gt; —&amp;gt; Grade D.&lt;/p&gt;

&lt;p&gt;The optimized version scored &lt;strong&gt;35/40&lt;/strong&gt; —&amp;gt; Grade A. &lt;/p&gt;

&lt;p&gt;+84% improvement.&lt;/p&gt;

&lt;p&gt;Same model. Same API. Completely different output quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  The payment layer
&lt;/h2&gt;

&lt;p&gt;The scoring API uses &lt;a href="https://x402.org" rel="noopener noreferrer"&gt;x402&lt;/a&gt;, an HTTP-native micropayment protocol now governed by the Linux Foundation, with Coinbase, Cloudflare, AWS, Stripe, Google, Microsoft, Visa, and Mastercard as founding members.&lt;/p&gt;

&lt;p&gt;Agents can call and pay for scoring autonomously — no API keys, no subscriptions. Just a wallet and $0.001 USDC per score.&lt;/p&gt;

&lt;p&gt;There's also a &lt;strong&gt;free tier&lt;/strong&gt; with no payment required:&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://pqs.onchainintel.net/api/score/free &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;'{"prompt": "your prompt here", "vertical": "general"}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Returns:&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;"score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"out_of"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"grade"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"D"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"upgrade"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Get full dimension breakdown at /api/score for $0.001 USDC"&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;h2&gt;
  
  
  The data angle
&lt;/h2&gt;

&lt;p&gt;Every scored prompt pair goes into a corpus. At scale this becomes training data for a domain-specific prompt quality model. The thesis is similar to what Andrej Karpathy described recently about LLM knowledge bases, the data compounds in value over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;npm: &lt;a href="https://npmjs.com/package/x402-pqs" rel="noopener noreferrer"&gt;x402-pqs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href="https://github.com/OnChainAIIntel/x402-pqs" rel="noopener noreferrer"&gt;OnChainAIIntel/x402-pqs&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;API: &lt;a href="https://pqs.onchainintel.net" rel="noopener noreferrer"&gt;pqs.onchainintel.net&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Free endpoint: &lt;code&gt;POST https://pqs.onchainintel.net/api/score/free&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Would love feedback from anyone building agent workflows. What scoring dimensions would you add?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>node</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
