ããã«ã¡ã¯ãGunosy R&D ãã¼ã ã®æ£®ç°ã§ãã
GPT-4o ãçºè¡¨ããããã®ã¿ã¤ãã³ã°ã§ï¼ï¼ã¨ããåãããããã¨ãããã¾ãããLLMã®ä¸çã¯ä¸ã¶æãããã°ã¾ã£ããéãç¶æ³ã«ãªã£ã¦ããã®ã常ãªã®ã§ãããã㯠GPT-4o ãè¶ ããã¢ãã«ãçºè¡¨ãããæãæ¥ãã§ãããã Claude 3 Opus ã¯ä¸ææ GPT-4 ã®ã¹ã³ã¢ãè¶ ãã Claude 3 Haiku ã§ã¯ GPT-3.5-Turbo ã®ãã¼ã¯ã³å½ããã§ç´åé¡ã¨ã³ã¹ãããã©ã¼ãã³ã¹ã«åªãã¦ãã¾ããã AWS Bedrock çµç±ã§å®å®ãã¦å©ç¨ã§ãããã¨ããããClaude 3 ã¯ä¹ãæãå ã®åè£ã®ä¸ã¤ã§ãã
Claude 3 ã¸ã®ä¹ãæãã«ã¯ãç¹ã ã¨ã¤ã¾ã¥ããã¤ã³ããããã®ã§ãå¼ã£ããã£ãæã¨åé¿æ¹æ³ããç´¹ä»ãã¾ãã ä»åç´¹ä»ããå 容ã¯Claude 3ã«éããªããã®ãããã¾ãã®ã§ããã¼ã«ã«LLM ãä»ã®LLM ã¸ã®ä¹ãæãã§ãåèã«ãªããã¨æãã¾ãã
- Claude 3 ã®ç´¹ä»
- GPT ããä¹ãæããæã®ã¤ã¾ã¥ããã¤ã³ã
- çãå¼·ã Claude 3 ã®åºå
- JSON ã¢ã¼ãé対å¿ã¸ã®å¯¾ç
- ã¾ã¨ã
Claude 3 ã®ç´¹ä»
Claude 3 㯠Anthropic ã 2024å¹´3æã«æä¾ãéå§ããæ¯è¼çæ°ãã LLM ã§ããGPT-3.5 ã GPT-4 ã¨æ¯ã¹ãå ´åã«ç¹ã«ã¦ãªã¨ãªãã®ã¯ä»¥ä¸ã®ï¼ç¹ãã¨æãã¾ãã
ã³ã¹ãããã©ã¼ãã³ã¹
ç¹ã« Haiku ã§ã¯ GPT-3.5-Turbo ã¨æ¯ã¹ã¦ãåé¡ç¨åº¦ã®è¨å®ã«ãªã£ã¦ãããLlama 3 (8B) ãããå ¥åã³ã¹ãã¯ä¸ã¨ãªãã¾ããLLM ã³ã¹ããåæ¸ãããå ´åã«ã¯ããªãé åçãªä¾¡æ ¼ã§ãã
Model | Price per 1,000 input tokens | Price per 1,000 output tokens |
---|---|---|
Mistral 7B | 0.00015 USD | 0.0002 USD |
Claude 3Â Haiku | 0.00025 USD | 0.00125 USD |
Llama 3 Instruct (8B) | 0.0004 USD | 0.0006 USD |
gpt-3.5-Turbo | 0.0005 USD | 0.0015 USD |
Command R | 0.0005 USD | 0.0015 USD |
Claude 3Â Sonnet | 0.003 USD | 0.015 USD |
gpt-4o-2024-05-13 | 0.005 USD | 0.015 USD |
Claude 3Â Opus | 0.015 USD | 0.075 USD |
(åºå ¸: Amazon Bedrock ã®æéãPricing| OpenAI )
Vision ã¸ã®å¯¾å¿
å®ä¾¡ãªããã vision ã«å¯¾å¿ãã¦ãããããæ°è»½ã«ç»åãå ¥åã¨ãã¦æ±ããã¨ãã§ãã¾ãã æ¡ä»¶ã«ãããã¾ãããç»å 1æãããç´ 200 token ç¨åº¦ (ç´ $0.00005) ã®æç®ã«ãªããã»ã¼ã³ã¹ããæ°ã«ãããã¨ç¡ã使ãã¾ãã
ã³ã³ãã¯ã¹ãé·ãé·ã
200k ãã¼ã¯ã³ã¾ã§åãä»ãããã¨ãã§ãããããé常ã®ä½¿ãæ¹ã§ã¯ã¾ãä¸è¶³ãããã¨ã¯ãªãã§ãããã æè¿ã®LLM ã¯ã©ããåãä»ããã³ã³ãã¯ã¹ãé·ã¯é·ããªã£ã¦ãã¦ãã¾ãããä»ã®ã¨ããå®ç¨å¯è½ãªã¢ãã«ã®ä¸ã§ã¯æé·ã§ãã
GPT ããä¹ãæããæã®ã¤ã¾ã¥ããã¤ã³ã
ããã³ããã®æ¸ãæ¹
GPTããã®ä¹ãæãã§ä¸»ã«èããå¿ è¦ãããã®ã¯ãXMLã¿ã°ã使ããã¨ã¨ãPrefill ã¨å¼ã°ããåçå½¢å¼ãå¼·å¶ããããã¯ããã¯ã§ããGPTã®ããã³ãããã®ã¾ã¾ã§ã¯ãç¹ã«åºåã®å¶å¾¡ãé£ãããªãã¾ãã
XMLã¿ã°ã§æ§é ãæ示ãã
GPT ã§ã¯ãããã人ãåããããããã©ã¼ãããã§ããã°ããã¼ã¯ãã¦ã³ãã¿ã°ãç« ç«ã¦ããæã¦ã¯ Lisp å½¢å¼ã¾ã§ããªãèªç±åº¦ãé«ãè¨è¿°ãã§ãã¾ãããClaude 3 ã§ã¯ããã©ã¼ãããã¨ã㦠xml ã®ã¿ãæ¨å¥¨ããã¦ãã¾ãã
XML ã¨ãã£ã¦ãã<?xml version="1.0" encoding="UTF-8" ?>
ããå§ãããããªå³å¯ãªãã©ã¼ããããããããã§ã¯ãªããã¿ã°åãããããã決ã¾ã£ããã®ã¯ããã¾ããã
<instruction>
ã <input>
ãªã©ä¸èº«ãä½ããèªãã§åããã¿ã°åãèãã¦å©ç¨ãããã¨ãã§ãã¾ãã
ã¿ã°ã®ãã¹ãã«ã対å¿ãã¦ããã¾ããããã¼ãµã¨éã£ã¦æ·±ããã¹ã㯠LLM ã§ã¯æ±ãã«ããããã§ããå
¬å¼ããã¥ã¡ã³ãã«ããã¨ããããã 5 é層ã¾ã§ãç®å®ã¨ããã¦ãã¾ãã
ã¾ãããã³ãã¬ã¼ãããã©ã¼ãããã®æå®ãªã©ã§ãã©ãã«ã©ããªå
容ãå
¥åã»åºåãããããæå®ããå ´åã«ã¯ {{VARIABLE}}
ã®ãããªäºéãã©ã±ããã§å
容ãæå®ãããã¬ã¼ã¹ãã«ããã¤ãããã¨ãã§ãã¾ãã
XMLã¿ã°ã使ã£ãããã³ããã®ä¾
User:
<instruction> ã¤ãã® doc ããã人åãæ½åºãã <name></name> ã¿ã°ã§å²ã㧠output format ã«å¾ãåºåãã¦ãã ãã </instruction> <output format> <xml> <name>{{PERSON NAME}}</name> <name>{{PERSON NAME}}</name> </xml> </output format> <doc> è±èªåã§ï¼ã¸ã§ã³ã»ã¹ãã¹ (John Smith) ã¯æ¶ç©ºã®å称ã¨ãã¦ä½¿ããã¾ãï¼ </doc>
Assistant:
<xml> <name>ã¸ã§ã³ã»ã¹ãã¹</name> <name>John Smith</name> </xml>
Prefill ã§åçå½¢å¼ãåºå®ãã
æè¿ã® GPT ã§ã¯åºåãã©ã¼ããããæå®ããã¨ããªãç´ ç´ã«å¾ã£ã¦ãããã®ã§ãããClaude 3 ã¯ã¾ã ãããã馬æãå¼·ãããã§ãã ç¹ã«ãåçãé£ããå ´åã«ãæå®ãããã©ã¼ãããã«å ãã¦ä¸è¨ã³ã¡ã³ãã追å ãã¦ãã¾ããã¨ãå¤ã観測ããã¾ãã ä¾ãã°ãå ç¨ã®ä¾ã§ doc ã¨ãã¦äººåã®å«ã¾ãã¦ããªãæç« ã渡ãã¨ããã©ã¼ããããç¡è¦ãã¦ã人åãå«ã¾ãã¦ãã¾ãããã®ãããªã³ã¡ã³ããè¿ãã¦ãã¾ããã¨ãããã¾ãã ãããã£ãå ´åããåºåãXMLã¿ã°ã«å²ã¾ãã¦ããã°ããç¨åº¦ã³ã¡ã³ãã¨ããã§ãªãé¨åãåãã¦ãªã«ããªã¯ãããããã®ã®ãç¡é§ãªåºåã¯é¿ãããã§ãããäºæãã¬ã¡ãã»ã¼ã¸ã¯ã¨ã©ã¼ã®åå ã«ããªãã¾ãã
Prefill 㯠LLM ã«ãã©ã¼ããããããç¨åº¦å¼·å¶ãããããã®ãã¯ããã¯ã®ï¼ã¤ã§ãLLM ãåºåããåºã ãããããããæå®ãã¦ããæ¹æ³ã§ãã
Claude 3 ã¸ããã³ããã渡ãéã«ã¯ãã¡ãã»ã¼ã¸ã®ãã¼ã«ãæå®ãããã¨ãã§ãã¾ãã ãã¼ã«ã¯é常㮠user ã®ã»ãã«ãsystemã¨ãã¦åºåã«ã¯å«ããããªãæ å ±ã®ä»ãLLMèªèº«ã®åºåã表ã assistant ãæå®ãããã¨ãã§ãã¾ãï¼ããã¯GPT ã§ãåæ§ï¼ã prefill ã¯ãããã³ããã®æ«å°¾ã«åºåã®å é é¨åã assistant ããã¼ã«ã¨ãã¦å«ãã¾ãã
prefill ã®ä¾
Claude 3 ã¸ã®å ¥å
user: <instruction>ã¤ãã® doc ããã人åãæ½åºãâ¦â¦</instruction> assistant: <xml>
Claude 3 ããã®åºå
assistant: <name>...</name> </xml>
Claude 3 ã«åºåããããã<xml>
ã¿ã°ã®å
é ããããããæå®ãã¦ãããã¨ã§ãxml ãå¿
ãåºåãããããã«å¼·å¶ãã¦ãã¾ããå
é ã® <xml>
ã¿ã°ã¯å
¥åå´ã«å«ãããããåºåã«ã¯å«ã¾ããªããã¨ã«æ³¨æãå¿
è¦ã§ãï¼ãã¼ã¹ã®éã¯èªåã§è£ãå¿
è¦ãããã¾ãï¼ã
Prefill ã使ã£ãã¨ãã¦ãã確信度ãä½ãå ´åã« </xml>
ã®å¾ã«ã³ã¡ã³ããã¦ãã¾ããªã©ãä½åãªåºåãåºãã¦ãã¾ããã¨ã¯ä¾ç¶ã¨ãã¦æ®ãããã</xml>
ã¿ã°ä»¥éãåé¤ãããªã©ãå¾å¦çèªä½ã¯å¿
è¦ã¨ãªããã¨ã«æ³¨æãã¦ãã ããã
çãå¼·ã Claude 3 ã®åºå
JSON ã¢ã¼ãé対å¿
Claude 3 èªä½ã¯ JSON ãåºåããããã¨ãã§ãããã®ã®ãBedrock çµç±ã§å©ç¨ããå ´åã«ã¯ãå¿ ããã¼ã¹ã§ãã JSON ãè¿ãããå¼·å¶ããæ¹æ³ã¯ä»ã®ã¨ããããã¾ãããAnthropic ã® API ãç´æ¥ä½¿ãå ´åã«ã¯ã tool use ã®æ©è½ã使ããã¨ã§ï¼ä»®æ³ã®APIã¸ã®å ¥åã¨ãã¦ï¼ãã¼ã¹ã§ããJSONãå¼·å¶ããããã¨ãã§ãã¾ãããæ®å¿µãªãã bedrock ã§ã¯æªå®è£ ã§ãï¼åè: https://docs.anthropic.com/claude/docs/legacy-tool-use#when-will-the-new-tool-use-format-come-to-vertex-ai-or-amazon-bedrockï¼ ã
対çã¯å¾è¿°ãã¾ãã
æåã®æ£è¦å
å°å³ã«åä»ãªä»æ§ã§ãClaude 3 ã¯äºå®ä¸ä¸é¨ã®æåãåºåã§ããªãããã§ããããã«å ¨è§è¨å·ã¯é«ã確çã§åè§ã«ç½®ãæãããã¦ãã¾ãå¾åãããã¾ããå ¥åã®ä¸é¨ãæ½åºãããããªå©ç¨ã±ã¼ã¹ã§ã¯ãä¸é¨ã®æåãç½®ãæãããã¦ãã¾ãå¯è½æ§ãèæ ®ããªããã°ããã¾ããããã®æ¯ãèã㯠Claude 2 ã§ãå ±éã®ãããªã®ã§ãClaude ã·ãªã¼ãºã®çã¨ãã¦åãå ¥ããå¿ è¦ãããããã§ãã
ç½®ãæãããã¦ãã¾ãæå | ç½®ãæãå | åè |
---|---|---|
â U+201D Right Double Quotation Mark | " U+0022 Quotation Mark | 100% ç½®æ or åé¤ |
â U+201C Left Double Quotation Mark | " U+0022 Quotation Mark | 100% ç½®æ or åé¤ |
â Left Single Quotation Mark | ' U+0027 Apostrophe | 100% ç½®æ or åé¤ |
â U+2019 Right Single Quotation Mark | ' U+0027 Apostrophe | 100% ç½®æ or åé¤ |
ï¼ï¼å ¨è§è¨å·ï¼ | !ï¼åè§è¨å·ï¼ | æè次第ã§èµ·ãã |
âãâï¼å ¨è§ç©ºç½ï¼ | åé¤ | æè次第ã§èµ·ãã |
ããï¼ï¼ãªã© | åé¤ | æè次第ã§èµ·ãã |
ã¦ã¼ã¶ã®å ¥åãã§ãã¯ã«ä½¿ãå ´åãªã©åæã«å¿ å®ã§ããå¿ è¦ãããå ´åãå ã®æç« ããå¤åãã¦ããç®æãæ¤ç¥ãã¦ä¿®æ£ããå¿ è¦ãããã¾ããã ã«ã¼ã«ãã¼ã¹ã§æ¸ãæ»ãã«ã¯ãå¤åãã¦ãã¾ãæåãå¤ãä¸ã«ç¢ºççãªã®ã§åä»ã§ãã åæã®ä¸é¨ãæãåºãã±ã¼ã¹ã§ã¯ãåºåã«é¡ä¼¼ããæååãåæããæ¢ãåºãç½®ãæãã¦ãã¾ããã¨ãã§ãã¾ãããæååã®å§ç¹ãçµç¹ã«ãããæåã®ç½®ãæããèµ·ããå¯è½æ§ããããæ£ããç¯å²ãæãåºããã¨ã¯é£ããã§ãã ãã¨ãã°ãåæããã¸ã§ã³ã»ã¹ãã¹ï¼John Smithï¼ãã§ããã¨ãã«ãLLMã®åºåããæååããã¸ã§ã³ã»ã¹ãã¹John Smithãã§ãã£ãæãé常ã¯çµç«¯ã®ãï¼ããå«ããªãã»ããé¡ä¼¼åº¦ãé«ããªã£ã¦ãã¾ãã¾ãã
ãã®ãããªã¢ã©ã¤ã³ã¡ã³ããããã«ã¯ãç·¨éè·é¢ã使ãã®ã便å©ã§ããï¼åè: https://www.cs.t-kougei.ac.jp/SSys/LevenS.htmï¼ åæã¨ã®ä¸è¨ã®LLMãèµ·ãããã¡ãªå¤æã許ãï¼ã³ã¹ããå°ãã or 0 ã¨ããï¼å°ãç¹æ®ãªç·¨éè·é¢ãè¨ç®ããç·¨éè·é¢ã®è¨ç®ã§åºã¦ããç·¨éç³»åãããã¯ãã¬ã¼ã¹ãããã¨ã§ãLLMã®åºåãåæã«ãã¨ã¥ããä¿®æ£ããããã¨ãã§ãã¾ãã ä¸è¬çãªç·¨éè·é¢ã§ã¯æ¿å ¥ã»åé¤ãã³ã¹ã1ãç½®æãã³ã¹ã2ã¨ãããã¨ãå¤ãã§ãããå ¨è§ã»åè§ã®å¤æãã¯ãªã¼ãã¼ã·ã§ã³ã®å¤æãè¨å·ã®åé¤ã³ã¹ããå°ããè¨å®ãããã¨ã§ãLLMã®çã¯è¨±å®¹ãã¤ã¤ãã«ã·ãã¼ã·ã§ã³ç㪠åæãªå 容ã®è¿½å ã»åé¤ã¯è¦éããªãæååä½ã®ã¢ã©ã¤ã³ã¡ã³ããã§ãã¾ãã
ãã®ä¾ã§ã¯ã横ãåæã§ç¸¦ãLLMã®åºåã表ãã¦ãã¾ããå³ä¸ããå·¦ä¸ã¾ã§çµè·¯ãéã«ãã©ããã¨ã§ãAã¨Bã®éã®ãâããåé¤ããã¦ãããã¨ãããããçµè·¯ã§åã£ãç·¨éå 容ããLLMã®åºåãã©ãä¿®æ£ããã°åæã«æ»ãããããããã¾ãã
APIã®åºåçæã«é¢ããä»æ§ã®éã
GPT ã§ã¯ï¼ã¤ã®å ¥åã«å¯¾ãã¦è¤æ°ã®åºåãä¸åº¦ã«çæãã¦è¿ããã¨ãã§ãã¾ããããä»ã®ã¨ãã Claude 3 ã§ã¯ãã®æ©è½ã¯ç¡ãããã§ããè¤æ°ã®è§£ãåºåããã¦ãvoting ã§æ§è½ãä¸ãããã¨ããæã«ã¯ãå ¥åããããç´ãå¿ è¦ãããã¾ããåæ§ã«åºåã®ç¢ºçå¤ï¼GPTã«ãããlogprobï¼ãåºããªããããé¸æåé¡ã®ã©ã®åºåã§ç¢ºä¿¡åº¦ãé«ããªãããã®ãããªè©ä¾¡ã¯é£ãããªãã¾ãã
JSON ã¢ã¼ãé対å¿ã¸ã®å¯¾ç
è¤åçãªã¿ã¹ã¯ã解ãå ´åããã³ã¼ãã®ä¸ã§åçå ã®æ å ±ãå©ç¨ããå ´åãªã©ãJSON ã®ãããªæ§é åãããåºåã¯ã¨ã¦ã便å©ã§ãå¿ é ã¨ãã£ã¦ãéè¨ã§ã¯ããã¾ãããããããClaude 3 ã«ã¯åè¿°ã®éã JSON ã¢ã¼ããç¾ç¶ãªããæ£ãã JSON å½¢å¼ã§åºåããããã¨ãä¿è¨¼ãããªããããè¤é度ã®é«ãåºåããç¹ã«ä»»æã®æååãå«ã¾ããå ´åã«åä»ãªåé¡ãå¼ãèµ·ããã¾ãã
åãããæ¦ç¥ã¯ãåºåããããå 容ã«ãã£ã¦å¤ãã£ã¦ãã¾ãã
ãªãã©ã¤æ¦ç¥
åç´ãª JSON å½¢å¼ããæååã JSON å
ã«å«ã¾ããªãå ´åã«ã¯ã»ã¨ãã©ã®å ´ååé¡ãªãåºåãããã¨ãã§ããããããããã¼ã¹ã§ããªãJSONãåºåãããæã«ã¯æ£ãã JSON ã«ãªãã¾ã§ãªãã©ã¤ããã®ãç°¡åã§ããæ¦ç¥ã ã¨æãã¾ãã
æ¦ç¥ã¨ãã£ã¦ããåºåããã JSON ã <json></json>
ã¿ã°ã§å²ã¾ããåãåºãã JSON ã®ãã¼ã¹ã«å¤±æããããªãã©ã¤ããç¹°ãè¿ãã ãã§ãã
æå®ãããã¼ã®æç¡ãæ°å¤ã®ã¯ããæååã«ãªã£ã¦ãããªã©ãå¾®å¦ãªãã©ã¼ãããéãã¯è¯ãèµ·ãããããå¾å¦çã§ä¿®æ£ããããã§ããã ãç´°ãããã§ãã¯ãã¦ãªãã©ã¤ãããªã©å¯¾çããã¦ããã®ãæã¾ããã§ãã
ããããä»»æã®æååãå«ã¾ããå ´åã«ã¯ããªãã©ã¤æ¦ç¥ã ãã§ã¯ãã¾ãããã¾ãããClaude 3 ãåºåãã JSON ã¯ãæååä¸ã«ãâããå«ã¾ãã¦ãæ£ããã¨ã¹ã±ã¼ããã¦ããããä½åº¦ãªãã©ã¤ãã¦ãåãã¨ã©ã¼ãèµ·ããã¦ãã¾ãã¾ãã å ã㦠Claude ãæåã®æ£è¦åãè¡ããå ¨è§ã®å¼ç¨ç¬¦ãªã©ããâãã«å¤æããã¦ãã¾ããããäºæãã¬ã¨ããã§ã¨ã©ã¼ã«ãªãå ´åãããã¾ãã
å¾è¿°ããæ¦ç¥ã使ãå ´åããã©ã¼ãããã®ãã§ãã¯ããªãã©ã¤ãªã©ã¯çµã¿åãããæ¹ãè¯ãã§ãããã
GPT ã«ãã©ã¼ããããä¿®æ£ãããæ¦ç¥
è¤é度ãæ¯è¼çä½ãå ´åãJSONã®åºåãé·ãããªãå ´åã«æå¹ã§ããClaude 3 ã®åºåããã¨ã©ã¼ãå«ãJSONå½¢å¼ããGPT ã® JSON ã¢ã¼ãã使ã£ã¦æ£ããJSONå½¢å¼ã«ä¿®æ£ããã¾ããæ±ç¨çã«ä½¿ãã¾ãããã³ã¹ããããã£ã¦ãã¾ããã¨ã¨ãè¤æ°ã®LLMãåæã«æ±ãæéãJSONã¨ãã¦ã¯æ£ããã¨ãæå³ã©ããã«ä¿®æ£ããã¦ããä¿è¨¼ã¯çµå±ãªãã¨ããããã¡ãªããã§ãã
XMLã§åºåããã¦å¤æããæ¦ç¥
JSON ã®ä»£ããã« XML ã§åºåãããæ¹æ³ãããã¾ãããã¡ãã Claude 3 ã§ã¯ ã¨ã¹ã±ã¼ããæ£ããæ±ã£ã¦ãããªãã¨ããã¯ããã¾ãããæ¯è¼ç対å¦ãããããã§ãã XMLã¨ãããã©ã¼ãããèªä½ãåä»ãªã¨ããã¯ãããã®ã®ãæ§é åããåºåããããæ¹æ³ã§ã¯ä»åç´¹ä»ããï¼ã¤ã®ä¸ã§ä¸çªå®å®ããããã¨ãã§ãã¾ãã ãã¡ãªããã¯ãJSONã«æ¯ã¹åé·ã«ãªããã¡ã§ãããæ·±ããã¹ãã§ã¯æ§è½ãè½ã¡ããã¨ã§ãã
XMLã§åºåãããå ´åãLLMã®åºåã«å¯¾ããåå¦çã¨ãã¦ä¸é¨ã®è¨å·ã & ãªã©ã®åç §æåã«ç½®ãæããå¿ è¦ãããã¾ãã Claude 3 ã¯èªåã§ã¯ã¨ã¹ã±ã¼ããã¦ãããããã¼ã¹æã«ã¨ã©ã¼ã«ãªãããã§ããåºæ¬çã«ã¯ç½®æããã ãã§æ¸ã¿ã¾ãããXMLãã¼ã¶ã¼ã使ããæ£è¦è¡¨ç¾ã§å¿ è¦ãªæ å ±ãåãåºãéã«ã¯ä¸è¦ã§ãã
ãã¼ã¹ã§ããXMLãå¾ãããã°ãxmltodict (python ã®å ´å)㧠dict å½¢å¼ã«å¤æãã¦å©ç¨ãããã¨ãã§ãã¾ãã
ãã ãã注æããç¹ãä¸ã¤ãããXMLã§ã¯ãã©ã¼ãããä¸è¦ç´ ãï¼ã¤ã®å ´åã«ãªã¹ããã©ãããå¤å¥ãããã¨ãã§ããªããããé
åã«ãªãã¿ã°ã force_list
å¼æ°ã§ãããããæå®ããå¿
è¦ãããã¾ããï¼åè: Pythonã©ã¤ãã©ãªxmltodictãXMLãè¾æ¸ã«å¤æãã¦ããããªãã¦æé«ãããï¼ð¤ã触ã£ã¦ã¿ãã«ä½¿ãããªãtipsãæ·»ã㦠)
XMLã®ä¾
<xml> <item> item 1 </item> </xml>
force_list
ã«ä½ãæå®ããªãå ´åã«å¤æããã dict
{"xml": {"item": "item 1" } }
force_list
ã« item ãæå®ããå ´åã«å¤æããã dict
{"xml": {"item": ["item 1"] } }
ã¾ã¨ã
Claude 3 ã«ä¹ãæããéã«éå£ã«ãªãããããããã³ããã®æ¸ãæ¹ã®éããæ§é åãããåºåã®æ±ãæ¹ã«ã¤ãã¦ã¾ã¨ãã¾ããã GPT 以å¤ã®ã¢ãã«ã«ä¹ãæããéã«ã¯ãããç¨åº¦ä¼¼ãåé¡ãçããã®ã§ãLlama 3ãªã©å¥ã®ã¢ãã«ã«ä¹ãæããéã«ãåèã«ãªãã°å¹¸ãã§ãã