Zekun Wu
commited on
Commit
·
a0da77a
1
Parent(s):
bcea1fa
update
Browse files- app.py +7 -2
- prompts.json +23 -1
app.py
CHANGED
@@ -261,14 +261,16 @@ def main_app():
|
|
261 |
st.session_state['temperature'] = st.slider("",min_value=0.0, max_value=1.0, value=0.5, step=0.01)
|
262 |
|
263 |
# Allow user to choose from different versions of the prompt
|
264 |
-
st.session_state['version'] = st.selectbox("Select Prompt Version", ["
|
265 |
# Generate and display prompt
|
266 |
|
267 |
if st.button(f'Analyze Profile ({st.session_state["version"]})'):
|
268 |
#with st.spinner('Generating completion...'):
|
269 |
prompt = generate_prompt_from_profile(profile, version=st.session_state['version'])
|
270 |
|
271 |
-
|
|
|
|
|
272 |
|
273 |
with st.chat_message("assistant"):
|
274 |
stream = client.chat.completions.create(
|
@@ -280,6 +282,9 @@ def main_app():
|
|
280 |
messages= prompt,
|
281 |
stream=True)
|
282 |
|
|
|
|
|
|
|
283 |
response = st.write_stream(stream)
|
284 |
#st.markdown(response_test_taker)
|
285 |
|
|
|
261 |
st.session_state['temperature'] = st.slider("",min_value=0.0, max_value=1.0, value=0.5, step=0.01)
|
262 |
|
263 |
# Allow user to choose from different versions of the prompt
|
264 |
+
st.session_state['version'] = st.selectbox("Select Prompt Version", ["METAEIP","TDOS"])
|
265 |
# Generate and display prompt
|
266 |
|
267 |
if st.button(f'Analyze Profile ({st.session_state["version"]})'):
|
268 |
#with st.spinner('Generating completion...'):
|
269 |
prompt = generate_prompt_from_profile(profile, version=st.session_state['version'])
|
270 |
|
271 |
+
meta_eip_prefix = """# META: Entrepreneurial and Intrapreneurial Potential\nMETA evaluates five traits essential for
|
272 |
+
entrepreneurial success: Vision, Ideation, Opportunism, Drive, and Resilience. It also measures four ‘Red
|
273 |
+
Flags’ or derailers common to the entrepreneurial personality."""
|
274 |
|
275 |
with st.chat_message("assistant"):
|
276 |
stream = client.chat.completions.create(
|
|
|
282 |
messages= prompt,
|
283 |
stream=True)
|
284 |
|
285 |
+
if st.session_state['version'] == "METAEIP":
|
286 |
+
st.write(meta_eip_prefix)
|
287 |
+
|
288 |
response = st.write_stream(stream)
|
289 |
#st.markdown(response_test_taker)
|
290 |
|
prompts.json
CHANGED
@@ -1,7 +1,29 @@
|
|
1 |
{
|
2 |
"Prompts": {
|
3 |
"System" : ["You are an expert in career advice and personality consultant. Do not infer or assume information beyond what's explicitly provided in the conversation. Avoid drawing on external knowledge or making generalizations not directly supported by the report content. Do not answer unrelevant questions."],
|
4 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
"Analyze the profiles of team members in ### Descriptions ###, ### Team Members ###, and answer the ### Questions ### in around 800 words.",
|
6 |
"### Descriptions ###",
|
7 |
"#### Main Profile Descriptions ####",
|
|
|
1 |
{
|
2 |
"Prompts": {
|
3 |
"System" : ["You are an expert in career advice and personality consultant. Do not infer or assume information beyond what's explicitly provided in the conversation. Avoid drawing on external knowledge or making generalizations not directly supported by the report content. Do not answer unrelevant questions."],
|
4 |
+
"METAEIP": [
|
5 |
+
"Analyze the profiles of team members in ### Team Members ### based on ### Descriptions ###, and answer the ### Questions ### in around 800 words.",
|
6 |
+
"### Team Members ###",
|
7 |
+
"{{TEAM_MEMBERS}}",
|
8 |
+
"### Descriptions ###",
|
9 |
+
"#### Main Profile Descriptions ####",
|
10 |
+
"VISION: Sees the ‘big picture’ and maintains line of sight. Alignment of goals and actions.",
|
11 |
+
"IDEATION: Generates original and/or innovative ideas; makes unexpected connections.",
|
12 |
+
"OPPORTUNISM: Alert to opportunity; prepared to seize opportunities.",
|
13 |
+
"DRIVE: Strong desire to accomplish goals, Propensity to act decisively and get things done; proactive rather than reactive.",
|
14 |
+
"RESILIENCE: Remains calm and optimistic under pressure, Perseveres in the face of adversity, Recovers from setbacks.",
|
15 |
+
"#### Red Flag Descriptions ####",
|
16 |
+
"HUBRIS: Conceit and self-importance, Overestimation of knowledge and/or ability in respect of tasks, Misplaced belief in unique or exceptional abilities.",
|
17 |
+
"MERCURIAL: Given to sudden changes of mood, behaviour or direction, Given to unconventional or strange behaviour or beliefs, Difficult to predict and/or surprising.",
|
18 |
+
"DOMINANT: Forceful, insistent, domineering, Hostile and argumentative, Unyielding in the face of evidence or argument.",
|
19 |
+
"MACHIAVELLIAN: Deliberate deceitfulness in the pursuit on one’s interest; acting in bad faith, Ruthless pursuit of own interests regardless of considerations of right or wrong, General distrust of the motives of others; attribution of bad faith.",
|
20 |
+
|
21 |
+
"### Questions ###",
|
22 |
+
"1. Analyze key strengths, weaknesses, and potential risks (In Bullet Points with headers for main profile and red flags, for example: Vision (High) and Influence (High), etc.) with the title: \"Profile\" for main profile and \"Red Flags\" for red flag, considering the relationship between trait scores i.e. what the combination of scores tells us. If no Red Flags have HIGH, remove the \"Red Flags\" section. Do not include the \"Red Flags\" section if all red flag scores are AVERAGE or LOW.",
|
23 |
+
"2. Write a section with the title: \"Intrapreneurial Potential\" analyzing the potential to be entrepreneurial in an organizational context, considering the absence or presence of significant Red Flags.",
|
24 |
+
"3. Write a section with the title: \"Conclusion\" summarizing the key points and strategies for leveraging entrepreneurial potential while addressing challenges."
|
25 |
+
],
|
26 |
+
"TDOS": [
|
27 |
"Analyze the profiles of team members in ### Descriptions ###, ### Team Members ###, and answer the ### Questions ### in around 800 words.",
|
28 |
"### Descriptions ###",
|
29 |
"#### Main Profile Descriptions ####",
|