Live Application: https://zorq-12dk.onrender.com


Inspiration

Before writing a single line of code for Zorq, I studied the winning projects from the previous year’s Qloo LLM Hackathon—specifically GeoTaste ("Your Business Consultant Agent", which transformed raw geographic locations into competitive business intelligence and interactive visualizations using Qloo’s global database), Alloy ("The Cultural Due Diligence Engine", which replaced executive gut-feel in high-stakes corporate mergers with a quantitative Cultural Compatibility Score), and Zesty ("The Unrecommendation Engine", which broke users out of algorithmic popularity bubbles).

Looking at those winners side by side, a massive realization clicked for us:

  • GeoTaste proved that Qloo could evaluate a single business in a physical location.
  • Alloy proved that Qloo could mathematically score cultural compatibility between two entities to de-risk multi-million-dollar commitments.
  • Zesty proved that Qloo could defeat the generic popularity trap.

I asked ourselves: What happens when you unite all three paradigms to solve one of the most expensive, broken problems in the physical world—commercial placemaking and urban curation?

When developers, REITs, and city planners program a physical district or mixed-use building, they don't lease to a single isolated venue; they curate an ecosystem of 4 to 6 co-existing spaces. Yet billions of dollars in 5-to-15-year commercial leases are still signed based on broker intuition, raw foot-traffic headcounts, or copying a tenant mix that worked in another city. And if you ask a standard LLM what to build on a street corner, it falls straight into the popularity trap—spitting out generic clichés like "artisanal sourdough bakery + craft cocktail bar + modern coworking hub" with zero neighborhood awareness.

Inspired by how GeoTaste grounded location analysis and how Alloy quantified compatibility, I built Zorq: an autonomous cultural composition agent and deterministic mathematical engine that moves beyond single-item recommendation ($A \text{ vs. } B$) to solve Ecosystem Composition ($A + B + C + D$)—answering with mathematical proof: "What combination of people, culture, and belonging should this physical place host, and why?"


What it does

Zorq (live at https://zorq-12dk.onrender.com) is an end-to-end cultural composition intelligence platform that transforms a physical site brief into a board-ready, evidence-bound Place Blueprint.

Instead of acting as a conversational wrapper around an API, Zorq guides urban planners, developers, and venue operators through a 6-Stage Protected Scientific Workflow designed in an architectural "ink-on-paper" drafting aesthetic:

  1. S0 — Site Brief & Real-Time Qloo Tag Resolution: Users launch curated evaluation presets (Crosby St, SoHo, Lower Broadway, Nashville, or our honest control site Reading Terminal Market, Philadelphia) or input a custom street address with usable square footage, operational goals, physical constraints (No late night, No loud venue, Ground-floor only), and admired anchor venues. As users type their goals, a contextual tag rail resolves their natural language into canonical Qloo cultural tags in real time.
  2. S1 — Investigation, Live Agent Ledger & Frozen Prior Lock: The split-second a brief is submitted—before a single external byte is fetched—Zorq locks an unassisted Frozen LLM Prior ("No cultural data used") into memory as a pre-registered scientific hypothesis. A real-time Server-Sent Events (SSE) Live Agent Ledger streams every [Qloo], [Compute], and [LLM] operation with millisecond durations and budget tracking while rendering Qloo's urn:heatmap locality taste concentrations and a Cultural DNA Strip (Cleveland dumbbell dot plots contrasting neighborhood vs. city-wide affinity across Artists, Films, and Brands).
  3. S2 — Cultural Graph & Competing Compositions: Zorq generates a candidate pool via bidirectional Qloo hops (Place → Culture → Place) and evaluates every role-valid subset (e.g., all $\binom{10}{5} = 252$ combinations). It pits the Frozen Prior ($P$) against three engine-built rivals ($A, B, C$) across three deterministic metrics: Exact Null-Model Coherence Percentile, Local Distinctiveness, and the Weakest Link. An interactive client-side slider ($w \in [0, 1]$) lets operators dynamically balance Familiar Coherence against Local Distinctiveness.
  4. S3 — Connections & Map of Meaning: Nodes are spatially arranged via Multidimensional Scaling (MDS) of $(1 - \text{edge strength})$ so canvas distance reflects true cultural proximity. Clicking any edge opens the Evidence Drawer, revealing shared Qloo cultural entities weighted by Inverse Document Frequency (IDF)—suppressing ubiquitous mainstream noise (like Taylor Swift or Starbucks) to surface genuine subcultural bridges. Operators can swap components in the Replace Panel and preview real-time $\Delta\text{Coherence}$ before committing.
  5. S4 — Challenge the Plan (Popperian Self-Falsification): Zorq actively attempts to break its own winning composition across five automated adversarial attacks: Ablation (removing the primary anchor), Substitution, Bridge the Weakest Link (querying Qloo for cross-domain cultural connectors), Catchment Shift (tightening/expanding the geographic radius), and Rival Check (sweeping $w \in [0, 1]$). The deterministic engine issues a binding code verdict: Survived, Revised, or Replaced.
  6. S5 — Evidence-Bound Place Blueprint & Without-Qloo Comparison: Outputs a Tufte-style architectural blueprint featuring square-footage allocations (with an 85% circulation allowance), automatic Role-Preserving Downshifts when space or noise constraints are triggered (e.g., "Cinema downshifts to Micro-Screening Room"), superscript Margin Receipts linking every claim to a 3-dot Qloo provenance chain, and a Without-Qloo Compare Modal that proves exactly what Qloo's empirical data changed—or honestly confirms when the baseline intuition held true.

The Role & Importance of Qloo (With System Architecture)

Qloo is not a post-processing lookup or a decorative badge in Zorq—Qloo is the empirical substrate of the entire state machine. Without Qloo, all inter-component graph edges vanish, local-vs-city distinctiveness collapses to zero, 3-dot provenance chains disappear, and the system intentionally halts into a typed SERVICE_UNAVAILABLE state rather than fabricating fake cultural scores.

Tripartite System Architecture

Zorq enforces a strict separation between Empirical Data (Qloo), Mathematical Truth (TypeScript Engine), and Narrative Interpretation (Agent Controller):

┌──────────────────────────────────────────────────────────────────────────────┐
│ 1. QLOO CULTURAL INTELLIGENCE LAYER (Empirical Ground Truth)                 │
│ ──────────────────────────────────────────────────────────────────────────── │
│ • qloo_capabilities      ──► Runtime gateway diagnostics & contract checksum │
│ • Locality (urn:heatmap) ──► Spatial taste density around site coordinates   │
│ • Entity & Tag Search    ──► Resolves admired venues & live brief concepts   │
│ • Place → Culture Hops   ──► Extracts local Artists, Films, Brands, Tags     │
│ • Culture → Place Hops   ──► Discovers culturally bridged venue candidates   │
│ • Multi-Scale Insights   ──► Site-scale (V_site) vs. City-scale (V_city)     │
│ • Second-Route Probes    ──► Independent triangulation & weakest-link bridge │
└──────────────────────────────────────┬───────────────────────────────────────┘
                                       │ Raw Affinity Vectors & Entity Graphs
                                       ▼
┌──────────────────────────────────────────────────────────────────────────────┐
│ 2. ZORQ DETERMINISTIC ENGINE (TypeScript Mathematical Kernel)                │
│ ──────────────────────────────────────────────────────────────────────────── │
│ • IDF Entity Weighting   ──► weight(e) = w_e × ln(1 + N / df(e))             │
│ • Edge Cosine Similarity ──► Computes pairwise compatibility across pool     │
│ • Exact Null-Model Rank  ──► Enumerates all role-valid subsets (e.g., 252)   │
│ • Local Distinctiveness  ──► d_k = 1 - cosine(V_site, V_city)                │
│ • Triangulation Grading  ──► Worst-wins cap rule (Grade A / B / C)           │
│ • Constraint Fitting     ──► 85% net sq ft allocation & format downshifting  │
└──────────────────────────────────────┬───────────────────────────────────────┘
                                       │ Verified Scores, Percentiles & Verdicts
                                       ▼
┌──────────────────────────────────────────────────────────────────────────────┐
│ 3. AGENT CONTROLLER & PROTECTED UI (Rapid Router / Qwen 3.7 Flash + React)   │
│ ──────────────────────────────────────────────────────────────────────────── │
│ • Locks write-once Frozen Prior BEFORE any Qloo calls execute                │
│ • Orchestrates bounded Qloo probes (≤ 180 target, 200 ceiling, 6 concurrent) │
│ • Executes 5 Popperian self-falsification attacks in S4                      │
│ • Authors narrative rationale strictly bound to verified Qloo Evidence IDs   │
└──────────────────────────────────────────────────────────────────────────────┘

Deep-Dive: How Qloo Powers Every Stage of the Pipeline

[S0: User Brief] ──► Qloo Tag & Entity Search (Live autocomplete & anchor IDs)
       │
[S1: Prior Lock] ──► Qloo urn:heatmap + Place→Culture (Site vs. City DNA Strip)
       │
[S2: The Field]  ──► Qloo Culture→Place + Taste Neighborhoods (252 subset graph)
       │
[S3: Meaning Map]──► Qloo Second-Route Triangulation (IDF shared entity drawer)
       │
[S4: Challenge]  ──► Qloo Bridge Probes & Catchment Shift (Radius perturbation)
       │
[S5: Blueprint]  ──► 3-Dot Qloo Provenance Receipts & Without-Qloo Slope Chart

Qloo Capability How Zorq Utilizes It Where It Surfaces in the Product
qloo_capabilities Runtime diagnostic probe verifying gateway readiness, supported operations, and contract checksums. S1 Live Agent Ledger diagnostic status check.
Locality & Heatmap (urn:heatmap) Quantifies spatial audience taste concentration around the target latitude/longitude. S1 Site Cultural Read Map monochrome halftone heat dots.
Entity & Place Search Resolves user-entered "Places I admire" and discovers surrounding local anchor venues. S0 Brief Card autocomplete & S1 Anchor Pins (A–E).
Canonical Tag Resolution Translates natural-language operational goals into canonical Qloo tag URNs in real time. S0 Interactive Tag Rail & component provenance metadata.
Place $\leftrightarrow$ Culture Bidirectional Hops Extracts the cultural fingerprint of local anchors (Place → Culture) and maps those affinities into new venue candidates (Culture → Place). S1 Cultural DNA Strip & S2 Candidate Pool Generation.
Multi-Scale Place Insights Queries taste vectors at both tight neighborhood catchment ($V_k^{\text{site}}$) and broad metropolitan scale ($V_k^{\text{city}}$). S2 Local Distinctiveness ($d_k$) metric & Dynamic Dial ($w \in [0,1]$).
Taste Neighborhoods ($N_k$) Pulls multi-domain affinity vectors for every candidate to compute IDF-weighted pairwise cosine similarity. S2 Competing Cards & S3 MDS Map of Meaning graph edges.
Second-Route Triangulation Runs independent verification queries on finalist pairs to classify links as Confirmed, Contested, or Thin. S3 Calibrated Line Fluency & S5 Evidence Grade (A/B/C).
Bridge & Replacement Probes Queries Qloo for cross-domain cultural entities capable of bridging the weakest pair or substituting a node. S3 Replace Panel & S4 Challenge Attack #3 (Bridge Weakest Link).

How I built it

Building Zorq required a disciplined combination of multi-agent software engineering, deterministic mathematical modeling, frontier reasoning models for architectural documentation, and strict human-in-the-loop engineering decisions:

  • Core Stack & Runtime: I built Zorq as a unified, single-origin TypeScript full-stack application (Node.js $\ge 22.19$, Express, React, Vite) packaged inside a hardened multi-stage Docker container and deployed on Render (https://zorq-12dk.onrender.com).
  • Qloo Cultural Intelligence Integration: I engineered a dedicated, budget-governed Qloo gateway layer (QlooCallBudget) that manages concurrency (capped at 6 parallel requests), enforces a strict ceiling of 200 lookups per run (targeting $\le 180$), caches responses with a 6-hour TTL, and streams every API transaction to the frontend via Server-Sent Events (SSE).
  • Agentic Development with OpenCode: I utilized OpenCode configured with structured preflight reasoning workflows to architect and iterate on the separation between our deterministic TypeScript math kernels (src/server/engine/) and the live agent controller (Rapid Router $\rightarrow$ Qwen 3.7 Flash), as well as building our Vitest unit and integration verification suites.
  • Gemini 4 Argon for Technical Documentation & Specification Synthesis: I leveraged Gemini 4 Argon to synthesize our mathematical formulas, audit our 6-stage state transitions, and structure our comprehensive architectural documentation, system diagrams, and provenance specifications.
  • Human Decision-Making & Domain Engineering: Every foundational architectural guardrail was a deliberate human decision. I decided that an LLM must never invent or author a compatibility score. I designed the exact null-model combinatorics, the IDF entity weighting to strip out mainstream bias, the Popperian self-falsification protocol in Stage 4, the Tufte-inspired "ink-on-paper" visual language with MapLibre GL and MapTiler, and the Honest Control mechanism on Reading Terminal Market so the system proves its scientific integrity even when the baseline hypothesis doesn't need changing.
  • Persistence Layer: I integrated Turso (@libsql/client / SQLite) to persist run states, append-only ledger events, and shareable blueprint snapshots, paired with an automatic graceful fallback to an in-memory store (MemoryStore) for zero-friction local evaluation.

Challenges I ran into

Building a real-time, mathematically rigorous spatial and cultural intelligence system exposed tangible infrastructure and latency bottlenecks that I had to engineer around:

  1. Initial Map Rendering & Tile Hydration Latency: Loading the interactive MapLibre GL canvas alongside custom high-legibility grayscale vector tiles from MapTiler and overlaying Qloo's spatial urn:heatmap halftone dot layers caused noticeable initial load times on first paint. Coordinating geocoding autocomplete, dynamic catchment radius rings, and interactive anchor pins (A–E) without blocking the main UI thread required careful asynchronous hydration.
  2. Round-Trip Latency on the Qloo-Driven Interactive Tag Rail: In Stage 0, as the user types their operational goal, Zorq dynamically suggests canonical Qloo cultural tags. Because the client must capture the user's semantic context, send it to the Zorq backend, authenticate and query the external Qloo API over the network, resolve the canonical tag URNs, and return them to the client UI, that multi-hop round trip (Client → Zorq Server → Qloo API → Zorq Server → Client) introduced perceptible latency while typing. I had to implement debouncing, request cancellation, and local TTL caching so rapid keystrokes wouldn't flood the Qloo gateway or stall the interface.
  3. Render Free-Tier Cold Starts: Hosting our full-stack Docker container on Render meant that after periods of inactivity, the container would spin down—causing the very first visit to https://zorq-12dk.onrender.com to suffer a heavy cold-start delay while the Node.js runtime and static assets initialized. To solve this practically for judges and operators, I engineered a lightweight /healthz diagnostic endpoint and deployed an automated GitHub Actions cron workflow (health-ping.yml) that pings the server every 10 minutes to keep the instance warm and responsive.

Accomplishments that we're proud of

  • Zero Hallucinated Numbers (100% Deterministic Scoring): In an era where most AI apps ask an LLM to "rate this idea from 1 to 100," not a single metric in Zorq is authored by an LLM. Every coherence percentile, cosine edge weight, and local distinctiveness score is computed deterministically in TypeScript from raw Qloo taste vectors.
  • Replacing Opaque Spinners with a Live Audit Ledger: Because deep cultural research takes puluhan of Qloo API calls across multiple hops (Place → Culture → Place, multi-scale vectors, triangulation), a standard loading spinner would make the app feel slow or broken. Turning that wait time into the S1 Live Agent Ledger—streaming real-time [Qloo], [Compute], and [LLM] events with millisecond timings and live lookup budgets—turned network latency into our strongest proof of authenticity.
  • Defeating the "Taylor Swift / Starbucks" Mainstream Bias via IDF: Early on, two venues would appear "culturally compatible" simply because audiences at both places liked globally ubiquitous entities. Implementing Inverse Document Frequency (IDF) weighting across the candidate pool immediately suppressed mainstream noise and surfaced hyper-specific subcultural bridges (e.g., independent vinyl labels, niche architectural movements, specialty roasters) in the S3 Evidence Drawer.
  • True Scientific Pre-Registration (The Frozen Prior & Honest Control): Locking the unassisted LLM Prior before any Qloo lookup occurs—and proving on our Philadelphia Reading Terminal Market preset that Zorq will honestly report "Here, the evidence changed nothing" when the baseline is already sound—elevates Zorq from a persuasive pitch generator to a trustworthy scientific instrument.
  • Translating Cultural Vectors into Physical Square Footage: Bridging abstract cultural graph math with physical architectural constraints—automatically calculating an 85% circulation allowance and executing Role-Preserving Downshifts (turning a full cinema into a micro-screening room when square footage or noise limits are tight)—makes the S5 Place Blueprint immediately usable by real estate teams.

What I learned

  • Raw Affinity Scores Lie Without Corpus Normalization: When you pull cultural taste vectors for physical venues, high-popularity entities dominate the raw affinity weights. I learned practically that cosine similarity on raw taste vectors produces homogenized recommendations unless you normalize by Inverse Document Frequency ($w_e \times \text{idf}(e)$) and contrast site-scale vectors ($V_{\text{site}}$) against city-scale baselines ($V_{\text{city}}$).
  • Bounded Agentic Loops Beat Unconstrained Autonomy: Giving an LLM unconstrained tool-calling access to a rich graph API like Qloo quickly leads to runaway API usage, high latency, and circular reasoning. Enforcing hard operational guardrails ($\le 3$ planner turns, $\le 2$ mutation rounds, a hard 200-call Qloo budget ceiling, and a $\$2.00$ LLM cost cap) made our agent faster, predictable, and production-safe.
  • Adversarial Self-Falsification Builds Executive Trust: Real estate developers and municipal boards are naturally skeptical of AI recommendations. I learned that showing a user how the system tried to break its own plan in Stage 4 (removing the anchor, shifting the catchment radius, probing the weakest link) builds ten times more confidence than only showing a polished final slide.
  • Designing for Multi-Hop API Latency Requires Architectural Empathy: When every user action triggers multi-scale geospatial and cultural graph lookups across external APIs, frontend UX and backend concurrency management become inseparable. Streaming partial state transitions over SSE and caching canonical Qloo entity/tag resolutions were essential lessons in building responsive agentic interfaces.

What's next for Zorq

  1. Temporal & Daypart Cultural Choreography (24-Hour Ecosystem Simulation): A street corner has a completely different cultural pulse at 8:00 AM, 2:00 PM, and 11:00 PM. Next, I are expanding Zorq's deterministic engine to model daypart handoffs—proving how a morning specialty coffee anchor hands its specific cultural audience off to an afternoon design bookstore, an evening independent bistro, and a late-night analog listening lounge.
  2. Multi-Parcel District & Corridor Master-Planning: Scaling Zorq from single mixed-use footprints (4–6 roles) to entire city blocks and revitalization corridors (25–50+ storefronts), using constrained graph partitioning on Qloo taste vectors to prevent tenant cannibalization across adjacent parcels.
  3. BIM, CAD & Spatial AR Export (DXF / IFC / Lens Studio): Allowing architects and urban designers to export the S5 Place Blueprint directly into AutoCAD/Revit floorplates and walk through the proposed cultural ecosystem on-site using spatial AR glasses.
  4. Post-Occupancy Empirical Feedback Loop: Connecting live POS transaction velocity, event ticketing, and post-opening Qloo locality heat shifts back into Zorq's Turso database—continuously calibrating our null-model coherence weights against multi-year commercial lease survival rates.

Built With

  • maplibre
  • maptiler
  • multidimensional-scaling
  • qloo
  • qwen
  • render
  • turso
Share this project:

Updates

Submission history