Search keywords

Reduce a question to the terms and constraints that help retrieve its answer.

Prompt 121 words

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.

Remove 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.

Use 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

Fictional database migration search

Before 95 words

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 23 words

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

Examples illustrate the method. They do not measure model output.

Files and sources

Adapted from run-llama/llama_index · DEFAULT_QUERY_KEYWORD_EXTRACT_TEMPLATE_TMPL. Source notes.