Skip to content

Commit 64086a6

Browse files
authored
fix assessor prompts (#89)
1 parent 9a1e9d8 commit 64086a6

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/dbally/iql_generator/prompt.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -141,25 +141,22 @@ def __init__(
141141
{
142142
"role": "system",
143143
"content": (
144-
"Given a question, determine whether the answer requires initial data filtering in order to compute it.\n"
145-
"Initial data filtering is a process in which the result set is reduced to only include the rows "
146-
"that meet certain criteria specified in the question.\n\n"
144+
"Given a question, determine whether the answer requires data filtering in order to compute it.\n"
145+
"Data filtering is a process in which the result set is filtered based on the specific features "
146+
"stated in the question. Such a question can be easily identified by using words that refer to "
147+
"specific feature values (rather than feature names).\n"
148+
"Look for words indicating specific values that the answer should contain. \n\n"
147149
"---\n\n"
148150
"Follow the following format.\n\n"
149151
"Question: ${{question}}\n"
150-
"Hint: ${{hint}}"
151152
"Reasoning: Let's think step by step in order to ${{produce the decision}}. We...\n"
152-
"Decision: indicates whether the answer to the question requires initial data filtering. "
153+
"Decision: indicates whether the answer to the question requires data filtering. "
153154
"(Respond with True or False)\n\n"
154155
),
155156
},
156157
{
157158
"role": "user",
158-
"content": (
159-
"Question: {question}\n"
160-
"Hint: Look for words indicating data specific features.\n"
161-
"Reasoning: Let's think step by step in order to "
162-
),
159+
"content": ("Question: {question}\n" "Reasoning: Let's think step by step in order to "),
163160
},
164161
],
165162
response_parser=_decision_parser,
@@ -170,8 +167,11 @@ def __init__(
170167
{
171168
"role": "system",
172169
"content": (
173-
"Given a question, determine whether the answer requires computing the aggregation in order to compute it.\n"
174-
"Aggregation is a process in which the result set is reduced to a single value.\n\n"
170+
"Given a question, determine whether the answer requires data aggregation in order to compute it.\n"
171+
"Data aggregation is a process in which we calculate a single values for a group of rows in the "
172+
"result set.\n"
173+
"Most common aggregation functions are counting, averaging, summing, but other types of aggregation "
174+
"are possible.\n\n"
175175
"---\n\n"
176176
"Follow the following format.\n\n"
177177
"Question: ${{question}}\n"
@@ -182,7 +182,7 @@ def __init__(
182182
},
183183
{
184184
"role": "user",
185-
"content": ("Question: {question}\n" "Reasoning: Let's think step by step in order to "),
185+
"content": "Question: {question}\n" "Reasoning: Let's think step by step in order to ",
186186
},
187187
],
188188
response_parser=_decision_parser,

0 commit comments

Comments
 (0)