A Miami-based, independently owned industrial equipment distributor wanted to expand into government contracting. Their small team knew their catalog and pricing cold, and had zero spare hours to comb SAM.gov, state portals, and county alert emails every week. They were missing viable federal and municipal bids while burning time on notices they were never eligible to win.
The tempting build in 2026 is an autonomous agent behind a shiny web dashboard. For a busy distributor team, both choices fail on contact with reality. A busy operator will not log into one more portal, and an unconstrained agent reading messy federal solicitations will hallucinate eligibility, misread boilerplate, and burn trust on the first bad lead.
Instead, I built a scheduled, deterministic-first Python pipeline with narrow LLM judgment calls, SQLite state, and zero-login deliverables: a ranked Monday-morning PDF and Word brief, pre-filled solicitation action folders, and daily alerts for tight deadlines. Over four months (May–August 2026), the system screened 597 federal solicitations across 156 distinct agencies and 270 buyer contacts, eliminated 163 dead-ends deterministically, surfaced 115 high-priority opportunities (~24 per month), and cross-referenced 1,005 historical federal awards for pricing context. When I later audited 335 of those surfaced bids against published federal contract awards (May–September 2026), 116 (34.6%) had already closed into $9.04M in verified obligated federal dollars (89% eligible without special certifications).
The constraints
The client’s operation—and federal procurement law—set the architecture before any model was chosen.
| Constraint | Reality |
|---|---|
| User adoption | Busy distributor team with no appetite for a new SaaS dashboard; deliverables had to land in formats they already read (PDF/Word briefs, action folders, email alerts) |
| Regulatory hard line | False Claims Act liability on federal bids: software can draft and pre-fill offeror blocks, never check certification boxes, sign, or auto-submit |
| Eligibility reality | Live SAM.gov entity lookup confirmed SBA-small status with zero socioeconomic certifications (no WOSB, SDVOSB, HUBZone, or 8(a)) and revealed missing NAICS registrations upfront |
| API & cost ceiling | Started on SAM.gov’s 10-call/day public key before unlocking a 1,000-call/day entity key; every stage had to degrade gracefully on lower quotas and avoid wasting frontier tokens |
| Noisy source data | SAM.gov search payloads return a URL pointer instead of body text, mix non-biddable Sources Sought notices with live RFQs, and omit dollar values on most notices |
| Auditability | Every priority rank, disqualifier, and eligibility verdict had to be traceable to a rule, field, or award record |
Architecture: pipeline first, models only for judgment
Every stage in the system follows one rule: plain Python handles ingestion, filtering, eligibility, pricing lookups, and form assembly; language models only score ambiguous product fit and write plain-English relevance notes.

Where AI deliberately stops:
- No autonomous agent loop. Spec extraction, eligibility checks, form filling, historical pricing lookups, and compliance checklists are lookups, regex, arithmetic, and templates. A deterministic pipeline with tiered model calls (code first, Haiku for high-volume extraction, stronger models only for hard compliance calls) is cheaper, reproducible, and auditable.
- Hard legal boundary in code. In the bid-prep packet (
SF-1449pre-fill), the script populates offeror address and identifier blocks only, leaves block 30a signature and date blank, touches zero certification checkboxes, and flags every missing client input in a‹DUMMY…›manifest so nothing can slip through unreviewed. - Graceful quota degradation. When the 1,000/day entity key unlocked full notice-body enrichment (
78/78notices enriched in78calls on validation), that stage stayed budget-gated (NOTICEDESC_CALLS=0reverts cleanly to title + NAICS scoring without breaking the run). - Strict data ownership. When operations later expanded to a shared Google Sheet workbench alongside SQLite, scripts owned fact columns and humans owned status, tier, and notes; automated runs never overwrite human columns.

