<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Debug School: rakesh kumar</title>
    <description>The latest articles on Debug School by rakesh kumar (@rakeshdevcotocus_468).</description>
    <link>https://www.debug.school/rakeshdevcotocus_468</link>
    <image>
      <url>https://www.debug.school/images/WnjM0tj_qJIv1YRaHUFCcWCxLQyroc-__BJWYYD46DE/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly93d3cu/ZGVidWcuc2Nob29s/L3VwbG9hZHMvdXNl/ci9wcm9maWxlX2lt/YWdlLzkvMzhjZTM3/NDAtZDA2NC00MmVh/LTk1MmMtODg2MGQ2/MGNhZGU1LmpwZWc</url>
      <title>Debug School: rakesh kumar</title>
      <link>https://www.debug.school/rakeshdevcotocus_468</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.debug.school/feed/rakeshdevcotocus_468"/>
    <language>en</language>
    <item>
      <title>Difference between Traditional developer LLM application developer</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Thu, 13 Aug 2026 03:43:13 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/difference-between-traditional-developer-llm-application-developer-n4h</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/difference-between-traditional-developer-llm-application-developer-n4h</guid>
      <description>&lt;p&gt;&lt;strong&gt;Traditional developer&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;LLM application developer&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Traditional Developer vs LLM Application&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Main Difference Between All the Concepts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traditional developer&lt;/strong&gt;: writes the rules the software must follow.&lt;br&gt;
&lt;strong&gt;LLM application developer&lt;/strong&gt;: uses an AI model that has already learned language patterns, then controls it using prompts, context, validation, APIs, and normal application code.&lt;/p&gt;

&lt;p&gt;A useful way for developers to remember it&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traditional application&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I tell the computer exactly how to do the task.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;LLM application&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I tell the model what I want, provide the necessary context/data, and then verify/control its response.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And in real production systems, you normally use both together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traditional Development + LLM = Modern LLM Application
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/q52d5rsa2bq629h61345.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/q52d5rsa2bq629h61345.png" alt=" " width="897" height="437"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Laravel
│
├── Authentication       → Traditional code
├── Payments             → Traditional code
├── Booking validation   → Traditional code
├── Database             → Traditional code
│
├── AI chatbot           → LLM
├── Review summary       → LLM
├── Natural language Q&amp;amp;A → LLM
└── Description writing  → LLM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Traditional Developer vs LLM Application
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/s3oiqyex4me10zu1k0ij.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/s3oiqyex4me10zu1k0ij.png" alt=" " width="931" height="620"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traditional Backend&lt;/strong&gt;&lt;br&gt;
────────────────────&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input
  ↓
Business Logic
  ↓
Database/API
  ↓
Output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;LLM Application&lt;/strong&gt;&lt;br&gt;
────────────────────&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Input
    ↓
Prompt + Instructions + Context
    ↓
Tokenization
    ↓
LLM
    ↓
Probabilistic Generation
    ↓
Structured Output
    ↓
Validation
    ↓
Business Rules
    ↓
Application
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Main Difference Between All the Concepts
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/apdo6fyplsuplsfti6st.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/apdo6fyplsuplsfti6st.png" alt=" " width="1237" height="697"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/lawcwjqe1g7kbln98m90.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/lawcwjqe1g7kbln98m90.png" alt=" " width="1216" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to delete particular row from postgress pgsql using commands</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Mon, 10 Aug 2026 07:13:02 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/how-to-delete-particular-row-from-postgress-pgsql-using-commands-228o</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/how-to-delete-particular-row-from-postgress-pgsql-using-commands-228o</guid>
      <description>&lt;p&gt;&lt;strong&gt;Enter PostgreSQL&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Show all databases&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Connect to a particular database&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;delete all rows from table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enter PostgreSQL&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo -u postgres psql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Show all databases&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Inside psql:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;hl_booking
hl_country
hl_profile
hl_trip
postgres
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Connect to a particular database&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\c hl_booking
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see:&lt;/p&gt;

&lt;p&gt;You are now connected to database "hl_booking".&lt;/p&gt;

&lt;p&gt;Then show all tables:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\dt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suppose your table name is bookings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;delete all rows from table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To delete all rows but keep the table structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DELETE FROM availability_slots;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM bookings;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT * FROM bookings LIMIT 10;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT *
FROM bookings
WHERE status = 'confirmed';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;INSERT INTO bookings
(user_id, status)
VALUES
(10, 'pending'),
(11, 'confirmed'),
(12, 'cancelled');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UPDATE bookings
SET status = 'confirmed'
WHERE id = 10;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UPDATE bookings
SET
    status = 'confirmed',
    updated_at = NOW()
WHERE id = 10;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DELETE FROM bookings
WHERE id = 10;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
DELETE FROM bookings
WHERE id = 10
RETURNING *;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;To see all fields/columns of a particular PostgreSQL table, use:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## \d bookings
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>“AI and LLM Foundations for Developers: From Machine Learning to Transformers, Tokens, Embeddings, and RAG</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Mon, 10 Aug 2026 03:19:58 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/ai-and-llm-foundations-for-developers-from-machine-learning-to-transformers-tokens-embeddings-1hd9</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/ai-and-llm-foundations-for-developers-from-machine-learning-to-transformers-tokens-embeddings-1hd9</guid>
      <description>&lt;p&gt;&lt;strong&gt;What are we trying to understand?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Machine Learning&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Deep Learning&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Neural Networks&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Generative AI&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Large Language Model (LLM)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Transformer&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Attention&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Tokens and Tokenization&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Context Window&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Inference&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Temperature&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Top-p and Sampling&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Deterministic vs Probabilistic Software&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Embeddings&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Hallucination&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Pretraining&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Prompting&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Fine-tuning&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;RAG&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Prompting vs RAG vs Fine-tuning&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;The complete LLM request lifecycle&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Main Difference Between All the Concepts&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What are we trying to understand?
&lt;/h2&gt;

&lt;p&gt;As a traditional developer, you're accustomed to this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input
  ↓
Your Code
  ↓
Business Rules
  ↓
Database/API
  ↓
Predictable Output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;For example:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if age &amp;gt;= 18:
    return "Adult"
else:
    return "Minor"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same input → same logic → same output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An LLM application behaves differently:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Input
    ↓
Prompt / Instructions
    ↓
Tokenization
    ↓
LLM
    ↓
Probabilistic Generation
    ↓
Validation
    ↓
Application
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Understanding why that middle part behaves differently is the purpose of Week 1.&lt;/p&gt;

&lt;h2&gt;
  
  
  Machine Learning
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Machine Learning (ML) is a way of creating software where the system learns patterns from data instead of you manually programming every decision rule.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traditional programming:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rules + Data
     ↓
 Program
     ↓
 Output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Machine learning:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Historical Data + Expected Outputs
              ↓
           Training
              ↓
            Model
              ↓
        New Data → Prediction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Example&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Suppose MotoShare wants to predict whether a booking is potentially fraudulent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traditional approach:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if booking_amount &amp;gt; 100000:
    suspicious = True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But fraud can depend on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;booking amount
user history
vehicle
location
booking frequency
payment behavior
account age
device
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;ML learns patterns among these features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Learn ML because LLMs themselves are machine-learning models.&lt;/p&gt;

&lt;p&gt;You don't need to become a classical ML expert first, but you should understand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data
training
model
prediction/inference
features
evaluation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Deep Learning
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Deep learning is a branch of machine learning that uses multi-layer neural networks to learn complicated patterns from large amounts of data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Artificial Intelligence
        │
        └── Machine Learning
                │
                └── Deep Learning
                        │
                        └── Generative AI
                                │
                                └── LLMs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why do we need it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Traditional ML can work very well for structured problems such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Price prediction
Fraud detection
Spam detection
Customer churn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deep learning is particularly powerful for unstructured/high-dimensional information:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Text
Images
Audio
Video
Language
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Backend analogy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of ML as an application and a neural network as one possible implementation engine.&lt;/p&gt;

&lt;p&gt;You don't need to understand every transistor inside your CPU to write Laravel/Python applications.&lt;/p&gt;

&lt;p&gt;Likewise, you don't initially need the mathematics behind every neural-network operation to build LLM systems.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Neural Networks
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A neural network is a collection of connected mathematical units that transforms inputs through learned parameters called weights.&lt;/p&gt;

&lt;p&gt;Very simplified:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
INPUT
  ↓
Layer
  ↓
Layer
  ↓
Layer
  ↓
OUTPUT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;During training:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input
 ↓
Prediction
 ↓
Compare with expected result
 ↓
Calculate error
 ↓
Adjust weights
 ↓
Repeat millions/billions of times
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Backend analogy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine an enormous configurable function:&lt;/p&gt;

&lt;p&gt;output = model(input, billions_of_learned_parameters)&lt;/p&gt;

&lt;p&gt;Except developers didn't manually write all those parameters.&lt;/p&gt;

&lt;p&gt;They were learned during training.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why learn this?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because terms such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;7B model
70B model
parameters
weights
training
fine-tuning
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;will otherwise be confusing later.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Generative AI
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Generative AI produces new content based on patterns learned during training.&lt;/p&gt;

&lt;p&gt;It can generate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Text
Code
Images
Audio
Video
Structured data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Traditional ML vs Generative AI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Traditional ML might answer:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input:
"This vehicle is excellent."

Output:
Positive
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Generative AI could answer:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Write a professional description
for this vehicle."

→

"Experience comfortable city travel
with this well-maintained..."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second system generates content.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Agentic AI is primarily built around generative models that can reason over instructions, produce responses and increasingly invoke tools.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Large Language Model (LLM)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An LLM is a large neural network trained on huge amounts of text to predict and generate sequences of tokens.&lt;/p&gt;

&lt;p&gt;One crucial mental model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;An LLM is fundamentally predicting what token should come next.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suppose the input is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The capital of India is
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Possible next tokens could have probabilities resembling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Delhi       0.91
Mumbai      0.03
India       0.02
Kolkata     0.01
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The generation process continues:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Input
 ↓
Predict next token
 ↓
Append token
 ↓
Predict next token
 ↓
Append token
 ↓
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why learn this?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This explains many things you'll encounter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;temperature
hallucination
tokens
context windows
prompt engineering
sampling
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Transformer
&lt;/h2&gt;

&lt;p&gt;This is one of the most important Week 1 concepts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Transformer is a neural-network architecture designed to process sequences while determining relationships between different parts of the input.&lt;/p&gt;

&lt;p&gt;Modern LLMs are largely built using transformer architectures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why was it important?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Consider:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ashwani deposited ₹10,000 into the bank.
He withdrew ₹2,000 the next day.
How much money remains?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;The model needs relationships among:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ashwani
He
₹10,000
₹2,000
bank
withdraw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Transformers help model those relationships.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simplified architecture&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/jundnfx5pwgrfdpwpfrj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/jundnfx5pwgrfdpwpfrj.png" alt=" " width="377" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Week 1, remember:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Transformer = architecture; 
LLM = a language model commonly built using transformer architecture.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Attention
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Attention allows the model to determine which parts of the available context are relevant when processing another part.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Consider&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Raj put his laptop inside his bag
because he was traveling.

What was inside the bag?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For answering the question, important relationships include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bag ← laptop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Less important information may include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;traveling
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;          "bag"

               │
       Attention relationships
        ↙      ↓       ↘
     Raj    laptop   traveling
             ↑
         highly relevant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Backend analogy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of attention loosely as dynamic relevance selection.&lt;/p&gt;

&lt;p&gt;A backend developer might explicitly select:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SELECT relevant_columns
FROM data
WHERE condition = ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Attention learns which parts of context matter instead of using your manually written SQL condition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why learn it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Later it helps you understand:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;context
RAG
long documents
prompt placement
agent memory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Tokens and Tokenization
&lt;/h2&gt;

&lt;p&gt;This is extremely important for production AI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;LLMs don't directly process text as human-readable words.&lt;/p&gt;

&lt;p&gt;Text is converted into tokens.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"AI is powerful"

       ↓ Tokenizer

[token1, token2, token3, ...]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A token might represent:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a word
part of a word
punctuation
whitespace-related units
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Characters ≠ Words ≠ Tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why do tokens matter?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because they affect:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;API cost
context limits
latency
maximum output
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Conceptually:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Cost ≈
(input tokens × input price)
+
(output tokens × output price)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Backend analogy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Tokens are somewhat like payload size.&lt;/p&gt;

&lt;p&gt;You already care about:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;HTTP request size
memory
DB query size
response size
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With LLMs you additionally care about:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;token budget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Context Window
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The context window is the amount of tokenized information a model can consider within a request/conversation context.&lt;/p&gt;

&lt;p&gt;It can contain more than just the latest user message.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Context Window
│
├── System instructions
├── Developer instructions
├── Conversation history
├── User message
├── Retrieved RAG documents
├── Tool results
└── Generated tokens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Important misconception&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Context is not permanent memory.&lt;/p&gt;

&lt;p&gt;If you have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Message 1
Message 2
Message 3
...
Message 5000

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you cannot assume the model permanently remembers everything.&lt;/p&gt;

&lt;p&gt;Applications often manage this using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;truncation
summarization
RAG
external memory
sliding windows
databases
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why learn it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Agents often maintain long-running conversations and tool results.&lt;/p&gt;

&lt;p&gt;Bad context management produces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
high cost
high latency
lost information
context overflow
poor responses
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Inference
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Training teaches the model.&lt;/p&gt;

&lt;p&gt;Inference uses the trained model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;TRAINING&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Huge dataset
    ↓
Training process
    ↓
Learn weights
    ↓
Trained model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;INFERENCE&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Your prompt
    ↓
Trained model
    ↓
Generated response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When your FastAPI application calls an LLM API, you're normally performing inference, not training.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend analogy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Training ≈ building/compiling/preparing the capability

Inference ≈ executing that capability for a request
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's not a perfect analogy, but useful initially.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Temperature
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Temperature controls how much variation is allowed during token selection.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Temperature ↓
More predictable

Temperature ↑
More variation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt:
Give me a slogan for MotoShare.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Low temperature might repeatedly produce similar direct answers.&lt;/p&gt;

&lt;p&gt;Higher temperature may produce more diverse alternatives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When should you use low temperature?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Tasks requiring consistency:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;classification
data extraction
structured output
business decisions
API workflows
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Higher temperature?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Creative tasks:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;marketing copy
brainstorming
story ideas
slogans
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But temperature does not magically turn the model into a truth engine.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Top-p and Sampling
&lt;/h2&gt;

&lt;p&gt;The model may assign probabilities to candidate next tokens.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Delhi       70%
Mumbai      10%
Kolkata      7%
Chennai      5%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sampling determines how the next token is selected from that probability distribution.&lt;/p&gt;

&lt;p&gt;Temperature and top-p influence this selection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Week 1:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Temperature
    ↓
changes probability sharpness/variation

Top-p
    ↓
limits selection to a probability mass

Sampling
    ↓
select next token

Next token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You don't need the detailed mathematics yet.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Deterministic vs Probabilistic Software
&lt;/h2&gt;

&lt;p&gt;This is a major mindset change for backend developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Traditional backend:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;2 + 2
 ↓
4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You expect the same result every time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LLM&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Write a vehicle description."
             ↓
            LLM
       ↙      ↓       ↘
Response A Response B Response C
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Therefore&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Traditional software

Input → Rules → Output


AI software

Input
 ↓
Prompt
 ↓
Probabilistic Model
 ↓
Possible Output
 ↓
VALIDATION
 ↓
Application
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why this matters for Agentic AI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An agent may decide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Which tool?
What arguments?
Do I need another tool?
Is the task complete?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Therefore you cannot treat model output like trusted deterministic code.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Embeddings
&lt;/h2&gt;

&lt;p&gt;This will become extremely important when you learn RAG.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An embedding converts information such as text into a numerical vector representing aspects of its semantic meaning.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Rent a bike"
      ↓
Embedding model
      ↓
[0.13, -0.82, 0.44, ...]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Consider:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A = "I want to rent a car."

B = "I need a vehicle for hire."

C = "Python supports decorators."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Semantically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Similarity(A, B) → HIGH
Similarity(A, C) → LOW

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;even though A and B don't contain exactly the same words.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend analogy&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Traditional search:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WHERE description LIKE '%car rental%'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Semantic search:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Query
 ↓
Embedding
 ↓
Vector similarity search
 ↓
Semantically related documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Where will you use this?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Later:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RAG
semantic search
recommendations
document retrieval
knowledge bases
similarity matching
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Hallucination
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hallucination occurs when an LLM generates information that appears plausible but is unsupported, incorrect or fabricated.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User:
"What is the rental price of this vehicle?"

Context:
No price provided.

Bad model:
"The rental price is ₹1,500/day."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model created information that wasn't available.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;Remember:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LLM
 ≠
database

LLM
 ≠
truth engine

LLM
 =
probabilistic language model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Production solution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Never rely solely on:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Please don't hallucinate."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Instead build:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User question
      ↓
Retrieve trusted data
      ↓
Provide context
      ↓
LLM
      ↓
Structured output
      ↓
Validation
      ↓
Business rules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This leads directly to RAG.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Pretraining
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Pretraining is the large-scale initial training process through which an LLM learns language patterns and broad knowledge from huge datasets.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Massive dataset
      ↓
Pretraining
      ↓
General-purpose model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As an application developer, you usually do not pretrain an LLM yourself.&lt;/p&gt;

&lt;p&gt;It's extremely expensive.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Prompting
&lt;/h2&gt;

&lt;p&gt;You provide instructions and context at inference time without changing the model's underlying trained weights.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Existing Model
     +
Prompt
     +
Context
     ↓
Response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Example&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;Classify this MotoShare enquiry into:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;BOOKING
PAYMENT
CANCELLATION
OTHER

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No model training required.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Start here first&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For most application problems:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompting
   ↓
Structured Output
   ↓
RAG
   ↓
Fine-tuning if justified
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't jump directly to fine-tuning.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Fine-tuning
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fine-tuning further trains an existing model using a specialized dataset to influence its behavior or capabilities for a particular task/domain.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Base Model
    ↓
Specialized training examples
    ↓
Fine-tuned Model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Don't confuse this with RAG&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fine-tuning
    ↓
changes model behavior/weights

RAG
    ↓
supplies external information at runtime
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;If the problem is:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"The AI doesn't know today's MotoShare vehicle inventory."
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fine-tuning is generally the wrong solution.&lt;/p&gt;

&lt;p&gt;You want:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Database / Search
        ↓
Retrieve current vehicles
        ↓
LLM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  RAG
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;RAG = Retrieval-Augmented Generation.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;RAG retrieves relevant information from an external source and supplies that information to an LLM as context before generation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Question
      ↓
Create/Search representation
      ↓
Knowledge Base / Vector DB
      ↓
Relevant Documents
      ↓
Prompt + Documents
      ↓
LLM
      ↓
Answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;Your database may know:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vehicle availability
Rental price
Booking policy
Cancellation policy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The LLM shouldn't invent these.&lt;/p&gt;

&lt;p&gt;Retrieve them.&lt;/p&gt;

&lt;p&gt;Then let the LLM reason/generate using them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompting vs RAG vs Fine-tuning
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/0hp64owzwccjk62jxva9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/0hp64owzwccjk62jxva9.png" alt=" " width="752" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The complete LLM request lifecycle
&lt;/h2&gt;

&lt;p&gt;Here is the architecture you should remember:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                React Application
                          │
                          │ HTTP
                          ▼
                  ┌───────────────┐
                  │    FastAPI    │
                  └───────┬───────┘
                          │
                    Validate Input
                          │
                          ▼
                 Build Instructions
                          │
                          ▼
                System + User Prompt
                          │
                          ▼
                   TOKENIZATION
                          │
                          ▼
                ┌──────────────────┐
                │  Context Window  │
                │                  │
                │ System Prompt    │
                │ User Prompt      │
                │ History          │
                │ RAG Context      │
                │ Tool Results     │
                └────────┬─────────┘
                         │
                         ▼
                  Transformer / LLM
                         │
                  ┌──────┴──────┐
                  │ Attention   │
                  │ Neural Net  │
                  │ Parameters  │
                  └──────┬──────┘
                         │
                         ▼
                 Next-token scores
                         │
                         ▼
             Temperature / Sampling
                         │
                         ▼
                  Select Token
                         │
                         ▼
               Generate Next Token
                         │
                    repeat...
                         │
                         ▼
                   Model Output
                         │
                         ▼
                Pydantic Validation
                         │
                 ┌───────┴────────┐
                 │                │
              Valid            Invalid
                 │                │
                 ▼                ▼
           Business Logic    Retry / Reject
                 │
                 ▼
             FastAPI Response
                 │
                 ▼
                React
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;How everything connects&lt;/p&gt;

&lt;p&gt;The entire Week 1 can be reduced to this mental model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;            AI
                     │
              Machine Learning
                     │
               Deep Learning
                     │
              Neural Networks
                     │
                Transformer
                     │
                    LLM
                     │
        ┌────────────┼─────────────┐
        │            │             │
      Tokens      Attention    Embeddings
        │            │             │
        └────────────┼─────────────┘
                     │
               Context Window
                     │
                   Prompt
                     │
                 Inference
                     │
        Temperature + Sampling
                     │
               Generated Output
                     │
              Possible Hallucination
                     │
                  Validation
                     │
             Production Application
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What you need to know before moving forward&lt;/p&gt;

&lt;p&gt;Don't memorize definitions. You should be able to explain these relationships:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ML → Deep Learning → Neural Network → Transformer → LLM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Text → Tokens → Context → Transformer → probabilities → sampling → tokens → response → validation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;and finally:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompting = give instructions

RAG = give external/current knowledge

Fine-tuning = modify model behavior through additional training

Pretraining = create the general model capability
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Main Difference Between All the Concepts
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/apdo6fyplsuplsfti6st.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/apdo6fyplsuplsfti6st.png" alt=" " width="1237" height="697"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/lawcwjqe1g7kbln98m90.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/lawcwjqe1g7kbln98m90.png" alt=" " width="1216" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chatgpt.com/c/6a74b4a3-2b68-83ee-ba31-9342c57cc20a" rel="noopener noreferrer"&gt;chatgpt&lt;/a&gt;&lt;br&gt;
&lt;a href="https://chatgpt.com/c/6a74b4a3-2b68-83ee-ba31-9342c57cc20a" rel="noopener noreferrer"&gt;differences&lt;/a&gt;&lt;br&gt;
&lt;a href="https://chatgpt.com/c/6a76baaf-597c-83e8-aac0-aaa4d6980485" rel="noopener noreferrer"&gt;differences&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Ultimate Reusable Master Prompt to Become an AI Agentic Developer</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Thu, 06 Aug 2026 02:54:34 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/the-ultimate-reusable-master-prompt-to-become-an-ai-agentic-developer-mlf</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/the-ultimate-reusable-master-prompt-to-become-an-ai-agentic-developer-mlf</guid>
      <description>&lt;p&gt;the best cycle is:&lt;br&gt;
For each week:&lt;br&gt;
Master instruction prompt&lt;br&gt;
Week 1: Practical LLM foundations&lt;br&gt;
Week 2: FastAPI AI microservice with Laravel&lt;br&gt;
Week 3: Prompt engineering as software engineering&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;the best cycle is&lt;/strong&gt;:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Understand → Build → Break → Debug → Improve → Test → Explain
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;Not:&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Watch videos → Take notes → Watch more videos → Forget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How to use these prompts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;For each week:&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Start a fresh ChatGPT or Claude conversation.
Paste the Master Instruction Prompt.
Paste that week’s prompt.
Write the code yourself.
Share your code for review.
Finish the weekly GitHub project and README.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;strong&gt;Each one-hour topic session should approximately follow:&lt;/strong&gt;&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10 minutes: Essential theory
10 minutes: Architecture and minimal example
25 minutes: You implement
10 minutes: Debugging and improvement
5 minutes: Questions and revision
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Master instruction prompt
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Paste this once at the beginning of every weekly conversation.

Act as my senior AI engineering mentor, pair programmer, system architect,
technical interviewer and code reviewer.

My background:
- Six years of professional software development experience
- Experienced in Python, PHP, Laravel, REST APIs, SQL, PostgreSQL,
  Redis, Docker, Git, Linux and microservice architecture
- I understand classes, functions, APIs, databases, queues, authentication,
  validation and software architecture
- Do not teach basic Python, Laravel, Git, SQL or HTTP
- My goal is to become a production-oriented AI and Agentic AI developer
  in 12 weeks

My learning method:

Understand → Build → Break → Debug → Improve → Test → Explain

For every topic, follow this exact process.

PHASE 1 — ESSENTIAL THEORY

Spend no more than 10–15 minutes of reading.

Explain:
1. What problem the technology solves
2. How it works internally at a practical level
3. Its important terminology
4. How it relates to Laravel, Python, APIs, queues, services,
   middleware, events or state machines
5. When it should be used
6. When it should not be used
7. What I can safely ignore for now

Avoid:
- long history
- unnecessary mathematics
- beginner programming lessons
- generic definitions without real examples

PHASE 2 — MINIMAL IMPLEMENTATION

Show the smallest runnable example.

Include:
- architecture
- folder structure
- installation commands
- environment variables
- request and response contracts
- important code only
- command to run it
- one success test
- one failure test

Explain why every important component exists.

PHASE 3 — MY CODING TASK

Give me a practical task to implement myself.

Provide:
- requirements
- API contract
- input and output examples
- acceptance criteria
- edge cases
- test requirements

Do not provide the complete solution.

Wait for me to share my implementation.

PHASE 4 — CODE REVIEW

When I share code, review:

- correctness
- architecture
- validation
- type safety
- security
- exception handling
- retries and timeouts
- testability
- maintainability
- performance
- token and API cost
- production readiness

Return:

1. Critical problems
2. Why each problem matters
3. Hints to correct them
4. Corrected code only where necessary
5. Missing test cases
6. Score out of 10
7. Next implementation task

PHASE 5 — BREAK AND DEBUG

Create realistic failures such as:

- invalid input
- malformed model output
- provider timeout
- API rate limit
- unavailable database
- incorrect tool call
- duplicate execution
- authorization failure
- context-window overflow
- prompt injection
- infinite agent loop

Let me diagnose the issue before showing the answer.

PHASE 6 — PRODUCTION UPGRADE

Upgrade the working version one feature at a time:

- clean architecture
- Pydantic validation
- configuration management
- authentication
- authorization
- retries
- timeouts
- idempotency
- structured logging
- tracing
- caching
- queue processing
- cost limits
- security
- unit tests
- integration tests
- Docker
- CI/CD
- Laravel integration

Explain the production problem solved by each improvement.

PHASE 7 — ASSESSMENT

Give me:

- five practical questions
- three debugging scenarios
- three interview questions
- one architecture decision
- one improvement assignment

After I answer, score:

- conceptual understanding
- implementation ability
- debugging ability
- architecture ability
- production readiness

Never move to the next phase until I finish the current phase or ask you
to continue.

My goal is to write and understand the implementation—not merely copy
AI-generated code.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 1: Practical LLM foundations
&lt;/h2&gt;

&lt;p&gt;The blog places Python, FastAPI and core AI concepts in Weeks 1–2. Since you already know Python, Week 1 should concentrate on transformers, tokens, context windows, inference, embeddings, temperature, hallucinations and the difference between training, fine-tuning and prompting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 1 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, teach Week 1 through a practical
“LLM Experiment Lab.”

PROJECT

Create a Python command-line and notebook-based laboratory that demonstrates:

1. Tokenization
2. Context windows
3. Temperature
4. Deterministic versus probabilistic output
5. System and user messages
6. Structured output
7. Embeddings and semantic similarity
8. Hallucination
9. Prompting versus fine-tuning
10. Input/output token cost estimation

PHASE 1 — ESSENTIAL THEORY

Explain only the theory required to run these experiments:

- machine learning versus deep learning versus generative AI
- transformer architecture at a practical level
- tokens and tokenization
- attention at a high level
- context window
- inference
- temperature, top-p and sampling
- embeddings
- hallucination
- pretraining, fine-tuning, RAG and prompting

For every concept:

- give a precise two- or three-line explanation
- compare it with traditional backend development
- show one product use case
- explain one common failure

Do not teach advanced mathematics.

PHASE 2 — MINIMAL EXPERIMENTS

Guide me through small runnable experiments:

Experiment 1:
Tokenize three different texts and compare token counts.

Experiment 2:
Call an LLM three times with temperature 0 and temperature 1.

Experiment 3:
Send a long conversation and observe context usage.

Experiment 4:
Generate valid and invalid JSON and validate it with Pydantic.

Experiment 5:
Create embeddings for five sentences and calculate semantic similarity.

Experiment 6:
Ask the model a question not covered by the supplied context and observe
hallucination.

Provide installation commands and a minimal project structure.

PHASE 3 — MY TASK

Ask me to build an “AI Text Analyzer” that:

- accepts user text
- estimates token usage
- summarizes it
- classifies its category
- extracts structured entities
- returns estimated API cost
- records latency
- handles malformed output

Do not provide the full solution.

Acceptance criteria:

- typed Python code
- Pydantic models
- environment variables
- provider abstraction
- pytest tests
- timeout handling
- structured logging

PHASE 4 — PRODUCTION DISCUSSION

After my implementation works, explain:

- why model output cannot be trusted directly
- why structured validation is required
- when low temperature is useful
- when embeddings are useful
- when RAG is preferable to fine-tuning
- how context affects cost and latency

Then review my implementation.

PHASE 5 — ASSESSMENT

Give me:

- five experiment-based questions
- three debugging problems
- three interview questions
- one scenario requiring me to choose among prompting, RAG and fine-tuning
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 1 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: ai-llm-experiment-lab
Deliverable: Token, temperature, embeddings and structured-output experiments
README: Explain findings from every experiment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR Week 1: AI and LLM foundations
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Prompt 1: Learn the AI mental model
Using my master instructions, teach me the practical AI and LLM foundations
required by an experienced backend developer.

Cover:
- machine learning versus deep learning versus generative AI
- neural networks at a practical level
- transformers
- attention
- tokenization
- context windows
- inference
- temperature and sampling
- pretraining, fine-tuning and prompting
- embeddings
- hallucination
- deterministic software versus probabilistic AI systems

Do not teach advanced mathematics unless it is directly required.

For every concept:
1. Give a precise definition.
2. Explain what happens internally.
3. Compare it with a traditional backend concept.
4. Show where I would use it in a real product.
5. Explain what can go wrong.
6. Give one small experiment I can execute.

Conclude with a diagram of an LLM request lifecycle, from user input to
tokenization, inference, output generation and validation.
Prompt 2: Tokens, context and cost
Teach me tokens, context windows and LLM cost management as a production engineer.

Use concrete examples involving:
- a Laravel support application
- a Python FastAPI AI service
- conversation history
- large documents
- system prompts
- tool responses

Demonstrate:
- how text becomes tokens
- why context is not permanent memory
- what consumes the context window
- how long conversations fail
- truncation, summarization and sliding-window strategies
- how to estimate cost per request
- how to set request-level token budgets

Give me Python utilities for:
- estimating tokens
- rejecting oversized requests
- trimming conversation history
- logging estimated input and output cost

Include unit tests and edge cases.
Prompt 3: One-hour implementation
Guide me through building a minimal FastAPI LLM service.

Endpoints:
POST /summarize
POST /classify
POST /extract
POST /chat

Requirements:
- Pydantic request and response models
- structured outputs
- environment-based configuration
- provider abstraction
- timeout and retry handling
- consistent error responses
- structured logging
- pytest tests
- Docker support

Do not give the complete code immediately.

First:
1. Present the architecture.
2. Present the folder structure.
3. Define the API contracts.
4. Identify failure scenarios.
5. Wait for my approval.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then guide me file by file and review each part I share.&lt;/p&gt;

&lt;h2&gt;
  
  
  Week 2: FastAPI AI microservice with Laravel
&lt;/h2&gt;

&lt;p&gt;The roadmap’s first project is a FastAPI service with /summarize, /classify, /extract and /chat, connected to a Laravel application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 2 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, teach Week 2 by building a production-oriented
FastAPI AI microservice and connecting it to Laravel.

PROJECT ARCHITECTURE

Laravel application
        ↓ REST API or Queue
FastAPI AI microservice
        ↓
LLM provider

REQUIRED ENDPOINTS

POST /api/v1/summarize
POST /api/v1/classify
POST /api/v1/extract
POST /api/v1/chat
GET  /health
GET  /ready

PHASE 1 — ESSENTIAL THEORY

Explain only the FastAPI features important to AI services:

- async versus sync
- Pydantic request and response models
- dependency injection
- exception handlers
- lifespan management
- middleware
- connection pooling
- streaming
- health and readiness endpoints

Compare each feature with its Laravel equivalent.

PHASE 2 — ARCHITECTURE

First provide:

- component diagram
- folder structure
- API contracts
- Pydantic schemas
- provider interface
- expected errors
- security boundaries

Do not provide the complete implementation yet.

Suggested architecture:

app/
  api/
  core/
  models/
  schemas/
  services/
  providers/
  exceptions/
  middleware/
tests/

PHASE 3 — IMPLEMENTATION TASKS

Guide me through these tasks one at a time:

Task 1:
Create configuration and environment validation.

Task 2:
Create Pydantic request/response schemas.

Task 3:
Create an abstract LLM provider interface.

Task 4:
Implement one provider.

Task 5:
Implement /summarize.

Task 6:
Implement /classify and /extract using structured outputs.

Task 7:
Implement /chat with limited conversation history.

Task 8:
Create Laravel AIService using Laravel HTTP Client.

Task 9:
Move long-running calls to a Laravel queue job.

Wait for my code after every task.

PHASE 4 — FAILURE HANDLING

Make me implement:

- connection timeout
- request timeout
- provider rate limit
- malformed model output
- unavailable provider
- invalid API key
- oversized request
- Laravel retry
- duplicate queue execution

PHASE 5 — PRODUCTION UPGRADE

Add:

- service-to-service authentication
- correlation IDs
- idempotency keys
- retries with exponential backoff
- circuit breaker design
- structured logs
- request metrics
- token and cost tracking
- Docker
- pytest
- Laravel integration tests

PHASE 6 — ASSESSMENT

Ask me when to use:

- direct synchronous HTTP
- Laravel queue
- webhook callback
- Redis/message broker
- streaming response

Give practical and interview questions after implementation.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 2 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: laravel-fastapi-ai-service
Deliverable: Laravel application calling four AI endpoints
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR FastAPI AI microservice and Laravel integration
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: Production FastAPI architecture&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach me only the FastAPI concepts that are important for production AI services.

Skip basic Python and basic REST explanations.

Cover:
- dependency injection
- async versus sync endpoints
- Pydantic validation
- middleware
- exception handlers
- lifespan events
- connection pooling
- background tasks
- streaming responses
- API authentication
- rate limiting
- request IDs
- health and readiness endpoints

Compare every major concept with its Laravel equivalent.

Build a reference architecture for:

Laravel application
    ↓
Python FastAPI AI service
    ↓
LLM provider
    ↓
PostgreSQL / Redis

Explain which responsibilities belong in Laravel and which belong in FastAPI.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: Laravel-to-Python integration&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Design a reliable integration between Laravel and a FastAPI AI microservice.

Use case:
Laravel sends text to FastAPI for summarization, classification, extraction
or chat completion.

Cover:
- synchronous HTTP calls
- asynchronous Laravel queue jobs
- webhook callbacks
- Redis or message-queue integration
- authentication between services
- idempotency keys
- correlation IDs
- retries with exponential backoff
- timeout handling
- circuit breakers
- duplicate request prevention
- audit logs

Provide:
1. Sequence diagram
2. API contract
3. Laravel service class
4. Laravel queue job
5. FastAPI endpoint
6. Failure-handling strategy
7. Integration tests

Explain when HTTP is enough and when a queue is preferable.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 3: Code-review prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use this whenever you complete a feature:

Review the following implementation as a senior AI platform engineer.

Evaluate:
- architecture
- correctness
- type safety
- async usage
- validation
- security
- timeout handling
- retries
- idempotency
- structured logging
- test coverage
- maintainability
- Laravel integration
- production readiness

Do not rewrite everything immediately.

Return:
1. Critical problems
2. High-priority improvements
3. Optional improvements
4. Missing test cases
5. Corrected code only for critical sections
6. A score out of 10
7. Conditions required before production deployment

Here is my implementation:

[PASTE CODE]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 3: Prompt engineering as software engineering
&lt;/h2&gt;

&lt;p&gt;The blog’s Weeks 3–4 include message roles, prompt engineering, structured JSON output, tool calling, streaming, history, token management, and retry/fallback handling. It specifically says not to practise only inside ChatGPT but to create API-based applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 3 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, teach Week 3 by building a production
Prompt Engineering Laboratory.

PROJECT

Build an API that generates:

- MotoShare vehicle descriptions
- HolidayLandmark trip summaries
- DevOpsSchool course descriptions

PHASE 1 — ESSENTIAL THEORY

Explain prompt engineering as software engineering.

Cover:

- system, developer, user and assistant messages
- instruction hierarchy
- zero-shot prompting
- few-shot prompting
- context
- constraints
- delimiters
- output contracts
- reusable prompt templates
- prompt injection
- hallucination reduction
- prompt versioning

For every concept:

1. Show a weak prompt.
2. Run or predict its likely failure.
3. Show an improved prompt.
4. Define a test for it.

PHASE 2 — BUILD A PROMPT TEMPLATE SYSTEM

Design a template structure containing:

- prompt name
- prompt version
- purpose
- system instruction
- input variables
- constraints
- output schema
- examples
- refusal behavior
- changelog

Store templates outside application code.

PHASE 3 — PRACTICAL EXPERIMENTS

Experiment with:

- vague versus explicit instructions
- zero-shot versus few-shot
- plain text versus structured output
- no delimiters versus clear delimiters
- no examples versus two examples
- one large prompt versus modular prompt sections
- temperature differences

Record results in a comparison table.

PHASE 4 — MY PROJECT

Ask me to implement a “Vehicle Listing Content Generator.”

Input:

- vehicle category
- brand
- model
- year
- city
- features
- rental price
- target customer
- language
- desired tone

Output:

- listing title
- short description
- detailed description
- five highlights
- SEO title
- meta description
- social caption
- warnings when information is missing

Requirements:

- Pydantic validation
- prompt templates
- prompt versions
- no invented vehicle features
- multilingual support
- regression tests
- token logging

Do not provide the complete solution.

PHASE 5 — PROMPT DEBUGGING

Give me five failing model responses.

Make me identify whether each problem is:

- ambiguous instruction
- missing context
- prompt conflict
- hallucination
- schema failure
- unsupported request
- prompt injection

PHASE 6 — ASSESSMENT

Ask practical questions about designing, testing, versioning and improving prompts.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 3 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: production-prompt-engineering-lab
Deliverable: Tested and versioned prompt-template service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR Prompt engineering and structured output
&lt;/h2&gt;

&lt;p&gt;The roadmap’s Weeks 3–4 include system/user/assistant messages, prompt engineering, structured JSON, streaming, conversation history, token management and fallback handling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: Prompt engineering for developers&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach me prompt engineering as software engineering, not as a list of clever phrases.

Cover:
- system, developer, user and assistant instructions
- instruction hierarchy
- zero-shot and few-shot prompting
- constraints
- delimiters
- role and context
- output contracts
- prompt templates
- prompt versioning
- prompt injection
- handling ambiguous input
- avoiding unsupported claims

For each concept:
- show a weak prompt
- explain why it fails
- show an improved prompt
- define how its quality can be tested

Use examples from:
- MotoShare vehicle description generation
- HolidayLandmark itinerary generation
- DevOpsSchool support answers

End by giving me a reusable production prompt template with:
purpose, input, constraints, output schema, failure behavior and examples.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: Structured output with Pydantic&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach me how to obtain reliable structured output from an LLM.

Build a HolidayLandmark Trip Creation Assistant that accepts:
- destination
- number of days
- budget
- traveller type
- group size
- preferences

It must return:
- title
- summary
- highlights
- day-wise itinerary
- price suggestion
- exclusions
- warnings
- confidence

Requirements:
- strict Pydantic schemas
- enums where appropriate
- nested models
- field constraints
- output validation
- retry after malformed output
- refusal when information is insufficient
- no invented factual claims
- model-independent provider interface

First design the schema.
Then design the prompt.
Then implement the service.
Then create at least 15 malformed-output and edge-case tests.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 3: Prompt debugging&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I will give you a prompt and several model outputs.

Act as a prompt debugger.

For every failure:
1. Classify the failure:
   - instruction failure
   - schema failure
   - missing context
   - ambiguity
   - hallucination
   - unsafe behavior
   - model limitation
2. Identify the exact prompt section responsible.
3. Recommend the smallest possible correction.
4. Do not overcomplicate the prompt.
5. Create a regression test for the failure.
6. Produce the corrected version with a version number and changelog.

Prompt:
[PASTE PROMPT]

Expected output:
[PASTE EXPECTED OUTPUT]

Actual outputs:
[PASTE OUTPUTS]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 4: Structured output, tools, streaming and conversation history
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Week 4 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, teach Week 4 by building a HolidayLandmark
AI Trip Creation Assistant.

USER INPUT

- destination
- number of days
- budget
- currency
- traveller type
- group size
- preferred activities
- accommodation preference
- travel month

REQUIRED OUTPUT

- title
- summary
- highlights
- daily itinerary
- estimated pricing
- inclusions
- exclusions
- warnings
- required trip JSON

PHASE 1 — ESSENTIAL THEORY

Explain:

- structured outputs
- JSON schema
- Pydantic nested models
- enums and constraints
- structured output versus tool calling
- tool selection
- tool argument validation
- conversation history
- context management
- streaming responses
- retries and fallbacks

PHASE 2 — SCHEMA-FIRST DESIGN

Before writing prompts:

1. Design the complete Pydantic schema.
2. Identify required and optional fields.
3. Add range and length constraints.
4. Define enums.
5. Define validation rules.
6. Show valid and invalid payloads.

Wait for my approval.

PHASE 3 — MINIMAL VERSION

Build Version 1:

- one request
- one LLM call
- validated structured response
- no tools
- no conversation
- no database write until validation succeeds

PHASE 4 — TOOL-CALLING VERSION

Add safe tools:

- get_destination_information
- search_available_trip_categories
- get_currency_information
- estimate_base_price
- check_existing_similar_trips

Teach:

- how the model selects a tool
- how application code executes it
- why the model must not directly access the database
- argument validation
- authorization
- maximum tool-call iterations

PHASE 5 — CONVERSATIONAL VERSION

Allow the assistant to ask for missing information.

Implement:

- limited conversation history
- summarization of old messages
- token budget
- streaming response
- cancellation
- conversation persistence
- user isolation

PHASE 6 — FAILURE TESTS

Make me handle:

- invalid JSON
- missing days
- unrealistic budget
- unsupported destination
- tool timeout
- repeated tool call
- invented pricing
- context overflow
- interrupted stream

PHASE 7 — LARAVEL INTEGRATION

Create:

- Laravel form
- request validation
- AI-service call
- preview page
- human confirmation
- storage only after confirmation
- audit record containing prompt and schema version

PHASE 8 — ASSESSMENT

Test me on structured output, tools, conversation state and streaming.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 4 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: holidaylandmark-ai-trip-assistant
Deliverable: AI-generated trip preview validated before database storage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR Tool calling, streaming and conversations
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: Function and tool calling&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach function calling and tool calling from first principles for an
experienced API developer.

Explain:
- the difference between structured output and tool calling
- tool schema
- tool selection
- tool arguments
- execution by application code
- returning tool results to the model
- parallel versus sequential tool calls
- forced versus automatic tool selection
- validation and authorization
- tool-call loops
- maximum iteration limits

Build a MotoShare booking assistant with safe read-only tools:

search_vehicles
check_vehicle_availability
get_booking_status
get_payment_status
create_support_ticket

The model must never execute database queries directly.

Show:
1. Tool schemas
2. Tool registry
3. Dispatcher
4. Pydantic validation
5. Authorization checks
6. Tool-result handling
7. Loop protection
8. Unit and integration tests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: Conversation history and memory&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Explain conversation history and memory without treating them as the same thing.

Cover:
- message history
- working memory
- persistent memory
- semantic memory
- user profile memory
- summaries
- retrieval-based memory
- privacy and retention
- context-window limitations

Design a conversation architecture using:
- Laravel for users and permissions
- FastAPI for AI orchestration
- PostgreSQL for durable records
- Redis for temporary session state

Explain:
- what should be saved
- what should never be saved
- when conversations should be summarized
- how users can delete stored information
- how to prevent one user's memory from leaking to another

Provide schemas and pseudocode, but do not implement an agent yet.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 3: Streaming implementation&lt;/strong&gt;&lt;br&gt;
Teach and implement token streaming between:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LLM provider
→ FastAPI
→ Laravel
→ Browser UI

Compare:
- Server-Sent Events
- WebSockets
- chunked HTTP responses

Recommend the simplest reliable option for an AI chat application.

Include:
- FastAPI streaming endpoint
- Laravel proxy or direct-client architecture
- cancellation when the user stops generation
- timeout handling
- partial-output handling
- authentication
- logging without storing sensitive content
- frontend JavaScript example
- tests for interrupted and failed streams
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 5: Embeddings and vector search
&lt;/h2&gt;

&lt;p&gt;The roadmap uses Weeks 5–6 for document chunking, embedding models, vector databases, semantic search, filtering, hybrid search, reranking, citations and RAG evaluation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 5 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, teach Week 5 by building semantic search for
DevOpsSchool documentation.

PHASE 1 — ESSENTIAL THEORY

Explain:

- what embeddings represent
- vector dimensions
- cosine similarity
- dot product
- query and document embeddings
- semantic search versus keyword search
- embedding-model selection
- normalization
- multilingual embeddings
- vector indexing
- metadata filtering

Use PostgreSQL and pgvector.

Avoid unnecessary mathematical derivations.

PHASE 2 — EMBEDDING EXPERIMENTS

Create experiments that compare:

- identical sentences
- paraphrased sentences
- similar words with different intentions
- technical terms
- multilingual questions
- irrelevant sentences

Show similarity scores and make me interpret them.

PHASE 3 — DATABASE DESIGN

Design:

documents
document_versions
document_chunks
embedding_jobs

Each chunk should have:

- document ID
- version
- source URL/path
- title
- section
- content
- content hash
- metadata
- embedding model
- vector
- timestamps

Explain pgvector indexes and filtering.

PHASE 4 — INGESTION PIPELINE

Build:

load
→ clean
→ normalize
→ chunk
→ add metadata
→ embed
→ store
→ verify

Compare:

- fixed chunking
- recursive chunking
- semantic chunking
- parent-child chunking

Create an experiment using at least three chunk sizes and overlaps.

PHASE 5 — MY PROJECT

Ask me to implement a semantic documentation search API.

Endpoints:

POST /documents/index
POST /documents/reindex
POST /search
DELETE /documents/{id}

Search response:

- chunk content
- source
- section
- similarity score
- metadata

Requirements:

- pgvector
- metadata filters
- deduplication
- content hashing
- incremental indexing
- deleted-document handling
- pytest tests

PHASE 6 — FAILURE TESTING

Test:

- duplicate documents
- modified documents
- empty documents
- huge files
- poor chunks
- wrong embedding dimensions
- embedding-provider failure
- model migration
- cross-project retrieval

PHASE 7 — ASSESSMENT

Make me explain why retrieval failed in several examples.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 5 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: devopsschool-semantic-search
Deliverable: Search API over real documentation using PostgreSQL + pgvector
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR Embeddings and semantic search
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: Embeddings mental model&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach embeddings to me as an experienced database and backend developer.

Cover:
- what an embedding represents
- vector dimensions
- semantic similarity
- cosine similarity, dot product and Euclidean distance
- why similar words are not always similar intentions
- embedding model selection
- query and document embeddings
- normalization
- multilingual embeddings
- changing embedding models
- limitations of semantic search

Use PostgreSQL and pgvector examples.

Include:
- a small Python experiment
- table schema
- indexing options
- similarity query
- metadata filtering
- common production mistakes
- tests that demonstrate poor and good retrieval
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: Document ingestion pipeline&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Design a production document-ingestion pipeline for a DevOpsSchool
Knowledge Assistant.

Sources:
- Markdown documentation
- README files
- course pages
- troubleshooting guides
- test documentation
- PDFs where text extraction is reliable

Pipeline stages:
load → clean → normalize → split → enrich metadata → embed → store → verify

Teach me:
- fixed-size, recursive and semantic chunking
- chunk overlap
- parent-child chunking
- document and chunk identifiers
- deduplication
- content hashes
- versioning
- incremental re-indexing
- deleted-document handling
- embedding-model migrations

Provide:
1. Architecture
2. Database schema
3. Chunking strategy
4. Python implementation plan
5. Laravel-triggered indexing flow
6. Test plan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 6: Complete production RAG
&lt;/h2&gt;

&lt;p&gt;The blog’s RAG project is a DevOpsSchool Knowledge Assistant that uses documentation, README files, course information, tests and troubleshooting guides, returning an answer, sources and confidence.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 6 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, teach Week 6 by converting the Week 5 semantic
search system into a production RAG Knowledge Assistant.

RESPONSE CONTRACT

{
  "answer": "...",
  "sources": [],
  "confidence": 0.0,
  "answerable": true
}

PHASE 1 — ESSENTIAL THEORY

Explain the complete RAG pipeline:

query
→ query normalization
→ retrieval
→ filtering
→ reranking
→ context construction
→ generation
→ citation validation
→ final response

Explain the difference between:

- retrieval failure
- generation failure
- missing-document failure
- grounding failure

PHASE 2 — NAIVE RAG

Build a minimal RAG version using:

- vector search
- top-k chunks
- one generation prompt
- source list

Then intentionally demonstrate its weaknesses.

PHASE 3 — PRODUCTION IMPROVEMENTS

Add one feature at a time:

1. Metadata filtering
2. Hybrid keyword + vector search
3. Query rewriting
4. Reranking
5. Context deduplication
6. Source citations
7. Insufficient-evidence handling
8. Document-version preference
9. Context token budget
10. Caching

For every feature:

- explain the problem
- define acceptance criteria
- let me implement it
- review my implementation

PHASE 4 — MY PROJECT

Build the DevOpsSchool Knowledge Assistant using:

- documentation
- README files
- course pages
- existing tests
- troubleshooting guides

Requirements:

- answer only from retrieved evidence
- provide citations
- refuse unsupported answers
- return useful confidence information without pretending certainty
- isolate projects and permissions
- record retrieval traces
- track latency, tokens and cost

PHASE 5 — RAG DEBUGGING LAB

Give me traces containing:

- user query
- retrieved chunks
- scores
- selected context
- generated answer

Make me diagnose:

- bad chunking
- missing metadata
- poor embedding match
- incorrect top-k
- noisy retrieval
- missing reranking
- hallucination
- stale documentation
- conflicting documents

PHASE 6 — EVALUATION

Create a golden dataset containing:

- exact questions
- paraphrased questions
- multi-document questions
- unanswerable questions
- ambiguous questions
- outdated-content conflicts
- injection text inside documents

Measure:

- retrieval hit rate
- context relevance
- answer correctness
- groundedness
- citation correctness
- latency
- cost

PHASE 7 — ASSESSMENT

Give practical RAG architecture and debugging questions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 6 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: devopsschool-rag-assistant
Deliverable: Grounded knowledge assistant with citations and evaluation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR Production RAG
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: End-to-end RAG&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach me end-to-end Retrieval-Augmented Generation by building a
DevOpsSchool Knowledge Assistant.

The response contract must be:

{
  "answer": "...",
  "sources": [],
  "confidence": 0.0
}

Cover:
- query preprocessing
- embedding search
- metadata filtering
- hybrid keyword and vector search
- reranking
- context construction
- grounded answer generation
- source citations
- insufficient-evidence responses
- confidence limitations
- latency and cost

First show a naïve RAG pipeline.
Then explain exactly where it fails.
Then develop a production-oriented version.

The system must say that it does not know when the retrieved evidence
does not support an answer.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: RAG debugging&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Act as a RAG debugging expert.

I will provide:
- user query
- retrieved chunks
- expected answer
- generated answer
- retrieval scores

Diagnose whether the failure comes from:
- document ingestion
- chunking
- embeddings
- metadata
- query transformation
- retrieval
- top-k selection
- reranking
- context construction
- generation prompt
- unsupported source content

Return:
1. Root cause
2. Evidence supporting the diagnosis
3. Smallest corrective action
4. Retrieval test to add
5. Generation test to add
6. Whether re-embedding is required
7. Whether the document itself lacks the answer

Data:
[PASTE RAG TRACE]
Prompt 3: RAG evaluation dataset
Help me create a golden evaluation dataset for a RAG system.

Create categories for:
- exact factual questions
- paraphrased questions
- multi-document questions
- questions requiring metadata filters
- unanswerable questions
- ambiguous questions
- outdated-information conflicts
- prompt-injection attempts inside documents
- similar but incorrect documents
- large-context questions

For each test case define:
- query
- expected source document
- expected facts
- forbidden claims
- answerability
- retrieval success criteria
- generation success criteria

Do not generate fake company facts. Give me a template and guide me to
populate it from my real documents.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 7: Agentic AI without a framework
&lt;/h2&gt;

&lt;p&gt;The blog defines an agent as a system that receives a goal, selects tools, acts, observes the result and continues until completion or human intervention. It recommends starting with a fixed workflow and adding autonomy only where genuinely necessary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 7 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, teach Week 7 by building a tool-using agent
in plain Python without LangGraph.

PROJECT

Build a Laravel Error Investigation Agent.

SAFE TOOLS

- read_log_excerpt
- search_repository
- read_file
- list_recent_migrations
- read_configuration
- search_known_solutions

PHASE 1 — ESSENTIAL THEORY

Explain:

- agent goal
- agent loop
- observation
- action
- tool
- planning
- state
- memory
- termination
- human approval
- bounded autonomy
- idempotency
- error recovery

Compare:

- chatbot
- tool-using assistant
- deterministic workflow
- router
- autonomous agent

Explain when a normal function is better than an agent.

PHASE 2 — FIXED WORKFLOW FIRST

Build a deterministic workflow:

receive error
→ classify error
→ read logs
→ choose investigation category
→ inspect relevant information
→ create report
→ request approval
→ stop

Use plain Python functions and typed state.

PHASE 3 — ADD LIMITED DECISION-MAKING

Allow the model to choose among approved read-only tools.

Implement:

- tool registry
- Pydantic argument validation
- authorization
- result size limits
- timeout
- maximum steps
- duplicate-action detection
- stop conditions

PHASE 4 — MY TASK

Ask me to implement the agent loop myself.

Do not provide the full code.

Acceptance criteria:

- explicit state
- deterministic termination
- maximum 10 steps
- read-only access
- audit trail
- no shell
- no arbitrary SQL
- no production modification
- human approval before recommendations are applied

PHASE 5 — FAILURE SIMULATION

Create:

- infinite loop
- repeated tool call
- incorrect tool choice
- invalid arguments
- tool timeout
- unauthorized file request
- poisoned tool output
- incomplete investigation

Let me debug each one.

PHASE 6 — ASSESSMENT

