What is Flock?
Flock is a DuckDB extension that deeply integrates LLM and RAG capabilities into OLAP systems. Mix analytics with semantic analysis in SQL using map and reduce functions for generation, classification, embeddings, and more. It runs on native platforms and in the browser via DuckDB-WASM.Integrating LM and IR capabilities in SQL
Flock integrates advanced language models into RDBMSs, enabling powerful tasks like text generation, classification, filtering, and embeddings directly through SQL queries. Streamline your data workflows with AI-driven insights.Administrative Views for Managing Prompts and Models
Treat models and prompts as resources similar to tables. You can CREATE PROMPT(s) and MODEL(s) and iterate on them
without making changes to SQL queries.
Scalar / Map Functions for Tuple and Passage Transformation
Map tuples or text passages to new text, boolean, or JSON values using LLMs to support various types of semantic
analysis such as extraction and classification.
Aggregate / Reduce Functions to Reduce over Tuples and Passages
Use Aggregate / Reduce functions to reduce tuples or text passages using LLMs to support various types of semantic
analysis such as reranking and summarization.
Why use Flock?
- Create reusable models and prompts once, then call them from simple SQL.
- Run LLM workloads next to your data without custom services or glue code.
- Keep results in tables you can join, filter, and visualize with regular DuckDB queries.

