{"uid":"cap_qjzkrDcLELs-H-EWf2De0","slug":"pqs-grade-prompt-quality-pre-flight-scorer-e4fdaeca","name":"PQS Grade – Prompt Quality Pre-Flight Scorer","description":"Quick pre-flight quality score: composite (0-100) + grade (A-F) + three framework sub-scores (PEEM, RAGAS, G-Eval) + verdict. Run upstream of any other paid call to filter weak prompts before inference. The cheapest gate on the AI input quality problem.","url":"https://pqs.onchainintel.net/api/pqs-grade?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"prompt":{"type":"string","description":"Prompt text to grade (1-10000 chars)"},"vertical":{"type":"string","description":"Optional domain: software/content/business/education/science/crypto/general/research"}}},"responseSchema":{"type":"object","required":["score","grade","verdict","frameworks"],"properties":{"grade":{"enum":["A","B","C","D","F"],"type":"string"},"score":{"type":"integer","maximum":100,"minimum":0,"description":"Composite 0-100 score (percentile-normalized total)"},"verdict":{"type":"string","description":"Single sentence diagnosing the weakest dimension, with a framework citation"},"frameworks":{"type":"object","required":["peem","ragas","geval"],"properties":{"peem":{"type":"number","maximum":10,"minimum":0,"description":"PEEM framework score: weights structure (clarity, output format, role, constraints)"},"geval":{"type":"number","maximum":10,"minimum":0,"description":"G-Eval framework score: weights LLM-judged faithfulness (clarity, specificity, CoT, constraints)"},"ragas":{"type":"number","maximum":10,"minimum":0,"description":"RAGAS framework score: weights grounding (context, specificity, examples)"}}},"upgrade_url":{"type":"string","description":"Link to PQS Pro for the full 8-dimension SaaS"},"methodology_url":{"type":"string","description":"Link to the methodology blog post explaining the five-framework synthesis"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_d2xluci-llnDZFM3uA7lE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Scores a prompt 0-100 and assigns an A-F grade plus PEEM, RAGAS, and G-Eval sub-scores and a single-sentence verdict, acting as a cheap quality gate before paid LLM inference.","exampleAgentPrompt":"Before I send this to Claude, can you run a quick quality check on my prompt — 'You are a senior tax advisor. Given the following income details, produce a structured summary of deductions I can claim in the US in 2024...' — and give me its composite score, letter grade, and what the weakest part is? Use the 'business' vertical.","exampleUseCases":[{"title":"Pre-flight gate for costly LLM calls","prompt":"Before we call GPT-4o with this prompt — 'Summarize the legal risks in the attached contract and flag any clauses that deviate from standard SaaS terms' — score it for quality and tell me the grade and verdict so I can decide if it's worth the spend."},{"title":"Prompt debugging in content pipeline","prompt":"I'm building a content generation pipeline and this prompt keeps producing vague output: 'Write a blog post about AI trends.' Can you grade it across PEEM, RAGAS, and G-Eval and tell me the single sentence diagnosis of what's weakest? Use the 'content' vertical."},{"title":"Automated prompt quality filter in agent workflow","prompt":"Before my research agent sends each user query to the expensive model, I need you to score the prompt 'What are the most cited papers on transformer attention mechanisms published after 2022?' in the 'research' vertical and only proceed if the grade is B or above."}],"resultDescription":"Returns a JSON object with an integer composite score (0-100), a letter grade (A-F), a one-sentence verdict naming the weakest dimension with a framework citation, and three framework sub-scores (PEEM 0-10 for structure, RAGAS 0-10 for grounding/context, G-Eval 0-10 for LLM-judged faithfulness). Optionally includes links to PQS Pro and a methodology blog post.","failureModes":["Prompt text empty or exceeds 10,000 characters — likely returns 400 or validation error","Invalid vertical value outside allowed enum — may default to 'general' or return error","Payment not provided or insufficient — returns 402 Payment Required","Ambiguous or borderline prompts may yield mid-range scores that don't clearly signal pass/fail","Score can vary slightly for identical prompts if G-Eval uses stochastic LLM judging internally"],"whenToPreferThis":"Choose this endpoint as a cheap upstream gate ($0.001) before any expensive LLM inference call. Ideal when running high-volume pipelines where a meaningful fraction of prompts may be low quality and you want to avoid wasting budget. Prefer this over manual prompt review when operating at scale, or over the full 8-dimension PQS analysis when you only need a fast pass/fail signal rather than detailed remediation advice.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T00:30:15.163Z","isFirstParty":false,"canonicalSlug":"pqs-grade-prompt-quality-pre-flight-scorer-e4fdaeca"}