From Retrieval to Generation: Comparing Different Approaches