AI Functions in ClickHouse: Upgrade your SQL to the AI age
Blog post from ClickHouse
ClickHouse has introduced beta AI Functions that let SQL queries directly call LLM and embedding providers, allowing classification, extraction, generation, translation, filtering, redaction, embedding, and semantic similarity operations to run alongside data stored in the database. Released incrementally through versions 26.4 to 26.8, these functions use remote provider APIs and return native ClickHouse values, while ClickHouse Cloud offers them as a private-preview plug-and-play feature and open-source deployments require configured credential collections. The approach is intended to reduce the operational complexity of traditional AI and retrieval-augmented generation workflows by keeping data storage, vector indexing, retrieval, and response generation within ClickHouse. Examples using Hacker News data show how the functions can categorize stories, identify incident-related comments, summarize or translate text, and support RAG pipelines through embeddings and vector search. Because LLM calls add latency and token-based costs, ClickHouse provides per-query limits for API calls, input tokens, and output tokens, along with monitoring through query logs and options to either halt or return partial results when quotas are reached. Production use also requires attention to prompt injection, nondeterministic outputs, cost scaling, provider data exposure, HTTPS, and endpoint access controls.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Vector Search | 16 | 265 | 57 | 33 | -89% |
| LLM | 11 | 747 | 162 | 79 | -85% |
| RAG | 5 | 101 | 30 | 23 | -91% |
| MCP | 1 | 2,241 | 148 | 72 | -74% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.