Overview

Prophet is a HackPrinceton system for creating and operating AI-driven prediction markets from emerging events on X. I designed and implemented the Python path from raw social posts to actionable market events: ingestion, signal weighting, clustering, market generation, resolution checks, and service integration.

Resume highlights

  • Contributed to an autonomous prediction-market platform integrating xAI Grok event detection, OpenRouter trading agents, and Solana smart contracts for on-chain market creation and trading at HackPrinceton.
  • Built a 4-route Flask pipeline processing up to 40 X posts/min by weighting 7 signals and clustering 10+ posts.

Event-to-market pipeline

I built the pipeline that normalized posts and engagement metadata, generated sentence embeddings, weighted signals by recency and engagement, and grouped related events with KMeans and cosine similarity. Qualifying clusters became candidate markets only after passing volume, weight, and suitability thresholds.

I integrated Grok calls that converted each cluster into a clear binary market question, estimated its initial probability, proposed a resolution time, and checked whether open markets had resolved. The engine emitted structured create and resolve actions over WebSockets.

System integration

I defined the boundary between the market engine and the rest of the system. Structured WebSocket actions let independently developed exchange, agent, and on-chain components consume market events without coupling those systems to the ingestion and clustering implementation.

Implementation notes

  • A rolling buffer, recency decay, and engagement weighting prioritized timely, higher-signal posts.
  • Sentence embeddings, cosine similarity, and KMeans connected new posts to existing markets or promoted sufficiently strong clusters.
  • Suitability checks filtered advertising, spam, explicit content, and events that had already concluded.
  • Structured create and resolve actions gave downstream services a stable integration contract.

Project details

Language
Python
Signal processing
Sentence embeddings, cosine similarity, KMeans, and weighted event scoring
Market generation
Grok-assisted questions, probabilities, resolution times, and status checks
Integration
Flask engine service and structured WebSocket actions
Context
HackPrinceton 2025