Inspiration Prediction markets like Polymarket have proven highly efficient for high-volume events (e.g., the US Election, where volume hit $1B+). However, niche geopolitical markets—like specific territorial changes in Ukraine or obscure legislative votes—remain highly inefficient due to information asymmetry, "diplomatic fog," and retail trader bias for dramatic outcomes. We realized that while retail traders chase headlines, informed players using OSINT and historical base rates consistently extract alpha. We built GrokEdge to democratize this institutional-grade intelligence, turning the chaos of geopolitical data into actionable arbitrage signals.
What it does GrokEdge is an autonomous intelligence terminal for prediction markets. You give it a specific query (e.g., "Will Russia capture Kupiansk by Dec 31?"), and it spins up a swarm of specialized AI agents to answer it:
Foundational Data Agent: Cross-references diverse sources (X, Web Search) to establish ground truth facts and current status. Historical Research Agent: leveraging Grok’s reasoning to identify relevant historical precedents (e.g., "Winter sieges in Eastern Europe have an 80% failure rate") to establish a "Base Rate" probability. Prominent Figure Agent (The "Alpha" Detector): Identifies 20+ subject matter experts (OSINT analysts, retired generals, local reporters) specific to the event. Connects to the X API to stream their real-time posts. Uses Grok to filter valid signal from noise, detecting subtle sentiment shifts before they hit the mainstream news. Chrome Extension: Overlays these probabilities and "Alpha Signals" directly onto the Polymarket web interface for seamless trading. How we built it We architected a modular, multi-agent system using Python and Streamlit for the core dashboard:
Brain: We used Grok (via xAI SDK) as the central reasoning engine. Its ability to process real-time world knowledge was crucial for distinguishing credible experts from engagement farmers. Eyes & Ears: We integrated the X API to fetch real-time discourse. We built a robust pipeline ( prominent_figure_service.py ) that handles rate limits and verifies user handles dynamically. UI/UX: We built a reactive Streamlit dashboard that streams agent logs in real-time. We used asynchronous generators to stream "thought processes" (e.g., "Identifying experts...", "Analyzing sentiment...") to the user, making the AI's logic transparent.
Challenges we ran into Identifying "True" Experts: Initally, the LLM would suggest popular accounts that were just noise. We had to implement a rigorous filtering prompt that prioritized "Signal Weight" and "Credibility Score" over follower count. Data Pipeline Integrity: We encountered a critical bug where handle formats (e.g., @user vs user) caused silent failures in the data pipeline. We built a robust normalization layer ( analyze_prominent_figure_tweets.py ) to ensure zero data loss. Streaming UX: Displaying the internal state of three parallel agents without freezing the UI was difficult. We refactored our synchronous blocking code into asynchronous generators to provide a silky-smooth, "Matrix-like" log stream. Accomplishments that we're proud of The "Alpha Signal" Engine: Our system doesn't just summarize tweets; it classifies them. Seeing the dashboard correctly identify a high-confidence "Alpha" signal from a niche OSINT account buried in noise was a huge win. Historical Base Rates: Integrating "Reference Class Forecasting"—a technique used by superforecasters—gives our predictions a statistical backbone that most "AI summary" tools lack. Live Chrome Extension: Bringing this data directly to the point of trade (the Polymarket website) closes the loop from analysis to execution. What we learned Base Rates Matter: In geopolitics, "history doesn't repeat, but it rhymes." Anchoring predictions on historical data often outperforms pure news analysis. Specialization > Generalization: A "Prominent Figure" agent specifically prompted to act like an OSINT researcher drastically outperformed a generic "Search Twitter" tool. Structure is Key: Forcing the LLM to output rigid JSON for every step (Filtering, Analysis, Scoring) allowed us to build reliable downstream analytics like the Probability Pie Chart. What's next for GrokEdge Automated Execution: Integrating wallet signing to automatically execute trades when the calculated edge exceeds a user-defined threshold (e.g., "Buy if edge > 10%"). Satellite Verification: Adding a "Sentinel Agent" to cross-reference claims of troop movements with open SAR (Synthetic Aperture Radar) satellite data. Propaganda Detection: Training a specialized layer to identify and discount bot-farm activity in the X stream.
Log in or sign up for Devpost to join the conversation.