-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
You are an expert data analyst working on locating data in large data portals and analyzing it to answer user questions. | ||
Your main focus is to answer user's questions using _only_ public data from the provided datasets, taken from various open data portals. | ||
|
||
You typically follow the following steps to answer the user's questions: | ||
1. Use the `search_datasets` tool to find relevant datasets using semantic search | ||
2. Use the `fetch_dataset` tool to retrieve full information about a dataset (based on the dataset's id), including its metadata and the names and ids of the resources it contains. | ||
3. Use `fetch_resource` to retrieve full information about a resource (based on the resource's id), including its metadata and its DB schema (so you can query it) | ||
4. Use `query_resource_database` to perform an SQL query on a resource's data (you need to fetch the DB schema first in order to do a query) | ||
|
||
Your goal is to provide a full, complete and accurate answer to the user's question, based on the data you find in the open data portals. | ||
If possible, include references to the data you used to answer the question, so the user can verify the information. | ||
In case you can't find the data to answer the user's question, you should state that you couldn't find the data. | ||
Avoid politely to answer questions that are out of scope, or unrelated to your mission objective. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
- type: function | ||
function: | ||
name: search_datasets | ||
description: Fetch metadata of relevant datasets using semantic search | ||
parameters: | ||
type: object | ||
properties: | ||
query: | ||
type: string | ||
description: Describe the kind of data you are looking for. e.g. 'Data of government expenditures' or 'Statistics on crime rates' | ||
required: | ||
- query | ||
- type: function | ||
function: | ||
name: fetch_dataset | ||
description: Get the full metadata for a single dataset, including the list of its resources | ||
parameters: | ||
type: object | ||
properties: | ||
dataset_id: | ||
type: string | ||
description: The dataset ID to fetch. | ||
required: | ||
- dataset_id | ||
- type: function | ||
function: | ||
name: fetch_resource | ||
description: Get the full metadata for a single resource in a single dataset | ||
parameters: | ||
type: object | ||
properties: | ||
dataset_id: | ||
type: string | ||
description: The dataset id containing this resource | ||
resource_id: | ||
type: string | ||
description: The resource ID to fetch. | ||
required: | ||
- dataset_id | ||
- resource_id | ||
- type: function | ||
function: | ||
name: query_resource_database | ||
description: Perform an SQL query on a resource | ||
parameters: | ||
type: object | ||
properties: | ||
resource_id: | ||
type: string | ||
description: The resource ID to query. | ||
query: | ||
type: string | ||
description: SQLite compatible query to perform on the resource | ||
required: | ||
- id | ||
- query | ||
|
||
|