AI-GENERATED PROJECT / 2026

Spotify Radio Architect

A Python classification and publishing tool for a 2,604-track Spotify playlist.

This write-up—was generated with AI.

2,604tracks classified
20destination playlists
233held for review
0remote mismatches

What the system had to work around

Spotify supplied playlist reads and writes, but this development-mode app did not have dependable per-track genre or audio-feature data. Spotify therefore became the source and destination layer, while Last.fm supplied community tags for tracks, albums, and artists. The tool does not download or inspect audio.

DATA ACCESS

No audio dependency

The classifier operates on metadata and tags, so it can run without storing copyrighted audio files.

DATA QUALITY

Last.fm tags are noisy

Coverage differs by song, counts are user-generated, and some tags describe fandoms rather than music.

SAFETY

The source is immutable

The source playlist ID is rejected as a publish destination. Every write goes to a generated playlist.

API LIMITS

Network calls need state

Spotify pagination, 100-item write batches, Last.fm rate limits, and retries are handled explicitly.

A local pipeline with inspectable artifacts

01 / EXPORT Spotify snapshot

OAuth PKCE, paginated reads, normalized track records, and a saved source snapshot.

02 / ENRICH Last.fm cache

Track, album, primary-artist, and secondary-artist tags are cached separately.

03 / CLASSIFY Rule engine

Weighted evidence is scored against 19 programmed stations and a review bucket.

04 / REVIEW + WRITE Report and publisher

HTML and CSV inspection precede dry-run, batched writes, saved IDs, and remote verification.

Track evidence is allowed to overrule the artist

The initial version treated artist genres as the main signal. That failed on artists whose catalog spans several styles. Version 4 uses an evidence hierarchy and changes the multipliers based on what is available for each individual song.

TRACK EVIDENCE AVAILABLE

1.00 track / 0.58 album / 0.14 artist

The track dominates. Album and artist tags only add context.

ALBUM EVIDENCE AVAILABLE

0.84 album / 0.24 artist

The album becomes the main signal when the track has no useful tags.

ARTIST-ONLY FALLBACK

0.72 primary artist

Artist evidence remains usable but carries less authority. Featured artists receive another 0.45 multiplier.

TAG COMBINATION

Strongest vote plus limited reinforcement

Duplicate evidence keeps its strongest weight and adds 18% of the weaker supporting vote.

Each station defines primary tags, secondary includes, exclusions, optional year ranges, and whether a primary tag is mandatory. Generic labels such as pop, rock, hip hop, and electronic receive lower multipliers, especially when they come from artist-level evidence. Exclusion weight reduces a score multiplicatively, and final scores use log1p to limit the effect of many overlapping tags.

A song is assigned only when the winning score reaches 0.19. Confidence is recorded as (winner - runner_up) / winner. The current configuration keeps one destination per track, but stores every score so overlap can be reviewed later.

How the 2,604 assignments were decided

Track tags1,001 / 38.4%
Album tags with artist context732 / 28.1%
Artist fallback638 / 24.5%
Missing or below threshold233 / 8.9%

The review report exposes the selected station, confidence margin, evidence source, normalized tags, and all candidate scores. A CSV override file can replace any assignment without changing classifier code.

The final station set

349 tracksHeadliners

Mainstream pop, dance-pop, and radio-sized hooks.

102 tracksLeft Dial

Indie, art, bedroom, and alternative pop.

101 tracksSeoul Circuit

K-pop, J-pop, C-pop, and East Asian hip-hop.

48 tracksNeon FM

Synthpop, new wave, electroclash, and retro-futurism.

269 tracksThe Low End

Hip-hop, boom bap, conscious, underground, and classic rap.

62 tracksTrapline

Trap, drill, cloud rap, emo rap, and southern rap.

242 tracksAfter Dark

Contemporary R&B, alternative R&B, neo-soul, and slow jams.

277 tracksRust Radio

Alternative, indie, garage, grunge, and post-grunge rock.

111 tracksRiot FM

Punk, pop-punk, emo, skate punk, and post-hardcore.

42 tracksThe Pit

Metal, metalcore, nu metal, industrial, and hardcore.

205 tracksChrome

House, techno, trance, progressive house, and club music.

92 tracksBassline

Dubstep, drum and bass, future bass, and breakbeat.

45 tracksNight Drive

Ambient, downtempo, trip-hop, chillout, and shoegaze.

85 tracksGolden Hour

Soul, funk, disco, Motown, boogie, and warm grooves.

28 tracksDustbowl

Country, folk, Americana, roots, and storytelling.

52 tracksWorldwide FM

Reggae, Latin, Afrobeats, dancehall, ska, and global music.

66 tracksThe Boulevard

Classic, blues, southern, psychedelic, and arena rock.

68 tracksScore FM

Soundtracks, orchestral scores, classical, and instrumentals.

233 tracksOpen Frequency

Missing, ambiguous, or below-threshold evidence.

Decisions that affected the result

RULE ENGINE VS. AUDIO MODEL

Deterministic metadata won

It is reproducible, cheap to rerun, and easy to inspect. It cannot detect tempo, timbre, or mood directly.

PRECISION VS. COVERAGE

Uncertain tracks stay uncertain

Required primary tags and the 0.19 floor reduce false positives but leave 233 tracks for review.

FRESHNESS VS. RATE LIMITS

Enrichment is cached

The cache contains 2,566 track, 1,986 album, and 1,609 artist records. Refreshing is explicit.

ONE STATION VS. OVERLAP

Assignments are exclusive

This avoids duplicate playlists at the cost of hiding some genuine cross-genre relationships.

The last taxonomy change split a broad pop station into Headliners and The Avenue. Removing pop rock and adult contemporary from Headliners produced a separate 127-track station without introducing overlaps.

Writes are explicit and repeatable