Top tips for coding Vibe with AI from Amazon tech leaders

AI For Business


This told essay is based on a conversation with Anni Chen, who has worked in Amazon Software Engineering for about three and a half years. Edited for length and clarity. Business Insider has confirmed her employment history.

AI helped us code, but more importantly, AI helped us turn it into a product. The combination of understanding AI and converting it into a scalable product helped me get promoted faster.

I started in 2022 as an entry-level Software Engineer I. I was part of the Recommendations team, working on the Recommendations widget.

I started working on AI products on the side about two years ago. It grew huge and eventually spun off into its own team, of which I am the founding engineer.

I was promoted from the recommendation team to Software Engineer II and then to Senior Engineer on my current team.

I’m focused on so-called memory, which powers the personalization of generative AI experiences across Amazon.

95% of my code is written by AI

I started using AI as a side project to generate attractive titles for recommendation widgets when ChatGPT and Claude came out. I realized how powerful it is for creating something truly creative.

I started thinking that when I have a question or want to write some code, I first ask the AI ​​for help before trying it.

The solution I found was to level up my code and it also helped me write more code. I can now say that almost 95% of the code I write is written by AI.

We’re not just using AI for coding. We also incorporate the output of AI into our products. You need a deep understanding of how AI works, what works well, and what doesn’t.

You must be open to new models and tools that come along to help you iterate your product and make it better.

I work as a technical lead on large-scale LLM-driven systems in production, so I have a front-row seat to see how AI-assisted workflows work, not just in prototypes, but at real-world scale and cross-team collaboration.

Important tips for vibe coding

The first tip is to understand the inner workings of LLM and where it can fail.

LLMs are pre-trained. LLM is trained on a large corpus and is a probabilistic game. Supervised fine-tuning then occurs, so the model answers based on the structure of the question and the format of the answer. Finally, RLHF (Reinforcement Learning from Human Feedback) follows.

By understanding these three steps, you can, for example, know when the LLM does not understand what you are talking about and when the LLM requires domain knowledge from the user. You’ll know when to use new windows and why hallucinations occur.

Understanding the limitations of the context window will help you know when to resolve a problem. Learn how to break things down into lower levels according to structure, and then slowly focus on and generate each component.

By understanding the inner workings, you will also know when you need to explain things to your colleagues. If you don’t elaborate, all these assumptions will default to the most common pattern, which may not fit your use case.

My second tip: think before you vibe code.

If you check the answer first, your thinking will be influenced by the answer. Compare your thinking to the LLM and see what the gaps are: what you didn’t understand and why your answers are different. From there, you can see what implicit assumptions you have not communicated to your LLM.

Third, encourage difficult questions. Ask questions such as what are the fallbacks in case of errors and how does this scale? This is like a teacher asking a student, or a senior engineer asking a junior engineer if they are sure difficult questions are covered. If you want to expand your product, be intentional about thinking about it and asking expansion questions from day one.

Please review and understand at the end. Be sure to review each step, rather than only after the entire code has been generated. This ensures that errors stop early instead of cascading all the way to the end and having to redo everything.

Writing incorrect code is very dangerous. When the code exists, people think, “Okay, this is good, it works.” But if the wrong code is introduced into production, it can cause more damage than missing functionality.

Understanding the code is still important

You need to understand your own code. AI lowers the barrier to writing code, but it doesn’t take the responsibility of understanding it.

If something goes wrong and that code was committed by you, you are responsible.

Imagine your code breaks in production and you need to fix it, and you say, “I don’t know either, the AI ​​told me.” That’s not the right way.

I don’t think it is possible to entrust such high-stakes work to AI yet.

AI is also a perfect learning opportunity, making it easier to understand. Just open another window and let that window explain the concept to you.

In the same window, if you ask a question about what it produced, it will only be explained in that context. But I would like to understand this concept more generally and see if it makes sense to apply it in this case.

Do you have a story to share about coding with AI? Contact this reporter at: cmlee@businessinsider.com.





Source link