Did the surfaced bids turn into real federal awards?
Screening 597 solicitations means little if those notices never turn into real contracts. To verify whether the pipeline was surfacing real spend rather than portal noise, I built an award-matching loop that periodically checks delivered solicitations against published federal contract awards (aggregating strictly on COUNT(DISTINCT solicitation_number) because repeated re-checks accumulate duplicate miss rows).
Across 335 distinct surfaced solicitations checked against awards signed between May 5 and September 30, 2026:
116solicitations (34.6%—more than one in three) had already closed into published federal awards, totaling$9,043,896in verified obligated dollars ($45,553median ·$77,965mean).91carried non-zero initial obligations ranging from$10,067to$703,860; the other25were indefinite-delivery contracts (such as$350K-ceiling recurring caster IDCs) recorded at$0initial obligation at signing.- The verified floor climbed on every re-measurement as federal award reporting caught up with fiscal year-end closings:
$1.58M→$1.97M→$2.31M→$6.07M→$9.04M. 89%of the obligated money ($8,050,940across102awards) required zero special certifications—Total Small Business Set-Asides ($4.56M,57awards), Full and Open ($2.89M,37awards), and No Set-Aside Used ($600K,8awards). Only11%($992,956across14awards) sat behind SDVOSB ($744K,10awards), WOSB ($146K,3awards), or ISBEE ($103K,1award) gates.85%of the obligated money ($7,703,688across88awards) came from themonitortier, alongside$1,340,208across28awards inpriority. That single split validated my core filtering discipline: keeping borderline or set-aside-capped opportunities visible inmonitorinstead of silently deleting them preserved85%of the real contract volume moving in the client’s market.

Honesty on numbers: why I banned my own dollar model
Before published award records accumulated, I built an internal heuristic est_value_usd model (which summed to roughly $10.76M in modeled addressable value across the 115 priority bids, with every row tagged with its derivation basis). When I audited that model, 93% of its rows were heuristic and more than half of the total rested on a single flat constant.
I deliberately banned that modeled figure from client-facing briefs. A heuristic headline collapses the moment a sharp buyer asks “where did that number come from?” Waiting for real published federal awards gave me a far stronger, auditable baseline—$9.04M in verified obligated dollars across 116 closed contracts—without inventing a single estimate.
Four real production failures that shaped the system
Running the pipeline week after week on live federal data exposed four failure classes that looked invisible in early prototypes.
1. Headless scoring collapsed under throughput pressure
- Symptom: On the first automated headless run (
Haiku 4.5), the scorer tagged 50 of 83 bids as high priority in 72 seconds—compared to 20 of 83 from an interactive Opus review of the same batch. It pasted identical placeholder explanations onto unrelated bids and missed five explicit disqualifiers written in the prompt. - Root cause: Mechanical disqualifiers and subtle product-fit judgment were mixed inside one prompt. Under throughput pressure, the cheaper model skipped mechanical checks and defaulted to marking bids relevant.
- Fix: Rejected “just switch to a bigger model” as the primary fix. Split disqualifiers into two classes: deterministic Python prefilters and post-scoring guards handle every rule backed by structured fields, while the LLM scores only the surviving middle where domain judgment is actually needed.
2. Naive deterministic rules create silent false negatives
Moving rules from prompts into Python introduced a subtler trap: a bad prompt rule is noisy, while a bad deterministic rule deletes real money silently. Three real cases forced tighter design:
- Key disqualifiers on PSC codes, never title keywords. Disqualifying refrigeration maintenance (
L041) and custodial (S201) had to key on federal PSC codes. Auditing four months of history showed a"refrigeration"keyword block would have killed aPSC 4110equipment solicitation that closed as a$217,233federal award, while a blanket service-class rule would have erased core equipment-maintenance bids (J035,J039,J049). - Demote uncertain rules to
monitorinstead of deleting them. Mechanizing a rubric line about foreign procurements would have silently dropped US-Embassy Caribbean bids servable from Miami. Anything ambiguous now demotes tomonitor. - Catch procurement homonyms and notice types in structured fields. Searching
"cart"surfaced CART (Communication Access Realtime Translation) captioning contracts;"VA"in a title meant Virginia (a NOAA site in Sterling, VA) rather than Veterans Affairs; and the LLM scored non-biddable Sources Sought / RFI notices as “priority, closes tomorrow” three times in one sweep. Structured field guards closed all three.
3. Prompt rules missed ineligible set-asides until code enforced SAM.gov
- Symptom: Three Women-Owned Small Business (WOSB) solicitations reached the client brief ranked
priority/9because the product match was spot-on, even though the client held no socioeconomic certifications. - Root cause: The LLM weighed product relevance ahead of eligibility constraints stated in the rubric.
- Fix: Grounded a client profile YAML directly against the live SAM.gov Entity API (which also caught missing NAICS registrations early) and enforced set-aside eligibility in deterministic code after scoring. Any solicitation requiring a certification the client lacks is automatically capped to
monitorwith the exact blocker prepended to its summary—keeping it visible for market intelligence and teaming without ever pitching it as a prime-eligible priority bid. On its first live run, the gate correctly flagged all three SDVOSB solicitations ineligible while clearing SBA total-small-business bids.
4. Programmatic PDF checks passed while the rendered pages were broken
- Symptom: Two different client deliverables passed every automated check (
exit 0, file exists, page count > 0,pypdffield inspection green) and still rendered broken for a human reader. - Root cause: First, the official federal
SF-1449form is an XFA PDF: programmaticget_fields()and/APappearance-stream checks passed while Adobe Acrobat displayed every filled field blank, because XFA-aware viewers ignore the AcroForm layer. In the same form filler, estimating box text fit from an average character width (0.52em, then0.60em) clipped capital-heavy federal UEI strings (Wis944font units whileIis278). Second, WeasyPrint silently ignored CSSclamp()in the brief template, collapsing hero headlines to body text while reporting zero errors. - Fix: Replaced average-width estimates with real Helvetica AFM character width tables using
floor(), fixed the template CSS and form rendering pipeline, and added one non-negotiable verification rule: rasterise rendered deliverables to PNG (ghostscript -sDEVICE=png16m) and visually inspect them before shipping.
Measured production summary
Verified directly from the production SQLite database (May 9 – August 31, 2026 sweep corpus; federal award matches signed May 5 – September 30, 2026):
| Metric | Measured value |
|---|---|
| Total federal solicitations screened | 597 across 156 distinct agencies and 270 buyer contacts |
| Disqualified deterministically | 163 dead-ends removed before brief delivery |
Surfaced opportunities (priority / monitor) | 115 priority (~24/mo) · 319 monitor |
| Closed federal awards verified | 116 of 335 checked (34.6%) totaling $9,043,896 obligated ($45,553 median · $77,965 mean) |
| Eligible vs. cert-gated award dollars | $8,050,940 (89%, 102 awards) eligible · $992,956 (11%, 14 awards) gated |
| Monitor vs. priority award dollars | $7,703,688 (85%, 88 awards) monitor · $1,340,208 (15%, 28 awards) priority |
| Historical federal awards for pricing | 1,005 award records cross-referenced |
| Headless scoring fix | 50/83 noisy priority rate cut back to deterministic-guarded precision |
| Notice-body enrichment (1,000/day tier) | 78/78 notices enriched cleanly with graceful fallback to 0 calls on lower tiers |
| Client dashboard logins required | 0 (Monday PDF/Word briefs, pre-built action folders, urgent alerts) |
Rebuilding the workflow on a visual agent platform
Later, I rebuilt the core ingestion, grading, and human-review workflow from scratch on a visual no-code agent platform using a sanitized client profile (~216 lines, ~11 KB) to compare a self-hosted Python pipeline against a governed visual canvas. That second build surfaced three lessons that apply directly to enterprise agent rollouts.
1. Why an 11 KB rulebook broke under RAG
My first pass on the platform loaded the client profile into a Knowledge Base and retrieved chunks per bid. I reversed that decision for the rulebook. Semantic retrieval optimizes for textual similarity, which breaks policy enforcement: searching a “CART Services” notice retrieves the carts catalog chunk and silently misses the disqualifier rule written specifically to catch captioning contracts. Every rule in an 11 KB policy has to fire on every bid, so it belongs in always-on system context. Reserve RAG for scale—a multi-thousand-SKU catalog or long solicitation PDFs—never for a short policy.
2. Routing human review on rubric signals instead of raw confidence
An early version sent bids to human review whenever a model confidence score dropped below 0.6. Switching the Condition block to explicit rubric signals (tier === "monitor" || eligible === false) proved far cleaner, because the rubric already defines every borderline case (ineligible set-asides, OCONUS delivery, truncated titles, and Sources Sought notices). Adding a single toggle let the same flow run as a blocking review card in demos or flag needs_review = true for async triage at volume.
3. Held-out evals (10/10) and two bugs caught on live data
I built a dedicated evaluation workflow around ten worked examples covering every production trap (WOSB caster IDC capped at monitor, forklift preventive maintenance scored priority, incidental dental-furniture casters at low, OCONUS capped at monitor, CART Services and agricultural implements at disqualified). Those examples stayed strictly out of the grader prompt—a strip step removed expected labels before the agent saw each row—so the test measured rule generalization rather than memorization.
The first clean run scored 10/10 exact tier accuracy and 10/10 within ±1 score. Spot-checking a live 96-row cached corpus then caught two real rubric bugs that the ten examples had missed: “Forklift 5K Propane Fuel” was misread as a fuel buy (2/low) until grounded in PSC 3930 (flipping to 7/priority), and off-catalog items carrying an ineligible set-aside were accidentally promoted to monitor until the set-aside rule was fixed to act strictly as a ceiling, never a floor.
Decoupling ingestion from grading mattered just as much under the platform’s 10-call/day demo quota: because flagship casters post under general hardware NAICS 332510 (which a NAICS-only filter misses), one nine-call mix of NAICS and title queries populated a reusable cache table, making unlimited rubric and eval runs free.
| Trade-off | Self-hosted Python pipeline | Visual no-code agent platform |
|---|---|---|
| Best fit | Full control over PDF/XFA rendering, SQLite joins, custom retry/quota logic, no 5-minute run cap | Governed canvas a client ops team can inspect, built-in secret storage, visual HITL review cards |
| Friction encountered | More custom plumbing to maintain (timers, brief builder, schema migrations) | Platform limits: secret-taint redaction on loop aggregates, per-row insert timeouts (fixed via batch inserts), semantic Router vs. deterministic Condition block, LIMIT/OFFSET batching under execution caps |
| What stayed identical | Deterministic eligibility boundaries, PSC-grounded disambiguation, and separating ingestion from scoring | Same rubric, same hard boundaries, and held-out evals keeping rules honest |
One design lesson that evolved in the field
Early on, I treated “push, not pull—never build a portal” as an absolute rule because a busy general manager will not check a dashboard. Later, as operations evolved toward hiring a dedicated bid coordinator, that rule sharpened: push vs. pull is about who sits in the chair. Busy principals still get the Monday brief in their inbox; dedicated operators need a structured workbench. Keeping the database canonical and separating delivery surfaces from core state made supporting both straightforward.
Where this pattern transfers
Replace federal procurement notices with commercial RFPs, healthcare or municipal grants, insurance tenders, freight/logistics bids, or regulatory compliance filings, and the exact same architecture applies. Small and mid-sized operations teams rarely fail because an LLM is not smart enough. They fail because teams try to replace deterministic eligibility rules with prompts, force RAG onto a short policy that must fire every time, ship dashboards nobody logs into, or trust automated checks without looking at the output a human actually receives.
New posts by email
New posts and case studies, sent when they're published. Unsubscribe anytime.
About the Author
Carlos Granier is a Tech Founder, CTO, and AI Strategist with 25 years of experience building at the intersection of technology and business. He co-founded Pongalo, one of the first US Hispanic OTT platforms, and built a YouTube MCN to 200M+ monthly views. He now helps founders and executives implement AI as practical infrastructure. Based in Miami, Florida.
Let's Connect
If you want to work together , or just say hi, email me at blog-inbound@cgranier.com or reach out on any of these:
- X (Twitter) /
- Threads /
- Instagram /
- GitHub /