The letter

One letter a week, starting soon.

The week's signal, what shipped, what is worth running tonight, and the editor's note. No tracking, no ads, nothing else.

We keep your address, your language and the date you joined, nothing else. Every letter has a one-click unsubscribe link that deletes the record.

← Accept All   Archive
Zenn (AI)Japan

LLM出力の壊れたJSONをPython標準ライブラリで決定的に修復・型検証する実装パターン

11.21

LLMにJSON形式での出力を指示しても、実運用では次のような「あと一歩で壊れているJSON」が必ず混ざります。 前後に説明文や ```json ... ``` のコードフェンスが付く 末尾カンマ(trailing comma)や // コメントが入る シングルクォートや Python の True / False / None が混ざる 最大トークン上限に当たって末尾の } や ]…

Languages & runtimes
Read at Zenn (AI) ↗

Related

More from Zenn (AI) on Accept All.