Let S be the power series ring or the polynomial ring over a field K in the variables x1, . . . , xn, and let R = S/I, where I is proper ideal which we assume to be graded if S is the polynomial ring. We give an explicit description of the cycles of the Koszul complex whose homology classes generate the Koszul homology of R = S/I with respect to x1, . . . , xn. The description is given in terms of the data of the free S-resolution of R. The result is used to determine classes of Golod ideals, among them proper ordinary powers and proper symbolic powers of monomial ideals. Our theory is also applied to stretched local rings.