LogoLogo
Home PageLoginSQL Generator
  • 🖥️What is Rasgo?
  • 🚀Setting Up Rasgo
    • Connect Rasgo to your Data
  • 🛠️Using Rasgo
    • Modeling your Data
    • Prompt Guide
    • AI Notes
    • AI-Generated Documentation
    • AI Readiness Score
    • Reports
    • Additional Features
    • Admin Settings
  • 🎉What's New
  • Integrations
    • ❄️Snowflake
    • 🔍BigQuery
    • 🔴Redshift
    • 🧱DeltaLake (via Databricks)
    • 💬OpenAI
    • 🅰️Anthropic
    • ✨Gemini
    • ☁️dbt Cloud
  • 🔐API
    • Table Metadata
    • Column Metadata
  • Reference
    • Status Page
    • Frequently Asked Questions
      • Rasgo Architecture
      • Contacting Rasgo Support
      • What does Rasgo do with my data?
  • Rasgo Graveyard
    • PyRasgo 0.3
      • Source Methods
        • publish.source_data()
        • read.source_data()
        • get.data_sources()
        • get.data_source()
      • Feature Methods
        • feature.get_stats()
        • publish.features_from_source_code()
        • publish.feature_from_source()
        • publish.features()
        • read.feature_data()
        • get.feature_attributes()
        • get.features()
        • get.feature()
      • Collection Methods
        • collection.add_attributes()
        • collection.preview()
        • collection.get_compatible_features()
        • read.collection_snapshot_data()
        • read.collection_data()
        • get.collection_attributes()
        • get.collections()
        • get.collection()
      • Features yml file
      • version 0.3
    • Transforms Overview
      • Build your Own Transform
        • Argument Types
        • Make your own Transform
        • SQL Best Practices
        • Utilities
          • cleanse_name()
    • All Transforms
      • Aggregate String
      • Aggregate
      • Apply
      • Bin
      • Cast
      • Clean
      • Conditional Agg
      • Correlation
      • Cumulative Agg
      • Datarobot Score
      • Dateadd
      • Datediff
      • Datepart
      • Datespine Groups
      • Datespine
      • Datetrunc
      • Describe
      • Drop Columns
      • Dropna
      • Encode Values
      • Entropy
      • Extract Sequences
      • Filter
      • Funnel
      • Heatmap
      • Histogram
      • If Then
      • Join
      • Joins
      • Label Encode
      • Lag
      • Latest
      • Lead
      • Linear Regression
      • Market Basket
      • Math
      • Metric Plot
      • Metric
      • Min Max Scaler
      • Moving Avg
      • New Columns
      • One Hot Encode
      • Order
      • Pivot Table
      • Plot
      • Prefix
      • Profile Column
      • Query
      • Rank
      • Ratio With Shrinkage
      • Remove Duplicates
      • Remove Outliers
      • Rename
      • Replace Missing
      • Replace String
      • Reshape
      • Rolling Agg
      • Rsi
      • Sample Class
      • Sample
      • Sankey
      • Scale Columns
      • Select
      • Sliding Slope
      • Standard Scaler
      • Suffix
      • Summarize Flatlines
      • Summarize Islands
      • Summarize
      • Target Encode
      • Text To Sql
      • Timeseries Agg
      • To Date
      • Train Test Split
      • Union
      • Unions
      • Unpivot
      • Uppercase Columns
      • Vlookup
Powered by GitBook
On this page
  • Tips for Success
  • Tip: The more specific you can be, the better
  • Tip: Don't tell AI what NOT to do
  • Tip: When in doubt, you can always trust the "Mad Libs" prompt
  • Examples for Inspiration
  • Rasgo AI Limitations

Was this helpful?

  1. Using Rasgo

Prompt Guide

PreviousModeling your DataNextAI Notes

Last updated 11 months ago

Was this helpful?

Similar to talking to ChatGPT, Rasgo's AI understands some questions better than others. Here's a guide to craft the best possible question prompts for your data question.

Tips for Success

Tip: The more specific you can be, the better

Rasgo's AI is using your question to , pick the right table or tables, and then craft an accurate SQL query. That's a lot of steps! The more detail you can share in your prompt, the better AI will do at navigating that task. Details that can be helpful to include:

  • How should AI aggregate the data, if at all (i.e. Total, Average, Max, etc...)

  • Do you have an idea of what table or tables AI should look at? Even a guess can be helpful (i.e. "Use our Master Sales table")

  • Want your query to apply filters to the data? Include both the column and the values in that column you want to filter, if possible (i.e. "... for customer Acme Corp", where customer is the column and Acme Corp is the value in the customer column that you want to filter to)

Tip: Don't tell AI what NOT to do

Just like a 5 year old, you don't want to give AI the wrong ideas... It's not very good at discerning the "negative" instruction (i.e. "Don't use column ABC"). Instead, focus on telling AI what to do whenever possible (i.e. "Use a column starting with DEF").

Tip: When in doubt, you can always trust the "Mad Libs" prompt

If you're not sure where to start, this is a good template that very reliably translates to SQL:

Sum <Column A> and <Column B> by <Column C> for the current time period using <Date Column D>

Examples for Inspiration

Not Optimized
Optimized
Notes

sales for Acme Corp

total sales for Customer Name Acme Corp by month

  • "Total" tells AI to sum the sales, instead of selecting rows of transactions

  • Customer Name helps AI find the right column

top products based on growth

Top 10 products by total sales based on year over year change for current year vs previous year

  • "by total sales" tells AI what data to use to rank the products

  • "current year vs previous year" indicates the time ranges for calculating the growth rate

  • using terms like "current" and "previous" will result in analysis that is relative to the current date

  • if you prefer hard coded dates, you would instead say "for 2023 vs 2022"

what color products are popular

What are the top 10 most popular product colors based on number of orders for the current year to date

  • including a date range will help limit the data queried

  • "based on number of orders" tells AI what metric to use to approximate popularity

Rasgo AI Limitations

  • Rasgo AI, like all generative AI, is token limited. For that reason, we only let the AI see a preview of the query result (up to 100 rows).

  • Notes and descriptions that contradict each other or don't clearly identify data will either be ignored or will confuse the AI when it retrieves them from the metadata graph.

🛠️
study its notes