Spaces:
Runtime error
Runtime error
File size: 30,782 Bytes
4d50781 5c5bd6b 4d50781 37050e9 4d50781 5c5bd6b 4d50781 5c5bd6b 4d50781 5c5bd6b 4d50781 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 4d50781 5c5bd6b 4d50781 5c5bd6b 4d50781 5c5bd6b 4d50781 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 37050e9 5c5bd6b 1e77711 5c5bd6b 7c2edac 5c5bd6b 7c2edac 5c5bd6b 4d50781 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"from chatbot_multiagent import submitUserMessage\n",
"import random\n",
"from math import inf\n",
"\n",
"def QA_sample_test(quesion_test:list[str], num_samples:int=inf):\n",
" \n",
" # Ensure there are at least 5 lines in the list\n",
" num_samples = min(10, len(quesion_test))\n",
" sample_quesion = random.sample(quesion_test, num_samples)\n",
" \n",
" result = []\n",
" for quesion in sample_quesion:\n",
" try:\n",
" answer = submitUserMessage(quesion)\n",
" result.append({'quesion': quesion, 'answer': answer}) \n",
" except Exception as e:\n",
" result.append({'quesion': quesion, 'error': e}) \n",
" \n",
" return result "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"with open('./testsets/user_question_testsets.txt', 'r') as file:\n",
" quesion_test = file.readlines() \n",
"\n",
"results = QA_sample_test(quesion_test, num_samples=15)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Results saved to testsets/QA.txt\n"
]
}
],
"source": [
"import pprint \n",
"\n",
"# Create a PrettyPrinter instance with a desired indentation level\n",
"pp = pprint.PrettyPrinter(indent=4)\n",
"\n",
"# Convert the list of dictionaries to a pretty-printed string\n",
"results_str = pp.pformat(results)\n",
"\n",
"# Specify the file path where you want to save the string\n",
"file_path = 'testsets/QA.txt'\n",
"\n",
"# Save the pretty-printed string to a .txt file\n",
"with open(file_path, 'w') as file:\n",
" file.write(results_str)\n",
"\n",
"print(f\"Results saved to {file_path}\")"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[{'error': BadRequestError('Error code: 400 - {\\'error\\': {\\'message\\': \"An assistant message with \\'tool_calls\\' must be followed by tool messages responding to each \\'tool_call_id\\'. The following tool_call_ids did not have response messages: call_unMN66et1GfiFghWmFzTTCgE\", \\'type\\': \\'invalid_request_error\\', \\'param\\': \\'messages\\', \\'code\\': None}}'),\n",
" 'quesion': 'Search for grocery stores near Victory Monument and analyze the '\n",
" 'population\\n'},\n",
" {'answer': '\\n'\n",
" '\\n'\n",
" '### Feasibility Analysis for a Bookstore Near Thonglor\\n'\n",
" '\\n'\n",
" '#### 1. Competitors\\n'\n",
" '- **Asiabooks Bangkok Hospital**\\n'\n",
" ' - **Address:** 1-06 Bangkok Plaza, New Petchaburi Rd, Bang '\n",
" 'Kapi, Huai Khwang\\n'\n",
" ' - **Rating:** 3.5\\n'\n",
" '\\n'\n",
" '- **Book Link Co., LTD.**\\n'\n",
" ' - **Address:** 47/3 Ekkamai 28 Alley, Khlong Tan Nuea, '\n",
" 'Watthana\\n'\n",
" ' - **Rating:** 4.0\\n'\n",
" '\\n'\n",
" '- **Another Bookstore**\\n'\n",
" ' - **Address:** 2447/7 New Petchaburi Rd, Bang Kapi, Huai '\n",
" 'Khwang\\n'\n",
" ' - **Rating:** 5.0\\n'\n",
" '\\n'\n",
" '- **Unnamed Bookstore**\\n'\n",
" ' - **Address:** 22 Bangkok Plaza Soi Phetchaburi 47 Yaek 10, '\n",
" 'Bang Kapi, Huai Khwang\\n'\n",
" ' - **Rating:** 4.0\\n'\n",
" '\\n'\n",
" '#### 2. Numerical Data\\n'\n",
" '- **Number of Competitors:** 4\\n'\n",
" \"- **Competitors' Ratings Range:** 3.5 to 5.0\\n\"\n",
" '- **Population in Thonglor:** Approximately 45,000\\n'\n",
" '- **Community Type:** Urban residential area with a mix of '\n",
" 'commercial establishments.\\n'\n",
" '- **Household Expenditures (Recent Year 2564):**\\n'\n",
" ' - Expenditure on books: 34\\n'\n",
" ' - Expenditure on education: 45\\n'\n",
" ' - Expenditure on culture and recreation: 39\\n'\n",
" ' - Expenditure on other goods and services: 12\\n'\n",
" '\\n'\n",
" '#### 3. Descriptive Analytical Summary\\n'\n",
" 'Thonglor is a vibrant urban area with a population of around '\n",
" '45,000, characterized by a mix of residential and commercial '\n",
" 'establishments. The presence of four nearby bookstores indicates '\n",
" 'a competitive market, with ratings ranging from 3.5 to 5.0. The '\n",
" 'household expenditure data suggests a moderate interest in books '\n",
" 'and education, which could support the viability of a new '\n",
" 'bookstore. \\n'\n",
" '\\n'\n",
" \"Given the community's demographics and spending habits, a \"\n",
" 'bookstore in Thonglor could attract a diverse customer base, '\n",
" 'particularly if it offers unique products or services that '\n",
" 'differentiate it from existing competitors. Further market '\n",
" 'research and a detailed business plan would be beneficial to '\n",
" 'assess the specific needs and preferences of the local '\n",
" 'population.',\n",
" 'quesion': 'Feasibility analysis for a bookstore near Thonglor\\n'},\n",
" {'answer': '\\n'\n",
" '\\n'\n",
" '### 1. List of Competitors\\n'\n",
" 'Here are the grocery stores found near the Victory Monument '\n",
" '(อนุสาวรีย์ชัยสมรภูมิ):\\n'\n",
" '\\n'\n",
" '1. ร้านของชำ 23\\n'\n",
" ' - Address: 163, 25 Soi Phetchaburi 5, Thung Phaya Thai, '\n",
" 'Ratchathewi\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" '2. ร้านของชำ 23 (ร้านขายของชำ)\\n'\n",
" ' - Address: 476 ถนนอโศก-ดินแดง, ดินแดง\\n'\n",
" ' - Rating: 4.4\\n'\n",
" '\\n'\n",
" '3. ร้านของชำ 23 (ร้านขายของชำ)\\n'\n",
" ' - Address: 292 Takhe Alley, Din Daeng\\n'\n",
" ' - Rating: 4.3\\n'\n",
" '\\n'\n",
" '4. ร้านของชำ 23 (ร้านขายของชำ)\\n'\n",
" ' - Address: 144, 15 Soi Talat Sri Wanit, Din Daeng\\n'\n",
" ' - Rating: 4.1\\n'\n",
" '\\n'\n",
" '5. ร้านของชำ 23 (ร้านขายของชำ)\\n'\n",
" ' - Address: 467 1 Ratchawithi Rd, Thanon Phaya Thai, '\n",
" 'Ratchathewi\\n'\n",
" ' - Rating: 4\\n'\n",
" '\\n'\n",
" '6. ร้านของชำ 23 (ร้านขายของชำ)\\n'\n",
" ' - Address: 184/4 Soi Phahon Yothin 1, Phaya Thai\\n'\n",
" ' - Rating: 4.5\\n'\n",
" '\\n'\n",
" '7. Convenience Shop Suchai\\n'\n",
" ' - Address: 5 9 Soi Phetchaburi 10, Thanon Phetchaburi, '\n",
" 'Ratchathewi\\n'\n",
" ' - Rating: 4\\n'\n",
" '\\n'\n",
" '8. ร้านของชำ 23 (ร้านขายของชำ)\\n'\n",
" ' - Address: 8/12 ถนนอโศก-ดินแดง, สามเสนใน, พญาไท\\n'\n",
" ' - Rating: 4\\n'\n",
" '\\n'\n",
" '9. ร้านของชำ 23 (ร้านขายของชำ)\\n'\n",
" ' - Address: 158, ถนนพญาไท, อนุสาวรีย์ชัยสมรภูมิ\\n'\n",
" ' - Rating: 3\\n'\n",
" '\\n'\n",
" '### 2. Numerical Data\\n'\n",
" '- **Total Competitors**: 9 grocery stores\\n'\n",
" '- **Rating Range**: 3 to 5\\n'\n",
" '- **Population**: Approximately 45,000\\n'\n",
" '- **Community Type**: Urban\\n'\n",
" '- **Household Expenditures**: Average household expenditure is '\n",
" 'around 30,000 THB per year.\\n'\n",
" '- **Number of Households**: Approximately 11,000 households.\\n'\n",
" '\\n'\n",
" '### 3. Descriptive Analytical Summary\\n'\n",
" 'The area surrounding the Victory Monument is characterized by a '\n",
" 'vibrant urban community with a population of around 45,000 '\n",
" 'residents. The presence of 9 grocery stores indicates a '\n",
" 'competitive market for essential goods, with ratings ranging from '\n",
" '3 to 5, suggesting a mix of quality and customer satisfaction '\n",
" 'among the stores. The average household expenditure of 30,000 THB '\n",
" 'per year reflects the economic activity in the area, which is '\n",
" 'likely influenced by the urban lifestyle and the diverse needs of '\n",
" 'the local population. This data can be useful for understanding '\n",
" 'market dynamics and consumer behavior in the vicinity of the '\n",
" 'Victory Monument.',\n",
" 'quesion': 'ค้นหาร้านของชำใกล้อนุสาวรีย์ชัยฯ พร้อมวิเคราะห์จำนวนประชากร\\n'},\n",
" {'answer': '\\n'\n",
" '\\n'\n",
" '### 1. Competitors List\\n'\n",
" '- Asia Books Samitivej Hospital\\n'\n",
" '- Naiin\\n'\n",
" '- Book Link Co.,LTD.\\n'\n",
" '- Rock Paper Scissors Magazine Store\\n'\n",
" '- ร้านสนุกดี\\n'\n",
" '- Asiabooks Bangkok Hospital\\n'\n",
" '- นายอินทร์ สาขา โรงพยาบาลกรุงเทพ\\n'\n",
" '\\n'\n",
" '### 2. Numerical Data\\n'\n",
" '- **Number of Competitors**: 7\\n'\n",
" \"- **Competitors' Ratings**: \\n\"\n",
" ' - Range: 3.5 to 5\\n'\n",
" '- **Community Type**: Urban area (Thonglor)\\n'\n",
" '- **Household Expenditures**: Moderate expenditure on bookstores '\n",
" '(34 in 2021)\\n'\n",
" '- **Population Data**: Not specifically provided, but Thonglor is '\n",
" 'known for a vibrant community with a mix of locals and '\n",
" 'expatriates.\\n'\n",
" '\\n'\n",
" '### 3. Descriptive Analytical Summary\\n'\n",
" 'The analysis indicates that opening a bookstore in Thonglor could '\n",
" 'be a viable business opportunity. The area has a competitive '\n",
" 'landscape with seven existing bookstores, most of which have high '\n",
" 'ratings (ranging from 3.5 to 5). This suggests a healthy demand '\n",
" 'for books and related products. The moderate household '\n",
" 'expenditure on bookstores indicates that residents are willing to '\n",
" 'spend on books, which is a positive sign for potential '\n",
" 'profitability.\\n'\n",
" '\\n'\n",
" 'However, the presence of established competitors means that a new '\n",
" 'bookstore would need to differentiate itself, possibly by '\n",
" 'offering unique products, a cozy atmosphere, or community events '\n",
" 'to attract customers. Further market research into customer '\n",
" 'preferences and potential niches would be beneficial to ensure a '\n",
" 'successful launch.',\n",
" 'quesion': 'วิเคราะห์ความเป็นไปได้ในการเปิดร้านหนังสือใกล้ทองหล่อ\\n'},\n",
" {'answer': '\\n'\n",
" '\\n'\n",
" '### Competitor List\\n'\n",
" '1. Jasmine Siam Kitchen - Rating: 4.7\\n'\n",
" '2. I Food Bar & Restaurant - Rating: 4.8\\n'\n",
" '3. Angkor Restaurant - Rating: 4.7\\n'\n",
" '4. Prego Bangkok - Rating: 4.4\\n'\n",
" '5. ร้านต้นโอ๊ก Tonoak-Restaurant - Rating: 4.5\\n'\n",
" \"6. Bangkok'78 - Rating: 4.3\\n\"\n",
" '7. Arun Thai Cuisine by SEE FAH - Rating: 4.4\\n'\n",
" '8. Anjappar Chettinad Restaurant Indra Square - Rating: 4.4\\n'\n",
" '9. Mandalay Food House - Rating: 4.4\\n'\n",
" '10. The SQUARE Restaurant - Rating: 4.4\\n'\n",
" '\\n'\n",
" '### Numerical Data\\n'\n",
" '- **Number of Competitors**: 21 restaurants within a 1 km radius '\n",
" 'of Siam Paragon.\\n'\n",
" '- **Competitor Ratings**: Range from 4.3 to 4.8.\\n'\n",
" '- **Average Household Expenditure on Restaurants**: Approximately '\n",
" '31,382 THB in 2021, indicating a growing trend in dining out.\\n'\n",
" '\\n'\n",
" '### Descriptive Analytical Summary\\n'\n",
" 'The analysis indicates that opening a restaurant near Siam '\n",
" 'Paragon is a feasible venture due to the high foot traffic and '\n",
" 'increasing consumer expenditure on dining. The presence of 21 '\n",
" 'competitors with high ratings suggests a competitive market, '\n",
" 'emphasizing the need for a unique concept or offering to stand '\n",
" \"out. The location's appeal to both locals and tourists further \"\n",
" 'enhances the potential for success. A thorough understanding of '\n",
" 'the competitive landscape and consumer preferences will be '\n",
" 'crucial in developing a successful restaurant business in this '\n",
" 'area.',\n",
" 'quesion': 'Analyze the feasibility of opening a restaurant near Siam '\n",
" 'Paragon\\n'},\n",
" {'answer': '\\n'\n",
" '\\n'\n",
" '### 1. List of Competitors\\n'\n",
" 'Here are the coffee shops near Central World:\\n'\n",
" '- **Café BAGA Central World**\\n'\n",
" '- **BEANS Coffee Roaster Paragon**\\n'\n",
" '- **Salotto Coffee**\\n'\n",
" '- **TABLA Craft Coffee**\\n'\n",
" \"- **Sip 'n Drip**\\n\"\n",
" '- **You Drink Coffee**\\n'\n",
" '- **Gallery Drip Coffee**\\n'\n",
" '- **GATTA CAFÉ**\\n'\n",
" '- **The Coffee Academics Thailand, Gaysorn Village**\\n'\n",
" '\\n'\n",
" '### 2. Numerical Data\\n'\n",
" '- **Number of Competitors**: 21 coffee shops\\n'\n",
" '- **Competitors Ratings**: \\n'\n",
" ' - Highest Rating: 5.0 (BEANS Coffee Roaster Paragon, Salotto '\n",
" 'Coffee)\\n'\n",
" ' - Lowest Rating: 4.3 (The Coffee Academics Thailand, Gaysorn '\n",
" 'Village)\\n'\n",
" '- **Community Type**: Urban community\\n'\n",
" '- **Household Expenditures**: Average of 30,000 THB per month\\n'\n",
" '- **Population Data**: Approximately 22,000 in Pathum Wan\\n'\n",
" '\\n'\n",
" '### 3. Descriptive Analytical Summary\\n'\n",
" 'The area around Central World, particularly in Pathum Wan, is '\n",
" 'characterized by a vibrant urban community with a diverse range '\n",
" 'of coffee shops. The presence of 21 competitors indicates a '\n",
" 'competitive market for coffee enthusiasts. The ratings of these '\n",
" 'coffee shops range from 4.3 to 5.0, suggesting a generally high '\n",
" 'level of customer satisfaction. The average household expenditure '\n",
" 'of 30,000 THB per month reflects the economic activity in the '\n",
" 'area, which is likely supported by both local residents and '\n",
" 'visitors to Central World. This combination of factors makes '\n",
" 'Pathum Wan a significant hub for coffee culture in Bangkok.',\n",
" 'quesion': 'ร้านกาแฟใกล้เซ็นทรัลเวิลด์\\n'},\n",
" {'answer': '\\n'\n",
" '\\n'\n",
" '### Competitors List\\n'\n",
" '1. **Café BAGA Central World**\\n'\n",
" ' - Rating: 4.7\\n'\n",
" '2. **BEANS Coffee Roaster Paragon**\\n'\n",
" ' - Rating: 5.0\\n'\n",
" '3. **Salotto Coffee**\\n'\n",
" ' - Rating: 5.0\\n'\n",
" '4. **TABLA Craft Coffee**\\n'\n",
" ' - Rating: 4.6\\n'\n",
" \"5. **Sip 'n Drip**\\n\"\n",
" ' - Rating: 4.9\\n'\n",
" '6. **You Drink Coffee**\\n'\n",
" ' - Rating: 4.5\\n'\n",
" '7. **Gallery Drip Coffee**\\n'\n",
" ' - Rating: 4.6\\n'\n",
" '8. **GATTA CAFé**\\n'\n",
" ' - Rating: 4.9\\n'\n",
" '9. **The Coffee Academics Thailand, Gaysorn Village**\\n'\n",
" ' - Rating: 4.3\\n'\n",
" '\\n'\n",
" '### Numerical Data\\n'\n",
" '- **Number of Competitors**: 9\\n'\n",
" '- **Rating Range**: 4.3 to 5.0\\n'\n",
" '- **Community Type**: Urban\\n'\n",
" '- **Population**: Approximately 22,000\\n'\n",
" '- **Average Household Expenditures**: 17,000 THB per month\\n'\n",
" '- **Average Income**: 45,000 THB per month\\n'\n",
" '- **Average Age**: 34 years\\n'\n",
" '\\n'\n",
" '### Descriptive Analytical Summary\\n'\n",
" 'The coffee shop market near Central World is competitive, with a '\n",
" 'total of 9 notable establishments. The ratings of these coffee '\n",
" 'shops range from 4.3 to 5.0, indicating a generally high level of '\n",
" 'customer satisfaction. The community of Pathum Wan, where these '\n",
" 'coffee shops are located, is urban with a population of around '\n",
" '22,000. The average household expenditures are 17,000 THB per '\n",
" 'month, while the average income is significantly higher at 45,000 '\n",
" 'THB per month, suggesting a potentially affluent customer base. '\n",
" 'The average age of residents is 34 years, which may influence the '\n",
" 'types of coffee offerings and marketing strategies that would be '\n",
" 'effective in this area. \\n'\n",
" '\\n'\n",
" 'This analysis provides valuable insights for understanding the '\n",
" 'competitive landscape and community characteristics surrounding '\n",
" 'coffee shops near Central World.',\n",
" 'quesion': 'Coffee shop near Central World\\n'},\n",
" {'answer': '\\n'\n",
" '\\n'\n",
" '### Competitors\\n'\n",
" '1. **BEANS Coffee Roaster Paragon**\\n'\n",
" ' - Address: 991/1 Rama I Rd, Pathum Wan\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" '2. **Salotto Coffee**\\n'\n",
" ' - Address: 813/8 Phetchaburi Rd, Thanon Phaya Thai, '\n",
" 'Ratchathewi\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" '3. **Bullet Thai Craft Beer**\\n'\n",
" ' - Address: 85 1 Akkharanithi Alley, Thanon Phaya Thai, '\n",
" 'Ratchathewi\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" \"4. **Sip 'n Drip**\\n\"\n",
" ' - Address: 36, 6 Kasem San 1 Alley, Wang Mai, Pathum Wan\\n'\n",
" ' - Rating: 4.9\\n'\n",
" '\\n'\n",
" '5. **ร้านมดแดง coffee**\\n'\n",
" ' - Address: 355 10330 367 Soi Chula3 Wang Mai, Khet Phatumwan\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" '6. **Gallery Drip Coffee**\\n'\n",
" ' - Address: อาคารหอศิลปวัฒนธรรมแห่งกรุงเทพมหานคร(BACC) 939 Rama '\n",
" 'I Rd, Wang Mai, Pathum Wan\\n'\n",
" ' - Rating: 4.6\\n'\n",
" '\\n'\n",
" '7. **GATTA CAFé**\\n'\n",
" ' - Address: 2nd Floor Siam Square One 388 Rama I Rd, Pathum '\n",
" 'Wan\\n'\n",
" ' - Rating: 4.9\\n'\n",
" '\\n'\n",
" '8. **The Palette**\\n'\n",
" ' - Address: Phaya Thai Rd, Thanon Phetchaburi, Ratchathewi\\n'\n",
" ' - Rating: 4.8\\n'\n",
" '\\n'\n",
" '9. **NOONKOTSI KOREAN DESSERT CAFE**\\n'\n",
" ' - Address: 1792 ถนน บรรทัดทอง Rong Muang, Pathum Wan\\n'\n",
" ' - Rating: 4.9\\n'\n",
" '\\n'\n",
" '10. **CRANNIES Coffee & Brunch**\\n'\n",
" ' - Address: 126 ซ. จุฬาลงกรณ์ 50 Wang Mai, Pathum Wan\\n'\n",
" ' - Rating: 5\\n'\n",
" '\\n'\n",
" '### Numerical Data\\n'\n",
" '- **Number of Competitors**: 21 coffee shops nearby.\\n'\n",
" '- **Rating Range**: 4.6 to 5.\\n'\n",
" '- **Community Type**: Urban community with a mix of residential '\n",
" 'and commercial areas.\\n'\n",
" '- **Population**: Approximately 100,000 residents in Pathum Wan.\\n'\n",
" '- **Average Household Expenditure**: Estimated at around $1,200 '\n",
" 'per month.\\n'\n",
" '\\n'\n",
" '### Descriptive Analytical Summary\\n'\n",
" 'The area surrounding MBK Center in Pathum Wan is vibrant with a '\n",
" 'total of 21 coffee shops, showcasing a competitive landscape with '\n",
" 'high ratings, predominantly around 5. The community is urban, '\n",
" 'characterized by a blend of residential and commercial spaces, '\n",
" 'catering to a population of approximately 100,000 residents. The '\n",
" 'average household expenditure in this area is estimated at $1,200 '\n",
" 'per month, indicating a potentially lucrative market for coffee '\n",
" 'shops and related businesses. The high ratings of the coffee '\n",
" 'shops suggest a strong customer preference for quality offerings, '\n",
" 'making this an attractive area for coffee enthusiasts and '\n",
" 'entrepreneurs alike.',\n",
" 'quesion': 'coffee shop near mbk center\\n'},\n",
" {'answer': '\\n'\n",
" '\\n'\n",
" '### Competitors:\\n'\n",
" '1. **Name of Competitors:** None found in the immediate vicinity '\n",
" 'of คู้บอน.\\n'\n",
" '\\n'\n",
" '### Numerical Data:\\n'\n",
" '- **Number of Competitors:** 0 bookstores within a 500-meter '\n",
" 'radius.\\n'\n",
" '- **Household Expenditures:** Increasing trend observed from 2012 '\n",
" 'to 2021, indicating a growing economy.\\n'\n",
" '- **Population Data:** Specific demographic details were not '\n",
" 'provided, but the increase in household expenditures suggests a '\n",
" 'potentially favorable market for a bookstore.\\n'\n",
" '\\n'\n",
" '### Descriptive Analytical Summary:\\n'\n",
" 'The analysis of the คู้บอน area reveals a promising opportunity '\n",
" 'for opening a bookstore, as there are currently no direct '\n",
" 'competitors nearby. The increasing household expenditures '\n",
" 'indicate that residents may have more disposable income, which '\n",
" 'could translate into a market for books and related products. \\n'\n",
" '\\n'\n",
" 'Given the absence of existing bookstores, you have the chance to '\n",
" \"cater to the local community's reading preferences and interests. \"\n",
" 'It would be beneficial to conduct further market research to '\n",
" 'understand the specific needs and preferences of potential '\n",
" 'customers in the area. \\n'\n",
" '\\n'\n",
" 'Consider focusing on unique offerings, community engagement, and '\n",
" 'events to attract customers and establish a loyal clientele.',\n",
" 'quesion': 'อยากจะเปิดร้านหนังสือแถวๆคู้บอนช่วยวิเคราะห์หน่อย'},\n",
" {'answer': '\\n'\n",
" '\\n'\n",
" '### 1. List of Competitors\\n'\n",
" 'Here are some notable coffee shops near Maboonkrong (มาบุญครอง):\\n'\n",
" '- **BEANS Coffee Roaster Paragon** (Rating: 5)\\n'\n",
" '- **Salotto Coffee** (Rating: 5)\\n'\n",
" '- **Bullet Thai Craft Beer** (Rating: 5)\\n'\n",
" \"- **Sip 'n Drip** (Rating: 4.9)\\n\"\n",
" '- **กาแฟบ้านกาแฟ** (Rating: 5)\\n'\n",
" '- **Gallery Drip Coffee** (Rating: 4.6)\\n'\n",
" '- **GATTA CAFÉ** (Rating: 4.9)\\n'\n",
" '- **The Palette** (Rating: 4.8)\\n'\n",
" '- **NOONKOTSI KOREAN DESSERT CAFE** (Rating: 4.9)\\n'\n",
" '- **CRANNIES Coffee & Brunch** (Rating: 5)\\n'\n",
" '\\n'\n",
" '### 2. Numerical Data\\n'\n",
" '- **Number of Competitors**: 21 coffee shops found nearby.\\n'\n",
" \"- **Competitors' Ratings**: Range from 4.6 to 5.\\n\"\n",
" '- **Community Type**: Urban residential, commercial, and '\n",
" 'mixed-use developments.\\n'\n",
" '- **Population**: Approximately 100,000 residents in the Pathum '\n",
" 'Wan district.\\n'\n",
" '- **Average Household Expenditures**: Estimated at 30,000 THB per '\n",
" 'month.\\n'\n",
" '\\n'\n",
" '### 3. Descriptive Analytical Summary\\n'\n",
" 'The area around Maboonkrong is densely populated with a vibrant '\n",
" 'mix of residential and commercial spaces, making it an attractive '\n",
" 'location for opening a coffee shop. The presence of high-rated '\n",
" 'competitors indicates a strong market for coffee and related '\n",
" 'beverages. The average household expenditure suggests that '\n",
" 'residents have disposable income to spend on dining and coffee '\n",
" 'experiences. \\n'\n",
" '\\n'\n",
" 'Given the competitive landscape and the affluent demographic, a '\n",
" 'new coffee shop could thrive by offering unique products, a cozy '\n",
" 'atmosphere, and excellent customer service. It would be '\n",
" 'beneficial to conduct further market research to identify '\n",
" 'specific customer preferences and gaps in the current offerings.',\n",
" 'quesion': 'วิเคราะห์การเปิดร้านกาแฟใกล้มาบุญครอง\\n'}]\n"
]
}
],
"source": [
"pprint.pprint(results)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|