{"id":111,"date":"2026-03-08T23:11:23","date_gmt":"2026-03-08T23:11:23","guid":{"rendered":"https:\/\/blog.rebalai.com\/ja\/2026\/03\/08\/rag-db\/"},"modified":"2026-03-09T04:59:38","modified_gmt":"2026-03-09T04:59:38","slug":"rag-db","status":"publish","type":"post","link":"https:\/\/blog.rebalai.com\/ja\/2026\/03\/08\/rag-db\/","title":{"rendered":"RAG\u306e\u6df1\u6398\u308a: \u30c1\u30e3\u30f3\u30ad\u30f3\u30b0\u6226\u7565\u30fb\u30d9\u30af\u30bf\u30fcDB\u30fb\u691c\u7d22\u6700\u9069\u5316\u5b8c\u5168\u30ac\u30a4\u30c9"},"content":{"rendered":"<p>\u534a\u5e74\u524d\u3001\u3046\u3061\u306e\u30c1\u30fc\u30e0\uff084\u4eba\uff09\u3067\u793e\u5185\u30ca\u30ec\u30c3\u30b8\u30d9\u30fc\u30b9\u306eRAG\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u3063\u3066\u3044\u305f\u3002\u5bfe\u8c61\u306fConfluence\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u6570\u5343\u4ef6\u3068GitHub\u306eREADME\u7fa4\u3002\u6700\u521d\u306e\u5b9f\u88c5\u306f2\u65e5\u3067\u52d5\u3044\u305f\u3002\u7cbe\u5ea6\u306f\u60b2\u60e8\u3060\u3063\u305f\u3002<\/p>\n<p>\u300c\u30c1\u30e3\u30f3\u30af1000\u30c8\u30fc\u30af\u30f3\u3001\u30aa\u30fc\u30d0\u30fc\u30e9\u30c3\u30d7200\u3001Chroma\u3067\u3044\u3044\u3067\u3057\u3087\u300d\u3068\u3044\u3046\u30ce\u30ea\u3067\u9032\u3081\u305f\u3089\u3001\u30e6\u30fc\u30b6\u30fc\u304b\u3089\u300c\u5168\u7136\u7684\u5916\u308c\u306a\u56de\u7b54\u304c\u8fd4\u3063\u3066\u304f\u308b\u300d\u3068\u3044\u3046\u5831\u544a\u304c\u5c71\u306e\u3088\u3046\u306b\u6765\u305f\u3002\u305d\u3053\u304b\u30892\u9031\u9593\u3001\u3072\u305f\u3059\u3089\u30c1\u30e3\u30f3\u30ad\u30f3\u30b0\u30fb\u30d9\u30af\u30bf\u30fcDB\u30fb\u691c\u7d22\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3\u3092\u8a66\u3057\u7d9a\u3051\u305f\u3002\u305d\u306e\u8a18\u9332\u3092\u66f8\u304f\u3002<\/p>\n<hr \/>\n<h2>\u30c1\u30e3\u30f3\u30ad\u30f3\u30b0\u306f\u300c\u5927\u304d\u3055\u300d\u3058\u3083\u306a\u304f\u3066\u300c\u610f\u5473\u306e\u5883\u754c\u300d\u304c\u5168\u3066<\/h2>\n<p>\u6700\u521d\u306b\u6c17\u3065\u3044\u305f\u306e\u306f\u3001\u56fa\u5b9a\u30b5\u30a4\u30ba\u30c1\u30e3\u30f3\u30ad\u30f3\u30b0\uff08fixed-size chunking\uff09\u306e\u6839\u672c\u7684\u306a\u554f\u984c\u3060\u3063\u305f\u30021000\u30c8\u30fc\u30af\u30f3\u3067\u6a5f\u68b0\u7684\u306b\u5207\u308b\u3068\u3001\u30b3\u30fc\u30c9\u30d6\u30ed\u30c3\u30af\u306e\u9014\u4e2d\u3067\u5206\u5272\u3055\u308c\u305f\u308a\u3001Markdown\u306e\u8868\u304c\u534a\u5206\u306b\u306a\u3063\u305f\u308a\u3059\u308b\u3002LLM\u306b\u6e21\u3055\u308c\u308b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u304c\u305d\u3082\u305d\u3082\u6b20\u3051\u3066\u3044\u308b\u306e\u3060\u304b\u3089\u3001\u307e\u3068\u3082\u306a\u56de\u7b54\u304c\u51fa\u308b\u308f\u3051\u304c\u306a\u3044\u3002<\/p>\n<p>\u8a66\u3057\u305f\u30a2\u30d7\u30ed\u30fc\u30c1\u3092\u6574\u7406\u3059\u308b\u3068\u2014\u2014<\/p>\n<p><strong>Fixed-size chunking<\/strong>\u306f\u5b9f\u88c5\u304c\u4e00\u756a\u697d\u3002\u305f\u3060\u300c\u610f\u5473\u306e\u9014\u4e2d\u3067\u5207\u308c\u308b\u300d\u554f\u984c\u306f\u6839\u672c\u7684\u306b\u907f\u3051\u3089\u308c\u306a\u3044\u3002500\u301c1000\u30c8\u30fc\u30af\u30f3\u304c\u4e00\u822c\u7684\u3060\u304c\u3001\u6280\u8853\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3068\u793e\u5185FAQ\u3067\u306f\u6700\u9069\u5024\u304c\u5168\u7136\u9055\u3046\u2014\u2014\u540c\u3058\u30b5\u30a4\u30ba\u3067\u51e6\u7406\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u6642\u70b9\u3067\u3001\u8a2d\u8a08\u304c\u305a\u308c\u3066\u3044\u308b\u3002<\/p>\n<p><strong>Recursive character splitting<\/strong>\uff08LangChain\u306e<code>RecursiveCharacterTextSplitter<\/code>\u304c\u4ee3\u8868\u683c\uff09\u306f\u6bb5\u843d\u2192\u6587\u2192\u5358\u8a9e\u306e\u9806\u3067\u5206\u5272\u70b9\u3092\u63a2\u3059\u3002\u56fa\u5b9a\u30b5\u30a4\u30ba\u3088\u308a\u660e\u3089\u304b\u306b\u30de\u30b7\u3067\u3001\u6700\u521d\u306e\u6539\u5584\u3068\u3057\u3066\u8a66\u3059\u4fa1\u5024\u306f\u5341\u5206\u3042\u308b\u3002<\/p>\n<p><strong>Semantic chunking<\/strong>\u306f\u6587\u306e\u57cb\u3081\u8fbc\u307f\u30d9\u30af\u30c8\u30eb\u306e\u8ddd\u96e2\u304c\u6025\u5909\u3059\u308b\u5730\u70b9\u3067\u5206\u5272\u3059\u308b\u624b\u6cd5\u3002LlamaIndex\u3084langchain-experimental\u306b\u5b9f\u88c5\u304c\u3042\u308b\u3002\u7cbe\u5ea6\u306f\u78ba\u304b\u306b\u4e0a\u304c\u308b\u3002\u305f\u3060\u3057\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u6570\u304c\u591a\u3044\u3068\u57cb\u3081\u8fbc\u307f\u30b3\u30b9\u30c8\u304c\u8df3\u306d\u4e0a\u304c\u308b\u306e\u3067\u3001\u8a66\u7b97\u3057\u3066\u304b\u3089\u5c0e\u5165\u3092\u5224\u65ad\u3059\u308b\u3053\u3068\uff08\u3046\u3061\u306f\u4e00\u5ea6\u8a66\u7b97\u3057\u3066\u5c11\u3057\u5f15\u3044\u305f\uff09\u3002<\/p>\n<p><strong>Hierarchical chunking\uff08Parent-Child\uff09<\/strong>\u2014\u2014\u4eca\u306e\u3068\u3053\u308d\u4e00\u756a\u6c17\u306b\u5165\u3063\u3066\u3044\u308b\u3002<\/p>\n<p>Hierarchical\u306e\u8003\u3048\u65b9\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u3001\u89aa\u30c1\u30e3\u30f3\u30af\uff08\u5927\u304d\u3044\uff09\u3068\u5b50\u30c1\u30e3\u30f3\u30af\uff08\u5c0f\u3055\u3044\uff09\u3092\u5225\u3005\u306b\u7ba1\u7406\u3059\u308b\u3002\u691c\u7d22\u306f\u5b50\u30c1\u30e3\u30f3\u30af\u3067\u884c\u3044\u3001LLM\u306b\u306f\u89aa\u30c1\u30e3\u30f3\u30af\u3092\u6e21\u3059\u3002<\/p>\n<pre><code class=\"language-python\">from langchain.retrievers import ParentDocumentRetriever\nfrom langchain.storage import InMemoryStore\nfrom langchain.text_splitter import RecursiveCharacterTextSplitter\nfrom langchain_community.vectorstores import Chroma\nfrom langchain_openai import OpenAIEmbeddings\n\n# \u5b50\u30c1\u30e3\u30f3\u30af: \u691c\u7d22\u7cbe\u5ea6\u306e\u305f\u3081\u306b\u5c0f\u3055\u304f\uff08\u610f\u5473\u7684\u51dd\u96c6\u6027\u3092\u9ad8\u3081\u308b\uff09\nchild_splitter = RecursiveCharacterTextSplitter(chunk_size=400)\n\n# \u89aa\u30c1\u30e3\u30f3\u30af: LLM\u306b\u6e21\u3059\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u305f\u3081\u306b\u5927\u304d\u304f\nparent_splitter = RecursiveCharacterTextSplitter(chunk_size=2000)\n\nstore = InMemoryStore()\nvectorstore = Chroma(\n    collection_name=&quot;documents&quot;,\n    embedding_function=OpenAIEmbeddings()\n)\n\nretriever = ParentDocumentRetriever(\n    vectorstore=vectorstore,\n    docstore=store,\n    child_splitter=child_splitter,\n    parent_splitter=parent_splitter,\n)\n\n# \u8ffd\u52a0\u3059\u308b\u3068\u89aa\u3068\u5b50\u304c\u81ea\u52d5\u3067\u7ba1\u7406\u3055\u308c\u308b\nretriever.add_documents(docs)\n\n# \u691c\u7d22\u306f\u5b50\u30c1\u30e3\u30f3\u30af\u3067\u884c\u308f\u308c\u3001\u8fd4\u3063\u3066\u304f\u308b\u306e\u306f\u89aa\u30c1\u30e3\u30f3\u30af\nresults = retriever.invoke(&quot;<a href=\"https:\/\/aws.amazon.com\/?tag=synsun0f-20\" title=\"Amazon Web Services (AWS) Cloud Platform\" rel=\"nofollow sponsored\" target=\"_blank\">AWS<\/a> S3\u306e\u30d0\u30b1\u30c3\u30c8\u547d\u540d\u898f\u5247\u306f\uff1f&quot;)\n<\/code><\/pre>\n<p>\u3053\u306e\u69cb\u9020\u306e\u4f55\u304c\u3044\u3044\u304b\u3068\u3044\u3046\u3068\u3001\u691c\u7d22\u306f\u610f\u5473\u7684\u306b\u51dd\u96c6\u3057\u305f\u5c0f\u3055\u3044\u30c1\u30e3\u30f3\u30af\u3067\u884c\u3048\u3066\u3001LLM\u306b\u6e21\u3059\u306e\u306f\u6587\u8108\u304c\u8c4a\u5bcc\u306a\u5927\u304d\u3044\u30c1\u30e3\u30f3\u30af\u306b\u306a\u308b\u3002Recall\uff08\u95a2\u9023\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u3061\u3083\u3093\u3068\u62fe\u3048\u308b\u304b\uff09\u3068Context Quality\uff08LLM\u304c\u4f7f\u3048\u308b\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u304b\uff09\u306e\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u3092\u4e21\u7acb\u3067\u304d\u308b\u3002<\/p>\n<p>\u3084\u3089\u304b\u3057\u305f\u8a71\u3092\u3072\u3068\u3064\u3002\u30aa\u30fc\u30d0\u30fc\u30e9\u30c3\u30d7\u3092\u5927\u304d\u304f\u3057\u3059\u304e\u305f\u3002400\u30c8\u30fc\u30af\u30f3\u306e\u30c1\u30e3\u30f3\u30af\u306b200\u30c8\u30fc\u30af\u30f3\u306e\u30aa\u30fc\u30d0\u30fc\u30e9\u30c3\u30d7\u3092\u3064\u3051\u305f\u3089\u3001\u540c\u3058\u5185\u5bb9\u304c\u8907\u6570\u30c1\u30e3\u30f3\u30af\u306b\u91cd\u8907\u3057\u3066\u5165\u308a\u8fbc\u307f\u3001\u691c\u7d22\u7d50\u679c\u306e\u4e0a\u4f4d\u304c\u307b\u307c\u540c\u3058\u5185\u5bb9\u306e\u30c1\u30e3\u30f3\u30af\u3067\u57cb\u307e\u308b\u3068\u3044\u3046\u4e8b\u614b\u306b\u306a\u3063\u305f\u3002\u30aa\u30fc\u30d0\u30fc\u30e9\u30c3\u30d7\u306f10\u301c15%\u304f\u3089\u3044\u304c\u7121\u96e3\u3060\u3068\u601d\u3046\u3002<\/p>\n<hr \/>\n<h2>\u30d9\u30af\u30bf\u30fcDB: \u300c\u3068\u308a\u3042\u3048\u305aPinecone\u300d\u304c\u6b63\u89e3\u3068\u306f\u9650\u3089\u306a\u3044<\/h2>\n<p>\u30d9\u30af\u30bf\u30fcDB\u9078\u629e\u3067\u8ff7\u3063\u3066\u3044\u308b\u4eba\u306f\u591a\u3044\u3068\u601d\u3046\u3002\u81ea\u5206\u3082\u8ff7\u3063\u305f\u3057\u3001\u6b63\u76f4\u4eca\u3082\u5b8c\u5168\u306b\u306f\u6c7a\u7740\u304c\u3064\u3044\u3066\u3044\u306a\u3044\u90e8\u5206\u304c\u3042\u308b\u3002\u305f\u3060\u5b9f\u969b\u306b\u8a66\u3057\u305f\u611f\u60f3\u3092\u30b7\u30a7\u30a2\u3059\u308b\u3002<\/p>\n<p><strong>Chroma<\/strong>\u306f\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u3084\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7\u306b\u306f\u6700\u9ad8\u3067\u3001\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u4e00\u756a\u697d\u3002\u305f\u3060100\u4e07\u4ef6\u3092\u8d85\u3048\u305f\u3042\u305f\u308a\u304b\u3089\u602a\u3057\u304f\u306a\u308b\u306e\u3067\u3001\u30b9\u30b1\u30fc\u30eb\u304c\u898b\u3048\u3066\u3044\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u306f\u5411\u304b\u306a\u3044\u3002<\/p>\n<p><strong>Qdrant<\/strong>\u2014\u2014\u500b\u4eba\u7684\u306b\u4e00\u756a\u6c17\u306b\u5165\u3063\u3066\u3044\u308b\u3002Rust\u30d9\u30fc\u30b9\u306a\u306e\u3067CPU\u30d0\u30a6\u30f3\u30c9\u306a\u51e6\u7406\u304c\u901f\u304f\u3001\u30da\u30a4\u30ed\u30fc\u30c9\uff08\u30e1\u30bf\u30c7\u30fc\u30bf\uff09\u306b\u5bfe\u3059\u308b\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u304c\u67d4\u8edf\u3002v1.8.0\u304b\u3089Sparse vector\u306e\u30cd\u30a4\u30c6\u30a3\u30d6\u30b5\u30dd\u30fc\u30c8\u304c\u5165\u3063\u3066\u3001\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u691c\u7d22\u304c\u304b\u306a\u308a\u697d\u306b\u306a\u3063\u305f\u3002\u30bb\u30eb\u30d5\u30db\u30b9\u30c8\u3082Cloud\u7248\u3082\u3042\u308b\u3002<\/p>\n<p><strong>pgvector<\/strong>\u306fPostgreSQL\u306e\u62e1\u5f35\u3067\u3001\u65e2\u5b58\u30b9\u30bf\u30c3\u30af\u304cPostgres\u306a\u3089\u63a1\u7528\u3057\u3084\u3059\u3044\u3002v0.5.0\u304b\u3089HNSW index\u304c\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u901f\u5ea6\u306f\u6539\u5584\u3057\u305f\u304c\u3001\u7d14\u7c8b\u306a\u30d9\u30af\u30bf\u30fcDB\u3068\u6bd4\u3079\u308b\u3068\u5927\u91cf\u30c7\u30fc\u30bf\u6642\u306eANN\u6027\u80fd\u306f\u4e00\u6b69\u52a3\u308b\u5370\u8c61\u304c\u3042\u308b\u3002\u300cPostgres\u3067\u5b8c\u7d50\u3057\u305f\u3044\u300d\u3068\u3044\u3046\u5f37\u3044\u52d5\u6a5f\u304c\u306a\u3044\u9650\u308a\u3001\u5c02\u7528DB\u306e\u65b9\u304c\u5f8c\u3005\u697d\u3060\u3068\u601d\u3046\u3002<\/p>\n<p><strong>Pinecone<\/strong>\u306f\u30de\u30cd\u30fc\u30b8\u30c9\u30b5\u30fc\u30d3\u30b9\u3068\u3057\u3066\u306e\u5b8c\u6210\u5ea6\u304c\u9ad8\u304f\u3001\u904b\u7528\u30b3\u30b9\u30c8\u3092\u4e0b\u3052\u305f\u3044\u30c1\u30fc\u30e0\u306b\u306f\u5411\u3044\u3066\u3044\u308b\u3002\u6599\u91d1\u306f\u76f8\u5fdc\u306b\u304b\u304b\u308b\u3057\u3001\u30d9\u30f3\u30c0\u30fc\u30ed\u30c3\u30af\u30a4\u30f3\u306f\u899a\u609f\u3059\u308b\u3053\u3068\u3002<\/p>\n<p><strong>Weaviate<\/strong>\u306f\u30de\u30eb\u30c1\u30e2\u30fc\u30c0\u30eb\u5bfe\u5fdc\u304c\u5f37\u307f\u3002\u30c6\u30ad\u30b9\u30c8\u4ee5\u5916\uff08\u753b\u50cf\u306a\u3069\uff09\u3082\u6271\u3046\u306a\u3089\u9078\u629e\u80a2\u306b\u5165\u308b\u3002\u3046\u3061\u306f\u30c6\u30ad\u30b9\u30c8\u306e\u307f\u3060\u3063\u305f\u306e\u3067\u6df1\u304f\u8a55\u4fa1\u3057\u306a\u304b\u3063\u305f\u3002<\/p>\n<p>\u3046\u3061\u306e\u5834\u5408\u3001\u6700\u7d42\u7684\u306bQdrant\u306e\u30bb\u30eb\u30d5\u30db\u30b9\u30c8\uff08Kubernetes on <a href=\"https:\/\/aws.amazon.com\/?tag=synsun0f-20\" title=\"Amazon Web Services (AWS) Cloud Platform\" rel=\"nofollow sponsored\" target=\"_blank\">AWS<\/a>\uff09\u3092\u9078\u3093\u3060\u3002\u7406\u7531\u306f3\u3064\u2014\u2014\u30b3\u30b9\u30c8\uff08Pinecone\u3088\u308a\u5b89\u3044\uff09\u3001\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u691c\u7d22\u30b5\u30dd\u30fc\u30c8\u306e\u5145\u5b9f\u3001Rust\u30d9\u30fc\u30b9\u306e\u5b89\u5b9a\u6027\u3002\u60f3\u5b9a\u30c7\u30fc\u30bf\u91cf\uff08\u6570\u767e\u4e07\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u898f\u6a21\uff09\u3068\u30b3\u30b9\u30c8\u611f\u3092\u8003\u3048\u308b\u3068\u3001\u30bb\u30eb\u30d5\u30db\u30b9\u30c8\u306b\u632f\u308a\u5207\u3063\u305f\u65b9\u304c\u5408\u3063\u3066\u3044\u305f\u3002<\/p>\n<hr \/>\n<h2>\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u691c\u7d22\u3068\u30ea\u30e9\u30f3\u30ad\u30f3\u30b0\u3067\u7cbe\u5ea6\u304c\u8df3\u306d\u4e0a\u304c\u3063\u305f<\/h2>\n<p>\u3053\u3053\u304c\u4e00\u756a\u300c\u305d\u3046\u3044\u3046\u3053\u3068\u304b\u300d\u3068\u306a\u3063\u305f\u30dd\u30a4\u30f3\u30c8\u3002<\/p>\n<p>\u7d14\u7c8b\u306a\u30d9\u30af\u30bf\u30fc\u691c\u7d22\uff08semantic search\uff09\u306f\u610f\u5473\u7684\u306a\u985e\u4f3c\u6027\u3092\u6349\u3048\u308b\u306e\u304c\u5f97\u610f\u3060\u304c\u3001\u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u5b8c\u5168\u4e00\u81f4\u304c\u5f31\u3044\u3002\u300cAWS S3\u306e\u30d0\u30b1\u30c3\u30c8\u540d\u306e\u6587\u5b57\u6570\u5236\u9650\u300d\u307f\u305f\u3044\u306a\u5177\u4f53\u7684\u306a\u30af\u30a8\u30ea\u3067\u3001S3\u30fb\u30d0\u30b1\u30c3\u30c8\u3068\u3044\u3046\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u5165\u3063\u3066\u3044\u308b\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u3046\u307e\u304f\u62fe\u3048\u306a\u3044\u3053\u3068\u304c\u3042\u3063\u305f\u3002\u9006\u306bBM25\uff08\u30ad\u30fc\u30ef\u30fc\u30c9\u30d9\u30fc\u30b9\u306e\u5168\u6587\u691c\u7d22\uff09\u306f\u5b8c\u5168\u4e00\u81f4\u306b\u5f37\u3044\u304c\u3001\u8a00\u3044\u56de\u3057\u304c\u9055\u3046\u985e\u7fa9\u8a9e\u7684\u306a\u30af\u30a8\u30ea\u306b\u5f31\u3044\u3002<\/p>\n<p>\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u691c\u7d22\u306f\u3053\u306e\u4e21\u65b9\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3002RRF\uff08Reciprocal Rank Fusion\uff09\u3067\u30b9\u30b3\u30a2\u3092\u30de\u30fc\u30b8\u3059\u308b\u306e\u304c\u4e00\u822c\u7684\u306a\u30a2\u30d7\u30ed\u30fc\u30c1\u3002<\/p>\n<pre><code class=\"language-python\">from qdrant_client import QdrantClient, models\n\nclient = QdrantClient(&quot;localhost&quot;, port=6333)\n\n# Dense embedding\u3092\u53d6\u5f97\uff08OpenAI, Cohere\u306a\u3069\uff09\ndense_vector = embedding_model.encode(query)\n\n# Sparse vector\uff08BM25\u76f8\u5f53\uff09\u3092\u53d6\u5f97\n# fastembed \u306e BM25 \u30a8\u30f3\u30b3\u30fc\u30c0\u30fc\u304c\u4f7f\u3044\u3084\u3059\u3044\nsparse_vector = bm25_encoder.encode_queries(query)\n\nresults = client.query_points(\n    collection_name=&quot;documents&quot;,\n    prefetch=[\n        # Dense vector\u3067\u4e0a\u4f4d\u5019\u88dc\u3092\u53d6\u5f97\n        models.Prefetch(\n            query=dense_vector,\n            using=&quot;dense&quot;,\n            limit=100,\n        ),\n        # Sparse vector\u3067\u4e0a\u4f4d\u5019\u88dc\u3092\u53d6\u5f97\n        models.Prefetch(\n            query=models.SparseVector(\n                indices=sparse_vector.indices.tolist(),\n                values=sparse_vector.values.tolist(),\n            ),\n            using=&quot;sparse&quot;,\n            limit=100,\n        ),\n    ],\n    # RRF\u3067\u4e21\u8005\u306e\u30e9\u30f3\u30af\u3092\u30de\u30fc\u30b8\n    query=models.FusionQuery(fusion=models.Fusion.RRF),\n    limit=20,\n)\n<\/code><\/pre>\n<p>\u3055\u3089\u306b\u30ea\u30e9\u30f3\u30ad\u30f3\u30b0\u3092\u5165\u308c\u308b\u3068\u7cbe\u5ea6\u304c\u3082\u3046\u4e00\u6bb5\u4e0a\u304c\u3063\u305f\u3002Cross-encoder\u30d9\u30fc\u30b9\u306e\u30ea\u30e9\u30f3\u30ab\u30fc\uff08Cohere\u306e<code>rerank-multilingual-v3.0<\/code>\u306f\u65e5\u672c\u8a9e\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u308b\uff09\u3092\u4f7f\u3063\u3066\u3001\u4e0a\u4f4d20\u4ef6\u30925\u4ef6\u306b\u7d5e\u308b\u30d1\u30bf\u30fc\u30f3\u3002<\/p>\n<p>\u30ea\u30e9\u30f3\u30ad\u30f3\u30b0\u306e\u30b3\u30b9\u30c8\u3068\u30ec\u30a4\u30c6\u30f3\u30b7\u3092\u6700\u521d\u306f\u5fc3\u914d\u3057\u3066\u3044\u305f\u304c\u3001\u30d9\u30af\u30bf\u30fc\u691c\u7d22\u3067\u7d5e\u3063\u305f\u5f8c\u306e\u5c11\u6570\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u5bfe\u3057\u3066\u3060\u3051\u52d5\u304b\u3059\u306e\u3067\u3001\u5b9f\u969b\u306e\u30ec\u30a4\u30c6\u30f3\u30b7\u5897\u52a0\u306f\u8a31\u5bb9\u7bc4\u56f2\u5185\u3060\u3063\u305f\uff08\u3046\u3061\u306e\u5834\u5408\u3001p99\u3067800ms\u307b\u3069\u8ffd\u52a0\uff09\u3002<\/p>\n<p><strong>\u30cf\u30de\u3063\u305f\u3053\u3068<\/strong>: \u30ea\u30e9\u30f3\u30ad\u30f3\u30b0\u30e2\u30c7\u30eb\u306e\u8a00\u8a9e\u5bfe\u5fdc\u3092\u78ba\u8a8d\u3057\u5fd8\u308c\u305f\u3002\u82f1\u8a9e\u3057\u304b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u30e2\u30c7\u30eb\u3092\u65e5\u672c\u8a9e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u306b\u4f7f\u3063\u3066\u3001\u30b9\u30b3\u30a2\u304c\u5b8c\u5168\u306b\u3081\u3061\u3083\u304f\u3061\u3083\u306b\u306a\u3063\u305f\u3002\u65e5\u672c\u8a9e\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u306f<code>Cohere rerank-multilingual-v3.0<\/code>\u304bBGE-Reranker-v2-m3\u3042\u305f\u308a\u304c\u7121\u96e3\u3002\u3053\u308c\u306f\u672c\u5f53\u306b\u5f8c\u6094\u3057\u3066\u3044\u308b\u3002<\/p>\n<p>\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u691c\u7d22\u306f\u6700\u521d\u304b\u3089\u8a2d\u8a08\u306b\u7d44\u307f\u8fbc\u3093\u3067\u304a\u304f\u3079\u304d\u3060\u3063\u305f\u3002\u5f8c\u304b\u3089\u8ffd\u52a0\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u306e\u4f5c\u308a\u76f4\u3057\u3068\u30a8\u30f3\u3079\u30c7\u30a3\u30f3\u30b0\u306e\u518d\u751f\u6210\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u3001\u7d50\u69cb\u5927\u5909\u3060\u3063\u305f\u3002<\/p>\n<hr \/>\n<h2>\u8a55\u4fa1\u306a\u3057\u3067\u6539\u5584\u306f\u3067\u304d\u306a\u3044: RAGAS\u3067\u5b9a\u91cf\u6e2c\u5b9a\u3059\u308b<\/h2>\n<p>2\u9031\u9593\u8a66\u884c\u932f\u8aa4\u3057\u3066\u6c17\u3065\u3044\u305f\u306e\u306f\u3001\u300c\u306a\u3093\u3068\u306a\u304f\u826f\u3055\u305d\u3046\u300d\u3067\u5224\u65ad\u3057\u3066\u3044\u3066\u3082\u5168\u304f\u610f\u5473\u304c\u306a\u3044\u3068\u3044\u3046\u3053\u3068\u3002RAGAS\uff08Retrieval Augmented Generation Assessment\uff09\u3067\u5b9a\u91cf\u8a55\u4fa1\u3092\u5165\u308c\u3066\u304b\u3089\u3001\u3088\u3046\u3084\u304f\u6539\u5584\u304c\u52a0\u901f\u3057\u305f\u3002<\/p>\n<p>RAGAS\u304c\u8a08\u6e2c\u3057\u3066\u304f\u308c\u308b\u4e3b\u8981\u30e1\u30c8\u30ea\u30af\u30b9\u2014\u2014<\/p>\n<ul>\n<li><strong>Faithfulness<\/strong>: \u56de\u7b54\u304c\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306b\u57fa\u3065\u3044\u3066\u3044\u308b\u304b\uff08\u30cf\u30eb\u30b7\u30cd\u30fc\u30b7\u30e7\u30f3\u691c\u51fa\uff09<\/li>\n<li><strong>Answer Relevance<\/strong>: \u56de\u7b54\u304c\u30af\u30a8\u30ea\u306b\u5bfe\u3057\u3066\u95a2\u9023\u3057\u3066\u3044\u308b\u304b<\/li>\n<li><strong>Context Recall<\/strong>: \u6b63\u89e3\u306b\u5fc5\u8981\u306a\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u3092\u62fe\u3048\u3066\u3044\u308b\u304b<\/li>\n<li><strong>Context Precision<\/strong>: \u53d6\u5f97\u3057\u305f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u306e\u3046\u3061\u95a2\u9023\u3059\u308b\u3082\u306e\u306e\u5272\u5408<\/li>\n<\/ul>\n<p>\u6700\u521d\u306bRAGAS\u306e\u30b9\u30b3\u30a2\u3092\u51fa\u3057\u305f\u3068\u304d\u306f\u7d50\u69cb\u30b7\u30e7\u30c3\u30af\u3060\u3063\u305f\u3002Faithfulness\u304c0.62\u3057\u304b\u306a\u304f\u3066\u3001\u300c\u3053\u308c\u306f\u307e\u305a\u3044\u300d\u3068\u7d20\u76f4\u306b\u601d\u3063\u305f\u3002<\/p>\n<p>\u8a55\u4fa1\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u4f5c\u308b\u306e\u304c\u5730\u5473\u306b\u5927\u5909\u3060\u304c\uff08\u30c6\u30b9\u30c8\u7528\u306eQ&amp;A\u30da\u30a2\u3092100\u4ef6\u624b\u3067\u4f5c\u3063\u305f\uff09\u3001\u3053\u308c\u306a\u3057\u306b\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3059\u308b\u306e\u306f\u611f\u899a\u3060\u3051\u3067\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3088\u3046\u306a\u3082\u306e\u3060\u3068\u601d\u3046\u3002\u56fa\u5b9a\u30b5\u30a4\u30ba\u30c1\u30e3\u30f3\u30ad\u30f3\u30b0\u304b\u3089Hierarchical\u306b\u5909\u3048\u305f\u3089Context Recall\u304c0.59\u21920.78\u306b\u6539\u5584\u3057\u3001\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u691c\u7d22\u3092\u8ffd\u52a0\u3057\u305f\u3089\u3055\u3089\u306b0.84\u307e\u3067\u4e0a\u304c\u3063\u305f\u3002\u3053\u3046\u3044\u3046\u5b9a\u91cf\u7684\u306a\u5909\u5316\u304c\u898b\u3048\u308b\u3088\u3046\u306b\u306a\u308b\u3068\u3001\u4f55\u304c\u52b9\u3044\u3066\u3044\u308b\u304b\u5224\u65ad\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n<p>\u8a55\u4fa1\u30bb\u30c3\u30c8\u306e\u4f5c\u6210\u30b3\u30b9\u30c8\u3092\u60dc\u3057\u307e\u306a\u3044\u3053\u3068\u3002100\u4ef6\u306eQ&amp;A\u3092\u4f5c\u308b\u306e\u306b\u4e38\u4e00\u65e5\u304b\u304b\u3063\u305f\u304c\u3001\u305d\u308c\u304c\u306a\u3051\u308c\u30702\u9031\u9593\u306e\u6539\u5584\u4f5c\u696d\u306f\u5358\u306a\u308b\u6642\u9593\u306e\u7121\u99c4\u306b\u306a\u3063\u3066\u3044\u305f\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u3002<\/p>\n<hr \/>\n<h2>\u81ea\u5206\u304c\u5b9f\u969b\u306b\u9078\u3076\u306a\u3089<\/h2>\n<p>\u300c\u30b1\u30fc\u30b9\u30d0\u30a4\u30b1\u30fc\u30b9\u300d\u3068\u8a00\u3044\u305f\u3044\u3068\u3053\u308d\u3060\u304c\u3001\u3042\u3048\u3066\u63a8\u85a6\u3092\u66f8\u304f\u3002<\/p>\n<p><strong>\u30c1\u30e3\u30f3\u30ad\u30f3\u30b0<\/strong>: \u307e\u305aHierarchical chunking\u3092\u8a66\u3057\u3066\u307b\u3057\u3044\u3002\u5b9f\u88c5\u30b3\u30b9\u30c8\u306f\u5c11\u3057\u4e0a\u304c\u308b\u304c\u3001\u7cbe\u5ea6\u6539\u5584\u306e\u52b9\u679c\u304c\u5927\u304d\u3044\u3002\u5b50\u30c1\u30e3\u30f3\u30af300\u301c500\u30c8\u30fc\u30af\u30f3\u3001\u89aa\u30c1\u30e3\u30f3\u30af1500\u301c2000\u30c8\u30fc\u30af\u30f3\u3042\u305f\u308a\u304b\u3089\u59cb\u3081\u308b\u3068\u3044\u3044\u3002\u30aa\u30fc\u30d0\u30fc\u30e9\u30c3\u30d7\u306f10%\u7a0b\u5ea6\u3002<\/p>\n<p><strong>\u30d9\u30af\u30bf\u30fcDB<\/strong>:<br \/>\n&#8211; \u30ed\u30fc\u30ab\u30eb\/\u5c0f\u898f\u6a21\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7 \u2192 <strong>Chroma<\/strong>\uff08\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u697d\uff09<br \/>\n&#8211; <a href=\"https:\/\/m.do.co\/c\/06956e5e2802\" title=\"DigitalOcean <a href=\"https:\/\/m.do.co\/c\/06956e5e2802\" title=\"DigitalOcean <a href=\"https:\/\/m.do.co\/c\/06956e5e2802\" title=\"DigitalOcean \u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3\u74b0\u5883\" rel=\"nofollow sponsored\" target=\"_blank\">\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3<\/a>\u74b0\u5883&#8221; rel=&#8221;nofollow sponsored&#8221; target=&#8221;_blank&#8221;>\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3<\/a>\u74b0\u5883&#8221; rel=&#8221;nofollow sponsored&#8221; target=&#8221;_blank&#8221;>\u30d7\u30ed\u30c0\u30af\u30b7\u30e7\u30f3<\/a>\u3001\u30b3\u30b9\u30c8\u91cd\u8996 \u2192 <strong>Qdrant<\/strong>\uff08\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u691c\u7d22\u8fbc\u307f\u3067\u9078\u3076\u306a\u3089\u3053\u3053\uff09<br \/>\n&#8211; \u65e2\u5b58\u304cPostgres \u2192 <strong>pgvector<\/strong>\uff08\u305f\u3060\u3057\u30b9\u30b1\u30fc\u30eb\u306b\u9650\u754c\u304c\u3042\u308b\uff09<br \/>\n&#8211; \u30de\u30cd\u30fc\u30b8\u30c9\u3067\u697d\u3057\u305f\u3044 \u2192 <strong>Pinecone<\/strong>\uff08\u6599\u91d1\u3068\u76f8\u8ac7\uff09<\/p>\n<p><strong>\u691c\u7d22\u30d1\u30a4\u30d7\u30e9\u30a4\u30f3<\/strong>: Dense + Sparse + RRF\u306e\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u691c\u7d22\u3092\u6700\u521d\u304b\u3089\u8a2d\u8a08\u306b\u5165\u308c\u308b\u3053\u3068\u3002\u5f8c\u4ed8\u3051\u306f\u8f9b\u3044\u3002\u30ea\u30e9\u30f3\u30ad\u30f3\u30b0\u306f\u30ec\u30a4\u30c6\u30f3\u30b7\u3068\u7cbe\u5ea6\u306e\u30c8\u30ec\u30fc\u30c9\u30aa\u30d5\u3092\u8a08\u6e2c\u3057\u305f\u4e0a\u3067\u5224\u65ad\u3059\u308b\u3002\u65e5\u672c\u8a9e\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u306fmultilingual\u5bfe\u5fdc\u306e\u30e2\u30c7\u30eb\u3092\u4f7f\u3046\u3053\u3068\uff08\u3053\u308c\u306f\u672c\u5f53\u306b\u5fd8\u308c\u304c\u3061\uff09\u3002<\/p>\n<p><strong>\u8a55\u4fa1<\/strong>: RAGAS\u3092\u6700\u521d\u304b\u3089\u5165\u308c\u308b\u3002\u5f8c\u56de\u3057\u306b\u3059\u308b\u3068\u7d76\u5bfe\u306b\u5f8c\u6094\u3059\u308b\u3002<\/p>\n<p>RAG\u306f\u300c\u52d5\u304f\u30b7\u30b9\u30c6\u30e0\u300d\u3092\u4f5c\u308b\u306e\u306f\u7c21\u5358\u3060\u304c\u3001\u300c\u4f7f\u3048\u308b\u30b7\u30b9\u30c6\u30e0\u300d\u3092\u4f5c\u308b\u306e\u306f\u5168\u7136\u5225\u306e\u8a71\u3060\u3063\u305f\u3002\u30c1\u30e3\u30f3\u30ad\u30f3\u30b0\u30fb\u691c\u7d22\u30fb\u8a55\u4fa1\u306e3\u3064\u3092\u771f\u5263\u306b\u8003\u3048\u306a\u3044\u3068\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u4fe1\u983c\u3092\u5931\u3046\u306e\u306f\u65e9\u3044\u3002\u3046\u3061\u304c\u305d\u308c\u3092\u4f53\u611f\u3059\u308b\u306e\u306b2\u9031\u9593\u304b\u304b\u3063\u305f\u3002<\/p>\n<p><!-- Reviewed: 2026-03-07 | Status: ready_to_publish | Changes: \u30c1\u30e3\u30f3\u30ad\u30f3\u30b0\u6bd4\u8f03\u30ea\u30b9\u30c8\u306e\u4e26\u5217\u69cb\u9020\u3092\u89e3\u4f53\u30fb\u6587\u9577\u306b\u5909\u5316\u3092\u3064\u3051\u305f\u3001\u30d9\u30af\u30bf\u30fcDB\u5404\u8a55\u4fa1\u306b\u500b\u4eba\u7684\u306a\u6587\u8108\u3068\u5224\u65ad\u57fa\u6e96\u3092\u8ffd\u52a0\u3001Semantic chunking\u8cbb\u7528\u8a66\u7b97\u306e\u88dc\u8db3\u8ffd\u52a0\u3001\u30cf\u30a4\u30d6\u30ea\u30c3\u30c9\u691c\u7d22\u30bb\u30af\u30b7\u30e7\u30f3\u306b\u30cf\u30de\u3063\u305f\u3053\u3068\u306e\u5f37\u8abf\u3068\u5f8c\u6094\u306e\u4e00\u6587\u8ffd\u52a0\u3001\u91cd\u8907\u3057\u305f\u7de0\u3081\u6bb5\u843d\u3092\u524a\u9664 --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u534a\u5e74\u524d\u3001\u3046\u3061\u306e\u30c1\u30fc\u30e0\uff084\u4eba\uff09\u3067\u793e\u5185\u30ca\u30ec\u30c3\u30b8\u30d9\u30fc\u30b9\u306eRAG\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u3063\u3066\u3044\u305f\u3002\u5bfe\u8c61\u306fConfluence\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u6570\u5343\u4ef6\u3068GitHub\u306eREADME\u7fa4\u3002\u6700\u521d\u306e\u5b9f\u88c5\u306f2\u65e5\u3067\u52d5\u3044\u305f\u3002\u7cbe\u5ea6\u306f\u60b2\u60e8\u3060\u3063\u305f\u3002 \u300c\u30c1\u30e3\u30f3\u30af1000\u30c8\u30fc\u30af\u30f3\u3001\u30aa\u30fc\u30d0\u30fc\u30e9\u30c3\u30d7200\u3001Chroma\u3067\u3044\u3044\u3067\u3057\u3087\u300d\u3068\u3044\u3046\u30ce\u30ea\u3067\u9032\u3081\u305f\u3089\u3001\u30e6\u30fc\u30b6\u30fc\u304b<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-111","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/posts\/111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":4,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"predecessor-version":[{"id":188,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/posts\/111\/revisions\/188"}],"wp:attachment":[{"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.rebalai.com\/ja\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}