thzva commited on
Commit
1a93d7a
·
1 Parent(s): 7b4f727

Add application file

Browse files
.env.example ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # Example environment variables file
2
+ # Copy this file to .env and fill in your actual values
3
+
4
+ # OpenAI API Key (required)
5
+ OPENAI_API_KEY=your_openai_api_key_here
6
+
7
+ # Proxy settings (optional)
8
+ # HTTP_PROXY=http://your_proxy_server:port
9
+ # HTTPS_PROXY=http://your_proxy_server:port
.gitignore ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Environment variables
2
+ .env
3
+ .env.local
4
+ .env.*.local
5
+
6
+ # Python
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+ *.so
11
+ .Python
12
+ env/
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+
28
+ # Virtual environments
29
+ venv/
30
+ ENV/
31
+ env/
32
+
33
+ # IDE files
34
+ .idea/
35
+ .vscode/
36
+ *.swp
37
+ *.swo
38
+
39
+ # OS specific files
40
+ .DS_Store
41
+ Thumbs.db
README.md CHANGED
@@ -1,14 +1,27 @@
1
- ---
2
- title: Deeppersona Experience
3
- emoji: 👁
4
- colorFrom: green
5
- colorTo: yellow
6
- sdk: gradio
7
- sdk_version: 5.42.0
8
- app_file: app.py
9
- pinned: false
10
- license: apache-2.0
11
- short_description: 'Interactive demo for Deeppersona '
12
- ---
13
-
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DeepPersona Experiment
2
+
3
+ 一个基于GPT的人物角色生成系统。
4
+
5
+ ## 部署说明
6
+
7
+ 本项目可以部署到Hugging Face Spaces,需要设置以下环境变量:
8
+
9
+ 1. `OPENAI_API_KEY` - 您的OpenAI API密钥
10
+ 2. `HTTP_PROXY`(可选)- HTTP代理服务器地址
11
+ 3. `HTTPS_PROXY`(可选)- HTTPS代理服务器地址
12
+
13
+ ## 本地开发
14
+
15
+ 1. 复制`.env.example`文件为`.env`
16
+ 2. 在`.env`文件中填入您的API密钥和其他配置
17
+ 3. 运行应用程序
18
+
19
+ ## Hugging Face Spaces部署
20
+
21
+ 在Hugging Face Spaces中,您可以通过以下方式安全地设置API密钥:
22
+
23
+ 1. 在Spaces设置页面中,找到"Repository secrets"部分
24
+ 2. 添加名为`OPENAI_API_KEY`的密钥,并填入您的OpenAI API密钥
25
+ 3. 如果需要,也可以添加`HTTP_PROXY`和`HTTPS_PROXY`密钥
26
+
27
+ 这样,您的API密钥将被安全地存储,并且在应用程序运行时可用,但不会暴露给用户或出现在代码中。
app.py ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ from pathlib import Path
5
+ import gradio as gr
6
+
7
+ # 添加代码目录到路径
8
+ current_dir = Path(__file__).parent
9
+ code_dir = current_dir / "generation_user_profile" / "code"
10
+ sys.path.append(str(code_dir))
11
+
12
+ # 导入必要的模块
13
+ from web_api_bridge import generate_profile_from_input
14
+
15
+ def check_api_key():
16
+ """检查API密钥是否已设置"""
17
+ api_key = os.environ.get("OPENAI_API_KEY")
18
+ if not api_key:
19
+ return False
20
+ return True
21
+
22
+ def generate_persona(age, gender, occupation, city, country, custom_values, custom_life_attitude):
23
+ """生成人物角色"""
24
+ if not check_api_key():
25
+ return "错误: 未设置OpenAI API密钥。请在Hugging Face Space设置中添加OPENAI_API_KEY密钥。"
26
+
27
+ # 构建输入数据
28
+ input_data = {
29
+ "basic_info": {
30
+ "age": age if age else None,
31
+ "gender": gender if gender else None,
32
+ "occupation": {"status": occupation} if occupation else {},
33
+ "location": {
34
+ "city": city,
35
+ "country": country
36
+ } if city and country else {}
37
+ },
38
+ "custom_values": {
39
+ "personal_values": custom_values,
40
+ "life_attitude": custom_life_attitude
41
+ }
42
+ }
43
+
44
+ # 生成角色
45
+ try:
46
+ profile = generate_profile_from_input(input_data)
47
+ if "Summary" in profile:
48
+ return profile["Summary"]
49
+ else:
50
+ return "生成角色时出错,未能获取摘要。"
51
+ except Exception as e:
52
+ return f"生成角色时出错: {str(e)}"
53
+
54
+ # 创建Gradio界面
55
+ with gr.Blocks(title="DeepPersona - 人物角色生成器") as demo:
56
+ gr.Markdown("# DeepPersona - 人物角色生成器")
57
+
58
+ if not check_api_key():
59
+ gr.Markdown("⚠️ **警告**: 未检测到OpenAI API密钥。请在Hugging Face Space设置中添加OPENAI_API_KEY密钥。")
60
+
61
+ with gr.Row():
62
+ with gr.Column():
63
+ gr.Markdown("## 基本信息")
64
+ age = gr.Number(label="年龄", minimum=1, maximum=120)
65
+ gender = gr.Dropdown(["男", "女"], label="性别")
66
+ occupation = gr.Textbox(label="职业")
67
+ city = gr.Textbox(label="城市")
68
+ country = gr.Textbox(label="国家")
69
+
70
+ gr.Markdown("## 自定义值 (可选)")
71
+ custom_values = gr.Textbox(label="个人价值观", lines=3)
72
+ custom_life_attitude = gr.Textbox(label="生活态度", lines=3)
73
+
74
+ generate_btn = gr.Button("生成角色")
75
+
76
+ with gr.Column():
77
+ output = gr.Textbox(label="生成的角色", lines=10)
78
+
79
+ generate_btn.click(
80
+ fn=generate_persona,
81
+ inputs=[age, gender, occupation, city, country, custom_values, custom_life_attitude],
82
+ outputs=output
83
+ )
84
+
85
+ # 启动应用
86
+ if __name__ == "__main__":
87
+ demo.launch()
deepsite ADDED
@@ -0,0 +1 @@
 
 
1
+ Subproject commit 8e7d8ea9f6eeeb71b649f112c9124eacec7cd14b
generate_user_profile/output/all_profile_40.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "profiles_completed": 0,
4
+ "total_profiles": 40,
5
+ "description": "包含40个用户档案的集合"
6
+ }
7
+ }
generation_user_profile/code/__init__.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from .config import get_completion
2
+ from .utils import (
3
+ extract_json_from_markdown,
4
+ extract_paths_from_nested,
5
+ load_attributes_from_file,
6
+ flatten_persona
7
+ )
8
+ from .data_sources import get_bls_occupations, generate_location
9
+ from .profile_generators import (
10
+ generate_age_info,
11
+ generate_base_demographics,
12
+ generate_career_info,
13
+ generate_single_profile,
14
+ generate_user_profiles
15
+ )
16
+ from .main import save_profiles_to_file, main
17
+
18
+ __all__ = [
19
+ 'get_completion',
20
+ 'extract_json_from_markdown',
21
+ 'extract_paths_from_nested',
22
+ 'load_attributes_from_file',
23
+ 'flatten_persona',
24
+ 'get_bls_occupations',
25
+ 'generate_location',
26
+ 'generate_age_info',
27
+ 'generate_base_demographics',
28
+ 'generate_career_info',
29
+ 'generate_single_profile',
30
+ 'generate_user_profiles',
31
+ 'save_profiles_to_file',
32
+ 'main'
33
+ ]
generation_user_profile/code/based_data.py ADDED
@@ -0,0 +1,526 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """数据源模块,负责从各种数据源获取用户配置信息。
2
+
3
+ 此模块包含以下主要功能:
4
+ - 从本地文件获取职业数据
5
+ - 生成真实的地理位置信息
6
+ - 生成年龄信息
7
+ - 生成性别信息
8
+ """
9
+
10
+ import json
11
+ import os
12
+ import random
13
+ from typing import Dict, List, Optional, Union, Any
14
+ from geonamescache import GeonamesCache
15
+ from config import get_completion, parse_gpt_response, parse_json_response, extract_json_from_markdown, parse_nested_json_response
16
+
17
+ _occupations_cache = None
18
+
19
+ def get_occupations() -> List[str]:
20
+ """从本地文件获取职业数据。
21
+
22
+ 从预定义的JSON文件中读取职业列表。使用缓存机制避免重复读取文件。
23
+ 如果文件读取失败,将返回空列表。
24
+
25
+ Returns:
26
+ List[str]: 职业列表。如果获取失败则返回空列表
27
+ """
28
+ global _occupations_cache
29
+
30
+ if _occupations_cache is not None:
31
+ return _occupations_cache
32
+
33
+ try:
34
+ file_path = os.path.join(os.path.dirname(__file__), 'data', 'occupations_english.json')
35
+ with open(file_path, 'r', encoding='utf-8') as f:
36
+ _occupations_cache = json.load(f)
37
+ return _occupations_cache
38
+ except Exception as e:
39
+ print(f"Error loading occupations data: {e}")
40
+ return []
41
+
42
+ def generate_age_info() -> Dict[str, Union[int, str]]:
43
+ """生成年龄信息。
44
+
45
+ 首先在3-95岁范围内随机生成一个年龄,然后根据年龄确定对应的年龄组。
46
+ 年龄组包括:幼儿、儿童、青少年、青年、成年、中年、老年。
47
+
48
+ Returns:
49
+ Dict[str, Union[int, str]]: 包含以下字段的字典:
50
+ - age: 具体年龄(整数)
51
+ - age_group: 年龄组类别
52
+ """
53
+ # 首先随机生成年龄
54
+ age = random.randint(7, 85)
55
+
56
+ # 根据年龄确定年龄组
57
+ if age <= 6:
58
+ age_group = "toddler" # 幼儿
59
+ elif age <= 12:
60
+ age_group = "child" # 儿童
61
+ elif age <= 19:
62
+ age_group = "adolescent" # 青少年
63
+ elif age <= 29:
64
+ age_group = "young_adult" # 青年
65
+ elif age <= 45:
66
+ age_group = "adult" # 成年
67
+ elif age <= 65:
68
+ age_group = "middle_aged" # 中年
69
+ else:
70
+ age_group = "senior" # 老年
71
+
72
+ return {
73
+ "age": age,
74
+ "age_group": age_group
75
+ }
76
+
77
+ def generate_career_info(age: int) -> Dict[str, str]:
78
+ """生成职业相关信息。
79
+
80
+ 根据年龄决定职业生成方式:
81
+ - 对18岁以下和65岁以上的人,职业状态将由GPT根据年龄生成
82
+ - 其他年龄段的人,从本地职业数据库中随机选择职业
83
+
84
+ Args:
85
+ age: 年龄
86
+
87
+ Returns:
88
+ Dict[str, str]: 职业相关信息,包含职业状态
89
+ """
90
+ if age < 18 or age > 65:
91
+ # 对18岁以下和65岁以上的人,职业状态由GPT生成
92
+ prompt = f"Generate an appropriate occupation or status for a {age} year old person. "
93
+ if age < 18:
94
+ prompt += "Consider that the individuals are likely in school or engaged in youth activities. They may not have any formal occupation. If appropriate, you can mention their student status or indicate they have no occupation yet. Only in some cases, consider potential interest in early employment opportunities, internships, or non-traditional educational paths."
95
+ else: # age > 65
96
+ prompt += "Consider they might be retired but could still be active in various ways."
97
+
98
+ messages = [
99
+ {"role": "system", "content": "You are an AI that generates realistic occupation statuses based on age. Respond with just the status, no explanation."},
100
+ {"role": "user", "content": prompt}
101
+ ]
102
+
103
+ status = get_completion(messages)
104
+ if not status:
105
+ return {"status": ""}
106
+ return {"status": status}
107
+
108
+ # 其他年龄段从职业数据库选择
109
+ occupations = get_occupations()
110
+ if not occupations:
111
+ return {"status": ""}
112
+
113
+ career_status = random.choice(occupations)
114
+ return {"status": career_status}
115
+
116
+ # def generate_location() -> Dict[str, str]:
117
+ # """生成真实的地理位置信息。
118
+
119
+ # 使用 GeoNames 数据库随机选择一个国家和城市。
120
+
121
+ # Returns:
122
+ # Dict[str, str]: 包含以下字段的字典:
123
+ # - country: 国家名称
124
+ # - city: 城市名称
125
+ # """
126
+ # gc = GeonamesCache()
127
+
128
+ # # 获取所有国家
129
+ # countries = gc.get_countries()
130
+ # country_code = random.choice(list(countries.keys()))
131
+ # country = countries[country_code]
132
+
133
+ # # 获取选国家的所有城市
134
+ # cities = gc.get_cities()
135
+ # country_cities = [city for city in cities.values() if city['countrycode'] == country_code]
136
+
137
+ # if not country_cities:
138
+ # return {
139
+ # "country": country['name'],
140
+ # "city": "Unknown City"
141
+ # }
142
+
143
+ # # 随机选择一个城市
144
+ # city_data = random.choice(country_cities)
145
+
146
+ # return {
147
+ # "country": country['name'],
148
+ # "city": city_data['name']
149
+ # }
150
+
151
+
152
+ def generate_location() -> Dict[str, str]:
153
+ """
154
+ 生成加拿大的地理位置信息,从加拿大的城市中随机选择一个城市。
155
+
156
+ Returns
157
+ -------
158
+ Dict[str, str]
159
+ - country : 加拿大
160
+ - city : 加拿大中随机选择的城市名
161
+ """
162
+ gc = GeonamesCache()
163
+
164
+ # ---- 固定选择加拿大作为国家 ----
165
+ country_code = "CA" # 加拿大的国家代码
166
+ countries = gc.get_countries()
167
+ country = countries[country_code]
168
+
169
+ # ---- 过滤出加拿大的所有城市 ----
170
+ cities = gc.get_cities()
171
+ canada_cities_list = [
172
+ city for city in cities.values()
173
+ if city["countrycode"] == country_code
174
+ ]
175
+
176
+ # ---- 若加拿大没有城市数据,使用默认值 ----
177
+ if not canada_cities_list:
178
+ return {"country": "Canada", "city": "Toronto"}
179
+
180
+ # ---- 随机选择一个城市 ----
181
+ city_data = random.choice(canada_cities_list)
182
+
183
+ return {"country": country["name"], "city": city_data["name"]}
184
+
185
+
186
+ def generate_gender() -> str:
187
+ """随机生成性别(男/女)"""
188
+ return random.choice(['male', 'female'])
189
+
190
+
191
+ def generate_personal_values(age: int, gender: str, occupation: str, location: Dict[str, str]) -> Dict[str, str]:
192
+ """使用GPT根据人口统计信息生成个人价值观。
193
+
194
+ 首先从 positive, negative, neutral 三种类型中随机选择一种价值观类型,
195
+ 然后将这个类型放入prompt中,让GPT生成具体的价值观细节。
196
+
197
+ Args:
198
+ age: 人物年龄
199
+ gender: 人物性别
200
+ occupation: 人物职业
201
+ location: 包含'city'和'country'键的字典
202
+
203
+ Returns:
204
+ 包含'values_orientation'键的字典,其中包含价值观描述
205
+ """
206
+ # 随机选择价值观类型
207
+ value_type = random.choice(['positive', 'negative', 'neutral'])
208
+
209
+ prompt = f"""
210
+ Generate a single, concise phrase describing a person's core values and belief system, based on the following profile:
211
+ - Age: {age}
212
+ - Gender: {gender}
213
+ - Occupation: {occupation}
214
+ - Location: {location['city']}, {location['country']}
215
+
216
+ The value system's tone should be primarily **{value_type.upper()}**.
217
+ - For **POSITIVE** values, the belief system should be oriented towards principles of growth, connection, optimism, or benevolence.
218
+ - For **NEGATIVE** values, the belief system should be oriented towards principles of cynicism, pessimism, selfishness, or nihilism.
219
+ - For **NEUTRAL** values, the belief system should be oriented towards principles of pragmatism, stoicism, individualism, or detached observation.
220
+
221
+ The generated phrase must describe a belief system that is **internally coherent**. It can either align with or contrast against the person's background.
222
+
223
+ **EXTREMELY IMPORTANT CONSTRAINT:**
224
+ The value system MUST be centered on the individual's internal world, personal principles, or their relationship with abstract concepts like fate, nature, work, or self. It **MUST NOT**, under any circumstances, be about their relationship with a local community, neighborhood, social groups, or collective social identity. Any response focused on community is considered a failure.
225
+
226
+ Generate one short, impactful phrase that captures the essence of this individualistic belief system.
227
+
228
+ **CRITICAL:** You must format your response EXACTLY as a valid JSON object with this structure:
229
+
230
+ {{
231
+ "values_orientation": "short phrase describing their values"
232
+ }}
233
+
234
+ DO NOT include any text before or after the JSON. The response must be parseable by json.loads().
235
+ """
236
+
237
+ messages = [
238
+ {"role": "system", "content": "You are an assistant that generates realistic human value systems in ONE SENTENCE, including both positive and negative values. You ALWAYS respond with valid JSON objects that can be parsed by json.loads()."},
239
+ {"role": "user", "content": prompt}
240
+ ]
241
+
242
+ try:
243
+ response = get_completion(messages, temperature=0.8)
244
+
245
+ # 使用config.py中的解析函数
246
+ result = parse_gpt_response(
247
+ response,
248
+ expected_fields=["values_orientation"],
249
+ field_defaults={"values_orientation": ""}
250
+ )
251
+
252
+ return {
253
+ "values_orientation": result.get("values_orientation") or response.strip()
254
+ }
255
+ except Exception as e:
256
+ print(f"\nError in generate_personal_values: {e}")
257
+ raise
258
+
259
+
260
+
261
+
262
+ def generate_life_attitude(age: int = None, gender: str = None, occupation: str = None,
263
+ location: Dict[str, str] = None, values_orientation: str = None) -> Dict[str, Union[str, Dict, bool]]:
264
+ """使用GPT根据人口统计信息和个人价值观生成生活态度。
265
+
266
+ 此函数使用GPT根据年龄、性别、职业、地区和个人价值观生成一个人的生活态度。
267
+ 生成的态度可能是积极的、中性的或消极的。
268
+
269
+ Args:
270
+ age: 人物年龄
271
+ gender: 人物性别
272
+ occupation: 人物职业
273
+ location: 包含'city'和'country'键的字典
274
+ values_orientation: 个人价值观描述
275
+
276
+ Returns:
277
+ Dict: 包含以下字段的字典:
278
+ - attitude: 表示用户生活态度的字符串
279
+ - attitude_details: 关于这种态度如何表现的详细信息
280
+ - coping_mechanism: 人物如何应对生活挑战
281
+ """
282
+
283
+ # 创建提示词
284
+ prompt = f"""
285
+ Generate three specific attributes describing a person's life attitude, based on their profile and core values.
286
+
287
+ **Profile:**
288
+ - Age: {age}
289
+ - Gender: {gender}
290
+ - Occupation: {occupation}
291
+ - Location: {location['city']}, {location['country']}
292
+ - Core Values: {values_orientation}
293
+
294
+ **Instructions:**
295
+ 1. The generated attitude must be a direct and logical extension of the person's Core Values.
296
+ 2. Avoid broad concepts like 'community' or 'balance'. Focus on the individual.
297
+ 3. Generate ONLY the following three attributes, each as a single, distinct sentence.
298
+
299
+ **Attribute Definitions:**
300
+ - **attitude**: A single, concise sentence (5-10 words) defining their core belief or metaphor for life. This is their internal philosophy.
301
+ - **attitude_details**: A single sentence (15-20 words) describing the specific, observable behaviors that result from this attitude. This is how their philosophy manifests externally.
302
+ - **coping_mechanism**: A single sentence (5-10 words) describing a specific, recurring action or ritual they use to handle stress, challenges, or adversity.
303
+
304
+ **CRITICAL:** You must format your response EXACTLY as a valid JSON object with this structure:
305
+ {{
306
+ "attitude": "single sentence",
307
+ "attitude_details": "single sentence",
308
+ "coping_mechanism": "single sentence"
309
+ }}
310
+
311
+ DO NOT include any text before or after the JSON. The response must be parseable by json.loads().
312
+ """
313
+
314
+ messages = [
315
+ {"role": "system", "content": "You are an assistant that generates realistic human life attitudes in ONE SENTENCE, including positive, neutral, and negative outlooks. You ALWAYS respond with valid JSON objects that can be parsed by json.loads()."},
316
+ {"role": "user", "content": prompt}
317
+ ]
318
+
319
+ try:
320
+ response = get_completion(messages, temperature=0.8)
321
+
322
+ # 使用config.py中的解析函数
323
+ result = parse_gpt_response(
324
+ response,
325
+ expected_fields=["attitude", "attitude_details", "coping_mechanism"],
326
+ field_defaults={
327
+ "attitude": "",
328
+ "attitude_details": "",
329
+ "coping_mechanism": ""
330
+ }
331
+ )
332
+
333
+ # 检查是否有空值
334
+ for field in ["attitude", "attitude_details", "coping_mechanism"]:
335
+ if not result[field]:
336
+ raise ValueError(f"Missing required field: {field}")
337
+
338
+ attitude = result["attitude"]
339
+ attitude_details = result["attitude_details"]
340
+ coping_mechanism = result["coping_mechanism"]
341
+ except Exception as e:
342
+ print(f"\nError in generate_life_attitude: {e}")
343
+ raise
344
+
345
+ # 返回结果
346
+ return {
347
+ "attitude": attitude,
348
+ "attitude_details": attitude_details,
349
+ "coping_mechanism": coping_mechanism
350
+ }
351
+
352
+ def generate_personal_story(age: int, gender: str, occupation: str, location: Dict[str, str],
353
+ values_orientation: str, life_attitude: Dict[str, str]) -> Dict[str, Union[str, List[str]]]:
354
+ """根据人物的基本信息生成个人故事。
355
+
356
+ 使用GPT根据年龄、性别、职业、地区、价值观和生活态度生成一个人物的详细故事和关键生活事件。
357
+ 故事可以包含各种正面或负面的经历,包括极端情况。
358
+
359
+ Args:
360
+ age: 人物年龄
361
+ gender: 人物性别
362
+ occupation: 人物职业
363
+ location: 包含'city'和'country'键的字典
364
+ values_orientation: 个人价值观描述
365
+ life_attitude: 生活态度信息字典
366
+
367
+ Returns:
368
+ Dict: 包含以下字段的字典:
369
+ - personal_story: 个人故事描述
370
+ - key_life_events: 关键生活事件列表
371
+ """
372
+ # 提取生活态度信息
373
+ attitude = life_attitude.get("attitude", "")
374
+ attitude_category = life_attitude.get("attitude_category", "neutral")
375
+
376
+ # 创建提示词
377
+ # 随机决定生成几个故事
378
+ num_stories = random.randint(1, 3)
379
+
380
+ prompt = f"""
381
+ Generate {num_stories} concise personal stories for a person with the following characteristics:
382
+
383
+ Age: {age}
384
+ Gender: {gender}
385
+ Occupation: {occupation}
386
+ Location: {location['city']}, {location['country']}
387
+ Core Values: {values_orientation}
388
+ Life Attitude: {attitude} ({attitude_category})
389
+
390
+ IMPORTANT: The story can be positive, negative, or a mix of both. Please do not avoid including life experiences that may be controversial or have negative consequences. The narration should be as specific as possible, objective, and free from any subjective comments or value judgments. This could be a random event unrelated to the background, or a significant turning point in their life. Please avoid including anything related to community building.
391
+
392
+ Please provide:
393
+ 1. {num_stories} brief personal stories (each 100-150 words) that explain different aspects of how this person became who they are today
394
+ 2. 1-2 key life events for each story (with approximate ages when they occurred)
395
+
396
+ CRITICAL: You must format your response EXACTLY as a valid JSON object with this structure:
397
+ {{"personal_stories": ["story 1", "story 2", ...], "key_life_events": [["event 1 for story 1", "event 2 for story 1"], ["event 1 for story 2", ...], ...]}}
398
+
399
+ DO NOT include any text before or after the JSON. The response must be parseable by json.loads().
400
+ """
401
+ messages = [
402
+ {"role": "system", "content": "You are an assistant that generates concise realistic personal stories, including both positive and negative life experiences. You ALWAYS respond with valid JSON objects that can be parsed by json.loads()."},
403
+ {"role": "user", "content": prompt}
404
+ ]
405
+
406
+ try:
407
+ response = get_completion(messages, temperature=0.8)
408
+
409
+ # 解析JSON响应,只使用新的多故事格式
410
+ result = parse_gpt_response(
411
+ response,
412
+ expected_fields=["personal_stories", "key_life_events"],
413
+ field_defaults={
414
+ "personal_stories": [],
415
+ "key_life_events": [[]]
416
+ }
417
+ )
418
+
419
+ # 处理多故事格式
420
+ stories = result["personal_stories"]
421
+ events = result["key_life_events"]
422
+
423
+ # 确保有数据
424
+ if not stories or not events:
425
+ raise ValueError("Failed to generate personal stories or key life events")
426
+
427
+ # 将多故事格式转换为统一的格式
428
+ # 将所有故事连接起来,用分隔符隔开
429
+ combined_story = "\n\n".join([f"Story {i+1}: {story}" for i, story in enumerate(stories)])
430
+
431
+ # 将所有事件展平并标记每个故事的事件
432
+ all_events = []
433
+ for i, event_group in enumerate(events):
434
+ for event in event_group:
435
+ all_events.append(f"Story {i+1}: {event}")
436
+
437
+ # 如果没有事件,添加一个默认事件
438
+ if not all_events:
439
+ all_events = ["Story 1: Significant life event"]
440
+
441
+ return {
442
+ "personal_story": combined_story,
443
+ "key_life_events": all_events
444
+ }
445
+ except Exception as e:
446
+ print(f"\nError in generate_personal_story_and_interests: {e}")
447
+ raise
448
+
449
+ return {
450
+ "personal_story": combined_story,
451
+ "key_life_events": all_events
452
+ }
453
+
454
+ def generate_interests_and_hobbies(personal_story: Dict[str, Any]) -> Dict[str, Any]:
455
+ """根据人物的故事生成兴趣爱好列表。
456
+
457
+ 基于人物的个人故事和关键生活事件,生成兴趣爱好列表,可以包含好的或坏的习惯。
458
+ 严格基于故事内容生成,生成3-4个兴趣爱好。
459
+
460
+ Args:
461
+ personal_story: 人物的个人故事字典,包含"personal_story"和"key_life_events"字段
462
+
463
+ Returns:
464
+ Dict: 包含以下字段的字典:
465
+ - interests: 兴趣爱好列表(3-4个)
466
+ """
467
+ # 确保我们有个人故事数据
468
+ if not personal_story or not isinstance(personal_story, dict):
469
+ raise ValueError("必须提供个人故事数据才能生成兴趣爱好")
470
+
471
+ personal_story_data = personal_story
472
+
473
+ # 提取故事和关键事件
474
+ story_text = personal_story_data.get("personal_story", "")
475
+
476
+ # 创建提示词
477
+ prompt = f"""
478
+ Based on the person's story below, infer **exactly two** distinct hobbies or interests.
479
+
480
+ **Personal Story:**
481
+ {story_text}
482
+
483
+ **Instructions:**
484
+ 1. **Infer, do not extract.** The interests should be logical deductions from the story, not words pulled directly from the text.
485
+ 2. **Embrace complexity.** The interests can be positive (e.g., painting), negative (e.g., chain smoking), or neutral. Non-traditional or unexpected interests are encouraged if they fit the character's psychology.
486
+ 3. **Ensure solitude.** Per critical instructions, the inferred interests MUST be solitary activities and not related to community-building.
487
+ 4. **Be descriptive.** Each interest should be a short, descriptive phrase (around 3-5 words).
488
+
489
+ **CRITICAL:** You must format your response EXACTLY as a valid JSON object with this structure:
490
+ {{
491
+ "interests": ["interest1", "interest2"]
492
+ }}
493
+
494
+ DO NOT include any text before or after the JSON. The response must be parseable by json.loads().
495
+ """
496
+
497
+ messages = [
498
+ {"role": "system", "content": "You are an assistant that extracts realistic interests and hobbies from a person's life story, including both positive activities and negative habits. You ALWAYS respond with valid JSON objects that can be parsed by json.loads()."},
499
+ {"role": "user", "content": prompt}
500
+ ]
501
+
502
+ try:
503
+ response = get_completion(messages, temperature=0.2)
504
+
505
+ # 使用config.py中的解析函数
506
+ from config import parse_gpt_response
507
+ result = parse_gpt_response(
508
+ response,
509
+ expected_fields=["interests"],
510
+ field_defaults={"interests": []}
511
+ )
512
+
513
+ # 获取兴趣爱好列表
514
+ interests = result.get("interests", [])
515
+ except Exception as e:
516
+ # 记录错误并重新抛出
517
+ print(f"\nError in generate_interests_and_hobbies: {e}")
518
+ raise
519
+
520
+ # 输出生成的兴趣爱好数量信息
521
+ print(f"\nInfo: 生成的兴趣爱好数量: {len(interests)}")
522
+
523
+ # 返回结果
524
+ return {
525
+ "interests": interests
526
+ }
generation_user_profile/code/config.py ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """配置模块,管理API密钥、代理设置和OpenAI客户端配置。
2
+
3
+ 此模块包含以下主要功能:
4
+ - OpenAI API配置
5
+ - 代理服务器设置
6
+ - OpenAI客户端初始化
7
+ - API调用工具函数
8
+ - GPT响应解析函数
9
+ """
10
+
11
+ import os
12
+ import json
13
+ from openai import OpenAI
14
+ from typing import List, Dict, Optional, Any, Union, Tuple
15
+
16
+ # API配置
17
+ # 注意:在实际生产环境中,应该从环境变量或配置文件中读取API密钥
18
+
19
+ # GeoNames API配置
20
+ GEONAMES_USERNAME = "demo" # 替换为你的GeoNames用户名
21
+ GEONAMES_API_BASE = "http://api.geonames.org"
22
+
23
+ # OpenAI API配置
24
+ # 从环境变量中获取API密钥,如果不存在则使用默认值(仅用于本地开发)
25
+ OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY", "")
26
+
27
+ # 使用的GPT模型版本
28
+ GPT_MODEL = "gpt-4.1-mini"
29
+
30
+ # Proxy Configuration
31
+ # 从环境变量中获取代理设置,如果已经设置则不覆盖
32
+ if not os.environ.get('https_proxy'):
33
+ os.environ['https_proxy'] = os.environ.get('HTTPS_PROXY', '')
34
+ if not os.environ.get('http_proxy'):
35
+ os.environ['http_proxy'] = os.environ.get('HTTP_PROXY', '')
36
+
37
+ # Initialize OpenAI client
38
+ client = OpenAI(api_key=OPENAI_API_KEY)
39
+
40
+ def get_completion(messages: List[Dict[str, str]], model: str = GPT_MODEL, temperature: float = 0.5) -> Optional[str]:
41
+ """调用OpenAI API获取回复。
42
+
43
+ 使用配置的OpenAI客户端发送请求并获取回复。支持自定义模型和temperature参数。
44
+
45
+ Args:
46
+ messages (List[Dict[str, str]]): 消息列表,每个消息包含role和content
47
+ model (str, optional): 使用的GPT模型名称。默认为配置中的GPT_MODEL
48
+ temperature (float, optional): 采样温度,控制输出的随机性。默认为0.2
49
+
50
+ Returns:
51
+ Optional[str]: API返回的文本回复。如果请求失败则返回None
52
+ """
53
+ try:
54
+ response = client.chat.completions.create(
55
+ model=model,
56
+ messages=messages,
57
+ temperature=temperature
58
+ )
59
+ return response.choices[0].message.content
60
+ except Exception as e:
61
+ print(f"Error in API call: {e}")
62
+ return None
63
+
64
+
65
+ def extract_json_from_markdown(response: str) -> str:
66
+ """从Markdown代码块中提取JSON内容。
67
+
68
+ Args:
69
+ response (str): 可能包含Markdown代码块的响应文本
70
+
71
+ Returns:
72
+ str: 提取的JSON内容或原始响应
73
+ """
74
+ if response and response.strip().startswith('```') and '```' in response:
75
+ # 提取代码块内容
76
+ code_content = response.split('```', 2)[1]
77
+ if code_content.startswith('json'):
78
+ code_content = code_content[4:].strip()
79
+ response = code_content.strip()
80
+ return response
81
+
82
+
83
+ def parse_json_response(response: str, default_value: Any = None) -> Any:
84
+ """解析JSON响应,处理可能的解析错误。
85
+
86
+ Args:
87
+ response (str): JSON格式的响应文本
88
+ default_value (Any, optional): 解析失败时返回的默认值
89
+
90
+ Returns:
91
+ Any: 解析后的JSON对象或默认值
92
+ """
93
+ if not response:
94
+ return default_value
95
+
96
+ # 首先尝试从Markdown中提取JSON
97
+ response = extract_json_from_markdown(response)
98
+
99
+ try:
100
+ return json.loads(response)
101
+ except json.JSONDecodeError as e:
102
+ print(f"\nWarning: Failed to parse JSON response: {e}")
103
+ print(f"Response was: {response[:100]}..." if len(response) > 100 else f"Response was: {response}")
104
+ return default_value
105
+
106
+
107
+ def parse_gpt_response(response: str, expected_fields: List[str] = None, field_defaults: Dict[str, Any] = None) -> Dict[str, Any]:
108
+ """解析GPT响应,提取预期字段并应用默认值。
109
+
110
+ Args:
111
+ response (str): GPT响应文本
112
+ expected_fields (List[str], optional): 预期的字段列表
113
+ field_defaults (Dict[str, Any], optional): 字段默认值字典
114
+
115
+ Returns:
116
+ Dict[str, Any]: 包含所有预期字段的字典
117
+ """
118
+ if field_defaults is None:
119
+ field_defaults = {}
120
+
121
+ # 解析JSON响应
122
+ result = parse_json_response(response, {})
123
+
124
+ # 如果没有指定预期字段,直接返回解析结果
125
+ if not expected_fields:
126
+ return result
127
+
128
+ # 确保返回所有预期字段
129
+ output = {}
130
+ for field in expected_fields:
131
+ output[field] = result.get(field, field_defaults.get(field))
132
+
133
+ return output
134
+
135
+
136
+ def parse_nested_json_response(response: str) -> Tuple[Dict[str, Any], bool]:
137
+ """解析可能嵌套的JSON响应。
138
+
139
+ 处理可能嵌套在Markdown代码块中的JSON字符串表示的JSON对象。
140
+
141
+ Args:
142
+ response (str): 可能包含嵌套JSON的响应文本
143
+
144
+ Returns:
145
+ Tuple[Dict[str, Any], bool]: 解析后的JSON对象和是否成功解析的标志
146
+ """
147
+ # 首先从Markdown中提取内容
148
+ extracted = extract_json_from_markdown(response)
149
+
150
+ # 尝试解析JSON
151
+ try:
152
+ result = json.loads(extracted)
153
+
154
+ # 检查是否是JSON字符串表示的JSON对象
155
+ if isinstance(result, dict) and len(result) == 1 and next(iter(result.values())).startswith('{'):
156
+ key = next(iter(result.keys()))
157
+ try:
158
+ nested_json = json.loads(result[key])
159
+ return nested_json, True
160
+ except json.JSONDecodeError:
161
+ pass
162
+
163
+ return result, True
164
+ except json.JSONDecodeError as e:
165
+ print(f"\nWarning: Failed to parse JSON response: {e}")
166
+ return {}, False
generation_user_profile/code/data/100.json ADDED
@@ -0,0 +1,395 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Career and Work Identity": {
3
+ "Business": {
4
+ "Strategies": {}
5
+ },
6
+ "Client": {
7
+ "UserPreferences": {},
8
+ "UserProfileAttributes": {}
9
+ },
10
+ "Company": {
11
+ "Industry": {},
12
+ "RevenueMetrics": {},
13
+ "Type": {}
14
+ },
15
+ "CompanyCulture": {
16
+ "Type": {}
17
+ },
18
+ "Experience": {
19
+ "Attributes": {},
20
+ "Salesforce": {}
21
+ },
22
+ "Goals": {
23
+ "FinancialAttributes": {},
24
+ "GoalsAndAspirations": {}
25
+ },
26
+ "Industry": {
27
+ "Expertise": {},
28
+ "TechProficiency": {}
29
+ },
30
+ "JobRole": {
31
+ "LocationPreferences": {},
32
+ "Responsibilities": {}
33
+ },
34
+ "Occupation": {
35
+ "Service": {}
36
+ },
37
+ "Organization": {
38
+ "Category": {},
39
+ "Guidelines": {},
40
+ "Preferences": {}
41
+ },
42
+ "PersonalGoals": {
43
+ "Goals": {},
44
+ "Meetings": {}
45
+ },
46
+ "PreviousExperience": {
47
+ "UserLevel": {}
48
+ },
49
+ "Profession": {
50
+ "PersonalBackgroundAttributes": {},
51
+ "ProfessionalAttributes": {},
52
+ "UserProfileAttributes": {}
53
+ },
54
+ "ProfessionalField": {
55
+ "Experience": {},
56
+ "Industry": {},
57
+ "Role": {}
58
+ },
59
+ "Role": {
60
+ "Background": {},
61
+ "CommunicationStyle": {},
62
+ "Contract": {},
63
+ "Industry": {},
64
+ "positionTitle": {}
65
+ },
66
+ "Skills": {
67
+ "TechnicalAttributes": {},
68
+ "UserProfileAttributes": {}
69
+ },
70
+ "Team": {
71
+ "dynamics": {}
72
+ },
73
+ "Technology": {
74
+ "Type": {}
75
+ },
76
+ "User": {
77
+ "BusinessContext": {},
78
+ "CampaignAttributes": {},
79
+ "UserAttributes": {}
80
+ },
81
+ "WorkEnvironment": {
82
+ "ContentOrganization": {},
83
+ "UserPreferences": {}
84
+ }
85
+ },
86
+ "Core Values, Beliefs, and Philosophy": {
87
+ "Personal": {
88
+ "ForgivenessLevel": {},
89
+ "PersonalAttributes": {}
90
+ },
91
+ "Philosophical Beliefs": {
92
+ "AnimalConsumption": {}
93
+ },
94
+ "PoliticalIdeology": {
95
+ "Views": {}
96
+ },
97
+ "Spirituality": {
98
+ "Personal Development": {}
99
+ },
100
+ "Sustainability": {
101
+ "Attachment": {}
102
+ }
103
+ },
104
+ "Cultural and Social Context": {
105
+ "Attitudes": {
106
+ "TowardsDrugs": {}
107
+ },
108
+ "Audience": {
109
+ "InvestorType": {}
110
+ },
111
+ "Communication": {
112
+ "Style": {}
113
+ },
114
+ "Community": {
115
+ "UserCharacteristics": {}
116
+ },
117
+ "CompanyCulture": {
118
+ "Culture": {}
119
+ },
120
+ "Culture": {
121
+ "PersonalAttributes": {},
122
+ "PersonalInterests": {}
123
+ },
124
+ "DataProcessing": {
125
+ "Nature": {}
126
+ },
127
+ "Exposure": {
128
+ "HistoricalTopics": {}
129
+ },
130
+ "Family": {
131
+ "size": {}
132
+ },
133
+ "Historical": {
134
+ "Background": {}
135
+ },
136
+ "Knowledge": {
137
+ "AboutRefugeeIssues": {}
138
+ },
139
+ "Leadership": {
140
+ "Style": {}
141
+ },
142
+ "LocalEvents": {
143
+ "Attendance": {}
144
+ },
145
+ "LocalLaws": {
146
+ "RhodeIsland": {}
147
+ },
148
+ "Political": {
149
+ "Views": {}
150
+ },
151
+ "Preferences": {
152
+ "ChildrenPreferences": {},
153
+ "PersonalPreferences": {}
154
+ },
155
+ "Priorities": {
156
+ "TravelGoals": {}
157
+ },
158
+ "Region": {
159
+ "Residence": {}
160
+ },
161
+ "School": {
162
+ "Environment": {}
163
+ },
164
+ "SocialActivities": {
165
+ "NightlifeExperience": {}
166
+ },
167
+ "SocialStigma": {
168
+ "Menstruation": {}
169
+ },
170
+ "SubstanceUse": {
171
+ "DrugAwareness": {}
172
+ },
173
+ "SupportSystems": {
174
+ "Availability": {}
175
+ }
176
+ },
177
+ "Demographic Information": {
178
+ "Demographics": {
179
+ "Age": {},
180
+ "CurrentLocation": {},
181
+ "Education": {},
182
+ "General": {},
183
+ "Identity": {},
184
+ "Origin": {},
185
+ "Region": {},
186
+ "TargetAudience": {}
187
+ },
188
+ "Family": {
189
+ "FamilyDynamics": {},
190
+ "PersonalAttributes": {},
191
+ "PersonalDemographics": {}
192
+ },
193
+ "Lifestyle": {
194
+ "budget": {}
195
+ },
196
+ "Professional": {
197
+ "Demographic": {},
198
+ "Professional Background": {}
199
+ },
200
+ "Socioeconomic": {
201
+ "UserProfile": {}
202
+ }
203
+ },
204
+ "Education and Learning": {
205
+ "AcademicProfile": {
206
+ "EducationLevel": {},
207
+ "EducationalBackground": {}
208
+ },
209
+ "EducationalInstitution": {
210
+ "Name": {}
211
+ },
212
+ "KnowledgeFamiliarity": {
213
+ "DifficultyLevel": {},
214
+ "MedicalTerminology": {}
215
+ },
216
+ "LearningPlatform": {
217
+ "Focus": {}
218
+ },
219
+ "PersonalAttributes": {
220
+ "FitnessPreferences": {},
221
+ "UserPreferences": {}
222
+ },
223
+ "PersonalExperience": {
224
+ "WorkingWithRefugees": {}
225
+ },
226
+ "SubjectExpertise": {
227
+ "FocusArea": {}
228
+ },
229
+ "SubjectInterest": {
230
+ "User_Personalization": {}
231
+ },
232
+ "UnderstandingLevel": {
233
+ "Achievement": {},
234
+ "Creative_Education": {},
235
+ "Science_Education": {},
236
+ "Status": {}
237
+ }
238
+ },
239
+ "Emotional and Relational Skills": {
240
+ "Emotional Attributes": {
241
+ "EmotionalSupportNeeds": {}
242
+ },
243
+ "Environmental Attributes": {
244
+ "emotionalConnection": {}
245
+ },
246
+ "Personal Attributes": {
247
+ "Beliefs": {},
248
+ "Preferences": {}
249
+ },
250
+ "Work Attributes": {
251
+ "Drivers": {}
252
+ }
253
+ },
254
+ "Hobbies, Interests, and Lifestyle": {
255
+ "Education": {
256
+ "Interests": {}
257
+ },
258
+ "FoodPreferences": {
259
+ "Dietary Preference": {},
260
+ "Food Preference": {}
261
+ },
262
+ "Hobbies": {
263
+ "design": {},
264
+ "types": {}
265
+ },
266
+ "Interests": {
267
+ "ConsumerPreferences": {},
268
+ "CulturalInterest": {},
269
+ "UserPreferences": {}
270
+ },
271
+ "LifestylePreferences": {
272
+ "UserAttributes": {}
273
+ },
274
+ "Professional": {
275
+ "Interests": {}
276
+ },
277
+ "WorkRelatedInterests": {
278
+ "FinancialManagement": {},
279
+ "InvestmentPreferences": {}
280
+ },
281
+ "contentType": {
282
+ "AdCampaigns": {}
283
+ }
284
+ },
285
+ "Lifestyle and Daily Routine": {
286
+ "Dietary Preferences": {
287
+ "DailyContext": {},
288
+ "FamilyContext": {},
289
+ "HealthConsiderations": {},
290
+ "Preferences": {}
291
+ },
292
+ "Living Conditions": {
293
+ "BuyingIntention": {}
294
+ },
295
+ "Personal Lifestyle": {
296
+ "Preferences": {}
297
+ }
298
+ },
299
+ "Media Consumption and Engagement": {
300
+ "PersonalizationAttributes": {
301
+ "UserPreferences": {}
302
+ }
303
+ },
304
+ "Physical and Health Characteristics": {
305
+ "EnvironmentalFactors": {
306
+ "SoilType": {}
307
+ },
308
+ "GeneticHistory": {
309
+ "GeneticDisorders": {}
310
+ },
311
+ "HealthObjectives": {
312
+ "CardiovascularWellness": {}
313
+ },
314
+ "MedicalHistory": {
315
+ "General": {}
316
+ },
317
+ "PersonalHealthAttributes": {
318
+ "DietaryPreferences": {},
319
+ "General": {},
320
+ "HealthConditions": {}
321
+ }
322
+ },
323
+ "Psychological and Cognitive Aspects": {
324
+ "BehavioralAttributes": {
325
+ "AlcoholConsumptionHistory": {}
326
+ },
327
+ "CognitiveAttributes": {
328
+ "CognitiveAttributes": {},
329
+ "DevelopmentalAttributes": {},
330
+ "EmotionalAttributes": {},
331
+ "PreferenceAttributes": {}
332
+ },
333
+ "CopingMechanisms": {
334
+ "PersonalHistory": {}
335
+ },
336
+ "EmotionalAttributes": {
337
+ "PersonalAttributes": {},
338
+ "PsychologicalFactors": {}
339
+ },
340
+ "MentalAttributes": {
341
+ "CognitiveAttributes": {},
342
+ "UserPreferences": {}
343
+ },
344
+ "Past": {
345
+ "IndividualCharacteristics": {}
346
+ },
347
+ "PersonalityAttributes": {
348
+ "Style": {}
349
+ },
350
+ "User": {
351
+ "EmotionalState": {}
352
+ }
353
+ },
354
+ "Relationships and Social Networks": {
355
+ "CustomerRelations": {
356
+ "UserEngagement": {},
357
+ "UserProfile": {}
358
+ },
359
+ "FamilyRelations": {
360
+ "CurrentLocation": {},
361
+ "CurrentState": {},
362
+ "FamilyDynamics": {},
363
+ "FamilyMaritalStatus": {},
364
+ "RelationshipDetails": {}
365
+ },
366
+ "PersonalPreferences": {
367
+ "Companions": {}
368
+ },
369
+ "PersonalRelationships": {
370
+ "Availability": {},
371
+ "Context": {},
372
+ "SocialConnections": {},
373
+ "SocialInfluence": {},
374
+ "UniversityAffiliation": {}
375
+ },
376
+ "ProfessionalRelations": {
377
+ "PersonalAttributes": {}
378
+ },
379
+ "ProfessionalRelationships": {
380
+ "Colleagues": {},
381
+ "Connections": {},
382
+ "Duration": {},
383
+ "HeadOfSalesRelationship": {},
384
+ "Interests": {},
385
+ "Preferences": {},
386
+ "Relationship": {},
387
+ "RelationshipQuality": {},
388
+ "Role": {},
389
+ "ZichengExperience": {}
390
+ },
391
+ "UserAttributes": {
392
+ "FatherRelationship": {}
393
+ }
394
+ }
395
+ }
generation_user_profile/code/data/attribute_embeddings.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:664f3d1f49a5a3162108da60e4340411f01fdf58a38419387ddb1cdd0ee61481
3
+ size 28364886
generation_user_profile/code/data/attributes_merged.json ADDED
The diff for this file is too large to render. See raw diff
 
