Retrieval-augmented generation: what RAG is and how it actually works