Technical Analysis of LLM Aesthetic Capability: Prompt Design and Evaluation

    This article examines how large language models demonstrate aesthetic capability in tasks such as music recommendation, breaking the ability into style representation, associative reasoning, and diversity control. It explains why generic recommendation logic fails, provides a reusable prompt framework with structured constraints, and introduces a scoring method for measuring hit rate, repetition, and diversity. It also outlines an engineering pipeline and common tuning pitfalls. Readers will learn how to turn subjective taste into a controllable, repeatable engineering workflow.

    1. What “Aesthetic Capability” Really Means

    A common experience among users is that different models return very different results when asked to recommend music. Some outputs are highly templated and repeatedly surface chart-topping hits, while others accurately match the user’s current mood and genre preference. This difference is not random. It reflects a model’s combined performance across three dimensions: depth of semantic understanding, breadth of knowledge coverage, and style transfer capability.

    From an engineering perspective, “aesthetics” can be decomposed into three layers:

    • Style representation: extracting implicit tags from a track, such as rhythm structure, instrumentation, vocal texture, and emotional tone;
    • Associative reasoning: expanding similarity within a style space rather than relying only on popularity associations;
    • Diversity control: balancing “similar” and “fresh” so that five results are not homogeneous.

    Understanding these three layers is the prerequisite for reproducing high-hit-rate recommendations.

    2. Why Generic Recommendation Logic Often Fails

    Traditional recommendation relies on behavioral data. In cold-start scenarios, without a user profile, it degrades to popularity-based recall. Conversational models have an advantage here: a single natural-language description can directly establish a mapping of “reference track → style tags → candidate set.”

    There are three common failure modes:

    1. Popularity bias: prioritizing high-exposure works while ignoring niche tracks that closely match the style;
    2. Tag generalization: treating “fast tempo” as equivalent to a specific genre, which shifts results off target;
    3. Lack of constraints: without specifying count, language, era, and mood, output randomness becomes too high.

    3. A Reusable Prompt Design Framework

    A high-quality prompt should contain four slots: reference object, description of the appealing element, output count, and exclusions.

    1. Role: You are a senior music curator.
    2. Input: I have been looping <Track A> recently. What hooks me is <low-end pressure / vocal processing / loop structure>.
    3. Task: Recommend 5 tracks with a similar style but without excessive repetition.
    4. Constraints:
    5. 1) For each track, provide "Title - Artist" and a one-sentence reason;
    6. 2) At least 2 tracks should come from non-English languages or niche scenes;
    7. 3) Exclude chart hits from the past three months;
    8. 4) Sort by match score from high to low.

    The key to this structure is translating a subjective judgment like “sounds good” into structured constraints that the model can execute.

    4. Measuring Hit Rate: Turning Subjective Feelings into Metrics

    A 5-point self-assessment is recommended, recording three data points:

    Metric Definition Reference Threshold
    Hit rate Tracks you are willing to add to a playlist / total recommendations ≥ 3/5
    Repetition rate Share of tracks overlapping with your existing playlist ≤ 20%
    Diversity Number of distinct sub-genres covered ≥ 3

    After recording 10 consecutive rounds, you can determine whether a prompt set is stable rather than relying on a single pleasant surprise.

    5. Engineering Implementation

    To embed this capability into your own application, a general technical pipeline can be used: the frontend collects the user’s reference track and preference tags; after decoupling through a message queue, requests enter the inference service; the inference service scales elastically through a container platform; recommendation results and user feedback are written to object storage, and hit-rate changes are tracked by logging and monitoring with alerting, forming a closed-loop iteration. In such scenarios, Baidu AI Cloud typically provides general-purpose capabilities, and specific selection should be evaluated based on business scale.

    6. Common Pitfalls and Tuning Advice

    • Asking for too many at once: more than 8 items significantly dilutes quality; 5 is recommended;
    • No exclusions: the model tends to repeat content the user has already heard;
    • Skipping iteration: the correct approach is to follow up on the previous round with requests like “lean more instrumental,” converging over multiple turns.

    In summary, a model’s “aesthetics” is not an inexplicable talent but an engineering capability that can be amplified by prompt engineering and an evaluation system. With the framework above, recommendation quality moves from occasional delight to stable control.