Yes, you can retrieve the groundedness score for a RAG-generated answer through the Azure OpenAI API with the azure_search retrieval tool.
Here is the code snippet you can refer to:

In the above code we are using the following key approaches:
- Uses Azure OpenAI API for RAG implementation.
- Retrieves groundedness score via logprobs in API response.
- Leverages the azure_search retrieval tool for data grounding.
- Ensures automated and programmatic access to groundedness metrics.
Hence, the Azure OpenAI API provides an efficient way to fetch the groundedness score directly, enabling scalable and automated evaluation of RAG-generated responses.