Inti Sakura Solutions
BerandaホームHome Tentang会社概要About LayananサービスServices Kontakお問い合わせContact BlogブログBlog
| |

Studi Kasus: Dari Kata Kunci ke Kalimat — Menutup Celah Margin Pencarian Semantik 事例:キーワードから文章へ — セマンティック検索のマージンギャップを埋める Case Study: From Keywords to Sentences — Closing the Semantic Search Margin Gap

7 Juli 2026 · AI 2026年7月7日 · AI July 7, 2026 · AI

Tulisan sebelumnya berhenti di kesimpulan yang belum nyaman: top-1 result untuk query "tempat duduk" memang benar, tapi similarity tertingginya cuma 0.4151, dan skor kategori kompetitor (ember, 0.3193) ternyata lebih tinggi dari beberapa item bangku yang justru relevan (0.2979–0.3056). Hipotesis kerja saat itu: representasi daftar kata kunci yang dipisah koma mungkin tidak memberi model embedding cukup struktur kalimat untuk memisahkan kategori produk secara tegas. Pendekatan alternatif — satu kalimat deskripsi utuh per produk, digali lewat pencarian web, bukan sekadar daftar kata kunci — sudah diuji. Berikut prosesnya, dan angka before/after yang sudah divalidasi. 前回の記事は、まだすっきりしない結論で終わっていました。「tempat duduk」(座る場所)というクエリに対する最上位の一致は正しかったものの、最高類似度はわずか0.4151で、しかも競合カテゴリ(ember、バケツ)の最高スコア(0.3193)が、本来関連性のある一部のbangku商品(0.2979〜0.3056)よりも高いという結果でした。当時の作業仮説は、カンマ区切りのキーワードリストという表現方法が、埋め込みモデルが商品カテゴリを明確に分離するために必要な文章構造を十分に提供していない、というものでした。その代替アプローチ — キーワードの羅列ではなく、Web検索で調べた情報をもとに商品ごとに1文の完全な説明文を生成する方法 — を検証しました。以下はその過程と、検証済みのbefore/after数値です。 The previous post ended on an uncomfortable note: the top-1 result for the query "tempat duduk" (seat) was correct, but the highest similarity was only 0.4151, and the competitor category's top score (ember/bucket, 0.3193) was actually higher than some genuinely relevant bangku items (0.2979–0.3056). The working hypothesis at the time: a comma-separated keyword list may not give the embedding model enough sentence structure to cleanly separate product categories. An alternative — one full sentence description per product, researched via web search instead of guessed as a keyword list — has now been tested. Here's the process, and the validated before/after numbers.

Pendekatan Baru: Kalimat Deskripsi, Bukan Daftar Kata Kunci 新しいアプローチ:キーワードの羅列ではなく説明文 The New Approach: Sentence Descriptions, Not Keyword Lists

Alih-alih Claude Haiku menebak daftar kata kunci dari nama produk saja, sekarang ia diberi tool pencarian web dan diminta menulis SATU kalimat deskripsi Bahasa Indonesia yang menyebut jenis/fungsi produk, merek (jika ditemukan), bahan (jika ditemukan), dan detail tambahan — digali dari sumber e-commerce Indonesia asli, bukan dikarang dari singkatan SKU. Pola kalimatnya konsisten: <nama produk> adalah <jenis/fungsi> yang dibuat oleh <merek> terbuat dari <bahan> <detail>. これまではClaude Haikuが商品名だけからキーワードリストを推測していましたが、今回はWeb検索ツールを与え、商品の種類・用途、ブランド(判明していれば)、素材(判明していれば)、その他の詳細を含む1文のインドネシア語の説明文を書かせます。SKUの略語から想像で書くのではなく、実在のインドネシアのECサイトの情報に基づいて生成します。文のパターンは一貫しています:<商品名> adalah <種類/用途> yang dibuat oleh <ブランド> terbuat dari <素材> <詳細>。 Instead of Claude Haiku guessing a keyword list from the product name alone, it's now given a web search tool and asked to write ONE Indonesian-language sentence naming the product's type/function, brand (if found), material (if found), and any extra detail — grounded in real Indonesian e-commerce listings, not invented from an SKU abbreviation. The sentence pattern stays consistent: <product name> adalah <type/function> yang dibuat oleh <brand> terbuat dari <material> <detail>.

Gate keyakinan HIGH/LOW dari pendekatan sebelumnya tetap dipakai: HIGH untuk produk yang berhasil dikonfirmasi lewat pencarian, LOW untuk nama yang terlalu generik/kriptik — tapi kalimat tetap ditulis sebagai best-effort, tidak boleh kosong, supaya tetap masuk antrean review manusia alih-alih hilang begitu saja. 前回と同じHIGH/LOWの確信度ゲートを継続使用:Web検索で確認できた商品はHIGH、名称が汎用的・判読困難な場合はLOWとしていますが、説明文自体は必ずベストエフォートで書かれ、空欄のまま消えることなく人間によるレビューキューに回されます。 The HIGH/LOW confidence gate from the previous approach carries over: HIGH for products confirmed via search, LOW for names too generic or cryptic to pin down — but the sentence is still written as a best effort, never left blank, so it still lands in the human review queue instead of just disappearing.

