Back to articles
Chapter 6. Best Practices for Working with an AI Agent
How-ToSecurity

Chapter 6. Best Practices for Working with an AI Agent

via Dev.toUC Jung

1.1 Why Clear Instructions Matter An AI Agent "reasons" — but it also "guesses" When an instruction is vague, an AI Agent fills in the gaps itself and proceeds with the task. A person would ask "how should I handle this?" — but an AI Agent decides on the most plausible interpretation and executes it. This is both its strength and its risk. [Vague instruction] > Build a login feature [AI Agent's interpretation — the user has no idea] • Framework? → assumes React + Express • Authentication? → assumes JWT • DB? → assumes SQLite • Password encryption? → assumes bcrypt • Social login? → assumes none → Result: works, but built on a tech stack you didn't intend [Clear instruction] > Build a login API using NestJS + Passport.js. > - Auth: JWT-based, with refresh token > - DB: PostgreSQL + Prisma > - Password: argon2 hashing > - Social login excluded from this stage → Result: built exactly as intended "Make it good" is not an instruction Telling an AI Agent to "do it well," "do it appropriately

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles