Invoke LLMs from SQL with the AI SQL Function | Spice.ai Demo
In this demo, we introduce AI SQL Functions, a powerful new capability in Spice.ai v1.8 that lets you call LLMs directly within SQL queries - no custom pipelines, SDKs, or external APIs required. With AI SQL Functions, you can transform, summarize, or translate query results inline with a single SQL statement. This makes it easy to apply LLM analysis to large datasets, search results, or streaming data, all inside your existing SQL workflows. In this walkthrough, you’ll learn how to: - Configure models in your spicepod.yaml (OpenAI, Anthropic, Bedrock, Hugging Face, or local models) - Use the AI() SQL function to invoke completions directly from queries - Combine vector search, full-text search (BM25), and reciprocal rank fusion (RRF) for hybrid search - Apply LLMs inline for summarization, translation, or classification at scale - Inspect the query explain plan for distributed vector and text search execution 📘 Learn more: - AI SQL Function docs: https://spiceai.org/docs/reference/sql/ai - AI SQL Function cookbook: https://github.com/spiceai/cookbook/blob/trunk/ai/README.md 💬 Questions? Reach out to us on Discord: https://discord.gg/kZnTfneP5u
Download
0 formatsNo download links available.