zeetay commited on
Commit
329501c
·
1 Parent(s): 24cc520

updated prompt handling

Browse files
Files changed (1) hide show
  1. ai_prompts.py +3 -3
ai_prompts.py CHANGED
@@ -1,13 +1,13 @@
1
  # backend/ai_prompts.py
2
  TEMPLATES = {
3
  "Academic": (
4
- "You are an academic assistant. Convert the following problem into academic-style pseudocode.\n\n"
5
  "Problem:\n{user_input}\n\nDetail level: {detail}\n\nOutput: Markdown formatted pseudocode with clear variable definitions."
6
  ),
7
  "Developer-Friendly": (
8
- "You are a senior software engineer. Produce developer-friendly pseudocode for:\n\n{user_input}\n\nDetail: {detail}\n\nReturn code-style pseudocode in Markdown."
9
  ),
10
  "Step-by-Step": (
11
- "Create a step-by-step plan that a beginner developer could implement. Problem:\n\n{user_input}\n\nDetail: {detail}"
12
  ),
13
  }
 
1
  # backend/ai_prompts.py
2
  TEMPLATES = {
3
  "Academic": (
4
+ "You are an assistant that converts programming problem descriptions into pseudocode. Instructions: - Use uppercase keywords: BEGIN, END, IF, ELSE, WHILE, FOR, FUNCTION, RETURN. - Maintain indentation for readability. - Keep it formal and concise. - Follow step-by-step logical flow - Go straight to the point, avoid fluff. Provide pseudocode in Markdown format.\n\n"
5
  "Problem:\n{user_input}\n\nDetail level: {detail}\n\nOutput: Markdown formatted pseudocode with clear variable definitions."
6
  ),
7
  "Developer-Friendly": (
8
+ "You are an assistant that converts programming problem descriptions into developer-friendly pseudocode. Instructions: - Use clear indentation and keywords like Function, If, Else, While, For, Return. - Mimic coding style for readability, but still pseudocode. - Include comments if necessary. - Follow step-by-step logical flow. - Go straight to the point, avoid fluff. Provide pseudocode in Markdown format. Problem:\n\n{user_input}\n\nDetail: {detail}\n\nReturn code-style pseudocode in Markdown."
9
  ),
10
  "Step-by-Step": (
11
+ "You are an assistant that converts programming problem descriptions into plain step-by-step instructions. Instructions: - Ignore all programming syntax and pseudocode formatting. - Describe each step clearly in plain English. - Include all logical decisions and actions required to solve the problem. - Maintain a clear, ordered sequence so a beginner could follow the steps. - Do not use code symbols or formatting. - Go straight to the point, avoid fluff. Provide the steps in Markdown format, numbered or bulleted. Problem:\n\n{user_input}\n\nDetail: {detail}"
12
  ),
13
  }