Chuyển đến nội dung
Skillpedia
Agent41k · #6721

hybrid-search-implementation

Skill này làm gì

Skill này dạy cách kết hợp hai kiểu tìm kiếm: một kiểu hiểu ý nghĩa (vector) và một kiểu tìm đúng các từ (từ khóa). Nhờ vậy bạn tìm được thông tin đầy đủ hơn.

Khi nào nên dùng

  • ✓Khi bạn xây dựng hệ thống trả lời câu hỏi dựa trên tài liệu.
  • ✓Khi bạn cần tìm kiếm vừa theo ý nghĩa vừa theo thuật ngữ cụ thể.
  • ✓Khi tìm kiếm theo ngữ nghĩa thuần túy bỏ sót các kết quả quan trọng mà bạn biết là có.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/wshobson/agents/blob/main/plugins/llm-application-dev/skills/hybrid-search-implementation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Làm sao để kết hợp tìm kiếm theo ý nghĩa và tìm kiếm từ khóa để cải thiện kết quả của tôi?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Ý tưởng là gửi truy vấn của bạn đến hai hệ thống tìm kiếm cùng lúc. Một hệ thống hiểu ý nghĩa, hệ thống kia tìm đúng các từ. Sau đó, các kết quả được kết hợp để đưa ra câu trả lời tốt nhất.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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
Câu hỏi thường gặp

Tìm kiếm vector là gì?

Đó là kiểu tìm kiếm hiểu ý nghĩa của từ và cụm từ, tìm các văn bản nói về cùng một chủ đề ngay cả khi dùng từ khác.

Tìm kiếm từ khóa là gì?

Đó là kiểu tìm kiếm truyền thống, tìm đúng các từ bạn đã gõ.

“Fusion” là gì?

Đó là quá trình kết hợp kết quả từ hai kiểu tìm kiếm (vector và từ khóa) để tạo ra danh sách kết quả cuối cùng chính xác hơn.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
41k
Vị trí xếp hạng
#6721
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự