# From Prompt Engineering to Loop Engineering 🔄

We've all heard the term **<mark class="bg-yellow-200 dark:bg-yellow-500/30">prompt engineering</mark>**. When ChatGPT became popular, everyone believed that writing better prompts was the secret to getting better answers and they were right.

For example, instead of asking:

Explain JavaScript's Global Execution Context.

You could ask:

Explain JavaScript's Global Execution Context like a senior developer teaching a junior developer

The second prompt gives a much better answer because it's more specific.But as people started building real AI applications, they realized **a good isnt enough**

That's where **<mark class="bg-yellow-200 dark:bg-yellow-500/30">context engineering</mark>** comes in.

Instead of only giving the AI a prompt, you also give it background information.

For example, instead of saying:

Recommend a laptop.

You say:

I'm a React and Next.js developer. My budget is ₹80,000. I mainly code and need good battery life.

Now the AI can give a much better recommendation because it knows your situation.

Then comes **<mark class="bg-yellow-200 dark:bg-yellow-500/30">harness engineering</mark>**<mark class="bg-yellow-200 dark:bg-yellow-500/30">.</mark>

The AI is smart, but it can't do everything on its own. If you want it to check prices of something, search hotels, or remember users, you need to connect it to other tools. This is what **harness engineering** is all about..

Finally, there's **<mark class="bg-yellow-200 dark:bg-yellow-500/30">loop engineering</mark>**<mark class="bg-yellow-200 dark:bg-yellow-500/30">.</mark>

Instead of giving one answer the AI keeps trying to improve its answer. For example, it writes the code, checks for mistakes, fixes them, and tries again. It repeats this process until the result is good. This is called **loop engineering**.

AI has come a long way. It started with writing better prompts. Then we learned to give it better context. Now we connect it to tools and let it improve its own work. That's what modern **<mark class="bg-yellow-200 dark:bg-yellow-500/30">AI engineering</mark>** is all about.
