https://promptfoo.dev/ logo
Clarifying question about answer-relevance
# ❓|questions
u
I see that answer relevance uses both embedding and textprovider to compute the metric. Is there a way to override the 2 providers? Also to clarify the embedding providers need to have a callEmbeddingApi or callSimilarityApi right?
i
To override both the embedding and text providers separately, you can do something like this:
Copy code
yaml
defaultTest:
  options:
    provider:
      text:
        id: azureopenai:chat:gpt-4-deployment
        config:
          apiHost: xxx.openai.azure.com
      embedding:
        id: azureopenai:embeddings:text-embedding-ada-002-deployment
        config:
          apiHost: xxx.openai.azure.com
It requires an embedding provider with the
callEmbeddingApi
function
u
Great thanks
2 Views