Ask me to decide which parts should be deterministic and which parts
benefit from model reasoning.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 7 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: plain-python-error-investigation-agent
Deliverable: Safe tool-calling agent without an agent framework
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR Agentic AI foundations
&lt;/h2&gt;

&lt;p&gt;The blog correctly distinguishes an agent from a chatbot: an agent receives a goal, chooses tools, acts, observes results and continues until completion or human intervention. It also recommends beginning with deterministic workflows before introducing autonomy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: Agent mental model&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach Agentic AI to me using state-machine and workflow concepts.

Cover:
- agent loop
- goal
- observation
- reasoning
- action
- tool
- state
- memory
- termination
- human approval
- planning
- retries
- error recovery
- idempotency
- bounded autonomy

Compare:
- chatbot
- tool-using assistant
- deterministic workflow
- router
- autonomous agent
- long-running agent

For each one explain:
- appropriate use case
- inappropriate use case
- level of risk
- testing difficulty
- production controls required

Conclude with a decision tree answering:
“Does this problem actually require an agent?”
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: Build without a framework first&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Help me implement a minimal tool-using agent in plain Python before using LangGraph.

Agent task:
Investigate an application error using safe, read-only tools.

Tools:
- read_log_excerpt
- search_repository
- read_file
- search_documentation
- list_recent_migrations

Requirements:
- explicit state model
- maximum-step limit
- validated tool arguments
- permission checks
- tool timeout
- duplicate-action detection
- final report
- request human approval before any proposed modification
- no shell access
- no production writes

Guide me through:
1. State design
2. Agent loop pseudocode
3. Tool interface
4. Stop conditions
5. Implementation
6. Tests
7. Failure simulation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 8: LangGraph and stateful agent workflows
&lt;/h2&gt;

&lt;p&gt;The roadmap identifies LangGraph as suitable for stateful, long-running workflows with shared state, nodes, persistence and memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 8 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, teach Week 8 by converting the Week 7 plain-Python
agent into LangGraph.

PHASE 1 — ESSENTIAL THEORY

Explain using Laravel and workflow comparisons:

- StateGraph
- typed shared state
- nodes
- edges
- conditional edges
- reducers
- START and END
- checkpoints
- persistence
- interrupts
- human-in-the-loop
- retries
- subgraphs
- resumability

For every concept:

- explain the problem it solves
- show where it maps to the Week 7 implementation
- explain when it is unnecessary

PHASE 2 — ARCHITECTURE FIRST

Before coding, provide:

- graph diagram
- state schema
- node responsibilities
- edge conditions
- stop conditions
- checkpoint strategy
- approval points

Wait for my approval.

PHASE 3 — STEP-BY-STEP CONVERSION

Guide me through:

Task 1:
Define typed state.

Task 2:
Convert classification into a node.

Task 3:
Convert log inspection into a node.

Task 4:
Add conditional routing.

Task 5:
Add tool execution.

Task 6:
Add report generation.

Task 7:
Add human approval interrupt.

Task 8:
Add persistent checkpoints.

Task 9:
Resume an interrupted investigation.

Wait for my code after every task.

PHASE 4 — WHY STATEGRAPH?

After the minimal graph works, compare it with the Week 7 implementation.

Explain concretely:

- what StateGraph improved
- what complexity it added
- when plain Python remains preferable
- how persistence and interrupts change the design

PHASE 5 — PRODUCTION UPGRADE

Add:

- maximum-iteration guard
- retries per node
- idempotent nodes
- redacted checkpoints
- audit events
- tool authorization
- correlation IDs
- FastAPI endpoint
- Laravel API client
- queue execution
- Docker
- pytest branch coverage

PHASE 6 — DEBUGGING

Give me broken graphs containing:

- infinite cycles
- missing state
- overwritten state
- incorrect reducer
- dead-end node
- checkpoint failure
- repeated side effect
- approval bypass

PHASE 7 — ASSESSMENT

Give implementation, architecture and interview questions about LangGraph.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 8 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: langgraph-production-error-agent
Deliverable: Resumable, checkpointed investigation workflow with approval
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR LangGraph and stateful workflows
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: Learn LangGraph efficiently&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach me LangGraph assuming I understand Laravel workflows, queues,
state machines and microservices.

Do not start with installation.

First explain:
- why LangGraph exists
- shared state
- nodes
- edges
- conditional edges
- StateGraph
- reducers
- checkpoints
- persistence
- interrupts
- human-in-the-loop
- subgraphs
- retries
- time travel or replay concepts

For each concept:
- show its Laravel or backend equivalent
- explain when it is useful
- show a minimal example
- describe one production mistake

Then convert the plain-Python error investigation agent from Week 7
into LangGraph.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: Production Error Investigation Agent&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Design a Production Error Investigation Agent using LangGraph.

Workflow:
1. Accept error details.
2. Read a limited Laravel log excerpt.
3. Classify the error.
4. Search relevant repository files.
5. Inspect related configuration and migrations.
6. Search known documentation.
7. formulate likely causes.
8. Propose a fix.
9. Generate tests.
10. Ask for human approval.
11. Stop without modifying production.

Requirements:
- typed shared state
- deterministic stages where possible
- conditional routing
- checkpointing
- resumability
- maximum iteration limit
- tool authorization
- audit trail
- idempotency
- timeout and retry policies
- sensitive-data redaction

First provide the graph diagram and state schema.
Do not write implementation until I approve them.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 3: LangGraph debugging&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Review the following LangGraph implementation.

Check specifically for:
- mutable or poorly defined state
- incorrect reducers
- infinite cycles
- missing stop conditions
- non-idempotent nodes
- unsafe tool execution
- checkpoints containing sensitive data
- improper retry behavior
- confused separation between deterministic logic and model decisions
- missing human approval
- untestable nodes

Return:
1. Graph-level defects
2. Node-level defects
3. State-schema defects
4. Security defects
5. Corrected graph diagram
6. Minimum changes required
7. Test cases for every branch

Implementation:
[PASTE CODE]
Week 9: Model Context Proto
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 9: MCP server development
&lt;/h2&gt;

&lt;p&gt;The blog describes MCP as an open standard for connecting AI applications with external tools and data, and proposes a MotoShare MCP server with restricted tools rather than dangerous capabilities such as arbitrary SQL or shell execution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 9 prompt&lt;/strong&gt;&lt;br&gt;
Using my master instructions, teach Week 9 by building a secure MotoShare&lt;br&gt;
MCP server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TOOLS

- get_vehicle
- search_bookings
- get_payment_status
- read_application_logs
- create_support_ticket

PHASE 1 — ESSENTIAL THEORY

Explain:

- MCP host
- MCP client
- MCP server
- resources
- tools
- prompts
- tool schemas
- transport
- authentication
- permission boundaries
- local and remote MCP servers

Compare MCP with:

- REST API
- OpenAPI
- function calling
- application plugins
- direct SDK integration

Explain what MCP standardizes and what it does not.

PHASE 2 — THREAT MODEL

Before implementation, identify:

- unauthorized users
- tenant leakage
- excessive permissions
- prompt injection
- malicious tool arguments
- sensitive logs
- replay
- duplicate execution
- denial of service
- secret leakage

PHASE 3 — CONTRACT DESIGN

For every tool, define:

- purpose
- input schema
- output schema
- allowed roles
- data boundaries
- pagination
- rate limit
- timeout
- audit event
- failure responses

Create a permission matrix.

PHASE 4 — IMPLEMENTATION

Guide me one tool at a time.

Requirements:

- strict schemas
- service authentication
- user authorization
- tenant isolation
- parameter allowlists
- pagination
- redaction
- rate limiting
- structured logging
- audit trail
- human confirmation before support-ticket creation

Do not expose:

- arbitrary SQL
- unrestricted shell
- unrestricted file access
- raw database credentials
- production write operations

PHASE 5 — CLIENT INTEGRATION

Connect the MCP server to an AI host.

Demonstrate:

- tool discovery
- tool selection
- argument validation
- result handling
- failed tool calls
- permission denial

PHASE 6 — SECURITY TESTING

Make me test:

- SQL injection attempt
- path traversal
- cross-user booking access
- unbounded log request
- prompt injection through tool output
- duplicate ticket creation
- expired credentials
- excessive request rate

PHASE 7 — ASSESSMENT

Ask me to choose when MCP is better than direct REST integration.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 9 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: motoshare-secure-mcp-server
Deliverable: Authenticated MCP server with five bounded tools
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR Model Context Protocol
&lt;/h2&gt;

&lt;p&gt;The blog’s Week 9 covers MCP hosts, clients, servers, resources, tools, prompts, authentication and permission boundaries, with a MotoShare MCP server as the project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: Learn MCP architecture&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach MCP to me as an experienced API and microservice developer.

Explain:
- what problem MCP solves
- host, client and server
- resources
- tools
- prompts
- schemas
- transport
- capability negotiation
- local versus remote servers
- authentication
- authorization and trust boundaries

Compare MCP with:
- REST APIs
- OpenAPI
- function calling
- plugins
- SDK integrations

Explain what MCP standardizes and what it does not.

Conclude with:
- when to use MCP
- when a normal REST API is better
- security checklist
- production architecture diagram
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: MotoShare MCP server&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Guide me through building a secure MotoShare MCP server.

Expose only these tools:
- get_vehicle
- search_bookings
- get_payment_status
- read_application_logs
- create_support_ticket

Requirements:
- strict input schemas
- user and role authorization
- tenant isolation
- read limits
- log redaction
- pagination
- rate limiting
- audit logging
- timeout handling
- no arbitrary SQL
- no shell commands
- no unrestricted file access
- human confirmation before creating a support ticket

First define:
1. Threat model
2. Tool contracts
3. Permission matrix
4. Error model
5. Audit event schema
6. Test cases

Only then implement the server step by step.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 3: MCP security review&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Perform a security review of this MCP server.

Look for:
- excessive tool permissions
- prompt injection through tool output
- unauthorized cross-user access
- tenant data leakage
- arbitrary parameters
- SQL injection
- path traversal
- sensitive log exposure
- missing rate limits
- missing human approval
- replay and duplicate execution
- secrets in errors
- weak authentication

Return findings using:
severity, attack scenario, affected component, remediation and test case.

Server implementation:
[PASTE CODE]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 10: Multi-agent systems
&lt;/h2&gt;

&lt;p&gt;The roadmap covers supervisor-worker, router, planner-executor, reviewer, parallel workers, handoffs and shared state, while warning against creating multiple agents merely to appear advanced.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 10 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, teach Week 10 by building a Software QA
Agent Workflow.

PROPOSED ROLES

- Requirement Analyzer
- Test Planner
- API Test Generator
- UI Test Generator
- Security Reviewer
- Final Report Composer

PHASE 1 — ESSENTIAL THEORY

Explain:

- supervisor-worker pattern
- router pattern
- planner-executor pattern
- reviewer or critic pattern
- parallel workers
- handoffs
- shared state
- independent state
- disagreement handling
- termination

For every pattern explain:

- problem solved
- simpler alternative
- cost
- latency
- new failure modes
- testing difficulty

PHASE 2 — AGGRESSIVE SIMPLIFICATION

Before building anything, evaluate every proposed agent.

For each role ask:

- Does it genuinely require reasoning?
- Can deterministic code perform it?
- Can structured output perform it?
- Can it be a normal LangGraph node?
- Does a separate agent justify its cost?

Replace unnecessary agents with normal functions.

PHASE 3 — CONTRACT DESIGN

For retained agents define:

- responsibility
- input schema
- output schema
- allowed tools
- maximum calls
- timeout
- success criteria
- failure behavior
- handoff contract

Do not allow uncontrolled agent-to-agent conversation.

PHASE 4 — PROJECT

Input:

- feature requirement
- API contract
- UI screenshots or acceptance criteria
- existing test documentation

Output:

- analyzed requirements
- test plan
- API test cases
- UI test cases
- security test cases
- traceability matrix
- final review report

Requirements:

- supervisor controls execution
- structured handoffs
- duplicate-test detection
- cost limit
- maximum-step limit
- audit trail
- human review before writing files or creating a PR

PHASE 5 — COMPARISON EXPERIMENT

Build and compare:

Version A:
One structured LLM call

Version B:
Single-agent workflow

Version C:
Multi-agent workflow

Measure:

- quality
- token usage
- latency
- cost
- maintainability
- error rate

PHASE 6 — FAILURE TESTING

Test:

- conflicting agent outputs
- missing handoff field
- repeated task
- endless reviewer cycle
- supervisor failure
- cost limit exceeded
- unsupported requirement
- security reviewer disagreement

PHASE 7 — ASSESSMENT

Make me defend whether multi-agent architecture is justified.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 10 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: ai-software-qa-workflow
Deliverable: Evaluated and simplified multi-agent QA system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR Multi-agent systems
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: Understand patterns and trade-offs&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach multi-agent systems without hype.

Cover:
- supervisor-worker
- router
- planner-executor
- reviewer or critic
- parallel workers
- handoffs
- shared state
- independent state
- consensus
- termination
- conflict resolution

For each pattern explain:
- problem it solves
- simpler alternative
- additional latency
- additional cost
- new failure modes
- testing strategy

Provide a decision framework for choosing among:
single LLM call, deterministic workflow, single agent and multi-agent system.

Be critical: explain why many multi-agent designs should be replaced by
ordinary functions or workflow nodes.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: Software QA Agent Team&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Design a Software QA Agent Team for Laravel and Python projects.

Roles:
- Requirement Analyzer
- Test Planner
- API Test Generator
- UI Test Generator
- Security Reviewer
- Final Report Composer

Requirements:
- each agent has one bounded responsibility
- structured input and output contracts
- no uncontrolled agent-to-agent conversation
- supervisor controls sequencing
- shared requirement identifier
- duplicate-test detection
- disagreement handling
- cost and step limits
- human review before tests are committed

First evaluate whether every proposed role genuinely needs an LLM.
Replace any unnecessary agent with deterministic code.

Then provide:
1. Architecture
2. Agent contracts
3. State schema
4. Handoff rules
5. Failure handling
6. Evaluation plan
7. Implementation stages
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 3: Simplification review&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Review this multi-agent architecture and aggressively simplify it.

For every agent ask:
- Does it require reasoning?
- Could a normal function perform this task?
- Could it be a LangGraph node?
- Could structured output replace the agent?
- Does it provide enough value to justify latency and cost?

Return:
1. Agents to retain
2. Agents to replace with deterministic functions
3. Agents to merge
4. Simplified architecture
5. Estimated reduction in model calls
6. New testing strategy

Architecture:
[PASTE DESIGN]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 11: Evaluation, security and observability
&lt;/h2&gt;

&lt;p&gt;The roadmap says production AI work should include golden datasets, prompt regression tests, RAG evaluation, tool-call accuracy, hallucination checks, cost and latency tracking, injection protection, validation, rate limiting, audit logs and approval for destructive actions. It recommends creating at least 50 test cases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 11 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, teach Week 11 by creating a complete evaluation,
security and observability system for the projects built in Weeks 1–10.

PHASE 1 — ESSENTIAL THEORY

Explain:

- golden datasets
- offline evaluation
- online monitoring
- prompt regression
- retrieval evaluation
- groundedness
- citation correctness
- schema validity
- tool selection accuracy
- tool argument accuracy
- task-completion rate
- hallucination checks
- human evaluation
- LLM-as-judge limitations

PHASE 2 — EVALUATION FRAMEWORK

Design separate evaluation suites for:

1. Structured outputs
2. Prompt templates
3. RAG
4. Tool calling
5. Agent workflows
6. MCP tools
7. Multi-agent handoffs

Define:

- test input
- expected behavior
- pass/fail rule
- metric
- threshold
- regression status

PHASE 3 — 50-CASE DATASET

Help me create at least 50 meaningful tests covering:

- normal requests
- missing information
- incorrect information
- ambiguous requests
- malformed output
- very large input
- timeout
- provider failure
- tool failure
- repeated execution
- unauthorized action
- prompt injection
- indirect injection
- data leakage
- stale document
- low-quality retrieval
- infinite agent loop
- human rejection

Do not invent company facts.

Use templates that I populate using real project information.

PHASE 4 — SECURITY REVIEW

Threat-model:

- prompt injection
- indirect injection
- tool abuse
- cross-user access
- cross-tenant access
- PII leakage
- secret exposure
- arbitrary actions
- replay
- resource exhaustion
- unsafe generated code

Implement controls and corresponding tests.

PHASE 5 — OBSERVABILITY

Trace:

Browser
→ Laravel
→ Laravel queue
→ FastAPI
→ LLM
→ RAG
→ tools
→ database

Track:

- correlation ID
- trace ID
- model
- prompt version
- schema version
- token usage
- cost
- latency
- retrieval results
- tool calls
- retries
- validation failures
- final status

Define privacy-safe logging and redaction rules.

PHASE 6 — DASHBOARD

Design metrics for:

- request volume
- success rate
- schema failure
- tool failure
- average cost
- p95 latency
- answerability
- retrieval quality
- agent completion
- approval rejection
- injection detection

PHASE 7 — ASSESSMENT

Give me a failed production trace and make me find the root cause.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 11 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: ai-evaluation-security-observability
Deliverable: 50+ test cases, traces, dashboards and security controls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR Evaluation, security and observability
&lt;/h2&gt;

&lt;p&gt;The blog describes this week as the distinction between a demo developer and a professional AI engineer. It calls for golden datasets, prompt regression tests, tool-call accuracy, hallucination checks, latency and cost tracking, injection protection, output validation, rate limiting and audit logs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: Evaluation framework&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Teach me how to evaluate an AI system like a production software system.

My system may contain:
- prompts
- structured outputs
- RAG
- tools
- agents
- human approval

Define separate metrics for:
- answer correctness
- groundedness
- retrieval relevance
- citation correctness
- schema validity
- tool selection
- tool argument accuracy
- task completion
- safety
- latency
- cost

Help me design:
- golden dataset
- offline evaluation
- regression testing
- production monitoring
- human review sampling
- pass/fail thresholds

Explain where LLM-as-judge is useful and where it is unreliable.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: Generate 50 serious test cases&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a test-plan template containing at least 50 categories of test cases
for my AI application.

Include:
- normal requests
- missing information
- contradictory information
- ambiguous instructions
- malformed JSON
- oversized input
- timeouts
- provider failure
- rate limiting
- tool failure
- repeated execution
- unauthorized tool request
- prompt injection
- indirect injection from retrieved documents
- PII leakage
- cross-user data access
- unsupported claims
- weak retrieval
- stale documents
- duplicate actions
- infinite agent loops
- interrupted workflow
- human approval rejection

Do not invent expected business facts.

For each case provide:
test objective, input pattern, expected behavior, failure signal and automation method.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 3: Observability design&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Design observability for a Laravel + FastAPI + LLM agent system.

I need to trace one request across:
browser → Laravel → queue → FastAPI → LLM → tools → database

Cover:
- correlation IDs
- traces
- spans
- structured logs
- model name
- prompt version
- token usage
- latency
- cost
- tool calls
- retries
- validation failures
- human approval
- final status

Protect:
- user messages
- credentials
- access tokens
- personal information
- retrieved confidential documents

Provide:
1. Event schema
2. Trace example
3. Redaction rules
4. Metrics dashboard
5. Alert thresholds
6. Audit versus operational log separation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Week 12: Enterprise AI Operations Assistant
&lt;/h2&gt;

&lt;p&gt;The blog’s final project is an AI Operations Assistant that can read repositories, logs and documentation, find known solutions, produce investigation reports, suggest changes, generate tests, open a draft pull request, require approval and maintain an audit trail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 12 prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Using my master instructions, guide me through building the final enterprise
AI Operations Assistant.

CAPABILITIES

- read authorized GitHub repositories
- read sanitized Laravel logs
- read project documentation
- search known solutions using RAG
- investigate application errors
- identify likely causes
- propose code changes
- generate tests
- create a draft pull request
- request human approval
- maintain an audit trail

SAFETY RULES

- never modify production
- never merge pull requests
- never expose secrets
- never execute arbitrary shell commands
- never execute arbitrary SQL
- use least-privilege access
- require approval before external write actions
- make every action auditable

PHASE 1 — REQUIREMENTS

Help me define:

- users
- roles
- use cases
- non-functional requirements
- scope
- out-of-scope actions
- acceptance criteria

PHASE 2 — THREAT MODEL

Identify:

- repository data leakage
- malicious logs
- prompt injection in code or docs
- unsafe code suggestions
- tool abuse
- unauthorized pull request
- secret leakage
- cross-project access
- duplicate external actions

PHASE 3 — ARCHITECTURE

Use:

- Laravel main application
- FastAPI AI API
- LangGraph workers
- PostgreSQL + pgvector
- Redis
- queue workers
- GitHub integration
- MCP tools where justified
- centralized logs and traces

Provide:

- component diagram
- request sequence
- state schema
- trust boundaries
- permission model
- data model
- API contracts
- failure matrix

Wait for my approval.

PHASE 4 — IMPLEMENTATION STAGES

Stage 1:
Authentication, authorization and project boundaries

Stage 2:
Read-only repository tools

Stage 3:
Sanitized log-reading tools

Stage 4:
Document ingestion and RAG

Stage 5:
Error-investigation LangGraph workflow

Stage 6:
Suggested-code patch generation

Stage 7:
Test generation

Stage 8:
Human approval interrupt

Stage 9:
Draft pull-request creation

Stage 10:
Audit trail

At every stage:

- define acceptance criteria
- let me implement it
- review my code
- require tests
- do not continue until it passes

PHASE 5 — PRODUCTION DEPLOYMENT

Add:

- Docker
- separate API and worker containers
- Redis queues
- health and readiness checks
- secrets management
- service authentication
- model fallback
- caching
- rate limits
- cost limits
- horizontal scaling
- backup
- rollback
- GitHub Actions CI/CD

PHASE 6 — FAILURE EXERCISES

Test:

- LLM unavailable
- GitHub unavailable
- Redis unavailable
- vector database unavailable
- malformed agent state
- malicious repository instruction
- repeated PR request
- approval rejection
- long-running investigation
- cost threshold exceeded

PHASE 7 — FINAL EXAMINATION

Evaluate me through:

- five architecture scenarios
- five debugging scenarios
- three coding exercises
- two security reviews
- one complete system-design task

Score:

- LLM development
- prompt design
- structured output
- RAG
- tool calling
- agents
- LangGraph
- MCP
- multi-agent architecture
- evaluation
- security
- observability
- deployment

Tell me honestly whether I am ready for production AI engineering.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Week 12 deliverable&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Repository: enterprise-ai-operations-assistant
Deliverable: Complete controlled AI workflow with draft PR and human approval
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  THEORY PROMPT FOR Production deployment and capstone
&lt;/h2&gt;

&lt;p&gt;The final week of the roadmap covers Docker, workers, Redis, background jobs, authentication, tracing, fallbacks, caching, CI/CD and scaling. Its suggested capstone is an AI Operations Assistant that can investigate issues, suggest changes, generate tests and open a draft pull request while requiring human approval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt 1: Production architecture&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Act as a principal AI platform architect.

Design a production deployment architecture for:

Laravel application
Python FastAPI AI service
LangGraph workers
PostgreSQL + pgvector
Redis
LLM providers
MCP servers
GitHub integration
centralized logs and traces

Cover:
- Docker containers
- API and worker separation
- queues
- autoscaling
- health checks
- readiness checks
- secrets
- service authentication
- caching
- provider fallback
- cost limits
- rate limits
- backups
- zero-downtime deployment
- rollback
- CI/CD
- disaster recovery

Provide:
1. Component diagram
2. Request sequence
3. Deployment topology
4. Environment variables
5. Failure matrix
6. Security boundaries
7. Deployment checklist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 2: Capstone execution prompt&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Guide me in building an enterprise AI Operations Assistant.

Capabilities:
- read authorized GitHub repositories
- read sanitized Laravel logs
- read project documentation
- search known solutions using RAG
- generate an investigation report
- suggest code changes
- generate tests
- prepare a draft pull request
- request human approval
- maintain an audit trail

Safety restrictions:
- no automatic production modification
- no unrestricted shell
- no arbitrary SQL
- no merging pull requests
- no secret exposure
- least-privilege repository access
- every external action must be auditable

Work in phases:

Phase 1: Requirements and threat model
Phase 2: Architecture and state schema
Phase 3: Read-only tools
Phase 4: RAG
Phase 5: LangGraph workflow
Phase 6: GitHub draft-PR integration
Phase 7: Evaluation
Phase 8: Deployment
Phase 9: Security review

At each phase:
- give acceptance criteria
- let me implement it
- review my code
- require tests
- do not continue until the phase passes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt 3: Final expert assessment&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Evaluate whether I am ready to work professionally as an AI and
Agentic AI developer.

Assess me through a practical examination covering:
- LLM fundamentals
- prompt design
- structured output
- tool calling
- FastAPI architecture
- Laravel integration
- embeddings
- RAG
- LangGraph
- MCP
- agent design
- multi-agent trade-offs
- evaluation
- security
- observability
- deployment

Do not ask definition-only questions.

Give me:
1. Five architecture scenarios
2. Five debugging scenarios
3. Three coding exercises
4. Two security reviews
5. One system-design assignment

After I answer:
- score each competency
- identify evidence of understanding
- identify weak areas
- provide a two-week correction plan
- tell me honestly whether I am production-ready
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Weekly schedule
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/jgrvfcttqovh3se8sem6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/jgrvfcttqovh3se8sem6.png" alt=" " width="735" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompt to use after every coding session
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Review today's implementation as a strict senior AI engineer.

Here is what I attempted:

[DESCRIBE TASK]

Here is my code:

[PASTE CODE OR REPOSITORY FILES]

Evaluate:

- whether I understand the topic
- correctness
- architecture
- security
- validation
- failure handling
- test coverage
- cost
- observability
- production readiness

Do not rewrite the entire implementation.

Return:

1. What I implemented correctly
2. Critical defects
3. Design weaknesses
4. Missing tests
5. One debugging exercise
6. One production improvement
7. Three revision questions
8. My next coding task
9. Score out of 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Prompt to convert each week into revision notes
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Convert this week's work into an experienced developer's revision document.

Include:

1. Problem solved
2. Important mental models
3. Architecture
4. Main implementation
5. Important code patterns
6. Failures encountered
7. Debugging lessons
8. Security risks
9. Performance and cost considerations
10. Testing strategy
11. Laravel integration
12. Five interview questions
13. Five flashcards
14. Topics that need revision next week

Keep it technical and practical.
Do not include beginner explanations.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Daily one-hour learning workflow
&lt;/h2&gt;

&lt;p&gt;Use the following workflow for every topic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Time    Activity
0–10 min  Run the teaching prompt and understand the mental model
10–20 min Ask questions about unclear concepts
20–40 min Implement the smallest working version
40–50 min Add one failure scenario and one test
50–60 min Ask AI to review your code and quiz you

At the end of each session, use:

Summarize today's session into a developer revision note.

Include:
- five essential ideas
- architecture learned
- code completed
- mistakes I made
- unresolved questions
- five flashcards
- three interview questions
- tomorrow's first task

Keep the note under 700 words.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://chatgpt.com/c/6a74b4a3-2b68-83ee-ba31-9342c57cc20a" rel="noopener noreferrer"&gt;folder structure&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How Experienced Developers Can Learn AI and Agentic AI Faster Using ChatGPT, Claude and Real Projects</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Wed, 05 Aug 2026 03:43:31 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/how-experienced-developers-can-learn-ai-and-agentic-ai-faster-using-chatgpt-claude-and-real-3enp</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/how-experienced-developers-can-learn-ai-and-agentic-ai-faster-using-chatgpt-claude-and-real-3enp</guid>
      <description>&lt;p&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Explain the problem:&lt;/p&gt;

&lt;p&gt;AI courses are often designed for beginners.&lt;br&gt;
Long video playlists consume too much time.&lt;br&gt;
Experienced developers already understand APIs, databases, authentication, queues, Docker and architecture.&lt;br&gt;
They should focus on AI-specific concepts and practical implementation.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Video-First Learning Is Slow
&lt;/h2&gt;

&lt;p&gt;Explain the limitations:&lt;/p&gt;

&lt;p&gt;Long introductions&lt;br&gt;
Repeated basic concepts&lt;br&gt;
Passive learning&lt;br&gt;
Outdated framework examples&lt;br&gt;
No code review&lt;br&gt;
No project-specific guidance&lt;br&gt;
Difficult to find one exact answer in a long video&lt;/p&gt;

&lt;p&gt;Clarify that videos are still useful for visual concepts, but they should not be the main learning method.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Recommended Learning Formula
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use this model:

Understand
   ↓
Build
   ↓
Break
   ↓
Debug
   ↓
Improve
   ↓
Test
   ↓
Explain
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Recommended time distribution:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;20% Essential theory
60% Practical implementation
10% Debugging and testing
10% Documentation and revision
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How ChatGPT and Claude Reduce Learning Time
&lt;/h2&gt;

&lt;p&gt;Explain how AI assistants can act as:&lt;/p&gt;

&lt;p&gt;Personal tutor&lt;br&gt;
Pair programmer&lt;br&gt;
Architecture reviewer&lt;br&gt;
Debugging assistant&lt;br&gt;
Interviewer&lt;br&gt;
Test-case generator&lt;br&gt;
Documentation assistant&lt;/p&gt;

&lt;p&gt;But also mention that developers must write and understand the code themselves.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Wrong Way to Use AI
&lt;/h2&gt;

&lt;p&gt;Show poor prompts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Explain LangGraph.
Teach me RAG.
Build an AI agent.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These prompts usually generate generic theory or an oversized project.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Correct Prompt Pattern
&lt;/h2&gt;

&lt;p&gt;Use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I am an experienced Python and Laravel developer.

Teach me [TOPIC] using a build-first approach.

Follow this sequence:

1. Explain only the essential theory required to start.
2. Show the smallest runnable example.
3. Give me a mini-project to implement myself.
4. Do not give the complete solution.
5. Review my implementation when I share it.
6. Create realistic failures for me to debug.
7. Upgrade the working version toward production.
8. Test me using practical and interview questions.

Compare unfamiliar AI concepts with APIs, Laravel services, queues,
events, middleware, state machines and microservices.

Include validation, security, retries, timeouts, logging, testing,
cost control and deployment.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Topic-by-Topic Practical Prompt Strategy
&lt;/h2&gt;

&lt;p&gt;Cover the following core topics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LLM fundamentals&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build an LLM experiment lab for tokens, temperature,
structured output, embeddings and hallucination.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;FastAPI AI services&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build a FastAPI AI microservice and integrate it with Laravel.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Prompt engineering&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Build and test versioned prompts for a real content-generation API.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Structured output and tool calling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build an assistant that returns validated Pydantic output
and calls approved application tools.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Embeddings&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Build semantic search using PostgreSQL and pgvector.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;RAG&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build a knowledge assistant that answers only from retrieved documents
and returns citations.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Agentic AI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build a bounded tool-using agent in plain Python.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;LangGraph&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Convert the plain Python agent into a resumable,
checkpointed LangGraph workflow.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;MCP&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build a secure MCP server exposing limited business tools.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Multi-agent systems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Build and compare a single-call, single-agent and multi-agent workflow.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Evaluation and security&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Create a golden dataset, regression tests, security tests
and observability for the AI applications.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Production deployment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Project&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Deploy Laravel, FastAPI, LangGraph workers, Redis,
PostgreSQL and an LLM provider using Docker.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A Practical One-Hour Learning Session
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0–10 minutes
Understand essential concepts

10–20 minutes
Study architecture and minimal example

20–40 minutes
Implement the feature yourself

40–50 minutes
Debug one failure and add tests

50–60 minutes
Review, explain and answer questions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When to Use Documentation, Videos and AI
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/8c78brbzsvur6wxu646c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/8c78brbzsvur6wxu646c.png" alt=" " width="727" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Recommended order:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ChatGPT/Claude explanation
        ↓
Official quickstart
        ↓
Build the project
        ↓
Watch a short video only when stuck
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Real Projects for Experienced Developers
&lt;/h2&gt;

&lt;p&gt;Use existing business products rather than generic chatbot projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MotoShare&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vehicle description generator
Rental support assistant
Vehicle availability agent
Pricing recommendation system
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HolidayLandmark&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI itinerary generator
Trip creation assistant
Travel-document RAG assistant
Organizer support agent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;DevOpsSchool&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Documentation knowledge assistant
Course recommendation system
Production error investigation agent
Test-case generation workflow
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;MyHospitalNow&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hospital quote explanation assistant
Medical-document information retrieval
Hospital discovery assistant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For healthcare projects, clearly separate informational assistance from medical diagnosis.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Swift and Programming Foundations</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Fri, 31 Jul 2026 03:28:59 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/swift-and-programming-foundations-lgd</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/swift-and-programming-foundations-lgd</guid>
      <description>&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/swift/swift_basic_syntax.htm" rel="noopener noreferrer"&gt;swift_basic_syntax&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1)semicolons after each statement are optional.&lt;br&gt;
2)if you are using multiple statements in the same line then semicolon required or not&lt;br&gt;
3)Space on both sides of an operator should be equal&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/swift/swift_variables.htm" rel="noopener noreferrer"&gt;swift_variables&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4)syntax of multiple variables −&lt;br&gt;
5) what is Type annotation&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/swift/swift_constants.htm" rel="noopener noreferrer"&gt;swift_constants&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6)syntax to declare multiple constant&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/rakeshdevcotocus_468/difference-between-let-and-var-in-swift-324g"&gt;difference-between-let-and-var-in-swift&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7)Difference between let and var&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/swift/swift_data_types.htm" rel="noopener noreferrer"&gt;swift_data_types&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/rakeshdevcotocus_468/difference-between-structclass-and-enum-37m2"&gt;difference-between-structclass-and-enum&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/rakeshdevcotocus_468/data-type-in-swift-47i4"&gt;data-type-in-swift&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8)classify different kind of data type&lt;br&gt;
9) what are the user defined data type, collective data type and derived data type &lt;br&gt;
10.Difference between struct,class and Enum and When to Use Which to create project for developer&lt;br&gt;
11) why init fun is need to declare in class compulsory but for struct not compulsory&lt;br&gt;
12.swift is type safety programming language&lt;br&gt;
13.Type inference is a special feature of Swift language&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/swift/swift_strings.htm" rel="noopener noreferrer"&gt;swift_strings&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;different way to create string 2 way&lt;br&gt;
14.difference between mutable and immutable string&lt;br&gt;
15.how to modify or concatenate two string&lt;br&gt;
16.how to insert into string literal or meaning of string interpolation&lt;br&gt;
17syntax to determine string length&lt;br&gt;
18 string comparision operator syntax&lt;br&gt;
19.how to get index of each char from given string using enumerated&lt;br&gt;
20.difference between enumerated and foreach function&lt;br&gt;
21.how to determine given string starts or ends with specified string&lt;br&gt;
22.how to remove whole char of string,first char of string or last char of string, or range of specified char&lt;br&gt;
23.how to reverse the char&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;purpose of type alias&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/swift/swift_tuples.htm" rel="noopener noreferrer"&gt;swift_tuples&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tuples can store multiple values of the same or different data types, separated by commas.&lt;br&gt;
how to access and modify tuple value&lt;br&gt;
how to Assigning tuple to a set of constants&lt;br&gt;
 syntax for assigning names to a tuples elements&lt;br&gt;
what is named tuple and nested tuple&lt;br&gt;
how to add or modify elements of named tuple&lt;br&gt;
&lt;a href="https://www.tutorialspoint.com/swift/swift_arrays.htm" rel="noopener noreferrer"&gt;swift_arrays&lt;/a&gt;&lt;br&gt;
how to adding new element in existing array&lt;br&gt;
how to get index of each elements of array &lt;br&gt;
how to adding two array&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/swift/swift_sets.htm" rel="noopener noreferrer"&gt;swift_sets&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.tutorialspoint.com/swift/swift_dictionaries.htm" rel="noopener noreferrer"&gt;swift_dictionaries&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;how to accessing and modifying dictionary&lt;br&gt;
how to removing key value pair&lt;br&gt;
how to removing all at once&lt;br&gt;
how to apply filter in existing dictionary&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How China Is Teaching Artificial Intelligence in Schools: Year-by-Year AI Curriculum for Students</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Thu, 30 Jul 2026 15:03:09 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/how-china-is-teaching-artificial-intelligence-in-schools-year-by-year-ai-curriculum-for-students-2fp6</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/how-china-is-teaching-artificial-intelligence-in-schools-year-by-year-ai-curriculum-for-students-2fp6</guid>
      <description>&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/gcbkg778t50nvegevgam.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/gcbkg778t50nvegevgam.png" alt=" " width="910" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Grade 5 (Age 10)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Subject&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI Applications &amp;amp; Smart Technologies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topics&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Introduction to Artificial Intelligence&lt;br&gt;
