Generates a boolean (true/false) value for each row based on a natural language prompt and data analysis. Provides full control over prompts and models while returning a simple BOOL output. Useful for row-by-row validation, filtering logic, or conditional checks.
Use Cases
Data Validation: Check if records meet specific criteria
Content Moderation: Determine if content is appropriate
Business Rules: Apply complex conditional logic
Quality Checks: Validate data quality or completeness
Compliance: Check if content meets regulatory requirements
SELECT
product_id,
product_name,
description,
AI.GENERATE_BOOL(
prompt => 'Does this product description mention the materials used?',data => description,
connection_id => 'us.my_vertex_connection')AS mentions_materials
FROM products
WHERE category = 'furniture'
SELECT
product_id,
product_name,
description,
AI.GENERATE_BOOL(
prompt => 'Does this product description mention the materials used?',data => description,
connection_id => 'us.my_vertex_connection')AS mentions_materials
FROM products
WHERE category = 'furniture'
SELECT
product_id,
product_name,
description,
AI.GENERATE_BOOL(
prompt => 'Does this product description mention the materials used?',data => description,
connection_id => 'us.my_vertex_connection')AS mentions_materials
FROM products
WHERE category = 'furniture'
Example 2: Content Appropriateness Check
SELECT
post_id,
content,
AI.GENERATE_BOOL(
prompt => 'Is this social media post appropriate for a professional business audience?',data => content,
connection_id => 'us.my_vertex_connection')AS is_appropriate
FROM social_media_posts
WHERE reviewed = FALSE
SELECT
post_id,
content,
AI.GENERATE_BOOL(
prompt => 'Is this social media post appropriate for a professional business audience?',data => content,
connection_id => 'us.my_vertex_connection')AS is_appropriate
FROM social_media_posts
WHERE reviewed = FALSE
SELECT
post_id,
content,
AI.GENERATE_BOOL(
prompt => 'Is this social media post appropriate for a professional business audience?',data => content,
connection_id => 'us.my_vertex_connection')AS is_appropriate
FROM social_media_posts
WHERE reviewed = FALSE
Example 3: Multi-Field Validation
SELECT
application_id,
AI.GENERATE_BOOL(
prompt => 'Based on this application, does the candidate meet the minimum requirements: 5+ years experience, Bachelor degree, and expertise in Python?',data => STRUCT(
years_experience,
education_level,
skills,
work_history
),
connection_id => 'us.my_vertex_connection')AS meets_requirements
FROM
SELECT
application_id,
AI.GENERATE_BOOL(
prompt => 'Based on this application, does the candidate meet the minimum requirements: 5+ years experience, Bachelor degree, and expertise in Python?',data => STRUCT(
years_experience,
education_level,
skills,
work_history
),
connection_id => 'us.my_vertex_connection')AS meets_requirements
FROM
SELECT
application_id,
AI.GENERATE_BOOL(
prompt => 'Based on this application, does the candidate meet the minimum requirements: 5+ years experience, Bachelor degree, and expertise in Python?',data => STRUCT(
years_experience,
education_level,
skills,
work_history
),
connection_id => 'us.my_vertex_connection')AS meets_requirements
FROM
Example 4: Image Validation
SELECT
image_id,
AI.GENERATE_BOOL(
prompt => 'Does this image show a product with clear visibility and professional lighting?',data => OBJ.GET_ACCESS_URL(image_ref,'r'),
connection_id => 'us.my_vertex_connection')AS is_high_quality
FROM product_photos
WHERE status = 'pending_review'
SELECT
image_id,
AI.GENERATE_BOOL(
prompt => 'Does this image show a product with clear visibility and professional lighting?',data => OBJ.GET_ACCESS_URL(image_ref,'r'),
connection_id => 'us.my_vertex_connection')AS is_high_quality
FROM product_photos
WHERE status = 'pending_review'
SELECT
image_id,
AI.GENERATE_BOOL(
prompt => 'Does this image show a product with clear visibility and professional lighting?',data => OBJ.GET_ACCESS_URL(image_ref,'r'),
connection_id => 'us.my_vertex_connection')AS is_high_quality
FROM product_photos
WHERE status = 'pending_review'
Data Output Examples
Product Description Validation
product_name
mentions_materials
"Oak Dining Table"
true
"Modern Coffee Table"
false
"Leather Office Chair"
true
Content Appropriateness
post_id
content_preview
is_appropriate
P001
"Excited to announce our new product launch..."
true
P002
"This is the worst day ever..."
false
P003
"Great meeting with the team today..."
true
Best Practices
Ask clear yes/no questions: Frame prompts for binary outcomes
Provide context: Include relevant data fields for better accuracy
Test edge cases: Validate behavior with ambiguous inputs
Consider AI.IF for filtering: Use AI.IF in WHERE clauses for better optimization
*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.
*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.
*dbt® and dbt Core® are federally registered trademarks of dbt Labs, Inc. in the United States and various jurisdictions around the world. Paradime is not a partner of dbt Labs. All rights therein are reserved to dbt Labs. Paradime is not a product or service of or endorsed by dbt Labs, Inc.