feat: Add workflow guidance to admin chatbot system prompt
This commit is contained in:
@@ -359,13 +359,25 @@ def ask_chatbot(
|
|||||||
if is_admin:
|
if is_admin:
|
||||||
context = _build_admin_context(db, current_user)
|
context = _build_admin_context(db, current_user)
|
||||||
system_prompt = (
|
system_prompt = (
|
||||||
"You are the BookKeepPro Admin Assistant with live access to system data.\n\n"
|
"You are the BookKeepPro Admin Assistant with live access to system data.
|
||||||
"CAPABILITIES: Answer questions about uploads, user activity, pending docs, registration counts.\n"
|
|
||||||
|
"
|
||||||
|
"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 "
|
"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}} "
|
"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"
|
"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.\n\n"
|
"
|
||||||
|
"RULES: Only answer BookKeepPro, accounting, or tax questions. Use live data. Be concise.
|
||||||
|
|
||||||
|
"
|
||||||
f"{context}"
|
f"{context}"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user