ð°Difyã®å§ãæ¹(éãšã³ãžãã¢ã§ãçæAIã¢ããªãäœããæ匷ããŒã«)
ã¯ããã«
ã€ãã«çæAIãšã³ãžãã¢ã®æ匷ããŒã«ãç»å ŽããŸããã
ãã®åããDifyãã§ãã
ããŒã³ãŒãã§çæAIã¢ããªã±ãŒã·ã§ã³ãäœããŠããŸããŸãã
ãçæAIãšã³ãžãã¢ããšããããããéãšã³ãžãã¢ãã§ãçæAIã¢ããªã±ãŒã·ã§ã³ãäœããããã«ãªããŸããã
äžã®äžãããŒã³ãŒãããŒã«ã¯ä»ã«ããããšæããŸããããã®Difyã¯çæAIã¢ããªã±ãŒã·ã§ã³ã®äœæã«æé©åãããŠãããéåžžã®ããŒã³ãŒãããŒã«ã«æ¯ã¹ãŠé¥ãã«çŽ æ©ãçæAIã¢ããªã±ãŒã·ã§ã³ãäœæã§ããŸãã
çæAIã®ç¥èãæ¡åŒµããRAGã䜿ã£ãã¢ããªã±ãŒã·ã§ã³ãäžç¬ã§äœããŸãã
ãããããã£ã³ã¯ãµã€ãºã®å€æŽããã€ããªããæ€çŽ¢ãEmbeddingã¢ãã«ã®åãæ¿ããªã©ãRAGã®ç²ŸåºŠåäžã§ããããããšãããã£ãŠããŸãã
ãããªæé«ã®ããŒã«ã§ãããDifyãã䜿ã£ãŠã¿ãŸããã
Difyã®å§ãæ¹
ãã°ã€ã³
ãå§ããããã¯ãªãã¯ããŸãã
ãGitHubãããGoogleãã®ã¢ã«ãŠã³ãã§ãã°ã€ã³ã§ããŸãã
ä»»æã®ã»ããã¯ãªãã¯ããŸãã
ãã°ã€ã³ãããšä»¥äžã®ãããªç»é¢ã衚瀺ãããŸãã
ãã®ç»é¢ããã¢ããªãäœã£ããã§ããŸãã
ã¢ããªäœæ
äžéšã®ãæ¢çŽ¢ããã¯ãªãã¯ããŸãã
æ§ã
ãªãã³ãã¬ãŒããã¿ã€ã«åœ¢åŒã§è¡šç€ºãããŸãã
ä»åã¯ãAgentãã¿ããã¯ãªãã¯ããŠã¿ãŸãããã
ãã®äžã«ãTravel Consultantããšãããã®ããã£ãã®ã§ããããã¯ãªãã¯ããŸãã
以äžã®ãããªèšå®ç»é¢ã衚瀺ãããŸãã
ãæé ãã®ãšããããããã³ããã®ãã³ãã¬ãŒãã®ããã§ããã
ãæé ãïŒããã³ããã®ãã³ãã¬ãŒãïŒ
ãã³ãã¬ãŒãã®ããã³ããã®ãŸãŸã§ããããããåããŠããããã§ãã
ãã£ããè©ŠããŠã¿ãŸãããã
ããããã°ãšãã¬ãã¥ãŒãã®ãšããã«ãã£ããå ¥åæ¬ããããŸãã®ã§ãããã§ãã£ããããŸãã
ããã³ãã
ç§ã«ãªã£ããæ¥æ¬ã®äº¬éœã«æ
è¡ã«è¡ãããã§ããçŽ
èãšç¥ç€Ÿãã寺巡ãã®èšç»ã3æ³ïŒæ¥ã§ãé¡ãããŸãã
åç
翻蚳
詳现ãªæ è¡èšç»
ããã«ã®ãããã
ããã«ã°ã¬ã€ã¹ãªãŒäº¬éœ
è©äŸ¡: 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ããã²ãè©Šããã ããã
ãã®èšäºãæ°ã«å ¥ã£ãããµããŒããããŠã¿ãŸãããïŒ