Nelly-43 commited on
Commit
db0d2b0
·
verified ·
1 Parent(s): c7e7022

Update src/prompts.py

Browse files
Files changed (1) hide show
  1. src/prompts.py +24 -31
src/prompts.py CHANGED
@@ -243,51 +243,44 @@ STATA_PROMPT_TEMPLATE = {
243
  "explain": "Explain what the following stata error code or message means. If code is provided, "
244
  "describe the error in context of the code."}
245
  }
246
-
247
  CATEGORIZER_PROMPT_TEMPLATE = """\
248
  You are a query-routing classifier for a {domain} research chatbot.
249
- Your task is to read the user's query and classify it into exactly one category and action. Return ONLY valid JSON.
250
  Classification rules:
251
- 1. Contact and Information Sharing
252
- - Use when the user wants to contact the WEAI team.
253
  - If user input indicates the issue is resolved output "proceed".
254
  Output:
255
  {{
256
- "category": "contact_and_info",
257
- "action": "contact",
258
  "sub-action":"proceed"or"unresolved"
259
  }}
260
- - Use when the user wants to share, submit, upload, or send files/documents/data.
261
- - If user input indicates the issue is resolved output "proceed".
262
- Output:
263
- {{
264
- "category": "contact_and_info",
265
- "action": "upload",
266
  "sub-action":"proceed"or"unresolved"
267
- }}
268
- 2. Stata Implementation
269
- - Questions about Stata programming, do-files, code snippets, scripts, syntax, or debugging.
270
- - Classify as:
271
- - "do" for do-files
272
- - "code" for Stata code or programming help
273
- - "error" for debugging or error messages
274
- - If user input contains the sub-action include all selected options.
275
- - Unless explicitly stated in the user input, always return "unresolved".
276
- - Always include sub-action options in a list unless it's "unresolved".
277
- - If user input indicates the issue is resolved output "proceed".
278
  Output:
279
  {{
280
- "category": "stata",
281
- "action": "do" | "code" | "error",
282
- "sub-action":"rewrite"or"explain"or"suggestfix"or"unresolved"or"proceed"
283
  }}
284
- 3. General Knowledge
285
- - Any WEAI-related question that does not fit the above categories.
286
- - If user input indicates the issue is resolved output "proceed".
 
 
 
 
 
 
287
  Output:
288
  {{
289
- "category": "general",
290
- "action": "continue",
291
  "sub-action":"proceed"or"unresolved"
292
  }}
293
  USER'S QUESTION: {query}
 
243
  "explain": "Explain what the following stata error code or message means. If code is provided, "
244
  "describe the error in context of the code."}
245
  }
 
246
  CATEGORIZER_PROMPT_TEMPLATE = """\
247
  You are a query-routing classifier for a {domain} research chatbot.
248
+ Your task is to read the user's query and classify it into exactly one category. Return ONLY valid JSON.
249
  Classification rules:
250
+ 1. Pillar 1
251
+ - Use when the user shows interest in understanding whether the selected value chain aligns with the government's political incentives.
252
  - If user input indicates the issue is resolved output "proceed".
253
  Output:
254
  {{
255
+ "category": "pillar_1",
 
256
  "sub-action":"proceed"or"unresolved"
257
  }}
258
+ 2. Pillar 2
259
+ - Use when the user shows interest in understanding to what degree decisions are impacted by the lobbying of particular groups or by elite influence
260
+ Output:
261
+ {{
262
+ "category": "pillar_2",
 
263
  "sub-action":"proceed"or"unresolved"
264
+ }}
265
+ 3. Pillar 3
266
+ - Use when the user shows interest in understanding if the value chain/or investment intervention can be feasibly implemented given the broader institutional and policy environment
 
 
 
 
 
 
 
 
267
  Output:
268
  {{
269
+ "category": "pillar_3",
270
+ "sub-action":"proceed"or"unresolved"
 
271
  }}
272
+ 4. Complete Analysis
273
+ - Use if the input query indicates interest in all three pillars
274
+ Output:
275
+ {{
276
+ "category": "complete",
277
+ "sub-action":"proceed"or"unresolved"
278
+ }}
279
+ 4. Qualitative Discussion
280
+ - User shows interest in understanding if there are any political risks that could undermine the selected value chain or investment intervention
281
  Output:
282
  {{
283
+ "category": "complete",
 
284
  "sub-action":"proceed"or"unresolved"
285
  }}
286
  USER'S QUESTION: {query}