{"id":17068,"date":"2025-02-17T10:31:12","date_gmt":"2025-02-17T01:31:12","guid":{"rendered":"https:\/\/highreso.jp\/edgehub\/?p=17068"},"modified":"2025-02-17T10:56:21","modified_gmt":"2025-02-17T01:56:21","slug":"deepseekr1-rag","status":"publish","type":"post","link":"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseekr1-rag.html","title":{"rendered":"DeepSeek-R1\u3067\u300c\u601d\u8003\u3059\u308bRAG\u300d\u3092\u69cb\u7bc9\uff01\u6df1\u3044\u601d\u8003\u3067\u7cbe\u5ea6\u5411\u4e0a"},"content":{"rendered":"\n<p>DeepSeek-R1\u306f\u3001OpenAI o1\u30e2\u30c7\u30eb\u306e\u3088\u3046\u306b\u9ad8\u5ea6\u306a\u63a8\u8ad6\u80fd\u529b\u3092\u6d3b\u304b\u3057\u305f\u300c\u6df1\u3044\u601d\u8003\u30d7\u30ed\u30bb\u30b9\u300d\u3092\u5f37\u307f\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><span class=\"swl-format-2\">RAG\u306bDeepSeek-R1\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u6df1\u3044\u601d\u8003\u3092\u6d3b\u304b\u3057\u305f\u7cbe\u5ea6\u306e\u9ad8\u3044\u751f\u6210\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001DeepSeek-R1\u3092\u4f7f\u3063\u3066\u300c\u601d\u8003\u3059\u308bRAG\u300d\u3092\u69cb\u7bc9\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"is-style-balloon_box\">\u3056\u3063\u304f\u308a\u8a00\u3046\u3068<\/p>\n\n\n\n<div class=\"wp-block-group is-style-big_icon_good\"><div class=\"wp-block-group__inner-container\">\n<ul class=\"wp-block-list\">\n<li>DeepSeek-R1\u306e\u6df1\u3044\u601d\u8003\u30d7\u30ed\u30bb\u30b9\u3092\u901a\u3058\u3066\u3001\u7cbe\u5ea6\u306e\u9ad8\u3044RAG\u751f\u6210\u304c\u3067\u304d\u308b<\/li>\n\n\n\n<li>DeepSeek-R1\u3068LangChain\u3092\u4f7f\u3063\u3066RAG\u3092\u69cb\u7bc9\u3059\u308b<\/li>\n\n\n\n<li>\u30b5\u30a4\u30d0\u30fc\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u516c\u958b\u3057\u305fDeepSeek-R1\u306e\u65e5\u672c\u8a9e\u30e2\u30c7\u30eb\u3092\u4f7f\u7528<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">DeepSeek-R1\u3067\u69cb\u7bc9\u3059\u308b\u300c\u601d\u8003\u3059\u308bRAG\u300d\u3068\u306f\uff1f<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"600\" height=\"300\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/10\/26_anime_midashi.jpg\" alt=\"\u898b\u51fa\u3057\u753b\u50cf\" class=\"wp-image-12414\" srcset=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/10\/26_anime_midashi.jpg 600w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/10\/26_anime_midashi-300x150.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p>DeepSeek-R1\u306f\u3001OpenAI\u306eo1\u30e2\u30c7\u30eb\u306b\u5339\u6575\u3059\u308b\u6027\u80fd\u3092\u6301\u3064\u6700\u9ad8\u7d1a\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9LLM\u3067\u3059\u3002<\/p>\n\n\n\n<p>o1\u30e2\u30c7\u30eb\u306e\u3088\u3046\u306b\u9ad8\u5ea6\u306a\u63a8\u8ad6\u80fd\u529b\u3092\u6d3b\u304b\u3057\u305f\u300c\u6df1\u3044\u601d\u8003\u30d7\u30ed\u30bb\u30b9\u300d\u3092\u5f37\u307f\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><span class=\"swl-format-2\">RAG\u306bDeepSeek-R1\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u6df1\u3044\u601d\u8003\u3092\u6d3b\u304b\u3057\u305f\u7cbe\u5ea6\u306e\u9ad8\u3044\u751f\u6210\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u306e\u9ad8\u5ea6\u306a\u63a8\u8ad6\u80fd\u529b\u3068\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/02\/eyecatch-deepseekr1-model-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseek-r1-model.html\">\u3010DeepSeek-R1\u3011\u5404\u30e2\u30c7\u30eb\u306e\u6027\u80fd\u30fb\u5fc5\u8981\u306aGPU\u30e1\u30e2\u30ea\u30fb\u5546\u7528\u5229\u7528\u3092\u89e3\u8aac\uff01<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">DeepSeek-R1\u306f\u3001\u4e2d\u56fd\u306eAI\u4f01\u696dDeepSeek\u304c\u958b\u767a\u3057\u305f\u6700\u65b0\u306e\u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb\uff08LLM\uff09\u3067\u3059\u3002 DeepSeek-R1\u306f\u3001\u7121\u6599\u3067\u4f7f\u3048\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u3042\u308a\u306a\u304c\u3089\u3001OpenAI\u306eo1\u30e2\u30c7\u30eb\u306b\u5339&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u306f\u65e5\u672c\u8a9e\u3067\u4f7f\u3048\u308b\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/02\/eyecatch-deepseekr1-japanese-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseek-r1-japanese.html\">DeepSeek-R1\u306e\u300c\u65e5\u672c\u8a9e\u30e2\u30c7\u30eb\u300d\u3068\u306f\uff1f\u30ed\u30fc\u30ab\u30eb\u3067\u306e\u4f7f\u3044\u65b9\u3092\u89e3\u8aac\uff01<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u30b5\u30a4\u30d0\u30fc\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u2060\u2060\u304cDeepSeek-R1\u306b\u65e5\u672c\u8a9e\u3067\u8ffd\u52a0\u5b66\u7fd2\u3057\u305f\u30e2\u30c7\u30eb\u3092\u7121\u6599\u3067\u516c\u958b\u3057\u307e\u3057\u305f\u3002 HuggingFace\u3084Ollama\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001DeepSeek-R1\u306e\u65e5\u672c\u8a9e\u30e2\u30c7\u30eb\u3092\u30ed\u30fc\u30ab&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<h2 class=\"wp-block-heading\">DeepSeek-R1 RAG\u306e\u74b0\u5883\u69cb\u7bc9<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"600\" height=\"300\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/12_midashi_anime0921.jpg\" alt=\"\u898b\u51fa\u3057\u753b\u50cf\" class=\"wp-image-11893\" srcset=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/12_midashi_anime0921.jpg 600w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/12_midashi_anime0921-300x150.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p><span class=\"swl-format-2\">\u3053\u306e\u8a18\u4e8b\u3067\u7528\u610f\u3057\u305f\u5b9f\u884c\u74b0\u5883\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<div class=\"wp-block-group is-style-big_icon_good\"><div class=\"wp-block-group__inner-container\">\n<ul class=\"wp-block-list\">\n<li>GPU\uff1aNVIDIA A100 80GB<\/li>\n\n\n\n<li>GPU\u30e1\u30e2\u30ea\uff08VRAM\uff09\uff1a80GB<\/li>\n\n\n\n<li>OS \uff1aUbuntu 22.04<\/li>\n\n\n\n<li>Docker<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<div class=\"p-blogParts post_content\" data-partsID=\"4485\"><p><div class=\"p-adBox -ranking -border-on\" data-id=\"4507\" data-ad=\"ranking\"><div class=\"p-adBox__title -rank1\">1\u6642\u959350\u5186\u304b\u3089\u4f7f\u3048\u308bGPU\u30af\u30e9\u30a6\u30c9\u300cGPUSOROBAN\u300d<\/div><div class=\"p-adBox__body\"><div class=\"p-adBox__img\"><div class=\"centerw250\"><a href=\"https:\/\/soroban.highreso.jp\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=highend-boxtop&adid=edgehub\" rel=\"nofollow\" referrerpolicy=\"no-referrer-when-downgrade\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/gpusorobanlllm_banner.jpg\" alt=\"GPUSOROBAN\"><\/a><\/div><\/div><div class=\"p-adBox__details\"><div class=\"p-adBox__star c-reviewStars\"><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><\/div><div class=\"p-adBox__price u-thin u-fz-s\">GPU\u306e\u30b3\u30b9\u30c8\u3067\u304a\u60a9\u307f\u306e\u65b9\u306b\uff01<\/div><div class=\"p-adBox__desc\">\u751f\u6210AI\u30fbLLM\u5411\u3051\u306e\u9ad8\u901fGPU\u3092\u696d\u754c\u6700\u5b89\u7d1a\u306e1\u6642\u959350\u5186\u304b\u3089\u5229\u7528\u3067\u304d\u307e\u3059\u3002\r\n\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u74b0\u5883\u3055\u3048\u3042\u308c\u3070\u3001GPU\u30b5\u30fc\u30d0\u30fc\u3092\u3059\u3050\u306b\u4f7f\u3048\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u3066\u3044\u308b\u3068\u304d\u306e\u307f\u306e\u8ab2\u91d1\u3067\u3001\u30b3\u30b9\u30c8\u3092\u6700\u5c0f\u5316\u3067\u304d\u307e\u3059\u3002\r\n<\/div><\/div><\/div><div class=\"p-adBox__btns\"><a href=\"https:\/\/soroban.highreso.jp\/compute\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=boxtop&adid=edgehub\" class=\"p-adBox__btn -btn1\" target=\"_blank\" rel=\"noopener nofollow\">\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u898b\u308b<\/a><a href=\"https:\/\/soroban.highreso.jp\/download\/compute-catalog\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=boxtop&adid=edgehub\" class=\"p-adBox__btn -btn2\" target=\"_blank\" rel=\"noopener nofollow\">\u8cc7\u6599\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a><\/div><\/div><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Docker\u3067\u74b0\u5883\u69cb\u7bc9<\/h3>\n\n\n\n<p><span class=\"swl-format-2\">Docker\u3092\u4f7f\u7528\u3057\u3066RAG\u306e\u74b0\u5883\u3092\u69cb\u7bc9\u3092\u3057\u307e\u3059<\/span><\/p>\n\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">Docker\u306e\u4f7f\u3044\u65b9\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/ubuntudocker-eyecatch-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/ubuntudocker.html\">Ubuntu\u306bDocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff01GPU\u3092\u30b3\u30f3\u30c6\u30ca\u304b\u3089\u4f7f\u3046\u65b9\u6cd5<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">GPU\u306e\u74b0\u5883\u69cb\u7bc9\u3067\u306f\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u4e0d\u4e00\u81f4\u306b\u3088\u308b\u30a8\u30e9\u30fc\u304c\u983b\u767a\u3057\u307e\u3059\u3002 Docker\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u3053\u306e\u3088\u3046\u306a\u4f9d\u5b58\u95a2\u4fc2\u306e\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<div class=\"swell-block-step\" data-num-style=\"circle\">\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Dockerfile\u306e\u4f5c\u6210<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">Ubuntu\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u3001Dockerfile\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>mkdir deepseekr1_rag\ncd deepseekr1_rag\nnano Dockerfile<\/code><\/pre>\n\n\n\n<p>Dockerfile\u306b\u4ee5\u4e0b\u306e\u8a18\u8ff0\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code># \u30d9\u30fc\u30b9\u30a4\u30e1\u30fc\u30b8(CUDA)\u306e\u6307\u5b9a\nFROM nvidia\/cuda:12.1.0-cudnn8-devel-ubuntu22.04\n\n# \u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nRUN apt-get update &amp;&amp; apt-get install -y python3-pip python3-venv git nano curl\n\nRUN curl -fsSL https:\/\/ollama.com\/install.sh | sh\n\n# \u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u8a2d\u5b9a\nWORKDIR \/app\n\n# \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc\nCOPY . \/app\n\n# Python\u4eee\u60f3\u74b0\u5883\u306e\u4f5c\u6210\nRUN python3 -m venv \/app\/.venv\n\n# \u4eee\u60f3\u74b0\u5883\u3092\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3092.bashrc\u306b\u8ffd\u52a0\nRUN echo \"source \/app\/.venv\/bin\/activate\" >> \/root\/.bashrc\n\n# JupyterLab\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nRUN \/app\/.venv\/bin\/pip install Jupyter jupyterlab\n\n# LangChain\u95a2\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nRUN \/app\/.venv\/bin\/pip install ollama==0.4.4 langchain-ollama langchain langsmith langchain-chroma faiss-gpu langchain-community langchain_huggingface langchain_core tiktoken\n\n# \u30b3\u30f3\u30c6\u30ca\u306e\u8d77\u52d5\u6642\u306bbash\u3092\u5b9f\u884c\nCMD &#091;\"\/bin\/bash\"]<\/code><\/pre>\n\n\n\n<p class=\"is-style-icon_info\">[Ctrl + S]\u30ad\u30fc\u3067\u5909\u66f4\u5185\u5bb9\u3092\u4fdd\u5b58\u3057\u3001[Ctrl + X]\u30ad\u30fc\u3067\u7de8\u96c6\u30e2\u30fc\u30c9\u304b\u3089\u629c\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30de\u30f3\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>FROM nvidia\/cuda:12.1.0-cudnn8-devel-ubuntu22.04<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">CUDA12.1\u306e\u30d9\u30fc\u30b9\u30a4\u30e1\u30fc\u30b8\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>RUN apt-get update &amp;&amp; apt-get install -y python3-pip python3-venv git nano curl<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Python\u95a2\u9023\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>RUN curl -fsSL https:\/\/ollama.com\/install.sh | sh<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Linux\u7528\u306eOllama\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>RUN \/app\/.venv\/bin\/pip install ollama==0.4.4 langchain-ollama langchain langsmith langchain-chroma faiss-gpu langchain-community langchain_huggingface langchain_core tiktoken<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Python\u7528\u306eOllama\u3068LangChain\u95a2\u9023\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>LLM\u306fOllama\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u52d5\u304b\u3057\u307e\u3059\u306e\u3067\u3001PyTorch\u3084Transformer\u306f\u5225\u9014\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4e0d\u8981\u3067\u3059\u3002<\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">docker-compose.yml\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">docker-compose.yml\u3092\u4f7f\u7528\u3057\u3066Docker\u30b3\u30f3\u30c6\u30ca\u306e\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>docker-compose.yml\u306eYAML\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u958b\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>nano docker-compose.yml<\/code><\/pre>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3001YAML\u30d5\u30a1\u30a4\u30eb\u306b\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>services:\n  deepseekr1_rag:\n    build:\n      context: .\n      dockerfile: Dockerfile\n    image: deepseekr1_rag\n    runtime: nvidia\n    container_name: deepseekr1_rag\n    ports:\n      - \"8888:8888\"\n    volumes:\n      - .:\/app\/deepseekr1_rag\n    deploy:\n      resources:\n        reservations:\n          devices:\n            - driver: nvidia\n              count: 1\n              capabilities: &#091;gpu]\n    command: &gt;\n      bash -c '\/usr\/local\/bin\/ollama serve &amp; \/app\/.venv\/bin\/jupyter lab --ip=\"*\" --port=8888 --NotebookApp.token=\"\" --NotebookApp.password=\"\" --no-browser --allow-root'<\/code><\/pre>\n\n\n\n<p class=\"is-style-icon_info\">[Ctrl + S]\u30ad\u30fc\u3067\u5909\u66f4\u5185\u5bb9\u3092\u4fdd\u5b58\u3057\u3001[Ctrl + X]\u30ad\u30fc\u3067\u7de8\u96c6\u30e2\u30fc\u30c9\u304b\u3089\u629c\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30de\u30f3\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>bash -c '\/usr\/local\/bin\/ollama serve<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Ollama Server\u3092\u8d77\u52d5\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>Python\u306eOllama\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u3001Ollama Server\u3092\u8d77\u52d5\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>&amp; \/app\/.venv\/bin\/jupyter lab --ip=\"*\" --port=8888 --NotebookApp.token=\"\" --NotebookApp.password=\"\" --no-browser --allow-root'<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Jupyter Lab\u30928888\u756a\u30dd\u30fc\u30c8\u3067\u8d77\u52d5\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Docker\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">Dockerfile\u304b\u3089\u30d3\u30eb\u30c9\u3057\u3066\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002\u00a0\u00a0\u00a0<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>docker compose up<\/code><\/pre>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p>Docker\u306e\u8d77\u52d5\u5f8c\u306b<span class=\"swl-format-2\">\u30d6\u30e9\u30a6\u30b6\u306e\u691c\u7d22\u7a93\u306b&#8221;localhost:8888&#8243;\u3092\u5165\u529b<\/span>\u3059\u308b\u3068\u3001Jupyter Lab\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>localhost:8888<\/code><\/pre>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">DeepSeek-R1 RAG\u306e\u5b9f\u88c5<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"600\" height=\"300\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/13_midashi_sf0923.jpg\" alt=\"\u898b\u51fa\u3057\u753b\u50cf\" class=\"wp-image-11924\" srcset=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/13_midashi_sf0923.jpg 600w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/13_midashi_sf0923-300x150.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p><span class=\"swl-format-2\">Docker\u30b3\u30f3\u30c6\u30ca\u3067\u8d77\u52d5\u3057\u305fJupyter Lab\u4e0a\u3067RAG\u306e\u5b9f\u88c5\u3092\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">LangChain\u3092\u4f7f\u3063\u305fRAG\u306e\u5b9f\u88c5\u65b9\u6cd5\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/langchainrag-eyecatch-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/langchainrag.html\">LangChain\u3067RAG\u3092\u7c21\u5358\u306b\u69cb\u7bc9\uff01\u300e\u546a\u8853\u5efb\u6226\u300f\u306b\u3064\u3044\u3066\u805e\u3044\u3066\u307f\u308b<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">RAG\u306f\u5916\u90e8\u304b\u3089\u53d6\u5f97\u3057\u305f\u60c5\u5831\u3092\u3082\u3068\u306b\u3001LLM\u306e\u77e5\u8b58\u3092\u5f37\u5316\u3057\u3066\u751f\u6210\u3059\u308b\u3057\u304f\u307f\u3067\u3059\u3002 RAG\u3092\u4f7f\u3046\u3068LLM\u304c\u5b66\u7fd2\u3057\u3066\u3044\u306a\u3044\u65b0\u3057\u3044\u60c5\u5831\u3092\u7b54\u3048\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306f&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<div class=\"swell-block-step\" data-num-style=\"circle\">\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">\u74b0\u5883\u5909\u6570\u306e\u8a2d\u5b9a<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">LangChain\u306b\u95a2\u3059\u308b\u74b0\u5883\u5909\u6570\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>import os\nfrom uuid import uuid4\n\nunique_id = uuid4().hex&#091;0:8]\n\nos.environ&#091;\"LANGCHAIN_TRACING_V2\"] = \"true\"\nos.environ&#091;\"LANGCHAIN_PROJECT\"] = f\"deepseekr1_rag - {unique_id}\"\nos.environ&#091;\"LANGCHAIN_ENDPOINT\"] = \"https:\/\/api.smith.langchain.com\"\nos.environ&#091;\"LANGCHAIN_API_KEY\"] = \"***************\"<\/code><\/pre>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30fc\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>unique_id = uuid4().hex&#091;0:8]<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">8\u6841\u306e\u30e9\u30f3\u30c0\u30e0\u306a\u4e00\u610f\u306e\u8b58\u5225\u5b50\u3092\u751f\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>os.environ&#091;\"LANGCHAIN_TRACING_V2\"] = \"true\"<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u3053\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u3001LangChain\u306e\u30c8\u30ec\u30fc\u30b9\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>os.environ&#091;\"LANGCHAIN_PROJECT\"] = f\"deepseekr1_rag - {unique_id}\"<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">LangChain\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u540d\u524d\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u3053\u3053\u3067\u306f\u3001\u751f\u6210\u3057\u305f<code>unique_id<\/code>\u3092\u4f7f\u7528\u3057\u3066\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d\u3092\u300clangchainrag &#8211; {unique_id}\u300d\u306e\u5f62\u5f0f\u3067\u4e00\u610f\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>os.environ&#091;\"LANGCHAIN_ENDPOINT\"] = \"https:\/\/api.smith.langchain.com\"<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Langsmith\u306eAPI\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>os.environ&#091;\"LANGCHAIN_API_KEY\"] = \"***************\"<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">LangChain API\u3092\u5229\u7528\u3059\u308b\u305f\u3081\u306eAPI\u30ad\u30fc\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">LLM\u306e\u8a2d\u5b9a<\/div><div class=\"swell-block-step__body\">\n<p>HuggingFace\u304b\u3089\u300c<a href=\"https:\/\/huggingface.co\/mmnga\/cyberagent-DeepSeek-R1-Distill-Qwen-32B-Japanese-gguf\">mmnga\/cyberagent-DeepSeek-R1-Distill-Qwen-32B-Japanese-gguf<\/a>\u300d\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><span class=\"swl-format-2\">\u30b5\u30a4\u30d0\u30fc\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u304c\u516c\u958b\u3057\u305fDeepSeek-R1\u306e\u65e5\u672c\u8a9e\u30e2\u30c7\u30eb\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>!curl -L -o cyberagent-DeepSeek-R1-Distill-Qwen-32B-Japanese-Q4_K_M.gguf \"https:\/\/huggingface.co\/mmnga\/cyberagent-DeepSeek-R1-Distill-Qwen-32B-Japanese-gguf\/resolve\/main\/cyberagent-DeepSeek-R1-Distill-Qwen-32B-Japanese-Q4_K_M.gguf?download=true\"<\/code><\/pre>\n\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u306e\u4ed6\u306e\u30e2\u30c7\u30eb\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/02\/eyecatch-deepseekr1-model-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseek-r1-model.html\">\u3010DeepSeek-R1\u3011\u5404\u30e2\u30c7\u30eb\u306e\u6027\u80fd\u30fb\u5fc5\u8981\u306aGPU\u30e1\u30e2\u30ea\u30fb\u5546\u7528\u5229\u7528\u3092\u89e3\u8aac\uff01<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">DeepSeek-R1\u306f\u3001\u4e2d\u56fd\u306eAI\u4f01\u696dDeepSeek\u304c\u958b\u767a\u3057\u305f\u6700\u65b0\u306e\u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb\uff08LLM\uff09\u3067\u3059\u3002 DeepSeek-R1\u306f\u3001\u7121\u6599\u3067\u4f7f\u3048\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u3042\u308a\u306a\u304c\u3089\u3001OpenAI\u306eo1\u30e2\u30c7\u30eb\u306b\u5339&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n\n\n\n\n<p><span class=\"swl-format-2\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30e2\u30c7\u30eb\u3092Ollama\u3067\u4f7f\u3048\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>import ollama\nfrom langchain_ollama.chat_models import ChatOllama\n\nmodelfile='''\nFROM .\/cyberagent-DeepSeek-R1-Distill-Qwen-32B-Japanese-Q4_K_M.gguf\nTEMPLATE \"\"\"{{- if .System }}{{ .System }}{{ end }}\n{{- range $i, $_ := .Messages }}\n{{- $last := eq (len (slice $.Messages $i)) 1}}\n{{- if eq .Role \"user\" }}&lt;\uff5cUser\uff5c>{{ .Content }}\n{{- else if eq .Role \"assistant\" }}&lt;\uff5cAssistant\uff5c>{{ .Content }}{{- if not $last }}&lt;\uff5cend\u2581of\u2581sentence\uff5c>{{- end }}\n{{- end }}\n{{- if and $last (ne .Role \"assistant\") }}&lt;\uff5cAssistant\uff5c>{{- end }}\n{{- end }}\"\"\"\nPARAMETER stop &lt;\uff5cbegin\u2581of\u2581sentence\uff5c>\nPARAMETER stop &lt;\uff5cend\u2581of\u2581sentence\uff5c>\nPARAMETER stop &lt;\uff5cUser\uff5c>\nPARAMETER stop &lt;\uff5cAssistant\uff5c>\n'''\nollama.create(model='deepseekr1-32b-jpn', modelfile=modelfile)\n\nllm = ChatOllama(model='deepseekr1-32b-jpn', temperature=0)<\/code><\/pre>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30fc\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>modelfile='''<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30e2\u30c7\u30eb\u30d5\u30a1\u30a4\u30eb\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u30e2\u30c7\u30eb\u30d5\u30a1\u30a4\u30eb\u306f\u3001Ollama\u3067\u30ab\u30b9\u30bf\u30e0\u30e2\u30c7\u30eb\u3092\u8a2d\u5b9a\u3059\u308b\u305f\u3081\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>FROM .\/cyberagent-DeepSeek-R1-Distill-Qwen-32B-Japanese-Q4_K_M.gguf<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30e2\u30c7\u30eb\u306e\u30d1\u30b9\u304c\u5165\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>TEMPLATE \"\"\"{{- if .System }}{{ .System }}{{ end }}...<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30e2\u30c7\u30eb\u3067\u4f7f\u7528\u3059\u308b\u30d7\u30ed\u30f3\u30d7\u30c8\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304c\u5165\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u30d7\u30ed\u30f3\u30d7\u30c8\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306f\u30e2\u30c7\u30eb\u306b\u3088\u3063\u3066\u7570\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>ollama.create(model='deepseekr1-32b-jpn', modelfile=modelfile)<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30e2\u30c7\u30eb\u3068\u30d7\u30ed\u30f3\u30d7\u30c8\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u4f7f\u3063\u3066Ollama\u7528\u306e\u30e2\u30c7\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><code>model<\/code>\u306b\u306fOllama\u3067\u547c\u3073\u51fa\u3059\u969b\u306b\u4f7f\u7528\u3059\u308b\u540d\u524d\u3092\u3064\u3051\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>ChatOllama(model='deepseekr1-32b-jpn', temperature=0)<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">LangChain\u3067\u30e2\u30c7\u30eb\u3092\u5b9f\u884c\u3067\u304d\u308b\u72b6\u614b\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<\/div><\/div>\n\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">ollama.create\u306e\u30a8\u30e9\u30fc\u300cinvalid digest format\u300d\u306e\u89e3\u6d88\u65b9\u6cd5<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/12\/eyecatch_ollama_create_error-300x157.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/ollama-create-error.html\">ollama.create\u306e\u30a8\u30e9\u30fc\u300cResponseError: invalid digest format\u300d<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u5916\u90e8\u306eLLM\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u969b\u3001ollama.create\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u300cResponseError:invalid digest format\u300d\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002 \u672c\u8a18\u4e8b\u3067\u306f\u3001\u3053\u306e\u30a8\u30e9&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">Ollama\u306e\u8a73\u3057\u3044\u4f7f\u3044\u65b9\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/ollamapython-eyecatch-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/ollamapython.html\">Ollama\u3092Python\u3067\u4f7f\u3044\u305f\u3044\uff01\u30ed\u30fc\u30ab\u30ebLLM\u3092\u5feb\u9069\u306b\u52d5\u304b\u3059\uff01<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">ollama-python\u306fPython\u74b0\u5883\u3067Ollama\u304c\u4f7f\u3048\u308b\u7121\u6599\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002 ollama-python\u3092\u5229\u7528\u3059\u308c\u3070\u3001\u30ed\u30fc\u30ab\u30ebLLM\u3092API\u3067\u7c21\u5358\u306b\u6d3b\u7528\u3067\u304d\u305f\u308a\u3001RAG\u3084\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u3078\u306e\u7d71\u5408\u3082&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<div class=\"p-blogParts post_content\" data-partsID=\"4485\"><p><div class=\"p-adBox -ranking -border-on\" data-id=\"4507\" data-ad=\"ranking\"><div class=\"p-adBox__title -rank1\">1\u6642\u959350\u5186\u304b\u3089\u4f7f\u3048\u308bGPU\u30af\u30e9\u30a6\u30c9\u300cGPUSOROBAN\u300d<\/div><div class=\"p-adBox__body\"><div class=\"p-adBox__img\"><div class=\"centerw250\"><a href=\"https:\/\/soroban.highreso.jp\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=highend-boxtop&adid=edgehub\" rel=\"nofollow\" referrerpolicy=\"no-referrer-when-downgrade\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/gpusorobanlllm_banner.jpg\" alt=\"GPUSOROBAN\"><\/a><\/div><\/div><div class=\"p-adBox__details\"><div class=\"p-adBox__star c-reviewStars\"><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><\/div><div class=\"p-adBox__price u-thin u-fz-s\">GPU\u306e\u30b3\u30b9\u30c8\u3067\u304a\u60a9\u307f\u306e\u65b9\u306b\uff01<\/div><div class=\"p-adBox__desc\">\u751f\u6210AI\u30fbLLM\u5411\u3051\u306e\u9ad8\u901fGPU\u3092\u696d\u754c\u6700\u5b89\u7d1a\u306e1\u6642\u959350\u5186\u304b\u3089\u5229\u7528\u3067\u304d\u307e\u3059\u3002\r\n\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u74b0\u5883\u3055\u3048\u3042\u308c\u3070\u3001GPU\u30b5\u30fc\u30d0\u30fc\u3092\u3059\u3050\u306b\u4f7f\u3048\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u3066\u3044\u308b\u3068\u304d\u306e\u307f\u306e\u8ab2\u91d1\u3067\u3001\u30b3\u30b9\u30c8\u3092\u6700\u5c0f\u5316\u3067\u304d\u307e\u3059\u3002\r\n<\/div><\/div><\/div><div class=\"p-adBox__btns\"><a href=\"https:\/\/soroban.highreso.jp\/compute\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=boxtop&adid=edgehub\" class=\"p-adBox__btn -btn1\" target=\"_blank\" rel=\"noopener nofollow\">\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u898b\u308b<\/a><a href=\"https:\/\/soroban.highreso.jp\/download\/compute-catalog\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=boxtop&adid=edgehub\" class=\"p-adBox__btn -btn2\" target=\"_blank\" rel=\"noopener nofollow\">\u8cc7\u6599\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a><\/div><\/div><\/p>\n<\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Wikipedia\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u62bd\u51fa<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">Wikipedia\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u3092\u62bd\u51fa\u3057\u3066\u3001\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><a href=\"https:\/\/ja.wikipedia.org\/wiki\/%E8%91%AC%E9%80%81%E3%81%AE%E3%83%95%E3%83%AA%E3%83%BC%E3%83%AC%E3%83%B3\">Wikipedia\u306e\u300e\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u300f<\/a>\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u62bd\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>from langchain_community.document_loaders import WebBaseLoader\n\nurls = &#091;\n\"https:\/\/ja.wikipedia.org\/wiki\/%E8%91%AC%E9%80%81%E3%81%AE%E3%83%95%E3%83%AA%E3%83%BC%E3%83%AC%E3%83%B3\"\n]\n\ndocs = &#091;WebBaseLoader(url).load() for url in urls]\ndocs_list = &#091;item for sublist in docs for item in sublist]<\/code><\/pre>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30fc\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>WebBaseLoader(url).load()<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u6307\u5b9a\u3057\u305fWeb\u30da\u30fc\u30b8\u306eHTML\u3092\u53d6\u5f97\u30fb\u89e3\u6790\u3057\u3001\u4f7f\u3044\u3084\u3059\u3044\u30c7\u30fc\u30bf\u69cb\u9020\u306b\u5909\u63db\u3057\u3066\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/span><\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">\u30c6\u30ad\u30b9\u30c8\u3092\u30c1\u30e3\u30f3\u30af\u306b\u5206\u5272<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">\u8aad\u307f\u8fbc\u3093\u3060\u30c7\u30fc\u30bf\u3092\u30c1\u30e3\u30f3\u30af\u306b\u5206\u5272\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u691c\u7d22\u7cbe\u5ea6\u306e\u5411\u4e0a\u3084\u52b9\u7387\u7684\u306a\u51e6\u7406\u306e\u305f\u3081\u306b\u30c1\u30e3\u30f3\u30af\u5206\u5272\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>from langchain.text_splitter import CharacterTextSplitter\n\ntext_splitter = CharacterTextSplitter.from_tiktoken_encoder(\n    separator = \"\\n\",\n    chunk_size= 1000,\n    chunk_overlap=100,\n)\n\ndoc_splits = text_splitter.split_documents(docs_list)\ndoc_splits&#091;12:15]<\/code><\/pre>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30fc\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>CharacterTextSplitter.from_tiktoken_encoder...<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30c6\u30ad\u30b9\u30c8\u3092\u6307\u5b9a\u3055\u308c\u305f\u6761\u4ef6\u3067\u30c1\u30e3\u30f3\u30af\u306b\u5206\u5272\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>separator = \"\\n\"<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30c1\u30e3\u30f3\u30af\u3092\u5206\u5272\u3059\u308b\u969b\u306e\u533a\u5207\u308a\u6587\u5b57\u3092\u300c\\n\u300d\u3068\u3057\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>chunk_size= 1000<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u5404\u30c1\u30e3\u30f3\u30af\u304c1000\u6587\u5b57\u3092\u8d85\u3048\u306a\u3044\u3088\u3046\u306b\u5206\u5272\u3055\u308c\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>chunk_overlap=100<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u5404\u30c1\u30e3\u30f3\u30af\u304c100\u6587\u5b57\u5206\u91cd\u8907\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<\/div><\/div>\n\n\n\n<p class=\"is-style-balloon_box\">\u78ba\u8a8d\u306e\u305f\u3081\u3001\u5206\u5272\u3057\u305f\u30c1\u30e3\u30f3\u30af\u3092\uff13\u3064\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-swl-gray-background-color has-background\"><code>&#091;Document(metadata={'source': 'https:\/\/ja.wikipedia.org\/wiki\/%E8%91%AC%E9%80%81%E3%81%AE%E3%83%95%E3%83%AA%E3%83%BC%E3%83%AC%E3%83%B3', 'title': '\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3 - Wikipedia', 'language': 'ja'}, page_content='\u3053\u308c\u304b\u3089\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u4eba\u751f\u3092\u300c\u60f3\u50cf\u3082\u3067\u304d\u306a\u3044\u307b\u3069\u3001\u9577\u3044\u3082\u306e\u306b\u306a\u308b\u300d\u3068\u3044\u3044\u3001\u5f8c\u65e5\u306e\u518d\u4f1a\u3092\u7d04\u675f\u3059\u308b\u3082\u3001\u5f7c\u5973\u304c\u6b21\u306b\u8a2a\u308c\u305f\u306e\u306f\u81ea\u8eab\u306e\u6669\u5e74\u3067\u3042\u308b50\u5e74\u5f8c\u3060\u3063\u305f\u3002\u300c\u305f\u3063\u305f10\u5e74\u4e00\u7dd2\u306b\u65c5\u3092\u3057\u305f\u3060\u3051\u300d\u306e\u5f7c\u306e\u6b7b\u304c\u30d5\u30ea\u30fc\u30ec\u30f3\u306b\u4e0e\u3048\u305f\u5f71\u97ff\u306f\u5927\u304d\u304f\u3001\u5f7c\u306e\u3053\u3068\u3092\u77e5\u308d\u3046\u3068\u3057\u306a\u304b\u3063\u305f\u3053\u3068\u3067\u5927\u304d\u306a\u5f8c\u6094\u306e\u5ff5\u3092\u62b1\u304b\u305b\u308b\u3053\u3068\u3068\u306a\u308b\u3002\\n\u521d\u5bfe\u9762\u6642\u304b\u3089\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u5f37\u3055\u3092\u76f4\u611f\u3067\u898b\u629c\u304d\u3001\u81ea\u8eab\u306e\u30d1\u30fc\u30c6\u30a3\u30fc\u306b\u52e7\u8a98\u3057\u305f\u3002\u9b54\u65cf\u306e\u672c\u8cea\u3092\u77e5\u3089\u306a\u304b\u3063\u305f\u305f\u3081\u306b\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u5fe0\u544a\u3092\u7121\u8996\u3057\u3066\u4eba\u3092\u98df\u3063\u305f\u9b54\u65cf\u306e\u5c11\u5973\u3092\u898b\u9003\u3057\u305f\u3053\u3068\u304c\u3042\u308b\u304c\u3001\u306e\u3061\u306b\u5f7c\u5973\u304c\u307e\u305f\u4eba\u3092\u6bba\u3081\u305f\u3068\u8a00\u3046\u82e6\u3044\u7d4c\u9a13\u3092\u3057\u3066\u3044\u308b\u3002\u52c7\u8005\u306e\u307f\u304c\u629c\u3051\u308b\u300c\u52c7\u8005\u306e\u5263\u300d\u304c\u3042\u308b\u91cc\u3067\u5263\u3092\u629c\u3053\u3046\u3068\u6311\u6226\u3057\u3066\u5931\u6557\u3057\u305f\u304c\u3001\u300c\u507d\u7269\u306e\u52c7\u8005\u3067\u3082\u304b\u307e\u308f\u306a\u3044\u3001\u9b54\u738b\u3092\u5012\u305b\u3070\u507d\u7269\u3067\u3082\u672c\u7269\u3067\u3082\u95a2\u4fc2\u306a\u3044\u300d\u3068\u8a71\u3057\u3066\u5b9f\u969b\u306b\u305d\u308c\u3092\u6210\u3057\u9042\u3052\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u304b\u3089\u3082\u300c\u3042\u3093\u306a\u5263\u304c\u7121\u304f\u3066\u3082\u30d2\u30f3\u30e1\u30eb\u306f\u672c\u7269\u306e\u52c7\u8005\u300d\u3060\u3068\u8a55\u3055\u308c\u3001\u5263\u304c\u629c\u3051\u306a\u304b\u3063\u305f\u3068\u3044\u3046\u4e00\u4ef6\u306f\u79d8\u533f\u3055\u308c\u305f&#091;\u6ce8 8]\u3002'),\n Document(metadata={'source': 'https:\/\/ja.wikipedia.org\/wiki\/%E8%91%AC%E9%80%81%E3%81%AE%E3%83%95%E3%83%AA%E3%83%BC%E3%83%AC%E3%83%B3', 'title': '\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3 - Wikipedia', 'language': 'ja'}, page_content='\u56f0\u3063\u305f\u4eba\u3092\u6c7a\u3057\u3066\u898b\u6368\u3066\u306a\u3044\u6027\u683c\u3067\u3001\u305d\u306e\u751f\u6daf\u3092\u304b\u3051\u3066\u4eba\u52a9\u3051\u306b\u5954\u8d70\u3057\u305f\u3088\u3046\u3067\u3042\u308b\u3002\u6b7b\u5f8c\u3082\u4f5c\u4e2d\u3067\u306e\u5b58\u5728\u611f\u306f\u5927\u304d\u304f\u3001\u300c\u30d2\u30f3\u30e1\u30eb\u306a\u3089\u3069\u3046\u3057\u305f\u304b\u300d\u304c\u30d5\u30ea\u30fc\u30ec\u30f3\u3092\u59cb\u3081\u3068\u3059\u308b\u5143\u52c7\u8005\u30d1\u30fc\u30c6\u30a3\u30fc\u30e1\u30f3\u30d0\u30fc\u306e\u884c\u52d5\u57fa\u6e96\u306e\u3072\u3068\u3064\u3067\u3042\u308a\u7d9a\u3051\u3066\u304a\u308a\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u56de\u60f3\u4e2d\u306b\u3082\u3001\u305f\u3073\u305f\u3073\u305d\u306e\u52c7\u8005\u3076\u308a\u304c\u632f\u308a\u8fd4\u3089\u308c\u308b\u3002\u304b\u3064\u3066\u30d5\u30ea\u30fc\u30ec\u30f3\u306b\u604b\u5fc3\u3092\u62b1\u3044\u3066\u3044\u305f\u3068\u601d\u308f\u305b\u308b\u3088\u3046\u306a\u30a8\u30d4\u30bd\u30fc\u30c9\u3082\u591a\u3044\u3002\u5e7c\u3044\u3053\u308d\u306b\u68ee\u3067\u9053\u306b\u8ff7\u3063\u305f\u3068\u304d\u306b\u30d5\u30ea\u30fc\u30ec\u30f3\u3068\u51fa\u4f1a\u3063\u3066\u304a\u308a\u3001\u82b1\u7551\u306e\u9b54\u6cd5\u3092\u898b\u305b\u3066\u3082\u3089\u3063\u305f\u3053\u3068\u304c\u3042\u308b\u3002\u30a8\u30eb\u30d5\u3067\u3042\u308b\u304c\u3086\u3048\u306b\u306f\u308b\u304b\u306b\u9577\u547d\u3067\u3042\u308b\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u672a\u6765\u3092\u304a\u3082\u3093\u3071\u304b\u3063\u3066\u9285\u50cf\u306b\u7d30\u304b\u304f\u6ce8\u6587\u3092\u3057\u305f\u308a\u3001\u6545\u90f7\u3092\u9b54\u65cf\u306b\u596a\u308f\u308c\u3066\u5b64\u72ec\u306b\u751f\u304d\u3066\u304d\u305f\u5f7c\u5973\u3092\u601d\u3044\u3084\u3063\u305f\u308a\u3068\u3001\u4f55\u304b\u3068\u6c17\u306b\u304b\u3051\u3066\u3044\u305f\u3002\u5973\u795e\u306e\u77f3\u7891\u306b\u89e6\u308c\u3066\u904e\u53bb\u306b\u623b\u3063\u305f\u30d5\u30ea\u30fc\u30ec\u30f3\u3068\u51fa\u4f1a\u3063\u305f\u969b\u306f\u3001\u5f7c\u5973\u304c\u672a\u6765\u304b\u3089\u6765\u305f\u3068\u3044\u3046\u4e8b\u5b9f\u3092\u7d20\u76f4\u306b\u53d7\u3051\u5165\u308c\u3066\u3044\u308b\u3002\\n\u30cf\u30a4\u30bf\u30fc (Heiter)\\n\u58f0 - \u6771\u5730\u5b8f\u6a39&#091;15]\\n\u4eba\u9593\u51fa\u8eab\u306e\u50e7\u4fb6\u3002\u6226\u707d\u5b64\u5150\u3067\u3001\u30d2\u30f3\u30e1\u30eb\u3068\u306f\u540c\u90f7\u306e\u5e7c\u306a\u3058\u307f\u3002\u9b54\u738b\u8a0e\u4f10\u5f8c\u306f\u8056\u90fd\u306e\u53f8\u6559\u3068\u306a\u308a\u3001\u5049\u5927\u306a\u50e7\u4fb6\u3068\u3057\u3066\u4eba\u3005\u306e\u5c0a\u656c\u3092\u96c6\u3081\u305f\u3002\u7a4f\u3084\u304b\u3067\u660e\u308b\u3044\u6027\u683c\u3060\u304c\u3001\u304a\u9152\u304c\u5927\u597d\u304d\u306a\u751f\u81ed\u574a\u4e3b\u3002\u5927\u9152\u98f2\u307f\u3067\u3042\u3063\u305f\u306b\u3082\u95a2\u308f\u3089\u305a\u3001\u30d2\u30f3\u30e1\u30eb\u306e\u6b7b\u5f8c\u308220\u5e74\u4ee5\u4e0a\u306b\u6e21\u308a\u751f\u304d\u7d9a\u3051\u308b\u306a\u3069\u4eba\u9593\u3068\u3057\u3066\u306f\u304b\u306a\u308a\u306e\u9577\u5bff\u3092\u4fdd\u3063\u305f\u3002\u305f\u3060\u3057\u3001\u6669\u5e74\u306f\u4f53\u8abf\u3092\u5d29\u3057\u305f\u3053\u3068\u3082\u3042\u3063\u3066\u9152\u3092\u7d76\u3063\u305f\u69d8\u5b50\u3067\u3042\u308b\u3002'),\n Document(metadata={'source': 'https:\/\/ja.wikipedia.org\/wiki\/%E8%91%AC%E9%80%81%E3%81%AE%E3%83%95%E3%83%AA%E3%83%BC%E3%83%AC%E3%83%B3', 'title': '\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3 - Wikipedia', 'language': 'ja'}, page_content='\u6700\u6669\u5e74\u3001\u6226\u707d\u5b64\u5150\u3067\u3042\u308b\u30d5\u30a7\u30eb\u30f3\u3092\u5f15\u304d\u53d6\u308a\u3001\u8a2a\u306d\u3066\u304d\u305f\u30d5\u30ea\u30fc\u30ec\u30f3\u306b\u3061\u3087\u3063\u3068\u3057\u305f\u8a08\u7565\u3092\u3057\u304b\u3051\u3066\u30d5\u30a7\u30eb\u30f3\u3092\u5f7c\u5973\u306e\u5f1f\u5b50\u3068\u3057\u3066\u8a17\u3059\u3053\u3068\u3067\u3001\u81ea\u5206\u306e\u6b7b\u5f8c\u306e\u60a9\u307f\u3092\u89e3\u6c7a\u3057\u305f\u3002\u304b\u3064\u3066\u306f\u81ea\u8eab\u304c\u5b64\u5150\u3060\u3063\u305f\u3053\u3068\u304b\u3089\u3001\u5b64\u5150\u9662\u306e\u5fa9\u8208\u8cc7\u91d1\u3092\u307f\u305a\u304b\u3089\u637b\u51fa\u3057\u305f\u3053\u3068\u3082\u3042\u3063\u305f\u3002\u305d\u306e\u5b58\u5728\u306f\u3001\u30d5\u30a7\u30eb\u30f3\u306b\u3068\u3063\u3066\u300c\u80b2\u3066\u306e\u89aa\u300d\u3068\u3057\u3066\u6b7b\u5f8c\u3082\u5927\u5207\u306a\u3082\u306e\u3068\u306a\u3063\u3066\u3044\u308b\u3002\u30b6\u30a4\u30f3\u304b\u3089\u3082\u3001\u30cf\u30a4\u30bf\u30fc\u306f\u81ea\u5206\u3068\u9055\u3063\u3066\u512a\u3057\u304f\u983c\u308a\u304c\u3044\u306e\u3042\u308b\u7406\u60f3\u7684\u306a\u5927\u4eba\u3060\u3063\u305f\u3068\u8a55\u3055\u308c\u308b\u3002\\n\u30a2\u30a4\u30bc\u30f3 (Eisen)\\n\u58f0 - \u4e0a\u7530\u71ff\u53f8&#091;15]\\n\u30c9\u30ef\u30fc\u30d5\u65cf\u51fa\u8eab\u306e\u6226\u58eb\u3002\u30a8\u30eb\u30d5\u307b\u3069\u3067\u306f\u306a\u3044\u304c\u4eba\u9593\u3088\u308a\u306f\u306f\u308b\u304b\u306b\u9577\u547d\u3067\u3001\u30d2\u30f3\u30e1\u30eb\u3084\u30cf\u30a4\u30bf\u30fc\u306e\u6b7b\u5f8c\u3082\u5bb9\u59ff\u306e\u5909\u5316\u304c\u3042\u307e\u308a\u898b\u3089\u308c\u306a\u3044\u3002\u975e\u5e38\u306b\u9811\u5f37\u306a\u8089\u4f53\u3092\u3082\u3061\u3001\u904e\u53bb\u306b\u7adc\u3092\u660f\u5012\u3055\u305b\u308b\u307b\u3069\u306e\u731b\u6bd2\u306e\u77e2\u3092\u53d7\u3051\u3066\u3082\u5e73\u6c17\u3067\u3044\u305f\u308a\u3001\u81ea\u7531\u843d\u4e0b\u7a0b\u5ea6\u306a\u3089\u3069\u3093\u306a\u9ad8\u3055\u304b\u3089\u843d\u3061\u3066\u3082\u7121\u50b7\u306a\u59ff\u3092\u898b\u305b\u305f\u969b\u306f\u30cf\u30a4\u30bf\u30fc\u3092\u9a5a\u304b\u305b\u305f\u3002\u9b54\u65cf\u304b\u3089\u3082\u300c\u4eba\u985e\u6700\u5f37\u306e\u6226\u58eb\u300d\u3068\u3057\u3066\u540d\u3092\u77e5\u3089\u308c\u308b\u307b\u3069\u3060\u304c\u3001\u672c\u4eba\u306f\u300c\u4ffa\u3088\u308a\u5f37\u3044\u3084\u3064\u304c\u7686\u5148\u306b\u6b7b\u3093\u3060\u3060\u3051\u300d\u3068\u81ea\u3089\u3092\u8a55\u3059\u308b\u3002\u30d5\u30ea\u30fc\u30ec\u30f3\u3068\u306e\u518d\u4f1a\u6642\u3082\u8d85\u4eba\u3076\u308a\u3092\u767a\u63ee\u3059\u308b\u4e00\u65b9\u3067\u3001\u8089\u4f53\u306f\u7740\u5b9f\u306b\u7d30\u304f\u8001\u5316\u3057\u3064\u3064\u3042\u308a\u3001\u30d2\u30f3\u30e1\u30eb\u306e\u6b7b\u5f8c\u306b\u30d5\u30ea\u30fc\u30ec\u30f3\u304b\u3089\u518d\u5ea6\u540c\u884c\u3092\u8acb\u308f\u308c\u305f\u969b\u306f\u300c\u3082\u3046\u65a7\u3092\u632f\u308c\u308b\u6b73\u3058\u3083\u306a\u3044\u300d\u3068\u62d2\u5426\u3059\u308b\u3002')]<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">\u57cb\u3081\u8fbc\u307f\u30e2\u30c7\u30eb\u306e\u8a2d\u5b9a<\/div><div class=\"swell-block-step__body\">\n<p>\u30c6\u30ad\u30b9\u30c8\u3092\u30d9\u30af\u30c8\u30eb\u8868\u73fe\u306b\u5909\u63db\u3059\u308b\u57cb\u3081\u8fbc\u307f\u30e2\u30c7\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p><span class=\"swl-format-2\">\u65e5\u672c\u8a9e\u6027\u80fd\u304c\u9ad8\u304f\u3001\u7121\u6599\u3067\u4f7f\u3048\u308b\u57cb\u3081\u8fbc\u307f\u30e2\u30c7\u30eb\u300cintfloat\/multilingual-e5-large\u300d<\/span>\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>from langchain_huggingface import HuggingFaceEmbeddings\n\nembedding = HuggingFaceEmbeddings(model_name=\"intfloat\/multilingual-e5-large\")<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">\u30ea\u30c8\u30ea\u30fc\u30d0\u30fc\u8a2d\u5b9a<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">\u30ea\u30c8\u30ea\u30fc\u30d0\u30fc\u3068\u306f\u3001\u30af\u30a8\u30ea\u3092\u3082\u3068\u306b\u30d9\u30af\u30c8\u30eb\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u95a2\u9023\u60c5\u5831\u3092\u691c\u7d22\u30fb\u53d6\u5f97\u3059\u308b\u6a5f\u80fd\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u30ea\u30c8\u30ea\u30fc\u30d0\u30fc\u306e\u5b9f\u88c5\u306b\u306f\u3001GPU\u3092\u6d3b\u7528\u3057\u305f\u9ad8\u901f\u30d9\u30af\u30c8\u30eb\u691c\u7d22\u304c\u53ef\u80fd\u306a\u300cFAISS\u300d\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>from langchain.vectorstores import FAISS\n\nvectorstore = FAISS.from_documents(doc_splits, embedding)\nretriever = vectorstore.as_retriever(search_type=\"similarity\", search_kwargs={\"k\": 3})\nquestion = \"\u30d5\u30ea\u30fc\u30ec\u30f3\u3068\u306f\"\nretriever.invoke(question)<\/code><\/pre>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30fc\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>FAISS.from_documents(splits, embedding)<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30d9\u30af\u30c8\u30eb\u30b9\u30c8\u30a2\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u30d9\u30af\u30c8\u30eb\u30b9\u30c8\u30a2\u306f\u3001\u30c6\u30ad\u30b9\u30c8\u30c7\u30fc\u30bf\u306a\u3069\u30d9\u30af\u30c8\u30eb\u5316\u3057\u3066\u683c\u7d0d\u3057\u3001\u610f\u5473\u7684\u691c\u7d22\u3084\u985e\u4f3c\u691c\u7d22\u3092\u884c\u3046\u305f\u3081\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3067\u3059\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>retriever = vectorstore.as_retriever(search_type=\"similarity\", search_kwargs={\"k\": 3})<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30ea\u30c8\u30ea\u30fc\u30d0\u30fc\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u30ea\u30c8\u30ea\u30fc\u30d0\u30fc\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u8cea\u554f\u306b\u95a2\u9023\u3059\u308b\u60c5\u5831\u3092\u30d9\u30af\u30c8\u30eb\u30b9\u30c8\u30a2\u304b\u3089\u691c\u7d22\u3057\u3066\u62bd\u51fa\u3059\u308b\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p><code>search_type=\"similarity\"<\/code>\uff1a\u691c\u7d22\u306e\u65b9\u6cd5\u3068\u3057\u3066\u300c\u985e\u4f3c\u5ea6\u691c\u7d22\u300d\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>search_kwargs={\"k\": 3}<\/code>\uff1a\u691c\u7d22\u7d50\u679c\u3068\u3057\u3066\u4e0a\u4f4d3\u4ef6\u306e\u985e\u4f3c\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8fd4\u3059\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>retriever.invoke(question)<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u691c\u7d22\u30af\u30a8\u30ea\u3092\u30ea\u30c8\u30ea\u30fc\u30d0\u30fc\u306b\u6e21\u3057\u3001\u985e\u4f3c\u3057\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u691c\u7d22\u3057\u307e\u3059\u3002<\/span><\/p>\n<\/div><\/div>\n\n\n\n<p class=\"is-style-balloon_box\">\u300c\u30d5\u30ea\u30fc\u30ec\u30f3\u3068\u306f\u300d\u3068\u3044\u3046\u30af\u30a8\u30ea\u306b\u5bfe\u3057\u3066\u3001\u30ea\u30c8\u30ea\u30fc\u30d0\u30fc\u304c\u8fd4\u3057\u305f\u7d50\u679c<\/p>\n\n\n\n<pre class=\"wp-block-code has-swl-gray-background-color has-background\"><code>&#091;Document(id='bd6a0798-bda1-4776-9d0b-150005fb4c6d', metadata={'source': 'https:\/\/ja.wikipedia.org\/wiki\/%E8%91%AC%E9%80%81%E3%81%AE%E3%83%95%E3%83%AA%E3%83%BC%E3%83%AC%E3%83%B3', 'title': '\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3 - Wikipedia', 'language': 'ja'}, page_content='\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3 - Wikipedia\\n\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u30b9\u30ad\u30c3\u30d7\\n\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc\\n\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc\\n\u30b5\u30a4\u30c9\u30d0\u30fc\u306b\u79fb\u52d5\\n\u975e\u8868\u793a\\n\\t\\t\u6848\u5185\\n\\t\\n\u30e1\u30a4\u30f3\u30da\u30fc\u30b8\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30fb\u30dd\u30fc\u30bf\u30eb\u6700\u8fd1\u306e\u51fa\u6765\u4e8b\u65b0\u3057\u3044\u30da\u30fc\u30b8\u6700\u8fd1\u306e\u66f4\u65b0\u304a\u307e\u304b\u305b\u8868\u793a\u7df4\u7fd2\u7528\u30da\u30fc\u30b8\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9 (\u30a6\u30a3\u30ad\u30e1\u30c7\u30a3\u30a2\u30fb\u30b3\u30e2\u30f3\u30ba)\u7279\u5225\u30da\u30fc\u30b8\\n\\t\\t\u30d8\u30eb\u30d7\\n\\t\\n\u30d8\u30eb\u30d7\u4e95\u6238\u7aef\u304a\u77e5\u3089\u305b\u30d0\u30b0\u306e\u5831\u544a\u30a6\u30a3\u30ad\u30da\u30c7\u30a3\u30a2\u306b\u95a2\u3059\u308b\u304a\u554f\u3044\u5408\u308f\u305b\\n\u691c\u7d22\\n\u691c\u7d22\\n\u8868\u793a\\n\u5bc4\u4ed8\\n\u30a2\u30ab\u30a6\u30f3\u30c8\u4f5c\u6210\\n\u30ed\u30b0\u30a4\u30f3\\n\u500b\u4eba\u7528\u30c4\u30fc\u30eb\\n\u5bc4\u4ed8 \u30a2\u30ab\u30a6\u30f3\u30c8\u4f5c\u6210 \u30ed\u30b0\u30a4\u30f3\\n\\t\\t\u30ed\u30b0\u30a2\u30a6\u30c8\u3057\u305f\u7de8\u96c6\u8005\u306e\u30da\u30fc\u30b8 \u3082\u3063\u3068\u8a73\u3057\u304f\\n\u6295\u7a3f\u8a18\u9332\u30c8\u30fc\u30af\\n\u76ee\u6b21\\n\u30b5\u30a4\u30c9\u30d0\u30fc\u306b\u79fb\u52d5\\n\u975e\u8868\u793a\\n\u30da\u30fc\u30b8\u5148\u982d\\n1\\n\u6982\u8981\\n2\\n\u3042\u3089\u3059\u3058\\n3\\n\u767b\u5834\u4eba\u7269\\n\u767b\u5834\u4eba\u7269\u30b5\u30d6\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\\n3.1\\n\u4e3b\u8981\u4eba\u7269\uff08\u30d5\u30ea\u30fc\u30ec\u30f3\u4e00\u884c\uff09\\n3.2\\n\u52c7\u8005\u30d1\u30fc\u30c6\u30a3\u30fc\uff08\u30d2\u30f3\u30e1\u30eb\u4e00\u884c\uff09\\n3.3\\n\u5317\u5074\u8af8\u56fd\\n3.4\\n\u4e00\u7d1a\u8a66\u9a13\u53d7\u9a13\u8005\\n3.5\\n\u5927\u9678\u9b54\u6cd5\u5354\u4f1a\\n3.6\\n\u5e1d\u56fd\u9818\\n3.7\\n\u9b54\u65cf\\n3.8\\n\u305d\u306e\u4ed6\\n4\\n\u9b54\u6cd5\\n\u9b54\u6cd5\u30b5\u30d6\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\\n4.1\\n\u6c11\u9593\u9b54\u6cd5\\n4.2\\n\u9b54\u65cf\u306e\u9b54\u6cd5\\n4.3\\n\u5973\u795e\u69d8\u306e\u9b54\u6cd5\\n5\\n\u9b54\u7269\\n6\\n\u7528\u8a9e\\n\u7528\u8a9e\u30b5\u30d6\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\\n6.1\\n\u4e16\u754c\u89b3\\n6.2\\n\u56fd\u5bb6\u30fb\u7d44\u7e54\\n6.3\\n\u5730\u540d\u30fb\u65bd\u8a2d\\n6.4\\n\u7a2e\u65cf\u30fb\u751f\u7269\\n6.5\\n\u9b54\u65cf\u95a2\u9023\\n6.6\\n\u305d\u306e\u4ed6\u306e\u7528\u8a9e\\n7\\n\u793e\u4f1a\u7684\u8a55\u4fa1\u30fb\u53d7\u8cde\\n8\\n\u66f8\u8a8c\u60c5\u5831\\n\u66f8\u8a8c\u60c5\u5831\u30b5\u30d6\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\\n8.1\\n\u5358\u884c\u672c\\n8.2\\n\u95a2\u9023\u66f8\u7c4d\\n9\\n\u30c6\u30ec\u30d3\u30a2\u30cb\u30e1\\n\u30c6\u30ec\u30d3\u30a2\u30cb\u30e1\u30b5\u30d6\u30bb\u30af\u30b7\u30e7\u30f3\u3092\u5207\u308a\u66ff\u3048\u307e\u3059\\n9.1\\n\u5236\u4f5c\\n9.1.1\\n\u4f01\u753b\u30fb\u30b9\u30bf\u30c3\u30d5\u30a3\u30f3\u30b0\\n9.1.2\\n\u6f14\u51fa\\n9.1.3\\n\u97f3\u697d\\n9.1.4\\n\u30ad\u30e3\u30b9\u30c6\u30a3\u30f3\u30b0\\n9.1.5\\n\u30d7\u30ed\u30e2\u30fc\u30b7\u30e7\u30f3\\n9.2\\n\u30b9\u30bf\u30c3\u30d5\uff08\u30c6\u30ec\u30d3\u30a2\u30cb\u30e1\uff09\\n9.3\\n\u4e3b\u984c\u6b4c\\n9.4'),\n Document(id='9b93cec0-a77e-48ae-9559-e31aa7c02963', metadata={'source': 'https:\/\/ja.wikipedia.org\/wiki\/%E8%91%AC%E9%80%81%E3%81%AE%E3%83%95%E3%83%AA%E3%83%BC%E3%83%AC%E3%83%B3', 'title': '\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3 - Wikipedia', 'language': 'ja'}, page_content='2020\u5e7422\u30fb23\u5408\u4f75\u53f7 -\\n\u767a\u8868\u671f\u9593\\n2020\u5e744\u670828\u65e5&#091;1] -\\n\u5dfb\u6570\\n\u65e2\u520a13\u5dfb\uff082024\u5e744\u6708\u73fe\u5728\uff09\\n\u30a2\u30cb\u30e1\\n\u539f\u4f5c\\n\u5c71\u7530\u9418\u4eba\u3001\u30a2\u30d9\u30c4\u30ab\u30b5\\n\u76e3\u7763\\n\u658e\u85e4\u572d\u4e00\u90ce\\n\u30b7\u30ea\u30fc\u30ba\u69cb\u6210\\n\u9234\u6728\u667a\u5c0b\\n\u811a\u672c\\n\u9234\u6728\u667a\u5c0b\\n\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u30c7\u30b6\u30a4\u30f3\\n\u9577\u6fa4\u793c\u5b50\\n\u97f3\u697d\\nEvan Call\\n\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u5236\u4f5c\\n\u30de\u30c3\u30c9\u30cf\u30a6\u30b9\\n\u88fd\u4f5c\\n\u300c\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u300d\u88fd\u4f5c\u59d4\u54e1\u4f1a\\n\u653e\u9001\u5c40\\n\u65e5\u672c\u30c6\u30ec\u30d3\u7cfb\u5217\u307b\u304b\\n\u653e\u9001\u671f\u9593\\n\u7b2c1\u671f\uff1a2023\u5e749\u670829\u65e5 - 2024\u5e743\u670822\u65e5\\n\u8a71\u6570\\n\u7b2c1\u671f\uff1a\u516828\u8a71\\n\u305d\u306e\u4ed6\\n\u7b2c1\u8a71 - \u7b2c4\u8a71\u306f\u300e\u91d1\u66dc\u30ed\u30fc\u30c9\u30b7\u30e7\u30fc\u300f\u3067\u653e\u9001\\n\u30a2\u30cb\u30e1\uff1a\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3 \u301c\u25cf\u25cf\u306e\u9b54\u6cd5\u301c\\n\u539f\u4f5c\\n\u5c71\u7530\u9418\u4eba\u3001\u30a2\u30d9\u30c4\u30ab\u30b5\\n\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u30c7\u30b6\u30a4\u30f3\\n\u3081\u3070\u3061\\n\u97f3\u697d\\nEvan Call\\n\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u5236\u4f5c\\nTOHO animation STUDIO\\n\u88fd\u4f5c\\n\u300c\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u300d\u88fd\u4f5c\u59d4\u54e1\u4f1a\\n\u914d\u4fe1\u30b5\u30a4\u30c8\\nYouTube\u307b\u304b\\n\u914d\u4fe1\u671f\u9593\\n2023\u5e7410\u670811\u65e5 -\\n\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 - \u30ce\u30fc\u30c8\\n\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\\n\u6f2b\u753b\u30fb\u30a2\u30cb\u30e1\\n\u30dd\u30fc\u30bf\u30eb\\n\u6f2b\u753b\u30fb\u30a2\u30cb\u30e1\\n\u300e\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u300f\uff08\u305d\u3046\u305d\u3046\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\uff09\u306f\u3001\u5c71\u7530\u9418\u4eba\uff08\u539f\u4f5c\uff09\u3001\u30a2\u30d9\u30c4\u30ab\u30b5\uff08\u4f5c\u753b\uff09\u306b\u3088\u308b\u65e5\u672c\u306e\u6f2b\u753b\u3002\u300e\u9031\u520a\u5c11\u5e74\u30b5\u30f3\u30c7\u30fc\u300f\uff08\u5c0f\u5b66\u9928\uff09\u306b\u3066\u30012020\u5e7422\u30fb23\u5408\u4f75\u53f7\u3088\u308a\u9023\u8f09\u4e2d&#091;1]\u3002\\n2021\u5e74\u306b\u7b2c14\u56de\u30de\u30f3\u30ac\u5927\u8cde\u304a\u3088\u3073\u7b2c25\u56de\u624b\u585a\u6cbb\u866b\u6587\u5316\u8cde\u65b0\u751f\u8cde\u3092\u30012023\u5e74\u306b\u7b2c69\u56de\u5c0f\u5b66\u9928\u6f2b\u753b\u8cde\u30012024\u5e74\u306b\u7b2c48\u56de\u8b1b\u8ac7\u793e\u6f2b\u753b\u8cde\u53d7\u8cde\u3002\\n\u6982\u8981\\n\u9b54\u738b\u3092\u5012\u3057\u305f\u52c7\u8005\u4e00\u884c\u306e\u5f8c\u65e5\u8b5a\u3092\u63cf\u304f\u30d5\u30a1\u30f3\u30bf\u30b8\u30fc&#091;1]\u3002'),\n Document(id='11e138ba-5b49-4834-b113-468ac8ff6564', metadata={'source': 'https:\/\/ja.wikipedia.org\/wiki\/%E8%91%AC%E9%80%81%E3%81%AE%E3%83%95%E3%83%AA%E3%83%BC%E3%83%AC%E3%83%B3', 'title': '\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3 - Wikipedia', 'language': 'ja'}, page_content='\u6982\u8981\\n\u9b54\u738b\u3092\u5012\u3057\u305f\u52c7\u8005\u4e00\u884c\u306e\u5f8c\u65e5\u8b5a\u3092\u63cf\u304f\u30d5\u30a1\u30f3\u30bf\u30b8\u30fc&#091;1]\u3002\\n\u539f\u4f5c\u62c5\u5f53\u306e\u5c71\u7530\u306e\u524d\u4f5c\u3067\u3042\u308b\u300e\u307c\u3063\u3061\u535a\u58eb\u3068\u30ed\u30dc\u30c3\u30c8\u5c11\u5973\u306e\u7d76\u671b\u7684\u30e6\u30fc\u30c8\u30d4\u30a2\u300f\u306e\u9023\u8f09\u7d42\u4e86\u5f8c\u3001\u3044\u304f\u3064\u304b\u306e\u8aad\u5207\u306e\u30cd\u30fc\u30e0\u3092\u63cf\u304f\u3082\u3046\u307e\u304f\u3044\u304b\u305a\u3001\u62c5\u5f53\u7de8\u96c6\u8005\u304b\u3089\u3001\u6700\u521d\u306e\u53d7\u8cde\u4f5c\u304c\u52c7\u8005\u30fb\u9b54\u738b\u7269\u306e\u30b3\u30e1\u30c7\u30a3\u30fc\u3060\u3063\u305f\u3053\u3068\u304b\u3089\u3001\u305d\u306e\u65b9\u5411\u3067\u30ae\u30e3\u30b0\u3092\u63cf\u3044\u3066\u307f\u3066\u306f\u3068\u63d0\u6848\u3057\u305f\u3068\u3053\u308d\u3001\u3044\u304d\u306a\u308a\u300e\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u300f\u306e\u7b2c1\u8a71\u306e\u30cd\u30fc\u30e0\u304c\u4e0a\u304c\u3063\u3066\u304d\u305f&#091;2]&#091;3]\u3002\u305d\u306e\u5f8c\u3001\u4f5c\u753b\u62c5\u5f53\u3092\u3064\u3051\u308b\u3053\u3068\u306b\u306a\u308a\u3001\u540c\u3058\u304f\u62c5\u5f53\u3057\u3066\u3044\u305f\u30a2\u30d9\u306b\u30cd\u30fc\u30e0\u3092\u898b\u305b\u305f\u3068\u3053\u308d\u300c\u63cf\u3044\u3066\u307f\u305f\u3044\u300d\u3068\u53cd\u5fdc\u304c\u3042\u308a\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u30ad\u30e3\u30e9\u7d75\u3092\u63cf\u3044\u3066\u3082\u3089\u3063\u305f\u3068\u3053\u308d\u3001\u5c71\u7530\u304b\u3089\u3082\u300c\u3053\u306e\u65b9\u306a\u3089\u304a\u9858\u3044\u3057\u305f\u3044\u300d\u3068\u8fd4\u7b54\u3092\u3082\u3089\u3063\u305f\u305f\u3081\u3001\u30a2\u30d9\u304c\u4f5c\u753b\u62c5\u5f53\u306b\u306a\u3063\u305f&#091;2]&#091;3]\u3002\u3061\u306a\u307f\u306b\u30de\u30f3\u30ac\u5927\u8cde\u3092\u53d7\u8cde\u3057\u305f2021\u5e743\u6708\u73fe\u5728\u3001\u5c71\u7530\u3068\u30a2\u30d9\u306f\u4e00\u5ea6\u3082\u4f1a\u3063\u305f\u3053\u3068\u304c\u306a\u3044\u3068\u3044\u3046&#091;2]\u3002\\n\u672c\u4f5c\u306e\u30bf\u30a4\u30c8\u30eb\u306e\u7531\u6765\u306f\u3001\u5c71\u7530\u304c\u8003\u3048\u305f\u30bf\u30a4\u30c8\u30eb\u6848\u304c\u3042\u308a\u306a\u304c\u3089\u3001\u7de8\u96c6\u90e8\u3067\u3082\u691c\u8a0e\u3092\u3057\u3001\u7de8\u96c6\u90e8\u4f1a\u8b70\u3067\u300c\u3044\u3044\u30bf\u30a4\u30c8\u30eb\u304c\u6c7a\u307e\u3063\u305f\u3089\u81ea\u8179\u3067\u8cde\u91d11\u4e07\u5186\u51fa\u3057\u307e\u3059\u300d\u3068\u62c5\u5f53\u7de8\u96c6\u8005\u304c\u52df\u3063\u305f\u3068\u3053\u308d\u3001\u526f\u7de8\u96c6\u9577\u304c\u51fa\u3057\u305f\u30bf\u30a4\u30c8\u30eb\u6848\u306e\u4e2d\u306b\u300c\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u300d\u304c\u3042\u308a\u3001\u6700\u7d42\u7684\u306b\u5c71\u7530\u3001\u30a2\u30d9\u306b\u6c7a\u3081\u3066\u3082\u3089\u3044\u73fe\u5728\u306e\u984c\u540d\u3068\u306a\u3063\u305f&#091;4]\u3002\\n2022\u5e74\u306b\u30c6\u30ec\u30d3\u30a2\u30cb\u30e1\u5316\u304c\u767a\u8868\u3055\u308c\u305f&#091;5]&#091;6]\u3002\u7b2c1\u671f\u306f2023\u5e749\u6708\u304b\u30892024\u5e743\u6708\u307e\u3067\u3001\u65e5\u672c\u30c6\u30ec\u30d3\u7cfb\u5217\u307b\u304b\u306b\u3066\u9023\u7d9a2\u30af\u30fc\u30eb\u3067\u653e\u9001\u3055\u308c\u305f&#091;7]\u3002\u7b2c2\u671f\u306e\u5236\u4f5c\u304c\u6c7a\u5b9a\u3057\u3066\u3044\u308b&#091;8]\u3002\\n\u3042\u3089\u3059\u3058')]<\/code><\/pre>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">\u30d7\u30ed\u30f3\u30d7\u30c8\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u8a2d\u5b9a<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u4f7f\u7528\u3059\u308b\u69cb\u6587\uff08\u30d7\u30ed\u30f3\u30d7\u30c8\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\uff09\u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>from langchain_core.prompts import PromptTemplate\n\nprompt = PromptTemplate(\n    template=\"\"\"&lt;|begin_of_text|&gt;&lt;|start_header_id|&gt;system&lt;|end_header_id|&gt; \n    \u4e0e\u3048\u3089\u308c\u305f\u53c2\u8003\u60c5\u5831\u3092\u3082\u3068\u306b\u8cea\u554f\u306b\u56de\u7b54\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n    &lt;|eot_id|&gt;&lt;|start_header_id|&gt;user&lt;|end_header_id|&gt;\n    \u8cea\u554f: {question} \n    \u53c2\u8003\u60c5\u5831: {context} \n    \u56de\u7b54: &lt;|eot_id|&gt;&lt;|start_header_id|&gt;assistant&lt;|end_header_id|&gt;\"\"\",\n    input_variables=&#091;\"question\", \"context\"],\n)<\/code><\/pre>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30fc\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>PromptTemplate()<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3055\u308c\u308b\u30af\u30e9\u30b9\u3067\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5185\u3067\u3001\u6307\u5b9a\u3055\u308c\u305f\u5909\u6570\u306b\u52d5\u7684\u306b\u5024\u3092\u57cb\u3081\u8fbc\u307f\u3001LLM\u306b\u6307\u793a\u3092\u4e0e\u3048\u308b\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>template<\/code> \u306b\u306f\u3001LLM\u306b\u5bfe\u3057\u3066\u3069\u306e\u3088\u3046\u306a\u6307\u793a\u3092\u4e0e\u3048\u308b\u304b\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>&lt;|begin_of_text|&gt;&lt;|start_header_id|&gt;system&lt;|end_header_id|&gt; ...&lt;|eot_id|&gt;<\/code>\u306b\u306f\u3001\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30f3\u30d7\u30c8\u304c\u5165\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>&lt;|start_header_id|&gt;user&lt;|end_header_id|&gt;...&lt;|eot_id|&gt;<\/code>\u306b\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u8cea\u554f\u304c\u5165\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>&lt;|start_header_id|&gt;assistant&lt;|end_header_id|&gt;...<\/code>\u306b\u306f\u3001LLM\u306e\u56de\u7b54\u304c\u5165\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>input_variables<\/code> \u3067\u306f\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u5185\u3067\u52d5\u7684\u306b\u7f6e\u304d\u63db\u3048\u3089\u308c\u308b\u5909\u6570\u540d\u3092\u30ea\u30b9\u30c8\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u5834\u5408\u3001<code>question<\/code>\u3068 <code>context<\/code>\u306e2\u3064\u306e\u5909\u6570\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">RAG\u30c1\u30a7\u30fc\u30f3\u306e\u69cb\u7bc9<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u306e\u8cea\u554f\u3068\u30ea\u30c8\u30ea\u30fc\u30d0\u30fc\u304b\u3089\u306e\u53d6\u5f97\u60c5\u5831\u3092\u3082\u3068\u306b\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u3001\u30e2\u30c7\u30eb\u306b\u6e21\u3059<\/span>RAG\u30c1\u30a7\u30fc\u30f3\u3092\u69cb\u7bc9\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>from langchain_core.runnables import RunnablePassthrough\nfrom langchain_core.output_parsers import StrOutputParser\n\nrag_chain = {\"context\": retriever, \"question\": RunnablePassthrough()} | prompt | llm | StrOutputParser()<\/code><\/pre>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30fc\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>{\"context\": retriever, \"question\": RunnablePassthrough()} | prompt | llm | StrOutputParser()<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u751f\u6210\u3001LLM\u306b\u3088\u308b\u56de\u7b54\u751f\u6210\u3001\u6587\u5b57\u5217\u5f62\u5f0f\u3067\u306e\u51fa\u529b\u307e\u3067\u3092\u3001\u4e00\u9023\u306e\u51e6\u7406\u3068\u3057\u3066\u7d71\u5408\u3057\u305f\u30c1\u30a7\u30fc\u30f3\u3092\u69cb\u7bc9\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><code>\"context\": retriever<\/code>\u30e6\u30fc\u30b6\u30fc\u306e\u8cea\u554f\u304b\u3089\u95a2\u9023\u3059\u308b\u60c5\u5831\u3092\u30ea\u30c8\u30ea\u30fc\u30d0\u30fc\u3067\u691c\u7d22\u30fb\u53d6\u5f97\u3057\u3001\u305d\u306e\u60c5\u5831\u3092&#8221;context&#8221;\u3068\u3057\u3066\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u6e21\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>\"question\": RunnablePassthrough()<\/code>\u30e6\u30fc\u30b6\u30fc\u306e\u8cea\u554f\u3092\u5909\u63db\u305b\u305a\u306b\u305d\u306e\u307e\u307e&#8221;question&#8221;\u3068\u3057\u3066\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u6e21\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code> | prompt<\/code><\/p>\n\n\n\n<p>\u5b9a\u7fa9\u3057\u305f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b&#8221;context&#8221;\u3068&#8221;question&#8221;\u3092\u633f\u5165\u3057\u3066\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u4f5c\u6210\u3057\u3001LLM\u306b\u6e21\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>| llm<\/code><\/p>\n\n\n\n<p>\u6e21\u3055\u308c\u305f\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u3082\u3068\u306bLLM\u304c\u30c6\u30ad\u30b9\u30c8\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>| StrOutputParser()<\/code><\/p>\n\n\n\n<p>\u51fa\u529b\u5f62\u5f0f\u3092\u6587\u5b57\u5217\u3068\u3057\u3066\u6271\u3046\u30d1\u30fc\u30b5\u30fc\u3067\u3059\u3002<\/p>\n<\/div><\/div>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">DeepSeek-R1 RAG\u306b\u300e\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u300f\u306b\u3064\u3044\u3066\u805e\u3044\u3066\u307f\u308b<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"600\" height=\"300\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/20_midashi_sf0923.jpg\" alt=\"\u898b\u51fa\u3057\u753b\u50cf\" class=\"wp-image-11931\" srcset=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/20_midashi_sf0923.jpg 600w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/20_midashi_sf0923-300x150.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p><span class=\"swl-format-2\">DeepSeek-R1 RAG\u3092\u4f7f\u3063\u3066\u3001\u300e\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u300f\u306b\u3064\u3044\u3066\u8cea\u554f\u3057\u3066\u307f\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8cea\u554f(\uff11)<\/h3>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>response = rag_chain.invoke(\"\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u6027\u683c\u3092\u6559\u3048\u3066\u4e0b\u3055\u3044\u3002\")\nprint(response)<\/code><\/pre>\n\n\n<div class=\"swell-block-balloon\"><div class=\"c-balloon -bln-right\" data-col=\"green\"><div class=\"c-balloon__body -speaking -border-none\"><div class=\"c-balloon__text\">\n<p>\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u6027\u683c\u3092\u6559\u3048\u3066\u4e0b\u3055\u3044\u3002<\/p>\n<span class=\"c-balloon__shapes\"><span class=\"c-balloon__before\"><\/span><span class=\"c-balloon__after\"><\/span><\/span><\/div><\/div><\/div><\/div>\n\n\n<p class=\"is-style-balloon_box\">\u56de\u7b54<\/p>\n\n\n\n<pre class=\"wp-block-code has-swl-gray-background-color has-background\"><code>&lt;think>\n\u307e\u305a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u6027\u683c\u3092\u77e5\u308a\u305f\u3044\u3068\u8cea\u554f\u3057\u3066\u3044\u307e\u3059\u3002\u63d0\u4f9b\u3055\u308c\u305f\u53c2\u8003\u60c5\u5831\u306f3\u3064\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u3001\u305d\u308c\u305e\u308c\u7570\u306a\u308b\u5074\u9762\u304b\u3089\u30d5\u30ea\u30fc\u30ec\u30f3\u306b\u3064\u3044\u3066\u8aac\u660e\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n\n\u6700\u521d\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u6027\u683c\u3092\u300c\u30c9\u30e9\u30a4\u3067\u53b3\u3057\u3044\u304c\u666e\u6bb5\u306f\u512a\u3057\u304f\u9762\u5012\u898b\u304c\u3042\u308b\u300d\u3068\u8ff0\u3079\u3066\u3044\u307e\u3059\u3002\u8868\u60c5\u306b\u4e4f\u3057\u304f\u6de1\u3005\u3068\u3057\u3066\u3044\u308b\u304c\u3001\u5927\u597d\u304d\u306a\u9b54\u5c0e\u66f8\u3084\u98df\u3044\u610f\u5730\u3001\u671d\u306e\u5f31\u3055\u306a\u3069\u3001\u611f\u60c5\u8868\u73fe\u304c\u8c4a\u304b\u306b\u306a\u308b\u5834\u9762\u304c\u3042\u308b\u3068\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u30a8\u30eb\u30d5\u3067\u3042\u308b\u305f\u3081\u4eba\u9593\u306e\u601d\u8003\u306b\u920d\u611f\u3067\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u4e0d\u5668\u7528\u306a\u70b9\u3082\u6307\u6458\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3055\u3089\u306b\u3001\u9b54\u65cf\u3078\u306e\u618e\u60aa\u304c\u6df1\u304f\u3001\u6575\u5bfe\u3059\u308b\u9b54\u65cf\u306b\u5bfe\u3057\u3066\u306f\u554f\u7b54\u7121\u7528\u3067\u846c\u308a\u53bb\u308d\u3046\u3068\u3059\u308b\u59ff\u52e2\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002\n\n\u6b21\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u30c0\u30f3\u30b8\u30e7\u30f3\u653b\u7565\u306b\u95a2\u3059\u308b\u77e5\u8b58\u3084\u5b9d\u7bb1\u306b\u5bfe\u3059\u308b\u7570\u5e38\u306a\u8208\u5473\u306b\u3064\u3044\u3066\u89e6\u308c\u3066\u3044\u307e\u3059\u3002\u5224\u5225\u9b54\u6cd5\u3067\u30df\u30df\u30c3\u30af\u3068\u5224\u65ad\u3057\u3066\u3082\u5b9d\u7bb1\u3092\u958b\u3051\u3001\u7d50\u679c\u3068\u3057\u3066\u4e0a\u534a\u8eab\u3092\u565b\u307e\u308c\u308b\u5834\u9762\u304c\u7e70\u308a\u8fd4\u3055\u308c\u308b\u3068\u3044\u3046\u30a8\u30d4\u30bd\u30fc\u30c9\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306f\u5f7c\u5973\u306e\u5192\u967a\u5fc3\u3084\u30ea\u30b9\u30af\u3092\u6050\u308c\u306a\u3044\u6027\u683c\u3092\u793a\u3057\u3066\u3044\u308b\u3068\u8003\u3048\u3089\u308c\u307e\u3059\u3002\n\n3\u3064\u76ee\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u30d5\u30a7\u30eb\u30f3\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u3067\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u5f1f\u5b50\u3067\u3042\u308b\u30d5\u30a7\u30eb\u30f3\u306e\u6027\u683c\u3084\u884c\u52d5\u304c\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306f\u76f4\u63a5\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u6027\u683c\u306b\u95a2\u3059\u308b\u60c5\u5831\u3067\u306f\u306a\u3044\u305f\u3081\u3001\u56de\u7b54\u306b\u306f\u542b\u3081\u306a\u3044\u65b9\u304c\u826f\u3044\u3067\u3057\u3087\u3046\u3002\n\n\u3053\u308c\u3089\u306e\u60c5\u5831\u3092\u6574\u7406\u3059\u308b\u3068\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u6027\u683c\u306f\u4ee5\u4e0b\u306e\u7279\u5fb4\u306b\u307e\u3068\u3081\u3089\u308c\u307e\u3059\uff1a\n1. \u30c9\u30e9\u30a4\u3067\u53b3\u3057\u3044\u304c\u512a\u3057\u304f\u9762\u5012\u898b\u304c\u3042\u308b\u3002\n2. \u8868\u60c5\u306b\u4e4f\u3057\u304f\u6de1\u3005\u3068\u3057\u305f\u614b\u5ea6\u3060\u304c\u3001\u7279\u5b9a\u306e\u3053\u3068\u306b\u611f\u60c5\u3092\u8868\u3059\u3002\n3. \u4eba\u9593\u306e\u601d\u8003\u306b\u920d\u611f\u3067\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u4e0d\u5668\u7528\u3002\n4. \u9b54\u65cf\u3078\u306e\u618e\u60aa\u304c\u5f37\u304f\u3001\u6575\u5bfe\u3059\u308b\u9b54\u65cf\u306b\u5bfe\u3057\u3066\u306f\u5bb9\u8d66\u306a\u3044\u3002\n5. \u30c0\u30f3\u30b8\u30e7\u30f3\u653b\u7565\u306b\u8a73\u3057\u3044\u304c\u3001\u5b9d\u7bb1\u306b\u5bfe\u3059\u308b\u7570\u5e38\u306a\u8208\u5473\u3068\u30ea\u30b9\u30af\u3092\u6050\u308c\u306a\u3044\u6027\u683c\u3002\n\n\u3053\u308c\u3089\u306e\u30dd\u30a4\u30f3\u30c8\u3092\u904e\u4e0d\u8db3\u306a\u304f\u56de\u7b54\u306b\u53cd\u6620\u3055\u305b\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u60c5\u5831\u306e\u91cd\u8907\u3084\u77db\u76fe\u304c\u306a\u3044\u304b\u78ba\u8a8d\u3057\u3001\u9069\u5207\u306b\u307e\u3068\u3081\u308b\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\n&lt;\/think>\n\n\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u6027\u683c\u306f\u4ee5\u4e0b\u306e\u7279\u5fb4\u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u307e\u3059\uff1a\n\n1. **\u611f\u60c5\u8868\u73fe\u306e\u4e8c\u9762\u6027**  \n   - \u666e\u6bb5\u306f\u8868\u60c5\u306b\u4e4f\u3057\u304f\u6de1\u3005\u3068\u3057\u305f\u614b\u5ea6\u3060\u304c\u3001\u5927\u597d\u304d\u306a\u9b54\u5c0e\u66f8\u3084\u98df\u3044\u610f\u5730\u3001\u671d\u306e\u5f31\u3055\u306a\u3069\u7279\u5b9a\u306e\u5834\u9762\u3067\u306f\u611f\u60c5\u3092\u8c4a\u304b\u306b\u8868\u3059\u3002\n   - \u4eba\u9593\u306e\u601d\u8003\u30fb\u601d\u60f3\u306b\u306f\u920d\u611f\u3067\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u4e0d\u5668\u7528\u306a\u4e00\u65b9\u3001\u9b54\u65cf\u3078\u306e\u618e\u60aa\u306f\u6df1\u304f\u3001\u6575\u5bfe\u3059\u308b\u9b54\u65cf\u306b\u5bfe\u3057\u3066\u306f\u300c\u554f\u7b54\u7121\u7528\u3067\u846c\u308b\u300d\u3068\u3044\u3046\u5f37\u3044\u610f\u601d\u3092\u6301\u3064\u3002\n\n2. **\u4fa1\u5024\u89b3\u3068\u884c\u52d5\u539f\u7406**  \n   - \u5bcc\u3084\u5730\u4f4d\u3001\u540d\u58f0\u306b\u306f\u8208\u5473\u3092\u793a\u3055\u306a\u3044\u304c\u3001\u76ee\u7684\uff08\u4f8b\uff1a\u9b54\u5c0e\u66f8\u306e\u624b\u306b\u5165\u308c\uff09\u304c\u3042\u308c\u3070\u7121\u8336\u3092\u3059\u308b\u3053\u3068\u3082\u3002\n   - \u30a8\u30eb\u30d5\u3068\u3057\u3066\u9577\u547d\u3086\u3048\u306b\u300c\u4eba\u9593\u306e\u8a00\u8449\u3067\u4eba\u9593\u3092\u6b3a\u304f\u731b\u7363\u300d\u3068\u3044\u3046\u9b54\u65cf\u306e\u672c\u8cea\u3092\u7406\u89e3\u3057\u3001\u5f7c\u3089\u3078\u306e\u5bfe\u5fdc\u306f\u51b7\u5fb9\u3002\n\n3. **\u5192\u967a\u5fc3\u3068\u30ea\u30b9\u30af\u30c6\u30a4\u30af**  \n   - \u300c\u6b74\u53f2\u4e0a\u3067\u6700\u3082\u30c0\u30f3\u30b8\u30e7\u30f3\u3092\u653b\u7565\u3057\u305f\u30d1\u30fc\u30c6\u30a3\u30fc\u306e\u9b54\u6cd5\u4f7f\u3044\u300d\u3068\u81ea\u79f0\u3059\u308b\u307b\u3069\u30c0\u30f3\u30b8\u30e7\u30f3\u77e5\u8b58\u304c\u8c4a\u5bcc\u3002\n   - \u5b9d\u7bb1\u3092\u958b\u3051\u308b\u969b\u306b\u306f\u5224\u5225\u9b54\u6cd5\u306799%\u30df\u30df\u30c3\u30af\u3068\u5224\u65ad\u3057\u3066\u30821%\u306e\u53ef\u80fd\u6027\u306b\u8ced\u3051\u3001\u7d50\u679c\u3068\u3057\u3066\u4e0a\u534a\u8eab\u3092\u565b\u307e\u308c\u308b\u5834\u9762\u3082\u7e70\u308a\u8fd4\u3055\u308c\u308b\u3002\n\n4. **\u5468\u56f2\u3078\u306e\u5f71\u97ff**  \n   - \u30d5\u30a7\u30eb\u30f3\uff08\u5f1f\u5b50\uff09\u304b\u3089\u306f\u300c\u6642\u9593\u611f\u899a\u304c\u4eba\u9593\u3068\u304b\u3051\u96e2\u308c\u3066\u3044\u308b\u300d\u3068\u8f9f\u6613\u3055\u308c\u3064\u3064\u3082\u5c0a\u656c\u3055\u308c\u3066\u3044\u308b\u3002\n   - \u7518\u3044\u98df\u3079\u7269\u3084\u98f2\u9152\u306b\u5bdb\u5bb9\u306a\u59ff\u52e2\u3092\u793a\u3059\u306a\u3069\u3001\u975e\u5192\u967a\u7684\u306a\u5074\u9762\u3067\u3082\u5b58\u5728\u611f\u3092\u653e\u3064\u3002\n\n\u3053\u308c\u3089\u306e\u8981\u7d20\u304b\u3089\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u306f\u300c\u51b7\u5fb9\u3055\u3068\u512a\u3057\u3055\u304c\u5171\u5b58\u3057\u3001\u30ea\u30b9\u30af\u3092\u6050\u308c\u305a\u76ee\u7684\u306b\u7a81\u304d\u9032\u3080\u77db\u76fe\u3057\u305f\u6027\u683c\u300d\u3067\u3042\u308b\u3068\u8a00\u3048\u307e\u3059\u3002<\/code><\/pre>\n\n\n\n<p class=\"is-style-icon_good\">Wkipedia\u306e\u30c7\u30fc\u30bf\u304b\u3089\u5fc5\u8981\u306a\u60c5\u5831\u3092\u62bd\u51fa\u3057\u306a\u304c\u3089\u3001\u3057\u3063\u304b\u308a\u601d\u8003\u3067\u304d\u3066\u3044\u307e\u3059\uff01<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8cea\u554f(\uff12)<\/h3>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>response = rag_chain.invoke(\"\u30d2\u30f3\u30e1\u30eb\u306e\u6027\u683c\u3092\u6559\u3048\u3066\u4e0b\u3055\u3044\u3002\")\nprint(response)<\/code><\/pre>\n\n\n<div class=\"swell-block-balloon\"><div class=\"c-balloon -bln-right\" data-col=\"green\"><div class=\"c-balloon__body -speaking -border-none\"><div class=\"c-balloon__text\">\n<p>\u30d2\u30f3\u30e1\u30eb\u306e\u6027\u683c\u3092\u6559\u3048\u3066\u4e0b\u3055\u3044\u3002 <\/p>\n<span class=\"c-balloon__shapes\"><span class=\"c-balloon__before\"><\/span><span class=\"c-balloon__after\"><\/span><\/span><\/div><\/div><\/div><\/div>\n\n\n<p class=\"is-style-balloon_box\">\u56de\u7b54<\/p>\n\n\n\n<pre class=\"wp-block-code has-swl-gray-background-color has-background\"><code>&lt;think>\n\u307e\u305a\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u30d2\u30f3\u30e1\u30eb\u306e\u6027\u683c\u3092\u5c0b\u306d\u3066\u3044\u308b\u306e\u3067\u3001\u63d0\u4f9b\u3055\u308c\u305f\u53c2\u8003\u60c5\u5831\u304b\u3089\u95a2\u9023\u3059\u308b\u90e8\u5206\u3092\u63a2\u3057\u307e\u3059\u3002\u5404\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u898b\u308b\u3068\u3001\u30d2\u30f3\u30e1\u30eb\u306b\u95a2\u3059\u308b\u8a18\u8ff0\u306f\u4e3b\u306b\u6700\u521d\u306e2\u3064\u306e\u6587\u66f8\u306b\u3042\u308a\u307e\u3059\u3002\n\n\u6700\u521d\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u56de\u60f3\u306e\u4e2d\u3067\u30d2\u30f3\u30e1\u30eb\u304c\u300c\u56f0\u3063\u305f\u4eba\u3092\u6c7a\u3057\u3066\u898b\u6368\u3066\u306a\u3044\u6027\u683c\u3067\u3001\u305d\u306e\u751f\u6daf\u3092\u304b\u3051\u3066\u4eba\u52a9\u3051\u306b\u5954\u8d70\u3057\u305f\u300d\u3068\u8ff0\u3079\u3089\u308c\u3066\u3044\u307e\u3059\u3002\u307e\u305f\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u3078\u306e\u604b\u5fc3\u3084\u5e7c\u5c11\u671f\u306e\u51fa\u4f1a\u3044\u3001\u30a8\u30eb\u30d5\u3067\u3042\u308b\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u672a\u6765\u3092\u6c17\u306b\u304b\u3051\u308b\u30a8\u30d4\u30bd\u30fc\u30c9\u304c\u6319\u3052\u3089\u308c\u3066\u3044\u307e\u3059\u3002\n\n\u6b21\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u3001\u30cf\u30a4\u30bf\u30fc\uff08\u30d2\u30f3\u30e1\u30eb\uff09\u306b\u3064\u3044\u3066\u300c\u7a4f\u3084\u304b\u3067\u660e\u308b\u3044\u6027\u683c\u3060\u304c\u3001\u304a\u9152\u304c\u5927\u597d\u304d\u300d\u3068\u3042\u308a\u3001\u4eba\u9593\u3068\u3057\u3066\u306f\u9577\u5bff\u3060\u3063\u305f\u3068\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u3053\u3053\u3067\u306e\u540d\u524d\u304c\u30cf\u30a4\u30bf\u30fc\u3068\u306a\u3063\u3066\u3044\u308b\u70b9\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002\u3082\u3057\u304b\u3059\u308b\u3068\u3001\u30d2\u30f3\u30e1\u30eb\u3068\u30cf\u30a4\u30bf\u30fc\u306f\u540c\u3058\u4eba\u7269\u306a\u306e\u304b\u3001\u3042\u308b\u3044\u306f\u5225\u306e\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3001\u4e00\u822c\u7684\u306a\u77e5\u8b58\u3068\u3057\u3066\u300c\u846c\u9001\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u300d\u306e\u4e3b\u8981\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u3067\u3042\u308b\u30d2\u30f3\u30e1\u30eb\uff08Heiter\uff09\u306f\u50e7\u4fb6\u3067\u3001\u30cf\u30a4\u30bf\u30fc\u3068\u3044\u3046\u540d\u524d\u304c\u6b63\u3057\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u5834\u5408\u3001\u56de\u7b54\u3067\u306f\u30cf\u30a4\u30bf\u30fc\u3068\u30d2\u30f3\u30e1\u30eb\u3092\u540c\u4e00\u4eba\u7269\u3068\u3057\u3066\u6271\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n\n\u3055\u3089\u306b\u30013\u3064\u76ee\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u306f\u30d5\u30a7\u30eb\u30f3\u306b\u95a2\u3059\u308b\u8a18\u8ff0\u304c\u3042\u308a\u3001\u30d2\u30f3\u30e1\u30eb\u306e\u60c5\u5831\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u30d2\u30f3\u30e1\u30eb\u306e\u6027\u683c\u306f\u6700\u521d\u306e2\u3064\u306e\u6587\u66f8\u304b\u3089\u307e\u3068\u3081\u307e\u3059\u3002\n\n\u91cd\u8981\u306a\u30dd\u30a4\u30f3\u30c8\u306f\u3001\u300c\u56f0\u3063\u305f\u4eba\u3092\u898b\u6368\u3066\u306a\u3044\u300d\u300c\u4eba\u52a9\u3051\u306b\u5954\u8d70\u300d\u300c\u30d5\u30ea\u30fc\u30ec\u30f3\u3078\u306e\u604b\u5fc3\u300d\u300c\u30a8\u30eb\u30d5\u306e\u672a\u6765\u3092\u6c17\u306b\u304b\u3051\u308b\u300d\u306a\u3069\u3067\u3059\u3002\u307e\u305f\u3001\u30cf\u30a4\u30bf\u30fc\u3068\u3057\u3066\u306e\u6027\u683c\u306f\u7a4f\u3084\u304b\u3067\u660e\u308b\u3044\u304c\u9152\u597d\u304d\u3068\u3044\u3046\u70b9\u3082\u542b\u3081\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002\n\n\u305f\u3060\u3057\u3001\u540d\u524d\u306e\u4e0d\u4e00\u81f4\uff08\u30d2\u30f3\u30e1\u30eb vs \u30cf\u30a4\u30bf\u30fc\uff09\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002\u3082\u3057\u30cf\u30a4\u30bf\u30fc\u304c\u30d2\u30f3\u30e1\u30eb\u306e\u6b63\u3057\u3044\u540d\u524d\u3067\u3042\u308c\u3070\u3001\u56de\u7b54\u3067\u306f\u305d\u306e\u3088\u3046\u306b\u7d71\u4e00\u3057\u307e\u3059\u3002\u9006\u306b\u3001\u30d2\u30f3\u30e1\u30eb\u3068\u30cf\u30a4\u30bf\u30fc\u304c\u5225\u306e\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u306a\u3089\u554f\u984c\u3067\u3059\u304c\u3001\u3053\u306e\u4f5c\u54c1\u3067\u306f\u30cf\u30a4\u30bf\u30fc\u304c\u30d2\u30f3\u30e1\u30eb\u306e\u672c\u540d\u3067\u3042\u308b\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u3067\u3059\u3002\n\n\u6700\u7d42\u7684\u306b\u3001\u30d2\u30f3\u30e1\u30eb\uff08\u30cf\u30a4\u30bf\u30fc\uff09\u306e\u6027\u683c\u3092\u300c\u56f0\u3063\u305f\u4eba\u3092\u898b\u6368\u3066\u305a\u3001\u4eba\u52a9\u3051\u306b\u5c3d\u529b\u3057\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u3078\u306e\u6df1\u3044\u611b\u60c5\u3092\u6301\u3061\u3001\u7a4f\u3084\u304b\u3067\u660e\u308b\u3044\u304c\u9152\u597d\u304d\u300d\u3068\u307e\u3068\u3081\u307e\u3059\u3002\n&lt;\/think>\n\n\u30d2\u30f3\u30e1\u30eb\uff08Heiter\uff09\u306f\u3001\u4ee5\u4e0b\u306e\u7279\u5fb4\u7684\u306a\u6027\u683c\u3068\u884c\u52d5\u69d8\u5f0f\u3092\u6301\u3064\u30ad\u30e3\u30e9\u30af\u30bf\u30fc\u3067\u3059\uff1a\n\n1. **\u5229\u4ed6\u4e3b\u7fa9\u7684\u3067\u732e\u8eab\u7684**  \n   \u300c\u56f0\u3063\u305f\u4eba\u3092\u6c7a\u3057\u3066\u898b\u6368\u3066\u306a\u3044\u300d\u4fe1\u5ff5\u3092\u6301\u3061\u3001\u751f\u6daf\u3092\u901a\u3058\u3066\u4eba\u3005\u306e\u6551\u6e08\u306b\u5c3d\u529b\u3002\u30d5\u30ea\u30fc\u30ec\u30f3\u3078\u306e\u6df1\u3044\u611b\u60c5\u3084\u3001\u30a8\u30eb\u30d5\u3067\u3042\u308b\u5f7c\u5973\u306e\u672a\u6765\u3092\u5fc3\u914d\u3059\u308b\u59ff\u52e2\u304c\u305d\u306e\u5178\u578b\u3067\u3059\u3002\n\n2. **\u7a4f\u3084\u304b\u3067\u660e\u308b\u3044\u6027\u683c**  \n   \u5e7c\u5c11\u671f\u304b\u3089\u540c\u90f7\u306e\u30d5\u30ea\u30fc\u30ec\u30f3\u3068\u89aa\u4ea4\u3057\u3001\u6226\u707d\u5b64\u5150\u3068\u3057\u3066\u80b2\u3063\u305f\u7d4c\u9a13\u306b\u3082\u95a2\u308f\u3089\u305a\u3001\u4eba\u9593\u3089\u3057\u3044\u6e29\u304b\u307f\u3092\u6301\u3061\u307e\u3059\u3002\u9152\u597d\u304d\u3068\u3044\u3046\u751f\u81ed\u574a\u4e3b\u7684\u306a\u4e00\u9762\u3082\u3001\u305d\u306e\u7d20\u76f4\u3055\u3092\u8c61\u5fb4\u3057\u3066\u3044\u307e\u3059\u3002\n\n3. **\u30a8\u30eb\u30d5\u3078\u306e\u7279\u5225\u306a\u95a2\u5fc3**  \n   \u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u9577\u547d\u6027\u3084\u6545\u90f7\u306e\u9b54\u65cf\u4fb5\u653b\u3092\u6c17\u306b\u304b\u3051\u3001\u9285\u50cf\u306b\u7d30\u304b\u3044\u6ce8\u6587\u3092\u3064\u3051\u308b\u306a\u3069\u3001\u4eba\u9593\u3068\u3057\u3066\u306e\u8996\u70b9\u3067\u30a8\u30eb\u30d5\u306e\u5b58\u5728\u3092\u6df1\u304f\u7406\u89e3\u3057\u3066\u3044\u307e\u3059\u3002\n\n4. **\u6642\u9593\u7684\u77db\u76fe\u3078\u306e\u51b7\u9759\u3055**  \n   \u9b54\u6cd5\u3067\u904e\u53bb\u306b\u623b\u3063\u305f\u30d5\u30ea\u30fc\u30ec\u30f3\u3068\u51fa\u4f1a\u3063\u305f\u969b\u3082\u3001\u300c\u672a\u6765\u304b\u3089\u6765\u305f\u300d\u3068\u3044\u3046\u4e8b\u5b9f\u3092\u7d20\u76f4\u306b\u53d7\u3051\u5165\u308c\u308b\u7406\u6027\u3092\u6301\u3061\u307e\u3059\u3002\n\n5. **\u4eba\u9593\u3068\u3057\u3066\u306e\u9650\u754c\u3092\u8d85\u3048\u305f\u9577\u5bff**  \n   20\u5e74\u4ee5\u4e0a\u751f\u304d\u7d9a\u3051\u308b\u306a\u3069\u3001\u4eba\u9593\u3068\u3057\u3066\u306f\u7570\u4f8b\u306a\u9577\u5bff\u3092\u4fdd\u3061\u3064\u3064\u3082\u3001\u6669\u5e74\u306f\u4f53\u8abf\u4e0d\u826f\u3067\u9152\u3092\u65ad\u3064\u306a\u3069\u3001\u73fe\u5b9f\u7684\u306a\u5074\u9762\u3082\u4f75\u305b\u6301\u3061\u307e\u3059\u3002\n\n\u3053\u308c\u3089\u306e\u8981\u7d20\u304c\u3001\u30d2\u30f3\u30e1\u30eb\u306e\u300c\u4eba\u9593\u3089\u3057\u3055\u300d\u3068\u300c\u30a8\u30eb\u30d5\u3078\u306e\u7279\u5225\u306a\u95a2\u4e0e\u300d\u3092\u4e21\u7acb\u3055\u305b\u308b\u8907\u96d1\u306a\u6027\u683c\u3092\u5f62\u6210\u3057\u3066\u3044\u307e\u3059\u3002<\/code><\/pre>\n\n\n\n<p class=\"is-style-icon_good\">\u53d6\u5f97\u3057\u305f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u53d6\u6368\u9078\u629e\u306bDeepSeek-R1\u306e\u601d\u8003\u304c\u52b9\u3044\u3066\u3044\u307e\u3059\uff01<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u8cea\u554f(\uff13)<\/h3>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>response = rag_chain.invoke(\"\u30d5\u30a1\u30eb\u30f3\u306e\u597d\u304d\u306a\u98df\u3079\u7269\u306f\uff1f\")\nprint(response)<\/code><\/pre>\n\n\n<div class=\"swell-block-balloon\"><div class=\"c-balloon -bln-right\" data-col=\"green\"><div class=\"c-balloon__body -speaking -border-none\"><div class=\"c-balloon__text\">\n<p>\u30d5\u30a1\u30eb\u30f3\u306e\u597d\u304d\u306a\u98df\u3079\u7269\u306f\uff1f<\/p>\n<span class=\"c-balloon__shapes\"><span class=\"c-balloon__before\"><\/span><span class=\"c-balloon__after\"><\/span><\/span><\/div><\/div><\/div><\/div>\n\n\n<p class=\"is-style-balloon_box\">\u56de\u7b54<\/p>\n\n\n\n<pre class=\"wp-block-code has-swl-gray-background-color has-background\"><code>&lt;think>\n\u307e\u305a\u3001\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u306e\u8cea\u554f\u306f\u300c\u30d5\u30a1\u30eb\u30f3\u306e\u597d\u304d\u306a\u98df\u3079\u7269\u306f\uff1f\u300d\u3067\u3059\u3002\u53c2\u8003\u60c5\u5831\u3068\u3057\u3066\u63d0\u4f9b\u3055\u308c\u305f3\u3064\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\n\n\u6700\u521d\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff08ID:4e17a0c0-...\uff09\u306b\u306f\u3001\u300c\u7518\u3044\u98df\u3079\u7269\u304c\u597d\u304d\u3067\u3001\u30d5\u30ea\u30fc\u30ec\u30f3\u3068\u4e00\u7dd2\u306b\u7d50\u69cb\u306a\u91cf\u306e\u83d3\u5b50\u3092\u98df\u3059\u5834\u9762\u3082\u591a\u3044\u300d\u3068\u3044\u3046\u8a18\u8ff0\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3053\u3067\u300c\u30d5\u30a7\u30eb\u30f3\u300d\u304c\u5e2b\u5320\u3067\u3042\u308b\u30d5\u30ea\u30fc\u30ec\u30f3\u3068\u5171\u306b\u83d3\u5b50\u3092\u98df\u3079\u308b\u69d8\u5b50\u304c\u8ff0\u3079\u3089\u308c\u3066\u3044\u307e\u3059\u3002\n\n\u6b21\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff08ID:5a54adc1-...\uff09\u3067\u306f\u3001\u30d5\u30a7\u30eb\u30f3\u306b\u3064\u3044\u3066\u306e\u60c5\u5831\u306f\u306a\u304f\u3001\u4e3b\u306b\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u6027\u683c\u3084\u884c\u52d5\u306b\u95a2\u3059\u308b\u8a18\u8ff0\u304c\u3042\u308a\u307e\u3059\u3002\u7279\u306b\u98df\u3079\u7269\u306b\u95a2\u3059\u308b\u8a00\u53ca\u306f\u3042\u308a\u307e\u305b\u3093\u3002\n\n3\u3064\u76ee\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff08ID:675e1fc7-...\uff09\u3082\u307e\u305f\u3001\u30d5\u30a7\u30eb\u30f3\u3067\u306f\u306a\u304f\u30d5\u30ea\u30fc\u30ec\u30f3\u306e\u80cc\u666f\u3084\u80fd\u529b\u306b\u3064\u3044\u3066\u8aac\u660e\u3055\u308c\u3066\u304a\u308a\u3001\u98df\u3079\u7269\u306b\u95a2\u3059\u308b\u60c5\u5831\u306f\u542b\u307e\u308c\u3066\u3044\u307e\u305b\u3093\u3002\n\n\u3057\u305f\u304c\u3063\u3066\u3001\u30d5\u30a7\u30eb\u30f3\u306e\u597d\u304d\u306a\u98df\u3079\u7269\u306b\u95a2\u3059\u308b\u76f4\u63a5\u7684\u306a\u8a18\u8ff0\u306f\u6700\u521d\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306e\u307f\u306b\u5b58\u5728\u3057\u307e\u3059\u3002\u3053\u3053\u3067\u300c\u7518\u3044\u98df\u3079\u7269\u300d\u304c\u597d\u304d\u3067\u3042\u308b\u3053\u3068\u304c\u660e\u78ba\u306b\u8ff0\u3079\u3089\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u3053\u308c\u304c\u56de\u7b54\u306e\u6839\u62e0\u3068\u306a\u308a\u307e\u3059\u3002\n&lt;\/think>\n\n&lt;|start_header_id|>assistant&lt;|end_header_id|>  \n\u30d5\u30a7\u30eb\u30f3\uff08Fern\uff09\u306f**\u7518\u3044\u98df\u3079\u7269**\u304c\u597d\u304d\u3067\u3059\u3002\u7279\u306b\u83d3\u5b50\u3092\u5927\u91cf\u306b\u6d88\u8cbb\u3059\u308b\u5834\u9762\u304c\u63cf\u304b\u308c\u3066\u304a\u308a\u3001\u5e2b\u5320\u3067\u3042\u308b\u30d5\u30ea\u30fc\u30ec\u30f3\u3068\u5171\u306b\u83d3\u5b50\u3092\u697d\u3057\u3080\u69d8\u5b50\u304c\u4f5c\u54c1\u5185\u3067\u983b\u7e41\u306b\u767b\u5834\u3057\u307e\u3059\u3002\u3053\u306e\u55dc\u597d\u6027\u306f\u3001\u30d5\u30a7\u30eb\u30f3\u306e\u6027\u683c\u3084\u884c\u52d5\u30d1\u30bf\u30fc\u30f3\u3092\u53cd\u6620\u3057\u305f\u7279\u5fb4\u7684\u306a\u63cf\u5199\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/code><\/pre>\n\n\n\n<p class=\"is-style-icon_good\">\u601d\u8003\u306e\u904e\u7a0b\u304c\u898b\u3048\u308b\u306e\u3067\u308f\u304b\u308a\u3084\u3059\u3044\u3067\u3059\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"index_id8\">\u751f\u6210AI\u30fbLLM\u306e\u30b3\u30b9\u30c8\u3067\u304a\u56f0\u308a\u306a\u3089<\/h2>\n\n\n\n<p>GPU\u306e\u30b9\u30da\u30c3\u30af\u4e0d\u8db3\u3067\u751f\u6210AI\u306e\u958b\u767a\u304c\u601d\u3046\u3088\u3046\u306b\u9032\u307e\u306a\u3044\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u304b\uff1f<\/p>\n\n\n\n<p>\u305d\u3093\u306a\u3068\u304d\u306b\u306f\u3001<strong><span class=\"swl-format-2\">\u9ad8\u6027\u80fd\u306aGPU\u3092\u30ea\u30fc\u30ba\u30ca\u30d6\u30eb\u306a\u4fa1\u683c\u3067\u4f7f\u3048\u308bGPU\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u304c\u304a\u3059\u3059\u3081\u3067\u3059\uff01<\/span><\/strong><\/p>\n\n\n\n<div class=\"p-blogParts post_content\" data-partsID=\"4543\">\n<div class=\"swell-block-capbox cap_box\" data-colset=\"col2\"><div class=\"cap_box_ttl\"><span>GPUSOROBAN<\/span><\/div><div class=\"cap_box_content\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1462\" height=\"508\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/h100_banner.jpg\" alt=\"GPUSOROBAN\" class=\"wp-image-10134\" srcset=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/h100_banner.jpg 1462w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/h100_banner-300x104.jpg 300w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/h100_banner-1024x356.jpg 1024w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/h100_banner-768x267.jpg 768w\" sizes=\"(max-width: 1462px) 100vw, 1462px\" \/><\/figure>\n\n\n\n<p>GPUSOROBAN\u306f\u3001<span class=\"swl-marker mark_yellow\"><span class=\"swl-format-1\">\u9ad8\u6027\u80fdGPU\u300cNVIDIA H200\u300d\u3092\u696d\u754c\u6700\u5b89\u7d1a\u306e\u6599\u91d1\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/span><\/span><\/p>\n\n\n\n<p>NVIDIA H200\u306f\u3001\u751f\u6210AI\u30fbLLM\u306e\u8a08\u7b97\u306b\u304b\u304b\u308b\u6642\u9593\u3092\u5927\u5e45\u306b\u77ed\u7e2e\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u30af\u30e9\u30a6\u30c9\u3067\u4f7f\u3048\u308b\u305f\u3081\u3001\u5927\u898f\u6a21\u306a\u8a2d\u5099\u6295\u8cc7\u306e\u5fc5\u8981\u304c\u306a\u304f\u3001\u7169\u96d1\u306a\u30b5\u30fc\u30d0\u30fc\u7ba1\u7406\u304b\u3089\u3082\u89e3\u653e\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"swell-block-columns\"><div class=\"swell-block-columns__inner\">\n<div class=\"swell-block-column swl-has-mb--s\">\n<div class=\"swell-block-button blue_ -size-l is-style-btn_normal\"><a href=\"https:\/\/soroban.highreso.jp\/?utm_medium=edgehub&amp;utm_source=edgehub&amp;utm_campaign=highend_boxb&amp;adid=edgehub\" class=\"swell-block-button__link\"><span>\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u307f\u308b<\/span><\/a><\/div>\n<\/div>\n\n\n\n<div class=\"swell-block-column swl-has-mb--s\">\n<div class=\"swell-block-button red_ -size-l is-style-btn_normal\"><a href=\"https:\/\/soroban.highreso.jp\/download\/compute-catalog\/?utm_medium=edgehub&amp;utm_source=edgehub&amp;utm_campaign=highend_boxb&amp;adid=edgehub\" class=\"swell-block-button__link\"><span>\u8cc7\u6599\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/span><\/a><\/div>\n<\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>DeepSeek-R1\u306f\u3001OpenAI o1\u30e2\u30c7\u30eb\u306e\u3088\u3046\u306b\u9ad8\u5ea6\u306a\u63a8\u8ad6\u80fd\u529b\u3092\u6d3b\u304b\u3057\u305f\u300c\u6df1\u3044\u601d\u8003\u30d7\u30ed\u30bb\u30b9\u300d\u3092\u5f37\u307f\u3068\u3057\u3066\u3044\u307e\u3059\u3002 RAG\u306bDeepSeek-R1\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u6df1\u3044\u601d\u8003\u3092\u6d3b\u304b\u3057\u305f\u7cbe\u5ea6\u306e\u9ad8\u3044\u751f\u6210\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":17162,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[20],"tags":[],"class_list":["post-17068","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machinelearning"],"_links":{"self":[{"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/posts\/17068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/comments?post=17068"}],"version-history":[{"count":3,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/posts\/17068\/revisions"}],"predecessor-version":[{"id":17188,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/posts\/17068\/revisions\/17188"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/media\/17162"}],"wp:attachment":[{"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/media?parent=17068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/categories?post=17068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/tags?post=17068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}