Skip to content

Don't send all-NULL rows in Scalar LLM functions to the provider - #297

Merged
iZarrios merged 11 commits into
devfrom
llm-filter-null-results
Sep 29, 2026
Merged

iZarrios merged 11 commits into
devfrom
llm-filter-null-results

Conversation

@iZarrios

@iZarrios iZarrios commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

No description provided.

@iZarrios
iZarrios force-pushed the llm-filter-null-results branch from c7e6ae6 to ed15893 Compare September 28, 2026 19:27
@iZarrios iZarrios changed the title Return NULL from llm_filter for rows that were not evaluated Return NULL for missing answers and skip all-NULL rows in LLM functions Sep 28, 2026
@iZarrios
iZarrios requested a review from queryproc September 28, 2026 19:27
@iZarrios iZarrios changed the title Return NULL for missing answers and skip all-NULL rows in LLM functions Don't send all-NULL rows in LLM functions to the provider Sep 28, 2026
@iZarrios iZarrios changed the title Don't send all-NULL rows in LLM functions to the provider Don't send all-NULL rows in Scalar LLM functions to the provider Sep 28, 2026
Comment thread docs/scalar-functions/llm-filter.mdx Outdated
## 3. Output

The function returns a **BOOLEAN** value (`TRUE` or `FALSE`), indicating whether the row satisfies the condition specified in the prompt.
The function returns a **BOOLEAN** value: `TRUE` or `FALSE`, indicating whether the row satisfies the condition specified in the prompt, or `UNKNOWN` (SQL `NULL`) when there is no verdict for the row. A row whose context columns are all `NULL` is not sent to the model and returns `UNKNOWN`. An ordinary `WHERE` keeps only `TRUE` rows, so `UNKNOWN` rows are left out.

@queryproc queryproc Sep 29, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line: An ordinary "WHERE" keeps only "TRUE" rows, so "UNKNOWN" rows are left out is unnecessary and is expected SQL behaviour: Predicates including JOIN ON pass or match only on TRUE.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@iZarrios
iZarrios merged commit 433400d into dev Sep 29, 2026
12 checks passed
@iZarrios
iZarrios deleted the llm-filter-null-results branch September 29, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants