← Back to Daily Roadside Prose

How Roadside Prose Works

Roadside Prose is not random and it is not pre-written. A new entry is automatically generated once per day from real vanity plate meanings in the GR8 PL8S archive using a secure multi-step pipeline that combines database filtering, server-side logic, AI selection, structured validation, grammar smoothing, and dynamic page rendering.

Step-by-step pipeline

1

Automatic daily generation starts the process

Around midnight, the system automatically creates a new Roadside Prose entry in the background. When a visitor opens the page, the browser simply requests the already-published daily result and renders it.

At that point, the browser is not generating anything itself. It is only loading the published daily entry from the backend.

2

The website calls a secure server-side function

The page makes a secure request from the browser to the server-side system that powers the daily feature. The public page only requests the published daily result and never performs the generation work in the browser.

The important part is that the browser does not call OpenAI directly. That happens only on the server side.

3

The Edge Function wakes up securely

The server-side generation pipeline runs in a managed cloud runtime using TypeScript. Inside that environment, it has access to private configuration values needed to talk to the database and to the AI model securely.

Frontend: HTML / CSS / JavaScript Backend: secure serverless runtime Language: TypeScript Database: cloud database
4

The function gathers plate data from Chris and Sunit's archive

The system queries the main plate archive and gathers the records needed to build prose. For each plate, the useful fields include an internal identifier, the plate text, the interpreted meaning, the image, and quality-related metadata.

It filters out weak or unusable entries, strips parenthetical text from meanings, normalizes spacing, and keeps only records that are useful for sentence generation.

5

A curated pool is built for this generation only

The system does not send the full archive to AI. It first scores and filters the data, then creates a temporary working pool of several hundred strong candidate meanings for that single generation.

That means every daily generation starts from a fresh pool. The pool changes from one edition to the next, which gives the system variety while still keeping the quality reasonably high.

6

The system chooses a target plate count

Before calling AI, the backend picks a target number of meanings to use. This is weighted on purpose:

  • 2 plates sometimes
  • 3 plates most of the time
  • 4 plates sometimes
  • 5 plates rarely

This target is passed into the AI instructions so the model has a strong but flexible structure to aim for.

7

OpenAI gets a structured composition job

The server-side generation layer sends the curated pool to the AI model through a private authenticated API call. Instead of asking vaguely for a sentence, it gives the model a numbered list of slot positions.

{ "slot": 1, "plate_text": "BILT2WN", "meaning": "Built To Win" }

The model is told to return slot numbers only, not raw database IDs and not plate text. That makes the result more reliable than asking the model to return UUIDs.

8

The first AI pass makes creative decisions

In the first pass, the model chooses which meanings to use, what order to put them in, and what connector words to place before, between, and after them.

  • It can select meanings from the numbered pool
  • It can reorder them for better flow
  • It can insert connector words
  • It cannot rewrite the plate meanings themselves
9

The backend validates the AI output

The function does not blindly trust the model. It checks whether the output contains valid slot numbers, uses unique selections, returns an allowed count, and contains usable connector strings.

If the model returns something malformed, the function automatically retries instead of instantly failing.

10

A second AI pass lightly smooths the grammar

Once the meanings and order are locked, the function runs a second, lighter AI pass. This smoothing step is only allowed to adjust prefix words, between words, and suffix words. It is not allowed to change the meanings or reorder them.

11

Server-side cleanup finishes the sentence

After the AI passes, the backend removes redundant prefix duplication like I I Am, normalizes case for connector words like I and I'm, smooths punctuation and spacing, and assembles the final sentence string.

12

The finished result is sent back to the webpage

The server returns a structured response containing the final sentence, connector words, the selected plate records, and the display metadata needed to render the daily entry cleanly.

13

The browser renders the final product live

JavaScript on the daily page takes that response and builds the actual experience: the top sentence line, the row of plate image cards, the italicized connector words, the cleaned plate meanings, and the click-to-enlarge image modal.

System flow

1. Daily generation
A new Roadside Prose is generated automatically once per day
2. Server-side generation layer
A secure server-side runtime handles generation and publishing
3. Database Query
Pulls, filters, cleans, and scores plate meanings from the GR8 PL8S archive
4. Pool Construction
Builds a temporary high-quality pool of about 500 meanings for this generation
5. OpenAI Composition Pass
Chooses slots, reorders meanings, and adds connector words
6. Validation + Retry
Checks the result and retries automatically if the model output is malformed
7. OpenAI Smoothing Pass
Lightly refines only the connector words for more natural flow
8. Daily page rendering
The published sentence, plate cards, connector words, and image enlargement appear on the page

Why this is technically cool

On the surface, Roadside Prose looks like a playful sentence generator. Under the hood, it is a full-stack AI feature that combines frontend event handling, cloud function orchestration, database filtering, structured prompting, AI validation, retry logic, grammar refinement, and dynamic rendering.

Frontend event handling Cloud function orchestration Database filtering Structured prompting AI validation Retry logic Grammar refinement Dynamic rendering

Security and architecture

The public page uses only the information needed to load the published daily entry. The browser talks to the public-facing site layer, the server talks to the AI and database layers, and the private AI and database credentials live only in the server-side environment.