Simon Willison、LLM のタグ分類に「幻覚」活用する手法を提案
本文の状態
日本語全文を表示中
詳細モードで約2分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Simon Willison Blog
Simon Willison は、LLM に既存の語彙に基づかずにタグを生成させ(幻覚)、その結果をベクトル埋め込みで既存コーパスと照合して最適なタグを選定する手法を提案した。
AI深層分析を開く2026年8月15日 07:30
AI深層分析
キーポイント
LLM の語彙制限への対処法
1,856 件ものタグを一度に LLM に与えるのは現実的ではないため、既存の語彙リストをモデルに入力しないアプローチが提案されている。
生成と照合のハイブリッド手法
LLM に既存のタグ名を使わずに「想像した」タグを出力させ、その結果をベクトル埋め込み技術を用いて既存のコーパスと比較し、最も類似する実在のタグを特定する。
プロンプト設計の重要性
Doug Turnbull の例では、生成される分類の形状(階層構造など)を示すサンプルをプロンプトに含めることで、モデルがより有用な仮説を生成できるようになっている。
重要な引用
Tell the model to output tags without any details of the existing vocabulary, then use vector embeddings against the existing corpus to find the concrete tags that are closest to the ones the model imagined might fit!
Your task is to create novel, never seen before, furniture, home goods, or hardware classification that best fit a search query.
編集コメントを表示
編集コメント
既存の語彙を直接参照させずにモデルに創造性を発揮させる手法は、タグ数が多いシステムにおける実装コスト削減に寄与する。このアプローチは、特定のモデルに依存せずベクトル検索技術と組み合わせる汎用性が高い点で評価できる。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
分類するな。空想しろ!
私のブログには、まだタグ付けされていない古い記事が結構残っています。現在、私のブログには 1,856 個のタグ が登録されています。この数は一度に大規模言語モデル(LLM)に読み込ませて、「以下のコンテンツにどのタグが適合するか」と尋ねるには多すぎるかもしれません。
Doug Turnbull 氏は、これを解決する賢い方法を提案しています。既存の語彙の詳細を一切含めず、モデルに対してタグを出力させるのです。そして、そのモデルが生み出したタグと、既存のコーパスに対するベクトル埋め込み(vector embeddings)を比較して、最も近い実在するタグを見つけ出します。
彼の例示プロンプトでは、モデルがより有用な推測を行えるよう、タグの形状(形式や構造)のサンプルを含めることを推奨しています。
「検索クエリに最も適合する、これまで存在しなかった家具・家庭用品・ハードウェアの分類を新たに作成してください。製品分類の例としては以下のようなものがあります。
Furniture / Living Room Furniture / Coffee Tables & End Tables /
コーヒーテーブル、装飾・クッション類(装飾用クッションとブランケット)、寝具用家具(ドレッサーやチェスト)など、キッチン用品も含まれます。 (原文の技術表記: 、 、 )
テーブルトップ・キッチン整理術/食品保存容器とキャニスター
学校家具・備品/学校用椅子・座席/スタッキングチェア
ベビー&キッズ/幼児・子供用ベッドルーム (原文の技術表記: 、 )
家具・子供用ベッド
以下のクエリを使用して分類を生成します:
brown coffee table
原文を表示
Don't classify. Hallucinate!
I still have quite a bit of older content on my blog that I never got round to tagging. My blog has 1,856 tags - likely too many to feed to an LLM in one go and say "which of these tags match the following content".
Doug Turnbull has a neat solution. Tell the model to output tags without any details of the existing vocabulary, then use vector embeddings against the existing corpus to find the concrete tags that are closest to the ones the model imagined might fit!
His example prompt suggests including an example of the shape of your tags to help the model make a more useful guess:
Your task is to create novel, never seen before, furniture, home goods, or hardware classification that best fit a search query.
Product classifications might look like:
Furniture / Living Room Furniture / Coffee Tables & End Tables / Coffee Tables
Décor & Pillows / Decorative Pillows & Blankets / Throw Pillows
Furniture / Bedroom Furniture / Dressers & Chests
Kitchen & Tabletop / Kitchen Organization / Food Storage & Canisters
School Furniture and Supplies / School Furniture / School Chairs & Seating / Stackable Chairs
Baby & Kids / Toddler & Kids Bedroom Furniture / Kids Beds
Here's the query to generate classifications for:
brown coffee table
Tags: search, ai, generative-ai, llms, embeddings, doug-turnbull
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み