Inspiration

In the Netherlands, grid congestion is the single biggest bottleneck to the energy transition. Consider Ruud, who runs a metalworking shop in Brabant and wants to install 60 kW of rooftop solar. His installer tells him the grid is full. Nobody can tell him whether that is genuinely true, for how long, or what he can do instead.

The answers exist, but they are scattered across fragmented Dutch grid-operator registers, technical PDFs, and bi-monthly capacity updates (codeerprognoses), written in regulatory jargon that doesn't answer the commercial question. We built GridQueue to give business owners, solar installers, and energy developers instant, verifiable answers grounded in grid operators' official documents—or an honest, refusal with actionable phone inquiry scripts.


What it does

Enter a Dutch postcode, a power capacity (kW), and a connection direction. GridQueue provides a direction-aware answer in the operator's own words:

  • Per-Direction Evaluation: Congestion is registered separately for feed-in (teruglevering) and consumption (afname). For the exact same address, GridQueue can report "waiting list only" for solar export while simultaneously confirming "250 kW available" for facility consumption. Merging directions is invalid by contract.
  • Every Date with its Binding Status: Indicative dates (codeerprognose) are tagged with a "Non-binding forecast" chip because the operator's own sentence says so, accompanied by the verbatim Dutch quote, source URL, retrieval timestamp, and SHA-256 document hash.
  • Actionable Routes, Not Dead Ends: If firm capacity is congested, GridQueue ranks non-firm connections (CBC / non-firm ATO), flex contracts, and congestion management participation with verbatim application instructions and direct operator contacts.
  • Refusal as a Safety Feature: If no official position survives verification, GridQueue returns NO_OFFICIAL_POSITION_FOUND ("We will not guess") along with a generated Dutch phone script formulated in the operator's terminology.

How we built it

GridQueue is architected as an end-to-end, zero-hallucination verification pipeline:

  1. S1 Resolve Location: Maps postcodes (e.g., 5612 AB → Enexis, Eindhoven; 1012 → Liander, Amsterdam) using a cited lookup table. Deterministic, zero LLM calls.
  2. S2 Live Retrieval (Tavily Search & Extract): Queries grid operators' official domains (enexis.nl, liander.nl, stedin.net) via the Tavily Search API, extracting official investment plans and congestion notices via Tavily Extract. Every document receives an immediate SHA-256 hash.
  3. S3 Structured Extraction (NVIDIA Nemotron on Nebius Token Factory): Uses nvidia/Nemotron-3-Ultra-550b-a55b via Nebius Token Factory to extract structured claims against our strict JSON Schema (schemas/core-schemas.json).
  4. S5 Deterministic Citation Gate: Plain Python with zero LLM calls and network disabled by test. The gate cryptographically verifies that every proposed date, capacity number, and route is literally present in the cited document text. If a quote is absent or unverified, it is stripped.
  5. UI & Telemetry: Built with React 18 and TypeScript. Displays Direction Cards with verbatim quote pills, binding chips, and an append-only audit trail logging every Tavily search, extract, and model completion to runs/ledger.jsonl.

The Proof (Measured A/B Benchmark)

To prove that GridQueue eliminates hallucinations, we benchmarked our Deterministic Gate (make ab) over an adversarial test set containing 29 hand-crafted edge cases:

Metric Gate OFF Gate ON (GridQueue)
Fabricated dates reaching the answer 10 / 10 0 / 10
Fabricated kW figures reaching the answer 6 / 6 0 / 6
Fabricated application routes reaching the answer 5 / 5 0 / 5
Total fabricated values blocked — 21 / 21 (100%)
Genuine operator values preserved 10 / 10 10 / 10 (100%)
Misattributed values (real quote, wrong meaning) 5 / 5 4 / 5

Note on transparency: The last row highlights our intentional design contract: the gate verifies that a number or date is stated, not its contextual interpretation. This is why the verbatim Dutch quote and SHA-256 hash are always prominently displayed alongside the value.


Challenges we ran into

  • Constrained Decoding & Reasoning Models: On Nebius Token Factory, Nemotron-3-Ultra-550b is an advanced reasoning model whose internal chain-of-thought tokens count against the token budget. Sizing the completion window to 8,192 tokens and pairing response_format={"type": "json_object"} with strict prompt schemas reduced inference latency to 3.3–5.7 seconds while eliminating guided decoding loops.
  • Literal Dutch Parsing: Accurately matching Dutch technical numbers ("1.250 kW" = 1,250 kW, not 1.25 kW) and non-standard calendar dates ("derde kwartaal van 2028") required building custom bi-lingual normalizers to ensure strict substring containment in the gate.
  • Directional Separation: Ensuring feed-in and consumption were never conflated across database queries, extraction schemas, and UI states.

Accomplishments we're proud of

  • 100% Elimination of Hallucinated Dates: 21 of 21 fabricated claims blocked in benchmark testing with zero model calls in the gate.
  • Live Runtime Integration: Verified live end-to-end execution on Nebius Token Factory (nvidia/Nemotron-3-Ultra-550b-a55b) and Tavily API, producing real telemetry ledger traces over official Enexis and Liander documents.
  • Production Rigor: 236 automated unit and integration tests passing in CI, with a fully responsive static demo deployed to GitHub Pages.

What we learned

  • Provenance as a Core Feature: Energy installers and business owners do not trust confident AI text; they trust a dated, verbatim quote from their grid operator backed by a cryptographic hash.
  • Refusal Requires First-Class Design: Knowing when an AI system must say "we don't know" is just as important as generating answers. Giving users the exact phone inquiry script transforms an AI refusal into a practical next step.

What's next

  • Ingesting daily automated diffs across all five Dutch DSOs (Enexis, Liander, Stedin, Coteq, Rendo) to track moving forecast revisions over time.
  • Expanding the localized citation gate architecture to other European regions experiencing severe grid congestion (e.g., Germany, UK, and Belgium).

Built With

  • artificial-intelligence
  • clean-energy
  • docker
  • fastapi
  • ffmpeg
  • github
  • infrastructure
  • json-schema
  • nebius-token-factory
  • nvidia-nemotron
  • openai-api
  • playwright
  • pydantic
  • pytest
  • python
  • react
  • renewable-energy
  • structured-outputs
  • tavily-api
  • typescript
  • vite
Share this project:

Updates

Submission history