generation_user_profile/code/data/large_attributes copy.json ADDED
The diff for this file is too large to render. See raw diff
 
generation_user_profile/code/data/large_attributes.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Demographic Information": {
3
+ "Age": {
4
+ "description": "The person's age in years"
5
+ },
6
+ "Gender": {
7
+ "description": "The person's gender identity"
8
+ },
9
+ "Location": {
10
+ "description": "Where the person lives",
11
+ "Country": {
12
+ "description": "The country where the person lives"
13
+ },
14
+ "City": {
15
+ "description": "The city where the person lives"
16
+ }
17
+ }
18
+ },
19
+ "Career and Work Identity": {
20
+ "Occupation": {
21
+ "description": "The person's current job or profession"
22
+ },
23
+ "Work Experience": {
24
+ "description": "The person's work history and experience"
25
+ }
26
+ },
27
+ "Core Values, Beliefs, and Philosophy": {
28
+ "Personal Values": {
29
+ "description": "The person's core values and beliefs"
30
+ },
31
+ "Life Philosophy": {
32
+ "description": "The person's approach to life and worldview"
33
+ }
34
+ },
35
+ "Lifestyle and Daily Routine": {
36
+ "Daily Habits": {
37
+ "description": "Regular activities the person engages in"
38
+ },
39
+ "Lifestyle Choices": {
40
+ "description": "How the person chooses to live their life"
41
+ }
42
+ },
43
+ "Cultural and Social Context": {
44
+ "Cultural Background": {
45
+ "description": "The person's cultural heritage and influences"
46
+ },
47
+ "Social Connections": {
48
+ "description": "The person's relationships and social network"
49
+ }
50
+ },
51
+ "Hobbies, Interests, and Lifestyle": {
52
+ "Hobbies": {
53
+ "description": "Activities the person enjoys in their free time"
54
+ },
55
+ "Interests": {
56
+ "description": "Topics or subjects the person is interested in"
57
+ }
58
+ },
59
+ "Other Attributes": {
60
+ "Personal Story": {
61
+ "description": "Significant events or narratives from the person's life"
62
+ },
63
+ "Key Life Events": {
64
+ "description": "Major events that have shaped the person's life"
65
+ }
66
+ }
67
+ }
generation_user_profile/code/data/occupations_english copy.json ADDED
@@ -0,0 +1,933 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ "HR Specialist/Assistant ",
3
+ "HR Information System (HRIS) Management ",
4
+ "HR Director ",
5
+ "HR Manager/Supervisor ",
6
+ "Other HR Administration ",
7
+ "Human Resources Director ",
8
+ "Party, Labor Union, and Youth League Officer ",
9
+ "Internal Staff ",
10
+ "Front Desk/Switchboard/Receptionist ",
11
+ "Logistics ",
12
+ "Librarian ",
13
+ "Training Specialist/Assistant ",
14
+ "Training Manager/Supervisor ",
15
+ "Recruitment Specialist/Assistant ",
16
+ "Recruitment Manager/Supervisor ",
17
+ "Clerk ",
18
+ "Document/Data Management ",
19
+ "Headhunter Consultant ",
20
+ "Computer Operator/Typist/Data Entry Clerk ",
21
+ "Manager Assistant/Secretary ",
22
+ "Compensation/Performance/Employee Relations ",
23
+ "Administrative Specialist/Assistant ",
24
+ "Administrative Director ",
25
+ "Administrative Manager/Supervisor ",
26
+ "Other Health and Massage ",
27
+ "Masseur/Masseuse ",
28
+ "Bath Attendant ",
29
+ "Foot Reflexologist ",
30
+ "Acupuncture and Tui Na ",
31
+ "Insurance Product Development ",
32
+ "Other Insurance Positions ",
33
+ "Insurance Internal Staff ",
34
+ "Insurance Trainer ",
35
+ "Insurance Contract Management ",
36
+ "Insurance Client Manager ",
37
+ "Insurance Customer Service ",
38
+ "Insurance Underwriting/Claims ",
39
+ "Insurance Telemarketing ",
40
+ "Insurance Actuary ",
41
+ "Insurance Broker ",
42
+ "Insurance Project Manager ",
43
+ "Insurance Consultant ",
44
+ "Reserve Manager ",
45
+ "Automobile Damage Assessment/Auto Insurance Claims ",
46
+ "Renewal Management ",
47
+ "Auto Insurance Specialist ",
48
+ "Other Positions ",
49
+ "Breeding Staff ",
50
+ "Breeding Department Supervisor ",
51
+ "Other Agriculture, Forestry, Animal Husbandry, and Fishery",
52
+ "Agronomist/Floral Designer ",
53
+ "Animal Breeding/Farming ",
54
+ "Animal Nutrition/Feed Research and Development ",
55
+ "Farm Manager ",
56
+ "Forestry Technician ",
57
+ "Livestock Specialist ",
58
+ "Feed Business ",
59
+ "Feed Sales ",
60
+ "Clinical Promotion Manager ",
61
+ "Clinical Data Analyst ",
62
+ "Clinical Research/Coordination ",
63
+ "Other in Pharmaceutical Biology ",
64
+ "Chemical Analysis Tester ",
65
+ "Medical Device Promotion ",
66
+ "Medical Device Registration ",
67
+ "Medical Device Production/Quality Management ",
68
+ "Medical Device Research and Development ",
69
+ "Medical Device Research and Development/Maintenance ",
70
+ "Pharmaceutical Chemical Analysis ",
71
+ "Pharmaceutical Academic Promotion ",
72
+ "Pharmaceutical Technology Research and Development Personnel ",
73
+ "Pharmaceutical Technology Research and Development Management Personnel ",
74
+ "Pharmaceutical Investment Promotion ",
75
+ "Pharmaceutical Research and Development/Production/Registration ",
76
+ "Pharmaceutical Sales Manager/Supervisor ",
77
+ "Pharmaceutical Project Bidding Management ",
78
+ "Pharmaceutical Project Management ",
79
+ "Bioengineering/Biopharmaceuticals ",
80
+ "Pharmaceutical Marketing Specialist/Assistant ",
81
+ "Pharmaceutical Marketing Manager/Supervisor ",
82
+ "Traditional Chinese Medicine Doctor ",
83
+ "Obstetrician ",
84
+ "Health Doctor ",
85
+ "Public Health/Disease Control ",
86
+ "Laboratory/Testing Physician ",
87
+ "Medical Laboratory/Testing ",
88
+ "Medical Imaging/Radiology Physician ",
89
+ "Doctor ",
90
+ "Medical Management ",
91
+ "Pharmaceutical Quality Inspection ",
92
+ "Other in Hospital Nursing ",
93
+ "Pet Care/Veterinarian ",
94
+ "Medical Guide ",
95
+ "Psychologist ",
96
+ "Nurse/Nursing ",
97
+ "Head Nurse/Nursing Director ",
98
+ "Dentist ",
99
+ "Physiotherapist ",
100
+ "General Outpatient/General Practitioner ",
101
+ "Cosmetic Surgeon",
102
+ "Pharmacist ",
103
+ "Nutritionist ",
104
+ "Acupuncturist/Masseur ",
105
+ "Optometrist ",
106
+ "Anesthetist ",
107
+ "Chauffeur ",
108
+ "Other Transportation Roles ",
109
+ "Designated Driver ",
110
+ "Bus/Subway Attendant ",
111
+ "Taxi Driver ",
112
+ "Train Attendant ",
113
+ "Train Driver/Operator ",
114
+ "Executive Driver ",
115
+ "Ground Staff ",
116
+ "Security Screener ",
117
+ "Passenger Driver ",
118
+ "Special Vehicle Driver ",
119
+ "Shuttle Bus Driver ",
120
+ "Flight Attendant ",
121
+ "Crew Member/Sailor ",
122
+ "Ship Attendant ",
123
+ "Ship Driver/Operator ",
124
+ "Freight Driver ",
125
+ "Aircraft Pilot/Operator ",
126
+ "Driving School Instructor/Coach ",
127
+ "VIP Specialist ",
128
+ "Pre-sales/Post-sales Technical Support Engineer ",
129
+ "Pre-sales/Post-sales Technical Support Management ",
130
+ "Pre-sales/Post-sales Service ",
131
+ "Customer Relationship Management ",
132
+ "Customer Service Hotline/Call Center Staff ",
133
+ "Customer Service Specialist/Assistant ",
134
+ "Other Customer Service Roles ",
135
+ "Customer Service Director ",
136
+ "Customer Service Manager/Supervisor ",
137
+ "Complaint Specialist ",
138
+ "Telephone Customer Service ",
139
+ "Online Customer Service ",
140
+ "Nanny ",
141
+ "Security Guard ",
142
+ "Cleaner ",
143
+ "Wedding/Celebration Planning Services ",
144
+ "Pet Care and Grooming ",
145
+ "Other Household Cleaning Services ",
146
+ "Home Appliance Repair ",
147
+ "Caregiver ",
148
+ "Maternity Matron ",
149
+ "Laundry Worker ",
150
+ "Infant Caregiver/Nursery Teacher ",
151
+ "Water Delivery Worker",
152
+ "Hourly Worker ",
153
+ "Business Development Specialist/Assistant ",
154
+ "Planning Manager/Supervisor ",
155
+ "Conference and Exhibition Specialist/Manager ",
156
+ "Promotion Supervisor/Director/Promoter ",
157
+ "Promotion Manager ",
158
+ "Public Relations Specialist/Assistant ",
159
+ "Public Relations Director ",
160
+ "Public Relations Manager/Supervisor ",
161
+ "Brand Specialist/Manager ",
162
+ "Media Specialist/Assistant ",
163
+ "Media Manager/Supervisor ",
164
+ "Media Sales ",
165
+ "Academic Promotion ",
166
+ "Marketing Specialist/Assistant ",
167
+ "Marketing Supervisor ",
168
+ "Other Marketing and Public Relations ",
169
+ "Market Expansion ",
170
+ "Market Planning ",
171
+ "Marketing Manager/Director ",
172
+ "Marketing ",
173
+ "Market Research ",
174
+ "Market Research and Analysis ",
175
+ "Channel Marketing Specialist ",
176
+ "Government Affairs Management ",
177
+ "Event Execution ",
178
+ "Event Planning ",
179
+ "Site Selection and Expansion/New Store Development ",
180
+ "Professional Consultant ",
181
+ "Corporate/Business Development Manager ",
182
+ "Corporate Planning ",
183
+ "Conference Specialist/Assistant ",
184
+ "Conference Manager/Supervisor ",
185
+ "Exhibition Planning/Design ",
186
+ "Creative Director ",
187
+ "Production Execution ",
188
+ "Consulting Director ",
189
+ "Consulting Manager/Supervisor ",
190
+ "Consultant ",
191
+ "Wedding Planner ",
192
+ "Media Planning/Management ",
193
+ "Client Supervisor/Specialist ",
194
+ "Advertising/Exhibition Business Development ",
195
+ "Advertising/Exhibition Project Management ",
196
+ "Advertising Creativity ",
197
+ "Other Advertising Consulting ",
198
+ "Advertising Account Director/Manager ",
199
+ "Advertising Copywriter ",
200
+ "Advertising Design ",
201
+ "Intelligence and Information Analysis",
202
+ "Immigration/Study Abroad Consultant ",
203
+ "Landscape/Scenic Designer ",
204
+ "Civil Engineering Surveyor ",
205
+ "Civil/Structural Engineer ",
206
+ "Urban Planning and Design ",
207
+ "Safety Management/Safety Officer ",
208
+ "Security Engineer ",
209
+ "Interior Decoration Designer ",
210
+ "Geotechnical Engineer ",
211
+ "Engineering Director ",
212
+ "Engineering Supervisor ",
213
+ "Engineering Equipment Management ",
214
+ "Engineering Documentation Management ",
215
+ "Engineering Project Management ",
216
+ "Municipal Engineer ",
217
+ "Curtain Wall Engineer ",
218
+ "Other Architecture Roles ",
219
+ "Architectural Drafting ",
220
+ "Construction Safety Management ",
221
+ "Architectural Engineer/Chief Engineer ",
222
+ "Construction Acceptance ",
223
+ "Construction Site Management ",
224
+ "Architectural Designer/Drafter ",
225
+ "Development and Reporting ",
226
+ "Construction Worker ",
227
+ "Construction Team Leader ",
228
+ "Line and Pipeline Engineering Technician ",
229
+ "Building Automation ",
230
+ "Cabinet Designer ",
231
+ "Water Conservancy/Port Engineering Technician ",
232
+ "Surveying/Mapping ",
233
+ "Blasting Engineer ",
234
+ "Hard Decoration Designer ",
235
+ "Water Supply and Drainage/Refrigeration/HVAC ",
236
+ "Structured Cabling/Weak Current ",
237
+ "Documentation Specialist ",
238
+ "Soft Decoration Designer ",
239
+ "Cost Estimator/Budget Analyst ",
240
+ "Road and Bridge Technician ",
241
+ "Host/Presenter ",
242
+ "Other Entertainment Roles ",
243
+ "Entertainment Hall Attendant ",
244
+ "Entertainment Marketing Planner ",
245
+ "Film/Video Post-Production ",
246
+ "Film Producer ",
247
+ "Executive Producer ",
248
+ "Executive Agent ",
249
+ "Photographer/Cameraman ",
250
+ "Projectionist ",
251
+ "Lighting Technician",
252
+ "Film Marketing Manager ",
253
+ "Short Video Editor ",
254
+ "Short Video Planner ",
255
+ "Short Video Director ",
256
+ "Short Video Operations ",
257
+ "Protocol/Reception ",
258
+ "Signed Artist ",
259
+ "Agent Assistant ",
260
+ "Coordinating Producer ",
261
+ "Artist Assistant ",
262
+ "Artist Agent ",
263
+ "Artist Coordinator ",
264
+ "Program Director ",
265
+ "Program Director and Planner ",
266
+ "Video Editing Specialist ",
267
+ "Video Editing Assistant ",
268
+ "Video Editor ",
269
+ "Bartender ",
270
+ "Voice Actor ",
271
+ "Bar Waitstaff ",
272
+ "Sound Engineer ",
273
+ "Other Real Estate Positions ",
274
+ "Real Estate Internal Staff ",
275
+ "Real Estate Customer Service ",
276
+ "Real Estate Clerk/Assistant ",
277
+ "Real Estate Store Manager ",
278
+ "Real Estate Development/Planning ",
279
+ "Real Estate Agent ",
280
+ "Real Estate Appraiser ",
281
+ "Real Estate Brokerage/Transactions ",
282
+ "Real Estate Investment Analyst ",
283
+ "Real Estate Asset Management ",
284
+ "Real Estate Sales Supervisor ",
285
+ "Real Estate Sales Manager ",
286
+ "Real Estate Project Development and Reporting ",
287
+ "Real Estate Project Bidding ",
288
+ "Real Estate Project Planning Specialist/Assistant ",
289
+ "Real Estate Project Planning Manager/Supervisor ",
290
+ "Real Estate Project Management ",
291
+ "Real Estate Project Support Engineer ",
292
+ "Inspector ",
293
+ "Property Consultant ",
294
+ "Physical Education Teacher/Coach ",
295
+ "Part-time Teacher ",
296
+ "Middle School Teacher ",
297
+ "Training Assistant ",
298
+ "Trainer/Instructor ",
299
+ "Training Supervisor ",
300
+ "Training Planner ",
301
+ "Foreign Teacher",
302
+ "Foreign Language Teacher ",
303
+ "University Lecturer ",
304
+ "Academic Research/Scientific Research ",
305
+ "Tutor ",
306
+ "Primary School Teacher ",
307
+ "Preschool/Early Childhood Educator ",
308
+ "Admissions/Course Consultant ",
309
+ "Teaching/Academic Administration ",
310
+ "Teaching/Academic Administrative Staff ",
311
+ "Teacher/Teaching Assistant ",
312
+ "Educational Product Development ",
313
+ "Other Education and Training ",
314
+ "Liberal Arts Teacher ",
315
+ "Principal ",
316
+ "Science Teacher ",
317
+ "Postgraduate Entrance Exam/Civil Service Exam Trainer ",
318
+ "Vocational Technical Teacher ",
319
+ "Outdoor Adventure Trainer ",
320
+ "Music/Art Teacher ",
321
+ "High School Teacher ",
322
+ "Tour Guide ",
323
+ "Tourism Product/Itinerary Planner ",
324
+ "Other Tourism ",
325
+ "Travel Consultant ",
326
+ "Visa Specialist ",
327
+ "Tour Coordinator ",
328
+ "Ticketing Agent ",
329
+ "Handyman ",
330
+ "Cutter/Welder ",
331
+ "Refrigeration/Plumbing Technician ",
332
+ "Packager ",
333
+ "Printing Worker ",
334
+ "Pressing Worker ",
335
+ "Apprentice ",
336
+ "Mobile Phone Repair Technician ",
337
+ "Pressing Worker ",
338
+ "Operator ",
339
+ "General Worker ",
340
+ "Other General/Technical Worker ",
341
+ "Carpenter ",
342
+ "Dyer ",
343
+ "Sample Garment Worker ",
344
+ "Cement Worker ",
345
+ "Painter ",
346
+ "Tiler ",
347
+ "Power Line Worker ",
348
+ "Electrician ",
349
+ "Elevator Technician ",
350
+ "Electroplating Worker ",
351
+ "Grinding/Stamping Worker",
352
+ "Pipefitter ",
353
+ "Textile Worker ",
354
+ "Assembler ",
355
+ "General Maintenance Worker ",
356
+ "Sewing Worker ",
357
+ "Lathe/Milling Machine Operator ",
358
+ "Rebar Worker ",
359
+ "Sheet Metal Worker ",
360
+ "Fitter ",
361
+ "Forklift Operator ",
362
+ "Casting/Injection Molding/Mold Worker ",
363
+ "Boiler Operator ",
364
+ "Loom Operator ",
365
+ "Warping Operator ",
366
+ "Apparel/Textile/Leather Technologist ",
367
+ "Apparel/Textile/Leather Merchandiser ",
368
+ "Other Apparel/Textile ",
369
+ "Apparel/Textile/Leather Quality Management ",
370
+ "Apparel/Textile Design Director ",
371
+ "Apparel Pattern Maker ",
372
+ "Fashion Designer ",
373
+ "Pattern Room/Pattern Grader ",
374
+ "Sample Maker ",
375
+ "Sizing Operator ",
376
+ "Production Management ",
377
+ "Computer Grader ",
378
+ "Pattern Maker/Sample Maker ",
379
+ "Textile Designer ",
380
+ "Spinning Operator ",
381
+ "Cutter ",
382
+ "Fabric/Accessory Development/Purchasing ",
383
+ "Footwear Designer ",
384
+ "Food/Beverage R&D/Inspection ",
385
+ "Food Production Worker ",
386
+ "CNC/Numerical Control Engineer ",
387
+ "Instrument/Measurement Engineer ",
388
+ "Train Maintenance/Servicing ",
389
+ "Train Design and Manufacturing ",
390
+ "Other Machinery/Instrument ",
391
+ "Mechanical Engineer ",
392
+ "Mechanical Maintenance/Servicing ",
393
+ "Electromechanical Engineer ",
394
+ "Pneumatic Engineer ",
395
+ "Test/Reliability Engineer ",
396
+ "Layout Design Engineer ",
397
+ "R&D Engineer ",
398
+ "Ship Maintenance/Servicing ",
399
+ "Ship Design and Manufacturing ",
400
+ "Assembly Technician ",
401
+ "Aircraft Maintenance/Servicing",
402
+ "Aircraft Design and Manufacturing ",
403
+ "4S Store Management ",
404
+ "Used Car Appraiser ",
405
+ "Parking Attendant ",
406
+ "Gas Station Attendant ",
407
+ "Engine/Assembly Engineer ",
408
+ "Safety Performance Engineer ",
409
+ "Automobile/Motorcycle Repair ",
410
+ "Automobile Mechanic ",
411
+ "Other Automotive Positions ",
412
+ "Automotive Engineering Project Management ",
413
+ "Automotive Structural Engineer ",
414
+ "Automotive Mechanical Engineer ",
415
+ "Automotive Inspection/Testing ",
416
+ "Automotive Electronics Engineer ",
417
+ "Automotive Electrician ",
418
+ "Automobile Detailing ",
419
+ "Automotive Design Engineer ",
420
+ "Automotive Quality Management/Inspection and Testing ",
421
+ "Automotive Parts Designer ",
422
+ "Car Wash Attendant ",
423
+ "Claims Specialist/Consultant ",
424
+ "Assembly Process Engineer ",
425
+ "Tire Technician ",
426
+ "Parts Sales ",
427
+ "Intellectual Property/Patent Consultant ",
428
+ "Contract Management ",
429
+ "Compliance Management ",
430
+ "Lawyer/Legal Consultant ",
431
+ "Legal Assistant ",
432
+ "Legal Specialist/Supervisor ",
433
+ "Other Legal Positions ",
434
+ "Store Copywriter ",
435
+ "Event Planner ",
436
+ "Other Taobao Positions ",
437
+ "Taobao Customer Service ",
438
+ "Taobao Graphic Designer ",
439
+ "Online Store Manager ",
440
+ "Online Store Operations ",
441
+ "Contract Management ",
442
+ "Investment Promotion Manager/Supervisor ",
443
+ "Property Investment Promotion Management ",
444
+ "Property Leasing/Sales ",
445
+ "Property Management/Commercial Center ",
446
+ "Other Property Management Positions ",
447
+ "Property Manager/Supervisor ",
448
+ "Property Maintenance ",
449
+ "Surveillance Maintenance ",
450
+ "Warehouse Administrator ",
451
+ "Warehouse Manager/Supervisor",
452
+ "Supply Chain Management ",
453
+ "Sorter ",
454
+ "Documentation Specialist ",
455
+ "International Freight ",
456
+ "Courier ",
457
+ "Customs Affairs Management ",
458
+ "Material Management ",
459
+ "Logistics Specialist/Assistant ",
460
+ "Other Logistics and Warehousing ",
461
+ "Logistics Director ",
462
+ "Logistics Manager/Supervisor ",
463
+ "Loader/Handler ",
464
+ "Dispatcher ",
465
+ "Freight Forwarder ",
466
+ "Container Business ",
467
+ "EHS Management ",
468
+ "Solid Wastewater and Exhaust Gas Treatment ",
469
+ "Solid Waste Treatment Engineer ",
470
+ "Geological Survey ",
471
+ "Exhaust Gas Treatment Engineer ",
472
+ "Control and Protection R&D Engineer ",
473
+ "Nuclear/Coal Power Engineer ",
474
+ "Water Conservancy/Hydropower Engineer ",
475
+ "Water Treatment Engineer ",
476
+ "Water Quality Inspector ",
477
+ "Other Environmental Protection/Energy ",
478
+ "Environmental Engineer ",
479
+ "Environmental Technology ",
480
+ "Environmental Testing ",
481
+ "Environmental Engineering Technology ",
482
+ "Environmental Management/Protection ",
483
+ "Environmental Management/Park and Scenic Area Protection ",
484
+ "Environmental Greening ",
485
+ "Environmental Assessment Engineer ",
486
+ "Ecological Management/Planning ",
487
+ "Power Electronics R&D Engineer ",
488
+ "Power System R&D Engineer ",
489
+ "Petroleum and Natural Gas Technician ",
490
+ "HVAC/Thermal Energy Engineer ",
491
+ "Energy/Mineral Project Management ",
492
+ "Product Management ",
493
+ "Manufacturing Engineer ",
494
+ "Packaging Engineer ",
495
+ "Laboratory/Inspection ",
496
+ "Plant Manager/Deputy Plant Manager ",
497
+ "Industrial Engineer ",
498
+ "Process Design ",
499
+ "Chief Engineer/Deputy Chief Engineer ",
500
+ "Technical Engineer ",
501
+ "Technical Documentation Engineer",
502
+ "Materials Engineer ",
503
+ "Production Supervisor/Leader ",
504
+ "Production Director ",
505
+ "Production Clerk ",
506
+ "Production Material Control (PMC) ",
507
+ "Other Production R&D ",
508
+ "Production Planning ",
509
+ "Production Order Follow-up ",
510
+ "Production Operations Management ",
511
+ "Production Project Engineer ",
512
+ "Production Project Manager/Supervisor ",
513
+ "Electronic Technology R&D Engineer ",
514
+ "Structural Engineer ",
515
+ "Maintenance Engineer ",
516
+ "Operations Supervisor ",
517
+ "Operations Manager ",
518
+ "Equipment Supervisor ",
519
+ "Equipment Management and Maintenance ",
520
+ "Quality Management ",
521
+ "Workshop Director ",
522
+ "FAE Field Application Engineer ",
523
+ "IC Verification Engineer ",
524
+ "Product Process/Planning Engineer ",
525
+ "Photovoltaic System Engineer ",
526
+ "Light Source/Lighting Engineer ",
527
+ "Semiconductor Technology ",
528
+ "Transformer and Magnetoelectric Engineer ",
529
+ "Security System Engineer ",
530
+ "Home Appliance/Digital Product R&D ",
531
+ "Embedded Hardware Development ",
532
+ "Embedded Software Development ",
533
+ "Radio Engineer ",
534
+ "Analog Circuit Design/Application Engineer ",
535
+ "Test/Reliability Engineer ",
536
+ "Laser/Optoelectronics Technology ",
537
+ "Lighting/Illumination Design Engineer ",
538
+ "Electrical R&D Engineer ",
539
+ "Electroacoustic/Audio Engineer/Technician ",
540
+ "Electronic/Electrical Process/Manufacturing Engineer ",
541
+ "Electronic/Electrical Maintenance ",
542
+ "Electronic/Electrical Equipment Engineer ",
543
+ "Electronic/Electrical Project Management ",
544
+ "Other Electronic/Electrical ",
545
+ "Electronic/Electrical Engineer ",
546
+ "Electronic Component Engineer ",
547
+ "Electronic Software Development ",
548
+ "Electrical Circuit Design ",
549
+ "Battery/Power Development ",
550
+ "Circuit Engineer/Technician ",
551
+ "R&D Engineer",
552
+ "Air Conditioning Engineer/Designer ",
553
+ "Line Structure Designer ",
554
+ "Automation Engineer ",
555
+ "Integrated Circuit/Application Engineer ",
556
+ "Audio/Video Engineer ",
557
+ "Host/Emcee ",
558
+ "Lead Designer ",
559
+ "Writer/Screenwriter/Copywriter ",
560
+ "Publishing/Distribution ",
561
+ "Paper Cutting Machine Operator ",
562
+ "Printing Operator ",
563
+ "Printing Machine Operator ",
564
+ "Creasing Operator ",
565
+ "Distribution Management ",
566
+ "Rewinding Operator ",
567
+ "Data Entry/Proofreading ",
568
+ "Editor-in-Chief/Deputy Editor-in-Chief/Chief Editor ",
569
+ "Drafting Machine Operator ",
570
+ "Typesetting Design/Production ",
571
+ "Projection Management ",
572
+ "Digital Direct Printing/Film Output ",
573
+ "Copywriting and Planning ",
574
+ "Text Editor/Content Compilation ",
575
+ "Plate Maker ",
576
+ "Actor/Model ",
577
+ "Lighting Technician ",
578
+ "Hot Stamping Operator ",
579
+ "Color Separation Operator ",
580
+ "Agent/Talent Scout ",
581
+ "Editor/Copywriter ",
582
+ "Other Editorial Publishing ",
583
+ "Art Director/Stage Design ",
584
+ "Binding/Hot Stamping ",
585
+ "Binding Worker ",
586
+ "Lamination Worker ",
587
+ "Video Streamer ",
588
+ "Journalist/Reporter ",
589
+ "Ink Technician ",
590
+ "Colorist ",
591
+ "Broadcast Engineer ",
592
+ "Makeup Artist ",
593
+ "Hairstylist ",
594
+ "Pet Grooming/Care ",
595
+ "Image Designer ",
596
+ "Makeup Trainer ",
597
+ "Shampoo Assistant ",
598
+ "Body Therapist ",
599
+ "Hairdressing Assistant/Apprentice ",
600
+ "Beauty/Slimming Consultant ",
601
+ "Beauty Assistant/Apprentice",
602
+ "Beauty Consultant ",
603
+ "Beautician ",
604
+ "Beauty Salon Manager ",
605
+ "Cosmetic Surgeon ",
606
+ "Other Beauty and Hairdressing ",
607
+ "Nail Technician ",
608
+ "CAD Designer/Drafter ",
609
+ "3D Design/Production ",
610
+ "Product/Packaging Designer ",
611
+ "Concept Artist ",
612
+ "Landscape Architect ",
613
+ "Multimedia/Animation Designer ",
614
+ "Furniture/Homeware Designer ",
615
+ "Industrial Designer ",
616
+ "Craft/Jewelry Designer ",
617
+ "Graphic Designer ",
618
+ "Store/Display/Exhibition Designer ",
619
+ "Fashion Designer ",
620
+ "Game Interface Designer ",
621
+ "Special Effects Designer ",
622
+ "Toy Designer ",
623
+ "Other Art and Creative ",
624
+ "Art Director ",
625
+ "Art Editor/Designer ",
626
+ "Stage Art Designer ",
627
+ "Art/Design Director ",
628
+ "Interior Design ",
629
+ "Visual Designer ",
630
+ "Design Manager ",
631
+ "Russian Translator ",
632
+ "Minor Language Translator ",
633
+ "German Translator ",
634
+ "Italian Translator ",
635
+ "Japanese Translator ",
636
+ "French Translator ",
637
+ "Other Translators ",
638
+ "English Translator ",
639
+ "Portuguese Translator ",
640
+ "Spanish Translator ",
641
+ "Arabic Translator ",
642
+ "Korean Translator ",
643
+ "Android Developer ",
644
+ "C Language Developer ",
645
+ "ERP Technical/Development Application ",
646
+ "Flash Designer/Developer ",
647
+ "iOS Developer ",
648
+ "Java Developer ",
649
+ "PHP Developer ",
650
+ "SEO Specialist ",
651
+ "UI/UX Designer",
652
+ "Web Frontend Developer ",
653
+ "Other Internet Roles ",
654
+ "Product Director ",
655
+ "Product Manager/Specialist ",
656
+ "Simulation Application Engineer ",
657
+ "Implementation Engineer ",
658
+ "Embedded Hardware Developer ",
659
+ "Embedded Software Developer ",
660
+ "WeChat Promotion ",
661
+ "Mobile Software Development Engineer ",
662
+ "Technical Specialist/Assistant ",
663
+ "Technical Director/Manager ",
664
+ "Technical Support/Maintenance ",
665
+ "Database Development Engineer ",
666
+ "Database Administrator/DBA ",
667
+ "Data Communication Engineer ",
668
+ "New Media Operations ",
669
+ "Wireless Communication Engineer ",
670
+ "Wired Transmission Engineer ",
671
+ "Test Engineer ",
672
+ "Taobao/WeChat Operations Specialist/Supervisor ",
673
+ "Game Concept Artist ",
674
+ "Game Interface Designer ",
675
+ "Game Planner ",
676
+ "Game Design/Development ",
677
+ "Special Effects Designer ",
678
+ "Telecom Switching Engineer ",
679
+ "Telecom Network Engineer ",
680
+ "E-commerce ",
681
+ "E-commerce Director ",
682
+ "Hardware Engineer ",
683
+ "Mobile Internet Developer ",
684
+ "Mobile Communication Engineer ",
685
+ "Programmer ",
686
+ "Algorithm Engineer ",
687
+ "Systems Analyst ",
688
+ "System Architect ",
689
+ "System Integration Engineer ",
690
+ "Online Store Manager ",
691
+ "Online Store Administrator ",
692
+ "Website Architecture Designer ",
693
+ "Website Planner ",
694
+ "Website Editor ",
695
+ "Website Operations ",
696
+ "Website Operations Director/Manager ",
697
+ "Network and Information Security Engineer ",
698
+ "Online Promotion ",
699
+ "Network Administrator ",
700
+ "Network Operations Specialist/Assistant ",
701
+ "Network Operations Management",
702
+ "Web Designer/Developer ",
703
+ "Script Development Engineer ",
704
+ "Computer-Aided Designer ",
705
+ "Voice/Video/Graphics ",
706
+ "Quality Engineer ",
707
+ "Software Engineer ",
708
+ "Operations Supervisor/Specialist ",
709
+ "Operations Director ",
710
+ "Telecommunication Technology Engineer ",
711
+ "Telecommunication Power Engineer ",
712
+ "Requirements Analyst ",
713
+ "Project Manager/Supervisor ",
714
+ "Senior Hardware Engineer ",
715
+ "Accountant ",
716
+ "Accounting Manager/Supervisor ",
717
+ "Cashier ",
718
+ "Audit Specialist/Assistant ",
719
+ "Audit Manager/Supervisor ",
720
+ "Cost Administrator ",
721
+ "Tax Specialist/Assistant ",
722
+ "Tax Manager/Supervisor ",
723
+ "Statistician ",
724
+ "Finance/Accounting Assistant ",
725
+ "Other Finance Roles ",
726
+ "Financial Analyst ",
727
+ "Finance Director ",
728
+ "Finance Manager/Supervisor ",
729
+ "Financial Consultant ",
730
+ "Asset/Fund Management ",
731
+ "Chief Financial Officer (CFO) ",
732
+ "System Engineer ",
733
+ "Safety and Fire Protection ",
734
+ "Safety Management ",
735
+ "Fault Analysis Engineer ",
736
+ "Test Engineer ",
737
+ "Certification Engineer/Auditor ",
738
+ "Other Quality Inspection/Security Roles ",
739
+ "Quality Inspector/Tester ",
740
+ "Quality Management/Test Manager ",
741
+ "Business Order Manager ",
742
+ "Buyer ",
743
+ "Supplier Development ",
744
+ "Supply Chain Management ",
745
+ "Assistant Business Order Coordinator ",
746
+ "Business Specialist/Manager ",
747
+ "International Trade Supervisor/Specialist ",
748
+ "Foreign Trade Specialist/Assistant ",
749
+ "Foreign Trade Manager/Supervisor ",
750
+ "Customs Declarer ",
751
+ "Other Trade Roles",
752
+ "Trade Order Specialist ",
753
+ "Purchasing Assistant ",
754
+ "Purchaser ",
755
+ "Purchasing Manager/Director ",
756
+ "Senior Sales Order Specialist ",
757
+ "Promoter/Sales Guide ",
758
+ "Category Management ",
759
+ "Luxury Goods Business ",
760
+ "Store Clerk/Sales Associate ",
761
+ "Store Manager/Retail Manager ",
762
+ "Investment Promotion Manager/Supervisor ",
763
+ "Cashier ",
764
+ "Stock Clerk/Merchandiser ",
765
+ "Supervisor ",
766
+ "Supermarket/Retail Other ",
767
+ "Loss Prevention Officer/Internal Security ",
768
+ "Food Processing/Handling ",
769
+ "Fitness Coach ",
770
+ "Billiards Coach ",
771
+ "Swimming Coach ",
772
+ "Yoga Instructor ",
773
+ "Dance Teacher ",
774
+ "Sports and Fitness Other ",
775
+ "Golf Assistant ",
776
+ "Duty Manager ",
777
+ "Public Area Manager ",
778
+ "Front Office Staff ",
779
+ "Front Office Manager ",
780
+ "Receptionist ",
781
+ "Front Desk Supervisor ",
782
+ "Assistant Lobby Manager ",
783
+ "Room Attendant ",
784
+ "Housekeeping Manager ",
785
+ "Guest Relations Officer ",
786
+ "Switchboard Operator ",
787
+ "Switchboard Manager ",
788
+ "General Manager ",
789
+ "Assistant to General Manager ",
790
+ "Director of Rooms ",
791
+ "Lifeguard ",
792
+ "Floor Manager ",
793
+ "Laundry Manager ",
794
+ "Concierge Manager ",
795
+ "Hotel Other ",
796
+ "Hotel Store Manager ",
797
+ "Reservation Agent ",
798
+ "Reservation Manager ",
799
+ "Personal Banking ",
800
+ "Personal Banking Department Manager/Supervisor ",
801
+ "Credit Review",
802
+ "Credit Card/Bank Card Business ",
803
+ "Credit Card Sales ",
804
+ "Credit Management/Credit Assessment ",
805
+ "Credit Management/Credit Assessment/Analysis ",
806
+ "Corporate Business ",
807
+ "Corporate Business Department Manager/Supervisor ",
808
+ "Fund Project Manager ",
809
+ "Foreign Exchange/Fund/Government Bond Manager ",
810
+ "Foreign Exchange Trading ",
811
+ "Investment/Financial Management Services ",
812
+ "Investment/Financial Advisor ",
813
+ "Investment Manager ",
814
+ "Investment Banking ",
815
+ "Investment Banking Financial Analysis ",
816
+ "Guarantee/Auction/Pawn ",
817
+ "Auctioneer ",
818
+ "Clearing Staff ",
819
+ "General Business Specialist/Assistant ",
820
+ "Stock/Futures Trader ",
821
+ "Stock Trader ",
822
+ "Financing Specialist ",
823
+ "Director of Financing ",
824
+ "Financing Manager/Director ",
825
+ "Securities/Investment Client Supervisor ",
826
+ "Securities/Investment Client Director ",
827
+ "Securities/Investment Client Manager ",
828
+ "Securities/Futures/Forex Broker ",
829
+ "Securities Analysis/Financial Research ",
830
+ "Securities Manager/Director ",
831
+ "Asset Valuation ",
832
+ "Import/Export/Letter of Credit Settlement ",
833
+ "Financial/Economic Researcher ",
834
+ "Financial Product Manager ",
835
+ "Financial Product Sales ",
836
+ "Other Financial Investments ",
837
+ "Financial Services Manager ",
838
+ "Financial Leasing ",
839
+ "Bank Accountant/Teller ",
840
+ "Bank Manager/Director ",
841
+ "Risk Management/Control ",
842
+ "Senior Account Manager/Account Manager ",
843
+ "Business Analysis Manager/Supervisor/Specialist ",
844
+ "Business Development Manager/Supervisor ",
845
+ "Membership Consultant ",
846
+ "Regional Sales ",
847
+ "Regional Sales Director ",
848
+ "Regional Sales Manager/Supervisor ",
849
+ "Medical Device Sales ",
850
+ "Pharmaceutical Representative ",
851
+ "Group Purchase Salesperson/Manager",
852
+ "Key Account Manager ",
853
+ "Client Representative ",
854
+ "Client Director ",
855
+ "Client Manager/Supervisor ",
856
+ "Automobile Sales ",
857
+ "Channel/Distribution Director ",
858
+ "Channel/Distribution Manager/Supervisor ",
859
+ "Channel Specialist ",
860
+ "Channel Manager/Director ",
861
+ "Telemarketing ",
862
+ "Distributor ",
863
+ "Online Sales ",
864
+ "Sales Order Follow-up ",
865
+ "Sales Representative ",
866
+ "Other Sales Positions ",
867
+ "Sales Assistant ",
868
+ "Sales Trainer/Lecturer ",
869
+ "Sales Director ",
870
+ "Sales Support ",
871
+ "Sales Data Analyst ",
872
+ "Sales Manager/Supervisor ",
873
+ "Sales Administration Specialist/Assistant ",
874
+ "Sales Administration Manager/Supervisor ",
875
+ "Sales Operations Manager/Supervisor ",
876
+ "Northeast Cuisine Chef ",
877
+ "Southeast Asian Cuisine Chef ",
878
+ "Yunnan and Guizhou Cuisine Chef ",
879
+ "Beijing and Shandong Cuisine Chef ",
880
+ "Food Runner ",
881
+ "Kitchen Worker ",
882
+ "Chef/Head Chef ",
883
+ "Chef Assistant/Apprentice ",
884
+ "Back Kitchen ",
885
+ "Barista ",
886
+ "Sommelier ",
887
+ "Mexican Cuisine Chef ",
888
+ "Lobby Manager/Supervisor ",
889
+ "Apprentice ",
890
+ "Crayfish Chef ",
891
+ "Sichuan and Hunan Cuisine Chef ",
892
+ "Italian Cuisine Chef ",
893
+ "Japanese Cuisine Chef ",
894
+ "Waiter/Waitress ",
895
+ "General Helper ",
896
+ "Jiangsu and Zhejiang Cuisine Chef ",
897
+ "French Cuisine Chef ",
898
+ "Dishwasher ",
899
+ "Hot Pot Seasoning Cook ",
900
+ "Barbecue Chef ",
901
+ "Cantonese and Hong Kong Cuisine Chef",
902
+ "Tea Specialist ",
903
+ "Nutritionist ",
904
+ "Executive Chef ",
905
+ "Pastry Decorator ",
906
+ "Northwest Cuisine Chef ",
907
+ "Pastry Chef ",
908
+ "Spanish Cuisine Chef ",
909
+ "Greeter/Receptionist ",
910
+ "Food Delivery Person ",
911
+ "Kitchen Assistant ",
912
+ "Dim Sum Chef ",
913
+ "Reservation Agent ",
914
+ "Restaurant Server ",
915
+ "Other Food and Beverage Roles ",
916
+ "Food and Beverage Management ",
917
+ "CEO/President/General Manager ",
918
+ "Corporate Secretary/Board Secretary ",
919
+ "Branch Manager ",
920
+ "Vice President/Deputy General Manager ",
921
+ "Chief Representative of Office ",
922
+ "Partner ",
923
+ "Factory Director/Deputy Factory Director ",
924
+ "Director ",
925
+ "President's Assistant/General Manager's Assistant ",
926
+ "Investor Relations ",
927
+ "Principal/Vice Principal ",
928
+ "Department/Division Management ",
929
+ "Chief Technology Officer (CTO) ",
930
+ "Chief Financial Officer (CFO) ",
931
+ "Chief Operating Officer (COO) ",
932
+ "Other Senior Management Roles"
933
+ ]
generation_user_profile/code/data/occupations_english.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ "Software Engineer",
3
+ "Doctor",
4
+ "Teacher",
5
+ "Lawyer",
6
+ "Accountant",
7
+ "Nurse",
8
+ "Marketing Manager",
9
+ "Chef",
10
+ "Electrician",
11
+ "Graphic Designer",
12
+ "Financial Analyst",
13
+ "Architect",
14
+ "Journalist",
15
+ "Pharmacist",
16
+ "Police Officer",
17
+ "Mechanical Engineer",
18
+ "Dentist",
19
+ "Sales Representative",
20
+ "Psychologist",
21
+ "Plumber",
22
+ "Veterinarian",
23
+ "Pilot",
24
+ "Librarian",
25
+ "Firefighter",
26
+ "Web Developer",
27
+ "Photographer",
28
+ "Physical Therapist",
29
+ "Carpenter",
30
+ "Social Worker",
31
+ "Electrician",
32
+ "Fitness Trainer",
33
+ "Interior Designer",
34
+ "Translator",
35
+ "Real Estate Agent",
36
+ "Scientist",
37
+ "Professor",
38
+ "Artist",
39
+ "Writer",
40
+ "Musician",
41
+ "Actor"
42
+ ]
generation_user_profile/code/generate_profile.py ADDED
@@ -0,0 +1,654 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+
4
+
5
+ import json
6
+ import os
7
+ import random
8
+ import sys
9
+ import time
10
+ from typing import Dict, List, Any, Optional
11
+ from config import get_completion
12
+ import subprocess
13
+ # 添加当前目录到系统路径
14
+ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
15
+
16
+ def safe_str(value):
17
+ """
18
+ Ensure a string is returned.
19
+ - If value is already a str, return it.
20
+ - Otherwise (dict, list, or other), return the JSON serialization with multi-line formatting
21
+ """
22
+ return value if isinstance(value, str) else json.dumps(value, ensure_ascii=False, indent=2)
23
+
24
+ def get_project_root() -> str:
25
+ """获取项目根目录的路径"""
26
+ current_dir = os.path.dirname(os.path.abspath(__file__))
27
+ project_root = os.path.abspath(os.path.join(current_dir, '..', '..'))
28
+ return project_root
29
+
30
+
31
+ def save_json_file(file_path: str, data: Dict) -> None:
32
+ """保存JSON文件
33
+
34
+ Args:
35
+ file_path: 目标文件路径
36
+ data: 要保存的数据
37
+ """
38
+ try:
39
+ os.makedirs(os.path.dirname(file_path), exist_ok=True)
40
+ with open(file_path, 'w', encoding='utf-8') as f:
41
+ json.dump(data, f, ensure_ascii=False, indent=2)
42
+ except Exception as e:
43
+ print(f"保存JSON文件时出错: {e}")
44
+
45
+
46
+ def extract_paths(obj: Dict, prefix: str = "") -> List[str]:
47
+ """从嵌套的JSON对象中提取所有属性路径
48
+
49
+ Args:
50
+ obj: 嵌套的JSON对象
51
+ prefix: 当前路径前缀
52
+
53
+ Returns:
54
+ List[str]: 属性路径列表
55
+ """
56
+ paths = []
57
+ for key, value in obj.items():
58
+ new_prefix = f"{prefix}.{key}" if prefix else key
59
+ if isinstance(value, dict):
60
+ if not value: # 空字典表示叶子节点
61
+ paths.append(new_prefix)
62
+ else:
63
+ paths.extend(extract_paths(value, new_prefix))
64
+ return paths
65
+
66
+
67
+ # 已删除不再需要的generate_attribute_value函数
68
+
69
+
70
+ def generate_category_attributes(category_paths: Dict, base_summary: str, category_name: str) -> Dict:
71
+ """按类别批量生成属性值。
72
+
73
+ 参数:
74
+ category_paths: 类别下的所有属性路径及其结构。
75
+ base_summary: 基础摘要文本。
76
+ category_name: 类别名称。
77
+
78
+ 返回:
79
+ Dict: 生成的所有属性值。
80
+ """
81
+ # 收集该类别下的所有叶子节点路径
82
+ leaf_paths = []
83
+
84
+ def collect_leaf_paths(obj, current_path):
85
+ for key, value in obj.items():
86
+ path = f"{current_path}.{key}" if current_path else key
87
+ if isinstance(value, dict):
88
+ if not value: # 叶子节点
89
+ leaf_paths.append(path)
90
+ else:
91
+ collect_leaf_paths(value, path)
92
+
93
+ collect_leaf_paths(category_paths, category_name)
94
+
95
+ # 如果没有叶子节点,直接返回空字典
96
+ if not leaf_paths:
97
+ return {}
98
+
99
+ # 构建提示,一次性生成所有属性值
100
+ system_prompt = """You are an AI assistant specialized in generating attribute values for personal profiles. Based on the provided base summary and multiple attribute paths, generate logically consistent values for each attribute path that:
101
+ 1. Are factually consistent with the information present in the base summary.
102
+ 2. Maintain strict logical consistency with each other, ensuring no contradictions or logical flaws are introduced.
103
+ 3. Are semantically relevant to their respective attribute paths.
104
+ 4. Are plausible, realistic, and contain appropriate detail while upholding overall credibility of the profile.
105
+ IMPORTANT: Avoid including anything related to community-building activities.
106
+
107
+ Format your response as a JSON object where each key is the attribute path and each value is the generated attribute value (not exceeding 50 characters).
108
+ Example format:
109
+ {
110
+ "Category.Subcategory.AttributePath1": "Generated value 1",
111
+ "Category.Subcategory.AttributePath2": "Generated value 2"
112
+ }
113
+ """
114
+
115
+ # 如果叶子节点过多,分批处理
116
+ MAX_PATHS_PER_BATCH = 50 # 每批处理的最大路径数
117
+ all_generated_values = {}
118
+
119
+ # 将叶子节点分批
120
+ batches = [leaf_paths[i:i + MAX_PATHS_PER_BATCH] for i in range(0, len(leaf_paths), MAX_PATHS_PER_BATCH)]
121
+
122
+ print(f" 正在生成 {category_name} 下的 {len(leaf_paths)} 个属性值,分 {len(batches)} 批处理...")
123
+
124
+ for batch_index, batch_paths in enumerate(batches):
125
+ user_prompt = f"Base Summary:\n{base_summary}\n\nCategory: {category_name}\n\nAttribute Paths to generate values for (Batch {batch_index+1}/{len(batches)}):\n"
126
+ for path in batch_paths:
127
+ user_prompt += f"- {path}\n"
128
+ user_prompt += "\nPlease generate suitable values for all these attributes that are consistent with the base summary and fit the semantic context of each attribute path."
129
+
130
+ messages = [
131
+ {"role": "system", "content": system_prompt},
132
+ {"role": "user", "content": user_prompt}
133
+ ]
134
+
135
+ try:
136
+ print(f" 正在生成第 {batch_index+1}/{len(batches)} 批,包含 {len(batch_paths)} 个属性...")
137
+ response = get_completion(messages)
138
+ if not response:
139
+ print(f" 生成第 {batch_index+1} 批属性值失败: 空响应")
140
+ continue
141
+
142
+ # 尝试解析JSON响应
143
+ try:
144
+ import json
145
+ import re
146
+
147
+ # 检查响应是否包含在Markdown代码块中
148
+ json_match = re.search(r'```(?:json)?\s*([\s\S]+?)\s*```', response)
149
+ if json_match:
150
+ # 提取代码块中的JSON内容
151
+ json_content = json_match.group(1).strip()
152
+ batch_values = json.loads(json_content)
153
+ else:
154
+ # 尝试直接解析整个响应
155
+ batch_values = json.loads(response)
156
+
157
+ print(f" 成功生成第 {batch_index+1} 批的 {len(batch_values)} 个属性值")
158
+ all_generated_values.update(batch_values)
159
+ except json.JSONDecodeError as e:
160
+ print(f" 解析第 {batch_index+1} 批属性值JSON失败: {e}")
161
+ print(f" 响应内容: {response[:100]}..." if len(response) > 100 else f"响应内容: {response}")
162
+ except Exception as e:
163
+ print(f" 生成第 {batch_index+1} 批属性值时出错: {e}")
164
+
165
+ print(f" 所有批次处理完成,共生成 {len(all_generated_values)} 个属性值")
166
+ return all_generated_values
167
+
168
+
169
+ def generate_final_summary(profile: Dict) -> str:
170
+ """Generate a final summary for the user profile.
171
+
172
+ Args:
173
+ profile: The complete user profile data.
174
+ Returns:
175
+ str: The final summary text.
176
+ """
177
+ system_prompt = """
178
+ Your Task: Create a believable and engaging personal profile, 150-400 words, based on the provided text. Your ultimate goal is a narrative that feels like it comes from a real, self-aware person.The description can be divided into a few paragraphs
179
+
180
+ Content Requirements:
181
+
182
+ Adopt a first-person perspective ("I," "my," "me"). The output should be a seamless narrative, not just a list of facts.
183
+
184
+ !! GUIDELINES FOR A HUMAN-LIKE AND COHERENT NARRATIVE !!
185
+
186
+ 1. **Ensure an Authentic Voice:**
187
+ Your narrative should generally reflect the tone and sophistication suggested by the profile's data.
188
+ However, if the language in the source text seems inconsistent with the character's stated age or background, your primary duty is to adopt a voice that is truly authentic to the character's context. You must **translate** the *meaning* of the data into a believable voice, rather than copying the source text's style verbatim.
189
+
190
+ 2. **Build a Plausible Narrative from the Facts:**
191
+ Your narrative must be grounded in the source text. Do not invent new core facts. You can and should add minor, plausible details that bridge gaps between facts to make the narrative more vivid and realistic.
192
+ Additionally, if a core fact in the source data appears highly implausible or contradictory in a real-world context, you should creatively reframe it to make the story believable. Instead of stating the implausible fact directly, you can frame it as part of a unique circumstance, a powerful memory, a personal aspiration, or a fantasy. Your goal is to produce a believable story, even if it requires creatively interpreting the source data to resolve inconsistencies.
193
+
194
+ """
195
+ user_prompt = f"Complete Profile (in JSON format):\n{json.dumps(profile, ensure_ascii=False, indent=2)}\n\nPlease generate an objective and factual summary in English that covers all core information from the profile in clear, coherent paragraphs. The summary should be between 150-400 words."
196
+
197
+ messages = [
198
+ {"role": "system", "content": system_prompt},
199
+ {"role": "user", "content": user_prompt}
200
+ ]
201
+
202
+ try:
203
+ response = get_completion(messages)
204
+ summary = response.strip() if response else ""
205
+ # Enforce the word limit between 300-400 words
206
+ word_count = len(summary.split())
207
+ if word_count < 150:
208
+ print(f"Warning: Summary is only {word_count} words, less than the target minimum of 300 words")
209
+ elif word_count > 400:
210
+ summary = enforce_word_limit(summary, 400)
211
+ print(f"Summary was trimmed to 400 words (from {word_count})")
212
+ return summary
213
+ except Exception as e:
214
+ print(f"Error generating final summary: {e}")
215
+ return ""
216
+
217
+
218
+ def print_section(section: Dict, indent: int = 0) -> None:
219
+ """打印配置部分的内容
220
+
221
+ 参数:
222
+ section: 要打印的配置部分
223
+ indent: 缩进级别
224
+ """
225
+ indent_str = " " * indent
226
+ for key, value in section.items():
227
+ if isinstance(value, dict):
228
+ print(f"{indent_str}{key}:")
229
+ print_section(value, indent + 1)
230
+ else:
231
+ print(f"{indent_str}{key}: {value}")
232
+
233
+
234
+ def generate_section(template_section: Dict, base_info: str, section_name: str, indent: int = 0) -> Dict:
235
+ """生成配置文件的一个部分。
236
+
237
+ 参数:
238
+ template_section: 模板中的对应部分。
239
+ base_info: 基础信息文本。
240
+ section_name: 部分名称。
241
+ indent: 缩进级别。
242
+
243
+ 返回:
244
+ Dict: 生成的配置部分。
245
+ """
246
+ section_result = {}
247
+ indent_str = " " * indent
248
+
249
+ print(f"{indent_str}正在生成 {section_name} 部分...")
250
+
251
+ # 无论是一级大类还是子类,都一次性生成所有属性
252
+ # 使用新函数一次性生成所有属性值
253
+ all_attributes = generate_category_attributes(template_section, base_info, section_name)
254
+
255
+ # 如果成功生成了属性值,将其添加到结果中
256
+ if all_attributes:
257
+ # 构建结果字典
258
+ for path, value in all_attributes.items():
259
+ # 分解路径
260
+ parts = path.split('.')
261
+ # 跳过第一部分(大类名称)
262
+ if len(parts) > 1 and parts[0] == section_name:
263
+ parts = parts[1:]
264
+
265
+ # 递归构建嵌套字典
266
+ current = section_result
267
+ for i, part in enumerate(parts):
268
+ if i == len(parts) - 1: # 最后一个部分,设置值
269
+ current[part] = value
270
+ print(f"{indent_str} - {'.'.join(parts)}: {value}")
271
+ else:
272
+ if part not in current:
273
+ current[part] = {}
274
+ current = current[part]
275
+
276
+ return section_result
277
+
278
+ # 如果一次性生成失败,返回空结果
279
+ print(f"{indent_str}一次性生成失败,返回空结果")
280
+ # 不再使用递归方式生成属性值
281
+
282
+ return section_result
283
+
284
+
285
+ def enforce_word_limit(text: str, limit: int = 300) -> str:
286
+ """将文本修剪为最多`limit`个单词。"""
287
+ words = text.split()
288
+ if len(words) > limit:
289
+ return ' '.join(words[:limit])
290
+ return text
291
+
292
+
293
+ def append_profile_to_json(file_path: str, profile: Dict) -> None:
294
+ """追加个人资料到 JSON 文件
295
+
296
+ 参数:
297
+ file_path: 目标文件路径
298
+ profile: 要追加的个人资料
299
+ """
300
+ try:
301
+ # Create output directory if it doesn't exist
302
+ output_dir = os.path.join(os.path.dirname(__file__), "output")
303
+ os.makedirs(output_dir, exist_ok=True)
304
+
305
+ # Append the profile to the JSON file
306
+ output_file = os.path.join(output_dir, "new_user_profiles.json")
307
+
308
+ # Load existing profiles if the file exists
309
+ if os.path.exists(output_file):
310
+ with open(output_file, "r", encoding="utf-8") as f:
311
+ profiles = json.load(f)
312
+ else:
313
+ profiles = []
314
+
315
+ # Append the new profile
316
+ profiles.append(profile)
317
+
318
+ # Write back to the file
319
+ with open(output_file, "w", encoding="utf-8") as f:
320
+ json.dump(profiles, f, ensure_ascii=False, indent=2)
321
+ except Exception as e:
322
+ print(f"追加个人资料到 JSON 文件时出错: {e}")
323
+ # Continue execution even if there's an error with the output file
324
+
325
+
326
+ def generate_single_profile(template=None, profile_index=None) -> Dict:
327
+ """生成单个用户档案。
328
+
329
+ 参数:
330
+ template: 可选的用于生成的模板。
331
+ profile_index: 要生成的档案索引。
332
+
333
+ 返回:
334
+ Dict: 生成的用户档案。
335
+ """
336
+
337
+ # 第一步:运行 select_attributes.py 选择属性
338
+ print(f'\n第一步:运行 select_attributes.py 选择属性...')
339
+ try:
340
+ # 使用subprocess运行select_attributes.py
341
+ subprocess_result = subprocess.run(
342
+ ["python", os.path.join(os.path.dirname(__file__), "select_attributes.py")],
343
+ capture_output=False, # 直接输出到终端,而不是捕获
344
+ text=True,
345
+ check=True
346
+ )
347
+ print("\nselect_attributes.py 运行完成,属性选择完毕")
348
+ print("\n第二步:按一级属性批量生成内容...")
349
+ except Exception as e:
350
+ print(f"Error executing select_attributes functions: {e}")
351
+ return {}
352
+
353
+ # Load basic profile information and selected paths (base info is only a reference for GPT generation)
354
+ # 使用相对路径获取用户配置文件路径
355
+ base_info_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'output', 'user_profile.json')
356
+ with open(base_info_path, 'r', encoding='utf-8') as f:
357
+ base_info = json.load(f)
358
+ if 'Occupations' not in base_info:
359
+ print("Warning: 'Occupations' key is missing in the user profile. Setting it to an empty list.")
360
+ base_info['Occupations'] = []
361
+
362
+ # 使用相对路径获取选定路���文件路径
363
+ selected_paths_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'output', 'selected_paths.json')
364
+ with open(selected_paths_path, 'r', encoding='utf-8') as f:
365
+ selected_paths = json.load(f)
366
+
367
+ # Ensure these fields are strings
368
+ for k in ("life_attitude", "interests"):
369
+ base_info[k] = safe_str(base_info.get(k, ""))
370
+
371
+ # Example assertion: ensure the profile includes an 'Occupations' field
372
+ assert 'Occupations' in base_info, "The 'Occupations' key is missing in the user profile."
373
+
374
+ # 初始化个人资料字典
375
+ profile = {
376
+ "Base Info": base_info,
377
+ "Generated At": time.strftime("%Y-%m-%d %H:%M:%S"),
378
+ "Profile Index": (profile_index + 1) if profile_index is not None else 1
379
+ }
380
+
381
+ # 步骤1:生成 Demographic Information
382
+ demographic_input = (
383
+ "Base Information (for reference):\n" + json.dumps(base_info, ensure_ascii=False, indent=2) + "\n\n"
384
+ "Instructions: Based on the `base_info` provided, **develop and elaborate on** the 'Demographic Information' section in English. Your task is to **appropriately expand upon and enrich** the existing information from `base_info`. Focus on elaborating on the given data points, adding further relevant details, or providing context to make the demographic profile more comprehensive and insightful. While you should avoid simply repeating the `base_info` verbatim, ensure that all generated content is **directly built upon and logically extends** the information available in `base_info`, rather than introducing entirely new, unrelated demographic facts. The goal is a coherent, more descriptive, and enhanced version of the original data."
385
+ )
386
+ demographic_template = selected_paths.get("Demographic Information")
387
+ if isinstance(demographic_template, dict):
388
+ demographic_template = json.dumps(demographic_template, ensure_ascii=False)
389
+ if demographic_template and demographic_template != "":
390
+ print('Generating Demographic Information...')
391
+ demographic_section = generate_section(json.loads(demographic_template), demographic_input, "Demographic Information")
392
+ profile["Demographic Information"] = demographic_section
393
+ else:
394
+ print('No valid "Demographic Information" template found in selected_paths, skipping Demographic Information.')
395
+
396
+ # 步骤2:生成职业信息
397
+ career_template = selected_paths.get("Career and Work Identity")
398
+ if isinstance(career_template, dict):
399
+ career_template = json.dumps(career_template, ensure_ascii=False)
400
+ if career_template and career_template != "":
401
+ print('Generating Career and Work Identity...')
402
+ # Construct input for Career and Work Identity, including Demographic Information
403
+ career_input = (
404
+ "Base Information (for reference):\n" + json.dumps(base_info, ensure_ascii=False, indent=2) + "\n\n"
405
+ "Demographic Information (for reference):\n" + json.dumps(profile.get("Demographic Information", {}), ensure_ascii=False, indent=2) + "\n\n"
406
+ "Instructions: Based on the `base_info` and `Demographic Information` provided above, **develop and elaborate on** the 'Career and Work Identity' section in English. "
407
+ "Your aim is to distill and articulate the career identity, professional journey, and work-related aspirations that are **evident or can be reasonably inferred from the combined `base_info` and `Demographic Information`**. "
408
+ "Offer fresh insights by providing a **deeper, more nuanced interpretation or by highlighting connections within the provided data** that illuminate these aspects. "
409
+ "Ensure that this elaboration is **logically consistent with and directly stems from** the provided information. "
410
+ "**Do not introduce new career details or aspirations that are not grounded in or clearly supported by the source material.** "
411
+ "The section should be an insightful and coherent expansion of what can be understood from the source material."
412
+ )
413
+ career_info_section = generate_section(json.loads(career_template), career_input, "Career and Work Identity")
414
+ profile["Career and Work Identity"] = career_info_section
415
+ else:
416
+ print('No valid "Career and Work Identity" template found in selected_paths, skipping.')
417
+ # Optionally, to stop overall generation if career is mandatory, you could return profile here; else just continue.
418
+ # return profile
419
+
420
+ # 步骤3:生成 Core Values, Beliefs, and Philosophy
421
+ pv_orientation = base_info.get("personal_values", {}).get("values_orientation", "")
422
+ if not isinstance(pv_orientation, str):
423
+ pv_orientation = json.dumps(pv_orientation, ensure_ascii=False)
424
+ core_input = (
425
+ "Demographic Information (for reference):\n" + json.dumps(profile.get("Demographic Information", {}), ensure_ascii=False, indent=2) + "\n\n"
426
+ "Career Information (for reference):\n" + json.dumps(profile.get("Career and Work Identity", {}), ensure_ascii=False, indent=2) + "\n\n"
427
+ "Personal Values (for reference):\n" + pv_orientation + "\n\n"
428
+ "Instructions: Based on the full context provided (including base_info, Demographic Information, and Career Information), develop and elaborate on the 'Core Values, Beliefs, and Philosophy' section in English. Your aim is to distill and articulate the core values, beliefs, and philosophical outlook that are evident or can be reasonably inferred from the provided information. Offer fresh insights by providing a deeper, more nuanced interpretation or by highlighting connections between all data points that illuminate these guiding principles. Pay special attention to the person's location and background, infusing the philosophical outlook with relevant cultural nuances from their region. Ensure that this elaboration is logically consistent with and directly stems from the provided information. Do not introduce new values, beliefs, or philosophies that are not grounded in or clearly supported by the source material. The section should be an insightful and coherent expansion of what can be understood from the source material.IMPORTANT: Avoid including anything related to community-building activities."
429
+ )
430
+ core_template = selected_paths.get("Core Values, Beliefs, and Philosophy")
431
+ if isinstance(core_template, dict):
432
+ core_template = json.dumps(core_template, ensure_ascii=False)
433
+ if core_template and core_template != "":
434
+ print('Generating Core Values, Beliefs, and Philosophy...')
435
+ core_values_section = generate_section(json.loads(core_template), core_input, "Core Values, Beliefs, and Philosophy")
436
+ profile["Core Values, Beliefs, and Philosophy"] = core_values_section
437
+ else:
438
+ print('No valid "Core Values, Beliefs, and Philosophy" template found in selected_paths, skipping.')
439
+
440
+ # 步骤4:生成 Lifestyle and Daily Routine 及 Cultural and Social Context
441
+ life_attitude = base_info["life_attitude"]
442
+
443
+ # 将各部分转换为字符串以便在提示中使用
444
+ base_info_str = json.dumps(base_info, ensure_ascii=False, indent=2)
445
+ demographic_info_str = json.dumps(profile.get("Demographic Information", {}), ensure_ascii=False, indent=2)
446
+ career_info_str = json.dumps(profile.get("Career and Work Identity", {}), ensure_ascii=False, indent=2)
447
+ core_values_str = json.dumps(profile.get("Core Values, Beliefs, and Philosophy", {}), ensure_ascii=False, indent=2)
448
+
449
+ lifestyle_input = (
450
+ "## Full Profile Context (for reference)\n\n"
451
+ f"### Base Information:\n{base_info_str}\n\n"
452
+ f"### Demographic Information:\n{demographic_info_str}\n\n"
453
+ f"### Career and Work Identity:\n{career_info_str}\n\n"
454
+ f"### Core Values, Beliefs, and Philosophy:\n{core_values_str}\n\n"
455
+
456
+ "## Instructions:\n"
457
+ "Based on the **complete profile context provided above**, your task is to generate content for the section you are asked to create. Follow the specific guidance below for the relevant section.\n\n"
458
+
459
+ "**Guidance for 'Lifestyle and Daily Routine':**\n"
460
+ "When generating this section, focus on translating the person's values, career, age, and philosophy into **concrete daily actions and habits**. How do their beliefs manifest in their **work schedule, sleep patterns, physical activity, vacation style, and travel preferences**? Ensure the lifestyle is a logical and practical extension of their established character.\n\n"
461
+
462
+ "**Guidance for 'Cultural and Social Context':**\n"
463
+ "When generating this section, focus on the person's **relationship with society and their environment**. Based on their location, values, and life story, describe their **living environment, preferred social circle, communication style, parenting style (if applicable), and relationship with tradition**. How do their internal beliefs shape their external social world?"
464
+ )
465
+
466
+ lifestyle_template = selected_paths.get("Lifestyle and Daily Routine")
467
+ if isinstance(lifestyle_template, dict):
468
+ lifestyle_template = json.dumps(lifestyle_template, ensure_ascii=False)
469
+ if lifestyle_template and lifestyle_template != "":
470
+ print('Generating Lifestyle and Daily Routine...')
471
+ lifestyle_section = generate_section(json.loads(lifestyle_template), lifestyle_input, "Lifestyle and Daily Routine")
472
+ profile["Lifestyle and Daily Routine"] = lifestyle_section
473
+ else:
474
+ print('No valid "Lifestyle and Daily Routine" template found in selected_paths, skipping.')
475
+ cultural_template = selected_paths.get("Cultural and Social Context")
476
+ if isinstance(cultural_template, dict):
477
+ cultural_template = json.dumps(cultural_template, ensure_ascii=False)
478
+ if cultural_template and cultural_template != "":
479
+ print('Generating Cultural and Social Context...')
480
+ cultural_section = generate_section(json.loads(cultural_template), lifestyle_input, "Cultural and Social Context")
481
+ profile["Cultural and Social Context"] = cultural_section
482
+ else:
483
+ print('No valid "Cultural and Social Context" template found in selected_paths, skipping.')
484
+
485
+ # 步骤5:生成 Hobbies, Interests, and Lifestyle
486
+ interests = base_info["interests"]
487
+ hobbies_input = (
488
+ "Base Information (for reference):\n" + json.dumps(base_info, ensure_ascii=False, indent=2) + "\n\n"
489
+ "Demographic Information (for reference):\n" + json.dumps(profile.get("Demographic Information", {}), ensure_ascii=False, indent=2) + "\n\n"
490
+ "Career Information (for reference):\n" + json.dumps(profile.get("Career and Work Identity", {}), ensure_ascii=False, indent=2) + "\n\n"
491
+ "Core Values, Beliefs, and Philosophy (for reference):\n" + json.dumps(profile.get("Core Values, Beliefs, and Philosophy", {}), ensure_ascii=False, indent=2) + "\n\n"
492
+ "Lifestyle and Daily Routine (for reference):\n" + json.dumps(profile.get("Lifestyle and Daily Routine", {}), ensure_ascii=False, indent=2) + "\n\n"
493
+ "Cultural and Social Context (for reference):\n" + json.dumps(profile.get("Cultural and Social Context", {}), ensure_ascii=False, indent=2) + "\n\n"
494
+
495
+ "## Instructions:\n"
496
+ "Based on the complete profile context provided above, generate the 'Hobbies, Interests, and Lifestyle' section.\n\n"
497
+
498
+ "1. **Use Base Hobbies as a Starting Point:** Begin with the interests listed in `base_info`, but treat them as seeds for deeper exploration, not as rigid boundaries.\n\n"
499
+
500
+ "2. **Embrace Imagination and Psychological Depth:** This is the key instruction. You are encouraged to use **creative imagination**. Based on the person's complete profile, the interpretation of their interests can be **positive, deeply negative, or even 'toxic'**. Explore the hidden psychological dimensions of their hobbies. How could a seemingly simple interest become a mechanism for **coping, obsession, self-destruction, control, or escapism**? Be bold in your interpretation.\n\n"
501
+
502
+ "3. **Synthesize with Full Context:** Ensure your imaginative elaborations are still **psychologically consistent** with the person's established character. The 'how' and 'why' of their interests should be deeply connected to their career, demographics, and worldview.\n\n"
503
+
504
+ "4. **Detail Related Lifestyle Choices:** Describe the lifestyle choices that support these interests. This includes the types of products they might buy, the media they consume, or other related activities, all of which should reflect the **positive or negative nature** of their engagement with the hobby."
505
+ )
506
+
507
+ hobbies_template = selected_paths.get("Hobbies, Interests, and Lifestyle")
508
+ if isinstance(hobbies_template, dict):
509
+ hobbies_template = json.dumps(hobbies_template, ensure_ascii=False)
510
+ if hobbies_template and hobbies_template != "":
511
+ print('Generating Hobbies, Interests, and Lifestyle...')
512
+ hobbies_section = generate_section(json.loads(hobbies_template), hobbies_input, "Hobbies, Interests, and Lifestyle")
513
+ profile["Hobbies, Interests, and Lifestyle"] = hobbies_section
514
+ else:
515
+ print('No valid "Hobbies, Interests, and Lifestyle" template found in selected_paths, skipping.')
516
+
517
+ # 步骤6:生成 Other Attributes
518
+ other_attributes_input = (
519
+ "Complete Profile (for reference):\n" + json.dumps(profile, ensure_ascii=False, indent=2) + "\n\n"
520
+ "## Instructions:\n"
521
+ "Based on the complete profile provided, your task is to synthesize and generate a set of 'Other Attributes' in English that add final depth and nuance to the character. Instead of random facts, derive these attributes by analyzing the entire profile as a whole. Specifically, generate details for the following categories:\n\n"
522
+
523
+ "1. **Communication Style:**\n"
524
+ "Describe their typical manner of speaking and writing. Is it direct, quiet, formal, verbose, witty, or something else? How do their core values and social context shape how they communicate with others?\n\n"
525
+
526
+ "2. **Decision-Making Style:**\n"
527
+ "Analyze how they generally make choices. Are they impulsive, analytical, cautious, risk-averse, or guided by emotion? Connect this style to their career, financial status, and key life events.\n\n"
528
+
529
+ "3. **Defining Quirks or Habits:**\n"
530
+ "Imagine and describe one or two small, defining habits or personal quirks that make the character feel real and unique. This could be a daily ritual, a nervous gesture, or an unusual habit related to their hobbies. Ensure it is psychologically consistent with their established personality.\n\n"
531
+
532
+ "4. **Core Internal Conflict:**\n"
533
+ "Identify and articulate the central psychological tension or conflict that defines the character's inner world. What two opposing forces, desires, or beliefs are constantly at odds within them? This should serve as a concise summary of their core psychological drama."
534
+
535
+ )
536
+ other_template = selected_paths.get("Other Attributes")
537
+ if isinstance(other_template, dict):
538
+ other_template = json.dumps(other_template, ensure_ascii=False)
539
+ if other_template and other_template != "":
540
+ print('Generating Other Attributes...')
541
+ other_attributes_section = generate_section(json.loads(other_template), other_attributes_input, "Other Attributes")
542
+ profile["Other Attributes"] = other_attributes_section
543
+ else:
544
+ print('No valid "Other Attributes" template found in selected_paths, skipping.')
545
+
546
+ # Prepare a copy of profile for summary generation by removing unwanted keys
547
+ profile_for_summary = profile.copy()
548
+ for key in ['base_info', 'Base Info', 'personal_story', 'interests', 'Occupations']:
549
+ profile_for_summary.pop(key, None)
550
+
551
+ # Generate the final summary using the filtered profile
552
+ final_summary_text = generate_final_summary(profile_for_summary)
553
+ profile["Summary"] = final_summary_text
554
+
555
+ # Remove unwanted keys from the final profile
556
+ for key in ['base_info', 'Base Info', 'personal_story', 'interests', 'Occupations']:
557
+ profile.pop(key, None)
558
+
559
+ # 将生成的profile追加到一个新的JSON文件中,支持存储多个user profile
560
+ new_profiles_file = os.path.join(os.path.dirname(__file__), 'output', 'new_user_profiles.json')
561
+ append_profile_to_json(new_profiles_file, profile)
562
+
563
+ return profile
564
+
565
+
566
+ def generate_multiple_profiles(num_profiles: int = 50) -> None:
567
+ """生成多个完整的用户档案,并将它们保存到一个合并的 JSON 文件中。
568
+
569
+ 参数:
570
+ num_profiles: 要生成的档案数量,默认为50个。
571
+ """
572
+ start_time = time.time()
573
+ print(f"开始生成 {num_profiles} 个个人资料...")
574
+
575
+ # 获取项目根目录
576
+ project_root = get_project_root()
577
+
578
+ # 创建输出目录
579
+ output_dir = os.path.join(project_root, "generate_user_profile", "output")
580
+ os.makedirs(output_dir, exist_ok=True)
581
+
582
+ # 总配置文件数量
583
+ total_profiles = num_profiles
584
+
585
+ # 初始化存储所有配置文件的字典
586
+ all_profiles = {
587
+ "metadata": {
588
+ "profiles_completed": 0,
589
+ "total_profiles": total_profiles,
590
+ "description": f"包含{total_profiles}个用户档案的集合"
591
+ }
592
+ }
593
+
594
+ # 设置合并文件路径
595
+ all_profiles_path = os.path.join(output_dir, f"all_profile_{num_profiles}.json")
596
+
597
+ # 初始化保存合并文件
598
+ save_json_file(all_profiles_path, all_profiles)
599
+ print(f"初始化合并文件: {all_profiles_path}")
600
+
601
+ # 计数器,用于跟踪总共生成的档案数量
602
+ profile_count = 0
603
+
604
+ # 逐个生成配置文件
605
+ for profile_index in range(num_profiles):
606
+ profile_count += 1
607
+
608
+ print(f"\n----- 开始生成第 {profile_index+1}/{num_profiles} 个用户资料 -----\n")
609
+
610
+ try:
611
+ # 生成单个配置文件
612
+ profile = generate_single_profile(None, profile_index)
613
+
614
+ if not profile:
615
+ print(f"第 {profile_index+1} 个资料生成失败,跳过")
616
+ continue
617
+
618
+ # 添加到总字典并保存
619
+ profile_key = f"Profile_{profile_index+1}"
620
+ all_profiles[profile_key] = profile
621
+ all_profiles["metadata"]["profiles_completed"] = profile_count
622
+
623
+ # 保存更新后的合并文件
624
+ save_json_file(all_profiles_path, all_profiles)
625
+ print(f"\n总进度更新: {profile_count}/{total_profiles} 个资料已完成")
626
+ print(f"已将第 {profile_index+1} 个用户资料添加到合并文件: {all_profiles_path}")
627
+ print("\n" + "-"*50 + "\n")
628
+ except Exception as e:
629
+ print(f"生成第 {profile_index+1} 个个人资料时出错: {e}")
630
+ continue
631
+
632
+ # 添加生成完成状态
633
+ all_profiles["metadata"]["status"] = "completed"
634
+ save_json_file(all_profiles_path, all_profiles)
635
+
636
+ end_time = time.time()
637
+ elapsed_time = end_time - start_time
638
+ print(f"\n所有 {all_profiles['metadata']['profiles_completed']} 个个人资料已成功生成并保存到: {all_profiles_path}")
639
+ print(f"生成完成,耗时 {elapsed_time:.2f} 秒")
640
+
641
+ if __name__ == "__main__":
642
+ # Generate only one profile
643
+ print("Generating a single user profile...")
644
+ profile = generate_single_profile(None, 0)
645
+
646
+ # Display only the final summary
647
+ if profile and "Summary" in profile:
648
+ print("\n" + "="*50)
649
+ print("FINAL PROFILE SUMMARY:")
650
+ print("="*50)
651
+ print(profile["Summary"])
652
+ print("="*50)
653
+ else:
654
+ print("Failed to generate profile or summary.")
generation_user_profile/code/output/new_user_profiles.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "Generated At": "2025-08-18 01:51:36",
4
+ "Profile Index": 1,
5
+ "Demographic Information": {
6
+ "Age": "28 years old, young adult",
7
+ "Gender": "Male",
8
+ "Location": {
9
+ "Country": "Canada",
10
+ "City": "West Humber-Clairville"
11
+ }
12
+ },
13
+ "Career and Work Identity": {
14
+ "Occupation": "Pharmacist dedicated to patient-centered care",
15
+ "Work Experience": "Internship in West Humber-Clairville pharmacy; focus on medication affordability and empathetic communication"
16
+ },
17
+ "Core Values, Beliefs, and Philosophy": {
18
+ "Personal Values": "Lifelong learning and empathetic patient care",
19
+ "Life Philosophy": "Growth through compassion and continuous self-improvement"
20
+ },
21
+ "Lifestyle and Daily Routine": {
22
+ "Daily Habits": "Morning journaling and patient-focused learning",
23
+ "Lifestyle Choices": "Balanced work hours with reflective downtime"
24
+ },
25
+ "Cultural and Social Context": {
26
+ "Cultural Background": "Canadian multicultural, values inclusivity and empathy",
27
+ "Social Connections": "Close-knit circle of thoughtful, like-minded professionals"
28
+ },
29
+ "Hobbies, Interests, and Lifestyle": {
30
+ "Hobbies": "Reflective journaling, healthcare policy study",
31
+ "Interests": "Exploring empathy's limits, analyzing healthcare access"
32
+ },
33
+ "Other Attributes": {
34
+ "Personal Story": "From pharmacy intern to compassionate pharmacist, motivated by patient struggles and continuous learning",
35
+ "Key Life Events": "Internship facing medication affordability at 24; patient-centered care course at 27"
36
+ },
37
+ "Summary": "I’m a 28-year-old pharmacist based in West Humber-Clairville, Canada, deeply committed to patient-centered care. My journey into pharmacy began with an internship in my local community, where I quickly became aware of the challenges many patients face, especially around medication affordability. This experience shaped my approach to healthcare, emphasizing empathy and understanding as much as clinical knowledge. I believe that true growth, both personally and professionally, comes from compassion and a dedication to continuous self-improvement.\n\nEvery day, I start with journaling, a practice that helps me reflect on my experiences and stay grounded in my values. I also dedicate time to learning—whether it’s about new medications, healthcare policies, or ways to better support my patients. Balancing focused work hours with moments of reflective downtime allows me to maintain both my effectiveness as a pharmacist and my own well-being.\n\nGrowing up in a multicultural Canadian environment, I’ve developed a strong appreciation for inclusivity and empathy. These values resonate through my close-knit circle of friends and colleagues, who are thoughtful professionals sharing similar commitments to healthcare and social equity. Outside of work, I’m passionate about exploring the boundaries of empathy and analyzing how healthcare access can be improved for vulnerable populations.\n\nOne of the pivotal moments in my career was completing a patient-centered care course at age 27, which deepened my understanding of how to truly listen and respond to patient needs. Looking back, my internship at 24 was a defining experience that ignited my motivation to advocate for patients and keep learning. Today, I see my role not just as dispensing medications but as a partner in my patients’ health journeys, striving to make a meaningful difference in their lives through compassionate care and informed support."
38
+ }
39
+ ]
generation_user_profile/code/select_attributes.py ADDED
@@ -0,0 +1,967 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+
4
+ # 属性选择器脚本
5
+ # 此脚本用于分析用户配置文件并选择最适合的属性
6
+
7
+ import json
8
+ import os
9
+ import sys
10
+ import logging
11
+ from typing import Dict, List, Any, Optional, Tuple
12
+ import argparse
13
+ from pathlib import Path
14
+ import random
15
+ import numpy as np
16
+ import pickle
17
+ from tqdm import tqdm
18
+ import time
19
+ ATTRIBUTE_SELECTION_CACHE = None
20
+
21
+ # 导入项目配置
22
+ from config import client, GPT_MODEL, parse_json_response
23
+
24
+ # 定义get_completion函数
25
+ def get_completion(messages, model=GPT_MODEL, temperature=0.7):
26
+ """使用OpenAI API生成文本完成"""
27
+ try:
28
+ response = client.chat.completions.create(
29
+ model=model,
30
+ messages=messages,
31
+ temperature=temperature
32
+ )
33
+ return response.choices[0].message.content
34
+ except Exception as e:
35
+ logger.error(f"Error calling OpenAI API: {e}")
36
+ return None
37
+
38
+ # 导入based_data模块中的函数
39
+ from based_data import (
40
+ generate_age_info,
41
+ generate_gender,
42
+ generate_career_info,
43
+ generate_location,
44
+ generate_personal_values,
45
+ generate_life_attitude,
46
+ generate_personal_story,
47
+ generate_interests_and_hobbies
48
+ )
49
+
50
+ # 配置日志
51
+ logging.basicConfig(
52
+ level=logging.INFO,
53
+ format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
54
+ )
55
+ logger = logging.getLogger(__name__)
56
+
57
+ # 属性数据集路径
58
+ # 使用相对路径获取属性数据集路径
59
+ ATTRIBUTES_PATH = os.path.join(os.path.dirname(__file__), "data", "large_attributes.json") # 属性数据集路径
60
+
61
+ # 向量数据库路径
62
+ # 使用相对路径获取属性嵌入向量路径
63
+ EMBEDDINGS_PATH = os.path.join(os.path.dirname(__file__), "data", "attribute_embeddings.pkl") # 属性嵌入向量路径
64
+
65
+ # 默认模型来自配置
66
+ DEFAULT_MODEL = GPT_MODEL
67
+
68
+ # 向量搜索参数
69
+ NEAR_NEIGHBOR_COUNT = 1 # 近邻数量
70
+ MID_NEIGHBOR_COUNT = 1 # 中距离邻居数量
71
+ FAR_NEIGHBOR_COUNT = 1 # 远距离邻居数量
72
+ DIVERSITY_THRESHOLD = 0.7 # 多样性阈值(余弦相似度)
73
+
74
+ class AttributeSelector:
75
+ """
76
+ 属性选择器类
77
+ 用于分析用户配置文件并使用GPT-4o选择适当的属性
78
+ """
79
+
80
+ def __init__(self, model: str = DEFAULT_MODEL, user_profile: Dict = None):
81
+ """
82
+ 初始化属性选择器
83
+
84
+ 参数:
85
+ model: 要使用的GPT模型
86
+ user_profile: 用户配置文件数据(可选)
87
+ """
88
+ self.model = model
89
+
90
+ # OpenAI客户端已在config.py中设置
91
+
92
+ # 加载属性数据
93
+ self.attributes = self._load_json(ATTRIBUTES_PATH) # 加载属性数据
94
+
95
+ # 设置用户配置文件
96
+ self.user_profile = user_profile
97
+
98
+ # 初始化路径到嵌入向量的映射
99
+ self.path_to_embedding = {}
100
+
101
+ # 先加载嵌入向量,这样在验证数据时可以使用
102
+ self.embeddings_data = self._load_embeddings()
103
+ self.paths = []
104
+ self.embeddings = []
105
+
106
+ # 处理嵌入向量数据
107
+ if self.embeddings_data:
108
+ # 确定正确的路径键
109
+ paths_key = 'attribute_paths' if 'attribute_paths' in self.embeddings_data else 'paths'
110
+ embeddings_key = 'embeddings'
111
+
112
+ if paths_key in self.embeddings_data:
113
+ self.paths = self.embeddings_data[paths_key]
114
+ if embeddings_key in self.embeddings_data:
115
+ self.embeddings = self.embeddings_data[embeddings_key]
116
+
117
+ # 创建路径到嵌入向量的映射
118
+ for i, path in enumerate(self.paths):
119
+ if i < len(self.embeddings):
120
+ self.path_to_embedding[path] = self.embeddings[i]
121
+
122
+ logger.info(f"已加载 {len(self.paths)} 条属性路径和对应的向量嵌入")
123
+
124
+ # 现在验证和处理属性数据
125
+ self._validate_data()
126
+
127
+ # 记录顶级类别数量
128
+ logger.info(f"已加载属性,包含 {len(self._get_attribute_categories())} 个顶级类别")
129
+
130
+ def _load_json(self, file_path: str) -> Dict:
131
+ """从文件加载JSON数据"""
132
+ try:
133
+ return json.loads(Path(file_path).read_text(encoding='utf-8'))
134
+ except Exception as e:
135
+ logger.error(f"从 {file_path} 加载JSON时出错: {e}")
136
+ raise
137
+
138
+ def _load_embeddings(self) -> Dict:
139
+ """加载属性嵌入向量数据库"""
140
+ try:
141
+ if not os.path.exists(EMBEDDINGS_PATH):
142
+ logger.warning(f"嵌入向量文件 {EMBEDDINGS_PATH} 不存在")
143
+ return None
144
+
145
+ with open(EMBEDDINGS_PATH, 'rb') as f:
146
+ embeddings_data = pickle.load(f)
147
+
148
+ # 检查数据结构并标准化键名
149
+ paths_key = 'attribute_paths' if 'attribute_paths' in embeddings_data else 'paths'
150
+ embeddings_key = 'embeddings'
151
+
152
+ # 获取路径和嵌入向量
153
+ paths = embeddings_data.get(paths_key, [])
154
+ embeddings = embeddings_data.get(embeddings_key, [])
155
+
156
+ # 如果数据无效,返回空值
157
+ if not isinstance(embeddings_data, dict) or not paths or not isinstance(embeddings, np.ndarray):
158
+ logger.warning("嵌入向量数据格式无效")
159
+ return None
160
+
161
+ # 标准化返回的数据字典
162
+ standardized_data = {
163
+ 'paths': paths,
164
+ 'embeddings': embeddings
165
+ }
166
+
167
+ logger.info(f"从 {EMBEDDINGS_PATH} 加载了 {len(paths)} 条属性嵌入向量")
168
+ return standardized_data
169
+
170
+ except Exception as e:
171
+ logger.error(f"加载嵌入向量时出错: {e}")
172
+ return None
173
+
174
+ def _validate_data(self):
175
+ """验证加载的数据并转换格式(如需要)"""
176
+ # 检查属性格式
177
+ if isinstance(self.attributes, dict):
178
+ # 如果是嵌套字典格式(如large_attributes.json),转换为路径格式
179
+ if "paths" not in self.attributes:
180
+ logger.info("正在将属性从嵌套字典格式转换为路径格式")
181
+ self.attributes = {"paths": self._flatten_attributes(self.attributes)}
182
+
183
+ # 检查是否有匹配的路径
184
+ if hasattr(self, 'embeddings_data') and self.embeddings_data:
185
+ paths_key = 'attribute_paths' if 'attribute_paths' in self.embeddings_data else 'paths'
186
+ if paths_key in self.embeddings_data:
187
+ embedding_paths = set(self.embeddings_data[paths_key])
188
+ matching_paths = [p for p in self.attributes["paths"] if p in embedding_paths]
189
+ logger.info(f"从 {len(self.attributes['paths'])} 条提取路径中找到 {len(matching_paths)} 条与嵌入向量匹配的路径")
190
+
191
+ # 如果没有匹配的路径,直接使用嵌入向量中的路径
192
+ if not matching_paths:
193
+ logger.warning("没有找到匹配的路径,直接使用嵌入向量中的路径")
194
+ self.attributes["paths"] = self.embeddings_data[paths_key]
195
+ else:
196
+ raise ValueError("无效的属性格式:不是字典")
197
+
198
+ def _get_attribute_categories(self) -> List[str]:
199
+ """获取顶级属性类别"""
200
+ # 从路径中提取唯一的顶级类别
201
+ return sorted({path.split('.')[0] for path in self.attributes["paths"] if '.' in path})
202
+
203
+ def _flatten_attributes(self, attributes: Dict, prefix: str = "") -> List[str]:
204
+ """
205
+ 将属性字典扁平化为属性路径列表
206
+
207
+ 参数:
208
+ attributes: 属性字典或子字典
209
+ prefix: 当前路径前缀
210
+ """
211
+ result = []
212
+
213
+ # 如果有嵌入向量数据,打印样例路径作为参考
214
+ if hasattr(self, 'embeddings_data') and self.embeddings_data:
215
+ paths_key = 'attribute_paths' if 'attribute_paths' in self.embeddings_data else 'paths'
216
+ if paths_key in self.embeddings_data and len(self.embeddings_data[paths_key]) > 0:
217
+ sample_paths = self.embeddings_data[paths_key][:5]
218
+ logger.info(f"嵌入向量中的路径样例: {sample_paths}")
219
+
220
+ # 打印所有嵌入向量中的顶级类别
221
+ top_categories = set()
222
+ for path in self.embeddings_data[paths_key]:
223
+ if '.' in path:
224
+ top_categories.add(path.split('.')[0])
225
+ logger.info(f"嵌入向量中的顶级类别: {sorted(list(top_categories))}")
226
+
227
+ def _flatten(attr_dict, curr_prefix):
228
+ for k, v in attr_dict.items():
229
+ path = f"{curr_prefix}.{k}" if curr_prefix else k
230
+
231
+ # 检查是否是叶子节点或有描述的节点
232
+ if isinstance(v, dict):
233
+ # 总是添加路径,无论是否有描述,以匹配嵌入向量中的路径格式
234
+ result.append(path)
235
+
236
+ # 继续递归处理子节点
237
+ if len(v) > 0: # 非空字典,继续递归
238
+ _flatten(v, path)
239
+ else: # 非字典值,直接添加
240
+ result.append(path)
241
+
242
+ _flatten(attributes, prefix)
243
+ logger.info(f"从属性字典中提取了 {len(result)} 条路径")
244
+
245
+ # 打印一些提取的路径样例,用于调试
246
+ if result:
247
+ logger.info(f"提取的路径样例: {result[:5]}")
248
+
249
+ return result
250
+
251
+ def _create_profile_embedding(self, profile: Dict) -> np.ndarray:
252
+ """
253
+ 为用户配置文件创建嵌入向量
254
+
255
+ 参数:
256
+ profile: 用户配置文件字典
257
+
258
+ 返回:
259
+ 配置文件的嵌入向量
260
+ """
261
+ try:
262
+ # 提取配置文件摘要
263
+ profile_summary = self._extract_profile_summary(profile)
264
+
265
+ # 使用OpenAI API生成嵌入向量
266
+ response = client.embeddings.create(
267
+ model="text-embedding-ada-002",
268
+ input=profile_summary
269
+ )
270
+
271
+ # 提取嵌入向量
272
+ embedding = np.array(response.data[0].embedding)
273
+ logger.info(f"成功为用户配置文件创建了嵌入向量")
274
+ return embedding
275
+
276
+ except Exception as e:
277
+ logger.error(f"创建配置文件嵌入向量时出错: {e}")
278
+ return None
279
+
280
+ def _compute_cosine_similarity(self, vec1: np.ndarray, vec2: np.ndarray) -> float:
281
+ """
282
+ 计算两个向量之间的余弦相似度
283
+
284
+ 参数:
285
+ vec1: 第一个向量
286
+ vec2: 第二个向量
287
+
288
+ 返回:
289
+ 余弦相似度值,范围为[-1, 1]
290
+ """
291
+ # 处理空向量或None值
292
+ if vec1 is None or vec2 is None or len(vec1) == 0 or len(vec2) == 0:
293
+ return 0.0
294
+
295
+ # 确保向量维度匹配
296
+ if len(vec1) != len(vec2):
297
+ logger.warning(f"向量维度不匹配: {len(vec1)} vs {len(vec2)}")
298
+ return 0.0
299
+
300
+ # 计算向量范数
301
+ norm1 = np.linalg.norm(vec1)
302
+ norm2 = np.linalg.norm(vec2)
303
+
304
+ # 处理零向量
305
+ if norm1 == 0 or norm2 == 0:
306
+ return 0.0
307
+
308
+ # 计算余弦相似度
309
+ return np.dot(vec1, vec2) / (norm1 * norm2)
310
+
311
+ def get_profile(self) -> Dict:
312
+ """获取用户配置文件"""
313
+ return self.user_profile
314
+
315
+ def _check_if_career_needed(self, profile: Dict, profile_summary: str) -> bool:
316
+ """
317
+ 使用GPT判断是否需要"Career and Work Identity"属性
318
+
319
+ 参数:
320
+ profile: 用户配置文件字典
321
+ profile_summary: 用户配置文件摘要
322
+
323
+ 返回:
324
+ 布尔值,表示是否需要职业相关属性
325
+ """
326
+ # 创建专门用于判断职业属性必要性的提示词
327
+ prompt = f"""
328
+ # Career Attribute Necessity Assessment
329
+
330
+ ## User Profile Summary:
331
+ {profile_summary}
332
+
333
+ ## Task Description:
334
+ You are an AI assistant tasked with determining whether the "Career and Work Identity" attribute category is relevant and necessary for this specific individual based on their profile.
335
+
336
+ Consider the following factors:
337
+ 1. The person's age and life stage
338
+ 2. Current employment or educational status
339
+ 3. How central career and work identity appears to be to this person's life
340
+ 4. Whether career information would be essential to create a complete picture of this person
341
+
342
+ ## Output Format:
343
+ Provide a JSON response with these keys:
344
+ 1. "is_career_needed": Boolean (true/false) indicating whether Career and Work Identity attributes are needed
345
+ 2. "reasoning": String explaining your rationale
346
+
347
+ Your response must be valid JSON that can be parsed by Python's json.loads() function.
348
+ """
349
+
350
+ try:
351
+ # 调用GPT API,使用config.py中的get_completion函数
352
+ messages = [
353
+ {"role": "system", "content": "You are an AI assistant that analyzes user profiles and determines whether career attributes are necessary. You always respond with valid JSON."},
354
+ {"role": "user", "content": prompt}
355
+ ]
356
+ content = get_completion(messages, model=self.model, temperature=0.3)
357
+
358
+ # Use the project's JSON parsing function
359
+ result = parse_json_response(content, {"is_career_needed": True, "reasoning": "默认需要职业属性"})
360
+
361
+ # 确保结果包含必要的键
362
+ if "is_career_needed" not in result:
363
+ logger.warning("Missing 'is_career_needed' key in GPT response, defaulting to True")
364
+ result["is_career_needed"] = True
365
+
366
+ logger.info(f"Career attributes needed: {result['is_career_needed']}, Reason: {result.get('reasoning', 'No reasoning provided')}")
367
+
368
+ return result["is_career_needed"]
369
+
370
+ except Exception as e:
371
+ logger.error(f"Error calling GPT API for career assessment: {e}")
372
+ # 出错时默认需要职业属性
373
+ return True
374
+
375
+ def _extract_profile_summary(self, profile: Dict) -> str:
376
+ """
377
+ 提取配置文件摘要,用于GPT分析
378
+
379
+ 参数:
380
+ profile: 用户配置文件字典
381
+
382
+ 返回:
383
+ 配置文件摘要字符串
384
+ """
385
+ summary_parts = []
386
+
387
+ # Add age information
388
+ if "age_info" in profile:
389
+ age_info = profile["age_info"]
390
+ if "age" in age_info:
391
+ summary_parts.append(f"Age: {age_info['age']}")
392
+ if "age_group" in age_info:
393
+ summary_parts.append(f"Age Group: {age_info['age_group']}")
394
+
395
+ # Add gender information
396
+ if "gender" in profile:
397
+ gender = profile["gender"]
398
+ # Convert Chinese characters to English if needed
399
+ if gender == "男":
400
+ gender = "Male"
401
+ elif gender == "女":
402
+ gender = "Female"
403
+ summary_parts.append(f"Gender: {gender}")
404
+
405
+ # Add location information
406
+ if "location" in profile:
407
+ location = profile["location"]
408
+ location_str = f"{location.get('city', '')}, {location.get('country', '')}"
409
+ summary_parts.append(f"Location: {location_str}")
410
+
411
+ # Add career information
412
+ if "career_info" in profile and "status" in profile["career_info"]:
413
+ summary_parts.append(f"Career Status: {profile['career_info']['status']}")
414
+
415
+ # Add personal values
416
+ if "personal_values" in profile and "values_orientation" in profile["personal_values"]:
417
+ summary_parts.append(f"Values: {profile['personal_values']['values_orientation']}")
418
+
419
+ # Add life attitude
420
+ if "life_attitude" in profile:
421
+ attitude = profile["life_attitude"]
422
+ if "attitude" in attitude:
423
+ summary_parts.append(f"Life Attitude: {attitude['attitude']}")
424
+ if "attitude_details" in attitude:
425
+ summary_parts.append(f"Attitude Details: {attitude['attitude_details']}")
426
+ if "coping_mechanism" in attitude:
427
+ summary_parts.append(f"Coping Mechanism: {attitude['coping_mechanism']}")
428
+
429
+ # Add interests
430
+ if "interests" in profile and "interests" in profile["interests"]:
431
+ interests = profile["interests"]["interests"]
432
+ if interests and isinstance(interests, list):
433
+ summary_parts.append(f"Interests: {', '.join(interests)}")
434
+
435
+ # Add summary if available (but not personal story)
436
+ if "summary" in profile:
437
+ summary_parts.append(f"Profile Summary: {profile['summary']}")
438
+
439
+ # Join all summary parts into a single string and return
440
+ return "\n".join(summary_parts)
441
+
442
+ def _format_attributes_tree(self, attributes_dict: Dict, prefix: str = "", depth: int = 0) -> List[str]:
443
+ """
444
+ 将属性字典格式化为文本格式的树结构
445
+
446
+ 参数:
447
+ attributes_dict: 属性字典
448
+ prefix: 当前路径前缀
449
+ depth: 树中的当前深度
450
+
451
+ 返回:
452
+ 表示树的格式化行列表
453
+ """
454
+ lines = []
455
+
456
+ for key, value in sorted(attributes_dict.items()):
457
+ current_path = f"{prefix}.{key}" if prefix else key
458
+ indent = " " * depth
459
+
460
+ if depth > 0:
461
+ prefix_char = "│ " * (depth - 1) + "- "
462
+ else:
463
+ prefix_char = "- "
464
+
465
+ lines.append(f"{indent}{prefix_char}{key}")
466
+
467
+ if isinstance(value, dict) and value:
468
+ sub_lines = self._format_attributes_tree(value, current_path, depth + 1)
469
+ lines.extend(sub_lines)
470
+
471
+ return lines
472
+
473
+ def analyze_profile_for_attributes(self, profile: Dict) -> Dict[str, List[str]]:
474
+ """
475
+ 分析用户配置文件并确定应该生成哪些属性
476
+
477
+ 参数:
478
+ profile: 用户配置文件字典
479
+
480
+ 返回:
481
+ 包含'recommended'和'not_recommended'属性类别的字典
482
+ """
483
+ # 提取配置文件摘要
484
+ profile_summary = self._extract_profile_summary(profile)
485
+
486
+ # 获取属性类别
487
+ categories = self._get_attribute_categories()
488
+
489
+ # 第一步:使用GPT判断是否需要"Career and Work Identity"
490
+ career_needed = self._check_if_career_needed(profile, profile_summary)
491
+
492
+ # 第二步:保留所有一级属性(除了可能被排除的"Career and Work Identity")
493
+ recommended_categories = []
494
+ not_recommended_categories = []
495
+
496
+ for category in categories:
497
+ if category == "Career and Work Identity" and not career_needed:
498
+ not_recommended_categories.append(category)
499
+ logger.info(f"根据分析,不需要职业和工作身份属性")
500
+ else:
501
+ recommended_categories.append(category)
502
+
503
+ # 生成结果
504
+ result = {
505
+ "recommended": recommended_categories,
506
+ "not_recommended": not_recommended_categories,
507
+ "reasoning": f"根据用户背景分析,{'需要' if career_needed else '不需要'}职业和工作身份属性。保留所有其他一级属性,从每个属性中选择最符合用户背景的特征。"
508
+ }
509
+
510
+ return result
511
+
512
+ def process_profile(self) -> Dict:
513
+ """
514
+ 处理用户配置文件并生成属性推荐
515
+
516
+ 返回:
517
+ 包含配置文件和属性推荐的字典
518
+ """
519
+ # 如果未提供用户配置文件,生成一个
520
+ if not self.user_profile:
521
+ self.user_profile = generate_user_profile()
522
+
523
+ # 提取配置文件摘要
524
+ profile_summary = self._extract_profile_summary(self.user_profile)
525
+
526
+ # 分析配置文件并获取属性推荐
527
+ attribute_recommendations = self.analyze_profile_for_attributes(self.user_profile)
528
+
529
+ # 返回结果
530
+ return {
531
+ "profile_summary": profile_summary,
532
+ "attribute_recommendations": attribute_recommendations
533
+ }
534
+
535
+ def _get_nested_attributes(self, category: str) -> Dict:
536
+ """
537
+ 通过从路径重建获取特定类别的嵌套属性
538
+
539
+ 参数:
540
+ category: 类别名称
541
+ """
542
+ result = {}
543
+
544
+ # 筛选以该类别开头的路径并重建嵌套结构
545
+ for path in [p for p in self.attributes["paths"] if p.startswith(f"{category}.")]:
546
+ parts = path.split('.')[1:] # 跳过第一部分(类别)
547
+ current = result
548
+
549
+ for i, part in enumerate(parts):
550
+ if i == len(parts) - 1:
551
+ current[part] = {} # 叶节点
552
+ else:
553
+ current.setdefault(part, {}) # 如果键不存在则创建
554
+ current = current[part]
555
+
556
+ return result
557
+
558
+
559
+
560
+ def select_top_attributes(self, path_list, target_count=200):
561
+ """
562
+ 从路径列表中选择最重要和最具代表性的顶级属性。
563
+
564
+ 参数:
565
+ path_list: 属性路径列表
566
+ target_count: 要选择的目标属性数量
567
+
568
+ 返回:
569
+ 选定的属性路径列表
570
+ """
571
+ if not path_list:
572
+ return []
573
+
574
+ # If we already have fewer paths than target, return all of them
575
+ if len(path_list) <= target_count:
576
+ return path_list
577
+
578
+ # Extract unique top-level categories
579
+ categories = {}
580
+ for path in path_list:
581
+ parts = path.split('.')
582
+ if len(parts) > 0:
583
+ category = parts[0]
584
+ if category not in categories:
585
+ categories[category] = []
586
+ categories[category].append(path)
587
+
588
+ # Calculate how many attributes to select from each category
589
+ # proportional to their representation in the original list
590
+ total_paths = len(path_list)
591
+ category_counts = {}
592
+ for category, paths in categories.items():
593
+ # Calculate proportional count but ensure at least 1 attribute per category
594
+ count = max(1, int(len(paths) / total_paths * target_count))
595
+ category_counts[category] = count
596
+
597
+ # Adjust counts to match target_count as closely as possible
598
+ total_selected = sum(category_counts.values())
599
+ if total_selected < target_count:
600
+ # Distribute remaining slots to largest categories
601
+ remaining = target_count - total_selected
602
+ sorted_categories = sorted(categories.keys(),
603
+ key=lambda c: len(categories[c]),
604
+ reverse=True)
605
+ for i in range(remaining):
606
+ if i < len(sorted_categories):
607
+ category_counts[sorted_categories[i]] += 1
608
+ elif total_selected > target_count:
609
+ # Remove from largest categories until we hit target
610
+ excess = total_selected - target_count
611
+ sorted_categories = sorted(categories.keys(),
612
+ key=lambda c: category_counts[c],
613
+ reverse=True)
614
+ for i in range(excess):
615
+ if i < len(sorted_categories) and category_counts[sorted_categories[i]] > 1:
616
+ category_counts[sorted_categories[i]] -= 1
617
+
618
+ # Select paths from each category
619
+ selected_paths = []
620
+ for category, count in category_counts.items():
621
+ category_paths = categories[category]
622
+
623
+ # Prioritize paths with fewer segments (more general attributes)
624
+ # and paths that represent common attributes across domains
625
+ scored_paths = []
626
+ for path in category_paths:
627
+ parts = path.split('.')
628
+ # Score is based on path depth (shorter is better) and presence of common terms
629
+ common_terms = ['general', 'common', 'basic', 'core', 'essential', 'fundamental', 'key']
630
+ common_term_bonus = any(term in path.lower() for term in common_terms)
631
+ score = (10 - len(parts)) + (5 if common_term_bonus else 0)
632
+ scored_paths.append((path, score))
633
+
634
+ # Sort by score (higher is better) and select top paths
635
+ sorted_paths = sorted(scored_paths, key=lambda x: x[1], reverse=True)
636
+ selected_category_paths = [p[0] for p in sorted_paths[:count]]
637
+ selected_paths.extend(selected_category_paths)
638
+
639
+ return selected_paths
640
+
641
+ # 注意:删除了_select_best_matching_attributes方法,因为它已经被新的随机选择和GPT筛选方法替代
642
+
643
+ def _find_interesting_neighbors(self, profile_embedding: np.ndarray, category_paths: List[str],
644
+ target_count: int = 300) -> List[str]:
645
+ """
646
+ 实现"有趣的邻居"向量搜索方案
647
+
648
+ 参数:
649
+ profile_embedding: 用户配置文件的嵌入向量
650
+ category_paths: 特定类别的属性路径列表
651
+ target_count: 要选择的目标属性数量
652
+
653
+ 返回:
654
+ 选定的属性路径列表或空列表(如果出现读取问题)
655
+ """
656
+ # 如果没有向量数据库或路径为空,返回空列表
657
+ if not self.embeddings_data or not category_paths:
658
+ logger.warning("没有可用的向量数据库或类别路径为空,返回空列表")
659
+ return []
660
+
661
+ # 过滤出在向量数据库中有嵌入向量的路径
662
+ valid_paths = [path for path in category_paths if path in self.path_to_embedding]
663
+
664
+ if not valid_paths:
665
+ logger.warning("没有有效的属性路径匹配向量数据库,返回空列表")
666
+ return []
667
+
668
+ # 计算每个路径与配置文件的相似度
669
+ path_similarities = []
670
+ for path in valid_paths:
671
+ embedding = self.path_to_embedding[path]
672
+ similarity = self._compute_cosine_similarity(profile_embedding, embedding)
673
+ path_similarities.append((path, similarity))
674
+
675
+ # 按相似度排序
676
+ path_similarities.sort(key=lambda x: x[1], reverse=True)
677
+
678
+ # 计算要选择的数量
679
+ total_paths = len(path_similarities)
680
+
681
+ # 如果路径数量少于目标数量,返回所有路径
682
+ if total_paths <= target_count:
683
+ return [p[0] for p in path_similarities]
684
+
685
+ selected_paths = []
686
+ used_indices = set()
687
+
688
+ # 1. 选择近邻(相似度最高的属性)
689
+ near_count = min(int(target_count * 0.4), total_paths // 3) # 大约40%的目标数量
690
+ near_indices = list(range(near_count))
691
+ for i in random.sample(near_indices, near_count):
692
+ if i not in used_indices:
693
+ selected_paths.append(path_similarities[i][0])
694
+ used_indices.add(i)
695
+
696
+ # 2. 选择中距离邻居
697
+ mid_start = total_paths // 3
698
+ mid_end = 2 * total_paths // 3
699
+ mid_count = min(int(target_count * 0.4), (mid_end - mid_start)) # 大约40%的目标数量
700
+ mid_indices = list(range(mid_start, mid_end))
701
+ for i in random.sample(mid_indices, mid_count):
702
+ if i not in used_indices:
703
+ selected_paths.append(path_similarities[i][0])
704
+ used_indices.add(i)
705
+
706
+ # 3. 选择远距离邻居(相似度最低的属性)
707
+ far_start = 2 * total_paths // 3
708
+ far_count = min(int(target_count * 0.2), (total_paths - far_start)) # 大约20%的目标数量
709
+ far_indices = list(range(far_start, total_paths))
710
+ for i in random.sample(far_indices, far_count):
711
+ if i not in used_indices:
712
+ selected_paths.append(path_similarities[i][0])
713
+ used_indices.add(i)
714
+
715
+ # 如果还需要更多属性来达到目标数量,从未使用的索引中随机选择
716
+ remaining_count = target_count - len(selected_paths)
717
+ if remaining_count > 0:
718
+ remaining_indices = [i for i in range(total_paths) if i not in used_indices]
719
+ if remaining_indices:
720
+ additional_count = min(remaining_count, len(remaining_indices))
721
+ for i in random.sample(remaining_indices, additional_count):
722
+ selected_paths.append(path_similarities[i][0])
723
+
724
+ logger.info(f"使用向量搜索选择了 {len(selected_paths)} 条属性(近邻: {near_count}, 中距离: {mid_count}, 远距离: {far_count})")
725
+ return selected_paths
726
+
727
+ def get_top_attributes(self, result: Dict) -> List[str]:
728
+ """
729
+ 获取属性列表
730
+
731
+ 参数:
732
+ result: 来自analyze_profile_for_attributes的结果
733
+
734
+ 返回:
735
+ 属性路径列表
736
+ """
737
+ try:
738
+ # 收集所有推荐的类别
739
+ all_recommended = set()
740
+
741
+ if "recommended" in result:
742
+ all_recommended.update(result["recommended"])
743
+
744
+ # 提取所有路径
745
+ all_paths = []
746
+ category_paths = {}
747
+
748
+ if "paths" in self.attributes:
749
+ # 如果我们使用带有路径的新格式
750
+ for path in self.attributes["paths"]:
751
+ # 只包括来自推荐类别的路径
752
+ category = path.split('.')[0] if '.' in path else path
753
+ if category in all_recommended:
754
+ all_paths.append(path)
755
+ # 按类别分组路径
756
+ if category not in category_paths:
757
+ category_paths[category] = []
758
+ category_paths[category].append(path)
759
+ else:
760
+ # 如果我们使用旧的嵌套格式,将其扁平化
761
+ for category in all_recommended:
762
+ paths = self._flatten_attributes(self._get_nested_attributes(category), category)
763
+ all_paths.extend(paths)
764
+ category_paths[category] = paths
765
+
766
+ # 随机选择属性数量
767
+ attribute_count_options = [250, 300, 350]
768
+ target_count = random.choice(attribute_count_options)
769
+
770
+ # 如果有向量数据库,使用向量搜索
771
+ if self.embeddings_data and self.user_profile:
772
+ # 创建用户配置文件的嵌入向量
773
+ profile_embedding = self._create_profile_embedding(self.user_profile)
774
+
775
+ if profile_embedding is not None:
776
+ # 为每个类别选择属性
777
+ final_paths = []
778
+ for category, paths in category_paths.items():
779
+ # 根据类别大小按比例分配目标数量
780
+ category_ratio = len(paths) / len(all_paths)
781
+ category_target = max(10, int(target_count * category_ratio))
782
+
783
+ # 使用向量搜索选择该类别的属性
784
+ category_selected = self._find_interesting_neighbors(
785
+ profile_embedding, paths, category_target
786
+ )
787
+ final_paths.extend(category_selected)
788
+
789
+ # 如果选择的属性超过目标数量,随机减少
790
+ if len(final_paths) > target_count:
791
+ final_paths = random.sample(final_paths, target_count)
792
+
793
+ logger.info(f"使用向量搜索从 {len(all_paths)} 条属性中选择了 {len(final_paths)} 条属性")
794
+ return final_paths
795
+
796
+ # 如果没有向量数据库或向量搜索失败,使用简单的属性选择方法
797
+ logger.warning(f"没有可用的向量数据库或向量搜索失败,使用简单的属性选择方法")
798
+
799
+ # 创建基本属性路径列表
800
+ basic_paths = [
801
+ "Demographic Information.Age",
802
+ "Demographic Information.Gender",
803
+ "Demographic Information.Location.Country",
804
+ "Demographic Information.Location.City",
805
+ "Career and Work Identity.Occupation",
806
+ "Career and Work Identity.Work Experience",
807
+ "Core Values, Beliefs, and Philosophy.Personal Values",
808
+ "Core Values, Beliefs, and Philosophy.Life Philosophy",
809
+ "Lifestyle and Daily Routine.Daily Habits",
810
+ "Lifestyle and Daily Routine.Lifestyle Choices",
811
+ "Cultural and Social Context.Cultural Background",
812
+ "Cultural and Social Context.Social Connections",
813
+ "Hobbies, Interests, and Lifestyle.Hobbies",
814
+ "Hobbies, Interests, and Lifestyle.Interests",
815
+ "Other Attributes.Personal Story",
816
+ "Other Attributes.Key Life Events"
817
+ ]
818
+
819
+ logger.info(f"使用简单方法选择了 {len(basic_paths)} 个基本属性路径")
820
+ return basic_paths
821
+
822
+ except Exception as e:
823
+ logger.error(f"Error generating attribute list: {e}")
824
+ # 如果出错,直接返回空列表
825
+ logger.error(f"属性选择过程出错,返回空列表")
826
+ return []
827
+
828
+ # 注意:删除了_random_select_from_top_categories方法,因为现在直接在get_top_attributes中随机选择属性
829
+
830
+
831
+
832
+ def generate_user_profile() -> Dict:
833
+ """生成用户基础信息配置文件"""
834
+ # 生成并存储直接函数返回值
835
+ age_info = generate_age_info()
836
+ gender = generate_gender()
837
+ location = generate_location()
838
+ career_info = generate_career_info(age_info["age"])
839
+
840
+ # 生成个人价值观
841
+ values = generate_personal_values(
842
+ age=age_info["age"],
843
+ gender=gender,
844
+ occupation=career_info["status"],
845
+ location=location
846
+ )
847
+
848
+ # 生成生活态度
849
+ life_attitude = generate_life_attitude(
850
+ age=age_info["age"],
851
+ gender=gender,
852
+ occupation=career_info["status"],
853
+ location=location,
854
+ values_orientation=values.get("values_orientation", "")
855
+ )
856
+
857
+ # 生成个人故事
858
+ personal_story = generate_personal_story(
859
+ age=age_info["age"],
860
+ gender=gender,
861
+ occupation=career_info["status"],
862
+ location=location,
863
+ values_orientation=values.get("values_orientation", ""),
864
+ life_attitude=life_attitude
865
+ )
866
+
867
+ # 生成兴趣爱好
868
+ interests = generate_interests_and_hobbies(personal_story)
869
+
870
+ # 存储函数返回值
871
+ user_profile = {
872
+ "age_info": age_info,
873
+ "gender": gender,
874
+ "location": location,
875
+ "career_info": career_info,
876
+ "personal_values": values,
877
+ "life_attitude": life_attitude,
878
+ "personal_story": personal_story,
879
+ "interests": interests
880
+ }
881
+
882
+ return user_profile
883
+
884
+ def get_selected_attributes(user_profile=None):
885
+ global ATTRIBUTE_SELECTION_CACHE
886
+ if ATTRIBUTE_SELECTION_CACHE is not None:
887
+ return ATTRIBUTE_SELECTION_CACHE
888
+
889
+ try:
890
+ # 如果没有提供用户配置文件,生成一个
891
+ if user_profile is None:
892
+ user_profile = generate_user_profile()
893
+
894
+ # 创建选择器并传入用户配置文件
895
+ selector = AttributeSelector(user_profile=user_profile)
896
+
897
+ # 处理配置文件
898
+ result = selector.process_profile()
899
+
900
+ # 获取属性推荐
901
+ attribute_recommendations = result.get("attribute_recommendations", {})
902
+
903
+ # 获取属性列表
904
+ top_paths = selector.get_top_attributes(attribute_recommendations)
905
+
906
+ # 返回属性列表
907
+ ATTRIBUTE_SELECTION_CACHE = top_paths
908
+ return top_paths
909
+
910
+ except Exception as e:
911
+ logger.error(f"Error getting selected attributes: {e}")
912
+ return []
913
+
914
+ def build_nested_dict(paths: List[str]) -> Dict:
915
+ result = {}
916
+ for path in paths:
917
+ parts = path.split('.')
918
+ current = result
919
+ for part in parts:
920
+ if part not in current:
921
+ current[part] = {}
922
+ current = current[part]
923
+ return result
924
+
925
+ def save_results(user_profile: Dict, selected_paths: List[str], output_dir: str = None) -> None:
926
+ """
927
+ 保存用户配置文件和选定的属性路径到文件
928
+ 参数:
929
+ user_profile: 用户配置文件
930
+ selected_paths: 选定的属性路径 (列表形式)
931
+ output_dir: 输出目录(默认为项目根目录下的output文件夹)
932
+ """
933
+ try:
934
+ from pathlib import Path
935
+ import json
936
+
937
+ # 如果没有提供输出目录,使用默认的相对路径
938
+ if output_dir is None:
939
+ output_dir = os.path.join(os.path.dirname(os.path.dirname(__file__)), "output")
940
+
941
+ output_path = Path(output_dir)
942
+ output_path.mkdir(parents=True, exist_ok=True)
943
+
944
+ # 保存用户配置文件
945
+ profile_path = output_path / "user_profile.json"
946
+ with open(profile_path, 'w', encoding='utf-8') as f:
947
+ json.dump(user_profile, f, ensure_ascii=False, indent=2)
948
+ logger.info(f"用户配置文件已保存到 {profile_path}")
949
+
950
+ # 将 selected_paths 转换为嵌套字典结构
951
+ nested_selected_paths = build_nested_dict(selected_paths)
952
+
953
+ # 保存属性路径(嵌套字典格式)
954
+ paths_path = output_path / "selected_paths.json"
955
+ with open(paths_path, 'w', encoding='utf-8') as f:
956
+ json.dump(nested_selected_paths, f, ensure_ascii=False, indent=2)
957
+ logger.info(f"属性路径已保存到 {paths_path}")
958
+ except Exception as e:
959
+ logger.error(f"保存结果时出错: {e}")
960
+ raise
961
+
962
+ # 示例:在生成用户基本信息和属性列表的函数中自动调用保存(请根据实际情况将此调用添加到合适位置)
963
+ user_profile = generate_user_profile()
964
+ selected_paths = get_selected_attributes(user_profile)
965
+ save_results(user_profile, selected_paths)
966
+
967
+ # 此文件只供其他文件导入使用
generation_user_profile/code/web_api_bridge.py ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ """
5
+ Web API bridge script for handling inputs from the web interface
6
+ and generating user personas following the logic in generate_profile.py.
7
+ """
8
+
9
+ import json
10
+ import argparse
11
+ import sys
12
+ import os
13
+ import random
14
+ from typing import Dict, Any, List, Optional
15
+
16
+ # Import required modules
17
+ from based_data import (
18
+ generate_age_info,
19
+ generate_gender,
20
+ generate_career_info,
21
+ generate_location,
22
+ generate_personal_values,
23
+ generate_life_attitude,
24
+ generate_personal_story,
25
+ generate_interests_and_hobbies
26
+ )
27
+
28
+ from generate_profile import generate_final_summary
29
+ from select_attributes import get_selected_attributes, save_results
30
+
31
+ def parse_input_data(input_file: str) -> Dict[str, Any]:
32
+ """
33
+ Parse data from the input file
34
+
35
+ Args:
36
+ input_file: Path to the input JSON file
37
+
38
+ Returns:
39
+ Dict: Parsed input data
40
+ """
41
+ try:
42
+ with open(input_file, 'r', encoding='utf-8') as f:
43
+ data = json.load(f)
44
+ return data
45
+ except Exception as e:
46
+ print(f"Error parsing input file: {e}")
47
+ return {}
48
+
49
+ def generate_profile_from_input(input_data: Dict[str, Any]) -> Dict[str, Any]:
50
+ """
51
+ Generate a complete user persona from input data
52
+
53
+ Args:
54
+ input_data: Input data containing basic information and optional custom values
55
+
56
+ Returns:
57
+ Dict: Generated complete user persona
58
+ """
59
+ try:
60
+ # Extract basic information from input data
61
+ basic_info = input_data.get('basic_info', {})
62
+
63
+ # Extract custom values if provided
64
+ custom_values = input_data.get('custom_values', {})
65
+
66
+ # Use provided basic information or generate new basic information
67
+ age = basic_info.get('age')
68
+ if not age:
69
+ age_info = generate_age_info()
70
+ age = age_info['age']
71
+
72
+ gender = basic_info.get('gender')
73
+ if not gender:
74
+ gender = generate_gender()
75
+
76
+ occupation_info = basic_info.get('occupation', {})
77
+ occupation = occupation_info.get('status')
78
+ if not occupation:
79
+ career_info = generate_career_info(age)
80
+ occupation = career_info['status']
81
+
82
+ location_info = basic_info.get('location', {})
83
+ if not location_info or not location_info.get('city'):
84
+ location_info = generate_location()
85
+
86
+ # Use custom personal values if provided, otherwise generate them
87
+ custom_personal_values = custom_values.get('personal_values')
88
+ if custom_personal_values and custom_personal_values.strip():
89
+ print("Using provided personal values...")
90
+ values_orientation = custom_personal_values.strip()
91
+ else:
92
+ print("Generating personal values...")
93
+ values_orientation = generate_personal_values(age, gender, occupation, location_info)
94
+
95
+ # Use custom life attitude if provided, otherwise generate it
96
+ custom_life_attitude = custom_values.get('life_attitude')
97
+ if custom_life_attitude and custom_life_attitude.strip():
98
+ print("Using provided life attitude...")
99
+ life_attitude = {
100
+ "outlook": custom_life_attitude.strip(),
101
+ "coping_mechanism": "Custom life attitude provided by user"
102
+ }
103
+ else:
104
+ print("Generating life attitude...")
105
+ life_attitude = generate_life_attitude(age, gender, occupation, location_info, values_orientation)
106
+
107
+ # Generate personal story
108
+ print("Generating personal story...")
109
+ personal_story = generate_personal_story(age, gender, occupation, location_info, values_orientation, life_attitude)
110
+
111
+ # Generate interests and hobbies
112
+ print("Generating interests and hobbies...")
113
+ interests_and_hobbies = generate_interests_and_hobbies(personal_story)
114
+
115
+ # Build complete user persona
116
+ profile = {
117
+ "basic_info": {
118
+ "age": age,
119
+ "gender": gender,
120
+ "occupation": {"status": occupation},
121
+ "location": location_info
122
+ },
123
+ "values_orientation": values_orientation,
124
+ "life_attitude": life_attitude,
125
+ "personal_story": personal_story,
126
+ "interests_and_hobbies": interests_and_hobbies
127
+ }
128
+
129
+ # Select attributes
130
+ print("Selecting attributes...")
131
+ # Use the get_selected_attributes function from select_attributes.py
132
+ selected_paths = get_selected_attributes(profile)
133
+ profile["selected_attributes"] = selected_paths
134
+
135
+ # Save the selected attributes to output files
136
+ print("Saving selected attributes...")
137
+ save_results(profile, selected_paths)
138
+
139
+ # Generate final summary
140
+ print("Generating final summary...")
141
+ summary = generate_final_summary(profile)
142
+ profile["Summary"] = summary
143
+
144
+ return profile
145
+ except Exception as e:
146
+ print(f"Error generating user persona: {e}")
147
+ return {}
148
+
149
+ def main():
150
+ """Main function to process command line arguments and execute generation workflow"""
151
+ parser = argparse.ArgumentParser(description="Generate user persona from input data")
152
+ parser.add_argument('--input', type=str, required=True, help="Path to input JSON file")
153
+ args = parser.parse_args()
154
+
155
+ # Parse input data
156
+ input_data = parse_input_data(args.input)
157
+ if not input_data:
158
+ print("Unable to parse input data, exiting")
159
+ sys.exit(1)
160
+
161
+ # Generate user persona
162
+ profile = generate_profile_from_input(input_data)
163
+ if not profile:
164
+ print("Failed to generate user persona, exiting")
165
+ sys.exit(1)
166
+
167
+ # Output results
168
+ if "Summary" in profile:
169
+ print("\n" + "="*50)
170
+ print("Generated User Persona Summary:")
171
+ print("="*50)
172
+ print(profile["Summary"])
173
+ print("="*50)
174
+
175
+ # Output the profile as JSON to stdout for the Next.js API to capture
176
+ # Clean the summary for JSON output
177
+ if "Summary" in profile:
178
+ cleaned_summary = profile["Summary"].replace("`", "")
179
+ cleaned_summary = cleaned_summary.replace('"', "'")
180
+ profile["Summary"] = cleaned_summary
181
+
182
+ # Format for API output - clean newlines for JSON compatibility
183
+ if "Summary" in profile:
184
+ profile["Summary"] = profile["Summary"].replace('\n', " ")
185
+ print(f'\n{{"summary": "{profile["Summary"]}"}}\n')
186
+ else:
187
+ print("Failed to generate summary")
188
+ sys.exit(1)
189
+
190
+ # Output the full profile as JSON
191
+ print(json.dumps(profile, ensure_ascii=False))
192
+
193
+ if __name__ == "__main__":
194
+ main()
generation_user_profile/data/100.json ADDED
@@ -0,0 +1,395 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Career and Work Identity": {
3
+ "Business": {
4
+ "Strategies": {}
5
+ },
6
+ "Client": {
7
+ "UserPreferences": {},
8
+ "UserProfileAttributes": {}
9
+ },
10
+ "Company": {
11
+ "Industry": {},
12
+ "RevenueMetrics": {},
13
+ "Type": {}
14
+ },
15
+ "CompanyCulture": {
16
+ "Type": {}
17
+ },
18
+ "Experience": {
19
+ "Attributes": {},
20
+ "Salesforce": {}
21
+ },
22
+ "Goals": {
23
+ "FinancialAttributes": {},
24
+ "GoalsAndAspirations": {}
25
+ },
26
+ "Industry": {
27
+ "Expertise": {},
28
+ "TechProficiency": {}
29
+ },
30
+ "JobRole": {
31
+ "LocationPreferences": {},
32
+ "Responsibilities": {}
33
+ },
34
+ "Occupation": {
35
+ "Service": {}
36
+ },
37
+ "Organization": {
38
+ "Category": {},
39
+ "Guidelines": {},
40
+ "Preferences": {}
41
+ },
42
+ "PersonalGoals": {
43
+ "Goals": {},
44
+ "Meetings": {}
45
+ },
46
+ "PreviousExperience": {
47
+ "UserLevel": {}
48
+ },
49
+ "Profession": {
50
+ "PersonalBackgroundAttributes": {},
51
+ "ProfessionalAttributes": {},
52
+ "UserProfileAttributes": {}
53
+ },
54
+ "ProfessionalField": {
55
+ "Experience": {},
56
+ "Industry": {},
57
+ "Role": {}
58
+ },
59
+ "Role": {
60
+ "Background": {},
61
+ "CommunicationStyle": {},
62
+ "Contract": {},
63
+ "Industry": {},
64
+ "positionTitle": {}
65
+ },
66
+ "Skills": {
67
+ "TechnicalAttributes": {},
68
+ "UserProfileAttributes": {}
69
+ },
70
+ "Team": {
71
+ "dynamics": {}
72
+ },
73
+ "Technology": {
74
+ "Type": {}
75
+ },
76
+ "User": {
77
+ "BusinessContext": {},
78
+ "CampaignAttributes": {},
79
+ "UserAttributes": {}
80
+ },
81
+ "WorkEnvironment": {
82
+ "ContentOrganization": {},
83
+ "UserPreferences": {}
84
+ }
85
+ },
86
+ "Core Values, Beliefs, and Philosophy": {
87
+ "Personal": {
88
+ "ForgivenessLevel": {},
89
+ "PersonalAttributes": {}
90
+ },
91
+ "Philosophical Beliefs": {
92
+ "AnimalConsumption": {}
93
+ },
94
+ "PoliticalIdeology": {
95
+ "Views": {}
96
+ },
97
+ "Spirituality": {
98
+ "Personal Development": {}
99
+ },
100
+ "Sustainability": {
101
+ "Attachment": {}
102
+ }
103
+ },
104
+ "Cultural and Social Context": {
105
+ "Attitudes": {
106
+ "TowardsDrugs": {}
107
+ },
108
+ "Audience": {
109
+ "InvestorType": {}
110
+ },
111
+ "Communication": {
112
+ "Style": {}
113
+ },
114
+ "Community": {
115
+ "UserCharacteristics": {}
116
+ },
117
+ "CompanyCulture": {
118
+ "Culture": {}
119
+ },
120
+ "Culture": {
121
+ "PersonalAttributes": {},
122
+ "PersonalInterests": {}
123
+ },
124
+ "DataProcessing": {
125
+ "Nature": {}
126
+ },
127
+ "Exposure": {
128
+ "HistoricalTopics": {}
129
+ },
130
+ "Family": {
131
+ "size": {}
132
+ },
133
+ "Historical": {
134
+ "Background": {}
135
+ },
136
+ "Knowledge": {
137
+ "AboutRefugeeIssues": {}
138
+ },
139
+ "Leadership": {
140
+ "Style": {}
141
+ },
142
+ "LocalEvents": {
143
+ "Attendance": {}
144
+ },
145
+ "LocalLaws": {
146
+ "RhodeIsland": {}
147
+ },
148
+ "Political": {
149
+ "Views": {}
150
+ },
151
+ "Preferences": {
152
+ "ChildrenPreferences": {},
153
+ "PersonalPreferences": {}
154
+ },
155
+ "Priorities": {
156
+ "TravelGoals": {}
157
+ },
158
+ "Region": {
159
+ "Residence": {}
160
+ },
161
+ "School": {
162
+ "Environment": {}
163
+ },
164
+ "SocialActivities": {
165
+ "NightlifeExperience": {}
166
+ },
167
+ "SocialStigma": {
168
+ "Menstruation": {}
169
+ },
170
+ "SubstanceUse": {
171
+ "DrugAwareness": {}
172
+ },
173
+ "SupportSystems": {
174
+ "Availability": {}
175
+ }
176
+ },
177
+ "Demographic Information": {
178
+ "Demographics": {
179
+ "Age": {},
180
+ "CurrentLocation": {},
181
+ "Education": {},
182
+ "General": {},
183
+ "Identity": {},
184
+ "Origin": {},
185
+ "Region": {},
186
+ "TargetAudience": {}
187
+ },
188
+ "Family": {
189
+ "FamilyDynamics": {},
190
+ "PersonalAttributes": {},
191
+ "PersonalDemographics": {}
192
+ },
193
+ "Lifestyle": {
194
+ "budget": {}
195
+ },
196
+ "Professional": {
197
+ "Demographic": {},
198
+ "Professional Background": {}
199
+ },
200
+ "Socioeconomic": {
201
+ "UserProfile": {}
202
+ }
203
+ },
204
+ "Education and Learning": {
205
+ "AcademicProfile": {
206
+ "EducationLevel": {},
207
+ "EducationalBackground": {}
208
+ },
209
+ "EducationalInstitution": {
210
+ "Name": {}
211
+ },
212
+ "KnowledgeFamiliarity": {
213
+ "DifficultyLevel": {},
214
+ "MedicalTerminology": {}
215
+ },
216
+ "LearningPlatform": {
217
+ "Focus": {}
218
+ },
219
+ "PersonalAttributes": {
220
+ "FitnessPreferences": {},
221
+ "UserPreferences": {}
222
+ },
223
+ "PersonalExperience": {
224
+ "WorkingWithRefugees": {}
225
+ },
226
+ "SubjectExpertise": {
227
+ "FocusArea": {}
228
+ },
229
+ "SubjectInterest": {
230
+ "User_Personalization": {}
231
+ },
232
+ "UnderstandingLevel": {
233
+ "Achievement": {},
234
+ "Creative_Education": {},
235
+ "Science_Education": {},
236
+ "Status": {}
237
+ }
238
+ },
239
+ "Emotional and Relational Skills": {
240
+ "Emotional Attributes": {
241
+ "EmotionalSupportNeeds": {}
242
+ },
243
+ "Environmental Attributes": {
244
+ "emotionalConnection": {}
245
+ },
246
+ "Personal Attributes": {
247
+ "Beliefs": {},
248
+ "Preferences": {}
249
+ },
250
+ "Work Attributes": {
251
+ "Drivers": {}
252
+ }
253
+ },
254
+ "Hobbies, Interests, and Lifestyle": {
255
+ "Education": {
256
+ "Interests": {}
257
+ },
258
+ "FoodPreferences": {
259
+ "Dietary Preference": {},
260
+ "Food Preference": {}
261
+ },
262
+ "Hobbies": {
263
+ "design": {},
264
+ "types": {}
265
+ },
266
+ "Interests": {
267
+ "ConsumerPreferences": {},
268
+ "CulturalInterest": {},
269
+ "UserPreferences": {}
270
+ },
271
+ "LifestylePreferences": {
272
+ "UserAttributes": {}
273
+ },
274
+ "Professional": {
275
+ "Interests": {}
276
+ },
277
+ "WorkRelatedInterests": {
278
+ "FinancialManagement": {},
279
+ "InvestmentPreferences": {}
280
+ },
281
+ "contentType": {
282
+ "AdCampaigns": {}
283
+ }
284
+ },
285
+ "Lifestyle and Daily Routine": {
286
+ "Dietary Preferences": {
287
+ "DailyContext": {},
288
+ "FamilyContext": {},
289
+ "HealthConsiderations": {},
290
+ "Preferences": {}
291
+ },
292
+ "Living Conditions": {
293
+ "BuyingIntention": {}
294
+ },
295
+ "Personal Lifestyle": {
296
+ "Preferences": {}
297
+ }
298
+ },
299
+ "Media Consumption and Engagement": {
300
+ "PersonalizationAttributes": {
301
+ "UserPreferences": {}
302
+ }
303
+ },
304
+ "Physical and Health Characteristics": {
305
+ "EnvironmentalFactors": {
306
+ "SoilType": {}
307
+ },
308
+ "GeneticHistory": {
309
+ "GeneticDisorders": {}
310
+ },
311
+ "HealthObjectives": {
312
+ "CardiovascularWellness": {}
313
+ },
314
+ "MedicalHistory": {
315
+ "General": {}
316
+ },
317
+ "PersonalHealthAttributes": {
318
+ "DietaryPreferences": {},
319
+ "General": {},
320
+ "HealthConditions": {}
321
+ }
322
+ },
323
+ "Psychological and Cognitive Aspects": {
324
+ "BehavioralAttributes": {
325
+ "AlcoholConsumptionHistory": {}
326
+ },
327
+ "CognitiveAttributes": {
328
+ "CognitiveAttributes": {},
329
+ "DevelopmentalAttributes": {},
330
+ "EmotionalAttributes": {},
331
+ "PreferenceAttributes": {}
332
+ },
333
+ "CopingMechanisms": {
334
+ "PersonalHistory": {}
335
+ },
336
+ "EmotionalAttributes": {
337
+ "PersonalAttributes": {},
338
+ "PsychologicalFactors": {}
339
+ },
340
+ "MentalAttributes": {
341
+ "CognitiveAttributes": {},
342
+ "UserPreferences": {}
343
+ },
344
+ "Past": {
345
+ "IndividualCharacteristics": {}
346
+ },
347
+ "PersonalityAttributes": {
348
+ "Style": {}
349
+ },
350
+ "User": {
351
+ "EmotionalState": {}
352
+ }
353
+ },
354
+ "Relationships and Social Networks": {
355
+ "CustomerRelations": {
356
+ "UserEngagement": {},
357
+ "UserProfile": {}
358
+ },
359
+ "FamilyRelations": {
360
+ "CurrentLocation": {},
361
+ "CurrentState": {},
362
+ "FamilyDynamics": {},
363
+ "FamilyMaritalStatus": {},
364
+ "RelationshipDetails": {}
365
+ },
366
+ "PersonalPreferences": {
367
+ "Companions": {}
368
+ },
369
+ "PersonalRelationships": {
370
+ "Availability": {},
371
+ "Context": {},
372
+ "SocialConnections": {},
373
+ "SocialInfluence": {},
374
+ "UniversityAffiliation": {}
375
+ },
376
+ "ProfessionalRelations": {
377
+ "PersonalAttributes": {}
378
+ },
379
+ "ProfessionalRelationships": {
380
+ "Colleagues": {},
381
+ "Connections": {},
382
+ "Duration": {},
383
+ "HeadOfSalesRelationship": {},
384
+ "Interests": {},
385
+ "Preferences": {},
386
+ "Relationship": {},
387
+ "RelationshipQuality": {},
388
+ "Role": {},
389
+ "ZichengExperience": {}
390
+ },
391
+ "UserAttributes": {
392
+ "FatherRelationship": {}
393
+ }
394
+ }
395
+ }
generation_user_profile/data/attribute_embeddings.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:664f3d1f49a5a3162108da60e4340411f01fdf58a38419387ddb1cdd0ee61481
3
+ size 28364886
generation_user_profile/data/attributes_merged.json ADDED
The diff for this file is too large to render. See raw diff
 
