How to implement RAG with index mapping

I need to create a RAG application which use mappings of my index to create query and execute and then response back.can i get any idea to do this? does vectorise and implement RAG or my query which would be better to implement?