Related Experiment Video
Updated: Jun 25, 2026

Measuring the Structure, Composition, and Change of Underwater Environments with Large-area Imaging
Published on: April 18, 2025
Democratizing cloud data lake analytics: natural language access to Apache Iceberg via LLM agents
1Picarro Inc., Santa Clara, CA, United States.
Abstract:
Business analysts and non-technical users need insights from enterprise data lakes but lack SQL expertise to query them directly. While large language models (LLMs) can translate natural language to SQL, existing text-to-SQL approaches face critical limitations: severe SQL injection vulnerabilities, inability to leverage data-lake-specific features like time-travel queries, and inconsistent metric definitions across organizations. We present the LangChain Iceberg Toolkit, enabling users to query Apache Iceberg data lakes through natural language conversations with LLM agents, no SQL knowledge required. Users ask questions in plain English (e.g., "What was revenue last quarter?"), and the system automatically: (1) interprets intent using LLMs, (2) selects appropriate tools from a YAML-based semantic layer mapping business terms to data structures, (3) executes queries through a hybrid architecture combining PyIceberg's type-safe API (for security) with DuckDB's SQL engine (for complex analytics), and (4) returns formatted answers with business context. Our evaluation demonstrates 100% success across 100 systematically designed queries leveraging semantic layer integration for consistent metric definitions. Critically, in direct comparison against a schema-aware text-to-SQL baseline on the same query set, our system achieves a 33 percentage-point accuracy improvement (100% vs. 67%) while reducing SQL injection attack success rate from the 99% reported in prior text-to-SQL research to 0% across both execution paths. End-to-end query latency averages 2.6 seconds on 15.1M records, with partition pruning eliminating 90%+ of scanned data files. The hybrid execution architecture prevents SQL injection vulnerabilities through type-safe query construction for simple queries and controlled, pre-validated SQL execution for complex analytics. Users receive data insights through conversational interfaces without writing SQL, understanding schemas, or knowing technical implementation details. We provide a production-ready, open-source implementation demonstrating practical viability for democratizing enterprise data access.