ðRAG vs. Long-Context LLMsâã©ã£ã¡ãåè ïŒïŒð¥
çãããããã«ã¡ã¯ððïŒAIã®äžçãé²åãç¶ããŠããäžãä»åã¯Retrieval Augmented Generation (RAG)ãšLong-Context (LC) LLMsã®å¯Ÿæ±ºã«ã€ããŠã話ãããŸãð€â¡ïžïŒã©ã¡ããåè
ãªã®ããããã©ãŒãã³ã¹ãã³ã¹ãããããŠæ°ãããã€ããªããææ³ã§ããSelf-RouteãŸã§ã詳ãã解説ããŸãð¡ðãããããªé°å²æ°ã§ðã楜ããç解ããŠãããŸãããïŒ
1. ð ã¯ããã«: RAGãšLCã£ãŠãªã«ïŒ
AIã®æè¡ããŸããŸãè€éã«ãªã£ãŠããäžã§ãçããã"é·ãæèãã©ãåŠçããã"ããšããåé¡ã«ã€ããŠè³ã«ããããšããããããããŸããâïžãä»è©±é¡ã«ãªã£ãŠãã2ã€ã®ææ³ã RAGïŒãªããªãŒãã«ã»ãªãŒã°ã¡ã³ãããã»ãžã§ãã¬ãŒã·ã§ã³ïŒ ãš LCïŒãã³ã°ã³ã³ããã¹ãïŒ ã§ããã©ã¡ãã倧éã®æ å ±ãæ±ãããšãç®æããŠããã®ã§ãããæ¹æ³ãç°ãªããŸãðŽã
RAGã¯ãå¿ èŠãªæ å ±ã ããåãåºããŠå¿ãããã¹ã¿ã€ã«âšãLCã¯ãå šéšèªããå šéšç解ãããã¹ã¿ã€ã«â¡ïžãšããŸãã§å¯Ÿç §çãªã¢ãããŒããåã£ãŠããŸãïŒã§ã¯ãã©ã¡ããè¯ãã®ã§ããããïŒèŠãŠãããŸãããâ³ã
2. ðRAGïŒãªããªãŒãã«ã»ãªãŒã°ã¡ã³ãããã»ãžã§ãã¬ãŒã·ã§ã³ïŒ
RAG ã¯ããŸãã§é Œããå³æžé€šã®åžæžã®ãããªååšã§ãð«ðã質åãåãåããšãã¢ãã«ã¯èªåã§æã£ãŠããæ å ±ã ãã§ãªããå€éšã®ããŒã¿ããŒã¹ãããã¥ã¡ã³ããããå¿ èŠãªéšåã ããåŒã£åŒµãåºããŠããŠå¿ãããšãã圢ã§ãéåžžã«å¹ççã§ãã
ð RAGã®äž»ãªãã€ã³ãïŒ
æ å ±ã®æ€çŽ¢: å¿ èŠãªæ å ±ãå€éšããçŽ æ©ãååŸðã
å¹ççãªç¥èçæ: ã¢ãã«å éšã®ç¥èãšå€éšæ å ±ãçµã¿åãããããšã§æ£ç¢ºãªå¿çãçæããŸãð€ã
ã³ã¹ãã®åæž: äžèŠãªæ å ±ãæ±ããªãããããªãœãŒã¹ãç¯çŽðžã
äŸãã°ãé·ãæŽå²çãªåºæ¥äºãäžããèŠããã®ã§ã¯ãªããWikipediaãªã©ããå¿ èŠãªå 容ãåãåºããŠåçãããããªã€ã¡ãŒãžã§ãð‵ã
RAGã®åŒ·ã¿ã¯ãæ å ±ãå¿ èŠãªåã ãåŒãåºãããšã§å¹ççã«å©çšããç¹ã«ãããŸããç¹ã«æ å ±ãå€ãããŠå šäœãèŠããã®ãçŸå®çã§ãªãç¶æ³ã§ã¯ããã®ææ³ãéåžžã«åœ¹ç«ã¡ãŸããäŸãã°ãã«ã¹ã¿ããŒãµããŒãã·ã¹ãã ãªã©ã§ãé »ç¹ã«å€åããæ å ±ã«å¯ŸããŠãæè»ã«å¯Ÿå¿ã§ãããããéåžžã«æå¹ã§ããããã«ãRAGã¯å€éšç¥èã®æŽ»çšã«ãããåžžã«ææ°ã®æ å ±ãåæ ããããšãå¯èœã§ãããã®ããããã¬ã³ãã®å€åãæ¿ããæ¥çããææ°ã®æè¡æ å ±ãæ±ãã·ã¹ãã ã§ã¯éåžžã«éå®ãããã§ãããã
3. ðLCïŒãã³ã°ã³ã³ããã¹ãLLMsïŒ
äžæ¹ã§ãLC LLMs ã¯ãèšå€§ãªæ å ±ãäžåºŠã«ãã¹ãŠç解ãããŸãšããŠåŠçããŸãðããŸãã§èªæžå®¶ã®åŠè ãäžæ°ã«æ¬ãèªã¿éããŠå šäœåãç解ãããã®ãããªã¹ã¿ã€ã«ã§ãã
ð LCã®äž»ãªãã€ã³ãïŒ
çŽæ¥çãªã³ã³ããã¹ãåŠç: ãã¹ãŠã®æ å ±ãäžåºŠã«åŠçããã®ã§ãé·ãææžããã£ãããšç解ã§ããŸãðã
å æ¬çãªç解: ããã¹ãå šäœã®é¢ä¿æ§ãèæ ®ãããããæ·±ãç解ãå¯èœã§ãð€ã
é«ãæ§èœ: 倧éã®æ å ±ãå®å šã«åŠçããããããã詳现ãªå¿çãæäŸðã
äŸãã°ãæ³åŸææžã®ãããªé·ããŠè€éãªå 容ãèŠçŽããã®ã«é©ããŠããŸãâïžã
LCã®åŒ·ã¿ã¯ããã®ãŸãŸå šãŠãç解ãããšããå æ¬æ§ã«ãããŸããæèå šäœãä¿æããé·ã察話ã®äžã§ãäžè²«ããç解ãç¶æã§ããããã粟å¯ãªèŠçŽã詳现ãªã¬ããŒããå¿ èŠãªå Žåã«ç¹ã«æå¹ã§ããäŸãã°ãç 究è«æã®èŠçŽãå»åŠçãªçç¶ã®èšé²ã®åæãè€æ°ã®èŠçŽ ã絡ãè€éãªãããžã§ã¯ãã®ç®¡çãªã©ãå šäœãææ¡ããŠåããŠæå³ããããããªã±ãŒã¹ã§ã¯ããã®ææ³ãéåžžã«å¹æçã§ãããŸããããã¹ãå šäœã«å«ãŸãããã¥ã¢ã³ã¹ã现ããªæèãææ¡ããããã解éã®èª€ããå°ãªãããšã倧ããªå©ç¹ã§ãã
4. ð ïž ããã©ãŒãã³ã¹æ¯èŒïŒRAG vs LC
次ã«ãRAGãšLCã®æ§èœæ¯èŒã«ã€ããŠã§ããæ§èœãšã³ã¹ãã®ãã©ã³ã¹ãèããäžã§ããã®2ã€ã¯èå³æ·±ãå¯Ÿç §ãèŠããŸããð€ð¡
ããã©ãŒãã³ã¹: LCã¯ãæèå šäœãç解ããèœåããããã©ãŒãã³ã¹ãéåžžã«åªããŠããŸããããããã³ã¹ãã¯ããªãé«ããªããŸãðžâ¬ãç¹ã«é·ãã³ã³ããã¹ãããã¹ãŠåŠçãããããå€ãã®èšç®è³æºãå¿ èŠã§ãããã®ãããæ§èœã¯é«ããã®ã®ããªãœãŒã¹ã倧éã«æ¶è²»ãããšãããã¡ãªããããããŸãã
ã³ã¹ã: äžæ¹ã®RAGã¯ãå¿ èŠãªæ å ±ã ããåãåºããããã³ã¹ããäœãæããããŸããããããæèã®ç解ãšããé¢ã§ã¯LCã«å£ãããšããããŸãðâ¬ãRAGã¯ãæ å ±ã®äžéšã ããæç²ããŠäœ¿çšãããããã³ã¹ãå¹çã¯éåžžã«è¯ãã§ãããå šäœãææ¡ããå¿ èŠãããå Žåã«ã¯æ å ±ã®æ¬ èœãåé¡ã«ãªãããšããããŸãã
å ·äœçãªã·ããªãªãèãããšãäŸãã°ã«ã¹ã¿ããŒãµãŒãã¹ã®ãã£ãããããã§ããã°ãRAGã䜿çšããŠé¡§å®¢ã®è³ªåã«å¹ççã«å¿çããããšãã§ããŸããããããè€éãªå¥çŽæžã®èŠçŽãå¿ èŠãªå Žåã«ã¯ãLCã®æ¹ãé©ããŠããŸããããã«ãããäž¡è ã®ç¹æ§ãç解ããé©æé©æã§äœ¿ãåããããšãéèŠã§ãã
5. ð€æ°ããªè§£æ±ºçïŒSelf-Routeã®ç»å Ž
ãã®äž¡è ã®åŒ·ã¿ã掻ãããŠç»å Žããã®ã Self-Route ð¥ ã§ãïŒãã®ãã€ããªããã¢ãããŒãã¯ãã¿ã¹ã¯ã«å¿ããŠRAGãLCã䜿ãåãããšãããã®ãããã«ãããå¹çãšæ§èœãããŸãäž¡ç«ãããŠããŸãðªâšã
ð ïž Self-Routeã®ä»çµã¿ïŒ
ã¿ã¹ã¯ã®è©äŸ¡: ãŸããã¿ã¹ã¯ã®è€éããšå ¥åã®é·ããè©äŸ¡ããŸãðãäŸãã°ããŠãŒã¶ãŒã®è³ªåãçããç¹å®ã®ç¥èã ããå¿ èŠãªå Žåã¯RAGãéžæãã質åãé·ããŠè€éãªæèãæã€å Žåã¯LCãéžã³ãŸãã
åçãªéžæ: RAGãŸãã¯LCãåçã«éžæããæé©ãªææ³ãæ¡çšããŸãâ¬ãããã«ãããå¹çãšæ§èœã®ãã©ã³ã¹ãä¿ã¡ãªããããªãœãŒã¹ãç¯çŽããããšãå¯èœã§ãã
å¿çã®çæ: éžã°ããææ³ã§åçãçæããå¹çãæ倧åð¥ãå¿ èŠã«å¿ããŠRAGãšLCã®åæ¹ã®é·æãçµã¿åãããããé«åºŠãªå¿çãçæããããšãã§ããŸãã
Self-Routeã¯ãç¹å®ã®ã¿ã¹ã¯ã«å¿ããŠæé©ãªã¢ãããŒããéžã¶ããšã§ãç¡é§ãªèšç®ãæžãããªãããæ£ç¢ºã§å æ¬çãªå¿çãæäŸããããšãã§ããŸããããã«ãããã³ã¹ããæãã€ã€ãããã©ãŒãã³ã¹ãç¶æããããšãå¯èœã§ããäŸãã°ãããžãã¹ã®ææ決å®æ¯æŽã«ãããŠãçæçãªããŒã¿åæã«ã¯RAGããé·æçãªãã¬ã³ãåæã«ã¯LCãçšãããªã©ãæè»ã«å¯Ÿå¿ããããšãã§ããŸãã
6. ðªæ§èœãšã³ã¹ãã®ã°ã©ãåæðž
ããŠãããã§æ·»ä»ãããã°ã©ãã«ã€ããŠè§£èª¬ããŸãðâ¡ããã®ã°ã©ãã§ã¯ãGPT-4ãGPT-3.5-Turboãããã³Gemini-1.5-Proã®3ã€ã®ã¢ãã«ã䜿çšããŠãRAGãLCããããŠSelf-Routeã®ããã©ãŒãã³ã¹ãšã³ã¹ããæ¯èŒããŠããŸãã
ããã©ãŒãã³ã¹ã®ã°ã©ãðïŒ
GPT-4Oã«ãããŠã¯ãLCã48.67ãSelf-Routeã48.89ãšéåžžã«è¿ãçµæã瀺ããŠããŸãããRAGã¯ããå£ã32.60ã§ãããããã¯ãLCãå šäœã®æèãç解ããåã匷ãããã§ãã
GPT-3.5-Turboã§ã¯ãSelf-Routeã35.32ãšæãé«ããç¶ããŠLCã32.07ããã®ããšãããSelf-Routeã®æè»ãªã¢ãããŒããæå¹ã§ããããšãããããŸãã
Gemini-1.5-Proã§ã¯ãLCã49.70ã§ããããSelf-Routeã46.41ã§ã»ãŒåãããã©ãŒãã³ã¹ã瀺ããŠããŸãããRAGã¯37.33ãšããäœãã§ãã
ã³ã¹ãã®ã°ã©ãðžïŒ
ãã¹ãŠã®ã¢ãã«ã§ãLCã®ã³ã¹ãã¯100%ãšãªããéåžžã«é«ã³ã¹ãã§ããããšãããããŸããç¹ã«ãé·æåŠçãè¡ãå Žåã¯å€§éã®èšç®ãªãœãŒã¹ãå¿ èŠãšããããã§ãã
å¯Ÿç §çã«ãRAGã¯17%ã§äžè²«ããŠã³ã¹ãå¹çãè¯ãã§ããå¿ èŠãªæ å ±ã®ã¿ãååŸããããããªãœãŒã¹ã®ç¡é§ãå°ãªãæããããŠããŸãã
Self-Routeã¯ã³ã¹ããåæžãã€ã€ãè¯å¥œãªããã©ãŒãã³ã¹ãçºæ®ããŠãããGPT-4Oã§61%ãGPT-3.5-Turboã§39%ãGemini-1.5-Proã§38%ã§ããããã¯ãã¿ã¹ã¯ã«å¿ããŠé©åãªææ³ãéžæããããšã§ãç¡é§ãçãã€ã€æè¯ã®çµæãåºããããšã瀺ããŠããŸãã
7. ðã©ã®æè¡ãéžã¶ã¹ãïŒå®éã®äœ¿ãæ¹
RAGãåããŠããå Žå: å€éšã®ç¥èãå¿ èŠã§ãã³ã¹ããæãããå ŽåãäŸãã°ãã«ã¹ã¿ããŒãµããŒãããããFAQã·ã¹ãã ãªã©ãç¹å®ã®æ å ±ãçŽ æ©ãååŸããŠå¿çããå¿ èŠãããã·ããªãªã«åããŠããŸãããŸãã補åã«ã¿ãã°ããææ°æ å ±ãååŸãããªã©ãåžžã«æ å ±ãæŽæ°ãããç°å¢ã«ãé©ããŠããŸãã
LCãåããŠããå Žå: æèå šäœãç解ããæ£ç¢ºã«èŠçŽããããåæããããããå ŽåãäŸãã°ãæ³åŸææžã®è§£æã詳现ãªã¬ããŒãäœæãªã©ãææžå šäœã®äžè²«ããç解ãå¿ èŠãªã±ãŒã¹ã«æé©ã§ãããŸãããŠãŒã¶ãŒã®é·ã質åããè€æ°ã®é¢ä¿æ§ãèæ ®ããå¿ èŠãããé«åºŠãªååãã«ãé©ããŠããŸãã
Self-Routeãæé©ãªå Žå: ã¿ã¹ã¯ã«å¿ããŠå¹ççã«ã¢ãã«ã䜿ãåãããå Žåãè€éãªè³ªåå¿çããç¶æ³ã«å¿ããæ å ±ååŸãæ±ããããAIã¢ã·ã¹ã¿ã³ãã«æé©ã§ãð€ãäŸãã°ããŠãŒã¶ãŒããã®åãåãããå€æ§ã§ãäžéšã¯åçŽãªæ å ±ååŸã§è§£æ±ºããäžéšã¯æ·±ãæèç解ãå¿ èŠãªå Žåã«ç¹ã«æå¹ã§ãã
8. ðçµè«: æªæ¥ã¯ãã€ããªããã«ããïŒ
RAGãšLCã®åŒ·ã¿ãçµã¿åãããSelf-Routeã¯ãä»åŸã®AIã·ã¹ãã ã®éçºã«ãããŠéåžžã«ææã§ãðãå¹çãšæ§èœã®ãã©ã³ã¹ãåãããšã§ãå®éã®å©çšã·ãŒã³ã«åãããæé©ãªãœãªã¥ãŒã·ã§ã³ãæäŸã§ãããããAIã®æªæ¥ãæ ãæè¡ãšãããã§ãããðã
ç¹ã«ãäŒæ¥ã顧客察å¿ãããŒã¿è§£æã®å¹çåãé²ããäžã§ãSelf-Routeã®ãããªãã€ããªãããªã¢ãããŒãã¯ãè²»çšå¯Ÿå¹æãæ倧åãã€ã€ãããã©ãŒãã³ã¹ã®é«ããå®çŸããããšãæåŸ ãããŸãããŸããåã«æ§èœãé«ãã ãã§ãªããå¿ èŠã«å¿ããŠãªãœãŒã¹ã®æé©é åãå¯èœã§ããããšãããç°å¢è² è·ã®äœæžãã³ã¹ãåæžãšãã£ãç¹ã§ã倧ããªå©ç¹ããããŸããå°æ¥çã«ã¯ããã®ãããªæè»ã§è³¢ãAIã·ã¹ãã ããç§ãã¡ã®æ¥åžžç掻ãããžãã¹ã®å€ãã®å Žé¢ã§å©çšãããããšã«ãªãã§ãããã
9. ðŒðæ·»ä»ç»åã®äœçœ®ã«ã€ããŠ
æ·»ä»ãããç»åã¯ãæ§èœãšã³ã¹ãã®æ¯èŒã«é¢ããèŠèŠçãªããŒã¿ãæäŸããŠããŸãããã®ç»åã¯ã6. âïžæ§èœãšã³ã¹ãã®ã°ã©ãåæðžãã®é ç®ã«é 眮ããããšã§ã説æãè£å®ããèªè ã«èŠèŠçãªç解ãå©ããããšãã§ããŸãð ïžâ¬ïžãã°ã©ãã¯ãåã¢ãã«ã«ãããRAGãLCãããã³Self-Routeã®ããã©ãŒãã³ã¹ãšã³ã¹ãã®éããæ確ã«ç€ºããŠãããããããã§ã®èª¬æã«ãŽã£ããã§ãïŒ
ðð»æåŸãŸã§èªãã§ããã ãããããšãããããŸãïŒãã®èšäºãçããã®ç解ãæ·±ããAIæè¡ã®éžæã«åœ¹ç«ã€ããšãé¡ã£ãŠããŸãðããã²ã³ã¡ã³ããðãæ®ããŠãçããã®èããã·ã§ã¢ããŠãã ãããïŒððŒð£
ãã®èšäºãæ°ã«å ¥ã£ãããµããŒããããŠã¿ãŸãããïŒ