{"id":3031,"date":"2026-02-26T15:27:25","date_gmt":"2026-02-26T07:27:25","guid":{"rendered":"https:\/\/www.ruianding.com\/blog\/?p=3031"},"modified":"2026-02-26T16:27:48","modified_gmt":"2026-02-26T08:27:48","slug":"promptfoo-01","status":"publish","type":"post","link":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/","title":{"rendered":"AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u524d\u8a00\uff1a\u522b\u8ba9 Agent \u6d4b\u8bd5\u6210\u4e3a\u201c\u7384\u5b66\u201d<\/h2>\n\n\n\n<p>\u5728\u5f00\u53d1\u57fa\u4e8e LangGraph \u6216 Spring AI \u7684\u4f01\u4e1a\u7ea7 Agent \u65f6\uff0c\u6700\u75db\u82e6\u7684\u83ab\u8fc7\u4e8e\uff1a<\/p>\n\n\n\n<p><strong>\u4f60\u6539\u4e86\u4e00\u4e2a\u63d0\u793a\u8bcd\uff08Prompt\uff09\uff0c\u5374\u4e0d\u77e5\u9053\u5b83\u662f\u5426\u4fee\u597d\u4e86 A \u6f0f\u6d1e\u7684\u540c\u65f6\u53c8\u641e\u6302\u4e86 B \u529f\u80fd\u3002<\/strong><\/p>\n\n\n\n<p>\u4f20\u7edf\u7684\u7f51\u9875\u7aef\u624b\u52a8\u6d4b\u8bd5\u6548\u7387\u6781\u4f4e\uff0c\u6211\u4eec\u9700\u8981\u4e00\u79cd\u50cf <strong>\u5355\u5143\u6d4b\u8bd5<\/strong> \u4e00\u6837\u7684\u5de5\u5177\u6765\u91cf\u5316 Agent \u7684\u8868\u73b0\u3002<\/p>\n\n\n\n<p>\u8fd9\u5c31\u662f <strong><a href=\"https:\/\/www.promptfoo.dev\/\">Promptfoo<\/a><\/strong>\u2014\u2014<strong>\u4e00\u4e2a\u4e13\u4e3a LLM \u8bc4\u6d4b\u800c\u751f\u7684\u5f00\u6e90\u795e\u5668\u3002<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"291\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1024x291.png\" alt=\"\" class=\"wp-image-3032\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1024x291.png 1024w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-300x85.png 300w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-768x219.png 768w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1536x437.png 1536w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-2048x583.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">1. \u73af\u5883\u51c6\u5907\uff1a\u89e3\u51b3\u201c\u7248\u672c\u4e0d\u5339\u914d\u201d\u7684\u521d\u7ea7\u5751<\/h2>\n\n\n\n<p>Promptfoo \u662f\u57fa\u4e8e Node.js \u7684\u3002\u5b89\u88c5\u547d\u4ee4\u5f88\u7b80\u5355\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">npm install -g promptfoo\n<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udea9 \u907f\u5751\u6307\u5357 1\uff1aNode \u7248\u672c\u4e0e EBADENGINE \u8b66\u544a<\/h3>\n\n\n\n<p>\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f Node 18\uff0c\u5b89\u88c5\u65f6\u53ef\u80fd\u4f1a\u770b\u5230\u4e00\u5806 <code>EBADENGINE<\/code> \u8b66\u544a\uff08\u63d0\u793a\u9700\u8981 Node 20+\uff09\u3002\u867d\u7136\u8fd9\u4e0d\u5f71\u54cd\u6838\u5fc3\u529f\u80fd\uff0c\u4f46\u4e3a\u4e86\u73af\u5883\u6574\u6d01\uff0c\u5efa\u8bae\u4f7f\u7528 <strong>nvm<\/strong> \u5207\u6362\u5230 Node 20 \u6216 22\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"349\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1-1024x349.png\" alt=\"\" class=\"wp-image-3033\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1-1024x349.png 1024w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1-300x102.png 300w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1-768x262.png 768w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1.png 1473w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">nvm install 22\nnvm use 22\nnvm alias default 22\n\n#\u968f\u540e\u91cd\u65b0\u5b89\u88c5 promptfoo\u5373\u53ef\nnpm install -g promptfoo<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2. \u6838\u5fc3\uff1a\u5982\u4f55\u63a5\u5165\u516c\u53f8\u5185\u90e8 Agent\uff1f<\/h2>\n\n\n\n<p>\u516c\u53f8\u5185\u90e8\u7684 AI \u63a5\u53e3\u901a\u5e38\u6709\u590d\u6742\u7684\u9274\u6743\uff08\u5982 MD5 \u7b7e\u540d\u3001\u65f6\u95f4\u6233\u3001Header \u6821\u9a8c\uff09\u3002\u76f4\u63a5\u914d\u7f6e URL \u5f88\u96be\u8dd1\u901a\u3002<\/p>\n\n\n\n<p><strong>\u6700\u4f18\u96c5\u7684\u65b9\u6848\uff1a\u590d\u7528\u73b0\u6709\u7684 Python \u8c03\u7528\u7c7b\u3002<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.1 \u51c6\u5907 Python \u6865\u63a5\u811a\u672c<\/h3>\n\n\n\n<p>\u5047\u8bbe\u4f60\u5df2\u7ecf\u5c01\u88c5\u597d\u4e86\u4e00\u4e2a <code>agent_client.py<\/code>\uff0c\u91cc\u9762\u5904\u7406\u4e86\u6240\u6709\u7b7e\u540d\u903b\u8f91\u3002\u6211\u4eec\u53ea\u9700\u8981\u5199\u4e00\u4e2a\u7b80\u5355\u7684 <code>provider.py<\/code>\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># provider.py\nimport sys\nimport json\nfrom agent_client import CompanyAgentClient # \u5bfc\u5165\u4f60\u73b0\u6709\u7684\u7c7b\n\ndef main():\n    # Promptfoo \u9ed8\u8ba4\u4f1a\u5c06\u63d0\u95ee\u4f5c\u4e3a\u547d\u4ee4\u884c\u53c2\u6570\u4f20\u8fdb\u6765\n    # \u6211\u4eec\u9700\u8981\u8fc7\u6ee4\u6389\u7a7a\u5b57\u7b26\u548c\u4e0a\u4e0b\u6587 JSON\n    args = [a for a in sys.argv[1:] if a and not a.startswith('{')]\n    user_query = args[0] if args else \"\u4f60\u597d\"\n\n    try:\n        # \u521d\u59cb\u5316\u4f60\u5c01\u88c5\u597d\u7684\u7c7b\n        client = CompanyAgentClient() \n        # \u53d1\u9001\u8bf7\u6c42\u5e76\u83b7\u53d6\u54cd\u5e94\n        response = client.send_request({\"message\": user_query})\n        \n        # \u63d0\u53d6\u771f\u6b63\u7684 AI \u56de\u590d\u6587\u672c\u5e76\u6253\u5370\u5230 stdout\n        # \u53ea\u6709 stdout \u91cc\u7684\u5185\u5bb9\u4f1a\u88ab promptfoo \u6355\u83b7\u4e3a\u56de\u590d\u7ed3\u679c\n        result = response.json()\n        print(result['data']['content'])\n        \n    except Exception as e:\n        # \u62a5\u9519\u4fe1\u606f\u4e00\u5b9a\u8981\u8f93\u51fa\u5230 stderr\uff0c\u65b9\u4fbf\u8c03\u8bd5\n        sys.stderr.write(f\"Error: {str(e)}\\n\")\n        sys.exit(1)\n\nif __name__ == \"__main__\":\n    main()\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. \u914d\u7f6e\u6587\u4ef6\uff1aPromptfoo \u7684\u201c\u5927\u8111\u201d<\/h2>\n\n\n\n<p>\u521b\u5efa <code>promptfooconfig.yaml<\/code>\uff0c\u544a\u8bc9\u5b83\u53bb\u54ea\u91cc\u627e\u4f60\u7684\u811a\u672c\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">description: \"\u516c\u53f8 Agent \u81ea\u52a8\u5316\u8bc4\u4f30\u8ba1\u5212\"\n\nprompts:\n  - \"{{query}}\"\n\nproviders:\n  # \u4f7f\u7528 exec \u6a21\u5f0f\u8c03\u7528\u4f60\u7684 Python \u811a\u672c\n  - id: \"exec:python3 provider.py\"\n    label: \"My-Agent-V1\"\n\ntests:\n  - vars:\n      query: \"\u5982\u4f55\u7533\u8bf7\u8fdc\u7a0b\u529e\u516c\u6743\u9650\uff1f\"\n    assert:\n      - type: icontains\n        value: \"\u7533\u8bf7\u6d41\u7a0b\"\n<\/pre>\n\n\n\n<p>\u8fd9\u4e2a\u6587\u4ef6\u5b9a\u4e49\u4e86\u6d4b\u8bd5\u7684\u903b\u8f91\uff1a\u8c01\u6765\u95ee\u3001\u95ee\u4ec0\u4e48\u3001\u600e\u4e48\u6837\u624d\u7b97\u662f\u4e00\u4e2a\u6b63\u786e\u7684\u56de\u7b54\u3002<\/p>\n\n\n\n<p><strong>\u53c2\u6570\u8be6\u89e3\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>prompts<\/code><\/strong>\uff1a\u6d4b\u8bd5\u6a21\u677f\u3002<code>{{query}}<\/code> \u662f\u5360\u4f4d\u7b26\uff0c\u4f1a\u81ea\u52a8\u66ff\u6362\u4e3a\u4e0b\u9762 <code>tests<\/code> \u91cc\u7684\u5177\u4f53\u95ee\u9898\u3002<\/li>\n\n\n\n<li><strong><code>providers<\/code><\/strong>\uff1a\u6267\u884c\u8005\u3002<code>exec:<\/code> \u6a21\u5f0f\u6781\u5176\u5f3a\u5927\uff0c\u5b83\u76f4\u63a5\u9a71\u52a8\u4f60\u7684\u672c\u5730\u811a\u672c\uff0c\u4e0d\u9700\u8981\u628a\u4ee3\u7801\u66b4\u9732\u7ed9\u7b2c\u4e09\u65b9\u3002<\/li>\n\n\n\n<li><strong><code>tests<\/code><\/strong>\uff1a\u6d4b\u8bd5\u7528\u4f8b\u96c6\u3002<code>vars<\/code> \u5b9a\u4e49\u8f93\u5165\uff0c<code>assert<\/code> \u5b9a\u4e49\u9884\u671f\u7684\u6b63\u786e\u7b54\u6848\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4. \u5f00\u542f\u8bc4\u4f30\u4e4b\u65c5\uff1a\u4ece OpenAI \u5230 Gemini \u7684\u201c\u767d\u5ad6\u201d\u4e4b\u8def<\/h2>\n\n\n\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u6267\u884c <code>promptfoo eval<\/code> \u5373\u53ef\u5f00\u59cb\u3002\u4f46\u5f88\u5feb\u4f60\u4f1a\u53d1\u73b0\uff0c\u5f53\u6211\u4eec\u60f3\u7528\u66f4\u9ad8\u7ea7\u7684 <strong><code>llm-rubric<\/code><\/strong>\uff08\u8ba9 AI \u50cf\u4eba\u4e00\u6837\u7406\u89e3\u8bed\u4e49\u5e76\u6253\u5206\uff09\u65f6\uff0cPromptfoo \u4f1a\u4f38\u624b\u8ddf\u4f60\u8981 <code>OPENAI_API_KEY<\/code>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"109\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-4.png\" alt=\"\" class=\"wp-image-3036\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-4.png 617w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-4-300x53.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/figure>\n\n\n\n<p><strong>\u4f17\u6240\u5468\u77e5\uff0cOpenAI \u662f\u8981\u94b1\u7684\u3002<\/strong> \u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u5207\u6362\u5230 <strong>Google AI Studio<\/strong>\uff0c\u4f7f\u7528 <strong>Gemini 2.5 Flash<\/strong>\uff0c\u6bcf\u5929\u6709\u975e\u5e38\u6177\u6168\u7684\u514d\u8d39\u989d\u5ea6\u3002<\/p>\n\n\n\n<p><strong>\u64cd\u4f5c\u6b65\u9aa4\uff1a<\/strong><\/p>\n\n\n\n<p>1. <strong>\u83b7\u53d6 Key<\/strong>\uff1a\u5728 <a href=\"https:\/\/aistudio.google.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Google AI Studio<\/a> \u521b\u5efa\u4e00\u4e2a API Key\u3002<\/p>\n\n\n\n<p>2. <strong>\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/strong>\uff1a\u5728\u4f60\u7684 <code>.env<\/code> \u6587\u4ef6\uff08\u6216\u7ec8\u7aef\uff09\u4e2d\u6dfb\u52a0\uff1a<\/p>\n\n\n\n<p><code>GOOGLE_API_KEY=\u4f60\u7684\u5bc6\u94a5<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"478\" height=\"118\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-5.png\" alt=\"\" class=\"wp-image-3037\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-5.png 478w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-5-300x74.png 300w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><\/figure>\n\n\n\n<p>3. <strong>\u4fee\u6539 .yaml \u914d\u7f6e<\/strong>\uff1a\u544a\u8bc9 Promptfoo \u7528 Gemini \u505a\u88c1\u5224<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">  - vars:\n      query: \"\u4f60\u662f\u8c01\uff1f\"\n    assert:\n      - type: llm-rubric\n        value: \"\u786e\u4fdd AI \u7684\u8eab\u4efd\u58f0\u660e\u7b26\u5408\u516c\u53f8\u89c4\u5b9a\uff0c\u6ca1\u6709\u63d0\u53ca OpenAI \u6216\u5176\u4ed6\u7ade\u54c1\"\n        provider: \"google:gemini-2.5-flash\"<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\ud83d\udea9 \u907f\u5751\u6307\u5357 2\uff1a\u4ee3\u7406\u660e\u660e\u5f00\u4e86\uff0c\u5374\u4f9d\u7136\u8fde\u4e0d\u4e0a Gemini\uff08Connect Timeout \u62a5\u9519\uff09\uff1f<\/h3>\n\n\n\n<p>\u5982\u679c\u4f60\u4f7f\u7528 Gemini \u7b49\u56fd\u5916\u6a21\u578b\u4f5c\u4e3a\u201c\u88c1\u5224\uff08Grader\uff09\u201d\uff0c\u5373\u4fbf\u4f60\u7535\u8111\u6302\u4e86\u4ee3\u7406\uff0cPromptfoo \u4f9d\u7136\u53ef\u80fd\u62a5\u8fde\u4e0d\u4e0a\uff0c\u62a5\u8d85\u65f6\u62a5\u9519<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"616\" height=\"102\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-3.png\" alt=\"\" class=\"wp-image-3035\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-3.png 616w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-3-300x50.png 300w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/figure>\n\n\n\n<p><strong>\u539f\u56e0<\/strong>\uff1a<strong>Node.js \u4e0d\u4f1a\u81ea\u52a8\u8bfb\u53d6\u7cfb\u7edf\u7684\u4ee3\u7406\u8bbe\u7f6e\u3002<\/strong><\/p>\n\n\n\n<p><strong>\u89e3\u6cd5<\/strong>\uff1a\u5728\u7ec8\u7aef\u8fd0\u884c\u524d\u663e\u5f0f\u6ce8\u5165\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">export HTTP_PROXY=http:\/\/127.0.0.1:\u4f60\u7684\u7aef\u53e3\nexport HTTPS_PROXY=http:\/\/127.0.0.1:\u4f60\u7684\u7aef\u53e3\npromptfoo eval\n<\/pre>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-cyan-bluish-gray-color has-alpha-channel-opacity has-cyan-bluish-gray-background-color has-background is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5. \u8c03\u901a\u7b2c\u4e00\u6b65<\/h2>\n\n\n\n<p>\u6267\u884c <code>promptfoo eval<\/code> \u540e\uff0c\u4f60\u4f1a\u770b\u5230\u4e00\u4e2a\u6e05\u6670\u7684\u5bf9\u6bd4\u77e9\u9635\u3002\u6700\u540e\u8fd0\u884c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"258\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-2-1024x258.png\" alt=\"\" class=\"wp-image-3034\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-2-1024x258.png 1024w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-2-300x76.png 300w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-2-768x194.png 768w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-2.png 1256w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">promptfoo view\n<\/pre>\n\n\n\n<p>\u4f60\u4e5f\u53ef\u4ee5\u5728\u6d4f\u89c8\u5668\u4e2d\u67e5\u770b\u6f02\u4eae\u7684\u6d4b\u8bd5\u62a5\u544a\uff0c\u4ece\u6b64\u544a\u522b\u76f2\u76ee\u8c03\u8bd5\u3002<\/p>\n\n\n\n<p><a href=\"http:\/\/localhost:15500\/eval\">http:\/\/localhost:15500\/eval<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"544\" src=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-6-1024x544.png\" alt=\"\" class=\"wp-image-3038\" style=\"width:769px;height:auto\" srcset=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-6-1024x544.png 1024w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-6-300x159.png 300w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-6-768x408.png 768w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-6-1536x817.png 1536w, https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-6-2048x1089.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00\uff1a\u522b\u8ba9 Agent \u6d4b\u8bd5\u6210\u4e3a\u201c\u7384\u5b66\u201d \u5728\u5f00\u53d1\u57fa\u4e8e LangGraph \u6216 Spring AI \u7684\u4f01\u4e1a\u7ea7 Agent \u65f6\uff0c\u6700\u75db\u82e6\u7684\u83ab\u8fc7\u4e8e\uff1a \u4f60\u6539\u4e86\u4e00\u4e2a\u63d0\u793a\u8bcd\uff08Prompt\uff09\uff0c\u5374\u4e0d\u77e5\u9053\u5b83\u662f\u5426\u4fee\u597d\u4e86 A \u6f0f\u6d1e\u7684\u540c\u65f6\u53c8\u641e\u6302\u4e86 B \u529f\u80fd\u3002 \u4f20\u7edf\u7684\u7f51\u9875\u7aef\u624b\u52a8\u6d4b\u8bd5\u6548\u7387\u6781\u4f4e\uff0c\u6211\u4eec\u9700\u8981\u4e00\u79cd\u50cf \u5355\u5143\u6d4b\u8bd5 \u4e00\u6837\u7684\u5de5\u5177\u6765\u91cf\u5316 Agent \u7684\u8868\u73b0\u3002 \u8fd9\u5c31\u662f Promptfoo\u2014\u2014\u4e00\u4e2a\u4e13\u4e3a LLM \u8bc4\u6d4b\u800c\u751f\u7684\u5f00\u6e90\u795e\u5668\u3002 1. \u73af\u5883\u51c6\u5907\uff1a\u89e3\u51b3\u201c\u7248\u672c\u4e0d\u5339\u914d\u201d\u7684\u521d\u7ea7\u5751 Promptfoo \u662f\u57fa\u4e8e Node.js \u7684\u3002\u5b89\u88c5\u547d\u4ee4\u5f88\u7b80\u5355\uff1a \ud83d\udea9 \u907f\u5751\u6307\u5357 1\uff1aNode \u7248\u672c\u4e0e EBADENGINE \u8b66\u544a \u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f Node 18\uff0c\u5b89\u88c5\u65f6\u53ef\u80fd\u4f1a\u770b\u5230\u4e00\u5806 EBADENGINE \u8b66\u544a\uff08\u63d0\u793a\u9700\u8981 Node 20+\uff09\u3002\u867d\u7136\u8fd9\u4e0d\u5f71\u54cd\u6838\u5fc3\u529f\u80fd\uff0c\u4f46\u4e3a\u4e86\u73af\u5883\u6574\u6d01\uff0c\u5efa\u8bae\u4f7f\u7528 nvm \u5207\u6362\u5230 Node 20 \u6216 22\u3002 2. \u6838\u5fc3\uff1a\u5982\u4f55\u63a5\u5165\u516c\u53f8\u5185\u90e8 Agent\uff1f \u516c\u53f8\u5185\u90e8\u7684 AI [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[83,81,13,10],"tags":[84],"class_list":["post-3031","post","type-post","status-publish","format-standard","hentry","category-agent-evaluation","category-ai-agent","category-handyscripts","category-tutorial","tag-llm-as-a-judge"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09 - \u6781\u7b80IT\uff5cSimpleIT<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09 - \u6781\u7b80IT\uff5cSimpleIT\" \/>\n<meta property=\"og:description\" content=\"\u524d\u8a00\uff1a\u522b\u8ba9 Agent \u6d4b\u8bd5\u6210\u4e3a\u201c\u7384\u5b66\u201d \u5728\u5f00\u53d1\u57fa\u4e8e LangGraph \u6216 Spring AI \u7684\u4f01\u4e1a\u7ea7 Agent \u65f6\uff0c\u6700\u75db\u82e6\u7684\u83ab\u8fc7\u4e8e\uff1a \u4f60\u6539\u4e86\u4e00\u4e2a\u63d0\u793a\u8bcd\uff08Prompt\uff09\uff0c\u5374\u4e0d\u77e5\u9053\u5b83\u662f\u5426\u4fee\u597d\u4e86 A \u6f0f\u6d1e\u7684\u540c\u65f6\u53c8\u641e\u6302\u4e86 B \u529f\u80fd\u3002 \u4f20\u7edf\u7684\u7f51\u9875\u7aef\u624b\u52a8\u6d4b\u8bd5\u6548\u7387\u6781\u4f4e\uff0c\u6211\u4eec\u9700\u8981\u4e00\u79cd\u50cf \u5355\u5143\u6d4b\u8bd5 \u4e00\u6837\u7684\u5de5\u5177\u6765\u91cf\u5316 Agent \u7684\u8868\u73b0\u3002 \u8fd9\u5c31\u662f Promptfoo\u2014\u2014\u4e00\u4e2a\u4e13\u4e3a LLM \u8bc4\u6d4b\u800c\u751f\u7684\u5f00\u6e90\u795e\u5668\u3002 1. \u73af\u5883\u51c6\u5907\uff1a\u89e3\u51b3\u201c\u7248\u672c\u4e0d\u5339\u914d\u201d\u7684\u521d\u7ea7\u5751 Promptfoo \u662f\u57fa\u4e8e Node.js \u7684\u3002\u5b89\u88c5\u547d\u4ee4\u5f88\u7b80\u5355\uff1a \ud83d\udea9 \u907f\u5751\u6307\u5357 1\uff1aNode \u7248\u672c\u4e0e EBADENGINE \u8b66\u544a \u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f Node 18\uff0c\u5b89\u88c5\u65f6\u53ef\u80fd\u4f1a\u770b\u5230\u4e00\u5806 EBADENGINE \u8b66\u544a\uff08\u63d0\u793a\u9700\u8981 Node 20+\uff09\u3002\u867d\u7136\u8fd9\u4e0d\u5f71\u54cd\u6838\u5fc3\u529f\u80fd\uff0c\u4f46\u4e3a\u4e86\u73af\u5883\u6574\u6d01\uff0c\u5efa\u8bae\u4f7f\u7528 nvm \u5207\u6362\u5230 Node 20 \u6216 22\u3002 2. \u6838\u5fc3\uff1a\u5982\u4f55\u63a5\u5165\u516c\u53f8\u5185\u90e8 Agent\uff1f \u516c\u53f8\u5185\u90e8\u7684 AI [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/\" \/>\n<meta property=\"og:site_name\" content=\"\u6781\u7b80IT\uff5cSimpleIT\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-26T07:27:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T08:27:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2930\" \/>\n\t<meta property=\"og:image:height\" content=\"834\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ruian Ding\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ruian Ding\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/\"},\"author\":{\"name\":\"Ruian Ding\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"headline\":\"AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09\",\"datePublished\":\"2026-02-26T07:27:25+00:00\",\"dateModified\":\"2026-02-26T08:27:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/\"},\"wordCount\":61,\"publisher\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"image\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1024x291.png\",\"keywords\":[\"LLM-as-a-judge\"],\"articleSection\":[\"Agent Evaluation\",\"AI Agent\",\"HandyScripts\",\"Tutorial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/\",\"url\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/\",\"name\":\"AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09 - \u6781\u7b80IT\uff5cSimpleIT\",\"isPartOf\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1024x291.png\",\"datePublished\":\"2026-02-26T07:27:25+00:00\",\"dateModified\":\"2026-02-26T08:27:48+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#primaryimage\",\"url\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image.png\",\"contentUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image.png\",\"width\":2930,\"height\":834},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.ruianding.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#website\",\"url\":\"https:\/\/www.ruianding.com\/blog\/\",\"name\":\"Ruian's Tech Troubleshooting Toolbox\",\"description\":\"Debug the World.\",\"publisher\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\"},\"alternateName\":\"\u4e01\u777f\u5b89\u7684\u6280\u672f\u5206\u4eab\u535a\u5ba2\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ruianding.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b\",\"name\":\"Ruian Ding\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"contentUrl\":\"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png\",\"width\":284,\"height\":284,\"caption\":\"Ruian Ding\"},\"logo\":{\"@id\":\"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"I am currently a Support Specialist at NIO, focusing on cloud-related issues for NIO Power. Previously, at Microsoft Entra ID, I specialized in identity and access management (IAM), including device registration, Windows Hello for Business (WHfB), multi-factor authentication (MFA), and single sign-on (SSO). In addition to my core expertise, I have a strong foundation in Active Directory, Servers, Cloud Computing, Network Administration, and Front-end Web Development. This diverse technical skill set enables me to effectively handle a wide range of challenges in a fast-paced IT environment.\",\"sameAs\":[\"https:\/\/www.ruianding.com\"],\"url\":\"https:\/\/www.ruianding.com\/blog\/author\/ruiand\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09 - \u6781\u7b80IT\uff5cSimpleIT","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/","og_locale":"en_US","og_type":"article","og_title":"AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09 - \u6781\u7b80IT\uff5cSimpleIT","og_description":"\u524d\u8a00\uff1a\u522b\u8ba9 Agent \u6d4b\u8bd5\u6210\u4e3a\u201c\u7384\u5b66\u201d \u5728\u5f00\u53d1\u57fa\u4e8e LangGraph \u6216 Spring AI \u7684\u4f01\u4e1a\u7ea7 Agent \u65f6\uff0c\u6700\u75db\u82e6\u7684\u83ab\u8fc7\u4e8e\uff1a \u4f60\u6539\u4e86\u4e00\u4e2a\u63d0\u793a\u8bcd\uff08Prompt\uff09\uff0c\u5374\u4e0d\u77e5\u9053\u5b83\u662f\u5426\u4fee\u597d\u4e86 A \u6f0f\u6d1e\u7684\u540c\u65f6\u53c8\u641e\u6302\u4e86 B \u529f\u80fd\u3002 \u4f20\u7edf\u7684\u7f51\u9875\u7aef\u624b\u52a8\u6d4b\u8bd5\u6548\u7387\u6781\u4f4e\uff0c\u6211\u4eec\u9700\u8981\u4e00\u79cd\u50cf \u5355\u5143\u6d4b\u8bd5 \u4e00\u6837\u7684\u5de5\u5177\u6765\u91cf\u5316 Agent \u7684\u8868\u73b0\u3002 \u8fd9\u5c31\u662f Promptfoo\u2014\u2014\u4e00\u4e2a\u4e13\u4e3a LLM \u8bc4\u6d4b\u800c\u751f\u7684\u5f00\u6e90\u795e\u5668\u3002 1. \u73af\u5883\u51c6\u5907\uff1a\u89e3\u51b3\u201c\u7248\u672c\u4e0d\u5339\u914d\u201d\u7684\u521d\u7ea7\u5751 Promptfoo \u662f\u57fa\u4e8e Node.js \u7684\u3002\u5b89\u88c5\u547d\u4ee4\u5f88\u7b80\u5355\uff1a \ud83d\udea9 \u907f\u5751\u6307\u5357 1\uff1aNode \u7248\u672c\u4e0e EBADENGINE \u8b66\u544a \u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f Node 18\uff0c\u5b89\u88c5\u65f6\u53ef\u80fd\u4f1a\u770b\u5230\u4e00\u5806 EBADENGINE \u8b66\u544a\uff08\u63d0\u793a\u9700\u8981 Node 20+\uff09\u3002\u867d\u7136\u8fd9\u4e0d\u5f71\u54cd\u6838\u5fc3\u529f\u80fd\uff0c\u4f46\u4e3a\u4e86\u73af\u5883\u6574\u6d01\uff0c\u5efa\u8bae\u4f7f\u7528 nvm \u5207\u6362\u5230 Node 20 \u6216 22\u3002 2. \u6838\u5fc3\uff1a\u5982\u4f55\u63a5\u5165\u516c\u53f8\u5185\u90e8 Agent\uff1f \u516c\u53f8\u5185\u90e8\u7684 AI [&hellip;]","og_url":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/","og_site_name":"\u6781\u7b80IT\uff5cSimpleIT","article_published_time":"2026-02-26T07:27:25+00:00","article_modified_time":"2026-02-26T08:27:48+00:00","og_image":[{"width":2930,"height":834,"url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image.png","type":"image\/png"}],"author":"Ruian Ding","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ruian Ding","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#article","isPartOf":{"@id":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/"},"author":{"name":"Ruian Ding","@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"headline":"AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09","datePublished":"2026-02-26T07:27:25+00:00","dateModified":"2026-02-26T08:27:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/"},"wordCount":61,"publisher":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"image":{"@id":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1024x291.png","keywords":["LLM-as-a-judge"],"articleSection":["Agent Evaluation","AI Agent","HandyScripts","Tutorial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/","url":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/","name":"AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09 - \u6781\u7b80IT\uff5cSimpleIT","isPartOf":{"@id":"https:\/\/www.ruianding.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#primaryimage"},"image":{"@id":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image-1024x291.png","datePublished":"2026-02-26T07:27:25+00:00","dateModified":"2026-02-26T08:27:48+00:00","breadcrumb":{"@id":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ruianding.com\/blog\/promptfoo-01\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#primaryimage","url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image.png","contentUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2026\/02\/image.png","width":2930,"height":834},{"@type":"BreadcrumbList","@id":"https:\/\/www.ruianding.com\/blog\/promptfoo-01\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ruianding.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AI Agent \u843d\u5730\u5fc5\u770b\uff1a\u5982\u4f55\u7528 Promptfoo \u642d\u5efa\u7b2c\u4e00\u5957\u81ea\u52a8\u5316\u6d4b\u8bd5\u5de5\u4f5c\u6d41\uff08\u4e00\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.ruianding.com\/blog\/#website","url":"https:\/\/www.ruianding.com\/blog\/","name":"Ruian's Tech Troubleshooting Toolbox","description":"Debug the World.","publisher":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b"},"alternateName":"\u4e01\u777f\u5b89\u7684\u6280\u672f\u5206\u4eab\u535a\u5ba2","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ruianding.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/440d88575b7dc819a4cefc8c4199db3b","name":"Ruian Ding","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","contentUrl":"https:\/\/www.ruianding.com\/blog\/wp-content\/uploads\/2023\/05\/logo.png","width":284,"height":284,"caption":"Ruian Ding"},"logo":{"@id":"https:\/\/www.ruianding.com\/blog\/#\/schema\/person\/image\/"},"description":"I am currently a Support Specialist at NIO, focusing on cloud-related issues for NIO Power. Previously, at Microsoft Entra ID, I specialized in identity and access management (IAM), including device registration, Windows Hello for Business (WHfB), multi-factor authentication (MFA), and single sign-on (SSO). In addition to my core expertise, I have a strong foundation in Active Directory, Servers, Cloud Computing, Network Administration, and Front-end Web Development. This diverse technical skill set enables me to effectively handle a wide range of challenges in a fast-paced IT environment.","sameAs":["https:\/\/www.ruianding.com"],"url":"https:\/\/www.ruianding.com\/blog\/author\/ruiand\/"}]}},"_links":{"self":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/3031","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/comments?post=3031"}],"version-history":[{"count":2,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/3031\/revisions"}],"predecessor-version":[{"id":3040,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/posts\/3031\/revisions\/3040"}],"wp:attachment":[{"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/media?parent=3031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/categories?post=3031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ruianding.com\/blog\/wp-json\/wp\/v2\/tags?post=3031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}