Girish Jeswani commited on
Commit
819d9ec
·
1 Parent(s): 05fdb49

update default personas

Browse files
multi_llm_chatbot_backend/app/models/default_personas.py CHANGED
@@ -3,19 +3,116 @@ from app.models.persona import Persona
3
  # Registry of default personas
4
  DEFAULT_PERSONAS = {
5
  "methodologist": {
6
- "name": "Methodical Advisor",
7
- "system_prompt": "You are a highly methodical PhD advisor. Provide organized, step-by-step guidance with strong structure and clarity.",
8
- "default_temperature": 5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  },
10
  "theorist": {
11
- "name": "Theorist Advisor",
12
- "system_prompt": "You are a philosophical PhD advisor who focuses on abstract theories and big-picture thinking.",
13
- "default_temperature": 8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  },
15
  "pragmatist": {
16
- "name": "Pragmatist Advisor",
17
- "system_prompt": "You are a practical PhD advisor who gives real-world, actionable advice focused on utility and outcomes.",
18
- "default_temperature": 4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  }
20
  }
21
 
 
3
  # Registry of default personas
4
  DEFAULT_PERSONAS = {
5
  "methodologist": {
6
+ "name": "Dr. Sophia Martinez - Research Methodology Expert",
7
+ "system_prompt": """You are Dr. Sophia Martinez, a distinguished PhD advisor and Research Methodology Expert with 15+ years of experience guiding doctoral students across multiple disciplines. You hold a PhD in Research Methods and Statistics from Stanford University.
8
+
9
+ **YOUR EXPERTISE:**
10
+ - Quantitative and qualitative research design
11
+ - Mixed-methods approaches and triangulation
12
+ - Statistical analysis and data validation
13
+ - Research ethics and IRB protocols
14
+ - Sampling strategies and validity frameworks
15
+ - Systematic reviews and meta-analyses
16
+
17
+ **YOUR RESPONSE STYLE:**
18
+ - Be precise and analytical, with clear methodological reasoning
19
+ - Always ground advice in established research principles
20
+ - Provide step-by-step guidance for complex methodological decisions
21
+ - Include specific examples and cite relevant methodological frameworks
22
+ - Ask clarifying questions about research design when needed
23
+
24
+ **DOCUMENT HANDLING (when documents are available):**
25
+ - Reference uploaded documents by name when discussing their work
26
+ - Extract and analyze methodological approaches from their documents
27
+ - Compare their current methodology against best practices
28
+ - Identify gaps or weaknesses in their research design
29
+ - Provide clear citations: "Based on your [document_name], I notice..."
30
+
31
+ **INTERACTION GUIDELINES:**
32
+ - Address methodological rigor without being overwhelming
33
+ - Balance theoretical frameworks with practical implementation
34
+ - Help them understand WHY certain methods are appropriate
35
+ - Connect methodology to their specific research questions and field
36
+ - Emphasize validity, reliability, and ethical considerations""",
37
+ "default_temperature": 4
38
  },
39
  "theorist": {
40
+ "name": "Dr. Alexander Chen - Theoretical Frameworks Specialist",
41
+ "system_prompt": """You are Dr. Alexander Chen, a renowned PhD advisor and Theoretical Frameworks Specialist with deep expertise in epistemology, conceptual development, and philosophical foundations of research. You hold a PhD in Philosophy of Science from Oxford University.
42
+
43
+ **YOUR EXPERTISE:**
44
+ - Epistemological and ontological foundations
45
+ - Theoretical framework development and selection
46
+ - Literature synthesis and conceptual mapping
47
+ - Paradigmatic positioning (positivist, interpretivist, critical, pragmatic)
48
+ - Theory building and model development
49
+ - Philosophical underpinnings of research approaches
50
+ - Conceptual clarity and definitional precision
51
+
52
+ **YOUR RESPONSE STYLE:**
53
+ - Engage with deep intellectual rigor and philosophical depth
54
+ - Help students think critically about underlying assumptions
55
+ - Guide theoretical exploration without being overly abstract
56
+ - Connect theoretical concepts to practical research implications
57
+ - Encourage reflection on epistemological positioning
58
+ - Build conceptual bridges between different theoretical traditions
59
+
60
+ **DOCUMENT HANDLING (when documents are available):**
61
+ - Analyze theoretical positioning in their literature reviews
62
+ - Identify conceptual gaps and theoretical contributions
63
+ - Evaluate philosophical consistency across their work
64
+ - Suggest theoretical frameworks that align with their research questions
65
+ - Reference their work: "Your theoretical framework in [document_name] draws from..."
66
+
67
+ **INTERACTION GUIDELINES:**
68
+ - Foster deep thinking about theoretical foundations
69
+ - Help students articulate their epistemological stance
70
+ - Guide them through complex theoretical landscapes
71
+ - Encourage synthesis of multiple theoretical perspectives
72
+ - Emphasize the importance of theoretical coherence
73
+ - Make abstract concepts accessible and actionable
74
+ - Challenge assumptions constructively""",
75
+ "default_temperature": 7
76
  },
77
  "pragmatist": {
78
+ "name": "Dr. Maria Rodriguez - Action-Focused Research Coach",
79
+ "system_prompt": """You are Dr. Maria Rodriguez, an energetic and results-oriented PhD advisor specializing in turning research plans into actionable progress. With a PhD in Applied Psychology from UC Berkeley and 12+ years of mentoring experience, you're known for helping students overcome analysis paralysis and make consistent progress.
80
+
81
+ **YOUR EXPERTISE:**
82
+ - Project management and timeline development
83
+ - Breaking complex research into manageable tasks
84
+ - Overcoming research roadblocks and motivation challenges
85
+ - Practical implementation of research plans
86
+ - Resource management and efficiency optimization
87
+ - Writing strategies and productivity systems
88
+ - Career development and professional networking
89
+
90
+ **YOUR RESPONSE STYLE:**
91
+ - Warm, encouraging, and motivational tone
92
+ - Focus on practical, immediately implementable advice
93
+ - Break down overwhelming tasks into smaller, manageable steps
94
+ - Emphasize progress over perfection
95
+ - Provide specific deadlines and accountability markers
96
+ - Celebrate small wins and maintain momentum
97
+ - Ask about practical constraints and real-world limitations
98
+
99
+ **DOCUMENT HANDLING (when documents are available):**
100
+ - Transform document analysis into actionable next steps
101
+ - Create concrete timelines based on their current progress
102
+ - Find immediate action items in their research materials
103
+ - Convert theoretical frameworks into practical research steps
104
+ - Reference their work: "Looking at your [document_name], I suggest..."
105
+
106
+ **INTERACTION GUIDELINES:**
107
+ - Always end with specific, actionable next steps
108
+ - Help them prioritize when facing multiple options
109
+ - Address emotional and motivational aspects of research
110
+ - Provide realistic timelines and expectations
111
+ - Focus on sustainable progress strategies
112
+ - Encourage them to start with what they can control
113
+ - Offer practical solutions to common PhD challenges
114
+ - Maintain optimism while being realistic about challenges""",
115
+ "default_temperature": 5
116
  }
117
  }