History of AI&lt;br&gt;
AI in Everyday Life&lt;br&gt;
Smart Devices &amp;amp; IoT&lt;br&gt;
Machine Learning Basics (Concept Only)&lt;br&gt;
AI vs Human Intelligence&lt;br&gt;
AI vs Traditional Programming&lt;br&gt;
Data Collection&lt;br&gt;
Data Quality &amp;amp; Clean Data&lt;br&gt;
Voice Recognition&lt;br&gt;
Speech-to-Text&lt;br&gt;
Face Recognition&lt;br&gt;
Image Recognition&lt;br&gt;
Object Detection&lt;br&gt;
Chatbots&lt;br&gt;
Recommendation Systems (YouTube, Netflix)&lt;br&gt;
Smart Homes&lt;br&gt;
Smart Cities&lt;br&gt;
Autonomous Vehicles (Introduction)&lt;br&gt;
AI Ethics &amp;amp; Responsible AI&lt;br&gt;
Digital Safety &amp;amp; Privacy&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical Activities&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use Google Lens to identify objects&lt;br&gt;
Interact with ChatGPT or a child-friendly AI chatbot&lt;br&gt;
Try speech-to-text tools&lt;br&gt;
Explore image recognition apps&lt;br&gt;
Test translation apps&lt;br&gt;
Compare AI recommendations on YouTube&lt;br&gt;
Create simple AI stories using generative AI&lt;br&gt;
Identify AI used in daily life&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mini Projects&lt;/strong&gt;&lt;br&gt;
Build a simple chatbot using Scratch or block-based AI tools&lt;br&gt;
Smart Home Model&lt;br&gt;
AI Daily Life Presentation&lt;br&gt;
Voice Assistant Demo&lt;br&gt;
Image Classification Activity&lt;br&gt;
AI vs Human Comparison Chart&lt;br&gt;
Smart City Poster&lt;br&gt;
AI Ethics Poster&lt;/p&gt;

&lt;h2&gt;
  
  
  Grade 6 (Age 11)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Subject&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Beginner Programming with AI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topics&lt;/strong&gt;&lt;br&gt;
Python Programming Basics&lt;br&gt;
Variables &amp;amp; Data Types&lt;br&gt;
Input &amp;amp; Output&lt;br&gt;
Conditional Statements&lt;br&gt;
Loops&lt;br&gt;
Functions (Introduction)&lt;br&gt;
Lists &amp;amp; Dictionaries&lt;br&gt;
Computational Thinking&lt;br&gt;
Algorithms&lt;br&gt;
Flowcharts&lt;br&gt;
Debugging Basics&lt;br&gt;
Scratch AI Extensions&lt;br&gt;
Introduction to Machine Learning&lt;br&gt;
Training Data vs Testing Data&lt;br&gt;
Image Classification Basics&lt;br&gt;
Text Classification Basics&lt;br&gt;
Voice Recognition&lt;br&gt;
OCR (Optical Character Recognition)&lt;br&gt;
AI APIs (Introduction)&lt;br&gt;
Prompt Engineering Basics&lt;br&gt;
Responsible AI &amp;amp; Ethics&lt;br&gt;
Cyber Safety&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical Activities&lt;/strong&gt;&lt;br&gt;
Install and run Python&lt;br&gt;
Write simple Python programs&lt;br&gt;
Build calculators and guessing games&lt;br&gt;
Create Scratch AI projects&lt;br&gt;
Use Teachable Machine to train an image model&lt;br&gt;
Convert speech to text&lt;br&gt;
Generate images using AI&lt;br&gt;
Build a simple Q&amp;amp;A chatbot&lt;br&gt;
Connect to a basic AI API&lt;br&gt;
Experiment with prompts&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mini Projects&lt;/strong&gt;&lt;br&gt;
Python Calculator&lt;br&gt;
Number Guessing Game&lt;br&gt;
AI Chatbot&lt;br&gt;
Image Classifier using Teachable Machine&lt;br&gt;
Voice Assistant&lt;br&gt;
Animal Recognition App&lt;br&gt;
Smart Attendance System (Concept)&lt;br&gt;
OCR Text Reader&lt;br&gt;
AI Story Generator&lt;br&gt;
Simple Recommendation System&lt;/p&gt;

&lt;h2&gt;
  
  
  Grade 7 (Age 12)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Subject&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI Foundations&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topics&lt;/strong&gt;&lt;br&gt;
History of Artificial Intelligence&lt;br&gt;
AI vs Traditional Programming&lt;br&gt;
Introduction to Machine Learning&lt;br&gt;
Types of AI (Narrow AI &amp;amp; General AI)&lt;br&gt;
Data Collection &amp;amp; Data Quality&lt;br&gt;
Supervised vs Unsupervised Learning (Concept)&lt;br&gt;
Voice Recognition&lt;br&gt;
Face Recognition&lt;br&gt;
Image Classification&lt;br&gt;
Speech Recognition&lt;br&gt;
Natural Language Processing (Introduction)&lt;br&gt;
AI in Healthcare, Education &amp;amp; Transportation&lt;br&gt;
AI Ethics, Privacy &amp;amp; Responsible AI&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical Activities&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Explore ChatGPT and AI assistants&lt;br&gt;
Train a simple image model using Teachable Machine&lt;br&gt;
Build a basic chatbot with block-based tools&lt;br&gt;
Use voice recognition applications&lt;br&gt;
Test image classification models&lt;br&gt;
Identify AI applications used in daily life&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mini Projects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build a Simple Chatbot&lt;br&gt;
Image Classifier&lt;br&gt;
Voice Assistant&lt;br&gt;
AI Object Recognition Demo&lt;br&gt;
AI in Daily Life Presentation&lt;br&gt;
Smart School Assistant (Concept)&lt;/p&gt;

&lt;h2&gt;
  
  
  Grade 8 (Age 13)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Subject&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Programming, Data Science &amp;amp; Computer Vision&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topics&lt;/strong&gt;&lt;br&gt;
Python Programming&lt;br&gt;
Data Types &amp;amp; Functions&lt;br&gt;
NumPy&lt;br&gt;
Pandas&lt;br&gt;
Data Visualization (Matplotlib)&lt;br&gt;
Statistics for AI&lt;br&gt;
Data Cleaning&lt;br&gt;
Machine Learning Basics&lt;br&gt;
Computer Vision&lt;br&gt;
Image Processing&lt;br&gt;
NLP Fundamentals&lt;br&gt;
OCR (Optical Character Recognition)&lt;br&gt;
Recommendation Systems&lt;br&gt;
AI APIs (Introduction)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical Activities&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Analyze datasets using Python&lt;br&gt;
Create charts and graphs&lt;br&gt;
Build image recognition models&lt;br&gt;
Perform OCR on documents&lt;br&gt;
Experiment with sentiment analysis&lt;br&gt;
Build simple recommendation systems&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mini Projects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sentiment Analysis Tool&lt;br&gt;
OCR Text Reader&lt;br&gt;
Object Detection App&lt;br&gt;
Movie Recommendation System&lt;br&gt;
AI Image Recognition Project&lt;br&gt;
Student Performance Dashboard&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grade 9 (Age 14)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Subject&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Machine Learning &amp;amp; Deep Learning Fundamentals&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topics&lt;/strong&gt;&lt;br&gt;
Neural Networks&lt;br&gt;
Deep Learning&lt;br&gt;
CNN (Convolutional Neural Networks)&lt;br&gt;
Reinforcement Learning&lt;br&gt;
Model Training &amp;amp; Testing&lt;br&gt;
Model Evaluation&lt;br&gt;
AI Bias &amp;amp; Fairness&lt;br&gt;
Privacy &amp;amp; Data Security&lt;br&gt;
Cybersecurity Basics&lt;br&gt;
Responsible AI&lt;br&gt;
Explainable AI (Introduction)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical Activities&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Train a basic neural network&lt;br&gt;
Detect faces using OpenCV&lt;br&gt;
Build gesture recognition demos&lt;br&gt;
Experiment with reinforcement learning games&lt;br&gt;
Evaluate AI model accuracy&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mini Projects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Face Detection System&lt;br&gt;
Gesture Recognition&lt;br&gt;
AI Game Bot&lt;br&gt;
Handwritten Digit Recognition&lt;br&gt;
AI Security Awareness Project&lt;br&gt;
Smart Attendance System&lt;/p&gt;

&lt;h2&gt;
  
  
  Grade 10 (Age 15)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Subject&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advanced Programming &amp;amp; Generative AI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topics&lt;/strong&gt;&lt;br&gt;
Advanced Python&lt;br&gt;
Data Structures &amp;amp; Algorithms&lt;br&gt;
SQL &amp;amp; Databases&lt;br&gt;
REST APIs&lt;br&gt;
Git &amp;amp; GitHub&lt;br&gt;
Linux Fundamentals&lt;br&gt;
LLM (Large Language Models)&lt;br&gt;
Prompt Engineering&lt;br&gt;
Embeddings&lt;br&gt;
AI APIs&lt;br&gt;
AI Productivity Tools&lt;br&gt;
AI Application Development&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical Activities&lt;/strong&gt;&lt;br&gt;
Build REST APIs&lt;br&gt;
Connect applications with AI APIs&lt;br&gt;
Design effective prompts&lt;br&gt;
Create semantic search demos&lt;br&gt;
Use Git for collaborative development&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mini Projects&lt;/strong&gt;&lt;br&gt;
AI Chatbot&lt;br&gt;
AI Website&lt;br&gt;
Smart Search Engine&lt;br&gt;
AI Email Assistant&lt;br&gt;
AI Resume Generator&lt;br&gt;
AI FAQ System&lt;/p&gt;

&lt;h2&gt;
  
  
  Grade 11 (Age 16)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Subject&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Generative AI &amp;amp; Enterprise AI Development&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topics&lt;/strong&gt;&lt;br&gt;
Transformer Architecture&lt;br&gt;
Hugging Face Models&lt;br&gt;
Open Source LLMs&lt;br&gt;
LangChain&lt;br&gt;
Vector Databases&lt;br&gt;
Embeddings&lt;br&gt;
Retrieval-Augmented Generation (RAG)&lt;br&gt;
Fine-tuning Concepts&lt;br&gt;
AI Evaluation&lt;br&gt;
AI Security&lt;br&gt;
AI Deployment Basics&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical Activities&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build RAG applications&lt;br&gt;
Store embeddings in vector databases&lt;br&gt;
Use Hugging Face models&lt;br&gt;
Evaluate AI responses&lt;br&gt;
Connect multiple AI tools&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mini Projects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PDF Question Answering System&lt;br&gt;
AI Tutor&lt;br&gt;
AI Healthcare Assistant&lt;br&gt;
AI Document Search&lt;br&gt;
Customer Support Chatbot&lt;br&gt;
Enterprise Knowledge Assistant&lt;/p&gt;

&lt;h2&gt;
  
  
  Grade 12 (Age 17)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Subject&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agentic AI &amp;amp; Intelligent Systems&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Topics&lt;/strong&gt;&lt;br&gt;
AI Agents&lt;br&gt;
Multi-Agent Systems&lt;br&gt;
Model Context Protocol (MCP)&lt;br&gt;
Tool Calling&lt;br&gt;
Workflow Automation&lt;br&gt;
Robotics&lt;br&gt;
Internet of Things (IoT)&lt;br&gt;
Edge AI&lt;br&gt;
AI Entrepreneurship&lt;br&gt;
AI Product Development&lt;br&gt;
AI Law &amp;amp; Governance&lt;br&gt;
Responsible AI &amp;amp; Ethics&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical Activities&lt;/strong&gt;&lt;br&gt;
Build autonomous AI agents&lt;br&gt;
Connect AI with external tools using MCP&lt;br&gt;
Design multi-agent workflows&lt;br&gt;
Integrate AI with IoT devices&lt;br&gt;
Develop production-ready AI applications&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Capstone Projects&lt;/strong&gt;&lt;br&gt;
Smart City AI Platform&lt;br&gt;
Healthcare AI Assistant&lt;br&gt;
Agricultural AI Monitoring System&lt;br&gt;
Educational AI Tutor&lt;br&gt;
Finance AI Advisor&lt;br&gt;
Autonomous Multi-Agent System&lt;/p&gt;

&lt;h2&gt;
  
  
  University (4 Years)
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Year 1
&lt;/h2&gt;

&lt;p&gt;Computer Science Foundation&lt;/p&gt;

&lt;p&gt;Python&lt;br&gt;
C++&lt;br&gt;
Java&lt;br&gt;
SQL&lt;br&gt;
Linux&lt;br&gt;
Git&lt;br&gt;
Networking&lt;br&gt;
OOP&lt;br&gt;
Mathematics&lt;br&gt;
Statistics&lt;/p&gt;

&lt;h2&gt;
  
  
  Year 2
&lt;/h2&gt;

&lt;p&gt;Artificial Intelligence Foundation&lt;/p&gt;

&lt;p&gt;Machine Learning&lt;br&gt;
Deep Learning&lt;br&gt;
Computer Vision&lt;br&gt;
NLP&lt;br&gt;
Reinforcement Learning&lt;br&gt;
TensorFlow&lt;br&gt;
PyTorch&lt;/p&gt;

&lt;h2&gt;
  
  
  Year 3
&lt;/h2&gt;

&lt;p&gt;Generative AI&lt;/p&gt;

&lt;p&gt;LLM&lt;br&gt;
RAG&lt;br&gt;
Agents&lt;br&gt;
MCP&lt;br&gt;
AI Security&lt;br&gt;
Cloud AI&lt;br&gt;
MLOps&lt;br&gt;
Docker&lt;br&gt;
Kubernetes&lt;/p&gt;

&lt;p&gt;Projects&lt;/p&gt;

&lt;p&gt;AI Copilot&lt;br&gt;
Enterprise Chatbot&lt;br&gt;
Autonomous Agent&lt;/p&gt;

&lt;h2&gt;
  
  
  Year 4
&lt;/h2&gt;

&lt;p&gt;Industry + Research&lt;/p&gt;

&lt;p&gt;Students complete&lt;/p&gt;

&lt;p&gt;Internship&lt;br&gt;
AI Startup&lt;br&gt;
Research Paper&lt;br&gt;
Open Source Contributions&lt;br&gt;
Production Deployment&lt;br&gt;
AI Product Development&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Become an AI and Agentic AI Developer in 12 Weeks: A Practical Roadmap for Experienced Developers</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Thu, 30 Jul 2026 11:35:31 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/how-to-become-an-ai-and-agentic-ai-developer-in-12-weeks-a-practical-roadmap-for-experienced-4m21</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/how-to-become-an-ai-and-agentic-ai-developer-in-12-weeks-a-practical-roadmap-for-experienced-4m21</guid>
      <description>&lt;h2&gt;
  
  
  AI Engineer + Agentic AI Developer
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Weeks 1–2: Python and AI foundations&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Weeks 3–4: LLM application development&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Weeks 5–6: Embeddings and RAG&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Weeks 7–8: Agentic AI fundamentals&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Week 9: MCP&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Week 10: Multi-agent systems&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Week 11: Evaluation, safety and observability&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Week 12: Production deployment&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Here's the strategy I would follow if I were in your position&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The YouTube link you shared is currently titled “China’s New Education Policy” and discusses AI education in schools; it does not appear to be a developer roadmap for becoming an AI expert.&lt;/p&gt;

&lt;p&gt;For a developer with 6 years of coding experience, you can become a strong AI application and Agentic AI engineer in 12 weeks. Becoming an AI researcher or model-training expert will take considerably longer.&lt;/p&gt;

&lt;p&gt;Target role&lt;/p&gt;

&lt;p&gt;Focus on becoming an:&lt;/p&gt;
&lt;h3&gt;
  
  
  AI Engineer + Agentic AI Developer
&lt;/h3&gt;

&lt;p&gt;You should be able to build:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LLM-powered applications
RAG systems using company documents
Tool-calling agents
MCP servers
Multi-step agent workflows
Production-ready AI APIs
Evaluation, monitoring and security systems
Recommended technology stack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Python
FastAPI
OpenAI or another major LLM API
PostgreSQL + pgvector
Redis
Docker
LangGraph
MCP
Hugging Face
GitHub Actions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Continue using Laravel for your main applications, but create a separate Python AI microservice. Laravel can communicate with it through REST APIs or queues.&lt;/p&gt;

&lt;h3&gt;
  
  
  12-week AI and Agentic AI roadmap
&lt;/h3&gt;

&lt;h2&gt;
  
  
  Weeks 1–2: Python and AI foundations
&lt;/h2&gt;

&lt;p&gt;Do not spend months learning mathematics first.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Learn&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;Python syntax, classes and type hints&lt;br&gt;
Virtual environments and package management&lt;br&gt;
NumPy and Pandas basics&lt;br&gt;
FastAPI&lt;br&gt;
Async programming&lt;br&gt;
REST APIs&lt;br&gt;
JSON Schema and Pydantic&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understand these AI concepts:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Machine learning versus deep learning&lt;br&gt;
Neural networks&lt;br&gt;
Transformers&lt;br&gt;
Tokens&lt;br&gt;
Embeddings&lt;br&gt;
Context windows&lt;br&gt;
Temperature&lt;br&gt;
Inference&lt;br&gt;
Training versus fine-tuning&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build a FastAPI service:&lt;/p&gt;

&lt;p&gt;POST /summarize&lt;br&gt;
POST /classify&lt;br&gt;
POST /extract&lt;br&gt;
POST /chat&lt;/p&gt;

&lt;p&gt;Connect it to one of your Laravel applications.&lt;/p&gt;
&lt;h2&gt;
  
  
  Weeks 3–4: LLM application development
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Learn&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;System, user and assistant messages&lt;br&gt;
Prompt engineering&lt;br&gt;
Structured JSON output&lt;br&gt;
Function and tool calling&lt;br&gt;
Streaming responses&lt;br&gt;
Conversation history&lt;br&gt;
Token and cost management&lt;br&gt;
Retry and fallback handling&lt;/p&gt;

&lt;p&gt;Do not only practise prompts inside ChatGPT. Write actual API-based applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build an AI Trip Creation Assistant for HolidayLandmark:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User provides:
- Destination
- Number of days
- Budget
- Traveller type

AI generates:
- Title
- Summary
- Daily itinerary
- Highlights
- Pricing suggestion
- Required JSON data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Validate every response using Pydantic before storing it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Weeks 5–6: Embeddings and RAG
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Learn&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Document chunking&lt;br&gt;
Embedding models&lt;br&gt;
Vector databases&lt;br&gt;
Semantic search&lt;br&gt;
Metadata filtering&lt;br&gt;
Hybrid search&lt;br&gt;
Reranking&lt;br&gt;
Citations&lt;br&gt;
RAG evaluation&lt;br&gt;
&lt;strong&gt;Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build a DevOpsSchool Knowledge Assistant that answers questions using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Documentation
README files
Course information
Existing test cases
Troubleshooting guides

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Store embeddings in PostgreSQL using pgvector.&lt;/p&gt;

