sdmrec-docker / resources /prompt_vllm.md
Oleh Kuznetsov
feat(rec): Finalize recommendations (almost done)
bdaca7e

Purpose and Context

Given a user-generated Search Query describing music they wish to explore, you must create a set of short, diverse, search-optimized rewrites that can be issued ALONGSIDE the original query to maximize recall while preserving precision.

Instructions

  1. Generate distinct rewrites of the Search Query, for each of the five Rewrite Categories.
  2. Respond in JSON, adhering strictly to the Reference Output Format.

Music Genre Descriptor Keyword Taxonomy

  • Subjective Characteristics:
    • Emotional & perceptual qualities (uplifting, melancholic, dreamy), thematic resonance
    • Describe the listener's inner feeling
  • Purpose-Based Characteristics:
    • Intended context / scenario (workout, study, dinner party)
    • Describes listening setting, context, suitable activities
  • Technical Characteristics:
    • Musical & production attributes (instrumentation, timbre, tempo, lo-fi)
    • Describes how the sound is made

Rewrite Categories Specifications

  • General Rewrite:
    • Core/Baseline concise, clean, descriptor-based rewrite of the original query that combines all crucial descriptors available.
    • Must follow exact descriptor wording of the original
  • Subjective Rewrite:
    • Concise, clean, descriptor-based rewrite, focused solely on Subjective Characteristics descriptors from the original query
    • Must adhere to original wording of the descriptors while incorporating new diverse perspectives to maximize recall and coverage
  • Purpose Rewrite:
    • Concise, clean, descriptor-based rewrite, focused solely on Purpose-Based Characteristics descriptors from the original query
    • Must adhere to original wording of the descriptors while incorporating new diverse perspectives to maximize recall and coverage
  • Technical Rewrite:
    • Concise, clean, descriptor-based rewrite, focused solely on Technical Characteristics descriptors from the original query
    • Must adhere to original wording of the descriptors while incorporating new diverse perspectives to maximize recall and coverage
  • Curiosity-driven Rewrite:
    • Concise, clean, descriptor-based exploratory rewrite that creatively expands, reinterprets, or provides a curiosity-driven alternative perspective on the original query
    • Must be grounded in original query, but be exploratory in nature, introducing novel semantic information

Rewrite Generation Procedure

  1. Extract Music Genre Descriptor Keywords from the original query, adhering to Music Genre Descriptor Keyword Taxonomy.
  2. Formulate a Collection of Rewrites:
    • If the Search Query does not clearly hint at a particular descriptor keyword category, OMIT rewrites focused on that category (Subjective, Purpose-based, Technical).
    • ALWAYS include General and Curiosity-driven rewrites
    • Avoid redundancy; ensure each rewrite provides unique value
    • Maintain alignment with the user's original intent
    • Clarify ambiguities and remove noise
    • Rephrase negations into actionable positives (e.g., "not loud" → "quiet, gentle").
    • Replace vague adjectives with precise descriptors when contextually inferable.
    • Retain poetic or artistic language that strongly conveys a distinct aesthetic or emotional intent.
    • Keep rewrites short, clear, expressive, and optimized for search, no more then 10-15 words.
    • Preserve unique high-entropy descriptors that effectively signal specific musical genres or styles.

Reference Output Format

{{
    "general": "Concise, clean, descriptor-based rewrite of the original query that combines all crucial descriptors available.",
    "subjective": "Concise, clean, descriptor-based rewrite, focused solely on **Subjective Characteristics** descriptors from the original query (if applicable).",
    "purpose": "Concise, clean, descriptor-based rewrite, focused solely on **Purpose-Based Characteristics** descriptors from the original query (if applicable).",
    "technical": "Concise, clean, descriptor-based rewrite, focused solely on **Technical Characteristics** descriptors from the original query (if applicable).",
    "curiosity": "Concise, clean, descriptor-based exploratory rewrite that creatively expands, reinterprets, or provides a curiosity-driven alternative perspective on the original query."
}}

Examples

Example #1

Search Query: "I'm trying to find music that's like, energetic but chill at the same time? Maybe something electronic or synth-y, not too loud, but still good to listen to when studying or just relaxing? Nothing aggressive."

Response:

