Efficient retrieval-augmented generation