Generates a floating-point numeric value for each row based on a natural language prompt and data analysis. Provides full control over prompts and models while returning a FLOAT64 output. Ideal for scores, ratings, percentages, or any decimal numeric extraction.
Use Cases
Sentiment Scoring: Rate sentiment on continuous scale (0.0-1.0)
Percentage Extraction: Extract percentages from text
Quality Metrics: Calculate quality scores with decimals
Confidence Scores: Generate confidence ratings
Price Extraction: Extract monetary values from text
SELECT
review_id,
review_text,
AI.GENERATE_DOUBLE(
prompt => 'Rate the sentiment of this review from 0.0 (very negative) to 1.0 (very positive).',data => review_text,
connection_id => 'us.my_vertex_connection')AS sentiment_score
FROM customer_reviews
ORDERBY
SELECT
review_id,
review_text,
AI.GENERATE_DOUBLE(
prompt => 'Rate the sentiment of this review from 0.0 (very negative) to 1.0 (very positive).',data => review_text,
connection_id => 'us.my_vertex_connection')AS sentiment_score
FROM customer_reviews
ORDERBY
SELECT
review_id,
review_text,
AI.GENERATE_DOUBLE(
prompt => 'Rate the sentiment of this review from 0.0 (very negative) to 1.0 (very positive).',data => review_text,
connection_id => 'us.my_vertex_connection')AS sentiment_score
FROM customer_reviews
ORDERBY
Example 2: Extract Percentage Values
SELECT
report_id,
AI.GENERATE_DOUBLE(
prompt => 'What is the year-over-year growth percentage mentioned in this text? Return as decimal (e.g., 15.5 for 15.5%).',data => report_text,
connection_id => 'us.my_vertex_connection')AS yoy_growth_pct
FROM
SELECT
report_id,
AI.GENERATE_DOUBLE(
prompt => 'What is the year-over-year growth percentage mentioned in this text? Return as decimal (e.g., 15.5 for 15.5%).',data => report_text,
connection_id => 'us.my_vertex_connection')AS yoy_growth_pct
FROM
SELECT
report_id,
AI.GENERATE_DOUBLE(
prompt => 'What is the year-over-year growth percentage mentioned in this text? Return as decimal (e.g., 15.5 for 15.5%).',data => report_text,
connection_id => 'us.my_vertex_connection')AS yoy_growth_pct
FROM
Example 3: Quality Assessment
SELECT
product_id,
product_name,
AI.GENERATE_DOUBLE(
prompt => 'Rate the overall quality of this product based on the description, from 0.0 to 10.0.',data => CONCAT('Name: ', product_name,'. Description: ', description),
connection_id => 'us.my_vertex_connection')AS quality_score
FROM products
WHERE category = 'electronics'
SELECT
product_id,
product_name,
AI.GENERATE_DOUBLE(
prompt => 'Rate the overall quality of this product based on the description, from 0.0 to 10.0.',data => CONCAT('Name: ', product_name,'. Description: ', description),
connection_id => 'us.my_vertex_connection')AS quality_score
FROM products
WHERE category = 'electronics'
SELECT
product_id,
product_name,
AI.GENERATE_DOUBLE(
prompt => 'Rate the overall quality of this product based on the description, from 0.0 to 10.0.',data => CONCAT('Name: ', product_name,'. Description: ', description),
connection_id => 'us.my_vertex_connection')AS quality_score
FROM products
WHERE category = 'electronics'
Example 4: Confidence Scoring
SELECT
prediction_id,
AI.GENERATE_DOUBLE(
prompt => 'Based on the evidence provided, rate your confidence in this conclusion from 0.0 (no confidence) to 1.0 (complete confidence).',data => STRUCT(
hypothesis,
supporting_evidence,
contradicting_evidence
),
connection_id => 'us.my_vertex_connection')AS confidence_score
FROM
SELECT
prediction_id,
AI.GENERATE_DOUBLE(
prompt => 'Based on the evidence provided, rate your confidence in this conclusion from 0.0 (no confidence) to 1.0 (complete confidence).',data => STRUCT(
hypothesis,
supporting_evidence,
contradicting_evidence
),
connection_id => 'us.my_vertex_connection')AS confidence_score
FROM
SELECT
prediction_id,
AI.GENERATE_DOUBLE(
prompt => 'Based on the evidence provided, rate your confidence in this conclusion from 0.0 (no confidence) to 1.0 (complete confidence).',data => STRUCT(
hypothesis,
supporting_evidence,
contradicting_evidence
),
connection_id => 'us.my_vertex_connection')AS confidence_score
FROM
Example 5: Price Extraction from Text
SELECT
listing_id,
description,
AI.GENERATE_DOUBLE(
prompt => 'Extract the price mentioned in this listing. Return only the numeric value (e.g., 99.99).',data => description,
connection_id => 'us.my_vertex_connection')AS extracted_price
FROM marketplace_listings
WHERE price_field ISNULL
SELECT
listing_id,
description,
AI.GENERATE_DOUBLE(
prompt => 'Extract the price mentioned in this listing. Return only the numeric value (e.g., 99.99).',data => description,
connection_id => 'us.my_vertex_connection')AS extracted_price
FROM marketplace_listings
WHERE price_field ISNULL
SELECT
listing_id,
description,
AI.GENERATE_DOUBLE(
prompt => 'Extract the price mentioned in this listing. Return only the numeric value (e.g., 99.99).',data => description,
connection_id => 'us.my_vertex_connection')AS extracted_price
FROM marketplace_listings
WHERE price_field ISNULL
Data Output Examples
Sentiment Scores
review_text
sentiment_score
"Absolutely amazing product!"
0.95
"It's okay, nothing special"
0.55
"Terrible quality, very disappointed"
0.15
YoY Growth Extraction
report_text_preview
yoy_growth_pct
"Revenue increased by 23.5% year-over-year..."
23.5
"We saw a 8.2% decline compared to last year..."
-8.2
"Growth remained flat at 0.1%..."
0.1
Quality Assessment
product_name
quality_score
"Premium Wireless Headphones"
8.7
"Budget Bluetooth Speaker"
6.2
"Professional Studio Monitor"
9.5
Best Practices
Define the numeric range: Be explicit about min/max values
Specify decimal precision: If needed, mention expected precision
Provide scale context: "Rate from 0.0 to 1.0, where..."
Consider AI.SCORE: Use AI.SCORE for ranking tasks (better optimization)
Validate outputs: Check for values outside expected range
When to Use
✅ Use when you need custom decimal numeric values
✅ Use for percentage or ratio extraction
✅ Use when you need full prompt control
✅ Use for continuous scoring (not just integers)
Alternatives
AI.SCORE: For ranking with managed optimization and auto-generated scoring rubrics
AI.GENERATE_INT: For integer values only
AI.GENERATE: For structured output with multiple fields
CAST/REGEXP_EXTRACT: For simple numeric extraction (cheaper)
Platform Support
Regions: All Gemini-supported regions + US/EU multi-regions
*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.