VisionLoop: Tracing What the Market Misses

The inspiration

Financial markets react quickly to headlines, but headlines rarely reveal the full supply-chain story.

When a company announces a new AI accelerator, modem, battery architecture, or infrastructure investment, attention usually concentrates on the company making the announcement. The economically important constraint, however, may sit several layers below it: advanced packaging capacity, optical components, thermal systems, specialty materials, or a qualified supplier that cannot scale quickly.

The opportunity is often not in the headline itself. It is in the transmission path underneath it.

That observation inspired VisionLoop: a supply-chain intelligence workspace that turns transcripts, filings, announcements, and open-ended questions into traceable chains of reasoning.

The market prices the headline. VisionLoop traces what it misses.

Instead of returning another generic AI summary, VisionLoop asks a more demanding question:

What physical bottleneck must become true for this signal to matter, and which validated public companies are exposed to it?


What VisionLoop does

A user can paste a signal, upload a transcript, or ask a question such as:

Who actually benefits from Apple’s C1 chip, beyond the obvious foundry exposure?

VisionLoop then:

  1. Determines whether the question is within the supply-chain analysis scope.
  2. Extracts the primary signal and its physical implications.
  3. Identifies a single binding bottleneck.
  4. Traces the chain through upstream and downstream dependencies.
  5. Searches for public companies exposed to that bottleneck.
  6. Validates company names and exchange-qualified ticker symbols.
  7. Produces both a written thesis and an interactive supply-chain graph.

The result is not just a chat response. It is an editable chain.

Users can select a graph node and ask VisionLoop to:

  • Expand upstream
  • Find alternatives
  • Challenge this hop

Each action continues the conversation while extending or interrogating the same graph. The written analysis and the visual topology remain two views of one underlying chain.


How I built it

VisionLoop is built as two connected systems: an editorial research interface and a structured reasoning backend.

Frontend

The frontend uses:

  • Next.js 14 with the App Router
  • TypeScript
  • Tailwind CSS
  • React Flow for interactive supply-chain graphs
  • A shared domain and UI type system
  • Responsive layouts for desktop, tablet, and mobile

The interface is intentionally monochrome and restrained. Supply-chain analysis is already information-dense, so the design avoids decorative color and emphasizes hierarchy, spacing, typography, and contrast.

The main product surfaces include:

  • A conversational analysis workspace
  • Editable chain graphs
  • A personal analysis library
  • Theme-level merged graphs
  • Opportunity Tracker and Ledger views
  • Multi-persona analysis Rooms
  • Community publishing and derivation pages
  • Persona, account, and administrative settings

Backend

The backend is a Python 3.11+ FastAPI service with Pydantic v2 and SQLAlchemy.

Its reasoning pipeline is divided into explicit stages:

  1. Gate
    Determines whether the question is relevant and whether enough information is available.

  2. Assemble
    Combines the question, optional transcript, existing chain, persona framework, and runtime constraints.

  3. Reason
    Forces the model to converge on one bottleneck before proposing public-company exposure.

  4. Structure
    Converts the reasoning into typed WorkbenchResult and Chain objects.

  5. Validate
    Enforces schema rules, removes unsupported companies, and canonicalizes ticker symbols.

The LLM layer is isolated behind a provider-swappable client using an OpenAI-compatible interface. This keeps the calling code independent from the underlying model provider.

Security master

One of the most important backend components is the securities master.

Models frequently produce plausible-looking but incomplete ticker symbols. A company such as Ibiden might be returned as 4062, even though the canonical identifier should be 4062.T.

VisionLoop therefore treats model-generated tickers only as matching hints. Every company in the final response must resolve against the securities master. The validator:

  • Accepts canonical or unambiguous bare tickers
  • Fuzzy-matches company names
  • Replaces model output with the canonical exchange-qualified ticker
  • Removes companies that cannot be validated
  • Records all corrections and removals in telemetry

No unvalidated ticker is allowed to pass directly into the final analysis.

Telemetry and evaluation

Telemetry is a first-class subsystem rather than an afterthought. Every pipeline stage emits exactly one event containing:

  • Trace ID
  • Module and decision
  • Model used
  • Latency
  • Input and output token counts
  • Structured payloads for replay and diagnosis

