{"id":3967,"date":"2024-11-10T12:15:27","date_gmt":"2024-11-10T04:15:27","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3967\/"},"modified":"2024-11-10T12:15:27","modified_gmt":"2024-11-10T04:15:27","slug":"%e4%bd%bf%e7%94%a8-nvidia-ai-%e7%ab%af%e7%82%b9%e5%92%8c-ragas-%e8%af%84%e4%bc%b0%e5%8c%bb%e7%96%97%e6%a3%80%e7%b4%a2%e5%a2%9e%e5%bc%ba%e7%94%9f%e6%88%90-rag","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3967\/","title":{"rendered":"\u4f7f\u7528 NVIDIA AI \u7aef\u70b9\u548c Ragas \u8bc4\u4f30\u533b\u7597\u68c0\u7d22\u589e\u5f3a\u751f\u6210 (RAG)"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173120346331910.jpg\" class=\"aligncenter\" title=\"\u4f7f\u7528 NVIDIA AI \u7aef\u70b9\u548c Ragas \u8bc4\u4f30\u533b\u7597\u68c0\u7d22\u589e\u5f3a\u751f\u6210 (RAG)\u63d2\u56fe\" alt=\"\u4f7f\u7528 NVIDIA AI \u7aef\u70b9\u548c Ragas \u8bc4\u4f30\u533b\u7597\u68c0\u7d22\u589e\u5f3a\u751f\u6210 (RAG)\u63d2\u56fe\" \/><\/p>\n<p>\u5728\u533b\u5b66\u9886\u57df\uff0c\u878d\u5165\u5148\u8fdb\u6280\u672f\u5bf9\u4e8e\u52a0\u5f3a\u60a3\u8005\u62a4\u7406\u548c\u6539\u8fdb\u7814\u7a76\u65b9\u6cd5\u81f3\u5173\u91cd\u8981\u3002\u68c0\u7d22\u589e\u5f3a\u751f\u6210 (rag) \u662f\u8fd9\u4e9b\u5f00\u521b\u6027\u521b\u65b0\u4e4b\u4e00\uff0c\u5b83\u5c06\u5927\u578b\u8bed\u8a00\u6a21\u578b (llm) \u7684\u5f3a\u5927\u529f\u80fd\u4e0e\u5916\u90e8\u77e5\u8bc6\u68c0\u7d22\u76f8\u7ed3\u5408\u3002\u901a\u8fc7\u4ece\u6570\u636e\u5e93\u3001\u79d1\u5b66\u6587\u732e\u548c\u60a3\u8005\u8bb0\u5f55\u4e2d\u63d0\u53d6\u76f8\u5173\u4fe1\u606f\uff0crag \u7cfb\u7edf\u63d0\u4f9b\u4e86\u66f4\u51c6\u786e\u3001\u4e0a\u4e0b\u6587\u66f4\u4e30\u5bcc\u7684\u54cd\u5e94\u57fa\u7840\uff0c\u89e3\u51b3\u4e86\u7eaf\u6cd5\u5b66\u7855\u58eb\u4e2d\u7ecf\u5e38\u89c2\u5bdf\u5230\u7684\u8fc7\u65f6\u4fe1\u606f\u548c\u5e7b\u89c9\u7b49\u9650\u5236\u3002 <\/p>\n<p>\u5728\u672c\u6982\u8ff0\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8 rag \u5728\u533b\u7597\u4fdd\u5065\u9886\u57df\u65e5\u76ca\u91cd\u8981\u7684\u4f5c\u7528\uff0c\u91cd\u70b9\u5173\u6ce8\u5176\u6539\u53d8\u836f\u7269\u53d1\u73b0\u548c\u4e34\u5e8a\u8bd5\u9a8c\u7b49\u5e94\u7528\u7684\u6f5c\u529b\u3002\u6211\u4eec\u8fd8\u5c06\u6df1\u5165\u63a2\u8ba8\u8bc4\u4f30\u533b\u7597 rag \u7cfb\u7edf\u72ec\u7279\u9700\u6c42\u6240\u9700\u7684\u65b9\u6cd5\u548c\u5de5\u5177\uff0c\u4f8b\u5982 nvidia \u7684 langchn \u7aef\u70b9\u548c ragas \u6846\u67b6\uff0c\u4ee5\u53ca maccrobat \u6570\u636e\u96c6\uff08\u6765\u81ea pubmed central \u7684\u60a3\u8005\u62a5\u544a\u96c6\u5408\uff09\u3002<\/p>\n<hr>\n<h3> \u533b\u7597 rag \u7684\u4e3b\u8981\u6311\u6218 <\/h3>\n<ol>\n<li>\n<p><strong>\u53ef\u6269\u5c55\u6027<\/strong>\uff1a\u968f\u7740\u533b\u7597\u6570\u636e\u4ee5\u8d85\u8fc7 35% \u7684\u590d\u5408\u5e74\u589e\u957f\u7387\u6269\u5c55\uff0crag \u7cfb\u7edf\u9700\u8981\u5728\u4e0d\u5f71\u54cd\u901f\u5ea6\u7684\u60c5\u51b5\u4e0b\u9ad8\u6548\u7ba1\u7406\u548c\u68c0\u7d22\u4fe1\u606f\uff0c\u7279\u522b\u662f\u5728\u53ca\u65f6\u6d1e\u5bdf\u53ef\u80fd\u5f71\u54cd\u60a3\u8005\u62a4\u7406\u7684\u60c5\u51b5\u4e0b\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u4e13\u4e1a\u8bed\u8a00\u548c\u77e5\u8bc6\u8981\u6c42<\/strong>\uff1a\u533b\u7597 rag \u7cfb\u7edf\u9700\u8981\u9488\u5bf9\u7279\u5b9a\u200b\u200b\u9886\u57df\u8fdb\u884c\u8c03\u6574\uff0c\u56e0\u4e3a\u533b\u5b66\u8bcd\u6c47\u548c\u5185\u5bb9\u4e0e\u91d1\u878d\u6216\u6cd5\u5f8b\u7b49\u5176\u4ed6\u9886\u57df\u6709\u5f88\u5927\u4e0d\u540c\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u7f3a\u4e4f\u5b9a\u5236\u7684\u8bc4\u4f30\u6307\u6807<\/strong>\uff1a\u4e0e\u901a\u7528 rag \u5e94\u7528\u4e0d\u540c\uff0c\u533b\u7597 rag \u7f3a\u4e4f\u5408\u9002\u7684\u57fa\u51c6\u3002\u4f20\u7edf\u6307\u6807\uff08\u5982 bleu \u6216 rouge\uff09\u5f3a\u8c03\u6587\u672c\u76f8\u4f3c\u6027\uff0c\u800c\u4e0d\u662f\u533b\u7597\u73af\u5883\u4e2d\u81f3\u5173\u91cd\u8981\u7684\u4e8b\u5b9e\u51c6\u786e\u6027\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u6309\u7ec4\u4ef6\u8bc4\u4f30<\/strong>\uff1a\u6709\u6548\u7684\u8bc4\u4f30\u9700\u8981\u5bf9\u68c0\u7d22\u548c\u751f\u6210\u7ec4\u4ef6\u8fdb\u884c\u72ec\u7acb\u5ba1\u67e5\u3002\u68c0\u7d22\u5fc5\u987b\u63d0\u53d6\u76f8\u5173\u7684\u5f53\u524d\u6570\u636e\uff0c\u751f\u6210\u7ec4\u4ef6\u5fc5\u987b\u786e\u4fdd\u68c0\u7d22\u5185\u5bb9\u7684\u5fe0\u5b9e\u6027\u3002<\/p>\n<\/li>\n<\/ol>\n<h3> \u5f15\u5165 ragas \u8fdb\u884c rag \u8bc4\u4f30 <\/h3>\n<p>ragas \u662f\u4e00\u4e2a\u5f00\u6e90\u8bc4\u4f30\u6846\u67b6\uff0c\u63d0\u4f9b\u4e86\u4e00\u79cd\u8bc4\u4f30 rag \u7ba1\u9053\u7684\u81ea\u52a8\u5316\u65b9\u6cd5\u3002\u5176\u5de5\u5177\u5305\u4fa7\u91cd\u4e8e\u4e0a\u4e0b\u6587\u76f8\u5173\u6027\u3001\u53ec\u56de\u7387\u3001\u5fe0\u5b9e\u5ea6\u548c\u7b54\u6848\u76f8\u5173\u6027\u3002 ragas \u5229\u7528\u6cd5\u5b66\u7855\u58eb\u4f5c\u4e3a\u6cd5\u5b98\u6a21\u578b\uff0c\u6700\u5927\u9650\u5ea6\u5730\u51cf\u5c11\u4e86\u5bf9\u624b\u52a8\u6ce8\u91ca\u6570\u636e\u7684\u9700\u6c42\uff0c\u4ece\u800c\u4f7f\u6d41\u7a0b\u9ad8\u6548\u4e14\u5177\u6709\u6210\u672c\u6548\u76ca\u3002<\/p>\n<h3> rag \u7cfb\u7edf\u7684\u8bc4\u4f30\u7b56\u7565 <\/h3>\n<p>\u4e3a\u4e86\u8fdb\u884c\u7a33\u5065\u7684 rag \u8bc4\u4f30\uff0c\u8bf7\u8003\u8651\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li> <strong>\u5408\u6210\u6570\u636e\u751f\u6210<\/strong>\uff1a\u6839\u636e\u5411\u91cf\u5b58\u50a8\u6587\u6863\u751f\u6210\u4e09\u5143\u7ec4\u6570\u636e\uff08\u95ee\u9898\u3001\u7b54\u6848\u3001\u4e0a\u4e0b\u6587\uff09\u4ee5\u521b\u5efa\u5408\u6210\u6d4b\u8bd5\u6570\u636e\u3002<\/li>\n<li> <strong>\u57fa\u4e8e\u6307\u6807\u7684\u8bc4\u4f30<\/strong>\uff1a\u6839\u636e\u7cbe\u786e\u5ea6\u548c\u53ec\u56de\u7387\u7b49\u6307\u6807\u8bc4\u4f30 rag \u7cfb\u7edf\uff0c\u5c06\u5176\u54cd\u5e94\u4e0e\u751f\u6210\u7684\u5408\u6210\u6570\u636e\u4f5c\u4e3a\u57fa\u672c\u4e8b\u5b9e\u8fdb\u884c\u6bd4\u8f83\u3002<\/li>\n<li> <strong>\u72ec\u7acb\u7ec4\u4ef6\u8bc4\u4f30<\/strong>\uff1a\u5bf9\u4e8e\u6bcf\u4e2a\u95ee\u9898\uff0c\u8bc4\u4f30\u68c0\u7d22\u4e0a\u4e0b\u6587\u76f8\u5173\u6027\u548c\u751f\u6210\u7684\u7b54\u6848\u51c6\u786e\u6027\u3002<\/li>\n<\/ol>\n<p>\u8fd9\u662f\u4e00\u4e2a\u793a\u4f8b\u6d41\u7a0b\uff1a\u7ed9\u51fa\u8bf8\u5982\u201c\u5145\u8840\u6027\u5fc3\u529b\u8870\u7aed\u7684\u5178\u578b\u8840\u538b\u6d4b\u91cf\u662f\u4ec0\u4e48\uff1f\u201d\u4e4b\u7c7b\u7684\u95ee\u9898\u3002\u7cfb\u7edf\u9996\u5148\u68c0\u7d22\u76f8\u5173\u4e0a\u4e0b\u6587\uff0c\u7136\u540e\u8bc4\u4f30\u54cd\u5e94\u662f\u5426\u51c6\u786e\u5730\u89e3\u51b3\u4e86\u95ee\u9898\u3002<\/p>\n<h3> \u4f7f\u7528 nvidia api \u548c langchain \u8bbe\u7f6e rag <\/h3>\n<p>\u8981\u7ee7\u7eed\u64cd\u4f5c\uff0c\u8bf7\u521b\u5efa\u4e00\u4e2a nvidia \u5e10\u6237\u5e76\u83b7\u53d6 api \u5bc6\u94a5\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6\u5305\uff1a<\/p>\n<pre>pip install langchain\npip install langchain_nvidia_ai_endpoints\npip install ragas\n<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4e0b\u8f7d<strong>maccrobat<\/strong>\u6570\u636e\u96c6\uff0c\u8be5\u6570\u636e\u96c6\u63d0\u4f9b\u4e86\u53ef\u4ee5\u901a\u8fc7langchain\u52a0\u8f7d\u548c\u5904\u7406\u7684\u5168\u9762\u533b\u7597\u8bb0\u5f55\u3002<\/p>\n<pre>from langchain_community.document_loaders import huggingfacedatasetloader\nfrom datasets import load_dataset\n\ndataset_name = \"singh-aditya\/maccrobat_biomedical_ner\"\npage_content_column = \"full_text\"\n\nloader = huggingfacedatasetloader(dataset_name, page_content_column)\ndataset = loader.load()\n<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f7f\u7528 nvidia \u7aef\u70b9\u548c langchain\uff0c\u6211\u4eec\u73b0\u5728\u53ef\u4ee5\u6784\u5efa\u5f3a\u5927\u7684\u6d4b\u8bd5\u96c6\u751f\u6210\u5668\u5e76\u57fa\u4e8e\u6570\u636e\u96c6\u521b\u5efa\u5408\u6210\u6570\u636e\uff1a<\/p>\n<pre>from ragas.testset.generator import testsetgenerator\nfrom langchain_nvidia_ai_endpoints import chatnvidia, nvidiaembeddings\n\ncritic_llm = chatnvidia(model=\"meta\/llama3.1-8b-instruct\")\ngenerator_llm = chatnvidia(model=\"mistralai\/mixtral-8x7b-instruct-v0.1\")\nembeddings = nvidiaembeddings(model=\"nv-embedqa-e5-v5\", truncate=\"end\")\n\ngenerator = testsetgenerator.from_langchain(\n    generator_llm, critic_llm, embeddings, chunk_size=512\n)\ntestset = generator.generate_with_langchain_docs(dataset, test_size=10)\n<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h3> \u90e8\u7f72\u548c\u8bc4\u4f30\u7ba1\u9053 <\/h3>\n<p>\u5728\u77e2\u91cf\u5b58\u50a8\u4e0a\u90e8\u7f72\u60a8\u7684 rag \u7cfb\u7edf\uff0c\u4ece\u5b9e\u9645\u533b\u7597\u62a5\u544a\u4e2d\u751f\u6210\u793a\u4f8b\u95ee\u9898\uff1a<\/p>\n<pre># sample questions\n[\"what are typical bp measurements in the case of congestive heart failure?\",\n \"what can scans reveal in patients with severe acute pain?\",\n \"is surgical intervention necessary for liver metastasis?\"]\n<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6bcf\u4e2a\u95ee\u9898\u90fd\u4e0e\u68c0\u7d22\u5230\u7684\u4e0a\u4e0b\u6587\u548c\u751f\u6210\u7684\u771f\u5b9e\u7b54\u6848\u76f8\u5173\u8054\uff0c\u7136\u540e\u53ef\u4ee5\u5c06\u5176\u7528\u4e8e\u8bc4\u4f30\u68c0\u7d22\u548c\u751f\u6210\u7ec4\u4ef6\u7684\u6027\u80fd\u3002<\/p>\n<h3> ragas \u7684\u81ea\u5b9a\u4e49\u6307\u6807 <\/h3>\n<p>\u533b\u7597 rag \u7cfb\u7edf\u53ef\u80fd\u9700\u8981\u81ea\u5b9a\u4e49\u6307\u6807\u6765\u8bc4\u4f30\u68c0\u7d22\u7cbe\u5ea6\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u6307\u6807\u53ef\u4ee5\u786e\u5b9a\u68c0\u7d22\u5230\u7684\u6587\u6863\u5bf9\u4e8e\u641c\u7d22\u67e5\u8be2\u662f\u5426\u8db3\u591f\u76f8\u5173\uff1a<\/p>\n<pre>from dataclasses import dataclass, field\nfrom ragas.evaluation.metrics import metricwithllm, prompt\n\nretrieval_precision = prompt(\n    name=\"retrieval_precision\",\n    instruction=\"is this result relevant enough for the first page of search results? answer '1' for yes and '0' for no.\",\n    input_keys=[\"question\", \"context\"]\n)\n\n@dataclass\nclass retrievalprecision(metricwithllm):\n    name: str = \"retrieval_precision\"\n    evaluation_mode = evaluationmode.qc\n    context_relevancy_prompt: prompt = field(default_factory=lambda: retrieval_precision)\n\n# use this custom metric in evaluation\nscore = evaluate(dataset[\"eval\"], metrics=[retrievalprecision()])\n<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h3> \u7ed3\u6784\u5316\u8f93\u51fa\u786e\u4fdd\u7cbe\u5ea6\u548c\u53ef\u9760\u6027 <\/h3>\n<p>\u4e3a\u4e86\u5b9e\u73b0\u9ad8\u6548\u53ef\u9760\u7684\u8bc4\u4f30\uff0c\u7ed3\u6784\u5316\u8f93\u51fa\u7b80\u5316\u4e86\u5904\u7406\u3002\u501f\u52a9 nvidia \u7684 langchain \u7aef\u70b9\uff0c\u5c06\u60a8\u7684 llm \u56de\u7b54\u5206\u4e3a\u9884\u5b9a\u4e49\u7684\u7c7b\u522b\uff08\u4f8b\u5982\uff0c\u662f\/\u5426\uff09\u3002<\/p>\n<pre>import enum\n\nclass Choices(enum.Enum):\n    Y = \"Y\"\n    N = \"N\"\n\nstructured_llm = nvidia_llm.with_structured_output(Choices)\nstructured_llm.invoke(\"Is this search result relevant to the query?\")\n<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<h3> \u7ed3\u8bba <\/h3>\n<p>rag \u8fde\u63a5\u4e86\u6cd5\u5b66\u7855\u58eb\u548c\u5bc6\u96c6\u5411\u91cf\u68c0\u7d22\uff0c\u4ee5\u5b9e\u73b0\u8de8\u533b\u7597\u3001\u591a\u8bed\u8a00\u548c\u4ee3\u7801\u751f\u6210\u9886\u57df\u7684\u9ad8\u6548\u3001\u53ef\u6269\u5c55\u7684\u5e94\u7528\u7a0b\u5e8f\u3002\u5728\u533b\u7597\u4fdd\u5065\u9886\u57df\uff0c\u5b83\u5e26\u6765\u51c6\u786e\u3001\u60c5\u5883\u611f\u77e5\u54cd\u5e94\u7684\u6f5c\u529b\u662f\u663e\u800c\u6613\u89c1\u7684\uff0c\u4f46\u8bc4\u4f30\u5fc5\u987b\u4f18\u5148\u8003\u8651\u51c6\u786e\u6027\u3001\u9886\u57df\u7279\u5f02\u6027\u548c\u6210\u672c\u6548\u7387\u3002 <\/p>\n<p>\u6982\u8ff0\u7684\u8bc4\u4f30\u6d41\u7a0b\u91c7\u7528\u7efc\u5408\u6d4b\u8bd5\u6570\u636e\u3001nvidia \u7aef\u70b9\u548c ragas\uff0c\u63d0\u4f9b\u4e86\u6ee1\u8db3\u8fd9\u4e9b\u9700\u6c42\u7684\u5f3a\u5927\u65b9\u6cd5\u3002\u5982\u9700\u66f4\u6df1\u5165\u5730\u4e86\u89e3\uff0c\u60a8\u53ef\u4ee5\u5728 hub \u4e0a\u63a2\u7d22 ragas \u548c nvidia generative ai \u793a\u4f8b\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4f7f\u7528 NVIDIA AI \u7aef\u70b9\u548c Ragas \u8bc4\u4f30\u533b\u7597\u68c0\u7d22\u589e\u5f3a\u751f\u6210 (RAG)\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u533b\u5b66\u9886\u57df\uff0c\u878d\u5165\u5148\u8fdb\u6280\u672f\u5bf9\u4e8e\u52a0\u5f3a\u60a3\u8005\u62a4\u7406\u548c\u6539\u8fdb\u7814\u7a76\u65b9\u6cd5\u81f3\u5173\u91cd\u8981\u3002\u68c0\u7d22\u589e\u5f3a\u751f\u6210 (rag) \u662f\u8fd9\u4e9b\u5f00\u521b\u6027\u521b\u65b0\u4e4b\u4e00\uff0c\u5b83\u5c06\u5927\u578b\u8bed\u8a00\u6a21\u578b (llm) \u7684\u5f3a\u5927\u529f\u80fd\u4e0e\u5916\u90e8\u77e5\u8bc6\u68c0\u7d22\u76f8\u7ed3\u5408\u3002\u901a\u8fc7\u4ece\u6570\u636e\u5e93\u3001\u79d1\u5b66\u6587\u732e\u548c\u60a3\u8005\u8bb0\u5f55\u4e2d\u63d0\u53d6\u76f8\u5173\u4fe1\u606f\uff0crag \u7cfb\u7edf\u63d0\u4f9b\u4e86\u66f4\u51c6\u786e\u3001\u4e0a\u4e0b\u6587\u66f4\u4e30\u5bcc\u7684\u54cd\u5e94\u57fa\u7840\uff0c\u89e3\u51b3\u4e86\u7eaf\u6cd5\u5b66\u7855\u58eb\u4e2d\u7ecf\u5e38\u89c2\u5bdf\u5230\u7684\u8fc7\u65f6\u4fe1\u606f\u548c\u5e7b\u89c9\u7b49\u9650\u5236\u3002 \u5728\u672c\u6982\u8ff0\u4e2d\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8 rag \u5728\u533b\u7597\u4fdd\u5065\u9886\u57df\u65e5\u76ca\u91cd\u8981\u7684\u4f5c\u7528\uff0c\u91cd\u70b9\u5173\u6ce8\u5176\u6539\u53d8\u836f\u7269\u53d1\u73b0\u548c\u4e34\u5e8a\u8bd5\u9a8c\u7b49\u5e94\u7528\u7684\u6f5c\u529b\u3002\u6211\u4eec\u8fd8\u5c06\u6df1\u5165\u63a2\u8ba8\u8bc4\u4f30\u533b\u7597 rag \u7cfb\u7edf\u72ec\u7279\u9700\u6c42\u6240\u9700\u7684\u65b9\u6cd5\u548c\u5de5\u5177\uff0c\u4f8b\u5982 nvidia \u7684 langchn \u7aef\u70b9\u548c ragas \u6846\u67b6\uff0c\u4ee5\u53ca maccrobat \u6570\u636e\u96c6\uff08\u6765\u81ea pubmed central \u7684\u60a3\u8005\u62a5\u544a\u96c6\u5408\uff09\u3002 \u533b\u7597 rag \u7684\u4e3b\u8981\u6311\u6218 \u53ef\u6269\u5c55\u6027\uff1a\u968f\u7740\u533b\u7597\u6570\u636e\u4ee5\u8d85\u8fc7 35% \u7684\u590d\u5408\u5e74\u589e\u957f\u7387\u6269\u5c55\uff0crag \u7cfb\u7edf\u9700\u8981\u5728\u4e0d\u5f71\u54cd\u901f\u5ea6\u7684\u60c5\u51b5\u4e0b\u9ad8\u6548\u7ba1\u7406\u548c\u68c0\u7d22\u4fe1\u606f\uff0c\u7279\u522b\u662f\u5728\u53ca\u65f6\u6d1e\u5bdf\u53ef\u80fd\u5f71\u54cd\u60a3\u8005\u62a4\u7406\u7684\u60c5\u51b5\u4e0b\u3002 \u4e13\u4e1a\u8bed\u8a00\u548c\u77e5\u8bc6\u8981\u6c42\uff1a\u533b\u7597 rag \u7cfb\u7edf\u9700\u8981\u9488\u5bf9\u7279\u5b9a\u200b\u200b\u9886\u57df\u8fdb\u884c\u8c03\u6574\uff0c\u56e0\u4e3a\u533b\u5b66\u8bcd\u6c47\u548c\u5185\u5bb9\u4e0e\u91d1\u878d\u6216\u6cd5\u5f8b\u7b49\u5176\u4ed6\u9886\u57df\u6709\u5f88\u5927\u4e0d\u540c\u3002 \u7f3a\u4e4f\u5b9a\u5236\u7684\u8bc4\u4f30\u6307\u6807\uff1a\u4e0e\u901a\u7528 rag \u5e94\u7528\u4e0d\u540c\uff0c\u533b\u7597 rag \u7f3a\u4e4f\u5408\u9002\u7684\u57fa\u51c6\u3002\u4f20\u7edf\u6307\u6807\uff08\u5982 bleu \u6216 rouge\uff09\u5f3a\u8c03\u6587\u672c\u76f8\u4f3c\u6027\uff0c\u800c\u4e0d\u662f\u533b\u7597\u73af\u5883\u4e2d\u81f3\u5173\u91cd\u8981\u7684\u4e8b\u5b9e\u51c6\u786e\u6027\u3002 \u6309\u7ec4\u4ef6\u8bc4\u4f30\uff1a\u6709\u6548\u7684\u8bc4\u4f30\u9700\u8981\u5bf9\u68c0\u7d22\u548c\u751f\u6210\u7ec4\u4ef6\u8fdb\u884c\u72ec\u7acb\u5ba1\u67e5\u3002\u68c0\u7d22\u5fc5\u987b\u63d0\u53d6\u76f8\u5173\u7684\u5f53\u524d\u6570\u636e\uff0c\u751f\u6210\u7ec4\u4ef6\u5fc5\u987b\u786e\u4fdd\u68c0\u7d22\u5185\u5bb9\u7684\u5fe0\u5b9e\u6027\u3002 \u5f15\u5165 ragas \u8fdb\u884c rag \u8bc4\u4f30 ragas \u662f\u4e00\u4e2a\u5f00\u6e90\u8bc4\u4f30\u6846\u67b6\uff0c\u63d0\u4f9b\u4e86\u4e00\u79cd\u8bc4\u4f30 rag \u7ba1\u9053\u7684\u81ea\u52a8\u5316\u65b9\u6cd5\u3002\u5176\u5de5\u5177\u5305\u4fa7\u91cd\u4e8e\u4e0a\u4e0b\u6587\u76f8\u5173\u6027\u3001\u53ec\u56de\u7387\u3001\u5fe0\u5b9e\u5ea6\u548c\u7b54\u6848\u76f8\u5173\u6027\u3002 ragas \u5229\u7528\u6cd5\u5b66\u7855\u58eb\u4f5c\u4e3a\u6cd5\u5b98\u6a21\u578b\uff0c\u6700\u5927\u9650\u5ea6\u5730\u51cf\u5c11\u4e86\u5bf9\u624b\u52a8\u6ce8\u91ca\u6570\u636e\u7684\u9700\u6c42\uff0c\u4ece\u800c\u4f7f\u6d41\u7a0b\u9ad8\u6548\u4e14\u5177\u6709\u6210\u672c\u6548\u76ca\u3002 rag \u7cfb\u7edf\u7684\u8bc4\u4f30\u7b56\u7565 \u4e3a\u4e86\u8fdb\u884c\u7a33\u5065\u7684 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-3967","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=3967"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3967\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}