{ "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 }