{"id":13357,"date":"2024-11-16T09:18:06","date_gmt":"2024-11-16T01:18:06","guid":{"rendered":"https:\/\/www.aisharenet.com\/?p=13357"},"modified":"2024-12-19T18:01:18","modified_gmt":"2024-12-19T10:01:18","slug":"damoxingjiegouhuaai","status":"publish","type":"post","link":"https:\/\/www.kdjingpai.com\/de\/damoxingjiegouhuaai\/","title":{"rendered":"\u5927\u6a21\u578b\u7ed3\u6784\u5316\u6570\u636e\u8f93\u51fa\u65b9\u6cd5\uff1a\u7cbe\u9009 LLM JSON \u8d44\u6e90\u5217\u8868"},"content":{"rendered":"<p>\u6b64\u7cbe\u9009\u5217\u8868\u4e13\u6ce8\u4e8e\u4f7f\u7528\u5927\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u751f\u6210 JSON \u6216\u5176\u4ed6\u7ed3\u6784\u5316\u8f93\u51fa\u7684\u76f8\u5173\u8d44\u6e90\u3002<\/p>\n<p>\u901a\u8fc7\u51fd\u6570\u8c03\u7528\u3001\u5de5\u5177\u3001CFG \u7b49\u65b9\u5f0f\u4f7f\u7528 LLM \u751f\u6210 JSON \u7684\u8d44\u6e90\u5217\u8868\uff0c\u6db5\u76d6\u5e93\u3001\u6a21\u578b\u3001Notebooks \u7b49\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"_3\">\u76ee\u5f55<\/h2>\n<ul>\n<li>\u672f\u8bed<\/li>\n<li>\u6258\u7ba1\u6a21\u578b<\/li>\n<li>\u672c\u5730\u6a21\u578b<\/li>\n<li>Python \u5e93<\/li>\n<li>\u535a\u5ba2\u6587\u7ae0<\/li>\n<li>\u89c6\u9891<\/li>\n<li>Jupyter Notebooks<\/li>\n<li>\u6392\u884c\u699c<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2 id=\"_5\">\u672f\u8bed<\/h2>\n<p>\u5173\u4e8e\u751f\u6210 JSON\uff0c\u6709\u4e00\u4e9b\u4e0d\u540c\u7684\u540d\u79f0\uff0c\u5c3d\u7ba1\u542b\u4e49\u57fa\u672c\u76f8\u540c\uff1a<\/p>\n<ul>\n<li><a href=\"https:\/\/platform.openai.com\/docs\/guides\/structured-outputs\">\u7ed3\u6784\u5316\u8f93\u51fa<\/a>\uff1a\u4f7f\u7528 LLM \u751f\u6210\u4efb\u4f55\u7ed3\u6784\u5316\u8f93\u51fa\uff0c\u5305\u62ec JSON\u3001XML \u6216 YAML\uff0c\u4e0d\u8bba\u5177\u4f53\u6280\u672f\uff08\u4f8b\u5982\u51fd\u6570\u8c03\u7528\u3001\u5f15\u5bfc\u751f\u6210\uff09\u3002<\/li>\n<li><a href=\"https:\/\/www.promptingguide.ai\/applications\/function_calling\">\u51fd\u6570\u8c03\u7528<\/a>\uff1a\u4e3a LLM \u63d0\u4f9b\u4e00\u4e2a\u5047\u8bbe\uff08\u6216\u5b9e\u9645\uff09\u51fd\u6570\u5b9a\u4e49\uff0c\u63d0\u793a\u5b83\u5728\u804a\u5929\u6216\u5b8c\u6210\u54cd\u5e94\u4e2d\u201c\u8c03\u7528\u201d\u8be5\u51fd\u6570\u3002LLM \u5b9e\u9645\u4e0a\u5e76\u4e0d\u4f1a\u771f\u6b63\u8c03\u7528\u8be5\u51fd\u6570\uff0c\u53ea\u662f\u901a\u8fc7 JSON \u6d88\u606f\u6307\u793a\u8c03\u7528\u7684\u610f\u56fe\u3002<\/li>\n<li><a href=\"https:\/\/platform.openai.com\/docs\/guides\/text-generation\/json-mode\">JSON \u6a21\u5f0f<\/a>\uff1a\u6307\u5b9a LLM \u5fc5\u987b\u751f\u6210\u6709\u6548\u7684 JSON\u3002\u6839\u636e\u4f9b\u5e94\u5546\u4e0d\u540c\uff0c\u53ef\u80fd\u4f1a\u6216\u4e0d\u4f1a\u6307\u5b9a schema\uff0cLLM \u53ef\u80fd\u4f1a\u521b\u5efa\u610f\u5916\u7684 schema\u3002<\/li>\n<li><a href=\"https:\/\/python.langchain.com\/docs\/modules\/agents\/agent_types\/openai_tools\">\u5de5\u5177\u4f7f\u7528<\/a>\uff1a\u4e3a LLM \u63d0\u4f9b\u4e00\u7cfb\u5217\u5de5\u5177\u9009\u62e9\uff0c\u5982\u56fe\u50cf\u751f\u6210\u3001\u7f51\u9875\u641c\u7d22\u548c\u201c\u51fd\u6570\u8c03\u7528\u201d\u3002\u5728 API \u8bf7\u6c42\u4e2d\u7684\u51fd\u6570\u8c03\u7528\u53c2\u6570\u73b0\u5728\u79f0\u4e3a\u201c\u5de5\u5177\u201d\u3002<\/li>\n<li><a href=\"https:\/\/arxiv.org\/abs\/2307.09702\">\u5f15\u5bfc\u751f\u6210<\/a>\uff1a\u4f7f LLM \u9075\u5faa\u7279\u5b9a\u89c4\u8303\u751f\u6210\u6587\u672c\uff0c\u4f8b\u5982\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Context-free_grammar\">\u4e0a\u4e0b\u6587\u65e0\u5173\u6587\u6cd5<\/a>\u3002<\/li>\n<li><a href=\"https:\/\/platform.openai.com\/docs\/actions\/introduction\">GPT \u64cd\u4f5c<\/a>\uff1aChatGPT \u57fa\u4e8e\u6307\u5b9a\u7684\u00a0<a href=\"https:\/\/swagger.io\/specification\/\">OpenAPI \u89c4\u8303<\/a>\u00a0\u4e2d\u7684\u7aef\u70b9\u548c\u53c2\u6570\u6765\u8c03\u7528\u64cd\u4f5c\uff08\u5373 API \u8c03\u7528\uff09\u3002\u4e0e\u79f0\u4e3a\u201c\u51fd\u6570\u8c03\u7528\u201d\u7684\u529f\u80fd\u4e0d\u540c\uff0c\u6b64\u529f\u80fd\u786e\u5b9e\u4f1a\u8c03\u7528\u6258\u7ba1\u5728 API \u670d\u52a1\u5668\u4e0a\u7684\u51fd\u6570\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u672f\u8bed\u53ef\u80fd\u5404\u6709\u4e0d\u540c\u542b\u4e49\uff0c\u56e0\u6b64\u6211\u5c06\u6b64\u5217\u8868\u547d\u540d\u4e3a \u201c\u7cbe\u9009 LLM JSON\u201d\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"_9\">\u6258\u7ba1\u6a21\u578b<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u63d0\u4f9b\u5546<\/th>\n<th>\u6a21\u578b<\/th>\n<th>\u94fe\u63a5<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/www.kdjingpai.com\/claudeanquanfubai\/\">Anthropic<\/a><\/td>\n<td>claude-3-opus-20240229claude-3-sonnet-20240229claude-3-haiku-20240307<\/td>\n<td><a href=\"https:\/\/docs.anthropic.com\/claude\/docs\/tool-use\">API \u6587\u6863<\/a><a href=\"https:\/\/docs.anthropic.com\/claude\/docs\/tool-use\">\u5b9a\u4ef7<\/a><\/td>\n<\/tr>\n<tr>\n<td>AnyScale<\/td>\n<td>Mistral-7B-Instruct-v0.1Mixtral-8x7B-Instruct-v0.1<\/td>\n<td><a href=\"https:\/\/docs.endpoints.anyscale.com\/text-generation\/function-calling\">\u51fd\u6570\u8c03\u7528<\/a><a href=\"https:\/\/docs.endpoints.anyscale.com\/text-generation\/json-mode\">JSON \u6a21\u5f0f<\/a><a href=\"https:\/\/docs.endpoints.anyscale.com\/pricing\/\">\u5b9a\u4ef7<\/a><a href=\"https:\/\/www.anyscale.com\/blog\/anyscale-endpoints-json-mode-and-function-calling-features\">\u516c\u544a (2023)<\/a><\/td>\n<\/tr>\n<tr>\n<td>Azure<\/td>\n<td>gpt-4gpt-4-turbogpt-35-turbomistral-large-latestmistral-large-2402<\/td>\n<td><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/ai-services\/openai\/how-to\/function-calling?tabs=python\">\u51fd\u6570\u8c03\u7528<\/a><a href=\"https:\/\/azure.microsoft.com\/en-us\/pricing\/details\/cognitive-services\/openai-service\/#pricing\">OpenAI \u5b9a\u4ef7<\/a><a href=\"https:\/\/azuremarketplace.microsoft.com\/en-us\/marketplace\/apps\/000-000.mistral-ai-large-offer?tab=PlansAndPrice\">Mistral \u5b9a\u4ef7<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.kdjingpai.com\/cohere\/\">Cohere<\/a><\/td>\n<td>Command-RCommand-R+<\/td>\n<td><a href=\"https:\/\/docs.cohere.com\/docs\/tool-use\">\u51fd\u6570\u8c03\u7528<\/a><a href=\"https:\/\/cohere.com\/pricing\">\u5b9a\u4ef7<\/a><a href=\"https:\/\/txt.cohere.com\/command-r\/\">Command-R (2024-03-11)<\/a><a href=\"https:\/\/txt.cohere.com\/command-r-plus-microsoft-azure\/\">Command-R+ (2024-04-04)<\/a><\/td>\n<\/tr>\n<tr>\n<td>Fireworks.ai<\/td>\n<td>firefunction-v1<\/td>\n<td><a href=\"https:\/\/readme.fireworks.ai\/docs\/function-calling\">\u51fd\u6570\u8c03\u7528<\/a><a href=\"https:\/\/readme.fireworks.ai\/docs\/structured-response-formatting\">JSON \u6a21\u5f0f<\/a><a href=\"https:\/\/readme.fireworks.ai\/docs\/structured-output-grammar-based\">\u6587\u6cd5\u6a21\u5f0f<\/a><a href=\"https:\/\/fireworks.ai\/pricing\">\u5b9a\u4ef7<\/a><a href=\"https:\/\/blog.fireworks.ai\/fireworks-raises-the-quality-bar-with-function-calling-model-and-api-release-e7f49d1e98e9\">\u516c\u544a (2023-12-20)<\/a><\/td>\n<\/tr>\n<tr>\n<td>Google<\/td>\n<td>gemini-1.0-pro<\/td>\n<td><a href=\"https:\/\/cloud.google.com\/vertex-ai\/docs\/generative-ai\/multimodal\/function-calling#rest\">\u51fd\u6570\u8c03\u7528<\/a><a href=\"https:\/\/ai.google.dev\/pricing?authuser=1\">\u5b9a\u4ef7<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.kdjingpai.com\/groqaidamoxingbai\/\">Groq<\/a><\/td>\n<td>llama2-70bmixtral-8x7bgemma-7b-it<\/td>\n<td><a href=\"https:\/\/console.groq.com\/docs\/tool-use\">\u51fd\u6570\u8c03\u7528<\/a><a href=\"https:\/\/wow.groq.com\/\">\u5b9a\u4ef7<\/a><\/td>\n<\/tr>\n<tr>\n<td>Hugging Face TGI<\/td>\n<td><a href=\"https:\/\/huggingface.co\/docs\/text-generation-inference\/supported_models\">\u591a\u4e2a\u5f00\u6e90\u6a21\u578b<\/a><\/td>\n<td><a href=\"https:\/\/huggingface.co\/docs\/text-generation-inference\/conceptual\/guidance#guidance\">\u6587\u6cd5\u3001JSON \u6a21\u5f0f\u3001\u51fd\u6570\u8c03\u7528\u548c\u5de5\u5177<\/a>\u5728\u672c\u5730<a href=\"https:\/\/huggingface.co\/docs\/text-generation-inference\/basic_tutorials\/consuming_tgi\">\u514d\u8d39\u4f7f\u7528<\/a>\uff0c\u6216\u901a\u8fc7<a href=\"https:\/\/huggingface.co\/docs\/inference-endpoints\/index\">\u4e13\u7528<\/a>\u6216<a href=\"https:\/\/huggingface.co\/docs\/api-inference\/index\">\u65e0\u670d\u52a1\u5668<\/a>\u00a0\u7aef\u70b9\u63d0\u4f9b\u670d\u52a1\u3002<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.kdjingpai.com\/le-chat-mistral\/\">Mistral<\/a><\/td>\n<td>mistral-large-latest<\/td>\n<td><a href=\"https:\/\/docs.mistral.ai\/guides\/function-calling\/\">\u51fd\u6570\u8c03\u7528<\/a><a href=\"https:\/\/docs.mistral.ai\/platform\/pricing\/\">\u5b9a\u4ef7<\/a><\/td>\n<\/tr>\n<tr>\n<td>OpenAI<\/td>\n<td>gpt-4gpt-4-turbogpt-35-turbo<\/td>\n<td><a href=\"https:\/\/openai.com\/blog\/openai-api\/\">\u51fd\u6570\u8c03\u7528<\/a><a href=\"https:\/\/platform.openai.com\/docs\/guides\/text-generation\/json-mode\">JSON \u6a21\u5f0f<\/a><a href=\"https:\/\/openai.com\/pricing\">\u5b9a\u4ef7<\/a><a href=\"https:\/\/openai.com\/blog\/function-calling-and-other-api-updates\">\u516c\u544a (2023-06-13)<\/a><\/td>\n<\/tr>\n<tr>\n<td>Rysana<\/td>\n<td>inversion-sm<\/td>\n<td><a href=\"https:\/\/rysana.com\/docs\/api\">API \u6587\u6863<\/a><a href=\"https:\/\/rysana.com\/pricing\">\u5b9a\u4ef7<\/a><a href=\"https:\/\/rysana.com\/inversion\">\u516c\u544a (2024-03-18)<\/a><\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/www.kdjingpai.com\/together\/\">Together<\/a> AI<\/td>\n<td>Mixtral-8x7B-Instruct-v0.1Mistral-7B-Instruct-v0.1CodeLlama-34b-Instruct<\/td>\n<td><a href=\"https:\/\/docs.together.ai\/docs\/function-calling\">\u51fd\u6570\u8c03\u7528<\/a><a href=\"https:\/\/docs.together.ai\/docs\/json-mode\">JSON \u6a21\u5f0f<\/a><a href=\"https:\/\/together.ai\/pricing\/\">\u5b9a\u4ef7<\/a><a href=\"https:\/\/www.together.ai\/blog\/function-calling-json-mode\">\u516c\u544a 2024-01-31<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u5e76\u884c\u51fd\u6570\u8c03\u7528<\/strong><\/p>\n<p>\u4ee5\u4e0b\u662f\u652f\u6301\u591a\u5e76\u884c\u529f\u80fd\u8c03\u7528\u7684\u6258\u7ba1 API \u6a21\u578b\u5217\u8868\u3002\u8fd9\u4e9b\u8c03\u7528\u53ef\u80fd\u5305\u62ec\u5728\u591a\u4e2a\u57ce\u5e02\u68c0\u67e5\u5929\u6c14\uff0c\u6216\u9996\u5148\u627e\u5230\u9152\u5e97\u4f4d\u7f6e\uff0c\u7136\u540e\u518d\u68c0\u67e5\u8be5\u4f4d\u7f6e\u7684\u5929\u6c14\u3002<\/p>\n<ul>\n<li>anthropic\n<ul>\n<li>claude-3-opus-20240229<\/li>\n<li>claude-3-sonnet-20240229<\/li>\n<li>claude-3-haiku-20240307<\/li>\n<\/ul>\n<\/li>\n<li>azure\/openai\n<ul>\n<li>gpt-4-turbo-preview<\/li>\n<li>gpt-4-1106-preview<\/li>\n<li>gpt-4-0125-preview<\/li>\n<li>gpt-3.5-turbo-1106<\/li>\n<li>gpt-3.5-turbo-0125<\/li>\n<\/ul>\n<\/li>\n<li>cohere\n<ul>\n<li>command-r<\/li>\n<\/ul>\n<\/li>\n<li>together_ai\n<ul>\n<li>Mixtral-8x7B-Instruct-v0.1<\/li>\n<li>Mistral-7B-Instruct-v0.1<\/li>\n<li>CodeLlama-34b-Instruct<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2 id=\"_14\">\u672c\u5730\u6a21\u578b<\/h2>\n<p><a href=\"https:\/\/huggingface.co\/mistralai\/Mistral-7B-Instruct-v0.3\">Mistral 7B Instruct v0.3<\/a>\u00a0\uff082024-05-22, Apache 2.0\uff09\u662f Mistral \u7684\u6307\u4ee4\u5fae\u8c03\u7248\u672c\uff0c\u589e\u52a0\u4e86\u529f\u80fd\u8c03\u7528\u652f\u6301\u3002<\/p>\n<p><a href=\"https:\/\/huggingface.co\/CohereForAI\/c4ai-command-r-plus\">C4AI Command R+<\/a>\u00a0\uff082024-03-20, CC-BY-NC, Cohere\uff09\u662f\u4e00\u4e2a104B\u53c2\u6570\u7684\u591a\u8bed\u8a00\u6a21\u578b\uff0c\u5177\u6709\u9ad8\u7ea7\u68c0\u7d22\u589e\u5f3a\u751f\u6210\uff08RAG\uff09\u548c\u5de5\u5177\u4f7f\u7528\u529f\u80fd\uff0c\u4f18\u5316\u4e8e10\u79cd\u8bed\u8a00\u7684\u63a8\u7406\u3001\u603b\u7ed3\u548c\u95ee\u7b54\u3002\u652f\u6301\u91cf\u5316\u4ee5\u63d0\u9ad8\u4f7f\u7528\u6548\u7387\uff0c\u5e76\u5c55\u793a\u4e86\u5728\u590d\u6742\u4efb\u52a1\u6267\u884c\u4e2d\u7684\u72ec\u7279\u591a\u6b65\u9aa4\u5de5\u5177\u96c6\u6210\u3002<\/p>\n<p><a href=\"https:\/\/huggingface.co\/NousResearch\/Hermes-2-Pro-Mistral-7B\">Hermes 2 Pro &#8211; Mistral 7B<\/a>\u00a0\uff082024-03-13, Nous Research\uff09\u662f\u4e00\u4e2a7B\u53c2\u6570\u6a21\u578b\uff0c\u64c5\u957f\u529f\u80fd\u8c03\u7528\u3001JSON\u7ed3\u6784\u5316\u8f93\u51fa\u548c\u901a\u7528\u4efb\u52a1\u3002\u57fa\u4e8e\u66f4\u65b0\u7684OpenHermes 2.5\u6570\u636e\u96c6\u548c\u65b0\u7684\u529f\u80fd\u8c03\u7528\u6570\u636e\u96c6\u8fdb\u884c\u8bad\u7ec3\uff0c\u4f7f\u7528\u7279\u6b8a\u7cfb\u7edf\u63d0\u793a\u548c\u591a\u8f6e\u7ed3\u6784\u3002\u5728\u529f\u80fd\u8c03\u7528\u548cJSON\u6a21\u5f0f\u8bc4\u4f30\u4e2d\u5206\u522b\u8fbe\u523091%\u548c84%\u7684\u51c6\u786e\u7387\u3002<\/p>\n<p><a href=\"https:\/\/gorilla.cs.berkeley.edu\/\/blogs\/7_open_functions_v2.html\">Gorilla OpenFunctions v2<\/a>\u00a0\uff082024-02-27, Apache 2.0\u8bb8\u53ef,\u00a0<a href=\"https:\/\/gorilla.cs.berkeley.edu\/\/blogs\/7_open_functions_v2.html\">Charlie Cheng-Jie Ji et al.<\/a>\uff09\u57fa\u4e8eJSON\u6a21\u5f0f\u5bf9\u8c61\u89e3\u91ca\u5e76\u6267\u884c\u529f\u80fd\uff0c\u652f\u6301\u591a\u79cd\u8bed\u8a00\u5e76\u80fd\u591f\u68c0\u6d4b\u529f\u80fd\u76f8\u5173\u6027\u3002<\/p>\n<p><a href=\"https:\/\/nexusflow.ai\/blogs\/ravenv2\">NexusRaven-V2<\/a>\u00a0\uff082023-12-05, Nexusflow\uff09\u662f\u4e00\u4e2a13B\u6a21\u578b\uff0c\u5728\u96f6\u6837\u672c\u529f\u80fd\u8c03\u7528\u4e0a\u6bd4GPT-4\u7684\u6027\u80fd\u9ad8\u8fbe7%\uff0c\u80fd\u591f\u6709\u6548\u5730\u4f7f\u7528\u8f6f\u4ef6\u5de5\u5177\u3002\u8fdb\u4e00\u6b65\u57fa\u4e8eCodeLlama-13B-instruct\u8fdb\u884c\u6307\u4ee4\u5fae\u8c03\u3002<\/p>\n<p><a href=\"https:\/\/functionary.meetkai.com\/\">Functionary<\/a>\u00a0\uff082023-08-04,\u00a0<a href=\"https:\/\/meetkai.com\/\">MeetKai<\/a>\uff09\u57fa\u4e8eJSON\u6a21\u5f0f\u5bf9\u8c61\u89e3\u91ca\u5e76\u6267\u884c\u529f\u80fd\uff0c\u652f\u6301\u591a\u79cd\u8ba1\u7b97\u9700\u6c42\u548c\u8c03\u7528\u7c7b\u578b\u3002\u517c\u5bb9OpenAI-python\u548cllama-cpp-python\uff0c\u7528\u4e8e\u9ad8\u6548\u6267\u884cJSON\u751f\u6210\u4efb\u52a1\u4e2d\u7684\u529f\u80fd\u8c03\u7528\u3002<\/p>\n<p><a href=\"https:\/\/huggingface.co\/docs\/text-generation-inference\/conceptual\/guidance\">Hugging Face TGI<\/a>\u00a0\u4e3a<a href=\"https:\/\/huggingface.co\/docs\/text-generation-inference\/supported_models\">\u591a\u79cd\u672c\u5730\u6a21\u578b<\/a>\u542f\u7528\u4e86JSON\u8f93\u51fa\u548c\u529f\u80fd\u8c03\u7528\u652f\u6301\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"_22\">Python \u5e93<\/h2>\n<p><a href=\"https:\/\/github.com\/stanfordnlp\/dspy\">DSPy<\/a>\u00a0(MIT) \u662f\u4e00\u4e2a\u6846\u67b6\uff0c\u7528\u4e8e\u7b97\u6cd5\u4f18\u5316\u8bed\u8a00\u6a21\u578b\uff08LM\uff09\u63d0\u793a\u548c\u6743\u91cd\u3002DSPy \u5f15\u5165\u4e86<a href=\"https:\/\/github.com\/entropy\/dspy\/blob\/main\/docs\/docs\/building-blocks\/8-typed_predictors.md\">\u7c7b\u578b\u9884\u6d4b\u5668\u548c\u7b7e\u540d<\/a>\uff0c\u901a\u8fc7\u4f7f\u7528\u00a0<a href=\"https:\/\/github.com\/pydantic\/pydantic\">Pydantic<\/a>\u00a0\u5f3a\u5236\u6267\u884c\u8f93\u5165\u548c\u8f93\u51fa\u7684\u7c7b\u578b\u7ea6\u675f\uff0c\u4ece\u800c\u6539\u8fdb\u4e86\u57fa\u4e8e\u5b57\u7b26\u4e32\u7684\u5b57\u6bb5\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/genomoncology\/FuzzTypes\">FuzzTypes<\/a>\u00a0(MIT) \u6269\u5c55\u4e86 Pydantic\uff0c\u63d0\u4f9b\u81ea\u52a8\u6821\u6b63\u6ce8\u89e3\u7c7b\u578b\u4ee5\u589e\u5f3a\u6570\u636e\u6807\u51c6\u5316\uff0c\u5e76\u5904\u7406\u590d\u6742\u7c7b\u578b\uff0c\u5982\u7535\u5b50\u90ae\u4ef6\u3001\u65e5\u671f\u548c\u81ea\u5b9a\u4e49\u5b9e\u4f53\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/guidance-ai\/guidance\">guidance<\/a>\u00a0(Apache-2.0) \u652f\u6301\u7ea6\u675f\u751f\u6210\uff0c\u5c06 Python \u903b\u8f91\u4e0e\u5927\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u8c03\u7528\u76f8\u7ed3\u5408\uff0c\u652f\u6301\u91cd\u7528\u51fd\u6570\u53ca\u8c03\u7528\u5916\u90e8\u5de5\u5177\uff0c\u4ece\u800c\u4f18\u5316\u63d0\u793a\u4ee5\u52a0\u901f\u751f\u6210\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/jxnl\/instructor\">Instructor<\/a>\u00a0(MIT) \u4f7f\u7528\u51fd\u6570\u8c03\u7528\u3001\u5de5\u5177\u8c03\u7528\u548c\u7ea6\u675f\u91c7\u6837\u6a21\u5f0f\u7b80\u5316\u4e86 LLM \u7684\u7ed3\u6784\u5316\u6570\u636e\u751f\u6210\u3002\u57fa\u4e8e Pydantic \u8fdb\u884c\u9a8c\u8bc1\uff0c\u5e76\u652f\u6301\u591a\u79cd LLM\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/langchain-ai\/langchain\">LangChain<\/a>\u00a0(MIT) \u63d0\u4f9b\u94fe\u63a5\u53e3\u3001\u4e0e\u5176\u4ed6\u5de5\u5177\u7684\u96c6\u6210\uff0c\u4ee5\u53ca\u7528\u4e8e\u5e94\u7528\u7a0b\u5e8f\u7684\u94fe\u3002LangChain \u63d0\u4f9b<a href=\"https:\/\/python.langchain.com\/docs\/modules\/chains\/how_to\/structured_outputs\">\u7ed3\u6784\u5316\u8f93\u51fa\u7684\u94fe<\/a>\u548c\u8de8\u6a21\u578b\u7684<a href=\"https:\/\/python.langchain.com\/docs\/modules\/model_io\/chat\/function_calling\">\u51fd\u6570\u8c03\u7528<\/a>\u652f\u6301\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/BerriAI\/litellm\">LiteLLM<\/a>\u00a0(MIT) \u7b80\u5316\u4e86\u4ee5 OpenAI \u683c\u5f0f\u8c03\u7528 100 \u591a\u79cd LLM\uff0c\u652f\u6301<a href=\"https:\/\/docs.litellm.ai\/docs\/completion\/function_call\">\u51fd\u6570\u8c03\u7528<\/a>\u3001\u5de5\u5177\u8c03\u7528\u548c JSON \u6a21\u5f0f\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/run-llama\/llama_index\">LlamaIndex<\/a>\u00a0(MIT) \u63d0\u4f9b\u4e0d\u540c\u62bd\u8c61\u7ea7\u522b\u7684<a href=\"https:\/\/docs.llamaindex.ai\/en\/stable\/module_guides\/querying\/structured_outputs\/structured_outputs.html\">\u7ed3\u6784\u5316\u8f93\u51fa\u6a21\u5757<\/a>\uff0c\u5305\u62ec\u6587\u672c\u8865\u5168\u7aef\u70b9\u7684\u8f93\u51fa\u89e3\u6790\u5668\u3001\u7528\u4e8e\u5c06\u63d0\u793a\u6620\u5c04\u5230\u7ed3\u6784\u5316\u8f93\u51fa\u7684\u00a0<a href=\"https:\/\/docs.llamaindex.ai\/en\/stable\/module_guides\/querying\/structured_outputs\/pydantic_program.html\">Pydantic \u7a0b\u5e8f<\/a>\uff0c\u4ee5\u53ca\u7279\u5b9a\u8f93\u51fa\u7c7b\u578b\u7684\u9884\u5b9a\u4e49 Pydantic \u7a0b\u5e8f\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/PrefectHQ\/marvin\">Marvin<\/a>\u00a0(Apache-2.0) \u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u5de5\u5177\u5305\uff0c\u7528\u4e8e\u6784\u5efa\u53ef\u9760\u7684\u81ea\u7136\u8bed\u8a00\u754c\u9762\uff0c\u5177\u5907\u5b9e\u4f53\u63d0\u53d6\u548c\u591a\u6a21\u6001\u652f\u6301\u7b49\u81ea\u6211\u8bb0\u5f55\u5de5\u5177\u3002<\/p>\n<p><a href=\"https:\/\/www.kdjingpai.com\/outlines\/\">Outlines<\/a>\u00a0(Apache-2.0) \u4f7f\u7528\u591a\u79cd\u6a21\u578b\u3001Jinja \u6a21\u677f\u4ee5\u53ca\u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\u3001JSON \u6a21\u5f0f\u3001Pydantic \u6a21\u578b\u548c\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\u751f\u6210\u7ed3\u6784\u5316\u6587\u672c\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/pydantic\/pydantic\">Pydantic<\/a>\u00a0(MIT) \u901a\u8fc7\u5b9a\u4e49\u6570\u636e\u6a21\u578b\u3001\u9a8c\u8bc1\u3001JSON \u6a21\u5f0f\u751f\u6210\u4ee5\u53ca\u65e0\u7f1d\u89e3\u6790\u4e0e\u5e8f\u5217\u5316\uff0c\u7b80\u5316\u4e86\u6570\u636e\u7ed3\u6784\u548c JSON \u7684\u4f7f\u7528\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/sgl-project\/sglang\">SGLang<\/a>\u00a0(MPL-2.0) \u5141\u8bb8\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6216 Pydantic \u6a21\u578b\u6307\u5b9a JSON \u6a21\u5f0f\u4ee5\u5b9e\u73b0\u7ea6\u675f\u89e3\u7801\u3002\u5176\u9ad8\u6027\u80fd\u8fd0\u884c\u65f6\u52a0\u901f\u4e86 JSON \u89e3\u7801\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/uiuc-focal-lab\/syncode\">SynCode<\/a>\u00a0(MIT) \u662f\u4e00\u4e2a\u7528\u4e8e\u8bed\u6cd5\u5f15\u5bfc\u751f\u6210\u5927\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u7684\u6846\u67b6\u3002\u5b83\u652f\u6301 Python\u3001Go\u3001Java\u3001JSON\u3001YAML \u7b49\u7684\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\uff08CFG\uff09\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/Mirascope\/mirascope\">Mirascope<\/a>\u00a0(MIT) \u662f\u4e00\u4e2a\u652f\u6301\u7ed3\u6784\u5316\u63d0\u53d6\u7684 LLM \u5de5\u5177\u5305\uff0c\u63d0\u4f9b\u76f4\u89c2\u7684 Python API\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/jackmpcollins\/magentic\">Magnetic<\/a>\u00a0(MIT) \u901a\u8fc7\u4e09\u884c\u4ee3\u7801\u5728 Python \u4e2d\u8c03\u7528 LLM\u3002\u53ea\u9700\u4f7f\u7528 @prompt \u88c5\u9970\u5668\u521b\u5efa\u8fd4\u56de\u7ed3\u6784\u5316\u8f93\u51fa\u7684 LLM \u51fd\u6570\uff0c\u5e76\u7531 Pydantic \u63d0\u4f9b\u652f\u6301\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/Dan-wanna-M\/formatron\">Formatron<\/a>\u00a0(MIT) \u662f\u4e00\u4e2a\u9ad8\u6548\u3001\u53ef\u6269\u5c55\u7684\u7ea6\u675f\u89e3\u7801\u5e93\uff0c\u652f\u6301\u4f7f\u7528 f \u5b57\u7b26\u4e32\u6a21\u677f\u63a7\u5236\u8bed\u8a00\u6a21\u578b\u8f93\u51fa\u683c\u5f0f\uff0c\u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\u3001JSON \u6a21\u5f0f\u548c Pydantic \u6a21\u578b\u3002Formatron \u65e0\u7f1d\u96c6\u6210\u4e86\u591a\u79cd\u6a21\u578b\u63a8\u7406\u5e93\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/epfl-dlab\/transformers-CFG\">Transformers-cfg<\/a>\u00a0(MIT) \u901a\u8fc7 EBNF \u63a5\u53e3\u5c06\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\uff08CFG\uff09\u652f\u6301\u6269\u5c55\u5230 Hugging Face Transformers\u3002\u5b83\u5b9e\u73b0\u4e86\u8bed\u6cd5\u7ea6\u675f\u751f\u6210\uff0c\u5bf9 Transformers \u4ee3\u7801\u7684\u66f4\u6539\u6700\u5c0f\uff0c\u5e76\u652f\u6301 JSON \u6a21\u5f0f\u548c JSON \u6a21\u5f0f\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"_39\">\u535a\u5ba2\u6587\u7ae0<\/h2>\n<p><a href=\"http:\/\/blog.dottxt.co\/how-fast-cfg.html\">\u8bed\u6cd5\u7ed3\u6784\u751f\u6210\u901f\u5ea6\u6709\u591a\u5feb\uff1f<\/a>\u00a0(2024-04-12, .txt Engineering) \u5c55\u793a\u4e86\u4e00\u79cd\u51e0\u4e4e\u96f6\u6210\u672c\u7684\u751f\u6210\u7b26\u5408\u8bed\u6cd5\u7684\u6587\u672c\u7684\u65b9\u6cd5\u3002\u5728 C \u8bed\u6cd5\u4e0a\uff0c\u5b83\u7684\u6027\u80fd\u4f18\u4e8e\u00a0<code><a href=\"https:\/\/www.kdjingpai.com\/llamacpp\/\">llama.cpp<\/a><\/code>\u00a0\u8fbe 50 \u500d\u3002<\/p>\n<p><a href=\"https:\/\/blog.dottxt.co\/performance-gsm8k.html\">\u7ed3\u6784\u5316\u751f\u6210\u63d0\u5347 LLM \u6027\u80fd\uff1aGSM8K \u57fa\u51c6\u6d4b\u8bd5<\/a>\u00a0(2024-03-15, .txt Engineering) \u5c55\u793a\u4e86\u5728 8 \u4e2a\u6a21\u578b\u4e0a\u7684\u4e00\u81f4\u6027\u63d0\u5347\uff0c\u5f3a\u8c03\u4e86\u201c\u63d0\u793a\u4e00\u81f4\u6027\u201d\u548c\u201c\u601d\u7ef4\u63a7\u5236\u201d\u7b49\u4f18\u70b9\u3002<\/p>\n<p><a href=\"https:\/\/predibase.com\/blog\/lorax-outlines-better-json-extraction-with-structured-generation-and-lora\">LoRAX + Outlines\uff1a\u901a\u8fc7\u7ed3\u6784\u5316\u751f\u6210\u548c LoRA \u5b9e\u73b0\u66f4\u597d\u7684 JSON \u63d0\u53d6<\/a>\u00a0(2024-03-03, Predibase Blog) \u5c06 <a href=\"https:\/\/www.kdjingpai.com\/outlines\/\">Outlines<\/a> \u4e0e LoRAX v0.8 \u7ed3\u5408\uff0c\u901a\u8fc7\u7ed3\u6784\u5316\u751f\u6210\u3001\u5fae\u8c03\u548c LoRA \u9002\u914d\u5668\u63d0\u5347\u63d0\u53d6\u51c6\u786e\u6027\u548c\u6a21\u5f0f\u5b8c\u6574\u6027\u3002<\/p>\n<p><a href=\"https:\/\/hamel.dev\/blog\/posts\/prompt\/\">FU\uff0c\u5feb\u901f\u4e86\u89e3\u96be\u4ee5\u7406\u89e3\u7684 LLM \u6846\u67b6\u63d0\u793a\u3002<\/a>\u00a0(2023-02-14, Hamel Husain) \u63d0\u4f9b\u4e86\u4f7f\u7528 mitmproxy \u622a\u83b7 API \u8c03\u7528\u7684\u5b9e\u8df5\u6307\u5357\uff0c\u4ee5\u4fbf\u4e86\u89e3\u5de5\u5177\u529f\u80fd\u5e76\u8bc4\u4f30\u5176\u5fc5\u8981\u6027\u3002\u5f3a\u8c03\u51cf\u5c11\u590d\u6742\u6027\u5e76\u4e0e\u5e95\u5c42 LLM \u7d27\u5bc6\u7ed3\u5408\u3002<\/p>\n<p><a href=\"https:\/\/blog.dottxt.co\/coalescence.html\">Coalescence\uff1a\u4f7f LLM \u63a8\u7406\u901f\u5ea6\u63d0\u5347 5 \u500d<\/a>\u00a0(2024-02-02, .txt Engineering) \u5c55\u793a\u4e86\u4f7f\u7528\u201c\u805a\u5408\u201d\u6280\u672f\u6765\u52a0\u901f\u7ed3\u6784\u5316\u751f\u6210\uff0c\u76f8\u8f83\u4e8e\u975e\u7ed3\u6784\u5316\u751f\u6210\u901f\u5ea6\u66f4\u5feb\uff0c\u4f46\u53ef\u80fd\u5f71\u54cd\u751f\u6210\u8d28\u91cf\u3002<\/p>\n<p><a href=\"https:\/\/www.factsmachine.ai\/p\/how-pydantic-became-indispensable\">\u4e3a\u4ec0\u4e48 Pydantic \u5bf9 LLMs \u4e0d\u53ef\u6216\u7f3a<\/a>\u00a0(2024-01-19,\u00a0<a href=\"https:\/\/twitter.com\/aaazzam\">Adam Azzam<\/a>) \u89e3\u91ca\u4e86 Pydantic \u4f5c\u4e3a\u5173\u952e\u5de5\u5177\u7684\u51fa\u73b0\uff0c\u4f7f\u5f97\u53ef\u4ee5\u901a\u8fc7 JSON \u6a21\u5f0f\u5171\u4eab\u6570\u636e\u6a21\u578b\uff0c\u5e76\u5b9e\u73b0\u65e0\u7ed3\u6784\u6570\u636e\u548c\u7ed3\u6784\u5316\u6570\u636e\u4e4b\u95f4\u7684\u63a8\u7406\u3002\u5f3a\u8c03\u4e86\u91cf\u5316\u51b3\u7b56\u7a7a\u95f4\u7684\u91cd\u8981\u6027\uff0c\u4ee5\u53ca LLM \u5728\u65e7\u6a21\u5f0f\u7248\u672c\u4e0a\u8fc7\u62df\u5408\u7684\u6f5c\u5728\u95ee\u9898\u3002<\/p>\n<p><a href=\"https:\/\/www.promptingguide.ai\/applications\/function_calling\">\u51fd\u6570\u8c03\u7528\u5165\u95e8<\/a>\u00a0(2024-01-11, Elvis Saravia) \u4ecb\u7ecd\u4e86\u51fd\u6570\u8c03\u7528\uff0c\u7528\u4e8e\u5c06 LLMs \u8fde\u63a5\u5230\u5916\u90e8\u5de5\u5177\u548c API\uff0c\u63d0\u4f9b\u4e86\u4f7f\u7528 OpenAI API \u7684\u793a\u4f8b\uff0c\u5e76\u5f3a\u8c03\u4e86\u6f5c\u5728\u5e94\u7528\u3002<\/p>\n<p><a href=\"https:\/\/minimaxir.com\/2023\/12\/chatgpt-structured-data\/\">\u5c06 ChatGPT \u7684\u7ed3\u6784\u5316\u6570\u636e\u652f\u6301\u63a8\u5411\u6781\u9650<\/a>\u00a0(2023-12-21, Max Woolf) \u63a2\u8ba8\u4e86\u4f7f\u7528\u4ed8\u8d39 API\u3001JSON \u6a21\u5f0f\u548c Pydantic \u5145\u5206\u5229\u7528 <a href=\"https:\/\/www.kdjingpai.com\/chatgpt-6\/\">ChatGPT<\/a> \u529f\u80fd\u7684\u65b9\u6cd5\u3002\u4ecb\u7ecd\u4e86\u63d0\u5347\u8f93\u51fa\u8d28\u91cf\u7684\u6280\u5de7\u4ee5\u53ca\u7ed3\u6784\u5316\u6570\u636e\u652f\u6301\u7684\u4f18\u70b9\u3002<\/p>\n<p><a href=\"https:\/\/jxnl.github.io\/instructor\/why\/\">\u4e3a\u4ec0\u4e48\u9009\u62e9 Instructor\uff1f<\/a>\u00a0(2023-11-18, Jason Liu) \u89e3\u91ca\u4e86\u8be5\u5e93\u7684\u4f18\u52bf\uff0c\u63d0\u4f9b\u4e86\u6613\u8bfb\u7684\u65b9\u5f0f\u3001\u5bf9\u90e8\u5206\u63d0\u53d6\u548c\u5404\u79cd\u7c7b\u578b\u7684\u652f\u6301\u4ee5\u53ca\u81ea\u6211\u6821\u6b63\u673a\u5236\u3002\u63a8\u8350\u4e86 <a href=\"https:\/\/www.kdjingpai.com\/instructor\/\">Instructor<\/a> \u7f51\u7ad9\u4e0a\u7684\u5176\u4ed6\u8d44\u6e90\u3002<\/p>\n<p><a href=\"https:\/\/www.imaurer.com\/llama-cpp-grammars\/\">\u4f7f\u7528\u8bed\u6cd5\u7ea6\u675f llama.cpp \u7684\u8f93\u51fa<\/a>\u00a0(2023-09-06, Ian Maurer) \u7ed3\u5408\u4e0a\u4e0b\u6587\u65e0\u5173\u8bed\u6cd5\u4ee5\u589e\u5f3a llama.cpp \u7684\u8f93\u51fa\u7cbe\u5ea6\uff0c\u5c24\u5176\u9002\u7528\u4e8e\u751f\u7269\u533b\u5b66\u6570\u636e\u3002<\/p>\n<p><a href=\"https:\/\/til.simonwillison.net\/gpt3\/openai-python-functions-data-extraction\">\u4f7f\u7528 OpenAI \u51fd\u6570\u53ca\u5176 Python \u5e93\u8fdb\u884c\u6570\u636e\u63d0\u53d6<\/a>\u00a0(2023-07-09, Simon Willison) \u6f14\u793a\u4e86\u901a\u8fc7 OpenAI Python \u5e93\u548c\u51fd\u6570\u8c03\u7528\u5728\u5355\u4e2a API \u8c03\u7528\u4e2d\u63d0\u53d6\u7ed3\u6784\u5316\u6570\u636e\uff0c\u5e76\u63d0\u4f9b\u4e86\u4ee3\u7801\u793a\u4f8b\u53ca\u5904\u7406\u6d41\u9650\u5236\u7684\u5efa\u8bae\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"_51\">\u89c6\u9891<\/h2>\n<p><iframe class=\"iframe__video\" src=\"https:\/\/www.youtube.com\/embed\/g3NtJatmQR0\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>\uff082024-04-09\uff0cSimon Willison\uff09\u5c55\u793a\u4e86 datasette-extract \u63d2\u4ef6\u5982\u4f55\u901a\u8fc7 GPT-4 Turbo \u7684 API\uff0c\u4ece\u975e\u7ed3\u6784\u5316\u6587\u672c\u548c\u56fe\u50cf\u4e2d\u63d0\u53d6\u6570\u636e\u5e76\u586b\u5145\u6570\u636e\u5e93\u8868\u683c\u3002<\/p>\n<p><iframe class=\"iframe__video\" src=\"https:\/\/www.youtube.com\/embed\/_-FrUReljTQ\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>\uff082024-03-25\uff0cAndrej Baranovskij\uff09\u6f14\u793a\u4e86\u57fa\u4e8e\u51fd\u6570\u8c03\u7528\u7684\u6570\u636e\u63d0\u53d6\uff0c\u4f7f\u7528 Ollama\u3001Instructor \u548c\u00a0<a href=\"https:\/\/github.com\/katanaml\/sparrow\">Sparrow agent<\/a>\u00a0\u3002<\/p>\n<p><iframe class=\"iframe__video\" src=\"https:\/\/www.youtube.com\/embed\/ViXURxck-HM\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>\uff082024-03-18\uff0cPrompt Engineer\uff09\u4ecb\u7ecd\u4e86 Hermes 2 Pro\uff0c\u8fd9\u662f\u4e00\u79cd\u5177\u6709 70 \u4ebf\u53c2\u6570\u7684\u6a21\u578b\uff0c\u64c5\u957f\u51fd\u6570\u8c03\u7528\u548c\u751f\u6210\u7ed3\u6784\u5316 JSON \u8f93\u51fa\u3002\u5728\u51fd\u6570\u8c03\u7528\u65b9\u9762\u5c55\u793a\u4e86 90% \u7684\u51c6\u786e\u7387\uff0cJSON \u6a21\u5f0f\u4e0b\u4e3a 84%\uff0c\u6027\u80fd\u4f18\u4e8e\u5176\u4ed6\u6a21\u578b\u3002<\/p>\n<p><iframe class=\"iframe__video\" src=\"https:\/\/www.youtube.com\/embed\/eOo4GfHj3ZE\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>\uff082024-02-24\uff0cSophia Yang\uff09\u5c55\u793a\u4e86\u5c06\u5927\u8bed\u8a00\u6a21\u578b\u8fde\u63a5\u5230\u5916\u90e8\u5de5\u5177\u3001\u751f\u6210\u51fd\u6570\u53c2\u6570\u5e76\u6267\u884c\u51fd\u6570\u3002\u53ef\u8fdb\u4e00\u6b65\u6269\u5c55\u4e3a\u751f\u6210\u6216\u64cd\u4f5c JSON \u6570\u636e\u3002<\/p>\n<p><iframe class=\"iframe__video\" src=\"https:\/\/www.youtube.com\/embed\/RXDWkiuXtG0\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>\uff082024-02-13\uff0c<a href=\"https:\/\/twitter.com\/Technovangelist\">Matt Williams<\/a>\uff09\u9610\u660e\u4e86\u6a21\u578b\u751f\u6210\u7684\u7ed3\u6784\u5316\u8f93\u51fa\u7528\u4e8e\u89e3\u6790\u548c\u8c03\u7528\u51fd\u6570\u3002\u6bd4\u8f83\u4e86\u5b9e\u73b0\u65b9\u5f0f\uff0c\u5f3a\u8c03 <a href=\"https:\/\/www.kdjingpai.com\/ollama\/\">Ollama<\/a> \u7684\u65b9\u6cd5\u66f4\u7b80\u6d01\uff0c\u5e76\u4f7f\u7528\u5c11\u91cf\u793a\u4f8b\u63d0\u793a\u4fdd\u6301\u4e00\u81f4\u6027\u3002<\/p>\n<p><iframe class=\"iframe__video\" src=\"https:\/\/www.youtube.com\/embed\/1xUeL63ymM0\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>\uff082024-02-12\uff0c<a href=\"https:\/\/twitter.com\/jxnlco\">Jason Liu<\/a>\uff0c<a href=\"https:\/\/www.wandb.courses\/\">Weights &amp; Biases \u8bfe\u7a0b<\/a>\uff09\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u660e\u8bfe\u7a0b\uff0c\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528 Pydantic \u5904\u7406\u7ed3\u6784\u5316 JSON \u8f93\u51fa\u3001\u51fd\u6570\u8c03\u7528\u548c\u9a8c\u8bc1\uff0c\u6db5\u76d6\u4e86\u6784\u5efa\u7a33\u5065\u7ba1\u9053\u548c\u9ad8\u6548\u751f\u4ea7\u96c6\u6210\u7684\u8981\u70b9\u3002<\/p>\n<p><iframe class=\"iframe__video\" src=\"https:\/\/www.youtube.com\/embed\/yj-wSRJwrrc\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p>\uff082023-10-10\uff0c<a href=\"https:\/\/twitter.com\/jxnlco\">Jason Liu<\/a>\uff0c<a href=\"https:\/\/www.ai.engineer\/\">AI Engineer Conference<\/a>\uff09\u8ba8\u8bba\u4e86 Pydantic \u5728\u7ed3\u6784\u5316\u63d0\u793a\u548c\u8f93\u51fa\u9a8c\u8bc1\u4e2d\u7684\u91cd\u8981\u6027\uff0c\u4ecb\u7ecd\u4e86 Instructor \u5e93\uff0c\u5e76\u5c55\u793a\u4e86\u53ef\u9760\u548c\u53ef\u7ef4\u62a4\u7684 LLM \u5e94\u7528\u7684\u9ad8\u7ea7\u5e94\u7528\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"_59\">Jupyter Notebooks<\/h2>\n<p><a href=\"https:\/\/github.com\/abetlen\/llama-cpp-python\/blob\/main\/examples\/notebooks\/Functions.ipynb\">\u4f7f\u7528 llama-cpp-python \u548c OpenAI Python \u5ba2\u6237\u7aef\u8fdb\u884c\u51fd\u6570\u8c03\u7528<\/a>\u00a0\u5c55\u793a\u4e86\u96c6\u6210\uff0c\u5305\u62ec\u4f7f\u7528 Instructor \u5e93\u7684\u8bbe\u7f6e\uff0c\u5e76\u63d0\u4f9b\u4e86\u83b7\u53d6\u5929\u6c14\u4fe1\u606f\u548c\u63d0\u53d6\u7528\u6237\u8be6\u7ec6\u4fe1\u606f\u7684\u793a\u4f8b\u3002<\/p>\n<p><a href=\"https:\/\/colab.research.google.com\/github\/mistralai\/cookbook\/blob\/main\/function_calling.ipynb\">\u4f7f\u7528 Mistral \u6a21\u578b\u8fdb\u884c\u51fd\u6570\u8c03\u7528<\/a>\u00a0\u5c55\u793a\u4e86\u901a\u8fc7\u4e00\u4e2a\u6d89\u53ca\u652f\u4ed8\u4ea4\u6613\u6570\u636e\u6846\u7684\u7b80\u5355\u793a\u4f8b\uff0c\u5c06 Mistral \u6a21\u578b\u8fde\u63a5\u5230\u5916\u90e8\u5de5\u5177\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/minimaxir\/chatgpt-structured-data\">chatgpt-structured-data<\/a>\u00a0\u7531\u00a0<a href=\"https:\/\/twitter.com\/minimaxir\">Max Woolf<\/a>\u00a0\u63d0\u4f9b\uff0c\u5c55\u793a\u4e86 ChatGPT \u7684\u51fd\u6570\u8c03\u7528\u548c\u7ed3\u6784\u5316\u6570\u636e\u652f\u6301\uff0c\u6db5\u76d6\u4e86\u5404\u79cd\u7528\u4f8b\u548c\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<h2 id=\"_63\">\u6392\u884c\u699c<\/h2>\n<p><a href=\"https:\/\/gorilla.cs.berkeley.edu\/blogs\/8_berkeley_function_calling_leaderboard.html\">\u4f2f\u514b\u5229\u51fd\u6570\u8c03\u7528\u6392\u884c\u699c\uff08BFCL\uff09<\/a>\u00a0\u662f\u4e00\u4e2a\u8bc4\u4f30\u6846\u67b6\uff0c\u7528\u4e8e\u6d4b\u8bd5 LLM \u7684\u51fd\u6570\u8c03\u7528\u80fd\u529b\uff0c\u5305\u62ec 2000 \u591a\u4e2a\u95ee\u9898-\u51fd\u6570-\u7b54\u6848\u914d\u5bf9\uff0c\u6db5\u76d6 Python\u3001Java\u3001JavaScript\u3001SQL \u548c REST API \u7b49\u8bed\u8a00\uff0c\u4fa7\u91cd\u4e8e\u7b80\u5355\u3001\u591a\u91cd\u548c\u5e76\u884c\u51fd\u6570\u8c03\u7528\uff0c\u4ee5\u53ca\u51fd\u6570\u76f8\u5173\u6027\u68c0\u6d4b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6b64\u7cbe\u9009\u5217\u8868\u4e13\u6ce8\u4e8e\u4f7f\u7528\u5927\u8bed\u8a00\u6a21\u578b\uff08LLM\uff09\u751f\u6210 JSON \u6216\u5176\u4ed6\u7ed3\u6784\u5316\u8f93\u51fa\u7684\u76f8\u5173\u8d44\u6e90\u3002 \u901a\u8fc7\u51fd\u6570\u8c03\u7528\u3001\u5de5\u5177\u3001CFG \u7b49\u65b9\u5f0f\u4f7f\u7528 LLM \u751f\u6210 JSON \u7684\u8d44\u6e90\u5217\u8868\uff0c\u6db5\u76d6\u5e93\u3001\u6a21\u578b\u3001Notebooks \u7b49\u3002 &nbsp; \u76ee\u5f55 \u672f\u8bed \u6258\u7ba1\u6a21\u578b \u672c&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-13357","post","type-post","status-publish","format-standard","hentry","category-knowledge"],"_links":{"self":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/13357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/comments?post=13357"}],"version-history":[{"count":0,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/posts\/13357\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/media?parent=13357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/categories?post=13357"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kdjingpai.com\/de\/wp-json\/wp\/v2\/tags?post=13357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}