AudioMuse-AI icon indicating copy to clipboard operation
AudioMuse-AI copied to clipboard

knowledge_lookup: an artist missing from the library is substring-matched to an unrelated artist

Open JuanDArdilaG opened this issue 1 month ago • 2 comments

Version: 3.6.3 (Navidrome, Ollama qwen3.5:27b-int4)

What happens

The Instant Playlist prompt 80s synthpop hits makes the brainstorm recipe suggest the seed artists Depeche Mode and a-ha. a-ha is not in my library. Instead of skipping that seed, _artist_similarity_api_sync (tasks/ai/tool_impl.py) falls back to a fuzzy ILIKE lookup. That lookup strips spaces and dashes and takes the shortest author that contains aha:

select author from (select distinct author from score
  where replace(replace(author,' ',''),'-','') ilike '%aha%') x
order by length(author) limit 1;
-- Taj Mahal & James Cotton

The artist:a-ha channel then adds 75 songs from artists that sound like Taj Mahal (B.B. King, Blind Willie McTell, Carlos Gardel...). The resulting "80s synthpop" playlist is mostly blues and tango. The log shows nothing wrong:

gate: artist:a-ha emptied by the grounding filter; kept it ungated
artist:a-ha: +75

Expected

A seed artist that does not match anything in the library should be dropped, with a log line such as seed artist 'a-ha' not in library, skipped. It should not be replaced by any author that happens to contain the same three letters.

Possible fix

  • Accept a fuzzy match only above a minimum similarity score, for example with the rapidfuzz path that already exists, and never on a bare substring.
  • Or skip the ILIKE fallback for seeds that come from the brainstorm recipe, because these are LLM guesses and not names the user typed.

JuanDArdilaG avatar Oct 14 '26 17:10 JuanDArdilaG

Hi and thanks for the feedback. I raised a fix in this PR:

  • https://github.com/NeptuneHub/AudioMuse-AI/pull/1008

The new PR image will be ready in around 1 hour. When ready can you check and confirm that is fixed ?

NeptuneHub avatar Nov 12 '26 21:11 NeptuneHub

We've closed the issue now, so if you like AudioMuse-AI and want to improve self-hosted music, why not consider giving us a star here on GitHub? It helps the project grow!

github-actions[bot] avatar Nov 13 '26 15:11 github-actions[bot]