Beyond Quacking: Deep Integration of Language Models and RAG into DuckDB (VLDB Demo 2025)
See the code
DBMS extension for multimodal query processing and optimization.
Explore the docs »
Landing Page
|
Report Bug
|
Request Feature
Flock is an advanced DuckDB extension that seamlessly integrates analytics with semantic analysis through declarative SQL queries. Designed for modern data analysis needs, Flock empowers users to work with structured and unstructured data, combining OLAP workflows with the capabilities of LLMs (Large Language Models) and RAG (Retrieval-Augmented Generation) pipelines.
To cite the project:
@article{10.14778/3750601.3750685,
author = {Dorbani, Anas and Yasser, Sunny and Lin, Jimmy and Mhedhbi, Amine},
title = {Beyond Quacking: Deep Integration of Language Models and RAG into DuckDB},
journal = {Proc. VLDB Endow.},
year = {2025},
volume = {18},
number = {12},
doi = {10.14778/3750601.3750685},
url = {https://doi.org/10.14778/3750601.3750685}
}
flock_get_metrics() for better cost and performance monitoring.context_columns abstraction (with type: 'audio').Flock can be installed in two ways:
Flock is a Community Extension available directly from DuckDB's community catalog.
INSTALL flock FROM community;
LOAD flock;
If you want to build Flock from source or contribute to the project, you can use our automated build script:
Clone the repository with submodules:
git clone --recursive https://github.com/dais-polymtl/flock.git
cd flock
Or if you've already cloned without submodules:
git submodule update --init --recursive
Run the build and run script:
./scripts/build_and_run.sh
This interactive script will guide you through:
The script will automatically detect your system configuration and use the appropriate build tools (Ninja or Make).
The script will launch DuckDB with Flock extension ready to use. Make sure to check the documentation for usage examples.
Requirements for building from source:
Using Flock, you can run semantic analysis tasks directly in DuckDB. For example:
SELECT llm_complete(
{ 'model_name': 'summarizer'},
{ 'prompt_name': 'description-generation', 'context_columns': [{ 'data': product_name }]}
) AS product_description
FROM UNNEST(['Wireless Headphones', 'Gaming Laptop', 'Smart Watch']) AS t(product_name);
Explore more usage examples in the documentation.
If you are a contributor or want to work on Flock itself, see the dedicated Developer Guide for build, testing, and contribution details.
Our roadmap outlines upcoming features and improvements. Stay updated by checking out our detailed plan.
We value your feedback! If you’d like to report an issue or suggest a new feature, please use the links below:
For contributing code or other contributions, please refer to our dedicated Contribution Guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.
This project is under active development by the Data & AI Systems Laboratory (DAIS Lab) at Polytechnique Montréal.
C++
68.0%
Python
29.5%
Shell
1.6%
Beyond Quacking: Deep Integration of Language Models and RAG into DuckDB (VLDB Demo 2025)
See the code
DBMS extension for multimodal query processing and optimization.
Explore the docs »
Landing Page
|
Report Bug
|
Request Feature
Flock is an advanced DuckDB extension that seamlessly integrates analytics with semantic analysis through declarative SQL queries. Designed for modern data analysis needs, Flock empowers users to work with structured and unstructured data, combining OLAP workflows with the capabilities of LLMs (Large Language Models) and RAG (Retrieval-Augmented Generation) pipelines.
To cite the project:
@article{10.14778/3750601.3750685,
author = {Dorbani, Anas and Yasser, Sunny and Lin, Jimmy and Mhedhbi, Amine},
title = {Beyond Quacking: Deep Integration of Language Models and RAG into DuckDB},
journal = {Proc. VLDB Endow.},
year = {2025},
volume = {18},
number = {12},
doi = {10.14778/3750601.3750685},
url = {https://doi.org/10.14778/3750601.3750685}
}
flock_get_metrics() for better cost and performance monitoring.context_columns abstraction (with type: 'audio').Flock can be installed in two ways:
Flock is a Community Extension available directly from DuckDB's community catalog.
INSTALL flock FROM community;
LOAD flock;
If you want to build Flock from source or contribute to the project, you can use our automated build script:
Clone the repository with submodules:
git clone --recursive https://github.com/dais-polymtl/flock.git
cd flock
Or if you've already cloned without submodules:
git submodule update --init --recursive
Run the build and run script:
./scripts/build_and_run.sh
This interactive script will guide you through:
The script will automatically detect your system configuration and use the appropriate build tools (Ninja or Make).
The script will launch DuckDB with Flock extension ready to use. Make sure to check the documentation for usage examples.
Requirements for building from source:
Using Flock, you can run semantic analysis tasks directly in DuckDB. For example:
SELECT llm_complete(
{ 'model_name': 'summarizer'},
{ 'prompt_name': 'description-generation', 'context_columns': [{ 'data': product_name }]}
) AS product_description
FROM UNNEST(['Wireless Headphones', 'Gaming Laptop', 'Smart Watch']) AS t(product_name);
Explore more usage examples in the documentation.
If you are a contributor or want to work on Flock itself, see the dedicated Developer Guide for build, testing, and contribution details.
Our roadmap outlines upcoming features and improvements. Stay updated by checking out our detailed plan.
We value your feedback! If you’d like to report an issue or suggest a new feature, please use the links below:
For contributing code or other contributions, please refer to our dedicated Contribution Guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.
This project is under active development by the Data & AI Systems Laboratory (DAIS Lab) at Polytechnique Montréal.
C++
68.0%
Python
29.5%
Shell
1.6%