Cara Kerja 処理の流れ How It Works

items aktif (nama produk + kategori, is_deleted=false)
   |
   v
Claude Haiku + web_search --> satu kalimat deskripsi + confidence (HIGH/LOW)
   |
   |-- HIGH --> siap diproses
   |-- LOW  --> tetap ditulis best-effort, masuk antrean review manusia
   v
kalimat deskripsi final
   (mis. "bangku espana adalah tempat duduk yang dibuat oleh lion star terbuat dari plastik")
   |
   v
OpenAI text-embedding-3-small --> vektor 1536 dimensi
   |
   v
Supabase pgvector --> products_embeddingitems(アクティブな商品名 + カテゴリ、is_deleted=false)
   |
   v
Claude Haiku + web_search --> 1文の説明文 + 確信度(HIGH/LOW)
   |
   |-- HIGH --> そのまま処理可能
   |-- LOW  --> ベストエフォートで記述、人間のレビューキューへ
   v
最終説明文
   (例:"bangku espana adalah tempat duduk yang dibuat oleh lion star terbuat dari plastik")
   |
   v
OpenAI text-embedding-3-small --> 1536次元ベクトル
   |
   v
Supabase pgvector --> products_embeddingactive items (product name + category, is_deleted=false)
   |
   v
Claude Haiku + web_search --> one sentence description + confidence (HIGH/LOW)
   |
   |-- HIGH --> ready to process
   |-- LOW  --> still written best-effort, goes to human review queue
   v
final sentence description
   (e.g. "bangku espana adalah tempat duduk yang dibuat oleh lion star terbuat dari plastik")
   |
   v
OpenAI text-embedding-3-small --> 1536-dimension vector
   |
   v
Supabase pgvector --> products_embedding

Detail Teknis 技術詳細 Technical Details

  • Model deskripsi: Claude Haiku (claude-haiku-4-5-20251001) + tool web_search, digroundkan ke sumber e-commerce Indonesia説明文生成モデル:Claude Haiku(claude-haiku-4-5-20251001)+ web_searchツール、インドネシアのECサイトの情報に基づくDescription model: Claude Haiku (claude-haiku-4-5-20251001) + the web_search tool, grounded in Indonesian e-commerce sources
  • Model embedding: OpenAI text-embedding-3-small, 1536 dimensi (sama seperti sebelumnya)埋め込みモデル:OpenAI text-embedding-3-small、1536次元(前回と同様)Embedding model: OpenAI text-embedding-3-small, 1536 dimensions (same as before)
  • Teks yang di-embed: f"{nama_produk} {deskripsi_kalimat}"埋め込み対象テキスト:f"{商品名} {説明文}"Text being embedded: f"{product_name} {sentence_description}"
  • Harness pengujian: dipakai ulang dari tulisan sebelumnya nyaris tanpa perubahan — target floor (skor terendah item kategori target) harus melebihi competitor ceiling (skor tertinggi item kategori kompetitor), untuk query yang sama, "tempat duduk"テストハーネス:前回の記事とほぼ同じものを再利用 — 対象カテゴリの最低スコア(floor)が、競合カテゴリの最高スコア(ceiling)を、同一クエリ「tempat duduk」に対して上回る必要があるTest harness: reused from the previous post almost unchanged — the target category's floor score must exceed the competitor category's ceiling score, for the same query, "tempat duduk"

Hasil: Before/After 結果:Before/After Results: Before/After

Pengujian ulang memakai kategori dan query yang sama persis dengan tulisan sebelumnya — bangku vs ember, query "tempat duduk" — supaya hasilnya bisa dibandingkan langsung. Bedanya, kali ini populasi ujinya bukan sampel kecil lagi, tapi seluruh kategori bangku dan ember yang aktif di katalog. 前回と全く同じカテゴリとクエリ — bangku vs ember、クエリ「tempat duduk」— で再検証し、直接比較できるようにしました。違いは、今回のテスト対象が小さなサンプルではなく、カタログ内のアクティブなbangku・ember全件になった点です。 Re-testing used the exact same categories and query as the previous post — bangku vs ember, query "tempat duduk" — so the results could be compared directly. The difference: this time the test population wasn't a small sample anymore, but every active bangku and ember item in the catalog.

Tahap段階Stage Populasi ujiテスト対象Test population Target floor (bangku)Target floor(bangku)Target floor (bangku) Competitor ceiling (ember)Competitor ceiling(ember)Competitor ceiling (ember) Catatan備考Note
Pilot Juni 2026 (kata kunci)2026年6月のパイロット(キーワード方式)June 2026 pilot (keywords) sampel kecil小規模サンプルsmall sample 0.2979 0.3193 floor < ceiling — didiagnosis manual sebagai berisikofloor < ceiling — 手動診断でリスクありと判断floor < ceiling — manually flagged as risky
Kalimat deskripsi, sebelum perbaikan説明文方式、修正前Sentence descriptions, before fix kategori penuh (178 bangku + 147 ember)カテゴリ全件(bangku178件 + ember147件)full category (178 bangku + 147 ember) 0.2227 0.3252 FAIL (gate otomatis)FAIL(自動ゲート)FAIL (automated gate)
Kalimat deskripsi, setelah perbaikan説明文方式、修正後Sentence descriptions, after fix kategori penuh, item aktifカテゴリ全件、アクティブ商品のみfull category, active items only 0.3338 0.3252 PASS

Percobaan pertama dengan kalimat deskripsi penuh justru gagal lebih parah — floor 0.2227, lebih rendah dari floor pilot kata kunci (0.2979). Bukan berarti hipotesis "kalimat lebih baik dari kata kunci" salah: populasi ujinya jauh lebih besar (178 item, bukan sampel kecil yang dikurasi), jadi outlier jauh lebih mungkin muncul dan lolos tanpa disadari di sampel kecil. 説明文方式の最初の試行は、むしろ以前より悪化しました — floorは0.2227で、キーワード方式のパイロット(0.2979)よりも低い数値です。これは「説明文はキーワードより優れている」という仮説が誤りだったという意味ではありません。テスト対象が大幅に大きくなった(厳選された小サンプルではなく178件)ことで、これまで小さなサンプルでは見逃されていた外れ値が表面化しやすくなったためです。 The first run with full sentence descriptions actually failed worse — floor 0.2227, lower than the keyword pilot's floor (0.2979). That doesn't mean the "sentences beat keywords" hypothesis was wrong: the test population was much larger (178 items, not a small curated sample), so an outlier that would have gone unnoticed in a small sample was far more likely to surface.

Analisis per item (bukan cuma floor/ceiling) menemukan pola yang jelas: 10 item bangku dengan skor terendah semuanya tidak menyebut kata "duduk" dalam deskripsinya — hanya menyebut merek, bahan, dan ukuran. Sementara itu, 63% dari seluruh deskripsi bangku (112 dari 178) memang menyebut "duduk". Kalau ketiadaan kata itu murni acak, harusnya cuma sekitar 4 dari 10 item terbawah yang kena; nyatanya 10 dari 10. Ini bukan produk yang genuinely ambigu — ini celah sistematis di prompt. floor/ceilingだけでなく商品ごとのスコアを分析したところ、明確なパターンが見つかりました。スコア最下位10件のbangku商品は、いずれも説明文に「duduk」(座る)という単語を含んでおらず、ブランド・素材・サイズしか記載していませんでした。一方で、bangku全体の説明文の63%(178件中112件)には「duduk」が含まれていました。この単語の欠落が純粋にランダムであれば、最下位10件のうち4件程度が該当するはずですが、実際は10件中10件でした。これは本質的に曖昧な商品ではなく、プロンプトの体系的な欠陥です。 Looking at per-item scores instead of just floor/ceiling turned up a clear pattern: all 10 lowest-scoring bangku items were missing the word "duduk" (sitting) from their description — they named only brand, material, and size. Meanwhile, 63% of all bangku descriptions (112 of 178) did include "duduk". If the word's absence were random, roughly 4 of the bottom 10 should have lacked it; instead it was 10 of 10. This wasn't a genuinely ambiguous product — it was a systematic gap in the prompt.

Perbaikannya bukan menulis ulang gaya kalimat, tapi menambahkan syarat eksplisit per kategori: satu konsep fungsi wajib (mis. bangku = "tempat duduk", ember = "wadah air") yang harus muncul di setiap deskripsi kategori itu — dipaksakan lewat instruksi prompt, bukan cuma dicontohkan lewat contoh gaya kalimat seperti sebelumnya. Setelah item-item yang kurang lengkap diregenerasi, floor naik ke 0.3338 — PASS, dengan margin +0.0086 di atas competitor ceiling. 修正は文体を書き直すことではなく、カテゴリごとに明示的な必須要件を追加することでした:カテゴリの機能概念(例:bangku=「tempat duduk」、ember=「wadah air」)を、そのカテゴリの全ての説明文に必ず含めるという要件を、以前のようなスタイル例としてではなく、プロンプトの指示として強制しました。該当する商品を再生成した結果、floorは0.3338まで上昇し、competitor ceilingに対して+0.0086のマージンでPASSとなりました。 The fix wasn't a rewritten sentence style, but an explicit per-category requirement: one mandatory function concept (e.g. bangku = "tempat duduk", ember = "wadah air") that must appear in every description for that category — enforced as a prompt instruction, not just modeled through a style example like before. After regenerating the affected items, the floor rose to 0.3338 — a PASS, with a +0.0086 margin over the competitor ceiling.

