{ "schema_version": 2, "kind": "shortening-method", "format": "agent-skill", "id": "search-keywords", "name": "Search keywords", "category": "Agent context", "summary": "Reduce a question to the terms and constraints that help retrieve its answer.", "use_cases": [ "Search queries", "Retrieval context", "Document lookup" ], "word_count": 121, "url": "https://sho.rten.it/methods/search-keywords/", "instructions_url": "https://sho.rten.it/methods/search-keywords/SKILL.md", "skill_url": "https://sho.rten.it/methods/search-keywords/SKILL.md", "json_url": "https://sho.rten.it/methods/search-keywords/llms.txt", "plain_text_url": "https://sho.rten.it/methods/search-keywords/prompt.txt", "license": "MIT", "sources_url": "https://sho.rten.it/sources/#search-keywords", "skill_name": "search-keywords", "skill_description": "Reduce a question to the terms and constraints that help retrieve its answer. Use for Search queries, Retrieval context, Document lookup.", "agents_md_url": "https://sho.rten.it/methods/search-keywords/AGENTS.md", "sources": [ { "title": "run-llama/llama_index ยท DEFAULT_QUERY_KEYWORD_EXTRACT_TEMPLATE_TMPL", "url": "https://github.com/run-llama/llama_index/blob/5be447943168d8ac800901a623ca50bdbdee1c8e/llama-index-core/llama_index/core/prompts/default_prompts.py", "repository": "https://github.com/run-llama/llama_index", "revision": "5be447943168d8ac800901a623ca50bdbdee1c8e", "path": "llama-index-core/llama_index/core/prompts/default_prompts.py", "license": "MIT", "license_url": "https://github.com/run-llama/llama_index/blob/5be447943168d8ac800901a623ca50bdbdee1c8e/llama-index-core/LICENSE", "license_file": "licenses/run-llama--llama_index.txt", "copyright": "Copyright (c) Jerry Liu", "repository_stars": 52120, "checked_at": "2026-09-10", "license_scope": "Source is in the repository or package covered by the linked MIT license; no source-file license override was present.", "adaptation": "Adapted the query-keyword extractor, not the generic document summarizer or SQL prompts in the same source file. Retained question-focused keyword extraction and stopword removal. Added protection for exact versions, negation, exclusions, and multiword names; replaced the template variable with a usable default.", "record": "DEFAULT_QUERY_KEYWORD_EXTRACT_TEMPLATE_TMPL" } ], "instructions": "Extract a compact set of search terms from the supplied question. Choose the entities, technical terms, and distinguishing conditions that would help retrieve an answer. Preserve multiword names when splitting them would change their meaning. Keep exact identifiers, versions, dates, and quoted phrases when they constrain the search.\n\nRemove greetings, filler, and function words that do not affect retrieval. Retain negation and exclusions when they change which results are relevant. Do not answer the question, add related facts, or invent synonyms that broaden its scope.\n\nUse the requested maximum number of terms; otherwise aim for five to ten useful terms without padding. Return one comma-separated line. If an exclusion would be ambiguous as keywords, express it as a short explicit phrase.", "example": { "before": "Please help me find official documentation for migrating an existing PostgreSQL 15 database to PostgreSQL 16 on Ubuntu 24.04. I am specifically looking for instructions that use pg_upgrade, and the source database has the PostGIS extension installed. This is a server installed directly on the machine. Please exclude Docker instructions and managed cloud database migration services. I do not need a general introduction to relational databases or an explanation of what PostgreSQL does. I have repeated the versions because instructions for a fresh PostgreSQL installation or for a different version are not what I need.", "after": "official documentation, PostgreSQL 15 to PostgreSQL 16, Ubuntu 24.04, pg_upgrade, PostGIS, existing database migration, without Docker, exclude managed cloud services, exclude fresh installation", "context": "Fictional database migration search", "must_preserve": [ "Official documentation for an existing database migration", "PostgreSQL 15 to PostgreSQL 16; Ubuntu 24.04; pg_upgrade; PostGIS", "Direct installation on the server", "Exclude Docker, managed cloud services, and fresh-installation instructions" ], "omitted": [ "Greetings, repeated version emphasis, and unrelated introductory material" ], "kind": "illustrative" } }