Azure-Samples / ai-rag-chat-evaluator

Tools for evaluation of RAG Chat Apps using Azure AI Evaluate SDK and OpenAI
MIT License
162 stars 58 forks source link

Update to new Protocol response format, use JMESPath expressions #92

Closed pamelafox closed 1 month ago

pamelafox commented 1 month ago

Purpose

This PR updates the evaluator to assume that the server uses the new AI Protocol, which has a slightly different JSON response format. Corresponding changes in azure-search-openai-demo are here: https://github.com/Azure-Samples/azure-search-openai-demo/pull/1682

At the same time, this PR adds JMESPath expression support so that developers can easily customize the location of the answer and context in the returned JSON, so that you can use it with older protocol versions or your own custom format.

Does this introduce a breaking change?

[X] Yes - Developers should add the JMESPath parameters to match their response format if using this with a Chat App using older protocol.
[ ] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test