Chapter 8
Oracles for AI Inference
Smart contracts cannot call OpenAI or run PyTorch natively — they need an oracle to deliver external data or computation results on chain. AI inference adds latency, cost, and trust assumptions that price feeds and weather APIs do not. Bringing model outputs on chain is an engineering and economic problem as much as a crypto-native one.
Use cases include dynamic NFT traits that update from live data, insurance triggers based on NLP classification of events, and prediction markets resolved by automated summarization — each with different tolerance for error.
Latency matters: Ethereum block times and oracle update cadence may be too slow for high-frequency trading signals but fine for daily risk scores. L2s and app-specific chains reduce cost for frequent inference updates.