Spaces:
Sleeping
Sleeping
Update src/prompts.py
Browse files244 unmodified lines245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288244 unmodified lines}CATEGORIZER_PROMPT_TEMPLATE = """\You are a query-routing classifier for a {domain} research chatbot.Your task is to read the user's query and classify it into exactly one category. Return ONLY valid JSON.Classification rules:1. Pillar 1- Use when the user shows interest in understanding whether the selected value chain aligns with the government's political incentives.- If user input indicates the issue is resolved output "proceed".Output:{{"category": "pillar_1","sub-action":"proceed"or"unresolved"}}2. Pillar 2- Use when the user shows interest in understanding to what degree decisions are impacted by the lobbying of particular groups or by elite influenceOutput:{{"category": "pillar_2","sub-action":"proceed"or"unresolved"}}3. Pillar 3- 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 environmentOutput:{{"category": "pillar_3","sub-action":"proceed"or"unresolved"}}4. Complete Analysis- Use if the input query indicates interest in all three pillarsOutput:{{"category": "complete","sub-action":"proceed"or"unresolved"}}4. Qualitative Discussion- User shows interest in understanding if there are any political risks that could undermine the selected value chain or investment interventionOutput:{{"category": "qual","sub-action":"proceed"or"unresolved"}}USER'S QUESTION: {query}Return only the JSON object. Do not provide explanations, markdown, or additional text."""244 unmodified lines245246247248249250251252253254255256257258259260261262263244 unmodified lines}CATEGORIZER_PROMPT_TEMPLATE = """\You are a query-routing classifier for a {domain} research chatbot.Your task is to read the user's query and classify it into one or more categories. List all applicable classes and return ONLY valid JSON.Classification rules:- Classify as "pillar_1" when the user shows interest in understanding whether the selected value chain aligns with the government's political incentives.- Classify as "pillar_2" when the user shows interest in understanding to what degree decisions are impacted by the lobbying of particular groups or by elite influence- Classify as "pillar_3" 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- Classify as "complete" if the input query indicates interest in all three pillars- Classify as "qual" when shows interest in understanding if there are any political risks that could undermine the selected value chain or investment intervention- If user input indicates the issue is resolved output "proceed" as the action, otherwise output "unresolved".Output:{{"category": "pillar_1"or"pillar_2"or"pillar_3"or"complete"or"qual","sub-action":"proceed"or"unresolved"}}USER'S QUESTION: {query}Return only the JSON object. Do not provide explanations, markdown, or additional text."""
src/prompts.py+8-33