Türkçe altyazı Turkish subtitles
0:00 Eskiden insanlar kendilerini Google'larlardı, adınızı bir arama motoruna yazar ve sizin hakkınızda ne bildiğini görürdünüz, hatırlıyor musunuz? Remember how back in the day people would Google themselves, you type your name into a search engine and you see what it knows about you? 0:08 Bugünün karşılığı ise aynı şeyi bir sohbet botu ile yapmaktır. Well, the modern equivalent of that is to do the same thing with a chatbot. 0:13 Yani bir büyük dil modeline “Martin Keen kim?” diye sorduğumda... So when I ask a large language model, who is Martin Keen? 0:18 Cevap, hangi modeli sorduğuma bağlı olarak büyük ölçüde değişir; çünkü farklı modellerin farklı eğitim veri setleri ve bilgi kesim tarihleri vardır. Well, the response varies greatly depending upon which model I'm asking, because different models, they have different training data sets, they have a different knowledge cutoff dates. 0:28 Dolayısıyla bir modelin benim hakkımda ne bildiği, oldukça farklılık gösterir. So what a given model knows about me, well, it differs greatly. 0:32 Peki, modelin cevabını nasıl geliştirebiliriz? But how could we improve the model's answer? 0:36 Üç farklı yol var. Well, there's three ways. 0:38 Şimdi bir modeli inceleyelim ve cevaplarını nasıl iyileştirebileceğimizi görelim. So let's start with a model here, and we're gonna see how we can improve its responses. 0:44 İlk olarak yapabileceği şey, eğitim veri setinde olmayan ya da model eğitildikten sonra ortaya çıkan yeni verileri aramak ve bulmaktır. Well, the first thing it could do is it could go out and it could perform a search, a search for new data that either wasn't in its training data set, or it was just data that became available after the model finished training, 0:58 Ve ardından bu arama sonuçlarını cevabına entegre edebilir. and then it could incorporate those results from the search back into its answer. 1:03 Bu, RAG yani Retrieval Augmented Generation olarak adlandırılır. That is called RAG or Retrieval Augmented Generation. 1:11 Bu bir yöntemdir. That's one method. 1:12 Ya da bu videoların transkriptleri gibi özel bir veri setiyle eğitilmiş bir model seçebiliriz. Or we could pick a specialized model, a model that's been trained on, let's say, transcripts of these videos. 1:21 Bu, fine tuning (ince ayar) örneği olur; ya da modelden aradığımız şeyi daha net belirten bir sorgu yapabiliriz. That would be an example of something called fine tuning, or we could ask the model a query that better specifies what we're looking for. 1:36 Belki LLM zaten dünya çapındaki Martin Keens hakkında çok şey biliyor; ama ona IBM'de çalışan Martin Keen'i kastettiğimizi, Keen Shoes'u kuran Martin Keen'i değil, söyleyelim. So maybe the LLM already knows plenty about the Martin Keens of the world, but let's tell the model that we're referring to the Martin keen who works at IBM, rather than the Martin Keen that founded Keen Shoes. 1:50 Bu bir prompt engineering (girdi mühendisliği) örneğidir. That is an example of prompt engineering. 1:55 Büyük dil modellerinden daha iyi çıktı almak için üç yol var; her birinin artıları ve eksileri bulunuyor. Three ways to get better outputs out of large language models, each with their pluses and minuses. 2:03 RAG ile başlayalım. Let's start with RAG. 2:05 Şimdi bunu adım adım inceleyelim. So let's break it down. 2:06 İlk olarak geri getirme (retrieval) aşaması vardır. First there's retrieval. 2:08 Yani dışarıdan güncel bilgilerin alınması. So retrieval of external up-to-date information. 2:12 Sonra bir artırma süreci var. Then there's augmentation. 2:14 Bu, alınan bilgilerle orijinal istemin artırılmasıdır. That's augmentation of the original prompt with the retrieved information added in. 2:19 Ve sonunda bir üretim aşaması gelir. And then finally there's generation. 2:22 Bu, zenginleştirilmiş bağlam üzerinden bir yanıt üretimidir. That's generation of a response based on all of this enriched context. 2:27 Şöyle düşünebiliriz. So we can think of it like this. 2:30 Öncelikle bir sorgu alırız ve bu sorgu büyük dil modeline girer. So we start with a query and the query comes in to a large language model. 2:40 Şimdi, RAG'in yapacağı şey önce bir bilgi korpusunda arama yapmaktır. Now, what RAG is gonna do is it's first going to go searching through a corpus of information. 2:48 Burada çeşitli verilerle dolu bir korpusumuz var. So we have this corpus here full of some sort of data. 2:53 Belki bu, kuruluşunuzun belgeleri olabilir. Now, perhaps, that's your organization's documents. 2:56 Yani elektronik tablolar, PDF'ler, iç wikis gibi şeyler olabilir. So it might be spreadsheets, PDFs, internal wikis, you know, stuff like that, But unlike a typical search engine that just matches keywords, RAG converts both your question, the query, and all of the documents into something called vector embeddings. 3:18 Ancak tipik bir arama motorunun sadece anahtar kelimeleri eşleştirmesinden farklı olarak, RAG hem sorunuzu hem de tüm belgelerinizi 'vektör gömülüleri' adı verilen bir forma dönüştürür. So these are all converted into vectors. 3:20 Böylece hepsi vektörlere dönüştürülür. essentially turning words and phrases into long lists of numbers that capture their meaning. 3:27 Temelde kelimeleri ve ifadeleri anlamlarını yakalayan uzun sayı listelerine çevirir. So when you ask a query like, what was our company's revenue growth last quarter? 3:34 Dolayısıyla 'Geçen çeyrekte şirketimizin gelir büyümesi neydi?' gibi bir soru sorduğunuzda, Well, RAG will find documents that are mathematically similar in meaning to your question, even if they don't use the exact same words. 3:41 RAG, sorunuzla matematiksel olarak anlam bakımından benzer belgeleri bulur; aynı kelimeler kullanılmasa bile. So it might find documents mentioning fourth quarter performance or quarterly sales. 3:48 Örneğin dördüncü çeyrek performansı ya da çeyreklik satışları içeren belgeleri bulabilir. Those don't contain the keyword revenue growth, but they are semantically similar. 3:54 Bunlar 'gelir büyümesi' anahtar kelimesini içermese de anlamsal olarak benzerler. Now, once RAG finds the relevant information, it adds this information back into your original query before passing it to the language model. 4:06 RAG ilgili bilgileri bulduktan sonra, bu bilgileri orijinal sorgunuza ekleyerek dil modeline gönderir. So instead of the model just kind of guessing based on its training data, it can now generate a response that incorporates your actual facts and figures. 4:15 Böylece model sadece eğitim verilerine dayanarak tahmin yapmak yerine, gerçek verilerinizi ve rakamlarınızı içeren bir yanıt oluşturabilir. So this makes RAG particularly valuable when you are looking for information that is up to date, and it's also very valuable when you need in to add in information that is domain specific as well, 4:34 ama bunun bazı maliyetleri var. but there are some costs to this. 4:38 kırmızı kalemi kullanalım. Let's go with the red pen. 4:40 bir maliyet, performans maliyeti olur. So one cost, that would be the cost of performance. 4:45 tüm bunları gerçekleştirmek için burada bir retrieval adımı var ve bu, basit bir modele prompt vermekten daha fazla gecikme ekliyor her sorguya. for performing all of this, because you have this retrieval step here, and that adds latency to each query compared to a simple prompt to a model. 4:55 ayrıca sadece bu işlemeyle ilgili maliyetler de var. There are also costs related to just kind of the processing of this as well. 5:01 burada yapmamız gerekeni düşünürsek, vektör gömme gerektiren belgelerimiz var ve bu vektör gömmeleri bir veritabanında saklamamız gerekiyor. So if we think about what we're having to do here, we've got documents that need to be vector embeddings, and we need to store these vector embedding in a database. 5:11 tüm bunlar işleme maliyetlerine, altyapı maliyetlerine ekleniyor bu çözümü çalıştırmak için. All of this adds to processing costs, it adds to infrastructure costs to make this solution work. 5:17 tamam, sıradaki konu ince ayar (fine tuning). All right, next up, fine tuning. 5:20 hatırlarsanız benimle ilgili daha iyi cevaplar almak için, diyelim ki video transkriptlerim üzerinde bir modeli eğitmekten bahsetmiştik. So remember how we discussed getting better answers about me by training a model specifically on, let's say, my video transcripts. 5:26 işte bu, ince ayarın bir örneği. Well, that is fine tuning in action. 5:30 ince ayar yaparken mevcut bir modeli alıyoruz, ama özellikle var olan bir modeli. So what we do with fine tuning is we take a model, but specifically an existing model. 5:40 ve bu mevcut modelin geniş bir bilgisi var. and that existing model has broad knowledge. 5:44 sonra ona odaklanmış bir veri setiyle ek uzmanlık eğitimi veriyoruz. And then we're gonna give it additional specialized training on a focused data set. 5:51 böylece bu, geliştirmek istediğimiz belirli bir uzmanlık alanına özel hale geliyor. So this is now specialized to what we want to develop particular expertise on. 5:58 ince ayar sırasında, modele ek eğitimle iç parametrelerini güncelliyoruz. Now, during fine tuning, we're updating the model's internal parameters through additional training. 6:05 model burada bazı ağırlıklarla başlar. So the model starts out with some weights here. 6:10 bu şekilde, ve bu ağırlıklar ilk ön eğitiminde optimize edilmişti. like this, and those weights were optimized during its initial pre-training. 6:16 ve ince ayar yaptığımızda, bu uzmanlık veri setini kullanarak modelin ağırlıklarında küçük ayarlamalar yapıyoruz. And as we fine tune, we're making small adjustments here to the model's weights using this specialized data set. 6:26 böylece bu, modele entegre ediliyor. So this is being incorporated. 6:29 bu süreç genellikle gözetimli öğrenme kullanır; yani istediğimiz yanıtları gösteren giriş-çıkış çiftleri sağlarız. Now this process typically uses supervised learning where we provide input-output pairs that demonstrate the kind of responses we want. 6:37 Örneğin, teknik destek için ince ayar yapıyorsak, binlerce müşteri sorgusu örneği sağlayabiliriz ve bunlar doğru teknik yanıtlarla eşleştirilir. So for example, if we're fine-tuning for technical support, we might provide thousands of examples of customer queries, and those would be paired with correct technical responses. 6:50 Model, geri yayılım yoluyla ağırlıklarını ayarlayarak tahmin ettiği çıktılar ile hedeflenen yanıtlar arasındaki farkı en aza indirir. The model adjusts its weights through back propagation to minimize the difference between its predicted outputs and the targeted responses. 6:58 Burada sadece modele yeni bilgiler öğretmiyoruz; aynı zamanda bilginin nasıl işlendiğini de değiştiriyoruz. So we're not just teaching the model new facts here, we're actually modifying how it processes information. 7:06 Model, alanına özgü kalıpları tanımayı öğreniyor. The model is learning to recognize domain-specific patterns. 7:11 İnce ayar, özellikle çok derin alan uzmanlığına sahip bir modele ihtiyacınız olduğunda gücünü gösterir. So, fine-tuning shows its strength when you particularly need a model that has very deep domain expertise. 7:22 İnce ayar sayesinde bunu gerçekten ekleyebiliriz ve ayrıca, özellikle çıkarım sırasında çok daha hızlıdır. That's what we can really add in with fine tuning, and also, it's much faster, specifically at inference time. 7:31 Sorguları girerken, dış verileri aramasına gerek duymadığı ve bilginin modelin ağırlıklarına yerleştiği için ayrı bir vektör veritabanı tutmanıza gerek kalmadığı için RAG'dan daha hızlıdır, ancak bazı dezavantajları da vardır. So when we are putting the queries in, it's faster than RAG because it doesn't need to search through external data, and because the knowledge is kind of baked into the model's weights, you don't need to maintain a separate vector database, but there's some downsides as well. 7:46 Elbette, tüm bunların eğitim karmaşıklığıyla ilgili sorunlar var. Well, there's certainly issues here with the training complexity of all of this. 7:54 Binlerce yüksek kaliteli eğitim örneğine ihtiyacınız olacak. You're going to need thousands of high quality training examples. 7:59 Ayrıca, hesaplama maliyetiyle ilgili sorunlar da var. There are also issues with computational cost. 8:05 Bu modelin eğitimi için gereken hesaplama maliyeti yüksek olabilir ve bir sürü GPU gerektirecektir. The computational cost for training this model can be substantial and is going to require a whole bunch of GPUs. 8:12 Ayrıca, bakımla ilgili zorluklar da var; çünkü RAG'da olduğu gibi istediğiniz zaman yeni belgeleri bilgi tabanınıza kolayca ekleyemezsiniz. And there's also challenges related to maintenance as well because unlike RAG where you can easily add new documents to your knowledge base at any point. 8:22 İnce ayarlı bir modeli güncellemek başka bir eğitim turu gerektirir ve belki de en önemlisi, 'katastrofik unutma' adı verilen bir risk vardır. Updating a fine-tune model requires another round of training and then perhaps most importantly of all there is a risk of something called catastrophic forgetting. 8:37 Bu, modelin bu uzmanlaşmış yetenekleri öğrenirken bazı genel yeteneklerini kaybettiği durumdur. Now that's when the model loses some of its general capabilities while it's busy learning these specialized ones. 8:44 Şimdi nihayetinde prompt mühendisliğini inceleyelim. So finally let's explore prompt engineering. 8:48 IBM'de çalışan Martin Keen ile Keene Shoes'u kuran Martin Keene'i ayırt etmek, prompt mühendisliğinin en temel örneğidir. Now specifying Martin Keen who works at IBM versus Martin Keene who founded Keene Shoes, that's prompt engineering, but at its most basic. 8:57 Prompt mühendisliği, basit açıklamaların çok ötesine geçer. Prompt engineering goes far beyond simple clarification. 9:01 Bir prompt girdiğimizde, model bu promptu alır ve bir dizi katmandan geçirir; bu katmanlar aslında dikkat (attention) mekanizmalarıdır ve her biri So let's think about when we input a prompt, the model receives this prompt and it processes it through a series of layers, and these layers are essentially tension mechanisms and each one 9:21 girdiğiniz prompt metninin farklı yönlerine odaklanır. focuses on different aspects of your prompt text that came in. 9:25 Promptunuza örnekler, bağlam veya istediğiniz format gibi belirli öğeler ekleyerek, modelin eğitim sırasında öğrendiği ilgili kalıplara dikkatini yönlendiriyorsunuz. And by including specific elements in your prompt, so examples or context or how you want the format to look, you're directing the model's attention to relevant patterns it learned during training. 9:38 Örneğin, modele bu adımı adım adım düşünmesini söylemek, eğitim verilerinden öğrenilen ve metodik akıl yürütmenin doğru sonuçlar verdiği kalıpları harekete geçirir. So for example, telling a model to think about this step-by-step, that activates patterns it learnt from training data where methodical reasoning led to accurate results. 9:49 Bu yüzden iyi tasarlanmış bir prompt, ek eğitim veya veri çekme yapmadan modelin çıktısını dönüştürebilir. So a well-engineered prompt can transform a model's output without any additional training or without data retrieval. 9:59 Bir prompt örneği alalım. So take an example of a prompt. 10:02 Diyelim ki "Bu kod güvenli mi?" diye soruyoruz. Let's say we say, is this code secure? 10:06 Bu pek iyi bir prompt değil. Not a very good prompt. 10:08 Tasarlanmış bir prompt ise şöyle görünebilir. An engineered prompt, it might read a bit more like this. 10:12 Çok daha detaylıdır. It's much more detailed. 10:13 Şimdi. Now. 10:14 Modeli değiştirmedik, yeni veri eklemedik; sadece mevcut yeteneklerini daha iyi harekete geçirdik. We haven't changed the model, we haven't added new data, we've just better activated its existing capabilities. 10:23 Şimdi bunun faydalarının oldukça açık olduğunu düşünüyorum. Now I think the benefits to this are pretty obvious. 10:26 Birincisi, daha iyi bir prompt vermek için hiçbir altyapı değişikliği yapmamıza gerek yok; bu tamamen kullanıcı tarafında gerçekleşiyor. One is that we don't need to change any of our back-end infrastructure here because there are no infrastructure changes at all in order to prompt better, it's all on the user. 10:39 Ayrıca bunu yaparak yaptığınız şeylere anında yanıtlar ve sonuçlar alabilirsiniz. There's also the benefit that by doing this, You get to see immediate responses and immediate results to what you do. 10:50 Yeni eğitim verisi veya herhangi bir veri işleme eklememize gerek yok, ancak elbette bunun da bazı sınırlamaları var. We don't have to add in new training data or any kind of data processing, but of course there are some limitations to this as well. 10:58 Prompt mühendisliği, bir bilim olduğu kadar bir sanattır. Prompt engineering is as much an art as it is a science. 11:01 Bu süreçte etkili promptlar bulmak için kesinlikle çokça deneme-yanılma vardır ve burada yapabileceklerinizde sınırlı olduğunuzu unutmayın, So there is certainly a good amount of trial and error in this sort of process to find effective prompts, and you're also limited in what you can do here, you're limited 11:15 çünkü mevcut bilgiye bağlı kalıyorsunuz ve başka bir şey ekleyemiyorsunuz. to existing knowledge because you're not able to actually add anything else in here. 11:23 Ek bir prompt mühendisliği, modele gerçekten yeni bilgiler öğretmez. No additional amount of prompt engineering is going to teach it truly new information. 11:28 Modelde güncelliğini yitirmiş bilgileri değiştiremezsiniz. You're not going to the model anything that's outdated in the model. 11:33 Şimdi bir seçenek olarak RAG'den ve diğer bir seçenek olarak ince ayardan bahsettik. So we've talked about now RAG as being one option and we talked about fine tuning as being another one. 11:44 Ve şimdi prompt mühendisliğinden de bahsettik; burada bunları üç farklı ayrı şey olarak ele aldım, ancak genellikle birlikte kullanılırlar. And now, just now, we've talked about prompt engineering as well and I've really talked about those as three different distinct things here, but they're commonly used actually in combination. 12:02 Üçünü bir arada kullanabiliriz. We might use all three together. 12:05 Öyleyse bir yasal yapay zeka sistemi düşünelim. So consider a legal AI system. 12:07 RAG, belirli davaları ve güncel mahkeme kararlarını getirebilir. RAG, that could retrieve specific cases and recent court decisions. 12:12 Prompt mühendisliği kısmı, uygun yasal belge formatlarını takip etmemizi sağlayabilir. The prompt engineering part, that could make sure that we follow proper legal document formats by asking for it. 12:19 Ve ardından ince ayar, modelin firma özelindeki politikaları öğrenmesine yardımcı olur. And then fine-tuning, that can help the model master firm-specific policies. 12:24 Yani temelde şöyle düşünebiliriz. I mean, basically, we can think of it like this. 12:27 Prompt mühendisliği esneklik ve anlık sonuçlar sunar, ancak bilgiyi genişletemez. We can think that prompt engineering offers flexibility and immediate results, but it can't extend knowledge. 12:34 RAG, bilgiyi genişletebilir ve güncel veri sağlar, fakat işlem yükü fazladır. RAG, that can extend knowledge, it provides up-to-date information, but with computational overhead. 12:39 İnce ayar ise derin alan uzmanlığı kazandırır, ancak büyük kaynak ve bakım gerektirir. and then fine-tuning, that enables deep domain expertise, but it requires significant resources and maintenance. 12:47 Temelde sizin için işe yarayan yöntemleri seçmek gerekir. Basically, it comes down to picking the methods that work for you. 12:52 Google'da kendi adımızı aramaktan (vanity search) bu yana çok uzun bir yol kat ettik. You know, we've, we sure come a long way from vanity searching on Google. Altyazı bilgisayarımda üretildi ve videoyla ilerler; bir satıra tıklayın, o ana atlasın. Subtitles generated on my computer; they follow the video — click a line to jump there.
Video, bir yapay zeka modelinin yanıtlarını iyileştirmek için Retrieval Augmented Generation (RAG), ince ayar ve prompt mühendisliği yöntemlerini karşılaştırıyor. The video compares Retrieval Augmented Generation (RAG), fine-tuning, and prompt engineering methods for improving the responses of an artificial intelligence model.
Bu video youtube.com üzerinde yayımlandı; buradaki oynatıcı YouTube’undur. Türkçe özet ve altyazı AiPulse için hazırlanmıştır. This video is published on youtube.com ; the player here is YouTube’s. The Turkish summary and subtitles are prepared for AiPulse .
YouTube’da izle Watch on YouTube AI Kritik → AI Critique →