{{
    "general": "Chill-energetic electronic synth tracks, gentle volume, study-relax friendly",
    "subjective": "Relaxed yet lively synth-driven melodies and beats",
    "purpose": "Background electro music ideal for studying and unwinding",
    "technical": "Mid-tempo synth textures, smooth pads, restrained percussion",
    "curiosity": "Dreamlike electronica that subtly energizes calm moments"
}}

Example #2

Search Query: "What's that style where people rap but the beats are really slow and kind of dreamy, lo-fi sounding, very chilled and not flashy?"

Response:

{{
    "general": "Slow dreamy lo-fi rap with chilled, subdued beats",
    "subjective": "Chilled introspective verses with gentle vocal delivery",
    "purpose": null,
    "technical": "Lo-fi downtempo percussion, sparse keys, soft basslines",
    "curiosity": "Ambient spoken-word rhythms floating in misty soundscapes"
}}

Example #3

Search Query: "Can you suggest something that's just... really dark, intense, heavy? Something like heavy metal but slower, with deep vocals, doom-like, you know, just something grim."

Response:

{{
    "general": "Slow heavy metal, deep vocals, dark intense doom mood",
    "subjective": "Bleak and crushing riffs delivering oppressive intensity",
    "purpose": null,
    "technical": "Downtuned guitars, slow tempos, sustained distortion, guttural vocals",
    "curiosity": "Dragged-out metallic dirges evoking existential dread"
}}

Example #4

Search Query: "Relaxing piano music"

Response:

{{
    "general": "Relaxing calming solo piano pieces with gentle melodies",
    "subjective": null,
    "purpose": "Quiet background piano for reflection or meditation sessions",
    "technical": "Sparse, slow-tempo piano arrangements with soft dynamics",
    "curiosity": "Minimalist keys exploring silence, resonance, and stillness"
}}

Example #5

Search Query: "I'm throwing a dinner party—need some elegant background music. Nothing loud or distracting, just classy."

Response:

{{
    "general": "Elegant classy background music, subtle volume for dinner",
    "subjective": null,
    "purpose": "Classy ambient soundtrack optimized for sophisticated gatherings",
    "technical": "Soft acoustic instrumentation, low dynamics, tasteful arrangements",
    "curiosity": "Delicate soundscapes adding quiet charm to refined evenings"
}}

Example #6

Search Query: "Music that's just dreamy and sad, something melancholy."

Response:

{{
    "general": "Dreamy melancholic soundscapes evoking gentle sadness",
    "subjective": "Soft, sorrowful textures fostering gentle introspection",
    "purpose": null,
    "technical": null,
    "curiosity": "Ethereal tones merging wistful melodies with subtle haze"
}}

Example #7

Search Query: "Something calming, very minimalist, just quiet sounds."

Response:

{{
    "general": "Calming minimalist quiet music built from delicate tones",
    "subjective": null,
    "purpose": null,
    "technical": "Sparse instrumentation, extended rests, very soft volume dynamics",
    "curiosity": "Experimental near-silence punctuated by graceful sonic wisps"
}}

Example #8

Search Query: "Looking for loud, energetic dance tracks. Something that just makes you move."

Response:

{{
    "general": "Loud high-energy dance tracks engineered to ignite movement",
    "subjective": null,
    "purpose": "Party-ready grooves perfect for vigorous dancing and cardio",
    "technical": "Fast kick drums, driving basslines, dynamic drops, bright leads",
    "curiosity": "Electrifying rhythms unleashing explosive, unexpected groove shifts"
}}

Example #9

Search Query: "Simple guitar music, maybe acoustic, easygoing."

Response:

{{
    "general": "Easygoing simple acoustic guitar pieces with pleasant melodies",
    "subjective": null,
    "purpose": null,
    "technical": "Light strumming patterns, clean chords, relaxed tempo pace",
    "curiosity": "Laid-back six-string sessions exploring warm harmonic simplicity"
}}

Example #10

Search Query: "Epic cinematic tracks, dramatic and powerful."

Response:

{{
    "general": "Epic cinematic tracks with dramatic, powerful orchestral intensity",
    "subjective": "Grand emotional swells evoking awe and tension",
    "purpose": null,
    "technical": "Layered orchestration, booming percussion, soaring brass crescendos",
    "curiosity": "Expansive score fragments exploring colossal orchestral textures"
}}

Search Query

{query}