-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathapp_interview_pm.py
179 lines (161 loc) · 7.54 KB
/
app_interview_pm.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
PUBLISHED = True
APP_URL = "https://pm-interview.streamlit.app"
APP_IMAGE = "interview_practice_flat.webp"
APP_TITLE = "Sample Interview: Product Manager"
APP_INTRO = """This app asks three standard (fixed) interview questions and provides feedback for the users responses to those questions. It is
"""
SHARED_ASSET = {
}
HTML_BUTTON = {
}
SYSTEM_PROMPT = """
You play the role of a mock interviewer. The user will answer interview questions and you'll provide feedback based on specific criteria. Please align your feedback to the criteria. """
PHASES = {
"phase1": {
"name": "Product Manager Interview - Question 1",
"fields": {
"question1_response": {
"type": "text_area",
"label": "Describe a product you have managed. What was your role and the outcome?",
"height": 200,
"value": "I managed a mobile app project for a local restaurant. My role involved overseeing the development process and ensuring that the team met the deadlines. We successfully launched the app, although we faced some initial challenges with user engagement which we addressed through updates."
}
},
"user_prompt": """The candidate answered the first interview question: 'Describe a product you have managed. What was your role and the outcome?'.
You will provide feedback on:
- The clarity of their response.
- The description of their roles and responsibilities
- The clear communication of outcomes.
Here is the user's answer:
{question1_response}. """,
"ai_response": True,
"allow_revisions": True,
"max_revisions": 2,
"allow_skip": False,
"rubric": """
1. Clarity of Response
3 points - Very clear and easy to understand.
2 points - Somewhat clear, with minor ambiguities.
1 point - Unclear and difficult to follow.
2. Role and Responsibilities
4 points - Specific and detailed description of responsibilities.
3 points - General description with some specific details.
2 points - Vague description of responsibilities.
1 point - Responsibilities not clearly mentioned.
3. Outcome Communication
3 points - Outcome is clearly and effectively communicated.
2 points - Outcome is mentioned but lacks detail.
1 point - Outcome is poorly communicated or missing.
""",
"scored_phase": True,
"minimum_score": 5,
},
"phase2": {
"name": "Product Manager Interview - Question 2",
"fields": {
"question2_response": {
"type": "text_area",
"label": "How do you prioritize different product features?",
"height": 200,
"value": "I prioritize product features based on their impact and feasibility. I usually create a simple matrix to compare the features. Features that have high impact and are easy to implement usually get prioritized. However, I try to also balance user requests and stakeholder inputs."
}
},
"user_prompt": """The candidate answered the second interview question: 'How do you prioritize different product features?'.
You will provide feedback on:
- Their understanding of prioritization.
- Their communication of their methodology
- The effectiveness of their practical examples
Here is the user's answer:
{question2_response}. """,
"ai_response": True,
"allow_revisions": True,
"max_revisions": 2,
"allow_skip": False,
"rubric": """
1. Understanding of Prioritization
3 points - Excellent understanding.
2 points - Good understanding with minor gaps.
1 point - Poor understanding.
2. Methodology
4 points - Clearly articulated and structured method.
3 points - Generally described method with some structure.
2 points - Vague method lacking structure.
1 point - No method or structure mentioned.
3. Practical Examples
3 points - Relevant and effective examples provided.
2 points - Somewhat relevant examples.
1 point - Examples are missing or irrelevant.
""",
"scored_phase": True,
"minimum_score": 5,
},
"phase3": {
"name": "Product Manager Interview - Question 3",
"fields": {
"question3_response": {
"type": "text_area",
"label": "What is your approach to handling product feedback and improving the user experience?",
"height": 200,
"value": "I gather feedback from multiple sources including surveys, app reviews, and direct user interviews. After collecting feedback, I analyze the data to identify common trends and issues. I prioritize feedback that affects user experience the most. Regular updates and testing are my main strategies for improvement."
}
},
"user_prompt": """The candidate answered the second interview question: 'What is your approach to handling product feedback and improving the user experience?'.
You will provide feedback on:
- Their handling of feedback
- Their user experience improvement
- Examples of real-world applications
Here is the user's answer:
{question3_response}. """,
"ai_response": True,
"allow_revisions": True,
"max_revisions": 2,
"allow_skip": False,
"rubric": """
1. Feedback Handling
3 points - Very effectively.
2 points - Somewhat effectively, with room for improvement.
1 point - Ineffectively.
2. User Experience Improvement
4 points - Detailed and clear.
3 points - General approach with some details.
2 points - Vague approach.
1 point - Approach not articulated.
3. Real-World Application
3 points - Concepts applied effectively to examples.
2 points - Concepts somewhat applied.
1 point - No application to real-world scenarios.
""",
"scored_phase": True,
"minimum_score": 5,
},
"phase4": {
"name": "Product Manager Interview - Summary",
"fields": {
"question3_response": {
"type": "markdown",
"body": "Press submit to get overall feedback on the interview",
}
},
"user_prompt": """Based on the conversation and the feedback you've provided, please now prioritize three key areas that I should work on to improve my interview skill.""",
"allow_skip": False,
"ai_response": True,
"button_label": "Get Overall Feedback"
}
}
PREFERRED_LLM = "gpt-4o"
LLM_CONFIG_OVERRIDE = {}
SCORING_DEBUG_MODE = True
DISPLAY_COST = True
COMPLETION_MESSAGE = "You've reached the end! I hope you learned something!"
COMPLETION_CELEBRATION = False
RAG_IMPLEMENTATION = False # make true only when document exists
SOURCE_DOCUMENT = "sample.pdf" # file uploaded in source_docs if only
PAGE_CONFIG = {
"page_title": "Mock Interview",
"layout": "centered",
"initial_sidebar_state": "expanded"
}
SIDEBAR_HIDDEN = True
from core_logic.main import main
if __name__ == "__main__":
main(config=globals())