TTsamurai commited on
Commit
4b4fe08
1 Parent(s): c153c48

before finanl change

Browse files
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.9.7
_static/txt/system_instruction_without_personalization.txt CHANGED
@@ -1 +1,2 @@
1
- You are a financial advisor speaking with a customer who is interested in purchasing individual stocks. In this session, you are faced with a candidate stock and work together to understand if it aligns with the customer. Remember, the stock was selected randomly, and you are not recommending this specific stock, nor do you know whether the customer has any particular interest in it. Your task is to interact with the customer, using the stock’s details to help them determine whether the stock is a good fit for them in a non-personalized way. First, start the conversation by providing a brief description of the company, then ask the customer what they would like to know more about. When asking questions to the customer, incorporate both open-ended and closed-ended questions when relevant, rather than sticking to only closed-ended questions. In this session, keep the conversation centered on the current candidate stock. Avoid discussing other stocks unless you are making a direct comparison to the candidate stock. If users attempt to shift the focus to other stocks, remind them to stay on topic or suggest moving to the next round. The main focus should always be the candidate stock. If the customer is unfamiliar with any financial concepts, explain them to help the customer make an informed decision. If you do not have the information the client has requested, please be honest and inform them that the data is not available. Keep responses concise, AT MOST ONE HUNDRED WORDS. If additional information is necessary, a longer response is acceptable, but aim to be brief and to the point.
 
 
1
+ You are a financial advisor speaking with a customer who is interested in purchasing individual stocks. In this session, you are faced with a candidate stock and work together to understand if it aligns with the customer. Remember, the stock was selected randomly, and you are not recommending this specific stock, nor do you know whether the customer has any particular interest in it. Your task is to interact with the customer, using the stock’s details to help them determine whether the stock is a good fit for them in a non-personalized way. First, start the conversation by providing a brief description of the company, then ask the customer what they would like to know more about. When asking questions to the customer, incorporate both open-ended and closed-ended questions when relevant, rather than sticking to only closed-ended questions. In this session, keep the conversation centered on the current candidate stock. Avoid discussing other stocks unless you are making a direct comparison to the candidate stock. If users attempt to shift the focus to other stocks, remind them to stay on topic or suggest moving to the next round. The main focus should always be the candidate stock. If the customer is unfamiliar with any financial concepts, explain them to help the customer make an informed decision. If you do not have the information the client has requested, please be honest and inform them that the data is not available. Keep responses concise, AT MOST ONE HUNDRED WORDS. If additional information is necessary, a longer response is acceptable, but aim to be brief and to the point.
2
+
app.py CHANGED
@@ -256,9 +256,9 @@ def add_user_profile_to_system_instruction(
256
  feedback_file_summarization,
257
  )
258
  # print(f"Preference Summary:{summ}")
259
- system_instruction += f"\nPrevious Conversations with the Customer about the User Profile: {user_preference_elicitation_data['summary_history']}\n"
260
  else:
261
- system_instruction += f"\nPrevious Conversations with the Customer about the User Profile: {user_preference_elicitation_data['history']}\n"
262
  return system_instruction
263
 
264
 
