Skip to content

Backport #102922 to 26.4: Adding aiEmbed function - #108982

Merged
fm4v merged 1 commit into
26.4from
backport/26.4/102922
Jul 1, 2026
Merged

fm4v merged 1 commit into
26.4from
backport/26.4/102922

Conversation

@george-larionov

@george-larionov george-larionov commented Jun 30, 2026 •

Copy link
Copy Markdown
Member

Backport of #102922 to 26.4.

Adds aiEmbed(collection, text[, dimensions]), an SQL function that returns a text embedding as Array(Float32). Like the other AI functions it reads its provider, endpoint, model, and API key from a named collection, is gated behind allow_experimental_ai_functions, and participates in the shared per-query quotas. aiEmbed batches up to ai_function_embedding_max_batch_size (default 100) inputs per HTTP request. Supported providers are the OpenAI-compatible ones (OpenAI, vLLM, Ollama, HuggingFace TEI).

Changelog category (leave one):

  • Experimental Feature

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Add aiEmbed function for using LLM APIs to generate embeddings from within ClickHouse.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.4.5.91

Backport of #102922.
`introduced_in` and the `ai_function_embedding_max_batch_size` settings-history
entry are set to 26.4.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [d0c2f2e]

Summary: ✅

@george-larionov
george-larionov marked this pull request as draft June 30, 2026 19:24
@scanhex12

Copy link
Copy Markdown
Member

Are you sure that you need to backport feature?

@george-larionov
george-larionov marked this pull request as ready for review June 30, 2026 19:54
@fm4v
fm4v merged commit c28644b into 26.4 Jul 1, 2026
34 checks passed
@fm4v
fm4v deleted the backport/26.4/102922 branch July 1, 2026 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants