Azure OpenAI Chat Completions - Confidence Score

Vladislavs Fedotovs 20 Reputation points
2024-01-30T08:26:49.15+00:00

Is there a way to retrieve the confidence score of an OpenAI chat completion response in Azure?

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,644 questions
{count} votes

Accepted answer
  1. AshokPeddakotla-MSFT 30,511 Reputation points
    2024-02-22T07:01:29.3833333+00:00

    Apologies for the delayed response. Did you try as below? User's image

    User's image

    You can also try with below python sample and let me know if that helps.

    import openai
    openai.api_key = "YOUR_API_KEY"
    
    prompt = "
    response = openai.Completion.create(
        engine="davinci",
        prompt=prompt,
        max_tokens=10
    )
    
    print(response.choices[0].text)
    print("Confidence Score:", response.choices[0].confidence)
    
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful