CtrlK
BlogDocsLog inGet started
Tessl Logo

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 Covers: pg_textsearch BM25 index setup, parallel query patterns, client-side RRF fusion (Python/TypeScript), weighting strategies, and optional ML reranking.

69

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

75%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

The body is highly actionable with executable SQL/Python/TypeScript and a clear setup-to-fusion-to-verification flow, but it loses points on conciseness from promotional prose, unreconciled version-sensitive claims, and duplicated dual-language examples, and its ~270-line single-file structure inlines advanced material that could live in reference files.

Suggestions

Cut the promotional pg_textsearch paragraph ('fully open-source and available hosted on Tiger Cloud') and move the prerelease/version notes into a clearly labeled compatibility or status note, reconciling the frontmatter's 'PostgreSQL 15+' with the body's 'supports PostgreSQL 17 and 18'.

Drop one of the duplicated language examples for the weighting variant (or compress it to a one-line diff from the base fusion function) to save tokens.

Move the Reranking and pgvectorscale sections into one-level-deep reference files (e.g., references/reranking.md, references/scaling.md), keeping a brief pointer plus when-to-use guidance in SKILL.md.

DimensionReasoningScore

Conciseness

The bulk is lean, executable guidance, but there is padding and time-sensitive material: the promotional paragraph ('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'), and version claims ('currently in prerelease', 'currently supports PostgreSQL 17 and 18') that are not isolated in an old-patterns/deprecated section. The full TypeScript duplicate of the weighting variant also re-explains the same pattern in a second language. This fits 'mostly efficient but includes some unnecessary explanation or could be tightened' (3) better than the minor-trim level (4).

3 / 5

Actionability

Fully executable, copy-paste-ready SQL (extension setup, table DDL, index creation, parallel query pair), complete Python and TypeScript RRF fusion implementations, a parameters table, EXPLAIN-based monitoring commands, and a symptom/cause/fix troubleshooting table. These cover the common cases end-to-end, matching the score-5 anchor; nothing is pseudocode or hand-wavy.

5 / 5

Workflow Clarity

The Golden Path and RRF Query Pattern give a clear sequence (enable extensions, create table, index both columns, run both queries in parallel, fuse, then optionally rerank), and the Monitoring & Debugging section supplies verification steps (EXPLAIN, index-size checks) plus an error-recovery branch ('If EXPLAIN still shows sequential scans... verify indexes exist and queries use correct operators'). This is a clear sequence with most checkpoints present; it falls short of a 5 because validation is a separate section rather than explicit checkpoints embedded in the workflow itself, and short of the no-checkpoint level (3) since recovery guidance exists.

4 / 5

Progressive Disclosure

No bundle files exist, so everything is in one well-sectioned SKILL.md with clear headers (Golden Path, RRF Query Pattern, Weighting, Reranking, Performance, Scaling with pgvectorscale, Monitoring, Common Issues) and explicit handoffs ('see the **pgvector-semantic-search** skill', pgvectorscale docs link). Structure and navigation are good, matching the score-4 anchor; it is not a 5 because advanced optional material (ML reranking with two language examples, pgvectorscale scaling) is inlined where one-level-deep reference files would keep the overview leaner, and not a 3 because sections are clearly signaled and easy to navigate.

4 / 5

Total

16

/

20

Passed

Description

96%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

The description is strong: it states concrete capabilities, gives an explicit trigger list and a keyword line with synonyms, and answers both what and when clearly. The only weakness is minor keyword overlap with a sibling semantic-search/reranking skill.

Suggestions

Trim keywords like 'reranking, cross-encoder' or scope them ('hybrid reranking') to reduce overlap with a pure semantic-search skill.

Consider dropping or qualifying 'multi-modal retrieval' in the trigger list, since it can read as image+text retrieval rather than keyword+vector fusion.

DimensionReasoningScore

Specificity

Multiple concrete actions are named: 'implement hybrid search combining BM25 keyword search with semantic vector search using Reciprocal Rank Fusion (RRF)' plus a covers list ('pg_textsearch BM25 index setup, parallel query patterns, client-side RRF fusion (Python/TypeScript), weighting strategies, and optional ML reranking'). Coverage of the skill's capabilities is comprehensive, matching the score-5 anchor; a 4 would require minor gaps, which are not evident.

5 / 5

Completeness

Both questions are answered explicitly: the what ('implement hybrid search combining BM25 keyword search with semantic vector search using RRF' plus the Covers line) and the when ('**Trigger when user asks to:**' followed by five concrete trigger phrases). This mirrors the score-5 good_overall_example structure of concrete what + explicit when; score 4 would require a less explicit 'when', which is not the case.

5 / 5

Trigger Term Quality

The dedicated 'Keywords:' line covers 'hybrid search, BM25, pg_textsearch, RRF, reciprocal rank fusion, keyword search, full-text search, reranking, cross-encoder' with synonyms spelled out (RRF/reciprocal rank fusion, keyword search/full-text search), and the trigger bullets add natural phrasings like 'Combine keyword and semantic search' and 'handles both exact terms and meaning'. This matches the anchor for comprehensive natural-term coverage including synonyms; a 4 would leave common variations missing, which it does not.

5 / 5

Distinctiveness Conflict Risk

The hybrid BM25+vector/RRF niche is distinct and its triggers are specific to combining methods, but keywords like 'reranking, cross-encoder' and 'multi-modal retrieval' overlap with a general semantic-search skill (the body itself points to a sibling 'pgvector-semantic-search' skill). That is a minor overlap risk with a closely related skill, matching the score-4 anchor rather than the minimal-conflict score-5 anchor.

4 / 5

Total

19

/

20

Passed

Validation

93%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

metadata_version

'metadata.version' is missing

Warning

Total

15

/

16

Passed

Repository
timescale/pg-aiguide
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.