I also created an offline golden benchmark covering:

  • NVIDIA Blackwell packaging
  • CoWoS equipment and materials
  • Chinese solid-state battery companies
  • A rare-earth case that should produce an honest empty result

The benchmark checks convergence, validated tickers, banned phrases, JSON validity, call budgets, and refusal behavior.


The hardest challenges

1. Preventing plausible but weak analysis

Language models are very good at producing broad statements such as “investors should watch upstream suppliers.” That sounds intelligent but is not a useful derivation.

I added explicit convergence rules: first identify one binding bottleneck and explain why it binds; only then name a limited number of companies exposed to it.

A runtime-loaded banned-phrase list also catches generic language that signals the model has avoided making a specific claim.

2. Knowing when the correct answer is empty

Forcing every question to produce a stock idea creates hallucinations.

VisionLoop supports an explicit NO_CLEAN_PUBLIC_TARGET outcome. If the available evidence does not support a validated public-company exposure, the system explains what is missing instead of inventing one.

This was a major product lesson: a trustworthy empty answer is more valuable than a confident fictional answer.

3. Keeping the graph and narrative consistent

Early prototypes could display an Apple-related question while accidentally loading an NVIDIA graph through a shared fallback. The prose looked reasonable in isolation, but the complete experience was internally inconsistent.

I replaced implicit fallbacks with explicit mappings between:

  • Conversation
  • Analysis
  • Persona
  • Workbench result
  • Chain graph

Each analysis now owns its chain, and the graph is treated as domain data rather than decorative output.

4. Supporting free-form follow-ups

A structural request such as “trace the upstream suppliers” should grow the graph. A clarifying question such as “what is this supplier’s capacity?” may only need a written response.

That distinction cannot be reliably hardcoded in the frontend. It belongs to the reasoning engine. Designing the product around that boundary helped separate genuine intelligence from pre-scripted demo behavior.

5. Making dense research feel calm

The UI needs to present reasoning steps, evidence, market-pricing status, companies, graph nodes, and follow-up controls without feeling like a technical debugger.

The solution was a disciplined editorial system: Geist typography, a warm monochrome palette, shared semantic tokens, restrained borders, and reusable components for cards, composers, statuses, avatars, modals, and graphs.


What I learned

The graph is not a visualization of the answer

It is part of the answer.

More importantly, it can become an interface for asking better questions. Clicking a bottleneck is often more precise than writing another broad prompt.

Persona design should encode a method

VisionLoop’s analyst personas are not cosmetic writing styles. Each persona represents a reasoning lens, such as semiconductor infrastructure or photonics and physical AI.

A useful persona changes what evidence is prioritized and how a chain is traversed. It should not merely change the tone of the response.

Validation must be part of generation

Post-processing alone is insufficient. The reasoning prompt, structured contract, securities master, repair ladder, and evaluation suite must work together.

Reliability comes from the system around the model, not from one prompt.

Observability improves product quality

Once every stage emitted structured telemetry, failures became explainable:

  • Did the gate reject too aggressively?
  • Did reasoning fail to converge?
  • Did structuring produce invalid JSON?
  • Did the model invent a ticker?
  • Did validation remove all candidates?

That visibility made iteration faster and much more disciplined.

Codex works best as an engineering collaborator

During Build Week, I used Codex to explore the codebase, implement cross-cutting changes, run tests, inspect the live interface, and repeatedly verify that the frontend and backend remained aligned.

The most valuable part was not raw code generation. It was maintaining continuity across product design, domain modeling, backend validation, UI behavior, and regression testing.


What comes next

VisionLoop is currently a working product prototype, not a finished investment platform.

The next steps are:

  • Connect more primary-source ingestion pipelines
  • Add persistent analysis and graph storage
  • Expand the securities master
  • Introduce evidence-level citations
  • Improve graph updates from typed follow-ups
  • Add user-controlled chain cover images
  • Run larger multilingual evaluation suites
  • Measure analyst agreement and divergence
  • Replace mock authentication and community data with production services

The long-term goal is to make supply-chain reasoning inspectable, editable, and reusable.

VisionLoop does not try to predict markets with a single opaque answer. It helps users construct a chain, inspect its assumptions, challenge its bottlenecks, and understand exactly how a primary signal might propagate into a public-company opportunity.

VisionLoop traces chains. It does not give investment advice. Users should verify the evidence before acting.

Built With

Share this project:

Updates