@@ -1084,7 +1084,7 @@ def create_demo():
1084
  user_preference_elicitation_session = gr.State(
1085
  value={
1086
  "history": "",
1087
- "summary_history": """Previous Conversations with the Customer about the User Profile: Based on our previous conversation, here's a summary of your investment preferences:
1088
 
1089
  # 1. **Preferred Industries:** You're interested in investing in the healthcare sector, without a specific preference for sub-industries such as pharmaceuticals, medical devices, biotechnology, or healthcare services.
1090
  # 2. **Value vs. Growth Stocks:** You prefer growth stocks, which have the potential for high returns but may be riskier.
 
256
  feedback_file_summarization,
257
  )
258
  # print(f"Preference Summary:{summ}")
259
+ system_instruction += f"\nUser Profile collected in the previous conversations: {user_preference_elicitation_data['summary_history']}\n"
260
  else:
261
+ system_instruction += f"\nUser Profile collected in the previous conversations: {user_preference_elicitation_data['history']}\n"
262
  return system_instruction
263
 
264
 
 
1084
  user_preference_elicitation_session = gr.State(
1085
  value={
1086
  "history": "",
1087
+ "summary_history": """User Profile collected in the previous conversations: Based on our previous conversation, here's a summary of your investment preferences:
1088
 
1089
  # 1. **Preferred Industries:** You're interested in investing in the healthcare sector, without a specific preference for sub-industries such as pharmaceuticals, medical devices, biotechnology, or healthcare services.
1090
  # 2. **Value vs. Growth Stocks:** You prefer growth stocks, which have the potential for high returns but may be riskier.
components/__pycache__/chat_conversation.cpython-310.pyc CHANGED
Binary files a/components/__pycache__/chat_conversation.cpython-310.pyc and b/components/__pycache__/chat_conversation.cpython-310.pyc differ
 
components/__pycache__/constant.cpython-310.pyc CHANGED
Binary files a/components/__pycache__/constant.cpython-310.pyc and b/components/__pycache__/constant.cpython-310.pyc differ
 
components/__pycache__/induce_personality.cpython-310.pyc CHANGED
Binary files a/components/__pycache__/induce_personality.cpython-310.pyc and b/components/__pycache__/induce_personality.cpython-310.pyc differ
 
components/__pycache__/prompt.cpython-310.pyc CHANGED
Binary files a/components/__pycache__/prompt.cpython-310.pyc and b/components/__pycache__/prompt.cpython-310.pyc differ
 
user_feedback/interaction_82144f25-22ac-4ed3-98e4-651ae96e0e49.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"user_id": "demo_1_1", "uuid": "82144f25-22ac-4ed3-98e4-651ae96e0e49", "timestamp": "2024-10-17 12:00:12", "type": "interaction", "value": {"type": "user_elicitation", "role": "user", "content": "Hey"}}
2
+ {"user_id": "demo_1_1", "uuid": "82144f25-22ac-4ed3-98e4-651ae96e0e49", "timestamp": "2024-10-17 12:00:12", "type": "Interaction", "value": {"type": "user_elicitation", "role": "assistant", "content": "Welcome to our financial planning session. I'm here to help you understand your investment preferences. Let's start with the first topic: industries. Are you interested in investing in a specific industry, such as technology, healthcare, finance, or something else?"}}
3
+ {"user_id": "demo_1_1", "uuid": "82144f25-22ac-4ed3-98e4-651ae96e0e49", "timestamp": "2024-10-17 12:00:20", "type": "interaction", "value": {"type": "Amazon.com, Inc.", "role": "user", "content": "Hey"}}
4
+ {"user_id": "demo_1_1", "uuid": "82144f25-22ac-4ed3-98e4-651ae96e0e49", "timestamp": "2024-10-17 12:00:20", "type": "interaction", "value": {"type": "Amazon.com, Inc.", "role": "assistant", "content": "It seems like you're a bit brief. Let's start fresh. I'd like to introduce you to our candidate stock, Amazon.com, Inc. Amazon is a well-known e-commerce company that operates in the consumer cyclical industry. This industry is known for its sensitivity to economic fluctuations, but it can also be a great place to invest during times of economic growth.\n\nCan you tell me a bit about your investment goals and risk tolerance? Are you looking for stable, long-term growth or something more aggressive?"}}
user_feedback/summarization_82144f25-22ac-4ed3-98e4-651ae96e0e49.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"user_id": "demo_1_1", "uuid": "82144f25-22ac-4ed3-98e4-651ae96e0e49", "timestamp": "2024-10-17 12:00:19", "type": "preference_elicitation_summarization", "value": {"summarization": "I don't have any previous conversations to draw from. This is the start of our conversation. If you'd like, I can simulate a conversation and then summarize it for you. \n\nLet's start the conversation. \n\nYou: Hey, welcome to our financial planning session. I'm here to help you understand your investment preferences. Let's start with the first topic: industries. Are you interested in investing in a specific industry, such as technology, healthcare, finance, or something else?\n\nPlease respond with your choice, and I'll continue the conversation."}}