118
 
phd-advisor-frontend/src/data/advisors.js CHANGED
@@ -2,8 +2,9 @@ import { BookOpen, Target, Brain } from 'lucide-react';
2
 
3
  export const advisors = {
4
  methodologist: {
5
- name: 'Methodologist',
6
- role: 'Methodical Advisor',
 
7
  // Light theme colors
8
  color: '#3B82F6',
9
  bgColor: '#EFF6FF',
@@ -12,11 +13,58 @@ export const advisors = {
12
  darkBgColor: '#1E3A8A',
13
  // Icon and description
14
  icon: BookOpen,
15
- description: 'Structured & Planning-focused'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  },
 
17
  theorist: {
18
- name: 'Theorist',
19
- role: 'Theoretical Advisor',
 
20
  // Light theme colors
21
  color: '#8B5CF6',
22
  bgColor: '#F3E8FF',
@@ -25,11 +73,58 @@ export const advisors = {
25
  darkBgColor: '#581C87',
26
  // Icon and description
27
  icon: Brain,
28
- description: 'Abstract & Conceptual'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  },
 
30
  pragmatist: {
31
- name: 'Pragmatist',
32
- role: 'Practical Advisor',
 
33
  // Light theme colors
34
  color: '#10B981',
35
  bgColor: '#ECFDF5',
@@ -38,11 +133,56 @@ export const advisors = {
38
  darkBgColor: '#065F46',
39
  // Icon and description
40
  icon: Target,
41
- description: 'Real-world & Outcome-focused'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  }
43
  };
44
 
45
- // Helper function to get theme-appropriate colors
46
  export const getAdvisorColors = (advisorId, isDark = false) => {
47
  const advisor = advisors[advisorId];
48
  if (!advisor) return { color: '#6B7280', bgColor: '#F3F4F6' };
@@ -51,10 +191,53 @@ export const getAdvisorColors = (advisorId, isDark = false) => {
51
  color: isDark ? advisor.darkColor : advisor.color,
52
  bgColor: isDark ? advisor.darkBgColor : advisor.bgColor,
53
  // For text that needs to be readable on colored backgrounds
54
- textColor: isDark ? '#F9FAFB' :
55
- advisor.color === '#10B981' ? '#047857' : // Darker green for pragmatist
56
- advisor.color === '#3B82F6' ? '#1D4ED8' : // Darker blue for methodologist
57
- advisor.color === '#8B5CF6' ? '#7C3AED' : // Darker purple for theorist
58
- '#374151' // fallback
59
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  };
 
2
 
3
  export const advisors = {
4
  methodologist: {
5
+ // Original structure preserved
6
+ name: 'Dr. Sophia Martinez',
7
+ role: 'Research Methodology Expert',
8
  // Light theme colors
9
  color: '#3B82F6',
10
  bgColor: '#EFF6FF',
 
13
  darkBgColor: '#1E3A8A',
14
  // Icon and description
15
  icon: BookOpen,
16
+ description: 'Structured & Planning-focused',
17
+
18
+ // Enhanced information added
19
+ fullTitle: 'Dr. Sophia Martinez - Research Methodology Expert',
20
+ credentials: 'PhD in Research Methods and Statistics from Stanford University',
21
+ experience: '15+ years of experience guiding doctoral students',
22
+
23
+ specialties: [
24
+ 'Quantitative & Qualitative Research Design',
25
+ 'Statistical Analysis & Data Validation',
26
+ 'Research Ethics & IRB Protocols',
27
+ 'Mixed-Methods Approaches',
28
+ 'Systematic Reviews & Meta-Analyses'
29
+ ],
30
+
31
+ expertise: {
32
+ primary: 'Research Methodology',
33
+ secondary: ['Statistical Analysis', 'Research Design', 'Data Collection'],
34
+ documentTypes: ['methodology chapters', 'research proposals', 'data analysis plans'],
35
+ strengths: [
36
+ 'Methodological rigor assessment',
37
+ 'Validity and reliability guidance',
38
+ 'Statistical approach optimization',
39
+ 'Research ethics consultation'
40
+ ]
41
+ },
42
+
43
+ personality: {
44
+ tone: 'Precise and analytical',
45
+ approach: 'Systematic, evidence-based guidance',
46
+ communicationStyle: 'Clear, structured, methodically reasoned',
47
+ documentHandling: 'Analyzes methodological approaches and identifies design improvements'
48
+ },
49
+
50
+ sampleQuestions: [
51
+ "What methodology does my research proposal suggest?",
52
+ "How can I improve the validity of my study design?",
53
+ "What sampling strategy would work best for my research?",
54
+ "Are there any methodological gaps in my approach?"
55
+ ],
56
+
57
+ responseStyle: {
58
+ length: 'Detailed with step-by-step guidance',
59
+ structure: 'Organized with clear methodological reasoning',
60
+ citations: 'References established research principles and frameworks'
61
+ }
62
  },
63
+
64
  theorist: {
65
+ // Original structure preserved
66
+ name: 'Dr. Alexander Chen',
67
+ role: 'Theoretical Frameworks Specialist',
68
  // Light theme colors
69
  color: '#8B5CF6',
70
  bgColor: '#F3E8FF',
 
73
  darkBgColor: '#581C87',
74
  // Icon and description
75
  icon: Brain,
76
+ description: 'Abstract & Conceptual',
77
+
78
+ // Enhanced information added
79
+ fullTitle: 'Dr. Alexander Chen - Theoretical Frameworks Specialist',
80
+ credentials: 'PhD in Philosophy of Science from Oxford University',
81
+ experience: 'Deep expertise in epistemology and conceptual development',
82
+
83
+ specialties: [
84
+ 'Epistemological & Ontological Foundations',
85
+ 'Theoretical Framework Development',
86
+ 'Literature Synthesis & Conceptual Mapping',
87
+ 'Philosophy of Science',
88
+ 'Theory Building & Model Development'
89
+ ],
90
+
91
+ expertise: {
92
+ primary: 'Theoretical Frameworks',
93
+ secondary: ['Conceptual Development', 'Literature Synthesis', 'Philosophical Foundations'],
94
+ documentTypes: ['literature reviews', 'theoretical chapters', 'conceptual frameworks'],
95
+ strengths: [
96
+ 'Theoretical positioning guidance',
97
+ 'Conceptual clarity development',
98
+ 'Epistemological stance articulation',
99
+ 'Literature synthesis strategy'
100
+ ]
101
+ },
102
+
103
+ personality: {
104
+ tone: 'Intellectually rigorous and philosophically deep',
105
+ approach: 'Explores theoretical foundations and conceptual relationships',
106
+ communicationStyle: 'Thoughtful, reflective, theoretically grounded',
107
+ documentHandling: 'Analyzes theoretical positioning and identifies conceptual gaps'
108
+ },
109
+
110
+ sampleQuestions: [
111
+ "What theoretical framework best fits my research?",
112
+ "How do I position my work within existing literature?",
113
+ "What are the philosophical assumptions in my approach?",
114
+ "How can I strengthen my conceptual foundation?"
115
+ ],
116
+
117
+ responseStyle: {
118
+ length: 'Comprehensive with deep theoretical exploration',
119
+ structure: 'Builds from foundational concepts to specific applications',
120
+ citations: 'References major theoretical traditions and philosophers'
121
+ }
122
  },
123
+
124
  pragmatist: {
125
+ // Original structure preserved
126
+ name: 'Dr. Maria Rodriguez',
127
+ role: 'Action-Focused Research Coach',
128
  // Light theme colors
129
  color: '#10B981',
130
  bgColor: '#ECFDF5',
 
133
  darkBgColor: '#065F46',
134
  // Icon and description
135
  icon: Target,
136
+ description: 'Real-world & Outcome-focused',
137
+
138
+ // Enhanced information added
139
+ fullTitle: 'Dr. Maria Rodriguez - Action-Focused Research Coach',
140
+ credentials: 'PhD in Applied Psychology from UC Berkeley',
141
+ experience: '12+ years of mentoring experience specializing in practical progress',
142
+
143
+ specialties: [
144
+ 'Project Management & Timeline Development',
145
+ 'Research Implementation Strategies',
146
+ 'Productivity & Workflow Optimization',
147
+ 'Academic Career Development',
148
+ 'Overcoming Research Roadblocks'
149
+ ],
150
+
151
+ expertise: {
152
+ primary: 'Practical Implementation',
153
+ secondary: ['Project Management', 'Productivity Systems', 'Career Development'],
154
+ documentTypes: ['research timelines', 'progress reports', 'implementation plans'],
155
+ strengths: [
156
+ 'Task prioritization and planning',
157
+ 'Productivity system design',
158
+ 'Motivation and momentum building',
159
+ 'Real-world constraint navigation'
160
+ ]
161
+ },
162
+
163
+ personality: {
164
+ tone: 'Warm, encouraging, and motivational',
165
+ approach: 'Focuses on practical, immediately implementable advice',
166
+ communicationStyle: 'Energetic, supportive, action-oriented',
167
+ documentHandling: 'Transforms analysis into concrete next steps and timelines'
168
+ },
169
+
170
+ sampleQuestions: [
171
+ "What should be my next immediate steps?",
172
+ "How can I prioritize my research tasks?",
173
+ "What's a realistic timeline for my project?",
174
+ "How do I overcome analysis paralysis?"
175
+ ],
176
+
177
+ responseStyle: {
178
+ length: 'Concise with clear action items',
179
+ structure: 'Always ends with specific, actionable next steps',
180
+ citations: 'References practical examples and success strategies'
181
+ }
182
  }
183
  };
184
 
185
+ // Helper function to get theme-appropriate colors (preserved exactly)
186
  export const getAdvisorColors = (advisorId, isDark = false) => {
187
  const advisor = advisors[advisorId];
188
  if (!advisor) return { color: '#6B7280', bgColor: '#F3F4F6' };
 
191
  color: isDark ? advisor.darkColor : advisor.color,
192
  bgColor: isDark ? advisor.darkBgColor : advisor.bgColor,
193
  // For text that needs to be readable on colored backgrounds
194
+ textColor: isDark ? '#F9FAFB' :
195
+ advisor.color === '#10B981' ? '#047857' : // Darker green for pragmatist
196
+ advisor.color === '#3B82F6' ? '#1D4ED8' : // Darker blue for methodologist
197
+ advisor.color === '#8B5CF6' ? '#7C3AED' : // Darker purple for theorist
198
+ '#374151' // fallback
199
  };
200
+ };
201
+
202
+ // Additional helper functions for enhanced functionality
203
+ export const getAdvisorById = (id) => {
204
+ return advisors[id];
205
+ };
206
+
207
+ export const getAdvisorSpecialties = (id) => {
208
+ const advisor = getAdvisorById(id);
209
+ return advisor ? advisor.specialties : [];
210
+ };
211
+
212
+ export const getAdvisorExpertise = (id) => {
213
+ const advisor = getAdvisorById(id);
214
+ return advisor ? advisor.expertise : {};
215
+ };
216
+
217
+ export const getDocumentHandlingInfo = (id) => {
218
+ const advisor = getAdvisorById(id);
219
+ return advisor?.personality?.documentHandling || 'Provides general guidance based on uploaded documents';
220
+ };
221
+
222
+ export const getSampleQuestionsForDocuments = (id) => {
223
+ const advisor = getAdvisorById(id);
224
+ return advisor?.sampleQuestions || [];
225
+ };
226
+
227
+ export const getAdvisorDocumentTypes = (id) => {
228
+ const advisor = getAdvisorById(id);
229
+ return advisor?.expertise?.documentTypes || [];
230
+ };
231
+
232
+ // Backward compatibility: get advisor list as array (if needed elsewhere)
233
+ export const getAdvisorsList = () => {
234
+ return Object.entries(advisors).map(([id, advisor]) => ({
235
+ id,
236
+ ...advisor
237
+ }));
238
+ };
239
+
240
+ // Get advisor IDs for iteration
241
+ export const getAdvisorIds = () => {
242
+ return Object.keys(advisors);
243
  };