Apply any arbitrary prompt to text (ultimate flexibility)
Per-row — runs once for each row.
{{ text }} ASK '{{ prompt }}'ASK '{{ prompt }}' FROM {{ text }}| name | type | description |
|---|---|---|
| text | VARCHAR | — |
| prompt | VARCHAR | Any instruction or question (e.g., 'is this urgent?', 'translate to Spanish') |
Function: Question answered from text
SELECT
semantic_ask (
'The sky is blue because of Rayleigh scattering',
'What color is the sky?'
)Function: Price extracted via question
SELECT
semantic_ask (
'The product costs $99.99 and ships within 3 days',
'How much does it cost?'
)Infix ASK: extracts answer from text
WITH
t AS (
SELECT
'Einstein developed the theory of relativity' AS fact
)
SELECT
fact ASK 'Who developed this?'
FROM
tFunction with concat: compound first arg
SELECT
semantic_ask (
'Albert' || ' ' || 'Einstein discovered relativity',
'Who discovered relativity?'
)Function with concat: column concatenation
WITH
t AS (
SELECT
'Paris' AS city,
'France' AS country
)
SELECT
semantic_ask (
city || ' is the capital of ' || country,
'What is the capital?'
)
FROM
tFunction with UPPER: nested function call
SELECT
semantic_ask (UPPER('the sky is blue'), 'What color?')Answer plain-English questions about your data by writing and running SQL
Return the SQL that ASK_DATA would run, without executing it
Call any registered LARS skill from SQL and receive results as a table
Generate a DuckDB SQL expression string from a plain-English description
Apply any arbitrary prompt to text (ultimate flexibility)
Per-row — runs once for each row.
{{ text }} ASK '{{ prompt }}'ASK '{{ prompt }}' FROM {{ text }}| name | type | description |
|---|---|---|
| text | VARCHAR | — |
| prompt | VARCHAR | Any instruction or question (e.g., 'is this urgent?', 'translate to Spanish') |
Function: Question answered from text
SELECT
semantic_ask (
'The sky is blue because of Rayleigh scattering',
'What color is the sky?'
)Function: Price extracted via question
SELECT
semantic_ask (
'The product costs $99.99 and ships within 3 days',
'How much does it cost?'
)Infix ASK: extracts answer from text
WITH
t AS (
SELECT
'Einstein developed the theory of relativity' AS fact
)
SELECT
fact ASK 'Who developed this?'
FROM
tFunction with concat: compound first arg
SELECT
semantic_ask (
'Albert' || ' ' || 'Einstein discovered relativity',
'Who discovered relativity?'
)Function with concat: column concatenation
WITH
t AS (
SELECT
'Paris' AS city,
'France' AS country
)
SELECT
semantic_ask (
city || ' is the capital of ' || country,
'What is the capital?'
)
FROM
tFunction with UPPER: nested function call
SELECT
semantic_ask (UPPER('the sky is blue'), 'What color?')Answer plain-English questions about your data by writing and running SQL
Return the SQL that ASK_DATA would run, without executing it
Call any registered LARS skill from SQL and receive results as a table
Generate a DuckDB SQL expression string from a plain-English description