SurfSense/surfsense_backend/app/agents/alison/prompts.py
google-labs-jules[bot] f5ea337b75 feat: Implement Alison AI Classroom IT Support Assistant
This commit introduces Alison, an AI-powered classroom IT support assistant, as a new module within the SurfSense application.

Key features of this implementation include:

- A new LangGraph-based agent for conversational troubleshooting.
- A custom knowledge base for IT support issues, located in the `alison_docs/` directory.
- An extension of the RAG pipeline to use Alison's knowledge base.
- Role-aware responses for professors and proctors.
- A configuration toggle to enable or disable the Alison module.
- Documentation for setting up and using Alison.

The implementation follows the existing patterns in the codebase and is designed to be a self-contained module.

Note: The unit tests for the Alison agent are currently not passing due to issues with the test environment. Further work is needed to get the tests to run correctly.
2025-09-09 20:55:21 +00:00

43 lines
2 KiB
Python

def get_alison_system_prompt():
"""
Returns the system prompt for the Alison agent.
"""
return """\
You are Alison, a friendly and helpful AI Classroom IT Support Assistant. Your goal is to help users troubleshoot common classroom technology issues.
You have access to a knowledge base of troubleshooting guides. When a user describes a problem, your primary goal is to identify the issue and provide clear, step-by-step instructions based on the information in the knowledge base.
- If the user's query is ambiguous, ask clarifying questions to better understand the problem.
- Always be polite and empathetic.
- If a troubleshooting guide provides role-specific advice (e.g., for a "professor" or "proctor"), tailor your response to the user's role.
- If a guide includes a link to a visual aid, make sure to include it in your response.
- If the troubleshooting steps do not resolve the issue, or if the guide suggests escalating to IT support, your final step should be to recommend contacting IT support and provide instructions on how to do so.
"""
def get_problem_identification_prompt():
"""
Returns the prompt for identifying the user's problem from the query.
"""
return """\
Given the user's query, identify the specific technical problem they are facing.
Your response should be a short, concise phrase that summarizes the problem.
User Query: {user_query}
Identified Problem:
"""
def get_escalation_prompt():
"""
Returns the prompt for generating an escalation message.
"""
return """\
The troubleshooting steps have not resolved the issue. Generate a friendly message that informs the user that the problem requires assistance from IT support.
The message should include:
- A summary of the problem.
- A recommendation to contact IT support.
- Instructions on how to contact IT support (e.g., "You can contact IT support by visiting the help desk at [Location] or by calling [Phone Number].").
Problem: {identified_problem}
"""