本文へスキップ
Skillpedia
エージェント41k · #6721

hybrid-search-implementation

できること

このスキルは、2種類の検索を組み合わせる方法を教えます。1つは意味を理解するベクトル検索、もう1つは正確な単語を探すキーワード検索です。これにより、情報をより漏れなく見つけられるようになります。

使う場面

  • ✓文書をもとに質問に答えるシステムを構築するとき。
  • ✓意味の一致と特定の用語の両方で検索したいとき。
  • ✓意味だけに基づく検索で、存在するはずの重要な結果が見つからないとき。

スキルのリンク

https://github.com/wshobson/agents/blob/main/plugins/llm-application-dev/skills/hybrid-search-implementation/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/wshobson/agents/blob/main/plugins/llm-application-dev/skills/hybrid-search-implementation/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“意味検索とキーワード検索を組み合わせて、結果を改善するにはどうすればよいですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

検索クエリを2つの検索システムに同時に送ります。1つは意味を理解し、もう1つは正確な単語を探します。その後、両方の結果を組み合わせて、最適な回答を導き出します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Hybrid Search Implementation

Patterns for combining vector similarity and keyword-based search.

When to Use This Skill

  • Building RAG systems with improved recall
  • Combining semantic understanding with exact matching
  • Handling queries with specific terms (names, codes)
  • Improving search for domain-specific vocabulary
  • When pure vector search misses keyword matches

Core Concepts

1. Hybrid Search Architecture

Query → ┬─► Vector Search ──► Candidates ─┐
        │                                  │
        └─► Keyword Search ─► Candidates ─┴─► Fusion ─► Results

2. Fusion Methods

Method Description Best For
RRF Reciprocal Rank Fusion General purpose
Linear Weighted sum of scores Tunable balance
Cross-encoder Rerank with neural model Highest quality
Cascade Filter then rerank Efficiency

Templates and detailed worked examples

Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.

Best Practices

Do's

  • Tune weights empirically - Test on your data
  • Use RRF for simplicity - Works well without tuning
  • Add reranking - Significant quality improvement
  • Log both scores - Helps with debugging
  • A/B test - Measure real user impact

Don'ts

  • Don't assume one size fits all - Different queries need different weights
  • Don't skip keyword search - Handles exact matches better
  • Don't over-fetch - Balance recall vs latency
  • Don't ignore edge cases - Empty results, single word queries
よくある質問

ベクトル検索とは何ですか?

単語やフレーズの意味を理解する検索です。異なる言葉を使っていても、同じ話題について書かれた文章を見つけられます。

キーワード検索とは何ですか?

入力した正確な単語を探す、従来型の検索です。

「フュージョン」とは何ですか?

ベクトル検索とキーワード検索の両方の結果を組み合わせて、より正確な最終結果リストを作成する処理です。

詳細

作者による元の説明

Combine vector and keyword search for improved retrieval. Use when implementing RAG systems, building search engines, or when neither approach alone provides sufficient recall.

repo: wshobson/agents

人気

GitHubのスター
41k
ランキング
#6721
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル