Definitive Facts
Ask questions using 100+ relational datasets - sports, finance, and more at https://definitive.io/datasets.
Definitive Facts plugin generates and executes SQL queries against various relational datasets through natural language text input. It supports more than 100 datasets related to sports, finance, etc. You can ask questions and receive definitive facts for your queries. Do not send SQL to the generate-SQL endpoint and execute only the SQL generated by this endpoint. It shows the SQL text to the user while generating. The execution result comes in Python pandas compatible JSON format, which you can download using the URL shown in execution result. Try Definitive Facts and get accurate data with ease!
How to
Comments (0)
Try it
API docs
Learn how to use Definitive Facts effectively! Here are a few example prompts, tips, and the documentation of available commands.
Example prompts
-
Prompt 1: "Find datasets related to climate change research."
-
Prompt 2: "Generate a SQL query based on this natural language question: 'What are the top-selling products in the past year?'"
-
Prompt 3: "Execute this SQL query and provide the result: 'SELECT * FROM sales_data WHERE date >= '2022-01-01''"
-
Prompt 4: "Can you generate a natural language response to this question: 'What is the average price of products in category XYZ?'"
-
Prompt 5: "Poll the result of a SQL query execution with execution ID '12345' and retrieve the JSON format."
Features and commands
Feature/Command | Description |
---|---|
find_datasets | This command allows you to find datasets that may help answer a natural language question. You need to provide the question and it will return the matching dataset IDs. |
generate_sql | This command generates a SQL query or a natural language response based on a provided natural language question. You can also specify a dataset ID if necessary. It returns a task ID that can be used to retrieve the result. |
execute_sql | This command executes a provided SQL query and returns the execution ID for the result. You need to provide the SQL and the dataset ID. |
poll_generate_sql_result | This command is used to poll the result of a generated SQL query. It should be called repeatedly until the result is ready. You need to provide the task ID. It returns the result of the generate-sql endpoint. |
poll_execute_sql_result | This command is used to poll the result of an executed SQL query. It should be called repeatedly until the result is ready. You need to provide the execution ID and the desired format (urls, md, or json). It returns the result of the execute-sql endpoint, or a list of URLs if the format is 'urls'. |