Author: Richard Seroter

  • Daily Reading List – September 19, 2024 (#401)

    It’s been a long week! I spent some time this afternoon setting up a new work laptop, and I’m going to foolishly bring it on a trip tomorrow. What could go wrong?

    [article] Valkey 8.0 rides high at Open Source Summit in Vienna. It’ll be interesting to see where this fork starts to distinguish itself and diverge from Redis functionality.

    [blog] 9 new features we announced at Made on YouTube 2024. I can’t say that any of these apply to me directly, but it’s a guarantee I’ll interact with the results by YouTube creators.

    [blog] Keys to a resilient Open Source future. Is AI going to be the best option for open source security? It might be, given the scale of code we’re talking and the volunteer-heavy approach.

    [blog] Introducing Netflix’s Key-Value Data Abstraction Layer. Abstractions are tricky to maintain, and can accidentally block you from using unique features underneath. But for scenarios like this, the use case makes sense to me.

    [article] Deno 2 Arrives With Long-Term Support, npm Compatibility. Migrating to this Nodejs replacement will be easier now, for those interested.

    [blog] Quitting Time. Perseverance is important, but so is knowing when to quit. What’s your criteria, and can you stick to it?

    [blog] Apache Airflow ETL in Google Cloud. The spectrum of hosting options is typically raw compute, managed compute, and managed servcies. That applies here as well.

    Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below:

  • Daily Reading List – September 18, 2024 (#400)

    Today was another day of team meetings so I was offline for much of it. But I got some good early-morning reading finished, and you’ll find them in my 400th list below.

    [article] Mistral launches a free tier for developers to test its AI models. Every dev loves a good sandbox environment. Mistral is encouraging folks to give their models a try.

    [article] Writing CNNs from Scratch in PyTorch. If you’ve been dying to create convoluted neural networks, follow along with this tutorial.

    [article] Are You Done Yet? Mastering Long-running Processes in Modern Architectures. Bernd knows what he’s talking about, so learn from him in this talk/transcript about long running workflows.

    [article] Go makes a comeback: What’s fueling its revival? This article proposes that Go is getting more popular because of its security posture and AI friendliness.

    [blog] Cloud CISO Perspectives: The high value of cross-industry communication. It’s good to see that companies and organizations of all kinds willingly partner together to solve security challenges.

    [article] Study Finds No DevOps Productivity Gains from Generative AI. Hmm. I haven’t seen findings like this, which is why the article caught my eye. Run your own analysis when you introduce these tools into your environment to see where it makes a positive difference.

    [article] Open Source: Paid Maintainers Keep Code Safer, Survey Says. A lot of folks depend on software with a small number of maintainers. This says that those who are paid spend more time on security work.

    [article] Home Depot builds DIY GenAI model that tells human employees what to say. This post looks at a new whitepaper from the home improvement giant. They’re using a RAG pattern to help with support chats.

    [article] This Is How To Conquer Anxiety: 4 Secrets From Research. You may not conquer anxiety, but these are solid ways to get it under control or reframe it.

    Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below:

  • Daily Reading List – September 17, 2024 (#399)

    I had team meetings today, which made me grateful to work with excellent folks. Before starting this offsite, I read through some fascinating pieces that you’ll find below.

    [article] How a Playful Mindset Can Boost Creativity on Your Team. Where do you get your best ideas? You probably didn’t say “at my desk in the office.” Play matters.

    [blog] Is OpenTelemetry Open for Business? September 2024 Update. If you’re betting on this framework for observability, is it supported for your languages and platforms of choice?

    [blog] Advancing Our Chef Infrastructure. I can’t imagine that companies swap out infrastructure-as-code or configuration management investments often. Slack is all-in on Chef, and explains their evolution.

    [blog] Chat with your business data – Conversational Analytics comes to Gemini in Looker. To me, one of the underrated of all this generative AI business is the new ability to explore and find information without needing to know SQL.

    [blog] Should we decompose our monolith? This post looks at the messy world of today’s environments where there’s a mix of monolithic and microservice approaches.

    [blog] Exploring BigQuery Time Travel: Historical Querying with Practical Examples. It’s powerful to be able to query data from a specific point in time.

    [blog] Legacy Modernization meets GenAI. The ThoughtWorks crew has an interesting tool they’ve built to make modernizations better and more approachable.

    [blog] From keywords to relationships: Reveal deeper insights with full-text search and Spanner Graph. These folks make the case that graph and full-text search are better in one system. And they bring examples.

    [article] How (and why) should teams try distributed pair programming? While some companies are pushing return-to-office, many still have distributed teams that need to work together. This post looks at a study showing what makes distributed pair programming successful.

    [blog] Accelerate Ray in production with new Ray Operator on GKE. Check a box, get a rich AI workload system installed into your Kubernetes cluster. I like it.

    Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below:

  • Daily Reading List – September 16, 2024 (#398)

    As hoped for, I mostly skipped doing work this weekend and spent longer-than-expected building an Apollo 11 lunar lander with one of my kids. We had fun. Today was back to the work that pays for these Lego sets.

    [article] Non-Obvious Signs of Early Startup Traction — And How to Spot Them. For founders, but I think this also applies for any major endeavor. Are you missing the signs that things are actually starting to take off?

    [blog] Building LLM-powered applications in Go. Eli reminds us that the vast majority of “AI apps” are really just like apps that call LLMs. He shows off a handful of ways to create a RAG server in Go.

    [blog] The Top 50 Tips for Better Angular Development. None of that “five hints” or “three best ways” stuff here. We’re going for the full fifty tips. Good guidance for frontend devs.

    [blog] Grounding AI in reality with a little help from Data Commons. I shared this new DataGemma model last week, and this Google Research paper goes deeper into the idea of “grounded AI.”

    [blog] Open Source Foundations Considered Helpful. Do open source foundations just exist to throw lavish conferences? Nah. They add legit value, as James points out here.

    [blog] Unit Testing in Beam: An opinionated guide. I can’t say I’ve seen a lot of guidance around how to test data pipelines. Here’s direction on unit tests.

    [blog] RAG API. Here’s a good post about a managed solution for augmenting your LLM requests with customized data sources. I hadn’t tried this service out yet, and now i want to.

    [youtube-video] Safe RAG for LLMs. *Three* RAG pieces today? Let’s embrace the discomfort. I liked this video which looked at patterns for RAG that avoid data leakage.

    [article] Predicting developer attrition. How do you know a developer is on their way out the door? This paper looks at attrition and notes how burnout prevention and “opportunities to learn” are big factors.

    [article] Why Companies Should Consolidate Tech Roles in the C-Suite. is tech leadership distributed within your company? Is there a single go-to person who’s accountable? The article says consolidation is happening.

    [blog] How EA Sports protects their game servers with Cloud Armor. I didn’t know gaming was such a top target for DDoS attacks. Being able to protect yourself with a Google-scale managed service is a big deal.

    [blog] 2030 HFS Services Technology Vision: The Future of Services is No Services. Service as software. That’s what’s being proposed here as a way to get out of the tech debt spiral.

    Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below:

  • Daily Reading List – September 13, 2024 (#397)

    Today was a good day. I got enough done that I think I can skip most work this weekend, and build that Lego set sitting on my shelf that my kiddo been asking me “when can we build this?” This weekend, son.

    [article] How Google build great engineering teams? Some good wisdom here from Addy that might be useful whether you’re a new team builder, or an experienced one.

    [paper] Large Language Model-Based Agents for Software Engineering: A Survey. Check out this paper for a sense of why LLM tools are helpful in software engineering, why “agents” are different than straight-up using an LLM, and how these agents work.

    [blog] Making mass changes to Infrastructure as Code. Are you able to change a lot of IaC configurations at once? Brian looks at why you might do that, and the challenges.

    [blog] How Project Guideline helped me run a half marathon independently. Lovely story, and a reminder of how technology has given people mobility and freedom they had previously lost.

    [article] 5 Ways Cursor AI Sets the Standard for AI Coding Assistance. This is definitely one of the buzziest tech tools of the year. Lots of folks like the completeness and flexibility.

    [blog] GKE Enterprise: A platform engineered for success with Kubernetes. If the center of your internal platform is Kubernetes, you’ll want capabilities like these.

    [blog] The RedMonk Programming Language Rankings: June 2024. Very little movement among the top 10. You’re not going to make a wrong bet on most of these! Check out the rankings over time too.

    [blog] Intro to Ray for AI on Kubernetes. Kaslin explains this open source framework, why you’d use it, and how to get it running on Kubernetes.

    [blog] Message Queues in System Design. Classic technology, but there’s always someone learning about it for the first time. Posts like this are a solid intro to how and when to use queues.

    [blog] A Patent Search Agent with LangChain and Reasoning Engine. This shows you how to use a LangChain-as-a-Service experience to host AI agents.

    Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below:

  • Daily Reading List – September 12, 2024 (#396)

    I’m starting to wonder if I’m writing too much. Between this daily list, blog posts (new one today), and a couple newsletters each week, maybe I need to use other mediums too. I dunno. Hopefully you’re enjoying it!

    [blog] Notes from my appearance on the Software Misadventures Podcast. Some fun, pragmatic quotes from Simon in this podcast.

    [blog] DataGemma: Using real-world data to address AI hallucinations. Take a look at this. Here’s a new set of open models based on tons of real-world data that improves trustworthiness.

    [blog] Learning to Reason with LLMs. The much-discussed new model from OpenAI is out there. Looks impressive

    [article] How does Copilot impact the day-to-day software engineering experience? This post digs into a recent study of GitHub Copilot usage and its broader impact.

    [article] 5 lessons I learned after conducting 100+ customer interviews. These are valuable lessons and should encourage us to approach user research differently.

    [paper] Protecting Multi-Cloud Resources in the Era of Modern Cloud-Based Cyberattacks. This post has a direct link to a paper (no registration required) that explains strategies to protecting multi-cloud resources. Good content!

    [blog] How big up-front design fails. Here are some lessons learned from projects with big upfront planning and design, and why a more iterative approach works better.

    [podcast] 274: The Cloud Pod is Still Not Open Source. This latest episode of the podcast that reviews news from AWS, Microsoft and Google spent some time discussing my recent post about technical debt. Neat!

    Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below:

  • 3 ways to use AI to grade homework assignments

    3 ways to use AI to grade homework assignments

    School is back in session, and I just met with a handful of teachers at a recent back-to-school night. They’re all figuring out how to account for generative AI tools that students have access to. I say, let’s give teachers the same tools to use. Specifically, what if a teacher wants a quick preliminary grade on book reports submitted by their students? To solve this, I used Gemini Flash 1.5 in Google Cloud Vertex AI in three different ways—one-off in the prompt editor, through code, and via declarative workflow.

    Grade Homework in Vertex AI Studio

    Maybe you just have one or two papers to grade. Something like Vertex AI Studio is a good choice. Even if you’re not a Google Cloud customer, you can use it for free through this link.

    You don’t have any book reports handy to test this with? Me neither. In Vertex AI Studio, I prompted with something like “Write a 300 word book report for Pride and Prejudice from the perspective of an 8th grade student with a good vocabulary and strong writing skills.”

    With that handy, let’s “grade” the paper. Here I’m using system instructions to direct the model. I used Gemini to generate the initial version and then I tweaked it a bit. Here’s the instructions:

    Task: Evaluate 8th-grade book reports for an honors English class. You are a tough grader. Input: Book report text. Output: Initial letter grade (A, B, C, D, or F) based on: Structure: Clear introduction, body, and conclusion Grammar: Spelling, punctuation, sentence structure. Content: Understanding of the book, critical thinking. Consider: Age and language proficiency of the student.

    This tells the model what to look for, the expected quality (“honors English”), and the desired output.

    I added the system instructions to the marked section within Vertex AI Studio.

    Then I simply pasted the book report into the “prompt” section and submitted the prompt.

    I thought this was a pretty good book report, but Gemini 1.5 Flash had a high bar after obeying my system instructions.

    This book report shows good understanding of the book and a strong grasp of the themes. However, there are some issues:

    Structure:
    The introduction is a little long and could be more concise.
    The conclusion is also repetitive.
    The report could benefit from more clear paragraph breaks to organize the information more effectively.

    Grammar:
    No significant grammar issues.

    Content:
    The student demonstrates good understanding of the novel's major themes and characters.
    There's a strong focus on plot summary, which is okay, but the report could benefit from more critical analysis. The student needs to go beyond just describing the events to analyze how they impact the themes, characters, or messages of the book.
    Overall: This report shows good effort, but it needs to be refined.

    Grade: B-

    If I’m a teacher, this is a fascinating way to get a preliminary assessment of a writing assignment!

    Grade Homework Through Code

    The above solution works fine for one-off experiences, but how might you scale this AI-assisted grader? Another option is code.

    To try this scenario out, I used Cloud Firestore as my document database holding the book reports. I created a collection named “Papers” in the default database and added three documents. Each one holds a different book report.

    I think used the Firestore API and Vertex AI API to write some simple Go code that iterates through each Firestore document, calls Vertex AI using the provided system instructions, and then logs out the grade for each report. Note that I could have used a meta framework like LangChain, LlamaIndex, or Firebase Genkit, but I didn’t see the need.

    package main
    
    import (
    	"context"
    	"fmt"
    	"log"
    	"os"
    
    	"cloud.google.com/go/firestore"
    	"cloud.google.com/go/vertexai/genai"
    	"google.golang.org/api/iterator"
    )
    
    func main() {
    	// get configuration from environment variables
    	projectID := os.Getenv("PROJECT_ID") 
    	collectionName := os.Getenv("COLLECTION_NAME") // "Papers"
    	location := os.Getenv("LOCATION")              //"us-central1"
    	modelName := os.Getenv("MODEL_NAME")           // "gemini-1.5-flash-001"
    
    	ctx := context.Background()
    
    	//initialize Vertex AI client
    	vclient, err := genai.NewClient(ctx, projectID, location)
    	if err != nil {
    		log.Fatalf("error creating vertex client: %v\n", err)
    	}
    	gemini := vclient.GenerativeModel(modelName)
    
    	//add system instructions
    	gemini.SystemInstruction = &genai.Content{
    		Parts: []genai.Part{genai.Text(`Task: Evaluate 8th-grade book reports for an honors English class. You are a tough grader. Input: Book report text. Output: Initial letter grade (A, B, C, D, or F) based on: Structure: Clear introduction, body, and conclusion Grammar: Spelling, punctuation, sentence structure. Content: Understanding of the book, critical thinking. Consider: Age and language proficiency of the student.
    		`)},
    	}
    
    	// Initialize Firestore client
    	client, err := firestore.NewClient(ctx, projectID)
    	if err != nil {
    		log.Fatalf("Failed to create client: %v", err)
    	}
    	defer client.Close()
    
    	// Get documents from the collection
    	iter := client.Collection(collectionName).Documents(ctx)
    	for {
    		doc, err := iter.Next()
    		if err != nil {
    			if err == iterator.Done {
    				break
    			}
    			log.Fatalf("error iterating through documents: %v\n", err)
    		}
    
    		//create the prompt
    		prompt := genai.Text(doc.Data()["Contents"].(string))
    
    		//call the model and get back the result
    		resp, err := gemini.GenerateContent(ctx, prompt)
    		if err != nil {
    			log.Fatalf("error generating context: %v\n", err)
    		}
    
    		//print out the top candidate part in the response
    		log.Println(resp.Candidates[0].Content.Parts[0])
    	}
    
    	fmt.Println("Successfully iterated through documents!")
    }
    
    

    The code isn’t great, but the results were. I’m also getting more verbose responses from the model, which is cool. This is a much more scalable way to quickly grade all the homework.

    Grade Homework in Cloud Workflows

    I like the code solution, but maybe I want to run this preliminary grading on a scheduled basis? Every Tuesday night? I could do that with my above code, but how about using a no-code workflow engine? Our Google Cloud Workflows product recently got a Vertex AI connector. Can I make it work with the same system instructions as the above two examples? Yes, yes I can.

    I might be the first person to stitch all this together, but it works great. I first retrieved the documents from Firestore, looped through them, and called Vertex AI with the provided system instructions. Here’s the workflow’s YAML definition:

    main:
      params: [args]
      steps:
      - init:
          assign:
            - collection: ${args.collection_name}
            - project_id: ${args.project_id}
            - location: ${args.location}
            - model: ${args.model_name}
      - list_documents:
            call: googleapis.firestore.v1.projects.databases.documents.list
            args:
                collectionId: ${collection}
                parent: ${"projects/" + project_id + "/databases/(default)/documents"}
            result: documents_list
      - process_documents:
            for:
              value: document 
              in: ${documents_list.documents}
              steps:
                - ask_llm:
                    call: googleapis.aiplatform.v1.projects.locations.endpoints.generateContent
                    args: 
                        model: ${"projects/" + project_id + "/locations/" + location + "/publishers/google/models/" + model}
                        region: ${location}
                        body:
                            contents:
                                role: "USER"
                                parts:
                                    text: ${document.fields.Contents.stringValue}
                            systemInstruction: 
                                role: "USER"
                                parts:
                                    text: "Task: Evaluate 8th-grade book reports for an honors English class. You are a tough grader. Input: Book report text. Output: Initial letter grade (A, B, C, D, or F) based on: Structure: Clear introduction, body, and conclusion Grammar: Spelling, punctuation, sentence structure. Content: Understanding of the book, critical thinking. Consider: Age and language proficiency of the student."
                            generation_config:
                                temperature: 0.5
                                max_output_tokens: 2048
                                top_p: 0.8
                                top_k: 40
                    result: llm_response
                - log_file_name:
                    call: sys.log
                    args:
                        text: ${llm_response}
    

    No code! I executed the workflow, passing in all the runtime arguments.

    In just a moment, I saw my workflow running, and “grades” being logged to the console. In real life, I’d probably update the Firestore document with this information. I’d also use Cloud Scheduler to run this on a regular basis.

    While I made this post about rescuing educators from the toil of grading papers, you can apply these patterns to all sorts of scenarios. Use prompt editors like Vertex AI Studio for experimentation and finding the right prompt phrasing. Then jump into code to interact with models in a repeatable, programmatic way. And consider low-code tools when model interactions are scheduled, or part of long running processes.

  • Daily Reading List – September 11, 2024 (#395)

    23 years later, I still think about where I was the moment I heard that a plane crashed into the Twin Towers. Let’s never forget.

    [youtube-video] Decoding Google Gemini with Jeff Dean. I liked this episode of the DeepMind podcast featuring our Chief Scientist. Jeff shares history, and future.

    [article] Has Splitting Into ‘Inner’ and ‘Outer’ Loops Sent DevOps to the Dark Ages? Has disproportional investment in dev activities impacted overall flow? Is the outer loop neglected and holding back progress? Interesting perspective here.

    [blog] Kaggle Model Upload Made Easy. Millions of folks use Kaggle to try models, access datasets, compete in AI competitions, and more. This post looks at how you upload models.

    [blog] Inside Expedia’s Migration to ScyllaDB for Change Data Capture. Good story from Expedia on why and how they migrated to a different database engine. That’s a BIG exercise, but it seems they did it well.

    [repo] Automatic Password Rotation. Do you regularly rotate your database passwords? Is that a manual or automated process? This reference architecture (and IaC scripts) shows you how to do it.

    [blog] NotebookLM now lets you listen to a conversation about your sources. This seems like related to tech to what I shared yesterday (Illuminate). Super cool stuff.

    [article] Mistral releases Pixtral 12B, its first multimodal model. Models that can handle text, audio, and images are valuable. You’ll likely see more of them, and now Mistral joins the party.

    [article] Oracle Database is in many enterprises and now it’s in Google Cloud too. Oracle’s had a good week. They’ve got strong partnerships with each hyperscaler and seem to have some good momentum.

    [blog] How to build a custom Gmail Add-on w/ Gemini to find dates 📅. Fun example app from Zack. Use this to extract potential calendar appointments from the contents of an email.

    Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below:

  • Daily Reading List – September 10, 2024 (#394)

    Big reading list today. Sorry, not sorry. Hopefully you find a few fun things that catch your eye.

    [blog] Free Tools Every ML Beginner Should Use. There’s seemingly a new AI/ML tool released every day, but these are mature options for beginners and experts.

    [blog] The AI detective: The Needle in a Haystack test and how Gemini 1.5 Pro solves it. Long context isn’t the answer to everything (see the paper below), but Gemini’s ability to find a needle in the haystack is very impressive.

    [blog] How DevOps can come back from the dead, and why it must. Coté says it’s time to distinguish DevOps from concepts that superseded it, like platform engineering.

    [blog] How to Manage Python Dependencies in Cloud Functions. Learn how Kiran moved functions from Lambda to Google Cloud and handled Python package dependencies.

    [blog] Cloud Run job with a Python Module. Background jobs with Cloud Run are great. Mazlum offers a detailed post about using Python modules with them.

    [paper] In Defense of RAG in the Era of Long-Context Language Models. We got it going with Gemini’s 1m (now 2m) long context window, but now other models are starting to grow their input token size. But does that negate the need for RAG? Not according to this paper.

    [site] Illuminate. Coolest thing I saw today. Generate an on-demand “podcast” for research papers and books. Try it with the paper above. Worked amazingly well.

    [blog] Introducing backup vaults for cyber resilience and simplified Compute Engine backups. This seems like an industrial-grade solution for protecting your most important apps. And it seems straightforward to turn on.

    [article] Coaching Founder Mode. Marty offers a must-read essay that proposes all product leaders be coached into a “founder mode” mindset.

    [article] Take Your First Steps with Git. Git is for more than just developers; I’ve seen content authors, ops folks, database pros, and product managers rely on it. Having a base understanding is helpful.

    [blog] Write Change-Resilient Code With Domain Objects. Here’s some helpful guidance on the Google Testing blog that might help you write code that handles changes better.

    [blog] Tinder API Style Guide — Part 1. Creating some API standards around URI patterns and headers? Take a look at what the Tinder engineering team put together.

    Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below:

  • Daily Reading List – September 9, 2024 (#393)

    Did you have a good start to your week? After writing a few thousand words this weekend about Cloud Run, I’m hunting for the next tech to mess around with. Suggestions?

    [blog] Embeddings: How to select the right one? Here’s a good treatment of an important concept in the real of large language models.

    [article] Measuring developers’ jobs-to-be-done. This story reviews a recent Google paper that explored “developer goals” that help internal teams optimize the dev experience.

    [blog] A Complete Guide to Leveraging Langchain.js and Google Cloud Functions for AI-Powered Applications. Fairly robust example here from Tanya that looks at a few dimensions of calling LLMs from a serverless environment via frameworks like LangChain.

    [article] Why Generalists Own the Future. Specialists or generalists? It’s a common debate. Dan argues that generalists are well positioned in this dynamic future because they will adapt faster than those with specific expertise.

    [blog] New Gemini model in LangChain4j. If you want a simple model-as-a-service experience with Gemini, the Google AI edition is a great place to start. If you’re looking for more advanced AI/ML features to go with it, Google Cloud’s Vertex AI is an ideal starting point. For the former, you can now use LangChain4j.

    [article] 4 Pillars of Innovation Every Organization Needs. There are some good pieces of advice here, including some “avoid this” direction which can be valuable.

    [paper] Multimodal Web Navigation with Instruction-Finetuned Foundation Models. Dense subject (to me), but there’s clearly value in getting better at autonomous web navigation.

    [blog] Can Postgres replace Redis as a cache? Answer, not really. Use a proper caching tool when performance matters.

    [blog] The new wave: Top 10 emerging .NET content creators. Do a regular (annual?) review of your feeds/follows to see if it’s gotten stale. Find new folks who are publishing!

    [blog] Five Lessons Learned From a Lifetime of Platform-as-a-Product. Good lessons from someone who has lived it.

    [blog] The insidious problem of configuration sprawl. If you’ve got all your system, application, and infrastructure configurations in a single place … you’re a unicorn. I’d like to meet you. Most folks have configs all over the place, as Brian talks about here.

    Want to get this update sent to you every day? Subscribe to my RSS feed or subscribe via email below: