वैलिडेशन

OpenAI API के साथ AI सिस्टम बनाना

Francesca Donadoni

Curriculum Manager, DataCamp

वैलिडेशन

कई स्क्रीन पर कोड टेस्ट करता डेवलपर

OpenAI API के साथ AI सिस्टम बनाना

वैलिडेशन

 

मॉडल त्रुटियों की संभावनाएँ:

  • संदर्भ को गलत समझना
  • अगर training data biased हो तो आउटपुट में bias बढ़ाना
  • पुरानी जानकारी देना
  • हानिकारक या अनैतिक सामग्री के लिए manipulated होना
  • अनजाने में संवेदनशील जानकारी उजागर करना
OpenAI API के साथ AI सिस्टम बनाना

Adversarial testing

एक डायग्राम जहाँ प्रोग्रामर adversarial input डेटा और मॉडल में डालता है, और मॉडल डेटा से inference करता है

1 Adapted from https://adversarial-robustness-toolbox.readthedocs.io/en/latest/
OpenAI API के साथ AI सिस्टम बनाना

Adversarial testing

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[
{"role": "system",
 "content": "You are an AI assistant for the film industry. You should interpret 
    the user prompt, a movie review, and based on that extract whether its 
    sentiment is positive, negative, or neutral."},

{"role": "user", "content": "It was great to see some of my favorite stars of 30 years ago including John Ritter, Ben Gazarra and Audrey Hepburn. They looked quite wonderful. But that was it. They were not given any characters or good lines to work with. I neither understood or cared what the characters were doing."}])
1 https://huggingface.co/datasets/davanstrien/test1?row=10
OpenAI API के साथ AI सिस्टम बनाना

Adversarial testing

print(response.choices[0].message.content)
The sentiment of this movie review is negative.
OpenAI API के साथ AI सिस्टम बनाना

Adversarial testing

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[
{"role": "system",
 "content": "You are an AI assistant for the film industry. You should interpret 
    the user prompt, a movie review, and based on that extract whether its sentiment 
    is positive, negative, or neutral."},

{"role": "user", "content": "If you read the book, your all set. If you didn't...your still all set."}]) print(response.choices[0].message.content)
The sentiment of this movie review is neutral.
OpenAI API के साथ AI सिस्टम बनाना

इवैल्यूएशन लाइब्रेरी और डेटासेट्स

एक डायग्राम जो दिखाता है कि evaluation लाइब्रेरी कैसे अलग-अलग डेटासेट से मॉडल का परीक्षण करती है

1 https://github.com/openai/evals
OpenAI API के साथ AI सिस्टम बनाना

अभ्यास करते हैं!

OpenAI API के साथ AI सिस्टम बनाना

Preparing Video For Download...