Inspiration

When the Red Sea shipping crisis tripled container rates, prediction markets had priced 70%+ disruption odds five weeks earlier. When the 2025 tariff rounds hit, the markets crossed 60% three weeks before the announcement. Traders saw all of it coming. The coffee shop that roasts Brazilian beans found out from an invoice.

That asymmetry is what inspired Foresight. The signal already exists, in public, for free, and it is measurably good: Polymarket's own calibration page reports 94.1% accuracy one week before resolution and 90.1% a full month out (polymarket.com/accuracy). It is just written in a language (probabilities, order books, resolution criteria) that nobody running a taqueria has time to learn. I built the translation layer.

What it does

A small business owner describes their shop once, in plain English: "I run a coffee shop in Austin. Beans from Brazil, cups from China, a variable-rate loan on the roaster." Foresight turns that into a structured exposure profile, matches it against live prediction markets every day, and delivers a morning briefing a busy owner can act on in ninety seconds.

Every alert answers three questions: what's happening, why it matters to you, and what you can do about it (a concrete, cheap action: lock a forward contract, pre-buy cups, pad the guac price before the menu reprint). Three things make it different:

  • Provenance on every claim. Flip any alert to see the actual market, live probability, 14-day price history, volume traded, and the sentence you told us that made it match you. I never say "trust the AI."
  • Simple mode. A toggle, like a light-mode switch, for owners who do not speak in percentages. "71%" becomes "71 out of 100 chance," jargon disappears, the recommended action stays front and center.
  • A spoken briefing. One tap reads the day's top signal out loud while the owner opens the shop.

How I built it

Five-stage pipeline: Ingest → Match → Synthesize → Deliver → Learn. A Node/Express backend pulls live markets from Polymarket's public Gamma API (volume-ranked, cached), scores them against the owner's exposures with keyword and synonym-family matching, then runs a three-agent LLM chain (Signal Analyst → Merchant Strategist → Feasibility Check) to produce the plain-language digest. Provenance numbers are always code-owned from real API data; the LLM writes narrative, never numbers of record. The front end is dependency-free vanilla JS with hand-built SVG sparklines, and the pitch site doubles as the technical writeup with a presenter mode for live demos.

Every stage degrades gracefully: live API → cache → bundled data, and LLM synthesis falls back to deterministic templates, so the demo works offline with zero API keys.

AI disclosure: I used Claude (Anthropic) as a coding assistant for code and copy throughout the build. Runtime synthesis uses the Claude/Gemini APIs when a key is provided. The three demo businesses ship with an illustrative dataset modeled on real Polymarket/Kalshi contract styles; the live endpoints pull real market data.

Challenges I ran into

  • Polymarket's API has sharp edges. Text search silently returns only closed markets unless you pass events_status=active, and volume ranking needs order=volumeNum, not order=volume. I found both by testing against the live API and built a 10-minute cache plus fallbacks around it.
  • Making one product serve two audiences. Judges want provenance, confidence scores, and architecture; a shop owner wants "should I buy extra cups?" Simple mode was the answer, and getting the plain-language versions right (rewriting every percentage, delta, and label) took as much care as the pipeline.
  • Trustworthy AI advice. Early digests read like confident guesses. The fix was architectural: the LLM is never allowed to state a number the code did not fetch, and every alert links back to its source market.

Accomplishments that I am proud of

  • Real live Polymarket data flowing through the full pipeline into schema-validated briefings.
  • A product a non-technical owner can genuinely use: one conversation to set up, one toggle to simplify, one tap to hear the briefing.
  • The whole thing runs with npm install && npm start, zero env vars, and cannot break on stage.

What I learned

Prediction markets are an underused public good: startlingly accurate, free to read, and locked behind trader jargon. The hard part of "AI for small business" is not the model, it is trust and translation. Receipts beat confidence scores, and "71 out of 100" beats "71%" for the people this is actually for.

What's next for Foresight

  • Delivery channels: SMS and email digests (the dashboard should be optional), plus multi-language briefings for immigrant-owned shops.
  • Real price history from the CLOB API instead of interpolated sparklines, and Kalshi as a second live source.
  • A public track record page: when markets resolve, show what the product flagged and when.
  • The Learn stage: owner feedback ("this mattered" / "not relevant") re-weighting the matcher over time.

Built With

Share this project:

Updates