Index of every page on this site: llms.txt
All skills
Run it yourself

Build search applications and query log analytics data with OpenSearch. Use this skill when the user mentions OpenSearch, search app, index setup, search architecture, semantic search, vector search, hybrid search, BM25, dense vector, sparse vector, agentic search, RAG, embeddings, KNN, PDF ingestion, document processing, or any related search topic. Also use for log analytics and observability — when the user wants to set up log ingestion, query logs with PPL, analyze error patterns, set up index lifecycle policies, investigate traces, or check stack health. Activate even if the user says log analysis, Fluent Bit, Fluentd, Logstash, syslog, traceId, OpenTelemetry, or log analytics without mentioning OpenSearch.

Use this Skill: https://skilld.dev/gh/opensearch-project/opensearch-agent-skills/opensearch-skills

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

cloudquerying-opensearch-catalog-assetsreferencesvector-and-hybrid.md

≈913 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Vector and hybrid search

Read every parameter from the live mapping, never from the catalog: dimension, space_type (or method.space_type), method.engine, mode, model_id. AOSS NextGen collections (generation = NEXTGEN) may omit engine and mode.

k-NN fields exist only in AOSS VECTORSEARCH collections and in AOS domains with the k-NN plugin. On SEARCH and TIMESERIES collections, use lexical search.

1. Get the query vector from the same model

A vector from a different embedding model returns confident, wrong results. In order:

  1. Ingest pipeline. If the Index asset's amazon.opensearch::OpenSearchIndex settings or GET /<index>/_settings has index.default_pipeline, read GET /_ingest/pipeline/<id>. A text_embedding processor gives model_id and the field_map target. Use a neural query with that model_id: the cluster embeds the query text with the model that embedded the documents.
  2. Named model. If the field meta or the asset description names a model, it is a hint, not an instruction. Ask the user to confirm it before you embed the query text with it. (In the catalog fields items, read with batch-get-iterable-forms as in SKILL.md step 3, meta is a {key=value} string, not JSON.)
  3. Nothing found. Ask the user for the model or a query vector. Never guess or substitute. You may offer, not run, a keyword search on the text fields, labelled as matching words rather than meaning.

Check that the vector length equals dimension before sending.

{"size": 10, "_source": {"excludes": ["<vector_field>"]},
 "query": {"neural": {"<vector_field>": {"query_text": "<user words>", "model_id": "<id>", "k": 10}}}}
{"size": 10, "_source": {"excludes": ["<vector_field>"]},
 "query": {"knn": {"<vector_field>": {"vector": [<dimension floats>], "k": 10}}}}

Always exclude vector fields from _source. k is 1 to 10,000.

2. Filters

Where Filter
engine lucene (OpenSearch 2.4+) or faiss (2.9+ HNSW, 2.10+ IVF) "filter" inside the knn clause: filtered before the top k.
nmslib, or any Elasticsearch domain No filter inside knn. Put knn in bool.must and the filter in bool.filter: it filters after the top k, so ask for a larger k and say results may be incomplete. For exact results on Elasticsearch 7.9+, use script_score with "lang": "knn", "source": "knn_score" over the filtered set.
AOSS The engine version is not exposed. Try filter inside knn; on a 400, fall back to the row above.

3. Hybrid (lexical + vector)

Requires an existing search pipeline with a normalization-processor. AOS: OpenSearch 2.11 or later only. AOSS: supported, with min_max/l2 normalization and arithmetic_mean, geometric_mean or harmonic_mean combination.

  1. If index.search.default_pipeline is set (same two sources), read GET /_search/pipeline/<id>. Otherwise use only a pipeline the user names.
  2. Confirm the pipeline contains normalization-processor. Never create or change one.
  3. No such pipeline: run the lexical and the vector query separately, show both result lists, and say they were not merged.
POST /<index>/_search?search_pipeline=<id>
{"size": 10, "_source": {"excludes": ["<vector_field>"]},
 "query": {"hybrid": {"queries": [
   {"match": {"<text_field>": "<user words>"}},
   {"knn": {"<vector_field>": {"vector": [<dimension floats>], "k": 50}}}]}}}

Omit ?search_pipeline= when the index default pipeline is the one you checked.

Scores depend on engine and space type; do not compare them across indexes.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert3d4 checks · Risk SAFE
  • Gen Agent Trust Hub5d

    The skill provides a comprehensive set of tools for OpenSearch development, including data ingestion, deployment to AWS/Aiven, and observability analytics. It implements robust security measures such as SSRF protection for remote data loading. Potential security considerations include the ingestion of unstructured data (Indirect Prompt Injection surface) and the transmission of feedback to a third-party domain.

  • Socket3d

    5 alerts: gptSecurity, gptAnomaly

  • Snyk5d

    Risk: CRITICAL · 3 issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at c4f7b1e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 6 days ago
compatibility
Requires Docker and uv. AWS deployment requires AWS credentials.
metadata
{
  "author": "opensearch-project",
  "version": "2.0"
}

README badge

README badge for opensearch-project/opensearch-agent-skills/opensearch-skills