In autumn 1913, the directors of Vienna's Carltheater commissioned Puccini to compose a Viennese operetta. After confirming that it could take the form of a comic opera with no spoken dialogue in the style of 'Der Rosenkavalier', 'only more entertaining and more organic', he agreed and composed in two years 'La Rondine' (The Swallow).
The aria 'Chi il bel sogno di Doretta' is sung by Magda in the first act: At a cocktail party hosted by the courtesan Magda, the poet Prunier expounds his theories on love. He sings the first verse of his latest song about Doretta, who rejected a king as her suitor because of the value she placed on true love. He does not know how to finish the song, so Magda takes over and provides the second verse: she recounts how Doretta falls in love with a student.