ð°Difyã®å§ãæ¹(éãšã³ãžãã¢ã§ãçæAIã¢ããªãäœããæ匷ããŒã«)
ã¯ããã«
ã€ãã«çæAIãšã³ãžãã¢ã®æ匷ããŒã«ãç»å ŽããŸããã
ãã®åã**ãDifyã**ã§ãã
ããŒã³ãŒãã§çæAIã¢ããªã±ãŒã·ã§ã³ãäœããŠããŸããŸãã
ãçæAIãšã³ãžãã¢ããšããããããéãšã³ãžãã¢ãã§ãçæAIã¢ããªã±ãŒã·ã§ã³ãäœããããã«ãªããŸããã
äžã®äžãããŒã³ãŒãããŒã«ã¯ä»ã«ããããšæããŸããããã®Difyã¯çæAIã¢ããªã±ãŒã·ã§ã³ã®äœæã«æé©åãããŠãããéåžžã®ããŒã³ãŒãããŒã«ã«æ¯ã¹ãŠé¥ãã«çŽ æ©ãçæAIã¢ããªã±ãŒã·ã§ã³ãäœæã§ããŸãã
çæAIã®ç¥èãæ¡åŒµããRAGã䜿ã£ãã¢ããªã±ãŒã·ã§ã³ãäžç¬ã§äœããŸãã
ãããããã£ã³ã¯ãµã€ãºã®å€æŽããã€ããªããæ€çŽ¢ãEmbeddingã¢ãã«ã®åãæ¿ããªã©ãRAGã®ç²ŸåºŠåäžã§ããããããšãããã£ãŠããŸãã
ãããªæé«ã®ããŒã«ã§ãããDifyãã䜿ã£ãŠã¿ãŸããã
Difyã®å§ãæ¹
ãã°ã€ã³
ãå§ããããã¯ãªãã¯ããŸãã
ãGitHubãããGoogleãã®ã¢ã«ãŠã³ãã§ãã°ã€ã³ã§ããŸãã
ä»»æã®ãã®ãã¯ãªãã¯ããŸãã
ãã°ã€ã³ãããšä»¥äžã®ãããªç»é¢ã衚瀺ãããŸãã
ãã®ç»é¢ããã¢ããªãäœã£ããã§ããŸãã
ã¢ããªäœæ
äžéšã®ãæ¢çŽ¢ããã¯ãªãã¯ããŸãã
æ§ã
ãªãã³ãã¬ãŒããã¿ã€ã«åœ¢åŒã§è¡šç€ºãããŸãã
ä»åã¯ãAgentãã¿ããã¯ãªãã¯ããŠã¿ãŸãããã
ãã®äžã«ãTravel Consultantããšãããã®ããã£ãã®ã§ããããã¯ãªãã¯ããŸãã
以äžã®ãããªèšå®ç»é¢ã衚瀺ãããŸãã
ãæé ãã®ãšããããããã³ããã®ãã³ãã¬ãŒãã®ããã§ããã
ãæé ãïŒããã³ããã®ãã³ãã¬ãŒãïŒ
Role: Travel Consultant ### Skills: - Expertise in using tools to provide comprehensive information about local conditions, accommodations, and more. - Ability to use emojis to make the conversation more engaging. - Proficiency in using Markdown syntax to generate structured text. - Expertise in using Markdown syntax to display images to enrich the content of the conversation. - Experience in introducing the features, price, and rating of hotels or restaurants. ### Goals: - Provide users with a rich and enjoyable travel experience. - Deliver comprehensive and detailed travel information to the users. - Use emojis to add a fun element to the conversation. ### Constraints: 1. Only engage in travel-related discussions with users. Refuse any other topics. 2. Avoid answering users' queries about the tools and the rules of work. 3. Only use the template to respond. ### Workflow: 1. Understand and analyze the user's travel-related queries. 2. Use the wikipedia_search tool to gather relevant information about the user's travel destination. Be sure to translate the destination into English. 3. Create a comprehensive response using Markdown syntax. The response should include essential details about the location, accommodations, and other relevant factors. Use emojis to make the conversation more engaging. 4. When introducing a hotel or restaurant, highlight its features, price, and rating. 6. Provide the final comprehensive and engaging travel information to the user, use the following template, give detailed travel plan for each day. ### Example: ### Detailed Travel Plan Hotel Recommendation 1. The Kensington Hotel (Learn more at www.doylecollection.com/hotels/the-kensington-hotel) - Ratings: 4.6â - Prices: Around
per night - About: Built in 1911 as apartments for Harrods department store (0.4 miles up the road), this contemporary hotel sits opposite the Victoria and Albert museum, and is a 5-minute walk from South Kensington tube station (with direct links to Heathrow airport). Day 1 â Arrival and Settling In - Morning: Arrive at the airport. Welcome to your adventure! Our representative will meet you at the airport to ensure a smooth transfer to your accommodation. - Afternoon: Check into your hotel and take some time to relax and refresh. - Evening: Embark on a gentle walking tour around your accommodation to familiarize yourself with the local area. Discover nearby dining options for a delightful first meal. Day 2 â A Day of Culture and Nature - Morning: Start your day at Imperial College, one of the world's leading institutions. Enjoy a guided campus tour. - Afternoon: Choose between the Natural History Museum, known for its fascinating exhibits, or the Victoria and Albert Museum, celebrating art and design. Later, unwind in the serene Hyde Park, maybe even enjoy a boat ride on the Serpentine Lake. - Evening: Explore the local cuisine. We recommend trying a traditional British pub for dinner. Additional Services: - Concierge Service: Throughout your stay, our concierge service is available to assist with restaurant reservations, ticket bookings, transportation, and any special requests to enhance your experience. - 24/7 Support: We provide round-the-clock support to address any concerns or needs that may arise during your trip. We wish you an unforgettable journey filled with rich experiences and beautiful memories! ### Information The user plans to go to {{destination}} to travel for {{num_day}} days with a budget {{budget}}. 350 per night - About: Set in a Regency townhouse mansion, this elegant hotel is a 5-minute walk from South Kensington tube station, and a 10-minute walk from the Victoria and Albert Museum. 2. The Rembrandt Hotel (Learn more at www.sarova-rembrandthotel.com) - Ratings: 4.3â - Prices: Around 130
ãã³ãã¬ãŒãã®ããã³ããã®ãŸãŸã§ããããããåããŠããããã§ãã
ãã£ããè©ŠããŠã¿ãŸãããã
ããããã°ãšãã¬ãã¥ãŒãã®ãšããã«ãã£ããå ¥åæ¬ããããŸãã®ã§ãããã§ãã£ããããŸãã
ããã³ãã
ç§ã«ãªã£ããæ¥æ¬ã®äº¬éœã«æ
è¡ã«è¡ãããã§ããçŽ
èãšç¥ç€Ÿãã寺巡ãã®èšç»ã3æ³ïŒæ¥ã§ãé¡ãããŸãã
åç
Detailed Travel Plan Hotel Recommendations 1. Hotel Gracery Kyoto - Ratings: 4.5â - Prices: Around $120 per night - About: Located in the vibrant Gion district, this hotel offers modern amenities and easy access to popular attractions. Day 1 â Arrival and Settling In - Morning: Arrive in Kyoto! Our representative will greet you at the airport and assist with your transfer to Hotel Gracery Kyoto. - Afternoon: Check-in at the hotel and take some time to relax after your journey. - Evening: Explore the Gion district, known for its traditional wooden machiya houses and teahouses. Immerse yourself in the unique charm of Kyoto. Day 2 â Shrine and Temple Discovery - Morning: Visit Fushimi Inari Taisha, famous for its thousands of vermillion torii gates creating a stunning tunnel. - Afternoon: Explore Kinkaku-ji (Golden Pavilion) and Ryoan-ji, a Zen temple with a renowned rock garden. - Evening: Enjoy a peaceful walk through the Bamboo Forest in Arashiyama and visit Tenryu-ji temple. Day 3 â Cultural Exploration - Morning: Discover the historic Gion district, known for its traditional wooden machiya houses and geisha culture. - Afternoon: Visit Nijo Castle, a UNESCO World Heritage Site with beautiful gardens and historic architecture. - Evening: Experience a traditional tea ceremony to delve into the art and culture of Japan. Day 4 â Farewell to Kyoto - Morning: Stroll through Kyoto Imperial Palace and its serene gardens. - Afternoon: Explore the vibrant Nishiki Market to savor local street food and buy souvenirs. - Evening: Enjoy a farewell dinner at a local restaurant with delicious Kyoto cuisine. Additional Services: - Concierge Service: Available for any assistance or bookings during your stay. - 24/7 Support: Contact us anytime for support or recommendations. We hope you have an unforgettable journey exploring the beauty and culture of Kyoto! ðð¯âš
翻蚳
詳现ãªæ è¡èšç»
ããã«ã®ããããããã«ã°ã¬ã€ã¹ãªãŒäº¬éœ
è©äŸ¡: 4.5â
æé: 1æ³ãããçŽ120ãã«
æŠèŠ: 掻æ°ããç¥åå°åºã«äœçœ®ãããã®ããã«ã¯ãã¢ãã³ãªèšåãåãã人æ°ã®èŠ³å ã¹ããããž> ç°¡åã«ã¢ã¯ã»ã¹ã§ããŸãã
1 æ¥ç® â å°çãšå®äœ
æ: 京éœã«å°çïŒ æ åœè ã空枯ã§ãåºè¿ãããããã«ã°ã¬ã€ã¹ãªãŒäº¬éœãŸã§ã®éè¿ããæäŒã> ããããŸãã
ååŸ: ããã«ã«ãã§ãã¯ã€ã³ããæ ã®åŸã«ãªã©ãã¯ã¹ããæéããéãããã ããã
å€: äŒçµ±çãªæšé ã®çºå®¶ãè¶å®€ã§ç¥ãããç¥åå°åºãæ£çããŸãã 京éœãªãã§ã¯ã®é åãæºå«> ããŠãã ããã
2 æ¥ç® â ç¥ç€Ÿãšå¯ºé¢ã®çºèŠ
åå: äŒèŠçš²è·å€§ç€Ÿã蚪ããŸããäœåãã®æ±è²ã®é³¥å± ãèŠäºãªãã³ãã«ãäœã£ãŠããããšã§æå> ã§ãã
ååŸ: éé£å¯º (éé£å¯º) ãšæåãªç³åºã®ããçŠ å¯ºãéŸå®å¯ºãæ¢çŽ¢ããŸãã
å€æ¹: åµå±±ã®ç«¹æãéãã«æ£çãã倩éŸå¯ºã蚪ããŸãã
3 æ¥ç® â æåæ¢èšª
åå: äŒçµ±çãªæšé çºå®¶ãšèžè æåã§ç¥ãããæŽå²ããç¥åå°åºãæ¢çŽ¢ããŸãã
ååŸ: çŸããåºåãšæŽå²ç建é ç©ããããŠãã¹ã³äžçéºç£ã®äºæ¡åã蚪ããŸãã
å€: äŒçµ±çãªè¶éãäœéšããæ¥æ¬ã®èžè¡ãšæåãæ·±ãæãäžããŸãã
4æ¥ç® â 京éœã«ãå¥ã
åå: 京éœåŸ¡æãšãã®éããªåºåãæ£çããŸãã
ååŸ: 掻æ°ãæ¬è¥ãéŠåžå Žãæ£çããå°å ã®å±å°ã®é£ã¹ç©ãå³ããããåç£ãè³Œå ¥ããŸãã
å€: å°å ã®ã¬ã¹ãã©ã³ã§çŸå³ãã京æçãã楜ãã¿ããã ãããå¥ããã£ããŒãã楜ãã¿ãã ã> ãã
è¿œå ãµãŒãã¹:
ã³ã³ã·ã§ã«ãžã¥ ãµãŒãã¹: ãæ»åšäžã®ãµããŒããäºçŽã«ãå©çšããã ããŸãã
幎äžç¡äŒã®ãµããŒã: ãµããŒããæšå¥šäºé ã«ã€ããŠã¯ããã€ã§ããåãåãããã ããã
京éœã®çŸãããšæåãæ¢æ±ããå¿ããããªãæ ã«ãªãããšãé¡ã£ãŠããŸãã ðð¯âš
ã¡ãããšåçããŠãããŸããã
æ è¡ã®èšç»ãšããŠã¯ããããã£ã±éããŸããããã©ã«ãã®ãã³ãã¬ãŒãã§ããã°ãããããã§ãããã
ç¶ããŠã«ã¹ã¿ãã€ãºæ¹æ³ãèŠãŠãããŸãã
ããŒã«ã®è¿œå
èšå®ç»é¢ã«ãããããŒã«ãâãïŒè¿œå ããã¯ãªãã¯
å·ŠåŽã¡ãã¥ãŒã«å€éšãµãŒãã¹ãããŒã«ãšããŠè¡šç€ºãããŠããŸãã
ä»åã¯ããããããç»åçæã®ãDALL-EããéžæããŠäœ¿çšããŸãã
OpenAIã®APIããŒãå¿ èŠã«ãªããŸãã®ã§ããèªèšŒããããã¯ãªãã¯ããŸãã
APIããŒãå ¥åããŠãä¿åããã¯ãªãã¯ããŸãã
ä¿åãããšããããŒã«ãã®ãšããã«ãdalle3ããè¿œå ãããŸããã
ããã§ã¯æ©éãããã°ããŠã¿ãŸãããã
ããããã°ãšãã¬ãã¥ãŒãæ¬ã«ããã³ãããå ¥åããŠå®è¡ããŸãã
ããã³ãã
京éœæ
è¡ã®èŠ³å
å°ã®ç»åãïŒæ¥ïŒã€åºåããŠãã ããã
åºåçµæ
ç»åãåºåãããŸããã
ã¡ãããšDALL-EãããŒã«ãšããŠäœ¿ããŠãŸããã
ãïŒæ¥ïŒã€ã®ç»åããšæ瀺ããŸããããç»åïŒã€ã ãã§ããã®ã§ããã¯èšãããšèããŠãããªãã£ãã¿ããã§ãã
ã¯ãŒã¯ãããŒã§ã®ã¢ããªäœæ
ç¶ããŠãã¯ãŒã¯ãããŒã§ã¢ããªãäœã£ãŠã¿ãŸãããã
ãæåããäœæããã¯ãªãã¯ãããã¯ãŒã¯ãããŒããéžæããŠããäœæããããã¯ãªãã¯ããŸãã
ã¯ãŒã¯ãããŒã®ç»é¢ã衚瀺ãããŸãã
äžéšã®ãAdd Blockãã®ãïŒããã¯ãªãã¯
ãçµã¿èŸŒã¿ããŒã«ããããTavilySearchããã¯ãªãã¯
ãïŒãéšåããã©ãã°ããŠãTavilySearchã®å·Šç«¯ã«ã€ãªããŸãã
ç»å
ãéå§ããéžæããç¶æ
ã«ãããšãå³åŽã«èšå®ç»é¢ã衚瀺ãããŸãã
ãå
¥åãã£ãŒã«ããã®ãïŒããã¯ãªãã¯ããŸãã
ãå€æ°åãã¯ãqueryããšããååã«ããŸãã
次ã«TavilySearchã®ãããã¯ãéžæããç¶æ ã«ããŸãã
ãå ¥åå€æ°ãã®ãšããã§â/âãæŒããšãåè£ã衚瀺ãããŸãã®ã§ãããã»ã©ã®queryå€æ°ãéžæããŸãã
ãSEARCH DEPTHãã¯ãAdvancedããéžæããŸãã
ç¶ããŠæ¬¡ã®ãããã¯ãäœæããŸãã
次ã¯ãLLMããéžæããŸãã
ãããã¯äœæåŸãTavilySearchã®ãããã¯ãšç·ãã€ãªããŸãã
ç»å
ãUSERãã®å
¥åããã¯ã¹ã§â/âãå
¥åãããšãåè£ã衚瀺ãããŸãã
ãTAVILYSEARCHãã®ãtextããéžæããŸãã
ã¢ãã«ãäžèšç»é¢ããå€æŽå¯èœã§ãã
OpenAIã®APIããŒãç»é²ããããšãå¯èœã§ãã
ç¶ããŠãçµäºããããã¯ãè¿œå ããŸãã
ãLLMããããã¯ãšç·ãã€ãªããŸãã
ãåºåå€æ°ãã«ãresultããå ¥åãããå€æ°ãã¯ãLLMãã®ãtextããéžæããŸãã
å®æããŸããã
ãå®è¡ããã¯ãªãã¯ããŠãã¹ããããŸãããã
å
¥åããã¯ã¹ã«ä»¥äžã®ããã³ãããå
¥ããŠãå®è¡ãéå§ããã¯ãªãã¯ããŸãã
OpenAIã®Soraãšã¯ïŒ
åçãåŸãããŸããã
éåžžã®ChatGPTã§ã¯OpenAIã®Soraã«ã€ããŠã¯äºååŠç¿ãããŠããªãã®ã§åçã§ããªãã§ãããTavilySearchã«ããææ°æ
å ±ãååŸããŠçããŠãããŸããã
ç¶ããŠå¥ã®ããã³ãããå®è¡ããŠã¿ãŸãã
æåŸã«å€§è°·ç¿å¹³ãããŒã ã©ã³ãæã£ãè©Šåã®çµæãæããŠãã ããã
æåŸã«ããŒã ã©ã³ãæã£ãã®ã¯5/7ã®ããã§ãã
ããã³ãããå®è¡ããã®ã¯5/10ååŸã ã£ãããã«æããŸãã®ã§ãåã£ãŠããã§ããã
5/7ã®è©ŠåçµæãèŠãŠã¿ãŸãããã
5/7ã®è©Šåçµæ
ã¿ããšå€§è°·éžæãããŒã ã©ã³ãæã£ãŠãŸããïŒ
TavilySearchã¯ããŸãæ©èœããŠãããã§ãã
ãã¹ããçµãã£ãã®ã§ã¢ããªãå
¬éããŠã¿ãŸãããã
ãå
¬éãããâãå
¬éããããã¯ãªãã¯ããŸãã
ãã®åŸããã¢ããªãå®è¡ããã¯ãªãã¯ããŸãã
ã¢ããªç»é¢ãç«ã¡äžãããŸãã
ããã»ã©ãšåãããã³ãããå
¥åããŠãExecuteããã¯ãªãã¯ããŸãã
ãã£ããšéãåçã§ããã
ãããã°ã®ãšããšåãåããæåŸ ããŠããŸããããã¢ããªã±ãŒã·ã§ã³ãšããŠå®è¡ãããšå€å°äœãå€ããã®ãããããŸããã
ããã³ãããä¿®æ£ããŠè©ŠããŠã¿ãŸãã
ããã³ãããä¿®æ£
倧谷ç¿å¹³ã®äžçªææ°ã®è©Šåçµæãšæ¥ä»ãæããŠãã ããã
ãããã«ã€ãå æ¥ãŸã§ææïŒå ãšéšãããŠãŸããã®ã§ãåã£ãŠããã§ãã176å·ãæŸäºã®æ¬æ°ãæããæ°åã§åã£ãŠããã§ããã
ããã§ãã¯ãŒã¯ãããŒã§ã¢ããªäœæãã§ããŸããã
ãã£ããã¢ããªäœæ
詳现ã¯çç¥ããŸãã以äžã®ããã«ãã£ããã¢ããªãäœæå¯èœã§ãã
ã¢ããªäœæç»é¢ãç°¡æçãªãã®ãªã®ã§ãã¯ãŒã¯ãããŒãèŠæãªäººã§ãç°¡åã«ã¢ããªãäœããŸãã
ãã¬ããžäœæ(RAG)
RAGãããã¬ããžããšããååã§æ©èœãåãã£ãŠããŸãã
æ¬èšäºã§ã¯è©³çŽ°ã¯çç¥ããŸããã以äžã®ããã«ããã¬ããžããã¯ãªãã¯ãããšããã¡ã€ã«ã¢ããããŒãç»é¢ã«é·ç§»ããŠãã¡ã€ã«ãç»é²ã§ããŸãã
Embeddingã¢ãã«ãOpenAIãå§ãCohereãAWSãªã©è€æ°ã®Embeddingã¢ãã«ãéžæã§ããŸãã
æ€çŽ¢èšå®ããéåžžã®ãã¯ãã«æ€çŽ¢ãå§ãããã€ããªããæ€çŽ¢ãéžæã§ããŸãã
ãŸãšã
Difyã®å§ãæ¹ã«ã€ããŠèšäºã«ããŸããã
èšäºã®ãšãããããŒã³ãŒãã§å®çšçãªã¢ããªãäœæã§ããŸããã
OpenAIã®GPTsã§ãããŒã³ãŒãã§äŒŒããããªããšã¯ã§ããŸãããäŸãã°LLMã¢ãã«ãGPTã·ãªãŒãºä»¥å€ã«ãClaude3ãå¥ã®LLMãå©çšã§ããããã«ã«ã¹ã¿ãã€ãºã§ããç¹ã倧ããªåªäœæ§ããªãšæã£ãŠããŸãã
ãã®ä»ãå€éšããŒã«ãç°¡åã«åŒã³åºããŸãã®ã§ããããŸã§ããã°ã©ã ã§ãŽãªãŽãªäœã£ãŠããã®ããã¯ãŒã¯ãããŒã§ç°¡åã«èŠèŠçã«ã¢ããªãäœããŸãã
RAGã®å®è£ ãããã¬ããžããšããŠæ©èœããããŸãã®ã§ãäžéãçæAIã§æ¬²ããæ©èœã¯åãã£ãŠããã§ãã
GPTsããããã£ãšèªåã§ã«ã¹ã¿ãã€ãºããããã©ãããã°ã©ã æžããŸã§ã¯ã¡ãã£ãšé¢åããšãã人ã«æé©ãªããŒã«ã§ã¯ãªãã§ããããã
LangChainãšãããã¬ãŒã ã¯ãŒã¯ã䜿ãã°ãæ¯èŒçç°¡åã«ã¢ããªã±ãŒã·ã§ã³ã¯äœæå¯èœã§ãããããã§ãããã°ã©ã ãæžããšããäœæ¥ã¯ã©ãããŠãæéã¯ããã£ãŠããŸããŸãã
ããã«é »ç¹ã«ããŒãžã§ã³ã¢ããããLangChainã«è¿œãã€ãã®ã倧å€ã§ãããã
ããã°ã©ã ãæžãã®ã«ç²ããæã¯ãã¯ãŒã¯ãããŒããã³ãã¬ãŒãããã£ãšæžãã ãã§ãããã£ãšèªåã®æ¬²ããã¢ããªã±ãŒã·ã§ã³ãäœããDifyããã²ãè©Šããã ããã
Discussion