Yang Saya Pelajari 学んだこと What I Learned

  • Mengganti representasi (kata kunci → kalimat) bukan solusi otomatis. Menguji di skala kategori penuh, bukan sampel kecil yang dikurasi, justru mengungkap masalah yang sama dengan margin yang lebih buruk dulu, sebelum akhirnya lebih baik.表現方法をキーワードから説明文に変えただけでは自動的には解決しません。厳選された小サンプルではなくカテゴリ全件でテストすることで、同じ問題がまず悪化した形で表面化し、その後改善されました。Switching representation (keywords → sentences) wasn't an automatic fix. Testing at full-category scale instead of a small curated sample surfaced the same problem worse before it got better.
  • Statistik sederhana (z-score, pagar IQR) cukup untuk membedakan "outlier acak" dari "celah sistematis" sebelum menghabiskan waktu memperbaiki hal yang salah — pola 10 dari 10 tidak mungkin kebetulan.単純な統計(z-score、IQRの外れ値境界)は、時間を無駄にする前に「ランダムな外れ値」と「体系的な欠陥」を見分けるのに十分です — 10件中10件というパターンは偶然ではあり得ません。Simple statistics (z-score, an IQR outlier fence) are enough to tell "random outlier" from "systematic gap" before wasting time on the wrong fix — a 10-of-10 pattern isn't chance.
  • Solusi yang bertahan bukan gaya penulisan yang lebih baik, tapi satu konsep wajib per kategori yang eksplisit dipaksakan, bukan cuma dicontohkan.最終的に有効だったのは、より良い文体ではなく、カテゴリごとに明示的に強制された必須概念でした。以前のようにスタイル例として示すだけでは不十分でした。The fix that stuck wasn't better prose, but one required concept per category, explicitly enforced rather than merely demonstrated.
  • Harness pengujian dari tulisan sebelumnya dipakai ulang nyaris tanpa perubahan — cukup untuk mendeteksi regresi yang sama di representasi yang sama sekali berbeda.前回の記事のテストハーネスをほぼそのまま再利用でき、全く異なる表現方式においても同じ回帰を検出できました。The test harness from the previous post was reused almost unchanged, and still caught the same regression in a completely different representation.

Keterbatasan Saat Ini 現在の限界 Current Limitations

  • Baru 1 test case (bangku vs ember) yang divalidasi; katalog punya 26 kategori aktif, kebanyakan belum punya test case serupa.検証済みのテストケースはまだ1件(bangku vs ember)のみ。カタログには26のアクティブなカテゴリがあり、そのほとんどにはまだ同様のテストケースがありません。Only 1 test case (bangku vs ember) has been validated; the catalog has 26 active categories, and most don't have a similar test case yet.
  • Margin PASS saat ini (+0.0086) masih relatif tipis — belum ada ambang batas similarity yang ditentukan untuk produksi.現在のPASSマージン(+0.0086)はまだ比較的小さく、本番運用のための類似度の閾値はまだ決定していません。The current PASS margin (+0.0086) is still fairly thin — no production similarity threshold has been set yet.
  • Belum diterapkan ke production — semua masih di staging, menunggu lebih banyak kategori divalidasi.本番環境にはまだ反映していません — より多くのカテゴリの検証が完了するまで、すべてステージング環境にとどめています。Nothing has shipped to production yet — everything is still in staging, pending validation of more categories.

Dibuat oleh developer AI independen berbasis di Bandung, Indonesia, yang membangun sistem AI custom untuk kebutuhan UMKM — termasuk semantic search, chatbot WhatsApp, dan otomasi workflow. Untuk kebutuhan serupa, hubungi Inti Sakura Solutions. バンドン(インドネシア)を拠点とする独立系AI開発者が、中小企業向けにセマンティック検索、WhatsAppチャットボット、ワークフロー自動化などのカスタムAIシステムを構築しています。同様の課題をお持ちの企業様は、Inti Sakura Solutionsまでご連絡ください。 Built by an independent AI developer based in Bandung, Indonesia, who builds custom AI systems for SMEs — including semantic search, WhatsApp chatbots, and workflow automation. If your business has a similar problem, get in touch with Inti Sakura Solutions.

← Kembali ke Blog ← ブログ一覧へ ← Back to Blog

Inti Sakura Solutions — Bandung, Indonesia Indonesia · Inggris · Jepangインドネシア語・英語・日本語Indonesian · English · Japanese