generation_user_profile/data/large_attributes.json ADDED
The diff for this file is too large to render. See raw diff
 
generation_user_profile/data/occupations_english.json ADDED
@@ -0,0 +1,933 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ "HR Specialist/Assistant ",
3
+ "HR Information System (HRIS) Management ",
4
+ "HR Director ",
5
+ "HR Manager/Supervisor ",
6
+ "Other HR Administration ",
7
+ "Human Resources Director ",
8
+ "Party, Labor Union, and Youth League Officer ",
9
+ "Internal Staff ",
10
+ "Front Desk/Switchboard/Receptionist ",
11
+ "Logistics ",
12
+ "Librarian ",
13
+ "Training Specialist/Assistant ",
14
+ "Training Manager/Supervisor ",
15
+ "Recruitment Specialist/Assistant ",
16
+ "Recruitment Manager/Supervisor ",
17
+ "Clerk ",
18
+ "Document/Data Management ",
19
+ "Headhunter Consultant ",
20
+ "Computer Operator/Typist/Data Entry Clerk ",
21
+ "Manager Assistant/Secretary ",
22
+ "Compensation/Performance/Employee Relations ",
23
+ "Administrative Specialist/Assistant ",
24
+ "Administrative Director ",
25
+ "Administrative Manager/Supervisor ",
26
+ "Other Health and Massage ",
27
+ "Masseur/Masseuse ",
28
+ "Bath Attendant ",
29
+ "Foot Reflexologist ",
30
+ "Acupuncture and Tui Na ",
31
+ "Insurance Product Development ",
32
+ "Other Insurance Positions ",
33
+ "Insurance Internal Staff ",
34
+ "Insurance Trainer ",
35
+ "Insurance Contract Management ",
36
+ "Insurance Client Manager ",
37
+ "Insurance Customer Service ",
38
+ "Insurance Underwriting/Claims ",
39
+ "Insurance Telemarketing ",
40
+ "Insurance Actuary ",
41
+ "Insurance Broker ",
42
+ "Insurance Project Manager ",
43
+ "Insurance Consultant ",
44
+ "Reserve Manager ",
45
+ "Automobile Damage Assessment/Auto Insurance Claims ",
46
+ "Renewal Management ",
47
+ "Auto Insurance Specialist ",
48
+ "Other Positions ",
49
+ "Breeding Staff ",
50
+ "Breeding Department Supervisor ",
51
+ "Other Agriculture, Forestry, Animal Husbandry, and Fishery",
52
+ "Agronomist/Floral Designer ",
53
+ "Animal Breeding/Farming ",
54
+ "Animal Nutrition/Feed Research and Development ",
55
+ "Farm Manager ",
56
+ "Forestry Technician ",
57
+ "Livestock Specialist ",
58
+ "Feed Business ",
59
+ "Feed Sales ",
60
+ "Clinical Promotion Manager ",
61
+ "Clinical Data Analyst ",
62
+ "Clinical Research/Coordination ",
63
+ "Other in Pharmaceutical Biology ",
64
+ "Chemical Analysis Tester ",
65
+ "Medical Device Promotion ",
66
+ "Medical Device Registration ",
67
+ "Medical Device Production/Quality Management ",
68
+ "Medical Device Research and Development ",
69
+ "Medical Device Research and Development/Maintenance ",
70
+ "Pharmaceutical Chemical Analysis ",
71
+ "Pharmaceutical Academic Promotion ",
72
+ "Pharmaceutical Technology Research and Development Personnel ",
73
+ "Pharmaceutical Technology Research and Development Management Personnel ",
74
+ "Pharmaceutical Investment Promotion ",
75
+ "Pharmaceutical Research and Development/Production/Registration ",
76
+ "Pharmaceutical Sales Manager/Supervisor ",
77
+ "Pharmaceutical Project Bidding Management ",
78
+ "Pharmaceutical Project Management ",
79
+ "Bioengineering/Biopharmaceuticals ",
80
+ "Pharmaceutical Marketing Specialist/Assistant ",
81
+ "Pharmaceutical Marketing Manager/Supervisor ",
82
+ "Traditional Chinese Medicine Doctor ",
83
+ "Obstetrician ",
84
+ "Health Doctor ",
85
+ "Public Health/Disease Control ",
86
+ "Laboratory/Testing Physician ",
87
+ "Medical Laboratory/Testing ",
88
+ "Medical Imaging/Radiology Physician ",
89
+ "Doctor ",
90
+ "Medical Management ",
91
+ "Pharmaceutical Quality Inspection ",
92
+ "Other in Hospital Nursing ",
93
+ "Pet Care/Veterinarian ",
94
+ "Medical Guide ",
95
+ "Psychologist ",
96
+ "Nurse/Nursing ",
97
+ "Head Nurse/Nursing Director ",
98
+ "Dentist ",
99
+ "Physiotherapist ",
100
+ "General Outpatient/General Practitioner ",
101
+ "Cosmetic Surgeon",
102
+ "Pharmacist ",
103
+ "Nutritionist ",
104
+ "Acupuncturist/Masseur ",
105
+ "Optometrist ",
106
+ "Anesthetist ",
107
+ "Chauffeur ",
108
+ "Other Transportation Roles ",
109
+ "Designated Driver ",
110
+ "Bus/Subway Attendant ",
111
+ "Taxi Driver ",
112
+ "Train Attendant ",
113
+ "Train Driver/Operator ",
114
+ "Executive Driver ",
115
+ "Ground Staff ",
116
+ "Security Screener ",
117
+ "Passenger Driver ",
118
+ "Special Vehicle Driver ",
119
+ "Shuttle Bus Driver ",
120
+ "Flight Attendant ",
121
+ "Crew Member/Sailor ",
122
+ "Ship Attendant ",
123
+ "Ship Driver/Operator ",
124
+ "Freight Driver ",
125
+ "Aircraft Pilot/Operator ",
126
+ "Driving School Instructor/Coach ",
127
+ "VIP Specialist ",
128
+ "Pre-sales/Post-sales Technical Support Engineer ",
129
+ "Pre-sales/Post-sales Technical Support Management ",
130
+ "Pre-sales/Post-sales Service ",
131
+ "Customer Relationship Management ",
132
+ "Customer Service Hotline/Call Center Staff ",
133
+ "Customer Service Specialist/Assistant ",
134
+ "Other Customer Service Roles ",
135
+ "Customer Service Director ",
136
+ "Customer Service Manager/Supervisor ",
137
+ "Complaint Specialist ",
138
+ "Telephone Customer Service ",
139
+ "Online Customer Service ",
140
+ "Nanny ",
141
+ "Security Guard ",
142
+ "Cleaner ",
143
+ "Wedding/Celebration Planning Services ",
144
+ "Pet Care and Grooming ",
145
+ "Other Household Cleaning Services ",
146
+ "Home Appliance Repair ",
147
+ "Caregiver ",
148
+ "Maternity Matron ",
149
+ "Laundry Worker ",
150
+ "Infant Caregiver/Nursery Teacher ",
151
+ "Water Delivery Worker",
152
+ "Hourly Worker ",
153
+ "Business Development Specialist/Assistant ",
154
+ "Planning Manager/Supervisor ",
155
+ "Conference and Exhibition Specialist/Manager ",
156
+ "Promotion Supervisor/Director/Promoter ",
157
+ "Promotion Manager ",
158
+ "Public Relations Specialist/Assistant ",
159
+ "Public Relations Director ",
160
+ "Public Relations Manager/Supervisor ",
161
+ "Brand Specialist/Manager ",
162
+ "Media Specialist/Assistant ",
163
+ "Media Manager/Supervisor ",
164
+ "Media Sales ",
165
+ "Academic Promotion ",
166
+ "Marketing Specialist/Assistant ",
167
+ "Marketing Supervisor ",
168
+ "Other Marketing and Public Relations ",
169
+ "Market Expansion ",
170
+ "Market Planning ",
171
+ "Marketing Manager/Director ",
172
+ "Marketing ",
173
+ "Market Research ",
174
+ "Market Research and Analysis ",
175
+ "Channel Marketing Specialist ",
176
+ "Government Affairs Management ",
177
+ "Event Execution ",
178
+ "Event Planning ",
179
+ "Site Selection and Expansion/New Store Development ",
180
+ "Professional Consultant ",
181
+ "Corporate/Business Development Manager ",
182
+ "Corporate Planning ",
183
+ "Conference Specialist/Assistant ",
184
+ "Conference Manager/Supervisor ",
185
+ "Exhibition Planning/Design ",
186
+ "Creative Director ",
187
+ "Production Execution ",
188
+ "Consulting Director ",
189
+ "Consulting Manager/Supervisor ",
190
+ "Consultant ",
191
+ "Wedding Planner ",
192
+ "Media Planning/Management ",
193
+ "Client Supervisor/Specialist ",
194
+ "Advertising/Exhibition Business Development ",
195
+ "Advertising/Exhibition Project Management ",
196
+ "Advertising Creativity ",
197
+ "Other Advertising Consulting ",
198
+ "Advertising Account Director/Manager ",
199
+ "Advertising Copywriter ",
200
+ "Advertising Design ",
201
+ "Intelligence and Information Analysis",
202
+ "Immigration/Study Abroad Consultant ",
203
+ "Landscape/Scenic Designer ",
204
+ "Civil Engineering Surveyor ",
205
+ "Civil/Structural Engineer ",
206
+ "Urban Planning and Design ",
207
+ "Safety Management/Safety Officer ",
208
+ "Security Engineer ",
209
+ "Interior Decoration Designer ",
210
+ "Geotechnical Engineer ",
211
+ "Engineering Director ",
212
+ "Engineering Supervisor ",
213
+ "Engineering Equipment Management ",
214
+ "Engineering Documentation Management ",
215
+ "Engineering Project Management ",
216
+ "Municipal Engineer ",
217
+ "Curtain Wall Engineer ",
218
+ "Other Architecture Roles ",
219
+ "Architectural Drafting ",
220
+ "Construction Safety Management ",
221
+ "Architectural Engineer/Chief Engineer ",
222
+ "Construction Acceptance ",
223
+ "Construction Site Management ",
224
+ "Architectural Designer/Drafter ",
225
+ "Development and Reporting ",
226
+ "Construction Worker ",
227
+ "Construction Team Leader ",
228
+ "Line and Pipeline Engineering Technician ",
229
+ "Building Automation ",
230
+ "Cabinet Designer ",
231
+ "Water Conservancy/Port Engineering Technician ",
232
+ "Surveying/Mapping ",
233
+ "Blasting Engineer ",
234
+ "Hard Decoration Designer ",
235
+ "Water Supply and Drainage/Refrigeration/HVAC ",
236
+ "Structured Cabling/Weak Current ",
237
+ "Documentation Specialist ",
238
+ "Soft Decoration Designer ",
239
+ "Cost Estimator/Budget Analyst ",
240
+ "Road and Bridge Technician ",
241
+ "Host/Presenter ",
242
+ "Other Entertainment Roles ",
243
+ "Entertainment Hall Attendant ",
244
+ "Entertainment Marketing Planner ",
245
+ "Film/Video Post-Production ",
246
+ "Film Producer ",
247
+ "Executive Producer ",
248
+ "Executive Agent ",
249
+ "Photographer/Cameraman ",
250
+ "Projectionist ",
251
+ "Lighting Technician",
252
+ "Film Marketing Manager ",
253
+ "Short Video Editor ",
254
+ "Short Video Planner ",
255
+ "Short Video Director ",
256
+ "Short Video Operations ",
257
+ "Protocol/Reception ",
258
+ "Signed Artist ",
259
+ "Agent Assistant ",
260
+ "Coordinating Producer ",
261
+ "Artist Assistant ",
262
+ "Artist Agent ",
263
+ "Artist Coordinator ",
264
+ "Program Director ",
265
+ "Program Director and Planner ",
266
+ "Video Editing Specialist ",
267
+ "Video Editing Assistant ",
268
+ "Video Editor ",
269
+ "Bartender ",
270
+ "Voice Actor ",
271
+ "Bar Waitstaff ",
272
+ "Sound Engineer ",
273
+ "Other Real Estate Positions ",
274
+ "Real Estate Internal Staff ",
275
+ "Real Estate Customer Service ",
276
+ "Real Estate Clerk/Assistant ",
277
+ "Real Estate Store Manager ",
278
+ "Real Estate Development/Planning ",
279
+ "Real Estate Agent ",
280
+ "Real Estate Appraiser ",
281
+ "Real Estate Brokerage/Transactions ",
282
+ "Real Estate Investment Analyst ",
283
+ "Real Estate Asset Management ",
284
+ "Real Estate Sales Supervisor ",
285
+ "Real Estate Sales Manager ",
286
+ "Real Estate Project Development and Reporting ",
287
+ "Real Estate Project Bidding ",
288
+ "Real Estate Project Planning Specialist/Assistant ",
289
+ "Real Estate Project Planning Manager/Supervisor ",
290
+ "Real Estate Project Management ",
291
+ "Real Estate Project Support Engineer ",
292
+ "Inspector ",
293
+ "Property Consultant ",
294
+ "Physical Education Teacher/Coach ",
295
+ "Part-time Teacher ",
296
+ "Middle School Teacher ",
297
+ "Training Assistant ",
298
+ "Trainer/Instructor ",
299
+ "Training Supervisor ",
300
+ "Training Planner ",
301
+ "Foreign Teacher",
302
+ "Foreign Language Teacher ",
303
+ "University Lecturer ",
304
+ "Academic Research/Scientific Research ",
305
+ "Tutor ",
306
+ "Primary School Teacher ",
307
+ "Preschool/Early Childhood Educator ",
308
+ "Admissions/Course Consultant ",
309
+ "Teaching/Academic Administration ",
310
+ "Teaching/Academic Administrative Staff ",
311
+ "Teacher/Teaching Assistant ",
312
+ "Educational Product Development ",
313
+ "Other Education and Training ",
314
+ "Liberal Arts Teacher ",
315
+ "Principal ",
316
+ "Science Teacher ",
317
+ "Postgraduate Entrance Exam/Civil Service Exam Trainer ",
318
+ "Vocational Technical Teacher ",
319
+ "Outdoor Adventure Trainer ",
320
+ "Music/Art Teacher ",
321
+ "High School Teacher ",
322
+ "Tour Guide ",
323
+ "Tourism Product/Itinerary Planner ",
324
+ "Other Tourism ",
325
+ "Travel Consultant ",
326
+ "Visa Specialist ",
327
+ "Tour Coordinator ",
328
+ "Ticketing Agent ",
329
+ "Handyman ",
330
+ "Cutter/Welder ",
331
+ "Refrigeration/Plumbing Technician ",
332
+ "Packager ",
333
+ "Printing Worker ",
334
+ "Pressing Worker ",
335
+ "Apprentice ",
336
+ "Mobile Phone Repair Technician ",
337
+ "Pressing Worker ",
338
+ "Operator ",
339
+ "General Worker ",
340
+ "Other General/Technical Worker ",
341
+ "Carpenter ",
342
+ "Dyer ",
343
+ "Sample Garment Worker ",
344
+ "Cement Worker ",
345
+ "Painter ",
346
+ "Tiler ",
347
+ "Power Line Worker ",
348
+ "Electrician ",
349
+ "Elevator Technician ",
350
+ "Electroplating Worker ",
351
+ "Grinding/Stamping Worker",
352
+ "Pipefitter ",
353
+ "Textile Worker ",
354
+ "Assembler ",
355
+ "General Maintenance Worker ",
356
+ "Sewing Worker ",
357
+ "Lathe/Milling Machine Operator ",
358
+ "Rebar Worker ",
359
+ "Sheet Metal Worker ",
360
+ "Fitter ",
361
+ "Forklift Operator ",
362
+ "Casting/Injection Molding/Mold Worker ",
363
+ "Boiler Operator ",
364
+ "Loom Operator ",
365
+ "Warping Operator ",
366
+ "Apparel/Textile/Leather Technologist ",
367
+ "Apparel/Textile/Leather Merchandiser ",
368
+ "Other Apparel/Textile ",
369
+ "Apparel/Textile/Leather Quality Management ",
370
+ "Apparel/Textile Design Director ",
371
+ "Apparel Pattern Maker ",
372
+ "Fashion Designer ",
373
+ "Pattern Room/Pattern Grader ",
374
+ "Sample Maker ",
375
+ "Sizing Operator ",
376
+ "Production Management ",
377
+ "Computer Grader ",
378
+ "Pattern Maker/Sample Maker ",
379
+ "Textile Designer ",
380
+ "Spinning Operator ",
381
+ "Cutter ",
382
+ "Fabric/Accessory Development/Purchasing ",
383
+ "Footwear Designer ",
384
+ "Food/Beverage R&D/Inspection ",
385
+ "Food Production Worker ",
386
+ "CNC/Numerical Control Engineer ",
387
+ "Instrument/Measurement Engineer ",
388
+ "Train Maintenance/Servicing ",
389
+ "Train Design and Manufacturing ",
390
+ "Other Machinery/Instrument ",
391
+ "Mechanical Engineer ",
392
+ "Mechanical Maintenance/Servicing ",
393
+ "Electromechanical Engineer ",
394
+ "Pneumatic Engineer ",
395
+ "Test/Reliability Engineer ",
396
+ "Layout Design Engineer ",
397
+ "R&D Engineer ",
398
+ "Ship Maintenance/Servicing ",
399
+ "Ship Design and Manufacturing ",
400
+ "Assembly Technician ",
401
+ "Aircraft Maintenance/Servicing",
402
+ "Aircraft Design and Manufacturing ",
403
+ "4S Store Management ",
404
+ "Used Car Appraiser ",
405
+ "Parking Attendant ",
406
+ "Gas Station Attendant ",
407
+ "Engine/Assembly Engineer ",
408
+ "Safety Performance Engineer ",
409
+ "Automobile/Motorcycle Repair ",
410
+ "Automobile Mechanic ",
411
+ "Other Automotive Positions ",
412
+ "Automotive Engineering Project Management ",
413
+ "Automotive Structural Engineer ",
414
+ "Automotive Mechanical Engineer ",
415
+ "Automotive Inspection/Testing ",
416
+ "Automotive Electronics Engineer ",
417
+ "Automotive Electrician ",
418
+ "Automobile Detailing ",
419
+ "Automotive Design Engineer ",
420
+ "Automotive Quality Management/Inspection and Testing ",
421
+ "Automotive Parts Designer ",
422
+ "Car Wash Attendant ",
423
+ "Claims Specialist/Consultant ",
424
+ "Assembly Process Engineer ",
425
+ "Tire Technician ",
426
+ "Parts Sales ",
427
+ "Intellectual Property/Patent Consultant ",
428
+ "Contract Management ",
429
+ "Compliance Management ",
430
+ "Lawyer/Legal Consultant ",
431
+ "Legal Assistant ",
432
+ "Legal Specialist/Supervisor ",
433
+ "Other Legal Positions ",
434
+ "Store Copywriter ",
435
+ "Event Planner ",
436
+ "Other Taobao Positions ",
437
+ "Taobao Customer Service ",
438
+ "Taobao Graphic Designer ",
439
+ "Online Store Manager ",
440
+ "Online Store Operations ",
441
+ "Contract Management ",
442
+ "Investment Promotion Manager/Supervisor ",
443
+ "Property Investment Promotion Management ",
444
+ "Property Leasing/Sales ",
445
+ "Property Management/Commercial Center ",
446
+ "Other Property Management Positions ",
447
+ "Property Manager/Supervisor ",
448
+ "Property Maintenance ",
449
+ "Surveillance Maintenance ",
450
+ "Warehouse Administrator ",
451
+ "Warehouse Manager/Supervisor",
452
+ "Supply Chain Management ",
453
+ "Sorter ",
454
+ "Documentation Specialist ",
455
+ "International Freight ",
456
+ "Courier ",
457
+ "Customs Affairs Management ",
458
+ "Material Management ",
459
+ "Logistics Specialist/Assistant ",
460
+ "Other Logistics and Warehousing ",
461
+ "Logistics Director ",
462
+ "Logistics Manager/Supervisor ",
463
+ "Loader/Handler ",
464
+ "Dispatcher ",
465
+ "Freight Forwarder ",
466
+ "Container Business ",
467
+ "EHS Management ",
468
+ "Solid Wastewater and Exhaust Gas Treatment ",
469
+ "Solid Waste Treatment Engineer ",
470
+ "Geological Survey ",
471
+ "Exhaust Gas Treatment Engineer ",
472
+ "Control and Protection R&D Engineer ",
473
+ "Nuclear/Coal Power Engineer ",
474
+ "Water Conservancy/Hydropower Engineer ",
475
+ "Water Treatment Engineer ",
476
+ "Water Quality Inspector ",
477
+ "Other Environmental Protection/Energy ",
478
+ "Environmental Engineer ",
479
+ "Environmental Technology ",
480
+ "Environmental Testing ",
481
+ "Environmental Engineering Technology ",
482
+ "Environmental Management/Protection ",
483
+ "Environmental Management/Park and Scenic Area Protection ",
484
+ "Environmental Greening ",
485
+ "Environmental Assessment Engineer ",
486
+ "Ecological Management/Planning ",
487
+ "Power Electronics R&D Engineer ",
488
+ "Power System R&D Engineer ",
489
+ "Petroleum and Natural Gas Technician ",
490
+ "HVAC/Thermal Energy Engineer ",
491
+ "Energy/Mineral Project Management ",
492
+ "Product Management ",
493
+ "Manufacturing Engineer ",
494
+ "Packaging Engineer ",
495
+ "Laboratory/Inspection ",
496
+ "Plant Manager/Deputy Plant Manager ",
497
+ "Industrial Engineer ",
498
+ "Process Design ",
499
+ "Chief Engineer/Deputy Chief Engineer ",
500
+ "Technical Engineer ",
501
+ "Technical Documentation Engineer",
502
+ "Materials Engineer ",
503
+ "Production Supervisor/Leader ",
504
+ "Production Director ",
505
+ "Production Clerk ",
506
+ "Production Material Control (PMC) ",
507
+ "Other Production R&D ",
508
+ "Production Planning ",
509
+ "Production Order Follow-up ",
510
+ "Production Operations Management ",
511
+ "Production Project Engineer ",
512
+ "Production Project Manager/Supervisor ",
513
+ "Electronic Technology R&D Engineer ",
514
+ "Structural Engineer ",
515
+ "Maintenance Engineer ",
516
+ "Operations Supervisor ",
517
+ "Operations Manager ",
518
+ "Equipment Supervisor ",
519
+ "Equipment Management and Maintenance ",
520
+ "Quality Management ",
521
+ "Workshop Director ",
522
+ "FAE Field Application Engineer ",
523
+ "IC Verification Engineer ",
524
+ "Product Process/Planning Engineer ",
525
+ "Photovoltaic System Engineer ",
526
+ "Light Source/Lighting Engineer ",
527
+ "Semiconductor Technology ",
528
+ "Transformer and Magnetoelectric Engineer ",
529
+ "Security System Engineer ",
530
+ "Home Appliance/Digital Product R&D ",
531
+ "Embedded Hardware Development ",
532
+ "Embedded Software Development ",
533
+ "Radio Engineer ",
534
+ "Analog Circuit Design/Application Engineer ",
535
+ "Test/Reliability Engineer ",
536
+ "Laser/Optoelectronics Technology ",
537
+ "Lighting/Illumination Design Engineer ",
538
+ "Electrical R&D Engineer ",
539
+ "Electroacoustic/Audio Engineer/Technician ",
540
+ "Electronic/Electrical Process/Manufacturing Engineer ",
541
+ "Electronic/Electrical Maintenance ",
542
+ "Electronic/Electrical Equipment Engineer ",
543
+ "Electronic/Electrical Project Management ",
544
+ "Other Electronic/Electrical ",
545
+ "Electronic/Electrical Engineer ",
546
+ "Electronic Component Engineer ",
547
+ "Electronic Software Development ",
548
+ "Electrical Circuit Design ",
549
+ "Battery/Power Development ",
550
+ "Circuit Engineer/Technician ",
551
+ "R&D Engineer",
552
+ "Air Conditioning Engineer/Designer ",
553
+ "Line Structure Designer ",
554
+ "Automation Engineer ",
555
+ "Integrated Circuit/Application Engineer ",
556
+ "Audio/Video Engineer ",
557
+ "Host/Emcee ",
558
+ "Lead Designer ",
559
+ "Writer/Screenwriter/Copywriter ",
560
+ "Publishing/Distribution ",
561
+ "Paper Cutting Machine Operator ",
562
+ "Printing Operator ",
563
+ "Printing Machine Operator ",
564
+ "Creasing Operator ",
565
+ "Distribution Management ",
566
+ "Rewinding Operator ",
567
+ "Data Entry/Proofreading ",
568
+ "Editor-in-Chief/Deputy Editor-in-Chief/Chief Editor ",
569
+ "Drafting Machine Operator ",
570
+ "Typesetting Design/Production ",
571
+ "Projection Management ",
572
+ "Digital Direct Printing/Film Output ",
573
+ "Copywriting and Planning ",
574
+ "Text Editor/Content Compilation ",
575
+ "Plate Maker ",
576
+ "Actor/Model ",
577
+ "Lighting Technician ",
578
+ "Hot Stamping Operator ",
579
+ "Color Separation Operator ",
580
+ "Agent/Talent Scout ",
581
+ "Editor/Copywriter ",
582
+ "Other Editorial Publishing ",
583
+ "Art Director/Stage Design ",
584
+ "Binding/Hot Stamping ",
585
+ "Binding Worker ",
586
+ "Lamination Worker ",
587
+ "Video Streamer ",
588
+ "Journalist/Reporter ",
589
+ "Ink Technician ",
590
+ "Colorist ",
591
+ "Broadcast Engineer ",
592
+ "Makeup Artist ",
593
+ "Hairstylist ",
594
+ "Pet Grooming/Care ",
595
+ "Image Designer ",
596
+ "Makeup Trainer ",
597
+ "Shampoo Assistant ",
598
+ "Body Therapist ",
599
+ "Hairdressing Assistant/Apprentice ",
600
+ "Beauty/Slimming Consultant ",
601
+ "Beauty Assistant/Apprentice",
602
+ "Beauty Consultant ",
603
+ "Beautician ",
604
+ "Beauty Salon Manager ",
605
+ "Cosmetic Surgeon ",
606
+ "Other Beauty and Hairdressing ",
607
+ "Nail Technician ",
608
+ "CAD Designer/Drafter ",
609
+ "3D Design/Production ",
610
+ "Product/Packaging Designer ",
611
+ "Concept Artist ",
612
+ "Landscape Architect ",
613
+ "Multimedia/Animation Designer ",
614
+ "Furniture/Homeware Designer ",
615
+ "Industrial Designer ",
616
+ "Craft/Jewelry Designer ",
617
+ "Graphic Designer ",
618
+ "Store/Display/Exhibition Designer ",
619
+ "Fashion Designer ",
620
+ "Game Interface Designer ",
621
+ "Special Effects Designer ",
622
+ "Toy Designer ",
623
+ "Other Art and Creative ",
624
+ "Art Director ",
625
+ "Art Editor/Designer ",
626
+ "Stage Art Designer ",
627
+ "Art/Design Director ",
628
+ "Interior Design ",
629
+ "Visual Designer ",
630
+ "Design Manager ",
631
+ "Russian Translator ",
632
+ "Minor Language Translator ",
633
+ "German Translator ",
634
+ "Italian Translator ",
635
+ "Japanese Translator ",
636
+ "French Translator ",
637
+ "Other Translators ",
638
+ "English Translator ",
639
+ "Portuguese Translator ",
640
+ "Spanish Translator ",
641
+ "Arabic Translator ",
642
+ "Korean Translator ",
643
+ "Android Developer ",
644
+ "C Language Developer ",
645
+ "ERP Technical/Development Application ",
646
+ "Flash Designer/Developer ",
647
+ "iOS Developer ",
648
+ "Java Developer ",
649
+ "PHP Developer ",
650
+ "SEO Specialist ",
651
+ "UI/UX Designer",
652
+ "Web Frontend Developer ",
653
+ "Other Internet Roles ",
654
+ "Product Director ",
655
+ "Product Manager/Specialist ",
656
+ "Simulation Application Engineer ",
657
+ "Implementation Engineer ",
658
+ "Embedded Hardware Developer ",
659
+ "Embedded Software Developer ",
660
+ "WeChat Promotion ",
661
+ "Mobile Software Development Engineer ",
662
+ "Technical Specialist/Assistant ",
663
+ "Technical Director/Manager ",
664
+ "Technical Support/Maintenance ",
665
+ "Database Development Engineer ",
666
+ "Database Administrator/DBA ",
667
+ "Data Communication Engineer ",
668
+ "New Media Operations ",
669
+ "Wireless Communication Engineer ",
670
+ "Wired Transmission Engineer ",
671
+ "Test Engineer ",
672
+ "Taobao/WeChat Operations Specialist/Supervisor ",
673
+ "Game Concept Artist ",
674
+ "Game Interface Designer ",
675
+ "Game Planner ",
676
+ "Game Design/Development ",
677
+ "Special Effects Designer ",
678
+ "Telecom Switching Engineer ",
679
+ "Telecom Network Engineer ",
680
+ "E-commerce ",
681
+ "E-commerce Director ",
682
+ "Hardware Engineer ",
683
+ "Mobile Internet Developer ",
684
+ "Mobile Communication Engineer ",
685
+ "Programmer ",
686
+ "Algorithm Engineer ",
687
+ "Systems Analyst ",
688
+ "System Architect ",
689
+ "System Integration Engineer ",
690
+ "Online Store Manager ",
691
+ "Online Store Administrator ",
692
+ "Website Architecture Designer ",
693
+ "Website Planner ",
694
+ "Website Editor ",
695
+ "Website Operations ",
696
+ "Website Operations Director/Manager ",
697
+ "Network and Information Security Engineer ",
698
+ "Online Promotion ",
699
+ "Network Administrator ",
700
+ "Network Operations Specialist/Assistant ",
701
+ "Network Operations Management",
702
+ "Web Designer/Developer ",
703
+ "Script Development Engineer ",
704
+ "Computer-Aided Designer ",
705
+ "Voice/Video/Graphics ",
706
+ "Quality Engineer ",
707
+ "Software Engineer ",
708
+ "Operations Supervisor/Specialist ",
709
+ "Operations Director ",
710
+ "Telecommunication Technology Engineer ",
711
+ "Telecommunication Power Engineer ",
712
+ "Requirements Analyst ",
713
+ "Project Manager/Supervisor ",
714
+ "Senior Hardware Engineer ",
715
+ "Accountant ",
716
+ "Accounting Manager/Supervisor ",
717
+ "Cashier ",
718
+ "Audit Specialist/Assistant ",
719
+ "Audit Manager/Supervisor ",
720
+ "Cost Administrator ",
721
+ "Tax Specialist/Assistant ",
722
+ "Tax Manager/Supervisor ",
723
+ "Statistician ",
724
+ "Finance/Accounting Assistant ",
725
+ "Other Finance Roles ",
726
+ "Financial Analyst ",
727
+ "Finance Director ",
728
+ "Finance Manager/Supervisor ",
729
+ "Financial Consultant ",
730
+ "Asset/Fund Management ",
731
+ "Chief Financial Officer (CFO) ",
732
+ "System Engineer ",
733
+ "Safety and Fire Protection ",
734
+ "Safety Management ",
735
+ "Fault Analysis Engineer ",
736
+ "Test Engineer ",
737
+ "Certification Engineer/Auditor ",
738
+ "Other Quality Inspection/Security Roles ",
739
+ "Quality Inspector/Tester ",
740
+ "Quality Management/Test Manager ",
741
+ "Business Order Manager ",
742
+ "Buyer ",
743
+ "Supplier Development ",
744
+ "Supply Chain Management ",
745
+ "Assistant Business Order Coordinator ",
746
+ "Business Specialist/Manager ",
747
+ "International Trade Supervisor/Specialist ",
748
+ "Foreign Trade Specialist/Assistant ",
749
+ "Foreign Trade Manager/Supervisor ",
750
+ "Customs Declarer ",
751
+ "Other Trade Roles",
752
+ "Trade Order Specialist ",
753
+ "Purchasing Assistant ",
754
+ "Purchaser ",
755
+ "Purchasing Manager/Director ",
756
+ "Senior Sales Order Specialist ",
757
+ "Promoter/Sales Guide ",
758
+ "Category Management ",
759
+ "Luxury Goods Business ",
760
+ "Store Clerk/Sales Associate ",
761
+ "Store Manager/Retail Manager ",
762
+ "Investment Promotion Manager/Supervisor ",
763
+ "Cashier ",
764
+ "Stock Clerk/Merchandiser ",
765
+ "Supervisor ",
766
+ "Supermarket/Retail Other ",
767
+ "Loss Prevention Officer/Internal Security ",
768
+ "Food Processing/Handling ",
769
+ "Fitness Coach ",
770
+ "Billiards Coach ",
771
+ "Swimming Coach ",
772
+ "Yoga Instructor ",
773
+ "Dance Teacher ",
774
+ "Sports and Fitness Other ",
775
+ "Golf Assistant ",
776
+ "Duty Manager ",
777
+ "Public Area Manager ",
778
+ "Front Office Staff ",
779
+ "Front Office Manager ",
780
+ "Receptionist ",
781
+ "Front Desk Supervisor ",
782
+ "Assistant Lobby Manager ",
783
+ "Room Attendant ",
784
+ "Housekeeping Manager ",
785
+ "Guest Relations Officer ",
786
+ "Switchboard Operator ",
787
+ "Switchboard Manager ",
788
+ "General Manager ",
789
+ "Assistant to General Manager ",
790
+ "Director of Rooms ",
791
+ "Lifeguard ",
792
+ "Floor Manager ",
793
+ "Laundry Manager ",
794
+ "Concierge Manager ",
795
+ "Hotel Other ",
796
+ "Hotel Store Manager ",
797
+ "Reservation Agent ",
798
+ "Reservation Manager ",
799
+ "Personal Banking ",
800
+ "Personal Banking Department Manager/Supervisor ",
801
+ "Credit Review",
802
+ "Credit Card/Bank Card Business ",
803
+ "Credit Card Sales ",
804
+ "Credit Management/Credit Assessment ",
805
+ "Credit Management/Credit Assessment/Analysis ",
806
+ "Corporate Business ",
807
+ "Corporate Business Department Manager/Supervisor ",
808
+ "Fund Project Manager ",
809
+ "Foreign Exchange/Fund/Government Bond Manager ",
810
+ "Foreign Exchange Trading ",
811
+ "Investment/Financial Management Services ",
812
+ "Investment/Financial Advisor ",
813
+ "Investment Manager ",
814
+ "Investment Banking ",
815
+ "Investment Banking Financial Analysis ",
816
+ "Guarantee/Auction/Pawn ",
817
+ "Auctioneer ",
818
+ "Clearing Staff ",
819
+ "General Business Specialist/Assistant ",
820
+ "Stock/Futures Trader ",
821
+ "Stock Trader ",
822
+ "Financing Specialist ",
823
+ "Director of Financing ",
824
+ "Financing Manager/Director ",
825
+ "Securities/Investment Client Supervisor ",
826
+ "Securities/Investment Client Director ",
827
+ "Securities/Investment Client Manager ",
828
+ "Securities/Futures/Forex Broker ",
829
+ "Securities Analysis/Financial Research ",
830
+ "Securities Manager/Director ",
831
+ "Asset Valuation ",
832
+ "Import/Export/Letter of Credit Settlement ",
833
+ "Financial/Economic Researcher ",
834
+ "Financial Product Manager ",
835
+ "Financial Product Sales ",
836
+ "Other Financial Investments ",
837
+ "Financial Services Manager ",
838
+ "Financial Leasing ",
839
+ "Bank Accountant/Teller ",
840
+ "Bank Manager/Director ",
841
+ "Risk Management/Control ",
842
+ "Senior Account Manager/Account Manager ",
843
+ "Business Analysis Manager/Supervisor/Specialist ",
844
+ "Business Development Manager/Supervisor ",
845
+ "Membership Consultant ",
846
+ "Regional Sales ",
847
+ "Regional Sales Director ",
848
+ "Regional Sales Manager/Supervisor ",
849
+ "Medical Device Sales ",
850
+ "Pharmaceutical Representative ",
851
+ "Group Purchase Salesperson/Manager",
852
+ "Key Account Manager ",
853
+ "Client Representative ",
854
+ "Client Director ",
855
+ "Client Manager/Supervisor ",
856
+ "Automobile Sales ",
857
+ "Channel/Distribution Director ",
858
+ "Channel/Distribution Manager/Supervisor ",
859
+ "Channel Specialist ",
860
+ "Channel Manager/Director ",
861
+ "Telemarketing ",
862
+ "Distributor ",
863
+ "Online Sales ",
864
+ "Sales Order Follow-up ",
865
+ "Sales Representative ",
866
+ "Other Sales Positions ",
867
+ "Sales Assistant ",
868
+ "Sales Trainer/Lecturer ",
869
+ "Sales Director ",
870
+ "Sales Support ",
871
+ "Sales Data Analyst ",
872
+ "Sales Manager/Supervisor ",
873
+ "Sales Administration Specialist/Assistant ",
874
+ "Sales Administration Manager/Supervisor ",
875
+ "Sales Operations Manager/Supervisor ",
876
+ "Northeast Cuisine Chef ",
877
+ "Southeast Asian Cuisine Chef ",
878
+ "Yunnan and Guizhou Cuisine Chef ",
879
+ "Beijing and Shandong Cuisine Chef ",
880
+ "Food Runner ",
881
+ "Kitchen Worker ",
882
+ "Chef/Head Chef ",
883
+ "Chef Assistant/Apprentice ",
884
+ "Back Kitchen ",
885
+ "Barista ",
886
+ "Sommelier ",
887
+ "Mexican Cuisine Chef ",
888
+ "Lobby Manager/Supervisor ",
889
+ "Apprentice ",
890
+ "Crayfish Chef ",
891
+ "Sichuan and Hunan Cuisine Chef ",
892
+ "Italian Cuisine Chef ",
893
+ "Japanese Cuisine Chef ",
894
+ "Waiter/Waitress ",
895
+ "General Helper ",
896
+ "Jiangsu and Zhejiang Cuisine Chef ",
897
+ "French Cuisine Chef ",
898
+ "Dishwasher ",
899
+ "Hot Pot Seasoning Cook ",
900
+ "Barbecue Chef ",
901
+ "Cantonese and Hong Kong Cuisine Chef",
902
+ "Tea Specialist ",
903
+ "Nutritionist ",
904
+ "Executive Chef ",
905
+ "Pastry Decorator ",
906
+ "Northwest Cuisine Chef ",
907
+ "Pastry Chef ",
908
+ "Spanish Cuisine Chef ",
909
+ "Greeter/Receptionist ",
910
+ "Food Delivery Person ",
911
+ "Kitchen Assistant ",
912
+ "Dim Sum Chef ",
913
+ "Reservation Agent ",
914
+ "Restaurant Server ",
915
+ "Other Food and Beverage Roles ",
916
+ "Food and Beverage Management ",
917
+ "CEO/President/General Manager ",
918
+ "Corporate Secretary/Board Secretary ",
919
+ "Branch Manager ",
920
+ "Vice President/Deputy General Manager ",
921
+ "Chief Representative of Office ",
922
+ "Partner ",
923
+ "Factory Director/Deputy Factory Director ",
924
+ "Director ",
925
+ "President's Assistant/General Manager's Assistant ",
926
+ "Investor Relations ",
927
+ "Principal/Vice Principal ",
928
+ "Department/Division Management ",
929
+ "Chief Technology Officer (CTO) ",
930
+ "Chief Financial Officer (CFO) ",
931
+ "Chief Operating Officer (COO) ",
932
+ "Other Senior Management Roles"
933
+ ]
generation_user_profile/output/selected_paths.json ADDED
@@ -0,0 +1,898 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Demographic Information": {
3
+ "Age": {
4
+ "General": {},
5
+ "Youth": {},
6
+ "LifeStage": {},
7
+ "SpecificAge": {},
8
+ "MiddleAged": {},
9
+ "Group": {},
10
+ "GroupCategory": {},
11
+ "SuitableContent": {}
12
+ },
13
+ "Background": {
14
+ "Cultural Background": {}
15
+ },
16
+ "Personal": {
17
+ "Interests": {}
18
+ },
19
+ "Travel Preferences": {
20
+ "Frequent Traveler": {}
21
+ },
22
+ "birth_date": {
23
+ "specific_date": {}
24
+ },
25
+ "Life Stage": {
26
+ "Maturity Level": {}
27
+ },
28
+ "Family": {
29
+ "Household Composition": {},
30
+ "Role Information": {}
31
+ },
32
+ "Community": {
33
+ "Engagement": {}
34
+ },
35
+ "Information": {
36
+ "Age": {}
37
+ },
38
+ "Education": {
39
+ "Proficiency": {}
40
+ },
41
+ "Race": {
42
+ "Ethnicity": {}
43
+ },
44
+ "income": {
45
+ "level": {}
46
+ },
47
+ "Economic Status": {
48
+ "Budget": {}
49
+ },
50
+ "Gender": {
51
+ "Identity": {},
52
+ "Preferences": {},
53
+ "Demographics": {}
54
+ },
55
+ "RelocationWillingness": {}
56
+ },
57
+ "Hobbies, Interests, and Lifestyle": {
58
+ "Interests": {
59
+ "Movies": {},
60
+ "Cooking": {},
61
+ "Design": {},
62
+ "LanguageLearning": {
63
+ "knowledge": {}
64
+ },
65
+ "Lifestyle": {},
66
+ "Sustainability": {},
67
+ "PhilosophyTopics": {},
68
+ "Scenarios": {},
69
+ "Culture": {},
70
+ "UniqueExperiences": {},
71
+ "Gardening": {},
72
+ "Sports": {},
73
+ "Wellness": {
74
+ "practices": {}
75
+ },
76
+ "Food": {
77
+ "preparation": {}
78
+ },
79
+ "SelfImprovement": {},
80
+ "Groups": {},
81
+ "Storytelling": {},
82
+ "Seasons": {},
83
+ "SocialContributions": {},
84
+ "HistoricalThemes": {},
85
+ "Nature": {},
86
+ "MusicGenres": {
87
+ "musical_involvement": {
88
+ "bass": {}
89
+ }
90
+ },
91
+ "Innovation": {},
92
+ "Advocacy": {},
93
+ "PhilosophicalFields": {},
94
+ "Science": {},
95
+ "GameDevelopment": {},
96
+ "Reading": {},
97
+ "Literature": {},
98
+ "Film": {}
99
+ },
100
+ "Photography": {
101
+ "User Preferences": {}
102
+ },
103
+ "Communication": {
104
+ "UserStyle": {
105
+ "preference": {}
106
+ }
107
+ },
108
+ "Events": {
109
+ "UserParticipationInterest": {}
110
+ },
111
+ "Spirituality": {
112
+ "personal_interest": {}
113
+ },
114
+ "Gardening": {
115
+ "UserExperience": {}
116
+ },
117
+ "Travel Interests": {
118
+ "Membership Preferences": {},
119
+ "Destination Preferences": {}
120
+ },
121
+ "Creative Interests": {
122
+ "ProfessionalArea": {},
123
+ "CognitiveTools": {}
124
+ },
125
+ "Art Interests": {
126
+ "UserPreferences": {}
127
+ },
128
+ "Culinary Preferences": {
129
+ "culinaryPreferences": {}
130
+ },
131
+ "Business Interests": {
132
+ "UserInterests": {}
133
+ },
134
+ "Children": {
135
+ "Relevance": {},
136
+ "Approaches": {}
137
+ },
138
+ "Projects": {
139
+ "DroneTechnology": {}
140
+ },
141
+ "Dietary Preferences": {
142
+ "User Interests": {}
143
+ },
144
+ "Outdoor Activities": {
145
+ "Camping": {}
146
+ },
147
+ "Entrepreneurial Interests": {
148
+ "Business_Strategy": {}
149
+ },
150
+ "Gaming": {
151
+ "UserInterest": {}
152
+ },
153
+ "Vehicles": {
154
+ "User Preferences": {}
155
+ },
156
+ "Travel Preferences": {
157
+ "Geographic Interests": {}
158
+ },
159
+ "User Interests": {
160
+ "personal_preferences": {}
161
+ },
162
+ "Hobbies": {
163
+ "interests": {}
164
+ },
165
+ "Writing": {
166
+ "experience_level": {}
167
+ },
168
+ "Entertainment Interests": {
169
+ "Industry": {}
170
+ },
171
+ "Goals": {
172
+ "Physical_Activity": {}
173
+ },
174
+ "Preferences": {
175
+ "activities": {}
176
+ },
177
+ "Financial Interests": {
178
+ "investment_goals": {}
179
+ },
180
+ "Professional Interests": {
181
+ "General Interests": {}
182
+ },
183
+ "Academic Interests": {
184
+ "Personal Interests": {}
185
+ }
186
+ },
187
+ "Education and Learning": {
188
+ "background": {
189
+ "Finance Skills": {},
190
+ "Prior Experience": {}
191
+ },
192
+ "FocusArea": {
193
+ "Domain": {},
194
+ "Leadership": {}
195
+ },
196
+ "learningApproach": {
197
+ "ContinuousIntegration": {}
198
+ },
199
+ "programmingSkills": {
200
+ "ExpertiseLevel": {}
201
+ },
202
+ "interests": {
203
+ "Preferences": {},
204
+ "Hobbies & Interests": {},
205
+ "Professional Interests": {}
206
+ },
207
+ "language_proficiency": {
208
+ "LearningAttributes": {}
209
+ },
210
+ "FieldOfStudy": {
211
+ "interests": {}
212
+ },
213
+ "highestLevel": {
214
+ "Higher Education": {}
215
+ },
216
+ "preferences": {
217
+ "Content Presentation": {}
218
+ },
219
+ "familiarity": {
220
+ "ExperienceLevel": {}
221
+ },
222
+ "competency": {
223
+ "Cognitive and Productivity Skills": {}
224
+ },
225
+ "personalDevelopment": {
226
+ "Interests": {}
227
+ },
228
+ "experience_level": {
229
+ "AI": {}
230
+ },
231
+ "subject_area": {
232
+ "interests": {}
233
+ },
234
+ "specific_interests": {},
235
+ "academic_background": {
236
+ "CreativeWorks": {}
237
+ },
238
+ "degree": {
239
+ "Specialization": {},
240
+ "field_of_study": {}
241
+ },
242
+ "academicFocus": {
243
+ "Interests": {}
244
+ },
245
+ "motivation": {
246
+ "educational_experience": {}
247
+ },
248
+ "research": {
249
+ "Interests": {}
250
+ },
251
+ "skillLevel": {
252
+ "Diversity of Skills": {},
253
+ "Analytical Skills": {}
254
+ },
255
+ "level_of_expertise": {
256
+ "technology": {}
257
+ },
258
+ "subject_matter": {
259
+ "Topic": {}
260
+ },
261
+ "knowledgeArea": {
262
+ "Personal Interests": {}
263
+ },
264
+ "academic_achievements": {
265
+ "education": {}
266
+ },
267
+ "writingSkills": {
268
+ "Level": {}
269
+ }
270
+ },
271
+ "Physical and Health Characteristics": {
272
+ "Health Profile": {
273
+ "Vitamin Levels": {}
274
+ },
275
+ "weight": {
276
+ "personal_targets": {}
277
+ },
278
+ "Beliefs": {
279
+ "Philosophy": {},
280
+ "AttitudesTowardsDrugs": {}
281
+ },
282
+ "Dietary Preferences": {
283
+ "ProteinIntakeGoals": {},
284
+ "Allergies": {}
285
+ },
286
+ "Thinking Patterns": {
287
+ "Goal-Oriented": {}
288
+ },
289
+ "Oral Health": {
290
+ "SpecificDentalCondition": {}
291
+ },
292
+ "Personal Health Factors": {
293
+ "Alcohol Use History": {}
294
+ },
295
+ "Dietary": {
296
+ "UserPreferences": {}
297
+ },
298
+ "Cognitive Style": {
299
+ "Reflective Development": {}
300
+ },
301
+ "Health Goals": {
302
+ "health_improvement": {}
303
+ },
304
+ "HealthHistory": {
305
+ "Conditions": {}
306
+ },
307
+ "Neurodiversity": {
308
+ "Dyslexia": {}
309
+ },
310
+ "Metabolism": {
311
+ "Basal Metabolic Rate": {}
312
+ },
313
+ "Health Conditions": {
314
+ "Neurodevelopmental Conditions": {}
315
+ },
316
+ "Medical History": {
317
+ "Allergy_Management": {}
318
+ },
319
+ "General Health": {
320
+ "Wellbeing": {}
321
+ },
322
+ "neurodiversity": {
323
+ "add-inattentive": {}
324
+ },
325
+ "Body": {
326
+ "Body Type": {
327
+ "Normal": {}
328
+ }
329
+ },
330
+ "Skin": {
331
+ "UserPreferences": {},
332
+ "SkinType": {}
333
+ },
334
+ "Fitness Level": {
335
+ "Current Status": {}
336
+ }
337
+ },
338
+ "Media Consumption and Engagement": {
339
+ "Books": {
340
+ "ContentPreferences": {},
341
+ "UserPreferences": {}
342
+ },
343
+ "reddit": {
344
+ "user_attributes": {}
345
+ },
346
+ "Preferences": {
347
+ "User Engagement": {},
348
+ "User Preferences": {}
349
+ },
350
+ "Music": {
351
+ "AnalysisDepth": {},
352
+ "ListeningPreferences": {}
353
+ },
354
+ "SocialMedia": {
355
+ "User Preferences": {
356
+ "use": {}
357
+ },
358
+ "User Engagement": {}
359
+ },
360
+ "PlatformPreference": {
361
+ "User Type": {}
362
+ },
363
+ "Celebrities": {
364
+ "FavoriteCelebrities": {}
365
+ },
366
+ "digital_tool_usage": {
367
+ "familiarity_with_automation_tools": {}
368
+ },
369
+ "QuestionStyle": {},
370
+ "Literature": {
371
+ "SciFiGenres": {}
372
+ },
373
+ "content_engagement": {
374
+ "personal_beliefs": {}
375
+ },
376
+ "preferred_channels": {
377
+ "communication_channels": {}
378
+ },
379
+ "story_prefs": {
380
+ "genres": {}
381
+ },
382
+ "FavoriteAuthors": {
383
+ "Historical": {}
384
+ },
385
+ "Preferred Platforms": {
386
+ "Libraries": {}
387
+ },
388
+ "Artistic": {
389
+ "Interests": {}
390
+ },
391
+ "news": {
392
+ "preferred_sources": {}
393
+ },
394
+ "Genre": {
395
+ "Interactive Storytelling": {}
396
+ },
397
+ "Engagement": {
398
+ "User Level": {},
399
+ "User Technical Proficiency": {}
400
+ },
401
+ "Preferred Sources": {
402
+ "Financial Information Sources": {}
403
+ },
404
+ "Gaming": {
405
+ "UsagePreferences": {}
406
+ },
407
+ "SpaceRelatedMedia": {},
408
+ "RecipeSources": {
409
+ "OnlineBlogs": {}
410
+ },
411
+ "sciFiThemes": {},
412
+ "streaming_service": {
413
+ "preferences": {}
414
+ },
415
+ "ArtisticInspirations": {},
416
+ "meme": {
417
+ "knowledge": {}
418
+ },
419
+ "Language": {
420
+ "LanguageAttributes": {}
421
+ }
422
+ },
423
+ "Psychological and Cognitive Aspects": {
424
+ "Mindset": {
425
+ "UserPreferences": {}
426
+ },
427
+ "Shame": {
428
+ "triggers": {}
429
+ },
430
+ "Innovation": {
431
+ "Openness": {}
432
+ },
433
+ "Openness": {
434
+ "Educational Background": {},
435
+ "Interest in Technology": {}
436
+ },
437
+ "Thinking Style": {
438
+ "personality_traits": {}
439
+ },
440
+ "Risk Tolerance": {
441
+ "Proficiency": {},
442
+ "General": {}
443
+ },
444
+ "Pattern Recognition": {
445
+ "ability": {}
446
+ },
447
+ "Thinking Patterns": {
448
+ "cognitiveProcess": {}
449
+ },
450
+ "Engagement": {},
451
+ "Challenges": {
452
+ "CognitiveAbilities": {}
453
+ },
454
+ "Personality": {
455
+ "Perfectionism": {},
456
+ "Introversion": {},
457
+ "PersonalityResults": {},
458
+ "AdventureSeeking": {},
459
+ "Empathy": {},
460
+ "Preference": {}
461
+ },
462
+ "Perspective": {
463
+ "PersonalAttributes": {}
464
+ },
465
+ "Personality Traits": {
466
+ "Interpersonal Dynamics": {}
467
+ },
468
+ "Needs": {
469
+ "reliability": {}
470
+ },
471
+ "Response": {
472
+ "ToAnger": {}
473
+ },
474
+ "Tone Preference": {},
475
+ "Motivation": {
476
+ "Wellness": {},
477
+ "Learning": {},
478
+ "Goals": {}
479
+ },
480
+ "Anxiety": {
481
+ "Level": {}
482
+ },
483
+ "Resilience": {
484
+ "PersonalExperience": {}
485
+ },
486
+ "Personal Insight": {
487
+ "Level of Self-Awareness": {}
488
+ },
489
+ "Stress Management": {
490
+ "WorkLifeAttributes": {}
491
+ },
492
+ "Problem Solving": {
493
+ "analyticalSkills": {}
494
+ },
495
+ "Favorite Genres": {
496
+ "Gaming": {}
497
+ },
498
+ "Perfectionism": {
499
+ "education_level": {}
500
+ },
501
+ "Mindfulness": {
502
+ "Personal Development": {}
503
+ },
504
+ "Curiosity": {
505
+ "IntellectualEngagement": {}
506
+ },
507
+ "User Interaction": {
508
+ "PreferredEngagementStyle": {}
509
+ },
510
+ "Math Skills": {
511
+ "proficiency_level": {}
512
+ },
513
+ "Productivity": {
514
+ "SkillLevel": {}
515
+ },
516
+ "Language Complexity": {
517
+ "Preference": {}
518
+ },
519
+ "Behavioral Patterns": {
520
+ "Personal Traits": {}
521
+ },
522
+ "Mental Well-being": {
523
+ "Stable": {}
524
+ },
525
+ "Emotional": {
526
+ "EmotionalAttributes": {}
527
+ },
528
+ "Political Views": {
529
+ "orientation": {}
530
+ },
531
+ "Goals": {
532
+ "Long-Term Strategy": {}
533
+ },
534
+ "Creativity": {
535
+ "PersonalStyle": {}
536
+ }
537
+ },
538
+ "Core Values, Beliefs, and Philosophy": {
539
+ "PersonalGrowth": {
540
+ "Resilience": {},
541
+ "PersonalBackground": {},
542
+ "Orientation": {}
543
+ },
544
+ "Beliefs": {
545
+ "Philosophy": {},
546
+ "Social Values": {}
547
+ },
548
+ "Wellness": {
549
+ "Approach_and_Attitudes": {}
550
+ },
551
+ "Travel_values": {
552
+ "authentic_culture": {}
553
+ },
554
+ "Lifestyle": {
555
+ "PersonalValues": {}
556
+ },
557
+ "learning_attitude": {
558
+ "openness": {}
559
+ },
560
+ "Philosophy": {
561
+ "generalAttributes": {}
562
+ },
563
+ "Values": {
564
+ "Discipline": {},
565
+ "Growth_Mindset": {},
566
+ "Education": {},
567
+ "Work_Ethic": {}
568
+ },
569
+ "Interests": {
570
+ "EthicalViews": {}
571
+ },
572
+ "Goals": {
573
+ "Career Goals": {}
574
+ },
575
+ "Morality": {
576
+ "relationship_preferences": {}
577
+ },
578
+ "Cultural": {
579
+ "Cultural Awareness": {}
580
+ },
581
+ "Life_perspective": {
582
+ "worldview": {}
583
+ },
584
+ "WorkEthic": {
585
+ "Values": {}
586
+ },
587
+ "EnvironmentalConcerns": {
588
+ "Sustainability Advocate": {}
589
+ },
590
+ "Ethics": {
591
+ "Dietary_Preferences": {}
592
+ },
593
+ "Educational_goals": {
594
+ "TemporalPerspective": {}
595
+ }
596
+ },
597
+ "Lifestyle and Daily Routine": {
598
+ "Daily Routine": {
599
+ "ShoppingHabits": {},
600
+ "TravelPreferences": {}
601
+ },
602
+ "Travel": {
603
+ "Experience": {}
604
+ },
605
+ "Location": {
606
+ "Community": {}
607
+ },
608
+ "Dietary Preferences": {
609
+ "dietaryConsiderations": {}
610
+ },
611
+ "Cooking": {
612
+ "SkillLevel": {},
613
+ "TimeAvailability": {}
614
+ },
615
+ "Time Management": {
616
+ "QualityOfLife": {}
617
+ },
618
+ "Stress Management": {
619
+ "general": {}
620
+ },
621
+ "Shopping": {
622
+ "OnlineBehavior": {},
623
+ "ShoppingBehavior": {}
624
+ },
625
+ "Activities": {
626
+ "Family Structure": {}
627
+ },
628
+ "Travel Preferences": {
629
+ "User Preferences": {}
630
+ },
631
+ "Sports": {
632
+ "endurance_sports": {}
633
+ },
634
+ "Wellness": {
635
+ "Personalized Routine": {}
636
+ },
637
+ "Leisure Activities": {
638
+ "Personal Preferences": {}
639
+ },
640
+ "Learning": {
641
+ "personal_dedication": {}
642
+ },
643
+ "Work Schedule": {
644
+ "attribute": {}
645
+ },
646
+ "Home Setup": {
647
+ "UserPreferences": {}
648
+ },
649
+ "Retirement": {
650
+ "Age": {}
651
+ },
652
+ "Sleep": {
653
+ "environment": {}
654
+ },
655
+ "Pet Ownership": {
656
+ "PersonalizationAttribute": {}
657
+ }
658
+ },
659
+ "Cultural and Social Context": {
660
+ "Linguistic": {
661
+ "Style": {}
662
+ },
663
+ "Cultural": {
664
+ "Mental Health Advocate": {}
665
+ },
666
+ "Community": {
667
+ "Volunteer Activities": {},
668
+ "Involvement": {},
669
+ "Impact": {}
670
+ },
671
+ "Food Preferences": {
672
+ "FoodPreferences": {},
673
+ "Restrictions": {}
674
+ },
675
+ "Personal Attitudes": {
676
+ "Recovery Orientation": {}
677
+ },
678
+ "Social": {
679
+ "Personal Identity": {}
680
+ },
681
+ "PersonalContext": {
682
+ "GeographicBackground": {}
683
+ },
684
+ "Personal Customs": {
685
+ "Traditional Practices": {}
686
+ },
687
+ "Communication": {
688
+ "CommunicationNorms": {}
689
+ },
690
+ "Life Stage": {
691
+ "Teenager": {}
692
+ },
693
+ "Company Culture": {
694
+ "Adaptability": {}
695
+ },
696
+ "Theme": {
697
+ "Social Context": {}
698
+ },
699
+ "Personal Culture": {
700
+ "Values": {}
701
+ },
702
+ "Financial Behavior": {
703
+ "Risk Tolerance": {}
704
+ },
705
+ "Life Experiences": {
706
+ "Variety": {}
707
+ },
708
+ "Religion": {
709
+ "ReligiousEngagement": {},
710
+ "Religion": {},
711
+ "ReligiousType": {}
712
+ },
713
+ "Personal Interests": {
714
+ "Academic Interests": {}
715
+ },
716
+ "cultural": {
717
+ "personal_information": {}
718
+ },
719
+ "Language": {
720
+ "Proficiency": {}
721
+ },
722
+ "Personal Values": {
723
+ "Privacy Orientation": {},
724
+ "Inclusivity Focus": {}
725
+ },
726
+ "Group Involvement": {
727
+ "Participation Level": {}
728
+ },
729
+ "Social Habits": {
730
+ "Coffee Culture Enthusiast": {}
731
+ },
732
+ "Personal Life": {
733
+ "Interaction Style": {}
734
+ },
735
+ "affiliation": {
736
+ "religious": {}
737
+ },
738
+ "DietaryPreferences": {
739
+ "personal_preferences": {}
740
+ },
741
+ "Beliefs": {
742
+ "Lifestyle_Attitudes": {},
743
+ "Personal_Interests": {}
744
+ },
745
+ "Preference": {
746
+ "Language Preferences": {}
747
+ },
748
+ "Values": {
749
+ "EthicalValues": {}
750
+ },
751
+ "Health Perspectives": {
752
+ "Aging Attitudes": {}
753
+ },
754
+ "Financial Preference": {
755
+ "Budget Conscious": {}
756
+ },
757
+ "Health Practices": {
758
+ "Traditional Approaches": {}
759
+ }
760
+ },
761
+ "Core Values and Beliefs": {
762
+ "Wellness": {
763
+ "Health Prioritization": {}
764
+ },
765
+ "Goals": {
766
+ "Priorities": {}
767
+ },
768
+ "Identity": {
769
+ "CulturalAffiliation": {}
770
+ },
771
+ "Personal Philosophy": {
772
+ "Preferences": {},
773
+ "Opinions": {}
774
+ }
775
+ },
776
+ "Relationships and Social Networks": {
777
+ "Goals": {
778
+ "RelationshipMotivation": {}
779
+ },
780
+ "Personal Ties": {
781
+ "ProfessionalConnections": {}
782
+ },
783
+ "Networking": {
784
+ "Approach": {}
785
+ },
786
+ "Family": {
787
+ "Relationship with Mother": {},
788
+ "Family Dynamics": {},
789
+ "Relationship Quality": {},
790
+ "Support System": {},
791
+ "Sibling": {},
792
+ "Mother's Personality": {},
793
+ "Grandparents": {},
794
+ "Family Relationships": {}
795
+ },
796
+ "Family Role": {
797
+ "children": {}
798
+ },
799
+ "Parental Relationships": {
800
+ "dynamics": {}
801
+ },
802
+ "Social Skills": {
803
+ "Social Reach": {}
804
+ },
805
+ "Professional": {
806
+ "Community_Involvement": {},
807
+ "Knowledge_Experience": {}
808
+ },
809
+ "Professional Skills": {
810
+ "Networking": {},
811
+ "Entrepreneurship": {}
812
+ },
813
+ "Social Role": {
814
+ "Mentorship_Role": {},
815
+ "Youth_Engagement": {},
816
+ "Impact": {},
817
+ "Family_Role": {}
818
+ },
819
+ "Interactions": {
820
+ "User Intent": {}
821
+ },
822
+ "Connections": {
823
+ "Personal Network": {}
824
+ },
825
+ "Peers": {
826
+ "Dynamics": {}
827
+ },
828
+ "Social": {
829
+ "Personalization Level": {}
830
+ },
831
+ "Relationship": {
832
+ "Family_Context": {}
833
+ }
834
+ },
835
+ "Emotional and Relational Skills": {
836
+ "Engagement": {
837
+ "Motivation": {}
838
+ },
839
+ "CommunicationSkills": {
840
+ "EmotionalAttributes": {},
841
+ "CommunicationStyle": {}
842
+ },
843
+ "SelfAwareness": {
844
+ "Personal Growth Techniques": {}
845
+ },
846
+ "Personality": {
847
+ "Empathy": {}
848
+ },
849
+ "OpenMindedness": {
850
+ "ReceptivityToInnovation": {}
851
+ },
852
+ "Patience": {
853
+ "level": {}
854
+ },
855
+ "Resilience": {
856
+ "Journey": {}
857
+ },
858
+ "WorkLifeBalance": {
859
+ "Preferences": {}
860
+ },
861
+ "Romantic": {
862
+ "RelationshipBuilding": {}
863
+ },
864
+ "EmotionalIntelligence": {
865
+ "Emotional_Sensitivity": {}
866
+ }
867
+ },
868
+ "Psychological and Cognitive": {
869
+ "User Characteristics": {
870
+ "Personal Characteristics": {}
871
+ }
872
+ },
873
+ "Lifestyle and Habits": {
874
+ "Daily Routine": {
875
+ "Home Usage Frequency": {}
876
+ }
877
+ },
878
+ "Core Values, Beliefs, Philosophy": {
879
+ "Worldview": {
880
+ "Nationalistic Views": {}
881
+ }
882
+ },
883
+ "Core Values and Philosophy": {
884
+ "Beliefs": {
885
+ "Outcome-Oriented": {}
886
+ }
887
+ },
888
+ "Lifestyle and Routine": {
889
+ "Personal Habits": {
890
+ "User Personalization Attributes": {}
891
+ }
892
+ },
893
+ "Cultural and Social Contexts": {
894
+ "Community": {
895
+ "Engagement Level": {}
896
+ }
897
+ }
898
+ }
generation_user_profile/output/user_profile.json ADDED
@@ -0,0 +1,383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "basic_info": {
3
+ "age": 45,
4
+ "gender": "male",
5
+ "occupation": {
6
+ "status": "engineer"
7
+ },
8
+ "location": {
9
+ "city": "Shanghai",
10
+ "country": "China"
11
+ }
12
+ },
13
+ "values_orientation": "Pragmatism over ideals, self-protection, and low expectations. I don’t believe people always act in good faith, so I value caution more than trust.",
14
+ "life_attitude": {
15
+ "outlook": "Life is mostly about enduring rather than enjoying. I take each day as it comes, without too much hope or illusion, just trying to get through with as little disappointment as possible.",
16
+ "coping_mechanism": "Custom life attitude provided by user"
17
+ },
18
+ "personal_story": {
19
+ "personal_story": "Story 1: At 30, while leading a project in a multinational firm in Shanghai, he discovered a colleague manipulating technical reports to secure a contract. Instead of confronting the issue openly, he chose to document everything quietly and protect himself, fearing backlash. This experience reinforced his belief that people do not always act in good faith and shaped his pragmatic approach to work and relationships. Later, at 42, after a significant project failure due to overreliance on idealistic teamwork without safeguards, he adopted a cautious stance, setting low expectations to avoid disappointment. These incidents cultivated his preference for pragmatism over ideals and a cautious, self-protective life attitude.",
20
+ "key_life_events": [
21
+ "Story 1: Discovered colleague's manipulation of reports at age 30",
22
+ "Story 1: Project failure due to idealistic teamwork at age 42"
23
+ ]
24
+ },
25
+ "interests_and_hobbies": {
26
+ "interests": [
27
+ "analytical report writing",
28
+ "strategic risk assessment"
29
+ ]
30
+ },
31
+ "selected_attributes": [
32
+ "Demographic Information.Age.General",
33
+ "Hobbies, Interests, and Lifestyle.Interests.Movies",
34
+ "Hobbies, Interests, and Lifestyle.Interests.Cooking",
35
+ "Education and Learning.background.Finance Skills",
36
+ "Physical and Health Characteristics.Health Profile.Vitamin Levels",
37
+ "Media Consumption and Engagement.Books.ContentPreferences",
38
+ "Psychological and Cognitive Aspects.Mindset.UserPreferences",
39
+ "Psychological and Cognitive Aspects.Shame.triggers",
40
+ "Core Values, Beliefs, and Philosophy.PersonalGrowth.Resilience",
41
+ "Lifestyle and Daily Routine.Daily Routine.ShoppingHabits",
42
+ "Hobbies, Interests, and Lifestyle.Photography.User Preferences",
43
+ "Cultural and Social Context.Linguistic.Style",
44
+ "Hobbies, Interests, and Lifestyle.Communication.UserStyle.preference",
45
+ "Demographic Information.Background.Cultural Background",
46
+ "Psychological and Cognitive Aspects.Innovation.Openness",
47
+ "Psychological and Cognitive Aspects.Openness.Educational Background",
48
+ "Hobbies, Interests, and Lifestyle.Events.UserParticipationInterest",
49
+ "Demographic Information.Age.Youth",
50
+ "Core Values and Beliefs.Wellness.Health Prioritization",
51
+ "Psychological and Cognitive Aspects.Thinking Style.personality_traits",
52
+ "Lifestyle and Daily Routine.Travel.Experience",
53
+ "Core Values, Beliefs, and Philosophy.Beliefs.Philosophy",
54
+ "Core Values, Beliefs, and Philosophy.Wellness.Approach_and_Attitudes",
55
+ "Psychological and Cognitive Aspects.Risk Tolerance.Proficiency",
56
+ "Demographic Information.Personal.Interests",
57
+ "Hobbies, Interests, and Lifestyle.Spirituality.personal_interest",
58
+ "Education and Learning.FocusArea.Domain",
59
+ "Lifestyle and Daily Routine.Location.Community",
60
+ "Relationships and Social Networks.Goals.RelationshipMotivation",
61
+ "Psychological and Cognitive Aspects.Pattern Recognition.ability",
62
+ "Cultural and Social Context.Cultural.Mental Health Advocate",
63
+ "Hobbies, Interests, and Lifestyle.Interests.Design",
64
+ "Education and Learning.learningApproach.ContinuousIntegration",
65
+ "Media Consumption and Engagement.reddit.user_attributes",
66
+ "Hobbies, Interests, and Lifestyle.Interests.LanguageLearning.knowledge",
67
+ "Hobbies, Interests, and Lifestyle.Gardening.UserExperience",
68
+ "Emotional and Relational Skills.Engagement.Motivation",
69
+ "Media Consumption and Engagement.Preferences.User Engagement",
70
+ "Hobbies, Interests, and Lifestyle.Interests.Lifestyle",
71
+ "Hobbies, Interests, and Lifestyle.Travel Interests.Membership Preferences",
72
+ "Lifestyle and Daily Routine.Dietary Preferences.dietaryConsiderations",
73
+ "Hobbies, Interests, and Lifestyle.Interests.Sustainability",
74
+ "Psychological and Cognitive Aspects.Thinking Patterns.cognitiveProcess",
75
+ "Media Consumption and Engagement.Music.AnalysisDepth",
76
+ "Hobbies, Interests, and Lifestyle.Interests.PhilosophyTopics",
77
+ "Lifestyle and Daily Routine.Cooking.SkillLevel",
78
+ "Media Consumption and Engagement.SocialMedia.User Preferences.use",
79
+ "Relationships and Social Networks.Personal Ties.ProfessionalConnections",
80
+ "Hobbies, Interests, and Lifestyle.Interests.Scenarios",
81
+ "Education and Learning.programmingSkills.ExpertiseLevel",
82
+ "Hobbies, Interests, and Lifestyle.Creative Interests.ProfessionalArea",
83
+ "Psychological and Cognitive Aspects.Engagement",
84
+ "Psychological and Cognitive Aspects.Challenges.CognitiveAbilities",
85
+ "Cultural and Social Context.Community.Volunteer Activities",
86
+ "Hobbies, Interests, and Lifestyle.Interests.Culture",
87
+ "Cultural and Social Context.Food Preferences.FoodPreferences",
88
+ "Physical and Health Characteristics.weight.personal_targets",
89
+ "Hobbies, Interests, and Lifestyle.Art Interests.UserPreferences",
90
+ "Demographic Information.Travel Preferences.Frequent Traveler",
91
+ "Cultural and Social Context.Personal Attitudes.Recovery Orientation",
92
+ "Education and Learning.interests.Preferences",
93
+ "Education and Learning.background.Prior Experience",
94
+ "Psychological and Cognitive Aspects.Personality.Perfectionism",
95
+ "Physical and Health Characteristics.Beliefs.Philosophy",
96
+ "Cultural and Social Context.Social.Personal Identity",
97
+ "Demographic Information.birth_date.specific_date",
98
+ "Media Consumption and Engagement.PlatformPreference.User Type",
99
+ "Cultural and Social Context.Food Preferences.Restrictions",
100
+ "Media Consumption and Engagement.Books.UserPreferences",
101
+ "Hobbies, Interests, and Lifestyle.Interests.UniqueExperiences",
102
+ "Psychological and Cognitive Aspects.Perspective.PersonalAttributes",
103
+ "Physical and Health Characteristics.Dietary Preferences.ProteinIntakeGoals",
104
+ "Education and Learning.language_proficiency.LearningAttributes",
105
+ "Lifestyle and Daily Routine.Daily Routine.TravelPreferences",
106
+ "Cultural and Social Context.PersonalContext.GeographicBackground",
107
+ "Physical and Health Characteristics.Thinking Patterns.Goal-Oriented",
108
+ "Psychological and Cognitive Aspects.Personality Traits.Interpersonal Dynamics",
109
+ "Physical and Health Characteristics.Oral Health.SpecificDentalCondition",
110
+ "Relationships and Social Networks.Networking.Approach",
111
+ "Physical and Health Characteristics.Personal Health Factors.Alcohol Use History",
112
+ "Media Consumption and Engagement.Celebrities.FavoriteCelebrities",
113
+ "Relationships and Social Networks.Family.Relationship with Mother",
114
+ "Education and Learning.interests.Hobbies & Interests",
115
+ "Cultural and Social Context.Personal Customs.Traditional Practices",
116
+ "Cultural and Social Context.Communication.CommunicationNorms",
117
+ "Psychological and Cognitive Aspects.Needs.reliability",
118
+ "Education and Learning.FieldOfStudy.interests",
119
+ "Demographic Information.Life Stage.Maturity Level",
120
+ "Core Values and Beliefs.Goals.Priorities",
121
+ "Hobbies, Interests, and Lifestyle.Interests.Gardening",
122
+ "Lifestyle and Daily Routine.Time Management.QualityOfLife",
123
+ "Cultural and Social Context.Life Stage.Teenager",
124
+ "Education and Learning.interests.Professional Interests",
125
+ "Cultural and Social Context.Company Culture.Adaptability",
126
+ "Cultural and Social Context.Theme.Social Context",
127
+ "Demographic Information.Family.Household Composition",
128
+ "Relationships and Social Networks.Family Role.children",
129
+ "Hobbies, Interests, and Lifestyle.Culinary Preferences.culinaryPreferences",
130
+ "Physical and Health Characteristics.Dietary.UserPreferences",
131
+ "Relationships and Social Networks.Parental Relationships.dynamics",
132
+ "Hobbies, Interests, and Lifestyle.Interests.Sports",
133
+ "Core Values, Beliefs, and Philosophy.Travel_values.authentic_culture",
134
+ "Education and Learning.highestLevel.Higher Education",
135
+ "Media Consumption and Engagement.digital_tool_usage.familiarity_with_automation_tools",
136
+ "Media Consumption and Engagement.QuestionStyle",
137
+ "Media Consumption and Engagement.Literature.SciFiGenres",
138
+ "Cultural and Social Context.Personal Culture.Values",
139
+ "Emotional and Relational Skills.CommunicationSkills.EmotionalAttributes",
140
+ "Psychological and Cognitive Aspects.Response.ToAnger",
141
+ "Psychological and Cognitive Aspects.Tone Preference",
142
+ "Core Values, Beliefs, and Philosophy.PersonalGrowth.PersonalBackground",
143
+ "Hobbies, Interests, and Lifestyle.Business Interests.UserInterests",
144
+ "Hobbies, Interests, and Lifestyle.Interests.Wellness.practices",
145
+ "Hobbies, Interests, and Lifestyle.Interests.Food.preparation",
146
+ "Education and Learning.preferences.Content Presentation",
147
+ "Education and Learning.familiarity.ExperienceLevel",
148
+ "Hobbies, Interests, and Lifestyle.Interests.SelfImprovement",
149
+ "Lifestyle and Daily Routine.Stress Management.general",
150
+ "Relationships and Social Networks.Social Skills.Social Reach",
151
+ "Relationships and Social Networks.Family.Family Dynamics",
152
+ "Education and Learning.competency.Cognitive and Productivity Skills",
153
+ "Relationships and Social Networks.Professional.Community_Involvement",
154
+ "Lifestyle and Daily Routine.Shopping.OnlineBehavior",
155
+ "Core Values, Beliefs, and Philosophy.Lifestyle.PersonalValues",
156
+ "Education and Learning.personalDevelopment.Interests",
157
+ "Demographic Information.Age.LifeStage",
158
+ "Relationships and Social Networks.Family.Relationship Quality",
159
+ "Hobbies, Interests, and Lifestyle.Children.Relevance",
160
+ "Demographic Information.Community.Engagement",
161
+ "Cultural and Social Context.Financial Behavior.Risk Tolerance",
162
+ "Psychological and Cognitive.User Characteristics.Personal Characteristics",
163
+ "Core Values, Beliefs, and Philosophy.learning_attitude.openness",
164
+ "Physical and Health Characteristics.Cognitive Style.Reflective Development",
165
+ "Media Consumption and Engagement.Preferences.User Preferences",
166
+ "Education and Learning.experience_level.AI",
167
+ "Psychological and Cognitive Aspects.Openness.Interest in Technology",
168
+ "Lifestyle and Habits.Daily Routine.Home Usage Frequency",
169
+ "Hobbies, Interests, and Lifestyle.Projects.DroneTechnology",
170
+ "Hobbies, Interests, and Lifestyle.Dietary Preferences.User Interests",
171
+ "Cultural and Social Context.Life Experiences.Variety",
172
+ "Psychological and Cognitive Aspects.Motivation.Wellness",
173
+ "Relationships and Social Networks.Professional Skills.Networking",
174
+ "Media Consumption and Engagement.content_engagement.personal_beliefs",
175
+ "Hobbies, Interests, and Lifestyle.Interests.Groups",
176
+ "Media Consumption and Engagement.preferred_channels.communication_channels",
177
+ "Relationships and Social Networks.Family.Support System",
178
+ "Lifestyle and Daily Routine.Activities.Family Structure",
179
+ "Relationships and Social Networks.Social Role.Mentorship_Role",
180
+ "Education and Learning.subject_area.interests",
181
+ "Core Values, Beliefs, Philosophy.Worldview.Nationalistic Views",
182
+ "Demographic Information.Information.Age",
183
+ "Relationships and Social Networks.Interactions.User Intent",
184
+ "Hobbies, Interests, and Lifestyle.Interests.Storytelling",
185
+ "Demographic Information.Education.Proficiency",
186
+ "Hobbies, Interests, and Lifestyle.Interests.Seasons",
187
+ "Cultural and Social Context.Religion.ReligiousEngagement",
188
+ "Physical and Health Characteristics.Health Goals.health_improvement",
189
+ "Hobbies, Interests, and Lifestyle.Interests.SocialContributions",
190
+ "Education and Learning.specific_interests",
191
+ "Lifestyle and Daily Routine.Travel Preferences.User Preferences",
192
+ "Hobbies, Interests, and Lifestyle.Outdoor Activities.Camping",
193
+ "Media Consumption and Engagement.story_prefs.genres",
194
+ "Media Consumption and Engagement.FavoriteAuthors.Historical",
195
+ "Cultural and Social Context.Religion.Religion",
196
+ "Emotional and Relational Skills.SelfAwareness.Personal Growth Techniques",
197
+ "Lifestyle and Daily Routine.Cooking.TimeAvailability",
198
+ "Media Consumption and Engagement.Preferred Platforms.Libraries",
199
+ "Education and Learning.academic_background.CreativeWorks",
200
+ "Hobbies, Interests, and Lifestyle.Entrepreneurial Interests.Business_Strategy",
201
+ "Core Values, Beliefs, and Philosophy.Philosophy.generalAttributes",
202
+ "Core Values and Beliefs.Identity.CulturalAffiliation",
203
+ "Psychological and Cognitive Aspects.Motivation.Learning",
204
+ "Lifestyle and Daily Routine.Sports.endurance_sports",
205
+ "Relationships and Social Networks.Connections.Personal Network",
206
+ "Psychological and Cognitive Aspects.Anxiety.Level",
207
+ "Hobbies, Interests, and Lifestyle.Creative Interests.CognitiveTools",
208
+ "Core Values and Philosophy.Beliefs.Outcome-Oriented",
209
+ "Psychological and Cognitive Aspects.Personality.Introversion",
210
+ "Psychological and Cognitive Aspects.Resilience.PersonalExperience",
211
+ "Psychological and Cognitive Aspects.Personal Insight.Level of Self-Awareness",
212
+ "Cultural and Social Context.Personal Interests.Academic Interests",
213
+ "Hobbies, Interests, and Lifestyle.Gaming.UserInterest",
214
+ "Education and Learning.degree.Specialization",
215
+ "Lifestyle and Daily Routine.Wellness.Personalized Routine",
216
+ "Education and Learning.academicFocus.Interests",
217
+ "Psychological and Cognitive Aspects.Motivation.Goals",
218
+ "Psychological and Cognitive Aspects.Stress Management.WorkLifeAttributes",
219
+ "Psychological and Cognitive Aspects.Problem Solving.analyticalSkills",
220
+ "Cultural and Social Context.Community.Involvement",
221
+ "Media Consumption and Engagement.Artistic.Interests",
222
+ "Relationships and Social Networks.Family.Sibling",
223
+ "Cultural and Social Context.cultural.personal_information",
224
+ "Cultural and Social Context.Language.Proficiency",
225
+ "Emotional and Relational Skills.Personality.Empathy",
226
+ "Core Values, Beliefs, and Philosophy.Values.Discipline",
227
+ "Hobbies, Interests, and Lifestyle.Interests.HistoricalThemes",
228
+ "Hobbies, Interests, and Lifestyle.Interests.Nature",
229
+ "Hobbies, Interests, and Lifestyle.Interests.MusicGenres.musical_involvement.bass",
230
+ "Core Values and Beliefs.Personal Philosophy.Preferences",
231
+ "Education and Learning.FocusArea.Leadership",
232
+ "Core Values, Beliefs, and Philosophy.Values.Growth_Mindset",
233
+ "Relationships and Social Networks.Peers.Dynamics",
234
+ "Physical and Health Characteristics.HealthHistory.Conditions",
235
+ "Psychological and Cognitive Aspects.Personality.PersonalityResults",
236
+ "Media Consumption and Engagement.news.preferred_sources",
237
+ "Hobbies, Interests, and Lifestyle.Interests.Innovation",
238
+ "Core Values, Beliefs, and Philosophy.Interests.EthicalViews",
239
+ "Cultural and Social Context.Personal Values.Privacy Orientation",
240
+ "Psychological and Cognitive Aspects.Favorite Genres.Gaming",
241
+ "Cultural and Social Context.Group Involvement.Participation Level",
242
+ "Media Consumption and Engagement.Genre.Interactive Storytelling",
243
+ "Hobbies, Interests, and Lifestyle.Children.Approaches",
244
+ "Lifestyle and Routine.Personal Habits.User Personalization Attributes",
245
+ "Demographic Information.Race.Ethnicity",
246
+ "Hobbies, Interests, and Lifestyle.Vehicles.User Preferences",
247
+ "Lifestyle and Daily Routine.Shopping.ShoppingBehavior",
248
+ "Cultural and Social Contexts.Community.Engagement Level",
249
+ "Media Consumption and Engagement.SocialMedia.User Engagement",
250
+ "Psychological and Cognitive Aspects.Perfectionism.education_level",
251
+ "Lifestyle and Daily Routine.Leisure Activities.Personal Preferences",
252
+ "Cultural and Social Context.Social Habits.Coffee Culture Enthusiast",
253
+ "Hobbies, Interests, and Lifestyle.Interests.Advocacy",
254
+ "Media Consumption and Engagement.Engagement.User Level",
255
+ "Cultural and Social Context.Personal Life.Interaction Style",
256
+ "Hobbies, Interests, and Lifestyle.Travel Preferences.Geographic Interests",
257
+ "Education and Learning.motivation.educational_experience",
258
+ "Hobbies, Interests, and Lifestyle.User Interests.personal_preferences",
259
+ "Core Values, Beliefs, and Philosophy.Goals.Career Goals",
260
+ "Relationships and Social Networks.Social.Personalization Level",
261
+ "Media Consumption and Engagement.Music.ListeningPreferences",
262
+ "Demographic Information.Family.Role Information",
263
+ "Media Consumption and Engagement.Preferred Sources.Financial Information Sources",
264
+ "Physical and Health Characteristics.Neurodiversity.Dyslexia",
265
+ "Relationships and Social Networks.Social Role.Youth_Engagement",
266
+ "Core Values, Beliefs, and Philosophy.Values.Education",
267
+ "Physical and Health Characteristics.Metabolism.Basal Metabolic Rate",
268
+ "Lifestyle and Daily Routine.Learning.personal_dedication",
269
+ "Physical and Health Characteristics.Dietary Preferences.Allergies",
270
+ "Relationships and Social Networks.Relationship.Family_Context",
271
+ "Cultural and Social Context.affiliation.religious",
272
+ "Hobbies, Interests, and Lifestyle.Interests.PhilosophicalFields",
273
+ "Education and Learning.research.Interests",
274
+ "Demographic Information.income.level",
275
+ "Hobbies, Interests, and Lifestyle.Hobbies.interests",
276
+ "Demographic Information.Economic Status.Budget",
277
+ "Hobbies, Interests, and Lifestyle.Interests.Science",
278
+ "Physical and Health Characteristics.Beliefs.AttitudesTowardsDrugs",
279
+ "Media Consumption and Engagement.Gaming.UsagePreferences",
280
+ "Demographic Information.Gender.Identity",
281
+ "Lifestyle and Daily Routine.Work Schedule.attribute",
282
+ "Core Values, Beliefs, and Philosophy.Morality.relationship_preferences",
283
+ "Education and Learning.skillLevel.Diversity of Skills",
284
+ "Education and Learning.level_of_expertise.technology",
285
+ "Hobbies, Interests, and Lifestyle.Writing.experience_level",
286
+ "Hobbies, Interests, and Lifestyle.Entertainment Interests.Industry",
287
+ "Cultural and Social Context.Religion.ReligiousType",
288
+ "Relationships and Social Networks.Family.Mother's Personality",
289
+ "Psychological and Cognitive Aspects.Personality.AdventureSeeking",
290
+ "Demographic Information.Gender.Preferences",
291
+ "Psychological and Cognitive Aspects.Mindfulness.Personal Development",
292
+ "Hobbies, Interests, and Lifestyle.Travel Interests.Destination Preferences",
293
+ "Physical and Health Characteristics.Health Conditions.Neurodevelopmental Conditions",
294
+ "Media Consumption and Engagement.SpaceRelatedMedia",
295
+ "Media Consumption and Engagement.RecipeSources.OnlineBlogs",
296
+ "Demographic Information.Age.SpecificAge",
297
+ "Media Consumption and Engagement.sciFiThemes",
298
+ "Core Values, Beliefs, and Philosophy.Cultural.Cultural Awareness",
299
+ "Cultural and Social Context.Community.Impact",
300
+ "Cultural and Social Context.DietaryPreferences.personal_preferences",
301
+ "Physical and Health Characteristics.Medical History.Allergy_Management",
302
+ "Education and Learning.subject_matter.Topic",
303
+ "Physical and Health Characteristics.General Health.Wellbeing",
304
+ "Psychological and Cognitive Aspects.Curiosity.IntellectualEngagement",
305
+ "Emotional and Relational Skills.OpenMindedness.ReceptivityToInnovation",
306
+ "Hobbies, Interests, and Lifestyle.Interests.GameDevelopment",
307
+ "Demographic Information.Age.MiddleAged",
308
+ "Core Values, Beliefs, and Philosophy.Beliefs.Social Values",
309
+ "Emotional and Relational Skills.Patience.level",
310
+ "Demographic Information.Age.Group",
311
+ "Hobbies, Interests, and Lifestyle.Goals.Physical_Activity",
312
+ "Psychological and Cognitive Aspects.User Interaction.PreferredEngagementStyle",
313
+ "Psychological and Cognitive Aspects.Math Skills.proficiency_level",
314
+ "Hobbies, Interests, and Lifestyle.Interests.Reading",
315
+ "Emotional and Relational Skills.CommunicationSkills.CommunicationStyle",
316
+ "Core Values, Beliefs, and Philosophy.Life_perspective.worldview",
317
+ "Education and Learning.knowledgeArea.Personal Interests",
318
+ "Emotional and Relational Skills.Resilience.Journey",
319
+ "Physical and Health Characteristics.neurodiversity.add-inattentive",
320
+ "Hobbies, Interests, and Lifestyle.Interests.Literature",
321
+ "Core Values, Beliefs, and Philosophy.Values.Work_Ethic",
322
+ "Lifestyle and Daily Routine.Home Setup.UserPreferences",
323
+ "Hobbies, Interests, and Lifestyle.Interests.Film",
324
+ "Cultural and Social Context.Personal Values.Inclusivity Focus",
325
+ "Core Values, Beliefs, and Philosophy.PersonalGrowth.Orientation",
326
+ "Cultural and Social Context.Beliefs.Lifestyle_Attitudes",
327
+ "Media Consumption and Engagement.streaming_service.preferences",
328
+ "Education and Learning.degree.field_of_study",
329
+ "Physical and Health Characteristics.Body.Body Type.Normal",
330
+ "Emotional and Relational Skills.WorkLifeBalance.Preferences",
331
+ "Psychological and Cognitive Aspects.Personality.Empathy",
332
+ "Relationships and Social Networks.Professional.Knowledge_Experience",
333
+ "Media Consumption and Engagement.ArtisticInspirations",
334
+ "Education and Learning.academic_achievements.education",
335
+ "Core Values and Beliefs.Personal Philosophy.Opinions",
336
+ "Psychological and Cognitive Aspects.Personality.Preference",
337
+ "Relationships and Social Networks.Family.Grandparents",
338
+ "Relationships and Social Networks.Social Role.Impact",
339
+ "Hobbies, Interests, and Lifestyle.Preferences.activities",
340
+ "Lifestyle and Daily Routine.Retirement.Age",
341
+ "Demographic Information.Gender.Demographics",
342
+ "Demographic Information.RelocationWillingness",
343
+ "Core Values, Beliefs, and Philosophy.WorkEthic.Values",
344
+ "Psychological and Cognitive Aspects.Productivity.SkillLevel",
345
+ "Education and Learning.skillLevel.Analytical Skills",
346
+ "Cultural and Social Context.Preference.Language Preferences",
347
+ "Core Values, Beliefs, and Philosophy.EnvironmentalConcerns.Sustainability Advocate",
348
+ "Psychological and Cognitive Aspects.Language Complexity.Preference",
349
+ "Physical and Health Characteristics.Skin.UserPreferences",
350
+ "Lifestyle and Daily Routine.Sleep.environment",
351
+ "Psychological and Cognitive Aspects.Behavioral Patterns.Personal Traits",
352
+ "Relationships and Social Networks.Social Role.Family_Role",
353
+ "Psychological and Cognitive Aspects.Mental Well-being.Stable",
354
+ "Demographic Information.Age.GroupCategory",
355
+ "Psychological and Cognitive Aspects.Emotional.EmotionalAttributes",
356
+ "Relationships and Social Networks.Professional Skills.Entrepreneurship",
357
+ "Psychological and Cognitive Aspects.Political Views.orientation",
358
+ "Emotional and Relational Skills.Romantic.RelationshipBuilding",
359
+ "Cultural and Social Context.Values.EthicalValues",
360
+ "Education and Learning.writingSkills.Level",
361
+ "Psychological and Cognitive Aspects.Goals.Long-Term Strategy",
362
+ "Demographic Information.Age.SuitableContent",
363
+ "Physical and Health Characteristics.Skin.SkinType",
364
+ "Emotional and Relational Skills.EmotionalIntelligence.Emotional_Sensitivity",
365
+ "Cultural and Social Context.Beliefs.Personal_Interests",
366
+ "Cultural and Social Context.Health Perspectives.Aging Attitudes",
367
+ "Media Consumption and Engagement.Engagement.User Technical Proficiency",
368
+ "Lifestyle and Daily Routine.Pet Ownership.PersonalizationAttribute",
369
+ "Hobbies, Interests, and Lifestyle.Financial Interests.investment_goals",
370
+ "Relationships and Social Networks.Family.Family Relationships",
371
+ "Cultural and Social Context.Financial Preference.Budget Conscious",
372
+ "Physical and Health Characteristics.Fitness Level.Current Status",
373
+ "Core Values, Beliefs, and Philosophy.Ethics.Dietary_Preferences",
374
+ "Media Consumption and Engagement.meme.knowledge",
375
+ "Media Consumption and Engagement.Language.LanguageAttributes",
376
+ "Hobbies, Interests, and Lifestyle.Professional Interests.General Interests",
377
+ "Psychological and Cognitive Aspects.Risk Tolerance.General",
378
+ "Hobbies, Interests, and Lifestyle.Academic Interests.Personal Interests",
379
+ "Cultural and Social Context.Health Practices.Traditional Approaches",
380
+ "Core Values, Beliefs, and Philosophy.Educational_goals.TemporalPerspective",
381
+ "Psychological and Cognitive Aspects.Creativity.PersonalStyle"
382
+ ]
383
+ }
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio>=4.0.0
2
+ openai>=1.0.0
3
+ python-dotenv>=1.0.0