Sohbet tabanlı üretken YZ modellerini açıklama

Python ile Açıklanabilir AI

Fouad Trad

Machine Learning Engineer

Sohbet tabanlı üretken YZ modelleri

  • Metin üretmek için kullanılır
  • Bağlam ve bilgiye göre tahmin eder

 

Bir kullanıcının üretken YZ modeline bir istem gönderip yanıt aldığı görsel.

Python ile Açıklanabilir AI

Zincirleme düşünme (chain‑of‑thought) istemi

  • Modelin gerekçesini açıklamasını teşvik eder

Zincirleme düşünme isteminin bir problemi adım adım çözdürdüğünü ve çıktının her adımın gerekçesini içerdiğini gösteren görsel.

Python ile Açıklanabilir AI

Zincirleme düşünme istemi oluşturma

prompt = """A shop starts with 20 apples. It sells 5 apples and then receives 8 more. 
How many apples does the shop have now? Show your reasoning step-by-step."""

response = get_response(prompt)
print(response)
To find out how many apples the shop has now, let's follow the transactions step-by-step:

1- The shop begins with 20 apples.
2- The shop sells 5 apples. We subtract this number from the starting quantity: 20 - 5 = 15
3- The shop receives 8 apples. We add this number to the remaining apples: 15 + 8 = 23
So, after these transactions, the shop has 23 apples.
Python ile Açıklanabilir AI

Öz‑tutarlılık

Üretilen yanıtlardaki model güvenini değerlendirir

Öz-tutarlılık isteminin aynı istemi modele birden çok kez göndermekten ibaret olduğunu ve her birinin bir yanıtı olduğunu gösteren görsel.

Python ile Açıklanabilir AI

Metin sınıflandırmada öz‑tutarlılık

Metin sınıflandırma görevleri için yararlı

Modelin bir kullanıcı incelemesini olumlu ya da olumsuz olarak sınıflandırması gereken bir öz-tutarlılık örneğini gösteren görsel.

Python ile Açıklanabilir AI

Metin sınıflandırmada öz‑tutarlılık

Metin sınıflandırma görevleri için yararlı

Modelin bir kullanıcı incelemesini olumlu ya da olumsuz olarak sınıflandırması ve birden çok yanıt üretmesi gereken bir öz-tutarlılık örneğini gösteren görsel. Güven, her kategori yanıtlarının toplam yanıtlara oranı olarak hesaplanır.

Python ile Açıklanabilir AI

Öz‑tutarlılık istemleri oluşturma

prompt = """Classify the following review as positive or negative. 
You should reply with either "positive" or "negative", nothing else.
Review: 'The customer service was great, but the product itself did not meet my expectations.'"""

responses = []
for i in range(5): sentiment = get_response(review)
responses.append(sentiment.lower())
confidence = { 'positive': responses.count('positive') / len(responses), 'negative': responses.count('negative') / len(responses) }
Python ile Açıklanabilir AI

Öz‑tutarlılık istemleri oluşturma

print(confidence)
{
    'positive': 0.6,
    'negative': 0.4
}
Python ile Açıklanabilir AI

Haydi pratik yapalım!

Python ile Açıklanabilir AI

Preparing Video For Download...