Agent skill · Databases

postgres-hybrid-text-search

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). **Trigger when user asks to:** - Combine keyword and semantic search - Implement hybrid search or multi-modal retrieval - Use BM25/pg_textsearch with pgvector together - Implement RRF (Reciprocal Rank Fusion) for search - Build search that handles both exact terms and meaning **Keywords:** hybrid search, BM25, pg_textsearch, RRF, reciprocal rank fusion, keyword search, full-text search, reranking, cross-encoder

Tiger Data1,796★ · +6/wk · 1 repos on radarProfile →
claude-codeApache-2.0
Install
npx skills add timescale/pg-aiguide --skill postgres-hybrid-text-search --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 12 KB
Bundled scripts: none
Declared author: tigerdata
Requires: Requires PostgreSQL 15+ with pgvector and pg_textsearch extensions
Path: skills/postgres-hybrid-text-search/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,806 · +10 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Hybrid Text Search Hybrid search combines keyword search (BM25) with semantic search (vector embeddings) to get the best of both: exact keyword matching and meaning-based retrieval. Use Reciprocal Rank Fusion (RRF) to merge results from both methods into a single ranked list. This guide covers combining [pg_textsearch](https://github.com/timescale/pg_textsearch) (BM25) with [pgvector](https://github.com/pgvector/pgvector). Requires both extensions. For high-volume setups, filtering, or advanced pgvector tuning (binary quantization, HNSW parameters), see the **pgvector-semantic-search** skill. pg_textsearch is a new BM25 text search extension for PostgreSQL, fully open-source and available hosted on Tiger Cloud as well as for self-managed deployments. It provides true BM25 ranking, which often improves relevance compared to PostgreSQL's built-in ts_rank and can offer better performance at scale. Note: pg_textsearch is currently in prerelease and not yet recommended for production use. pg_textsearch currently supports PostgreSQL 17 and 18. ## When to Use Hybrid Search - **Use hybrid** when queries mix specific terms (product names, codes, proper nouns) with conceptual intent - **Us

What's inside
Steps it walks through
  1. When to Use Hybrid Search
  2. Data Preparation
  3. Golden Path (Default Setup)
  4. BM25 Notes
  5. RRF Query Pattern
  6. RRF Parameters
  7. Weighting Keyword vs Semantic
  8. Reranking with ML Models
  9. Performance Considerations
  10. Scaling with pgvectorscale
  11. Monitoring & Debugging
  12. Common Issues
More from pg-aiguide
All skills →
About this skill
What does the postgres-hybrid-text-search skill do?

Use this skill to implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF). **Trigger when user asks to:** - Combine keyword and semantic search - Implement hybrid search or multi-modal retrieval - Use BM25/pg_textsearch with pgvector together - Implement RRF (Reciprocal Rank Fusion) for search - Build search that handles both exact terms and meaning **Keywords:** hybrid search, BM25, pg_textsearch, RRF, reciprocal rank fusion, keyword search, full-text search, reranking, cross-encoder

How do I install it?

Run `npx skills add timescale/pg-aiguide --skill postgres-hybrid-text-search --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From timescale/pg-aiguide, a repository with 1,806 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going