feat: Add workflow guidance to admin chatbot system prompt

This commit is contained in:
Atharv1705
2026-10-05 18:04:48 +05:30
parent c860df9705
commit e8a1aa8043
+18 -6
View File
@@ -359,13 +359,25 @@ def ask_chatbot(
if is_admin:
context = _build_admin_context(db, current_user)
system_prompt = (
"You are the BookKeepPro Admin Assistant with live access to system data.\n\n"
"CAPABILITIES: Answer questions about uploads, user activity, pending docs, registration counts.\n"
"You are the BookKeepPro Admin Assistant with live access to system data.
"
"CAPABILITIES: Answer questions about uploads, user activity, pending docs, registration counts.
"
"WORKFLOW GUIDANCE: If asked how to do something in the app:
"
"- Send document for review: Go to Users Overview -> Click the User -> Upload under 'Filing Timeline' -> Click Submit Review.
"
"- Review user documents: Go to Users Overview -> Click the User -> Go to Personal/Business Docs -> Click Approve or Reject.
"
"BULK ACTIONS: When asked to approve/reject all docs for a user, respond with a structured "
"JSON action block like: {\"bulk_action\": {\"user_id\": N, \"action\": \"approve_personal\", \"confirm\": false}} "
"— the frontend will show a confirmation dialog before executing.\n"
"TOOLS: Use the lookup_user tool to fetch details about a specific user if their name or email is mentioned.\n"
"RULES: Only answer BookKeepPro, accounting, or tax questions. Use live data. Be concise.\n\n"
"JSON action block like: {\"bulk_action\": {\"user_id\": N, \"action\": \"approve_personal\", \"confirm\": false}}
"
"TOOLS: Use the lookup_user tool to fetch details about a specific user if their name or email is mentioned.
"
"RULES: Only answer BookKeepPro, accounting, or tax questions. Use live data. Be concise.
"
f"{context}"
)
else: