Flock extends DuckDB with a suite of declarative SQL functions for LLM-powered analytics. Run text generation, classification, embedding, filtering, and hybrid search — all from standard SQL — against OpenAI, Azure, Ollama, or Anthropic/Claude. Flock also supports images and audio as first-class data types in your queries.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dais-polymtl/flock/llms.txt
Use this file to discover all available pages before exploring further.
Quickstart
Install Flock and run your first LLM query in under 5 minutes
SQL Functions
Explore llm_complete, llm_filter, llm_embedding, and more
Hybrid Search & RAG
Build end-to-end RAG pipelines with fusion scoring functions
Multimodal Support
Analyze images and transcribe audio directly in SQL queries
What you can do with Flock
Flock makes it possible to call LLMs as part of any SQL query — using the sameSELECT, WHERE, and GROUP BY patterns you already know.
Key features
Four LLM providers
OpenAI, Azure OpenAI, Ollama, and Anthropic/Claude — all through the same SQL API
Aggregate functions
Reduce, rerank, and rank groups of rows using LLMs as GROUP BY aggregates
Structured output
Enforce JSON schemas on LLM responses for reliable downstream processing
LLM observability
Track token usage, API latency, and call counts with flock_get_metrics()
Hybrid search
Combine BM25 and vector scores using RRF, CombSUM, CombMNZ, and more
Browser & WASM
Run Flock-powered workloads in the browser via DuckDB-WASM
Getting started
Install DuckDB
Download DuckDB v1.5.0 or later from duckdb.org/docs/installation.