في هذه الصفحة
الدّرس 2 من 6
كيف يتعلّم الذكاء الاصطناعي
ما ستتعلّمه
- وصف حلقة التّدريب بلغة بسيطة
- فهم ما تعنيه «البيانات» للنّموذج
- إدراك لماذا انتصرت البيانات الأكثر والنّماذج الأكبر
In the last lesson, we said AI is a "pattern machine." But how does the machine actually learn those patterns? In this lesson, we will open the hood -- no math, no code -- and watch the learning process happen step by step using an analogy you already understand: cooking.
The cooking analogy
Imagine a young chef who has never cooked before. She walks into a kitchen with one goal: learn to make dishes that people love. Here is how she does it.
Step 1: She gets recipes (the data). Someone hands her thousands of cookbooks -- Italian, Japanese, Mexican, French, everything. These cookbooks are her training data. She reads them all. She starts noticing patterns: salt brings out flavor, acid brightens a dish, fat carries taste, too much heat burns things.
Step 2: She tries a dish (the prediction). Based on the patterns she has absorbed, she cooks something. Her first attempt at pasta sauce might be bland, or too salty, or missing something she cannot name. This attempt is what AI researchers call a "prediction" -- the model's best guess based on what it has learned so far.
Step 3: A food critic tastes it (the loss function). A brutally honest food critic tries the dish and gives specific feedback: "too salty," "needs acid," "the texture is off." In AI, this critic is called the loss function -- a scoring system that measures exactly how far the model's prediction was from the ideal answer. The bigger the gap, the higher the "loss."
Step 4: She adjusts (the update). Based on the feedback, the chef tweaks her approach. Less salt next time. A squeeze of lemon. A lower flame. In AI, these tweaks happen to the model's parameters -- millions of tiny internal settings that get nudged up or down to reduce the error.
Step 5: Repeat. Millions of times. The chef cooks another dish, gets feedback, adjusts. Cooks again, feedback, adjusts. Over and over. This is the training loop: predict, measure, adjust, repeat. After millions of cycles, the chef (the model) gets remarkably good -- not because she memorized every recipe, but because she internalized the underlying patterns of what makes food work.
That is how AI learns. The entire process is this loop, repeated at enormous scale.
What counts as "data"
For our chef, the data was cookbooks. For a language model like ChatGPT or Claude, the data is text -- staggering amounts of it. Books, Wikipedia articles, websites, academic papers, forum discussions, news articles. Billions of pages of text from across the internet and digitized libraries.
The model does not memorize this text word for word. Instead, it learns patterns: how sentences are structured, how ideas connect, what typically follows what, how different topics relate to each other. After training, when you give it a new prompt it has never seen before, it draws on those patterns to produce a response.
Think of it this way: the chef does not memorize every recipe. She learns what makes food taste good. The model does not memorize every webpage. It learns how language works.
Pre-training and fine-tuning: two rounds of learning
Modern AI models usually go through two stages of training.
Pre-training is the big one. This is where the model reads an enormous amount of text and learns general language patterns. What does a grammatically correct sentence look like? How does a persuasive argument flow? What facts tend to appear together? Pre-training is like culinary school: broad, general, foundational.
Fine-tuning comes second. After the model has a general understanding of language, it gets a more focused round of training on carefully chosen examples. This might include high-quality conversations between humans, examples of helpful and honest answers, or domain-specific content. Fine-tuning is like the chef getting a job at a specific restaurant and learning its house style: still using the fundamentals from school, but now adapting to a particular way of doing things.
This two-stage process is why modern AI models feel so capable. Pre-training gives them breadth -- they know about almost everything. Fine-tuning gives them manners -- they respond helpfully, stay on topic, and follow instructions.
Why bigger models and more data won
For decades, AI researchers debated the best approach to building smart systems. Some focused on clever algorithms. Some focused on hand-crafted rules. But around 2017-2020, a pattern became undeniable: the teams that used more data and bigger models kept winning.
It turns out that many of the complex behaviors we associate with intelligence -- reasoning, summarizing, translating, creative writing -- emerge naturally when you scale up. A small model trained on a little data produces mediocre text. The same architecture, trained on vastly more data with vastly more parameters, starts to reason, explain, and create in ways that surprise even its builders.
This is the "scaling" insight that drove the current AI revolution. It is not that someone invented a secret algorithm. It is that researchers discovered: if you make the pattern machine big enough and feed it enough examples, remarkable abilities appear.
Back to our analogy: a chef who has read ten cookbooks is decent. A chef who has read ten thousand -- from every cuisine, every era, every technique -- and practiced millions of dishes? That chef can improvise, combine traditions, and create something new. Scale is the secret ingredient.
What the model does NOT do
Before we move on, it is worth being clear about what this learning process does not produce. The model does not understand the world the way you do. It has never tasted food, felt rain, or had a conversation with a friend. It has read descriptions of all these things and learned the patterns in how humans write about them. That is powerful -- but it is not the same as understanding.
This distinction will matter a lot in Lesson 4, when we talk about where AI fails. For now, just hold this in mind: the model is a remarkably good pattern machine. It is not a mind.
What is next
You now know how AI learns: the training loop of predict, measure, adjust, repeat. In the next lesson, we put this knowledge to use. You will learn how to talk to AI effectively -- the four-part prompt recipe that gets useful answers on the first try. Head to Prompting basics when you are ready.
كيف يتعلّم الذكاء الاصطناعي
تخيّل طاهية مبتدئة تدخل المطبخ لأوّل مرّة. تحصل على آلاف كتب الطّبخ (البيانات)، تطبخ طبقًا (التنبّؤ)، ناقد طعام صريح يتذوّقه ويعطيها ملاحظات محدّدة: "ملح زائد"، "يحتاج حموضة" (دالّة الخسارة). تعدّل الطّاهية أسلوبها (تحديث البارامترات)، ثمّ تطبخ مجدّدًا. هذه الحلقة -- تنبّأ، قِس الخطأ، عدّل، كرّر -- هي جوهر تعلّم كلّ نموذج ذكاء اصطناعي.
بالنّسبة لنموذج لغوي مثل ChatGPT أو Claude، البيانات هي نصوص: كتب ومقالات وموسوعات ومواقع إنترنت -- مليارات الصّفحات. النّموذج لا يحفظها حرفيًّا بل يستوعب أنماط اللّغة: كيف تُبنى الجمل، كيف تتّصل الأفكار، ما الذي يتبع ماذا عادةً. يمرّ التّدريب بمرحلتين: التّدريب الأوّلي الواسع (كمدرسة الطّبخ العامّة) ثمّ الضّبط الدّقيق المركّز (كالعمل في مطعم بأسلوب محدّد). السّرّ الكبير؟ اكتشف الباحثون أنّ المزيد من البيانات والنّماذج الأكبر ينتج قدرات مذهلة -- الحجم هو المكوّن السّرّي.
لكن تذكّر: النّموذج لم يتذوّق طعامًا ولم يشعر بمطر. إنّه آلة أنماط قويّة جدًّا، وليس عقلاً. في الدّرس التّالي ستتعلّم كيف تتحدّث مع الذكاء الاصطناعي بفعاليّة -- وصفة المطالبة ذات الأجزاء الأربعة. توجّه إلى أساسيّات المطالبة حين تكون جاهزًا.
جرّب بنفسك
اختر مهارة تتقنها (السّياقة، الطّبخ، رياضة). اكتب خمسة أسطر عن طريقة تعلّمها: أمثلة، أخطاء، تغذية راجعة، تكرار. ثمّ قارن عمليّة تعلّمك بحلقة التّدريب التي وصفناها. ما المتشابه؟ وما المختلف؟
تأمّل
هل تستطيع شرح حلقة التّدريب لصديق باستعمال تشبيه خاصّ بك (ليس الطّبخ)؟ إن استطعت فقد فهمتها. وإلّا أعد قراءة قسم الطّبخ مرّة أخرى.