&lt;p&gt;The system should always return:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
{
  "answer": "...",
  "sources": [],
  "confidence": 0.0
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Weeks 7–8: Agentic AI fundamentals
&lt;/h2&gt;

&lt;p&gt;An agent is not simply a chatbot. It receives a goal, chooses tools, performs actions, observes results and continues until it finishes or needs human approval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Agent loop&lt;br&gt;
Tools and actions&lt;br&gt;
Planning&lt;br&gt;
State management&lt;br&gt;
Short-term and long-term memory&lt;br&gt;
Deterministic workflows versus autonomous agents&lt;br&gt;
Human-in-the-loop approval&lt;br&gt;
Error recovery&lt;br&gt;
Idempotency&lt;/p&gt;

&lt;p&gt;LangGraph is designed for long-running, stateful agent workflows and supports concepts such as shared state, nodes, persistence and memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build a Production Error Investigation Agent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read Laravel logs&lt;/li&gt;
&lt;li&gt;Identify the likely error&lt;/li&gt;
&lt;li&gt;Search the relevant repository&lt;/li&gt;
&lt;li&gt;Check migrations and configuration&lt;/li&gt;
&lt;li&gt;Suggest a fix&lt;/li&gt;
&lt;li&gt;Generate tests&lt;/li&gt;
&lt;li&gt;Ask for approval&lt;/li&gt;
&lt;li&gt;Never modify production automatically&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Start with a fixed workflow. Add autonomous decision-making only where it is genuinely necessary.&lt;/p&gt;
&lt;h2&gt;
  
  
  Week 9: MCP
&lt;/h2&gt;

&lt;p&gt;MCP is an open standard that lets AI applications connect to external tools and data sources. MCP servers can expose resources, tools and reusable prompts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;MCP host, client and server&lt;br&gt;
Resources&lt;br&gt;
Tools&lt;br&gt;
Prompts&lt;br&gt;
Tool schemas&lt;br&gt;
Authentication&lt;br&gt;
Permission boundaries&lt;br&gt;
Local and remote MCP servers&lt;br&gt;
&lt;strong&gt;Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Create a MotoShare MCP server exposing safe tools:&lt;/p&gt;

&lt;p&gt;get_vehicle&lt;br&gt;
search_bookings&lt;br&gt;
get_payment_status&lt;br&gt;
read_application_logs&lt;br&gt;
create_support_ticket&lt;/p&gt;

&lt;p&gt;Do not expose dangerous tools such as unrestricted SQL execution or arbitrary shell commands.&lt;/p&gt;
&lt;h2&gt;
  
  
  Week 10: Multi-agent systems
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Learn&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Supervisor and worker pattern&lt;br&gt;
Router pattern&lt;br&gt;
Planner and executor&lt;br&gt;
Reviewer or critic pattern&lt;br&gt;
Parallel workers&lt;br&gt;
Agent handoffs&lt;br&gt;
Shared state&lt;br&gt;
When not to use multiple agents&lt;br&gt;
&lt;strong&gt;Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build a Software QA Agent Team:&lt;/p&gt;

&lt;p&gt;Requirement Agent&lt;br&gt;
    ↓&lt;br&gt;
Test Planner&lt;br&gt;
    ↓&lt;br&gt;
UI Test Generator&lt;br&gt;
    ↓&lt;br&gt;
API Test Generator&lt;br&gt;
    ↓&lt;br&gt;
Security Reviewer&lt;br&gt;
    ↓&lt;br&gt;
Final Test Report&lt;/p&gt;

&lt;p&gt;Each agent should have a clearly limited responsibility. Avoid creating multiple agents merely because it looks advanced.&lt;/p&gt;
&lt;h2&gt;
  
  
  Week 11: Evaluation, safety and observability
&lt;/h2&gt;

&lt;p&gt;This is what separates a demo developer from a professional AI engineer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learn&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Golden test datasets&lt;br&gt;
Prompt regression testing&lt;br&gt;
RAG evaluation&lt;br&gt;
Tool-call accuracy&lt;br&gt;
Hallucination checks&lt;br&gt;
Latency and cost tracking&lt;br&gt;
Prompt injection protection&lt;br&gt;
Output validation&lt;br&gt;
Rate limiting&lt;br&gt;
Audit logging&lt;br&gt;
Human approval for destructive actions&lt;/p&gt;

&lt;p&gt;Create at least 50 test cases covering:&lt;/p&gt;

&lt;p&gt;Normal request&lt;br&gt;
Missing information&lt;br&gt;
Incorrect information&lt;br&gt;
Prompt injection&lt;br&gt;
Tool failure&lt;br&gt;
Timeout&lt;br&gt;
Malformed output&lt;br&gt;
Repeated execution&lt;br&gt;
Unauthorized action&lt;br&gt;
Very large input&lt;/p&gt;
&lt;h2&gt;
  
  
  Week 12: Production deployment
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Learn&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Docker
Queue workers
Redis
Background jobs
Webhooks
Secrets management
API authentication
Logging and tracing
Model fallbacks
Caching
Cost limits
CI/CD
Horizontal scaling
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Final project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build one complete enterprise AI system:&lt;/p&gt;

&lt;p&gt;AI Operations Assistant&lt;/p&gt;

&lt;p&gt;It should:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read GitHub repositories
Read Laravel logs
Read project documentation
Search known solutions
Create an investigation report
Suggest code changes
Generate test cases
Open a draft pull request
Require human approval
Maintain an audit trail
Daily routine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Study for 2–3 hours per day, six days per week:&lt;/p&gt;

&lt;p&gt;30 minutes  – Theory&lt;br&gt;
60 minutes  – Coding&lt;br&gt;
30 minutes  – Project work&lt;br&gt;
30 minutes  – Testing and documentation&lt;/p&gt;

&lt;p&gt;Use this rule:&lt;/p&gt;

&lt;p&gt;20% learning&lt;br&gt;
70% building&lt;br&gt;
10% publishing and explaining&lt;/p&gt;

&lt;p&gt;Every week, publish:&lt;/p&gt;

&lt;p&gt;One GitHub project&lt;br&gt;
One README containing architecture and decisions&lt;br&gt;
One demonstration video&lt;br&gt;
One short technical article&lt;br&gt;
Best learning order&lt;br&gt;
Python and FastAPI&lt;br&gt;
LLM APIs and structured output&lt;br&gt;
Embeddings and RAG&lt;br&gt;
Tool calling&lt;br&gt;
Agent workflows&lt;br&gt;
LangGraph&lt;br&gt;
MCP&lt;br&gt;
Evaluation and security&lt;br&gt;
Deployment&lt;br&gt;
Multi-agent systems&lt;/p&gt;

&lt;p&gt;The free Hugging Face Agents Course covers agent theory, design and frameworks including smolagents, LlamaIndex and LangGraph. Its LLM course covers transformers, tokenizers, datasets and related foundations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important advice&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Do not spend your first months on:&lt;/p&gt;

&lt;p&gt;Training an LLM from scratch&lt;br&gt;
Advanced mathematics without building anything&lt;br&gt;
Learning five agent frameworks&lt;br&gt;
Creating autonomous agents for every problem&lt;br&gt;
Watching tutorials without completing projects&lt;br&gt;
Depending entirely on generated code&lt;/p&gt;

&lt;p&gt;Choose one stack, build four serious projects and learn how to evaluate them.&lt;/p&gt;

&lt;p&gt;After 12 weeks, your realistic position should be:&lt;/p&gt;

&lt;p&gt;Production-oriented AI and Agentic AI Developer, capable of adding reliable AI features and agents to Laravel, Python and enterprise applications.&lt;/p&gt;

&lt;p&gt;You will not yet be an AI research scientist, but you can be employable and productive in applied AI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chatgpt.com/c/6a6b3475-f1d0-83ee-873c-dacb3a9e0c4b" rel="noopener noreferrer"&gt;agentic ai developer&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Here's the strategy I would follow if I were in your position
&lt;/h3&gt;

&lt;p&gt;The roadmap you shared is good because it focuses on AI Engineering + Agentic AI, not AI research. That's exactly the direction experienced developers should take. Similar roadmaps from AI engineering communities also emphasize building production systems rather than spending months on theory.&lt;/p&gt;

&lt;p&gt;Here's the strategy I would follow if I were in your position&lt;/p&gt;
&lt;h2&gt;
  
  
  Documentation (20%)
&lt;/h2&gt;

&lt;p&gt;Only for understanding APIs and frameworks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OpenAI API docs
Anthropic docs
LangGraph docs
MCP documentation
FastAPI docs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Documentation should answer:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;How does this work?
What APIs are available?
Best practices?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Do not read documentation cover to cover.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  ChatGPT / Claude (40%)
&lt;/h2&gt;

&lt;p&gt;This should become your personal teacher.&lt;/p&gt;

&lt;p&gt;Instead of searching YouTube:&lt;/p&gt;

&lt;p&gt;❌ "LangGraph tutorial"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Ask:

Explain LangGraph assuming I'm a Laravel developer.

Then

Build a simple project.

Then

Why do we use StateGraph?

Then

Show production architecture.

Then

Give interview questions.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This reduces 10 hours of video into 1 hour.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Official Tutorial (20%)
&lt;/h2&gt;

&lt;p&gt;Use only official quickstarts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OpenAI Quickstart
LangGraph Quickstart
MCP Quickstart
LlamaIndex Quickstart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Never watch a 5-hour playlist first.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  YouTube (20%)
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use videos only when:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a concept is confusing
architecture needs visualization
you want to see implementation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Watch only:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fireship
freeCodeCamp
IBM Technology
Microsoft Developer
Anthropic/OpenAI official videos
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Avoid "100 videos on LangChain."&lt;/p&gt;

&lt;h2&gt;
  
  
  The learning cycle
&lt;/h2&gt;

&lt;p&gt;For every topic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Step 1
Ask ChatGPT

↓

Step 2
Read official documentation (20 minutes)

↓

Step 3
Build it

↓

Step 4
If stuck
Watch a 15-minute YouTube video

↓

Step 5
Build a better version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is probably 5× faster than video-first learning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't study. Build.
&lt;/h2&gt;

&lt;p&gt;This is where most developers fail.&lt;/p&gt;

&lt;p&gt;Instead of&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Week 1

Prompt Engineering

Do

Build

AI Email Generator

Instead of

Week 2

RAG

Build

Company Knowledge Chatbot

Instead of

Week 3

MCP

Build

AI that controls your filesystem

Instead of

Week 4

Agents

Build


AI Travel Planner
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every topic should produce a GitHub repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  Since you're already a Laravel developer
&lt;/h2&gt;

&lt;p&gt;Your roadmap should be different from beginners.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Skip&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Python basics
Variables
Loops
Functions
Git
HTTP
REST API
SQL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You already know these concepts.&lt;/p&gt;

&lt;p&gt;Only learn Python syntax differences as needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Spend time here instead
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;LLMs
Prompt Engineering
Structured Outputs
Function Calling
Embeddings
Vector Databases
RAG
Memory
AI Agents
LangGraph
MCP
Multi-agent systems
Evaluation
AI Security
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Production deployment
&lt;/h2&gt;

&lt;p&gt;These are the skills that differentiate an AI engineer from a traditional backend developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  My weekly schedule (15 hours/week)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Monday (2 hrs)
Learn one concept with ChatGPT
Read official docs
Tuesday (2 hrs)
Build a mini project
Wednesday (2 hrs)
Improve the project
Thursday (2 hrs)
Read architecture
Learn best practices
Friday (2 hrs)
Add new features
Saturday (4 hrs)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Build one complete project
&lt;/h2&gt;

&lt;p&gt;Sunday (1 hr)&lt;/p&gt;

&lt;p&gt;Write notes&lt;/p&gt;

&lt;h2&gt;
  
  
  The biggest shortcut
&lt;/h2&gt;

&lt;p&gt;Don't create demo projects.&lt;/p&gt;

&lt;p&gt;Create AI features for your own products.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MotoShare&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI vehicle description generator
AI pricing recommendation
AI support chatbot
AI fraud detection
AI booking assistant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;MyHospitalNow&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI symptom assistant
AI treatment comparison
AI hospital recommendation
AI appointment scheduler
AI medical FAQ
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;HolidayLandmark&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI trip planner
AI itinerary generator
AI travel assistant
AI multilingual guide
AI review summarizer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These projects will immediately improve products you're already building and create a portfolio that demonstrates production experience.&lt;/p&gt;

&lt;p&gt;If your goal is to become an AI/Agentic AI developer in 12 weeks&lt;/p&gt;

&lt;p&gt;I'd simplify the roadmap into four phases:&lt;/p&gt;

&lt;h2&gt;
  
  
  If your goal is to become an AI/Agentic AI developer in 12 weeks
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/8qr8qg60c9zwhhd2l3rb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/8qr8qg60c9zwhhd2l3rb.png" alt=" " width="847" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chatgpt.com/c/6a715991-497c-83ee-97c3-029fa3257cff" rel="noopener noreferrer"&gt;Here's the strategy I would follow if I were in your position&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://chatgpt.com/c/6a715991-497c-83ee-97c3-029fa3257cff" rel="noopener noreferrer"&gt;Planning to become ai agentic developer&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Difference between struct,class and enum</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 03:37:13 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/difference-between-structclass-and-enum-37m2</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/difference-between-structclass-and-enum-37m2</guid>
      <description>&lt;p&gt;&lt;strong&gt;Difference between class ,struct and enum&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;When to Use Which?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;TABULAR COMPARISION&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;A struct&lt;/code&gt; is used to group related data and methods.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;A class&lt;/code&gt; is used to create objects that can share the same data through references.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;An enum&lt;/code&gt; is used to represent a fixed set of possible values or states.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example
struct Student {
    var name: String
}

class Employee {
    var name: String

    init(name: String) {
        self.name = name
    }
}

enum PaymentStatus {
    case pending
    case completed
    case failed
}

let student = Student(name: "Ashwani")
let employee = Employee(name: "Ravi")
let status = PaymentStatus.completed

print(student.name)
print(employee.name)
print(status)

Output:

Ashwani
Ravi
completed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Value Type and Reference Type&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;A struct&lt;/code&gt; is a value type.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;A class&lt;/code&gt; is a reference type.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;An enum&lt;/code&gt; is also a value type.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Student {
    var name: String
}

class Employee {
    var name: String

    init(name: String) {
        self.name = name
    }
}

enum Direction {
    case north
    case south
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Copy Behavior&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When a struct or enum is assigned to another variable, a separate copy is created.&lt;/p&gt;

&lt;p&gt;When a class object is assigned to another variable, both variables refer to the same object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Struct example
struct Student {
    var name: String
}

var student1 = Student(name: "Ashwani")
var student2 = student1

student2.name = "Ravi"

print(student1.name)
print(student2.name)

Output:

Ashwani
Ravi
Class example
class Employee {
    var name: String

    init(name: String) {
        self.name = name
    }
}

let employee1 = Employee(name: "Ashwani")
let employee2 = employee1

employee2.name = "Ravi"

print(employee1.name)
print(employee2.name)

Output:

Ravi
Ravi
Enum example
enum Direction {
    case north
    case south
}

var direction1 = Direction.north
var direction2 = direction1

direction2 = .south

print(direction1)
print(direction2)

Output:

north
south
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Inheritance&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Only a class supports inheritance.&lt;/p&gt;

&lt;p&gt;A struct and an enum cannot inherit from another struct or enum.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example
class Person {
    func introduce() {
        print("I am a person")
    }
}

class Developer: Person {
    func code() {
        print("I write Swift code")
    }
}

let developer = Developer()

developer.introduce()
developer.code()

Output:

I am a person
I write Swift code
5. Initialization
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;A struct automatically gets a memberwise initializer.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;A class usually requires&lt;/code&gt; an explicit initializer when properties do not have default values.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;An enum is created using one of its predefined cases.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Struct example
struct Student {
    var name: String
    var age: Int
}

let student = Student(name: "Ashwani", age: 30)

print(student.name)
print(student.age)

Output:

Ashwani
30
Class example
class Employee {
    var name: String
    var salary: Double

    init(name: String, salary: Double) {
        self.name = name
        self.salary = salary
    }
}

let employee = Employee(name: "Ravi", salary: 50000)

print(employee.name)
print(employee.salary)

Output:

Ravi
50000.0
Enum example
enum UserRole {
    case student
    case trainer
    case admin
}

let role = UserRole.trainer

print(role)

Output:

trainer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Mutability&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For a struct, both the property and the instance must be declared with var to modify the value.&lt;/p&gt;

&lt;p&gt;For a class, a var property can be changed even when the object reference is declared using let.&lt;/p&gt;

&lt;p&gt;For an enum, the value can change only when its variable is declared with var.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Struct example
struct Student {
    var name: String
}

var student = Student(name: "Ashwani")

student.name = "Ravi"

print(student.name)

Output:

Ravi
Class example
class Employee {
    var name: String

    init(name: String) {
        self.name = name
    }
}

let employee = Employee(name: "Ashwani")

employee.name = "Ravi"

print(employee.name)

Output:

Ravi
Enum example
enum Status {
    case offline
    case online
}

var status = Status.offline

status = .online

print(status)

Output:

online
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Stored Data and Cases&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A struct and a class can contain stored properties.&lt;/p&gt;

&lt;p&gt;An enum mainly contains cases. It cannot contain normal stored instance properties, but its cases can carry associated values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Example
struct Product {
    var name: String
    var price: Double
}

class User {
    var name: String

    init(name: String) {
        self.name = name
    }
}

enum PaymentResult {
    case success(amount: Double)
    case failure(message: String)
}

let product = Product(name: "Laptop", price: 75000)
let user = User(name: "Ashwani")
let result = PaymentResult.success(amount: 2500)

print(product.name)
print(user.name)

switch result {
case .success(let amount):
    print("Payment successful: ₹\(amount)")

case .failure(let message):
    print("Payment failed: \(message)")
}

Output:

Laptop
Ashwani
Payment successful: ₹2500.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Best Use
&lt;/h2&gt;

&lt;p&gt;Use struct for independent data models.&lt;/p&gt;

&lt;p&gt;Use class when shared state, inheritance, or object identity is required.&lt;/p&gt;

&lt;p&gt;Use enum when a value must be selected from a fixed set of options.&lt;/p&gt;

&lt;p&gt;Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Address {
    var city: String
    var country: String
}

class BankAccount {
    var balance: Double

    init(balance: Double) {
        self.balance = balance
    }
}

enum BookingStatus {
    case pending
    case confirmed
    case cancelled
}

let address = Address(city: "Bengaluru", country: "India")
let account = BankAccount(balance: 10000)
let bookingStatus = BookingStatus.confirmed

print(address.city)
print(account.balance)
print(bookingStatus)

Output:


Bengaluru
10000.0
confirmed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  TABULAR COMPARISION
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/7ptuz8r6bsmcckcgio5o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/7ptuz8r6bsmcckcgio5o.png" alt=" " width="1091" height="591"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/35uim8tkmbu3sk9an2wz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/35uim8tkmbu3sk9an2wz.png" alt=" " width="1040" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use Which?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/p0adoqp6q1jntt5i3zzq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/p0adoqp6q1jntt5i3zzq.png" alt=" " width="777" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>how to increase max connection in PostgreSQL</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Thu, 23 Jul 2026 10:07:26 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/how-to-increase-max-connection-in-postgresql-4j66</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/how-to-increase-max-connection-in-postgresql-4j66</guid>
      <description>&lt;h2&gt;
  
  
  Error
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/6x31j623agai039z76ma.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/6x31j623agai039z76ma.png" alt=" " width="1486" height="780"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;check the current value&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo vi /etc/postgresql/16/main/postgresql.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Increase it (pick ONE method)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Find the line:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;max_connections = 100           # (change requires restart)
change to:

max_connections = 300
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4 — restart PostgreSQL (required)&lt;/strong&gt;&lt;br&gt;
max_connections is a static parameter — a reload is NOT enough, you must restart:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart postgresql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Confirm it came back up:)&lt;br&gt;
==============or==============================&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl restart apache2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl status apache2 --no-pager -l
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl status postgresql
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 5 — verify&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo -u postgres psql -c "SHOW max_connections;"     # → 300
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Data type in swift</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Thu, 23 Jul 2026 05:07:29 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/data-type-in-swift-47i4</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/data-type-in-swift-47i4</guid>
      <description>&lt;p&gt;&lt;strong&gt;Basic Data Types&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Collection data types&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Derived data types&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;User-defined data types&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Special data types&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;swift is type safety programming language&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Type inference is a special feature of Swift language&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Basic data types    Int, UInt, Float, Double, Bool, Character, String
Collection data types   Array, Set, Dictionary
Derived data types  Tuple, Optional, Range, Function types
User-defined data types struct, class, enum, protocol, typealias
Special data types  Any, AnyObject, Void, Never
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Basic Data Types
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Integer — Int&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stores whole numbers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let age: Int = 30
let temperature: Int = -5

print(age)
print(temperature)

Output:

30
-5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Unsigned Integer — UInt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stores only zero and positive whole numbers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let totalStudents: UInt = 150
let availableSeats: UInt = 25

print(totalStudents)
print(availableSeats)

Output:

150
25
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A UInt cannot store a negative value.&lt;/p&gt;

&lt;p&gt;// let number: UInt = -10&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Error: Negative integer cannot be converted to UInt&lt;br&gt;
&lt;strong&gt;Float&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Stores decimal values with lower precision.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let height: Float = 5.8
let weight: Float = 68.5

print(height)
print(weight)

Output:

5.8
68.5
1.4 Double
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Stores decimal values with higher precision.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let price: Double = 999.99
let pi: Double = 3.141592653589793

print(price)
print(pi)

Output:

999.99
3.141592653589793
1.5 Boolean — Bool
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Stores either true or false.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let isLoggedIn: Bool = true
let isAdmin: Bool = false

print(isLoggedIn)
print(isAdmin)

Output:

true
false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Boolean values are commonly used in conditions.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let hasPermission = true

if hasPermission {
    print("Access granted")
} else {
    print("Access denied")
}

Output:

Access granted
1.6 Character
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Stores a single character.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let grade: Character = "A"
let currency: Character = "₹"
let emoji: Character = "😊"

print(grade)
print(currency)
print(emoji)

Output:

A
₹
😊
1.7 String
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Stores text.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let name: String = "Ashwani"
let course: String = "Swift Programming"

print(name)
print(course)

Output:

Ashwani
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Swift Programming&lt;/p&gt;

&lt;p&gt;String interpolation example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let name = "Ashwani"
let age = 30

let message = "My name is \(name) and I am \(age) years old."

print(message)

Output:

My name is Ashwani and I am 30 years old.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Collection Data Types
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Array&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An array stores multiple values of the same type in an ordered collection.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var fruits: [String] = ["Apple", "Mango", "Banana"]

print(fruits)
print(fruits[0])

Output:

["Apple", "Mango", "Banana"]
Apple
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Adding and modifying values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var fruits = ["Apple", "Mango", "Banana"]

fruits.append("Orange")
fruits[1] = "Grapes"

print(fruits)

Output:

["Apple", "Grapes", "Banana", "Orange"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looping through an array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let subjects = ["Swift", "iOS", "Xcode"]

for subject in subjects {
    print(subject)
}

Output:

Swift
iOS
Xcode
2.2 Set
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;A set stores unique values. It does not guarantee order.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var skills: Set&amp;lt;String&amp;gt; = [
    "Swift",
    "Laravel",
    "Swift",
    "MySQL"
]

print(skills.count)

Output:

3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The duplicate "Swift" is stored only once.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Adding, removing, and checking values:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var technologies: Set&amp;lt;String&amp;gt; = ["Swift", "MySQL"]

technologies.insert("Laravel")
technologies.remove("MySQL")

print(technologies.contains("Swift"))
print(technologies.contains("MySQL"))

Output:

true
false
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dictionary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;A dictionary stores data as key-value pairs.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var student: [String: String] = [
    "name": "Ashwani",
    "course": "Swift",
    "country": "India"
]

print(student["name"] ?? "Not found")
print(student["course"] ?? "Not found")

Output:

Ashwani
Swift
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Adding and modifying values:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var employee: [String: String] = [
    "name": "Ashwani",
    "role": "Developer"
]

employee["city"] = "Bengaluru"
employee["role"] = "Senior Developer"

print(employee["city"] ?? "Not found")
print(employee["role"] ?? "Not found")

Output:

Bengaluru
Senior Developer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Derived or Compound Data Types
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Tuple&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A tuple groups multiple values, including values of different types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var myValue = (value1, value2, value3, value4, , valueN)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let employee = ("Ashwani", 30, true)

print(employee.0)
print(employee.1)
print(employee.2)


Output:

Ashwani
30
true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var student = ("Robin", 21)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Access Tuple Elements&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var result = tupleName.indexValue
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Named tuple example:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let user = (
    name: "Ashwani",
    age: 30,
    isActive: true
)

print(user.name)
print(user.age)
print(user.isActive)

Output:

Ashwani
30
true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Function returning a tuple:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func getStudent() -&amp;gt; (name: String, marks: Int) {
    return ("Ashwani", 85)
}

let student = getStudent()

print(student.name)
print(student.marks)

Output:

Ashwani
85
3.2 Optional
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;An optional stores either a value or nil.&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var email: String? = nil

print(email as Any)

Output:

nil

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Optional with a value:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var email: String? = "ashwani@example.com"

if let validEmail = email {
    print(validEmail)
} else {
    print("Email not available")
}

Output:

ashwani@example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Using the nil-coalescing operator:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var phoneNumber: String? = nil

let displayNumber = phoneNumber ?? "Phone number not available"

print(displayNumber)

Output:

Phone number not available
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.3 &lt;strong&gt;Range&lt;/strong&gt;&lt;br&gt;
Closed range&lt;/p&gt;

&lt;p&gt;Includes both starting and ending values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for number in 1...5 {
    print(number)
}

Output:

1
2
3
4
5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Half-open range&lt;/p&gt;

&lt;p&gt;Includes the starting value but excludes the ending value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for number in 1..&amp;lt;5 {
    print(number)
}

Output:

1
2
3
4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.4 &lt;strong&gt;Function Type&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A function can be stored in a variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func add(_ first: Int, _ second: Int) -&amp;gt; Int {
    return first + second
}

let operation: (Int, Int) -&amp;gt; Int = add

let result = operation(10, 20)

print(result)

Output:

30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Another function type example&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func multiply(_ first: Int, _ second: Int) -&amp;gt; Int {
    return first * second
}

var calculation: (Int, Int) -&amp;gt; Int = multiply

print(calculation(5, 4))

Output:

20
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  User-Defined Data Types
&lt;/h2&gt;

&lt;p&gt;4.1 &lt;strong&gt;Structure — struct&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A structure groups related properties and methods.&lt;/p&gt;

&lt;p&gt;Structures are value types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Student {
    var name: String
    var age: Int

    func displayDetails() {
        print("Name: \(name)")
        print("Age: \(age)")
    }
}

let student = Student(
    name: "Ashwani",
    age: 30
)

student.displayDetails()

Output:

Name: Ashwani
Age: 30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Struct copy example:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Student {
    var name: String
}

var student1 = Student(name: "Ashwani")
var student2 = student1

student2.name = "Ravi"

print(student1.name)
print(student2.name)

Output:

Ashwani
Ravi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This shows that structures are value types. A separate copy is created.&lt;/p&gt;

&lt;p&gt;4.2 &lt;strong&gt;Class — class&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A class groups properties and methods.&lt;/p&gt;

&lt;p&gt;Classes are reference types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Employee {
    var name: String
    var salary: Double

    init(name: String, salary: Double) {
        self.name = name
        self.salary = salary
    }

    func displayDetails() {
        print("Name: \(name)")
        print("Salary: \(salary)")
    }
}

let employee = Employee(
    name: "Ashwani",
    salary: 50_000
)

employee.displayDetails()


Output:

Name: Ashwani
Salary: 50000.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Class reference example:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Employee {
    var name: String

    init(name: String) {
        self.name = name
    }
}

let employee1 = Employee(name: "Ashwani")
let employee2 = employee1

employee2.name = "Ravi"

print(employee1.name)
print(employee2.name)


`Output:`


Ravi
Ravi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both variables refer to the same class object.&lt;/p&gt;

&lt;p&gt;4.3 &lt;strong&gt;Enumeration — enum&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An enumeration defines a fixed group of related values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enum UserRole {
    case student
    case trainer
    case admin
}

let role: UserRole = .trainer

switch role {
case .student:
    print("Student dashboard")

case .trainer:
    print("Trainer dashboard")

case .admin:
    print("Admin dashboard")
}

Output:

Trainer dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enum with raw values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enum PaymentStatus: String {
    case pending = "Pending"
    case completed = "Completed"
    case failed = "Failed"
}

let status = PaymentStatus.completed

print(status.rawValue)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Output&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;Completed&lt;/p&gt;

&lt;p&gt;Enum with associated values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;enum PaymentResult {
    case success(amount: Double)
    case failure(message: String)
}

let result = PaymentResult.success(amount: 2500)

switch result {
case .success(let amount):
    print("Payment successful: ₹\(amount)")

case .failure(let message):
    print("Payment failed: \(message)")
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Payment successful: ₹2500.0&lt;br&gt;
4.4 &lt;strong&gt;Protocol — protocol&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A protocol defines rules that a structure, class, or enum must follow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;protocol Printable {
    func printDetails()
}

struct Product: Printable {
    let name: String
    let price: Double

    func printDetails() {
        print("Product: \(name)")
        print("Price: ₹\(price)")
    }
}

let product = Product(
    name: "Laptop",
    price: 75_000
)

product.printDetails()


Output:

Product: Laptop
Price: ₹75000.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Protocol with a class:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;protocol Drivable {
    func drive()
}

class Car: Drivable {
    func drive() {
        print("The car is moving")
    }
}

let car = Car()
car.drive()

Output:

The car is moving
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.5 &lt;strong&gt;Type Alias — typealias&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A type alias gives another name to an existing type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;typealias UserID = Int
typealias Price = Double

let userID: UserID = 101
let productPrice: Price = 999.99

print(userID)
print(productPrice)

Output:

101
999.99
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Function type alias example:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;typealias Calculation = (Int, Int) -&amp;gt; Int

func add(_ first: Int, _ second: Int) -&amp;gt; Int {
    return first + second
}

let operation: Calculation = add

print(operation(15, 25))

Output:

40
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Special Data Types
&lt;/h2&gt;

&lt;p&gt;5.1 &lt;strong&gt;Any&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Any can store a value of any Swift type.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var value: Any = 100

print(value)

value = "Hello Swift"
print(value)

value = true
print(value)

Output:

100
Hello Swift
true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Mixed array example:&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let values: [Any] = [
    "Ashwani",
    30,
    true,
    99.99
]

for value in values {
    print(value)
}

Output:

Ashwani
30
true
99.99
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.2 &lt;strong&gt;AnyObject&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AnyObject can store an instance of any class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Car {
    let model: String

    init(model: String) {
        self.model = model
    }
}

let car = Car(model: "Honda City")
let object: AnyObject = car

if let validCar = object as? Car {
    print(validCar.model)
}

Output:

Honda City
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.3 &lt;strong&gt;Void&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Void means that a function does not return a value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;func showMessage() -&amp;gt; Void {
    print("Welcome to Swift")
}

showMessage()

Output:

Welcome to Swift

It can also be written without -&amp;gt; Void:

func greetUser() {
    print("Hello, Ashwani")
}

greetUser()

Output:

Hello, Ashwani
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.4 Never&lt;/p&gt;

&lt;p&gt;Never means that a function never returns normally.&lt;/p&gt;

&lt;p&gt;func stopApplication() -&amp;gt; Never {&lt;br&gt;
    fatalError("Application stopped")&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;stopApplication()&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Fatal error: Application stopped&lt;/p&gt;
&lt;h2&gt;
  
  
  Complete Classification
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/2mu6sfo98r9mrjyck16u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/2mu6sfo98r9mrjyck16u.png" alt=" " width="725" height="457"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Most important user-defined data types
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Structures — struct
2. Classes — class
3. Enumerations — enum
4. Protocols — protocol
5. Type aliases — typealias
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  swift is type safety programming language
&lt;/h2&gt;

&lt;p&gt;It means that if a variable of your program expects a String, you can't pass int in it by mistake because Swift performs type-checks while compiling your code and displays an error message if it finds any type mismatch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var varA = 42

// Here compiler will show an error message because varA 
// variable can only store integer type value
varA = "This is hello"

print(varA)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output of the above example is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;main.swift:5:8: error: cannot assign value of type 'String' to type 'Int'
varA = "This is hello"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Type inference is a special feature of Swift language
&lt;/h2&gt;

&lt;p&gt;Type inference is a special feature of Swift language; it allows the compiler to automatically deduce the type of the given expression at the time of compilation&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Foundation

// varA is inferred to be of type Int
var varA = 42
print("Type of varA variable is:", type(of:varA))

// varB is inferred to be of type Double
var varB = 3.14159
print("Type of varB variable is:", type(of:varB))

// varC is also inferred to be of type String
var varC = "TutorialsPoint"
print("Type of varC variable is:", type(of:varC))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;output&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The output of the above example is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Type of varA variable is: Int
Type of varB variable is: Double
Type of varC variable is: String
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Difference between let and var in swift</title>
      <dc:creator>rakesh kumar</dc:creator>
      <pubDate>Thu, 23 Jul 2026 03:32:10 +0000</pubDate>
      <link>https://www.debug.school/rakeshdevcotocus_468/difference-between-let-and-var-in-swift-324g</link>
      <guid>https://www.debug.school/rakeshdevcotocus_468/difference-between-let-and-var-in-swift-324g</guid>
      <description>&lt;p&gt;&lt;strong&gt;let (Constant)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;var (Variable)&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Memory Concept&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;With Objects&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Best Practice&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Interview Questions
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can a let value be modified&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Can a let class object change its properties?&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Can a let struct change its properties?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/kimbq4sfr2pis2v9tvhv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/kimbq4sfr2pis2v9tvhv.png" alt=" " width="750" height="272"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  let (Constant)
&lt;/h2&gt;

&lt;p&gt;Once a value is assigned, it cannot be changed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let name = "Ashwani"

print(name)

Output:

Ashwani

Trying to modify it:

let name = "Ashwani"

name = "Raj"

Output:

Cannot assign to value: 'name' is a 'let' constant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  var (Variable)
&lt;/h2&gt;

&lt;p&gt;A var value can be changed anytime.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var age = 25

age = 26

print(age)

Output

26
Example
let company = "Apple"

var employee = "John"

employee = "Mike"

// company = "Google" ❌ Error

print(company)
print(employee)

Output

Apple
Mike
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Memory Concept
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;let&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let pi = 3.14159
pi
 │
 ▼
3.14159

Cannot change
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;var&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var score = 10

score = 20
Initially

score
 │
 ▼
10

After update

score
 │
 ▼
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;20&lt;/p&gt;

&lt;h2&gt;
  
  
  With Objects
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;let Object&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Person {
    var name = "John"
}

let p = Person()

p.name = "Mike"

This is allowed because let makes the reference constant, not the object's internal properties.

p ─────────► Person
               │
               ▼
            name = Mike

But this is not allowed:

p = Person()

Error:

Cannot assign to value: 'p' is a 'let' constant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;var Object&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var p = Person()

p = Person()

This is allowed because the reference itself can change.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  With Structs
&lt;/h2&gt;

&lt;p&gt;Structs are value types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;struct Student {
    var name: String
}

let s = Student(name: "Ashwani")

s.name = "Raj"

Output

Cannot assign to property: 's' is a 'let' constant
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since the entire struct is constant, none of its properties can change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using var&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var s = Student(name: "Ashwani")

s.name = "Raj"

print(s.name)

Output

Raj
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Best Practice
&lt;/h2&gt;

&lt;p&gt;Swift encourages using let by default and switching to var only when a value truly needs to change.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Good
let country = "India"

// Good
var counter = 0
counter += 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Interview Questions
&lt;/h2&gt;

&lt;p&gt;Q1. &lt;strong&gt;Can a let value be modified?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer: No. Once initialized, its value cannot change.&lt;/p&gt;

&lt;p&gt;Q2. &lt;strong&gt;Can a let class object change its properties?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer: Yes, if those properties are declared with var. The object reference is constant, but the object's mutable properties can still change.&lt;/p&gt;

&lt;p&gt;Q3. &lt;strong&gt;Can a let struct change its properties?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Answer: No. Since structs are value types, declaring a struct with let makes the entire instance immutable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.debug.school/uploads/articles/gw7m9z49q365zz555kvh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/uploads/articles/gw7m9z49q365zz555kvh.png" alt=" " width="847" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
