Best for
- Choosing a search engine or evaluating whether PostgreSQL search is sufficient
- Building full-text search, autocomplete, or faceted filtering
- Designing an indexing pipeline from source data to search index
vasilyu1983/AI-Agents-public/frameworks/shared-skills/skills/software-search/SKILL.md
Designs application search systems. Use when choosing engines, indexing, relevance tuning, facets, autocomplete, or search analytics.
Decision brief
Build search features that return the right results, fast.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Declared | Source record | Install path and trigger |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/software-search"Inspect the Agent Skill "software-search" from https://github.com/vasilyu1983/AI-Agents-public/blob/53f6cb73ea53a2646e3e7d4665062ad66f3683ac/frameworks/shared-skills/skills/software-search/SKILL.md at commit 53f6cb73ea53a2646e3e7d4665062ad66f3683ac. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Confirm the search problem: engine choice, indexing pipeline, relevance, autocomplete, or analytics. 2. Route RAG, database tuning, SEO, or API-architecture questions to the adjacent skill when product search is not the real problem. 3. Choose PostgreSQL, a dedicated search e…
Before calling a search design or implementation ready:
1. Start from data/sources.json for official documentation links. 2. Run a targeted web search for the specific engine or library. 3. Prefer official docs and release notes over blog posts for version and feature claims. 4. Prefer official engine docs for rank-evaluation APIs, r…
Review the “Quick Reference” section in the pinned source before continuing.
Choosing a search engine or evaluating whether PostgreSQL search is sufficient
Permission review
The documentation includes network, browsing, or remote request actions.
## Vector Search API PatternThe documentation includes network, browsing, or remote request actions.
Use web search/web fetch to verify current external facts, versions, pricing, deadlines, regulations, or platform behavior before final answers.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 95/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 80 | Source | Repository attention, not individual Skill quality |
| Compatibility | 2 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Build search features that return the right results, fast.
| Need | Recommended Options |
|---|---|
| Full-text search (managed) | Algolia (fastest DX), Elasticsearch/OpenSearch (most flexible) |
| Full-text search (lightweight) | Typesense (simple), Meilisearch (developer-friendly) |
| Full-text search (embedded) | SQLite FTS5, Tantivy (Rust), Lunr.js (client-side) |
| PostgreSQL built-in | pg_trgm + tsvector/tsquery (good enough for many apps) |
| Vector search | pgvector, Pinecone, Weaviate, Qdrant |
| Hybrid search | Keyword + vector, reciprocal rank fusion |
| Autocomplete | Prefix matching, search-as-you-type index, debounced queries |
| Faceted search | Aggregation queries, filter counts, hierarchical facets |
| Search analytics | Click-through rate, zero-result queries, query refinement patterns |
| Search UI | InstantSearch.js (Algolia), SearchKit, custom |
marketing-seomarketing-product-analyticsSearch task
-> Define corpus, query intent, filters, and freshness needs
-> Choose database search, dedicated engine, vector, or hybrid retrieval
-> Design indexing, schema, ranking, synonyms, and hydration strategy
-> Add relevance evals, analytics, and regression checks
-> Verify engine-specific behavior and limits
-> Report quality tradeoffs and rollout plan
Which search engine?
├── Small dataset (<100K docs), PostgreSQL already in stack?
│ └── YES → PostgreSQL full-text search (pg_trgm + tsvector)
│ └── Outgrowing it? (facets, typo tolerance, sub-50ms at scale)
│ └── YES → Move to dedicated search engine (below)
├── Need instant search-as-you-type with zero ops?
│ └── YES → Algolia (managed, fastest DX)
├── Need full control, complex queries, large scale?
│ └── YES → Elasticsearch or OpenSearch
├── Developer-friendly, simpler than Elastic?
│ └── YES → Typesense or Meilisearch
├── Client-side search (static site, small dataset)?
│ └── YES → Lunr.js, Pagefind, or FlexSearch
├── Need semantic/meaning-based search?
│ └── YES → Vector search (pgvector, Pinecone, Qdrant, Weaviate)
└── Need both keyword AND semantic?
└── YES → Hybrid search (keyword + vector + reciprocal rank fusion)
| Engine | Typo tolerance | Facets | Geo | Vector | Self-host | Managed |
|---|---|---|---|---|---|---|
| PostgreSQL (tsvector + pg_trgm) | Partial (pg_trgm) | Manual aggregation | PostGIS | pgvector | Yes | RDS/Supabase |
| Algolia | Built-in | Native | Native | Yes — native hybrid (NeuralSearch merges keyword + vector per query) | No | Yes |
| Elasticsearch / OpenSearch | Built-in | Native | Native | Dense vector, native RRF retriever/fusion | Yes | AWS/Elastic |
| Typesense | Built-in | Native | Native | Yes, built-in (rank-fusion hybrid; verify current default fusion weights) | Yes | Typesense Cloud |
| Meilisearch | Built-in | Native | Limited | Yes, built-in hybrid (BM25 + embeddings) since v1.6+ | Yes | Meilisearch Cloud |
| Lunr.js / Pagefind | No | No | No | No | Client-side | N/A |
| Pinecone / Qdrant / Weaviate | N/A (Qdrant/Weaviate: native BM25 sparse-vector support) | Filter | No | Yes | Qdrant/Weaviate yes | Yes |
Capability availability shifts release to release (Algolia added native vector fusion; Qdrant and Weaviate added native BM25). Reverify each engine's current docs before finalizing a recommendation — do not rely on this table's exact wording beyond "capability exists in some form."
For most applications, PostgreSQL is good enough. Evaluate dedicated engines only when you hit real limits.
tsvector/tsquery — full-text search with language-aware stemming, ranking, and phrase matching. Create a tsvector column, build a GIN index, query with tsquery. Supports ts_rank for relevance scoring and ts_headline for result highlighting.
pg_trgm — trigram-based fuzzy matching. Handles typos and partial matches. Create a GIN index with gin_trgm_ops. Use similarity() or word_similarity() for ranking. Combine with tsvector for both exact and fuzzy results.
GIN indexes — generalized inverted indexes that make full-text and trigram queries fast. Essential for any non-trivial search workload in PostgreSQL.
When to outgrow PostgreSQL search:
tsvector providesIndexing pipeline: Extract data from source (database, CMS, API) → transform into search documents (flatten, denormalize, enrich) → push to search index. Keep the pipeline idempotent — re-running should produce the same index state.
Index schema design: Define fields, types, and which fields are searchable vs. filterable vs. stored-only. Denormalize aggressively — search indexes are not relational databases. Include all data needed for display in search results to avoid hydration round-trips.
Analyzers and tokenizers: Control how text is broken into searchable tokens. Standard analyzer handles most Western languages. Configure language-specific analyzers for stemming. Add custom analyzers for domain-specific tokenization (email addresses, part numbers, code identifiers).
Synonyms and stop words: Maintain a synonym list for domain terms (e.g., "laptop" = "notebook"). Remove low-value stop words from indexing but keep them in phrase queries. Synonym expansion happens at index time or query time — query-time is more flexible, index-time is faster.
Index lifecycle: Never mutate a live index schema in production. Use index aliases: build new index → swap alias → delete old index. This gives zero-downtime reindexing. For incremental updates, use upsert operations keyed on document ID.
BM25 scoring — the default ranking algorithm in most search engines. Balances term frequency (how often the term appears in a document) against inverse document frequency (how rare the term is across all documents). Handles document length normalization automatically.
Field boosting — weight fields differently. Title matches are typically 3-5x more important than body matches. Boost exact matches over partial matches. Common hierarchy: title > headings > tags > description > body.
Custom ranking signals — layer business logic onto relevance scores. Common signals: popularity (views, purchases), recency (newer content ranked higher via decay function), editorial boost (curated/featured content), user behavior (personalized ranking from click history).
Query understanding — improve what the user meant, not just what they typed. Spell correction (did-you-mean). Intent detection (navigational vs. informational queries). Query expansion (add related terms). Query relaxation (broaden if too few results).
Relevance tuning loop — ship a baseline, measure with analytics, tune iteratively, repeat. Each iteration should move a measurable metric (zero-result rate, MRR, CTR at position 1) not just "feel better."
Use this pattern when semantic search is a product feature, not just an LLM context retriever.
Request contract:
query: required non-empty string, with length and character-class limitslimit: bounded integer, default 10, hard max 50offset or cursor: optional pagination, only if the engine supports stable
orderingfilters: allowlisted fields only; never pass arbitrary filter JSON through
to the search engineResponse contract:
Operational rules:
POST.For product search, semantic similarity is usually one leg of ranking, not the whole ranker. Typical final scoring candidates:
Do not hand-pick weights from intuition. Calibrate weights against judged queries and analytics slices. If scores come from different systems and cannot be normalized safely, prefer rank-based fusion such as RRF before applying business boosts.
Estimate before choosing a vector index type — memory, not disk, is usually the binding constraint for in-memory ANN indexes (HNSW).
Formula: raw_bytes = num_vectors × dims × bytes_per_value. Add HNSW graph
overhead on top (graph edges + metadata); treat 20-50% of raw size as a
starting planning range and verify the actual multiplier against the specific
engine's current documentation before sizing hardware.
Worked derivation — 1,000,000 documents, 768-dimension embeddings (a common mid-size embedding model output), three storage precisions:
| Precision | Bytes/dim | Raw size = 1,000,000 × 768 × bytes/dim | Raw size (GiB) |
|---|---|---|---|
| float32 (full precision) | 4 | 3,072,000,000 bytes | ≈ 2.86 GiB |
| halfvec / float16 | 2 | 1,536,000,000 bytes | ≈ 1.43 GiB |
| binary quantized (1 bit) | 0.125 | 96,000,000 bytes | ≈ 0.09 GiB |
Adding a 30% HNSW graph overhead to the float32 case: 2.86 GiB × 1.3 ≈ 3.72 GiB
of working memory for one million 768-dim vectors — before the rest of the
document payload (text, metadata) is counted.
How to use this: re-run the same formula with your own num_vectors and
dims — never scale a neighboring number instead of recomputing from your
corpus size and embedding dimension. Binary and scalar quantization trade
recall for memory; validate the recall drop against your judged-query set
before committing to a lower precision in production. Confirm current
quantization support (halfvec, binary, product quantization) in the specific
engine's docs — pgvector, Elasticsearch, OpenSearch, and Qdrant each expose
different quantization options and defaults that change across releases.
Symptoms that get the wrong fix more often than the right one:
LIKE '%term%' scan first. Many "we need Elasticsearch" tickets are fixed by
an index that was never created.Aggregation queries — compute filter counts alongside search results. Show users how many results match each filter value before they click. This is where PostgreSQL struggles and dedicated engines shine.
Hierarchical facets — nested categories (e.g., Electronics > Phones > Smartphones). Implement with path-based tokens or nested aggregations. Allow drill-down and drill-up navigation.
Range facets — numeric or date ranges (price $0-50, $50-100; last 24 hours, last week). Pre-define meaningful ranges or use dynamic bucketing.
Multi-select vs. single-select — multi-select filters use OR within a facet and AND across facets. Single-select uses exclusive selection. Multi-select requires disjunctive faceting (count all values, not just those matching current filter).
Performance — apply filters before scoring when possible (filter context vs. query context in Elasticsearch). Cache frequently used filter combinations. Pre-compute facet counts for high-traffic pages.
Prefix matching — match documents where a field starts with the typed characters. Fast but limited to prefix positions.
Edge n-gram indexing — at index time, generate token prefixes ("search" → "s", "se", "sea", "sear", "searc", "search"). Converts prefix queries into exact match lookups, which are faster.
Completion suggesters — dedicated data structures optimized for prefix completion. Elasticsearch has a built-in completion suggester. Algolia and Typesense handle this natively.
Client-side debouncing — wait 150-300ms after the user stops typing before sending the query. Reduces server load and prevents UI flicker. 200ms is a good default.
Highlight matching terms — show users why a result matched by bolding the matching portion. Most search engines provide highlighting out of the box.
Zero-state and popular suggestions — before the user types, show trending queries, recent searches, or popular categories. Pre-compute these from search analytics data.
What to track: every query (with timestamp, user ID, session), every click (which result, position clicked), conversions (did the user complete their goal after clicking), zero-result queries, query refinements (user searched again after seeing results).
Zero-result queries — the most actionable metric. These reveal content gaps (you don't have what users want) or search quality issues (you have it but search can't find it). Review weekly and take action: add content, add synonyms, or fix indexing.
Click position — which position users click in search results. If users consistently click result #4 instead of #1, your relevance ranking is wrong. Use mean reciprocal rank (MRR) as a quality metric.
Build the feedback loop: search query → user clicks result → click signals feed back into relevance tuning (boost documents that get clicked, demote documents that get skipped). This is the core mechanism for search quality improvement over time.
Analytics are not enough on their own. Keep a judged-query set for the product's most important search intents and re-run it whenever you change ranking, analyzers, synonyms, or business boosts.
Minimum loop:
Use click data to find candidates for the judged set, but do not let click-through alone define quality. Position bias, sparse traffic, and merchandising effects can hide bad ranking decisions.
LIKE '%query%' at scale — full table scan, no index usage, gets slower linearly with data growth. Use proper full-text search instead.tsvector would handle the workload for the next two years.Before calling a search design or implementation ready:
Recipes keyed to common search implementation moments. Each lists the shortest path using patterns above.
Σ 1/(k + rank) across both lists, where k=60 is a safe default.products_v2); leave the live alias pointing to products_v1.products_v2; writes to products_v1 continue serving production traffic.products_v2 before swap.products_v1, add products_v2 in a single alias-update call.products_v2; monitor error rate and latency for 10 minutes.products_v1 only after the monitoring window is clean; keep it for one more deploy cycle if in doubt.Gate before invoking any foundation below: Each foundation has a
When to Apply/When to Skipsection. If your task matches a skip-condition, route to the foundation it names instead — don't pull in primitives the task doesn't need.
Search engines, managed services, and client libraries evolve frequently. Verify current information before recommending specific versions or providers.
Before applying this skill on a non-trivial task, read learnings.consolidated.md in this directory (and learnings.md if present).
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
Frequently asked questions
Build search features that return the right results, fast.
The source record exposes this install command: npx skills add https://github.com/vasilyu1983/AI-Agents-public --skill "frameworks/shared-skills/skills/software-search". Inspect the command and pinned source before running it.
The pinned source record declares support for: codex, claude code.
Static rules flagged network in the source; the page lists the matching lines and excerpts.
Alternatives
upex-galaxy/agentic-qa-boilerplate
Atlassian CLI (official `acli` binary, v1.3+ as of 2026) for Jira Cloud, Confluence Cloud, and org admin tasks from the terminal. Use whenever the user wants to create, view, edit, transition, assign, clone, archive, comment on, link, or bulk-operate on Jira work items; list or manage projects, boards, sprints, filters, dashboards, or custom-field definitions; create or update Confluence spaces, pages, or blog posts; activate/deactivate users at the org level; or authenticate to Atlassian from a
vasilyu1983/AI-Agents-public
Builds analytics engineering layers for metrics, contracts, and BI-ready models. Use when shaping dbt or SQLMesh marts, metric governance, lineage, or data quality.
PramodDutta/qaskills
Test automation with Gauge framework using Markdown specifications, step implementations in Java/Python/JavaScript/Ruby/C#, concepts, data-driven testing, and living documentation.
jojoprison/mnemo
Vault health audit — orphans, broken links, type-aware stale-review candidates, growth stats. Use whenever the user mentions vault maintenance, orphans, broken links, 'is my vault clean', 'проверь vault', 'сироты', 'битые ссылки', 'здоровье базы знаний', 'здоровье памяти', 'здоровье обсидиана', or asks for vault statistics — or proactively after creating 3+ notes in a session, after mass note creation, or when health checks haven't run in a while; the longer between checks, the more invisible or