{ "cells": [ { "cell_type": "code", "execution_count": 5, "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": 6, "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": 7, "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": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[{'answer': 'FINAL ANSWER\\n'\n", " '\\n'\n", " '### Coffee Shops Near Central World and Pathum Wan, Bangkok\\n'\n", " '\\n'\n", " '#### Location Information\\n'\n", " '- **Location Name:** Pathum Wan\\n'\n", " '- **Address:** Pathum Wan, Bangkok 10330, Thailand\\n'\n", " '- **Google Place ID:** ChIJ9dY-MdSe4jAR8E3iXbIAAQM\\n'\n", " '\\n'\n", " '#### Coffee Shops Nearby Central World\\n'\n", " '1. **BEANS Coffee Roaster Paragon**\\n'\n", " ' - Address: 991/1 Rama I Rd, Pathum Wan\\n'\n", " ' - Rating: 5\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '2. **Fellas.coffee @soi tonson**\\n'\n", " ' - Address: 34/1 Soi Ton Son, Pathum Wan\\n'\n", " ' - Rating: 4.9\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '3. **Earthy Roaster (Specialty Coffee)**\\n'\n", " ' - Address: 994 Makkasan, Ratchathewi\\n'\n", " ' - Rating: 4.8\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '4. **Café BAGA Central World**\\n'\n", " ' - Address: 3rd Floor, CentralWorld, Ratchadamri Rd, Pathum '\n", " 'Wan\\n'\n", " ' - Rating: 4.7\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '5. **Early Bird Coffee - Chit Lom BTS**\\n'\n", " ' - Address: Chit Lom BTS Lumpini, Pathum Wan\\n'\n", " ' - Rating: 4.8\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '#### Additional Coffee Shops in Pathum Wan\\n'\n", " '1. **Angle Coffee**\\n'\n", " ' - Address: Makkasan, Ratchathewi\\n'\n", " ' - Rating: 5\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '2. **Olympic Coffee**\\n'\n", " ' - Address: 43/4 Rama VI Rd, Rong Muang, Pathum Wan\\n'\n", " ' - Rating: 4.8\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '3. **Factory Coffee - BKK**\\n'\n", " ' - Address: 49 Phaya Thai Rd, Thanon Phaya Thai, Ratchathewi\\n'\n", " ' - Rating: 4.5\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '4. **Treasure Specialty Coffee**\\n'\n", " ' - Address: MINT TOWER Bantadthong Phetchaburi Rd, Subdistrict '\n", " 'Pathum Wan\\n'\n", " ' - Rating: 4.9\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '5. **The Coffee Academics**\\n'\n", " ' - Address: Velaa Sindhorn Village Langsuan, 87 Soi Langsuan, '\n", " 'Lumphini, Pathum Wan\\n'\n", " ' - Rating: 4.4\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '### Summary\\n'\n", " 'The area around Central World and Pathum Wan is rich in coffee '\n", " 'shop options, with many highly rated establishments. The coffee '\n", " 'culture in this urban area is vibrant, catering to both locals '\n", " 'and tourists. The shops vary in ambiance and offerings, providing '\n", " 'a range of choices for coffee enthusiasts. The population density '\n", " 'and urban setting suggest a strong market for coffee shops, with '\n", " 'potential for further growth and innovation in the sector.',\n", " 'quesion': 'Coffee shop near Central World\\n'},\n", " {'answer': 'FINAL ANSWER\\n'\n", " '\\n'\n", " '### Bakery Competitor Analysis Near Chatuchak Market\\n'\n", " '\\n'\n", " '#### Competitors Overview\\n'\n", " '1. **Sanan Bakery**\\n'\n", " ' - **Address:** 101 Phahonyothin Rd, Lat Yao, Chatuchak\\n'\n", " ' - **Rating:** 4.4\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '2. **The Croissant Corner**\\n'\n", " ' - **Address:** Phahon Yothin 15 Alley, Samsen Nai, Phaya Thai, '\n", " 'Chatuchak\\n'\n", " ' - **Rating:** 4.7\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '3. **Baked With Hearts**\\n'\n", " ' - **Address:** 485 Phahon Yothin 18/1 Alley, Lane 1, Chom '\n", " 'Phon, Chatuchak\\n'\n", " ' - **Rating:** 4.6\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '4. **JJ Mall One More Bite Japanese Bakery**\\n'\n", " ' - **Address:** 588 Kamphaeng Phet 2 Rd, Chatuchak\\n'\n", " ' - **Rating:** 4.9\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '5. **Triple D Bakery @ Chatuchak Market**\\n'\n", " ' - **Address:** 47 Section 4, Khwaeng Chatuchak, Khet '\n", " 'Chatuchak\\n'\n", " ' - **Rating:** 4.9\\n'\n", " ' - **Opening Hours:** Closed\\n'\n", " '\\n'\n", " \"6. **Bellinee's Bake & Brew**\\n\"\n", " ' - **Address:** Chatuchak Weekend Market, Khwaeng Chatuchak, '\n", " 'Khet Chatuchak\\n'\n", " ' - **Rating:** 3.9\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '7. **Miss Muay Bakery**\\n'\n", " ' - **Address:** Kamphaeng Phet Rd, Chatuchak\\n'\n", " ' - **Rating:** 3.8\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '8. **Mom’s FF Cafe & Bakery**\\n'\n", " ' - **Address:** 356-357, Chatuchak\\n'\n", " ' - **Rating:** 5\\n'\n", " ' - **Opening Hours:** N/A\\n'\n", " '\\n'\n", " '9. **Makarong**\\n'\n", " ' - **Address:** Chatuchak Weekend Market\\n'\n", " ' - **Rating:** 4.9\\n'\n", " ' - **Opening Hours:** Closed\\n'\n", " '\\n'\n", " '10. **Wipada Herb Coffee and Bakery**\\n'\n", " ' - **Address:** 2 Kamphaeng Phet Rd, Chatuchak\\n'\n", " ' - **Rating:** 0\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '### Summary\\n'\n", " '- **Total Competitors Found:** 15 bakeries\\n'\n", " '- **Average Rating of Competitors:** Approximately 4.3\\n'\n", " '- **Opening Hours:** Most bakeries are currently open, with a few '\n", " 'closed or with unknown hours.\\n'\n", " '\\n'\n", " 'This competitive landscape indicates a vibrant market for '\n", " 'bakeries in the Chatuchak area, with several high-rated options '\n", " 'available.',\n", " 'quesion': 'วิเคราะห์คู่แข่งของร้านเบเกอรี่ใกล้ตลาดจตุจักร\\n'},\n", " {'answer': 'FINAL ANSWER\\n'\n", " '\\n'\n", " '### Coffee Shops Near MBK Center and Pathum Wan Area\\n'\n", " '\\n'\n", " '#### Location Information\\n'\n", " '- **Location Name:** Pathum Wan\\n'\n", " '- **Address:** Pathum Wan, Bangkok 10330, Thailand\\n'\n", " '- **Google Place ID:** ChIJ9dY-MdSe4jAR8E3iXbIAAQM\\n'\n", " '\\n'\n", " '#### Top Coffee Shops\\n'\n", " '1. **Angle Coffee**\\n'\n", " ' - **Address:** Makkasan, Ratchathewi\\n'\n", " ' - **Rating:** 5\\n'\n", " ' - **Open Now:** Yes\\n'\n", " '\\n'\n", " '2. **Olympic Coffee**\\n'\n", " ' - **Address:** 43/4 Rama VI Rd, Rong Muang, Pathum Wan\\n'\n", " ' - **Rating:** 4.8\\n'\n", " ' - **Open Now:** Yes\\n'\n", " '\\n'\n", " '3. **Factory Coffee - BKK**\\n'\n", " ' - **Address:** 49 Phaya Thai Rd, Thanon Phaya Thai, '\n", " 'Ratchathewi\\n'\n", " ' - **Rating:** 4.5\\n'\n", " ' - **Open Now:** Yes\\n'\n", " '\\n'\n", " '4. **Earthy Roaster (Specialty Coffee)**\\n'\n", " ' - **Address:** 994 Makkasan, Ratchathewi\\n'\n", " ' - **Rating:** 4.8\\n'\n", " ' - **Open Now:** Yes\\n'\n", " '\\n'\n", " '5. **Treasure Specialty Coffee**\\n'\n", " ' - **Address:** MINT TOWER Bantadthong Phetchaburi Rd, '\n", " 'Subdistrict Pathum Wan\\n'\n", " ' - **Rating:** 4.9\\n'\n", " ' - **Open Now:** Yes\\n'\n", " '\\n'\n", " \"6. **COFFEE cafe' 27**\\n\"\n", " ' - **Address:** 27 Samsen Nai, Phaya Thai\\n'\n", " ' - **Rating:** 4.8\\n'\n", " ' - **Open Now:** Yes\\n'\n", " '\\n'\n", " '7. **D Coffee House**\\n'\n", " ' - **Address:** 445 Rama I Rd, Rong Muang, Pathum Wan\\n'\n", " ' - **Rating:** 4.9\\n'\n", " ' - **Open Now:** Yes\\n'\n", " '\\n'\n", " '8. **RISE COFFEE - Flagship Store**\\n'\n", " ' - **Address:** 888 Phloen Chit Rd, Lumphini, Pathum Wan\\n'\n", " ' - **Rating:** 4.8\\n'\n", " ' - **Open Now:** Yes\\n'\n", " '\\n'\n", " '9. **Number. 9 Coffee Roastery**\\n'\n", " ' - **Address:** 9 Samsen Nai, Phaya Thai\\n'\n", " ' - **Rating:** 4.8\\n'\n", " ' - **Open Now:** Yes\\n'\n", " '\\n'\n", " '10. **Aribica Specialty Coffee (Sahakorn branch)**\\n'\n", " ' - **Address:** 4, 1 Soi Ari 1, Phaya Thai\\n'\n", " ' - **Rating:** 4.6\\n'\n", " ' - **Open Now:** Yes\\n'\n", " '\\n'\n", " '### Summary\\n'\n", " '- **Number of Coffee Shops Found:** More than 20\\n'\n", " '- **Community Type:** Urban\\n'\n", " '- **Population Data:** Not specified, but Pathum Wan is a densely '\n", " 'populated area in Bangkok.\\n'\n", " '\\n'\n", " 'This report provides a comprehensive overview of coffee shops '\n", " 'near MBK Center and the surrounding Pathum Wan area, highlighting '\n", " 'their ratings and operational status.',\n", " 'quesion': 'coffee shop near mbk center\\n'},\n", " {'answer': 'FINAL ANSWER\\n'\n", " '\\n'\n", " '### Analysis of Restaurants Near Lumpini Center, Lat Phrao\\n'\n", " '\\n'\n", " '#### Location Information\\n'\n", " '- **Lumpini Center Address:** \\n'\n", " ' - 60 127 Soi Lat Phrao 111, Khwaeng Khlong Chan, Khet Bang '\n", " 'Kapi, Krung Thep Maha Nakhon 10240, Thailand\\n'\n", " ' - **Phone:** 02 374 8394\\n'\n", " ' - **Website:** [Lumpini Center](https://www.lpn.co.th/)\\n'\n", " '\\n'\n", " '#### Nearby Restaurants\\n'\n", " '1. **Thai Flavours**\\n'\n", " ' - **Address:** QJCP+JJW, Soi Lat Phrao 111, Khlong Chan, Bang '\n", " 'Kapi District\\n'\n", " ' - **Rating:** 5.0\\n'\n", " ' - **Opening Hours:** Not available\\n'\n", " '\\n'\n", " '2. **Xiang**\\n'\n", " ' - **Address:** 3101 Lat Phrao Rd, Khlong Chan, Bang Kapi '\n", " 'District\\n'\n", " ' - **Rating:** 4.8\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " \"3. **Khun Young's Kitchen**\\n\"\n", " ' - **Address:** 67, 16 Lat Phrao Rd, Khlong Chan, Bang Kapi '\n", " 'District\\n'\n", " ' - **Rating:** 4.8\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '4. **Kham Thai - Myanmar Restaurant**\\n'\n", " ' - **Address:** QJ6W+X2J, Ramkhamhaeng Rd, Hua Mak, Bang Kapi '\n", " 'District\\n'\n", " ' - **Rating:** 5.0\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '5. **107 PaHung Restaurant**\\n'\n", " ' - **Address:** Soi Lat Phrao 107, Khlong Chan, Bang Kapi '\n", " 'District\\n'\n", " ' - **Rating:** 4.4\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '6. **Mellow Steak**\\n'\n", " ' - **Address:** 453 Lat Phrao 107 Alley, Lane 9, Khlong Chan, '\n", " 'Bang Kapi District\\n'\n", " ' - **Rating:** 4.6\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '7. **Food Zone**\\n'\n", " ' - **Address:** QJ9V+C4J, Bangkok, Bang Kapi\\n'\n", " ' - **Rating:** 4.8\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '8. **Lucky Suki**\\n'\n", " ' - **Address:** 3109 Lat Phrao Rd, Khlong Chan, Bang Kapi '\n", " 'District\\n'\n", " ' - **Rating:** 4.2\\n'\n", " ' - **Opening Hours:** Open now\\n'\n", " '\\n'\n", " '### Summary\\n'\n", " '- The area surrounding Lumpini Center is rich in dining options, '\n", " 'with many restaurants rated above 4.0, indicating high customer '\n", " 'satisfaction.\\n'\n", " '- The variety of cuisines available, including Thai and '\n", " 'international options, caters to diverse tastes and preferences, '\n", " 'making it a vibrant dining destination. \\n'\n", " '\\n'\n", " 'If you require more specific insights or additional information, '\n", " 'please let me know!',\n", " 'quesion': 'วิเคราะห์ร้านอาหารแถวลุมพินี เซ็นเตอร์ ลาดพร้าว\\n'},\n", " {'answer': 'Here are the results for coffee shops near MBK Center in Bangkok, '\n", " 'along with the population analysis for Bangkok:\\n'\n", " '\\n'\n", " '### Coffee Shops Near MBK Center:\\n'\n", " '1. **BEANS Coffee Roaster Paragon**\\n'\n", " ' - Address: 991/1 Rama I Rd, Pathum Wan\\n'\n", " ' - Rating: 5\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '2. **Olympic Coffee**\\n'\n", " ' - Address: 43/4 Rama VI Rd, Rong Muang, Pathum Wan\\n'\n", " ' - Rating: 4.8\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '3. **The Palette**\\n'\n", " ' - Address: Phaya Thai Rd, Thanon Phetchaburi, Ratchathewi\\n'\n", " ' - Rating: 4.8\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '4. **Treasure Specialty Coffee**\\n'\n", " ' - Address: MINT TOWER Bantadthong Phetchaburi Rd, Subdistrict '\n", " 'Pathum Wan\\n'\n", " ' - Rating: 4.9\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '5. **Salotto Coffee**\\n'\n", " ' - Address: 813/8 Phetchaburi Rd, Thanon Phaya Thai, '\n", " 'Ratchathewi\\n'\n", " ' - Rating: 5\\n'\n", " ' - Open Now: N/A\\n'\n", " '\\n'\n", " \"6. **Sip 'n Drip**\\n\"\n", " ' - Address: 36, 6 Kasem San 1 Alley, Wang Mai, Pathum Wan\\n'\n", " ' - Rating: 4.9\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '7. **D Coffee House**\\n'\n", " ' - Address: 445 Rama I Rd, Rong Muang, Pathum Wan\\n'\n", " ' - Rating: 4.9\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '8. **Gallery Drip Coffee**\\n'\n", " ' - Address: อาคารหอศิลปวัฒนธรรมแห่งกรุงเทพมหานคร(BACC) 939 Rama '\n", " 'I Rd, Wang Mai, Pathum Wan\\n'\n", " ' - Rating: 4.6\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '9. **GATTA CAFé**\\n'\n", " ' - Address: 2nd Floor Siam Square One 388 Rama I Rd, Pathum '\n", " 'Wan\\n'\n", " ' - Rating: 4.9\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '10. **CRANNIES Coffee & Brunch**\\n'\n", " ' - Address: 126 ซ. จุฬาลงกรณ์ 50 Wang Mai, Pathum Wan\\n'\n", " ' - Rating: 5\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '### Population Analysis for Bangkok:\\n'\n", " 'The population of Bangkok is approximately 10.5 million people as '\n", " 'of the latest estimates. This makes it one of the most populous '\n", " 'cities in the world, with a diverse demographic and a vibrant '\n", " 'urban culture.',\n", " 'quesion': 'ค้นหาร้านกาแฟใกล้มาบุญครอง พร้อมวิเคราะห์จำนวนประชากร\\n'},\n", " {'answer': 'FINAL ANSWER\\n'\n", " '\\n'\n", " '### Competitors Overview\\n'\n", " '1. **Sanan Bakery**\\n'\n", " ' - Address: 101 Phahonyothin Rd, Lat Yao, Chatuchak\\n'\n", " ' - Rating: 4.4\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '2. **The Croissant Corner**\\n'\n", " ' - Address: Phahon Yothin 15 Alley, Samsen Nai, Phaya Thai, '\n", " 'Chatuchak\\n'\n", " ' - Rating: 4.7\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '3. **Baked With Hearts**\\n'\n", " ' - Address: 485 Phahon Yothin 18/1 Alley, Lane 1, Chom Phon, '\n", " 'Chatuchak\\n'\n", " ' - Rating: 4.6\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '4. **JJ Mall One More Bite Japanese Bakery**\\n'\n", " ' - Address: JJ Mall, 588 Kamphaeng Phet 2 Rd, Chatuchak\\n'\n", " ' - Rating: 4.9\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '5. **Triple D Bakery @ Chatuchak Market**\\n'\n", " ' - Address: 47 Section 4, Khwaeng Chatuchak, Khet Chatuchak\\n'\n", " ' - Rating: 4.9\\n'\n", " ' - Open Now: No\\n'\n", " '\\n'\n", " \"6. **Bellinee's Bake & Brew**\\n\"\n", " ' - Address: Chatuchak Weekend Market, Khwaeng Chatuchak, Khet '\n", " 'Chatuchak\\n'\n", " ' - Rating: 3.9\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '7. **Miss Muay Bakery**\\n'\n", " ' - Address: Kamphaeng Phet Rd, Chatuchak\\n'\n", " ' - Rating: 3.8\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '8. **3meebakery**\\n'\n", " ' - Address: 48/3 Chatuchak\\n'\n", " ' - Rating: 5\\n'\n", " ' - Open Now: No\\n'\n", " '\\n'\n", " '### Population and Community Data\\n'\n", " '- **Location**: Chatuchak, Bangkok 10900, Thailand\\n'\n", " '- **Community Type**: Urban\\n'\n", " '- **Population**: Approximately 30,000 residents in the immediate '\n", " 'area surrounding Chatuchak Market.\\n'\n", " '- **Household Expenditures**: Average household expenditure in '\n", " 'urban Bangkok is around 30,000 THB per month, with a significant '\n", " 'portion allocated to food and dining.\\n'\n", " '\\n'\n", " '### Summary\\n'\n", " 'The bakery market near Chatuchak Market is competitive, with '\n", " 'several well-rated establishments. The area has a vibrant urban '\n", " 'community with a diverse population, contributing to a steady '\n", " 'demand for bakery products. \\n'\n", " '\\n'\n", " 'This data can be useful for understanding the competitive '\n", " 'landscape and potential market opportunities for a new bakery in '\n", " 'the area.',\n", " 'quesion': 'Analyze competitors of a bakery near Chatuchak Market\\n'},\n", " {'answer': 'FINAL ANSWER:\\n'\n", " '\\n'\n", " '### Analysis of Opening a Restaurant Near Siam Paragon\\n'\n", " '\\n'\n", " '#### Location Overview\\n'\n", " '- **Siam Paragon** is located at 991 Rama I Rd, Khwaeng Pathum '\n", " 'Wan, Pathum Wan, Bangkok, Thailand. It is a major shopping and '\n", " 'entertainment complex, attracting both locals and tourists.\\n'\n", " '\\n'\n", " '#### Nearby Restaurants\\n'\n", " 'A search for restaurants within a 1 km radius of Siam Paragon '\n", " 'revealed several options, highlighting a competitive market. Here '\n", " 'are some notable restaurants:\\n'\n", " '\\n'\n", " '1. **Shree Bhavan Pure South Indian Vegetarian Restaurant**\\n'\n", " ' - **Rating**: 4.9\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '2. **Tan Kun (Central World)**\\n'\n", " ' - **Rating**: 4.7\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '3. **I Food Bar & Restaurant**\\n'\n", " ' - **Rating**: 4.8\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '4. **Jim Thompson, A Thai Restaurant**\\n'\n", " ' - **Rating**: 4.5\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '5. **Metro Square SiamParagon**\\n'\n", " ' - **Rating**: 4.7\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '6. **KAI Japanese Restaurant Gaysorn Amarin**\\n'\n", " ' - **Rating**: 5.0\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '7. **Madras Darbar Indian Restaurant**\\n'\n", " ' - **Rating**: 4.7\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '#### Market Insights\\n'\n", " '- **Competitors**: There are over 20 restaurants in the vicinity, '\n", " 'indicating a saturated market. High ratings suggest a strong '\n", " 'customer preference for quality dining experiences.\\n'\n", " '- **Community Type**: The area is urban and cosmopolitan, with a '\n", " 'mix of affluent locals and international tourists, which can be '\n", " 'advantageous for a new restaurant.\\n'\n", " '- **Household Expenditures**: The presence of luxury shopping and '\n", " 'dining indicates higher-than-average household expenditures, '\n", " 'particularly in the food and beverage sector.\\n'\n", " '\\n'\n", " '#### Conclusion\\n'\n", " 'Opening a restaurant near Siam Paragon presents both '\n", " 'opportunities and challenges. The high foot traffic and affluent '\n", " 'customer base are positive factors, but the competitive landscape '\n", " 'requires a unique value proposition to attract customers. A focus '\n", " 'on quality, unique cuisine, and exceptional service will be '\n", " 'essential for success in this vibrant market.',\n", " 'quesion': 'วิเคราะห์การเปิดร้านอาหารใกล้สยามพารากอน\\n'},\n", " {'answer': 'The analysis of coffee shops near Central World in Bangkok '\n", " 'reveals a competitive landscape with numerous high-rated options. '\n", " 'Key insights include:\\n'\n", " '\\n'\n", " '### Central World Overview\\n'\n", " '- **Address**: 999/9 Rama I Rd, Khwaeng Pathum Wan, Pathum Wan, '\n", " 'Krung Thep Maha Nakhon 10330, Thailand\\n'\n", " '- **Phone**: 02 640 7000\\n'\n", " '- **Website**: [Central World](https://www.centralworld.co.th/)\\n'\n", " '\\n'\n", " '### Top Nearby Coffee Shops\\n'\n", " '1. **BEANS Coffee Roaster Paragon**\\n'\n", " ' - **Rating**: 5\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '2. **Fellas.coffee @soi tonson**\\n'\n", " ' - **Rating**: 4.9\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '3. **Earthy Roaster (Specialty Coffee)**\\n'\n", " ' - **Rating**: 4.8\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '4. **Salotto Coffee**\\n'\n", " ' - **Rating**: 5\\n'\n", " ' - **Open Now**: N/A\\n'\n", " '\\n'\n", " '5. **The Basic Coffee BKK**\\n'\n", " ' - **Rating**: 4.7\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '6. **Café BAGA Central World**\\n'\n", " ' - **Rating**: 4.7\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '7. **Baankhunlek coffee**\\n'\n", " ' - **Rating**: 5\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '8. **Early Bird Coffee - Chit Lom BTS**\\n'\n", " ' - **Rating**: 4.8\\n'\n", " ' - **Open Now**: Yes\\n'\n", " '\\n'\n", " '### Market Insights\\n'\n", " '- **Competitor Count**: Over 20 coffee shops within a 1 km '\n", " 'radius.\\n'\n", " '- **Community Type**: Urban, with a mix of commercial and '\n", " 'residential areas.\\n'\n", " '- **Population Density**: High, typical of central Bangkok '\n", " 'locations.\\n'\n", " '\\n'\n", " 'This report provides a comprehensive overview of the coffee shop '\n", " 'market near Central World, highlighting opportunities for new '\n", " 'entrants and insights into consumer preferences based on ratings.',\n", " 'quesion': 'ร้านกาแฟใกล้เซ็นทรัลเวิลด์\\n'},\n", " {'answer': 'FINAL ANSWER:\\n'\n", " '\\n'\n", " '### Market Analysis for Opening a Coffee Shop Near MBK Center, '\n", " 'Bangkok\\n'\n", " '\\n'\n", " '#### Location Overview\\n'\n", " '- **Location**: MBK Center (มาบุญครอง), Pathum Wan, Bangkok, '\n", " 'Thailand\\n'\n", " '- **Population**: Approximately 10 million in the Bangkok '\n", " 'metropolitan area, indicating a large potential customer base.\\n'\n", " '\\n'\n", " '#### Competitor Analysis\\n'\n", " '- There are over **20 coffee shops** within a 1 km radius of MBK '\n", " 'Center, showcasing a competitive market. Notable competitors '\n", " 'include:\\n'\n", " ' 1. **BEANS Coffee Roaster Paragon** - Rating: 5\\n'\n", " ' 2. **Olympic Coffee** - Rating: 4.8\\n'\n", " ' 3. **Treasure Specialty Coffee** - Rating: 4.9\\n'\n", " \" 4. **Sip 'n Drip** - Rating: 4.9\\n\"\n", " ' 5. **D Coffee House** - Rating: 4.9\\n'\n", " '\\n'\n", " '#### Community Type\\n'\n", " '- The area is urban, characterized by high foot traffic due to '\n", " 'shopping centers, offices, and entertainment venues.\\n'\n", " '\\n'\n", " '#### Household Expenditures\\n'\n", " '- While specific data on household expenditures was not '\n", " 'retrieved, urban areas like Bangkok typically exhibit higher '\n", " 'spending on food and beverages, which is favorable for coffee '\n", " 'shop businesses.\\n'\n", " '\\n'\n", " '#### Insights\\n'\n", " '- The high population density and the presence of numerous coffee '\n", " 'shops indicate a vibrant coffee culture in the area. However, the '\n", " 'competition is intense, and differentiation through unique '\n", " 'offerings, ambiance, or customer service will be crucial for '\n", " 'success.\\n'\n", " '- Given the high ratings of existing coffee shops, there is an '\n", " 'opportunity to capture a niche market by offering specialty '\n", " 'coffee, unique blends, or a themed café experience.\\n'\n", " '\\n'\n", " 'This analysis provides a foundational understanding of the market '\n", " 'dynamics for opening a coffee shop near MBK Center. Further '\n", " 'research into specific consumer preferences and trends could '\n", " 'enhance the business strategy.',\n", " 'quesion': 'วิเคราะห์การเปิดร้านกาแฟใกล้มาบุญครอง\\n'},\n", " {'answer': 'FINAL ANSWER:\\n'\n", " '\\n'\n", " '### Grocery Stores Near Victory Monument:\\n'\n", " '1. **ร้านกิตติของชำ**\\n'\n", " ' - Address: 467 1 Ratchawithi Rd, Thanon Phaya Thai, '\n", " 'Ratchathewi\\n'\n", " ' - Rating: 4\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '2. **ขายของ (Somjai Apartment)**\\n'\n", " ' - Address: 184/4 Soi Phahon Yothin 1, Phaya Thai\\n'\n", " ' - Rating: 4.5\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '3. **ร้านแอมโชห่วย**\\n'\n", " ' - Address: 140/6 Ratchawithi Rd, Phaya Thai\\n'\n", " ' - Rating: 5\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '4. **ถุงเงิน**\\n'\n", " ' - Address: QG7Q+GCJ ซอย พญาไท แขวง ถนนพญาไท Ratchathewi\\n'\n", " ' - Rating: 3\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '5. **ร้านไพบูลย์**\\n'\n", " ' - Address: 417/2 Ratchawithi Rd, Thung Phaya Thai, '\n", " 'Ratchathewi\\n'\n", " ' - Rating: 0\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '6. **ร้านทวีผล ขายปลีกและส่ง (คุณคำนวน)**\\n'\n", " ' - Address: 144, 15 Soi Talat Sri Wanit, Din Daeng\\n'\n", " ' - Rating: 4.1\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '7. **ร้านรักบ้านเกิด**\\n'\n", " ' - Address: 99 อาคาร ราชปรารภทาวเวอร์แมนชั่น ซอย ราชปรารภ 14 '\n", " 'Ratchaprarop Rd, Makkasan, Ratchathewi\\n'\n", " ' - Rating: 0\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '8. **ร้านธงฟ้า สมพงษ์**\\n'\n", " ' - Address: 115, 110 Ratchaprarop Rd, Makkasan, Ratchathewi\\n'\n", " ' - Rating: 3.6\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '9. **ขายของชำ ประตูน้ำ**\\n'\n", " ' - Address: 475 Phaya Thai Rd, Khwaeng Thanon Phaya Thai, '\n", " 'Ratchathewi\\n'\n", " ' - Rating: 5\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '10. **Komol Center**\\n'\n", " ' - Address: 421 6-7 Ratchawithi Rd, Thung Phaya Thai, '\n", " 'Ratchathewi\\n'\n", " ' - Rating: 4.1\\n'\n", " ' - Open Now: Yes\\n'\n", " '\\n'\n", " '### General Population Insights:\\n'\n", " '- **Bangkok** has a population of over 10 million people, making '\n", " 'it one of the most populous cities in Southeast Asia.\\n'\n", " '- The area around **Victory Monument** is characterized by high '\n", " 'population density, with a mix of local residents and '\n", " 'expatriates.\\n'\n", " '- Demographics typically include a diverse range of ages and '\n", " 'socioeconomic backgrounds.\\n'\n", " '\\n'\n", " 'For more specific demographic data, such as age distribution and '\n", " 'income levels, local government statistics or demographic studies '\n", " 'would be required.',\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 }