DuckCon #7

Grep your lakehouse: Search-first retrieval for DuckDB-powered agents

Sylvain Utard · DuckCon #7
9
sections
17
slides
DuckDBDuckLakeFull-Text SearchSemantic SearchAI AgentsLakehouse
Watch on YouTube ↗
01 / The search-first instinct

Coding agents always search first

frame_00m09s.png
frame_00m09s.png
frame_00m27s.png
frame_00m27s.png
frame_00m39s.png
frame_00m39s.png
More detail

Altertable is building a data runtime for the AI era on top of the lake: a lakehouse with federation (they explicitly 'hate pipelines'), a knowledge graph, and always-on AI agents. TL;DR of the talk: they extended DuckLake with search capabilities via a ducklake_search extension.

02 / The missing primitive

Data agents need schema-agnostic retrieval

frame_00m51s.png
frame_00m51s.png
03 / Search on top of the lake

Bringing full-text and semantic search to DuckLake

frame_02m45s.png
frame_02m45s.png
04 / How search works

Reminder: full-text and semantic indexing

frame_03m36s.png
frame_03m36s.png
frame_04m18s.png
frame_04m18s.png
frame_04m33s.png
frame_04m33s.png
frame_05m09s.png
frame_05m09s.png
05 / Extending DuckLake

ducklake_search: extending an extension

frame_05m30s.png
frame_05m30s.png
frame_06m15s.png
frame_06m15s.png
frame_06m33s.png
frame_06m33s.png
More detail

Tantivy (Rust) is the full-text engine and lives beside the DuckDB (C++) world, which required careful FFI bridging so the two sides cooperate without reinventing the wheel; the Tantivy index reuses DuckDB's file system.

06 / SQL surface

CREATE INDEX and search operators

frame_06m33s.png
frame_06m33s.png
07 / Implementation

Implementing ducklake_search close to the parquet files

frame_09m15s.png
frame_09m15s.png
frame_10m15s.png
frame_10m15s.png
08 / Query rewriting

Rewriting the query to run smoothly on DuckLake

frame_11m15s.png
frame_11m15s.png
09 / Wrap-up

TL;DR and a call to build extensions

frame_11m39s.png
frame_11m39s.png
frame_12m15s.png
frame_12m15s.png

Key Takeaways