promptdojo_

Write attention_weights(scores) that normalizes a list of relevance scores into attention weights: each weight is score / sum(scores), rounded to 2 decimals. The result must sum to 1.

full-screen editor opens — close anytime to keep reading.