On the limits of retrieval-augmented generation