profile

Mark C Allen

Everyday DevOps - How I Actually Use LLMs to Program


Everyday DevOps

Please forward this to at least one other person you'd think would benefit from Everyday DevOps.

How I Actually Use LLMs to Program

Large language models (LLMs) like ChatGPT, Gemini, and Claude are shaking up how we write software, but let’s be clear: they aren’t magic wands.

For me, the problems I try and solve fall into three categories:
1. I know what I know
2. I know when I don't know
3. I don't know what I don't know.

I've detailed these in my latest blog post on how I use AI as a senior engineer.

Prisma - AI Style

Using prisma on a project? Use ChatGPT to make schemas in seconds.

For example, if I want to create a new User and Organization table with a many-to-many relationship, I'd use the following prompt.

PrismJS Highlighted Shell Command
I'm using prisma with a node application.  
Create for me a prisma schema for a postgres database use uuid's that 
are generated by default that has the following entities.
User - name, email
Organization - name
Create a many to many relationship between user and organization and 
include a role for this link.  Roles can be owner (default), admin or user.

This will create a schema.prisma file

PrismJS Highlighted Shell Command
// schema.prisma
generator client {
  provider = "prisma-client-js"
}
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}
model User {
  id              String              @id @default(uuid()) @db.Uuid
  name            String
  email           String              @unique
  userOrganizations UserOrganization[]
  createdAt       DateTime            @default(now())
  updatedAt       DateTime            @updatedAt
}
model Organization {
  id              String              @id @default(uuid()) @db.Uuid
  name            String
  userOrganizations UserOrganization[]
  createdAt       DateTime            @default(now())
  updatedAt       DateTime            @updatedAt
}
model UserOrganization {
  userId         String               @db.Uuid
  organizationId String               @db.Uuid
  role           Role                 @default(OWNER)
  user           User                 @relation(fields: [userId], references: [id], onDelete: Cascade)
  organization   Organization         @relation(fields: [organizationId], references: [id], onDelete: Cascade)
  @@id([userId, organizationId])
}
enum Role {
  OWNER
  ADMIN
  USER
}

Now you can go ahead and add this to your database.

I have a complete example on my blog at: Getting Started with Prisma - AI Style

Transform your Product Career and Skills

The PM Repo is a repository of the best tools, frameworks, metrics, and resources to help everyone deliver their next great product.

What this week has in store

Spent some time working on my chatbot and created a supervisor to handle different types of requests. These requests were routed through a qwen LLM that I hosted on my kubernetes cluster. This week, I will expand upon that and bring in a few more agents to see how well the routing works.

See you next week!

Mark C Allen

1:1 Chat

Need a Different Perspective

Do you have a problem with your release process? Has Kubernetes got you down? Do you need an outsider's perspective on what's holding up your deployments? If you have 25 minutes, book a time with me.

Mark C Allen

For DevOps engineers. Ideas, concepts, tips & tricks based on my day-to-day experience.

Share this page