Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: assessor prompts #89

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/dbally/iql_generator/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,25 +141,22 @@ def __init__(
{
"role": "system",
"content": (
"Given a question, determine whether the answer requires initial data filtering in order to compute it.\n"
"Initial data filtering is a process in which the result set is reduced to only include the rows "
"that meet certain criteria specified in the question.\n\n"
"Given a question, determine whether the answer requires data filtering in order to compute it.\n"
"Data filtering is a process in which the result set is filtered based on the specific features "
"stated in the question. Such a question can be easily identified by using words that refer to "
"specific feature values (rather than feature names).\n"
"Look for words indicating specific values that the answer should contain. \n\n"
"---\n\n"
"Follow the following format.\n\n"
"Question: ${{question}}\n"
"Hint: ${{hint}}"
"Reasoning: Let's think step by step in order to ${{produce the decision}}. We...\n"
"Decision: indicates whether the answer to the question requires initial data filtering. "
"Decision: indicates whether the answer to the question requires data filtering. "
"(Respond with True or False)\n\n"
),
},
{
"role": "user",
"content": (
"Question: {question}\n"
"Hint: Look for words indicating data specific features.\n"
"Reasoning: Let's think step by step in order to "
),
"content": ("Question: {question}\n" "Reasoning: Let's think step by step in order to "),
},
],
response_parser=_decision_parser,
Expand All @@ -170,8 +167,11 @@ def __init__(
{
"role": "system",
"content": (
"Given a question, determine whether the answer requires computing the aggregation in order to compute it.\n"
"Aggregation is a process in which the result set is reduced to a single value.\n\n"
"Given a question, determine whether the answer requires data aggregation in order to compute it.\n"
"Data aggregation is a process in which we calculate a single values for a group of rows in the "
"result set.\n"
"Most common aggregation functions are counting, averaging, summing, but other types of aggregation "
"are possible.\n\n"
"---\n\n"
"Follow the following format.\n\n"
"Question: ${{question}}\n"
Expand All @@ -182,7 +182,7 @@ def __init__(
},
{
"role": "user",
"content": ("Question: {question}\n" "Reasoning: Let's think step by step in order to "),
"content": "Question: {question}\n" "Reasoning: Let's think step by step in order to ",
},
],
response_parser=_decision_parser,
Expand Down
Loading