Tuesday, July 29, 2025

Building MovieVibes: A Vibe Coding Journey with Agentic AI

 "At first it was just a fun idea — what if a movie recommendation engine could understand the vibe of a film, not just its genre or rating?"

That simple question kicked off one of my most rewarding experiments in Vibe Coding and Agentic AI — powered entirely by Ollama running locally on my machine.

 

Motivation: Coding by Vibe, not by Ticket

Lately, I’ve been inspired by the idea of "Vibe Coding" — a freeform, creative development style where we start with a concept or feeling and let the code evolve organically, often in partnership with an AI assistant. It’s not about Jira tickets or rigid specs; it’s about prototyping fast and iterating naturally.

My goal was to build a movie recommendation app where users enter a movie title and get back a vibe-based summary and some thoughtful movie suggestions — not just by keyword match, but by understanding why someone liked the original movie.

 

Stage 1: The Big Idea

I started with a prompt:

"Take a movie name from the user, determine its vibe using its genre, plot, and characters, and recommend similar movies."

The app needed to:

  • Fetch movie metadata from the OMDb API
  • Use a local LLM (via Ollama) to generate a vibe summary and similar movie suggestions
  • Serve results via a clean JSON API

We scaffolded a Spring Boot project, created REST controllers and services, and started building out the logic to integrate with both the OMDb API and the locally running Ollama LLM.

 

Stage 2: Engineering the Integration

Things were going smoothly until they weren’t. 😅

Compilation Errors

When we added the OmdbMovieResponse model, our service layer suddenly couldn't find the getTitle(), getPlot(), etc. methods — even though they clearly existed. The culprit? Missing getters (at least that's what we thought at the time...).


We tried:

  • Manually writing getters ✅
  • Using Lombok’s @Getter annotation ✅
  • Cleaning and rebuilding Maven ✅

Still, values were null at runtime.

 

The Root Cause

Turns out the problem was with URL encoding of the title parameter. Movie titles with spaces (like The Matrix) weren’t properly encoded, which broke the API call. Once we fixed that, everything clicked into place. 🎯

Note: The AI would never have figured this out by itself. This was just my natural instincts kicking in to guide the AI as I would direct any other human developer. Also, It has been ages since I worked on a Spring boot project with Maven. However, the usual gotchas are still there in the year 2025 🙄. 

 

Stage 3: Talking to the LLM (via Ollama)

This was where things got really fun.

Instead of relying on cloud APIs like OpenAI, I used Ollama, a local runtime for open-source LLMs. It let me:

  • Run a model like LLaMA or Mistral locally
  • Avoid API keys and cloud latency
  • Iterate on prompts rapidly without rate limits

The app sends movie metadata (genre, plot, characters) to the local LLM with a tailored prompt. The LLM returns:

  • A summarized “vibe” of the movie
  • A list of recommended films with similar emotional or narrative energy

The results were surprisingly nuanced and human-like.

 


Tests, Cleanups, and Git Prep

To make the app production-ready:

  • We wrote integration tests using MockMvc
  • Hid API keys in .env files and excluded them via .gitignore
  • Structured the MovieVibeRecommendationResponse as a list of objects, not just strings
  • Wrote a solid README.md for onboarding others

 

Going Agentic

With the basic loop working, I asked:

How can this app become Agentic AI?

We designed the logic to act more like an agent than a pipeline:

  1. It fetches movie metadata
  2. Synthesizes emotional and narrative themes
  3. Determines recommendations with intent — not just similarity

This emergent behavior made the experience feel more conversational and human, despite being fully automated and offline.

 

Reflections

This project was peak Vibe Coding — no rigid architecture upfront, just a flowing experiment with a clear purpose and evolving ideas.

The use of Ollama was especially empowering. Running an LLM locally gave me:

  • Full control of the experience
  • No API costs or usage caps
  • A deeper understanding of how AI can enhance personal and creative tools

 

Next Steps

For future improvements, I'd love to:

  • Add a slick front-end UI (maybe with React or Tailwind)
  • Let users rate and fine-tune their recommendations
  • Persist data for returning visitors
  • Integrate retrieval-augmented generation for even smarter results

But even as an MVP, the app feels alive. It understands vibe. And that’s the magic. I committed the code to my Github at https://github.com/tyrell/movievibes. All this was done in a few hours since publishing my previous post about Spring AI


A Word on Spring AI

While this project used a more manual approach to interact with Ollama, I’m excited about the emerging capabilities of Spring AI. It promises to simplify agentic workflows by integrating LLMs seamlessly into Spring-based applications — with features like prompt templates, model abstractions, embeddings, and even memory-backed agents.

As Spring AI matures, I see it playing a major role in production-grade, AI-powered microservices. It aligns well with Spring’s core principles: abstraction, convention over configuration, and testability. 

 

Try the idea. Build something weird. Talk to your code. Let it talk back. Locally.

 

UPDATE (01/AUG/2025): Read the sequel of this here

 

Monday, July 28, 2025

Introduction to Spring AI: Bringing the Power of AI to the Spring Ecosystem

Artificial Intelligence is no longer a niche capability—it’s rapidly becoming a foundational element across enterprise applications. Whether you're building smarter chatbots, generating insights from unstructured content, or integrating Large Language Models (LLMs) into your workflows, developers increasingly need streamlined ways to plug AI into real-world systems.

 

That’s where Spring AI steps in.

In this blog post, I’ll introduce Spring AI, a new project from the Spring team that brings first-class support for integrating generative AI and foundation models into Spring-based applications. It’s an exciting addition to the Spring ecosystem that aims to make AI integration as natural as working with data sources or messaging.

 

What is Spring AI?

Spring AI is an open-source project that provides a unified and consistent programming model to work with modern AI capabilities like:

  • Large Language Models (LLMs) such as OpenAI, Azure OpenAI, Hugging Face, and Ollama
  • Embedding Models for semantic search
  • Vector Stores (like Redis, Milvus, Qdrant, Pinecone, and PostgreSQL with pgvector)
  • Prompt Templates, RAG (Retrieval-Augmented Generation) workflows, and tool execution

The project is deeply inspired by Spring Data and Spring Cloud, and brings that same level of abstraction and consistency to AI workflows.

 

Key Features of Spring AI

 

1. Unified LLM API

Spring AI provides a consistent interface across multiple LLM providers like:

  • OpenAI
  • Azure OpenAI
  • Hugging Face
  • Ollama

This allows you to write code once and switch providers with minimal changes.

var response = chatClient.call(new Prompt("Tell me a joke about Spring Boot"));
System.out.println(response.getResult());

2. Prompt Engineering Made Easy

PromptTemplate template = new PromptTemplate("Translate this text to French: {text}");
template.add("text", "Hello, world!");

3. Support for RAG (Retrieval-Augmented Generation)

Integrate AI responses with external knowledge sources using vector search. Spring AI supports various vector stores and offers abstractions for embedding, storing, and retrieving content semantically.

Embedding embedding = embeddingClient.embed("Spring is great for microservices!");
vectorStore.add(new EmbeddingDocument("id-1", embedding, metadata));

4. Integration with Spring Boot

Spring AI is a first-class citizen in the Spring ecosystem. It works seamlessly with Spring Boot and supports features like:

  • Declarative configuration using application.yml
  • Integration with Actuator and Observability
  • Use of @Bean, @Configuration, and dependency injection

5. Tool Execution and Function Calling

Spring AI supports tool calling and function execution—critical for agent-based applications.

 

A Simple Use Case

Let’s say you’re building a customer support chatbot. With Spring AI, you can:

  1. Use OpenAI to handle natural language queries.
  2. Store support articles in a vector database.
  3. Implement RAG to enhance responses using your private knowledge base.
  4. Define functions (e.g., "create support ticket") that the model can call programmatically.

The entire pipeline is manageable using familiar Spring idioms.

 

Why Use Spring AI?

If you’re already using Spring Boot in your backend stack, Spring AI provides:

  • Consistency: Familiar APIs and configuration patterns.
  • Portability: Swap providers or vector stores with minimal refactoring.
  • Flexibility: Fine-grained control over prompts, embeddings, and function calls.
  • Productivity: Rapid prototyping and integration without boilerplate.
 

Getting Started

To get started:

  1. Add Spring AI to your Maven or Gradle project:
<dependency>
  <groupId>org.springframework.ai</groupId>
  <artifactId>spring-ai-openai-spring-boot-starter</artifactId>
</dependency>
  1. Configure your provider:
spring:
  ai:
    openai:
      api-key: ${OPENAI_API_KEY}
  1. Inject and use the ChatClient, EmbeddingClient, or other components in your service.

Official guide: https://docs.spring.io/spring-ai/reference

 

The Future of Enterprise AI with Spring

Spring AI represents a big leap in making AI accessible for mainstream enterprise developers. Instead of reinventing the wheel, teams can build intelligent systems using familiar patterns and strong ecosystem support.

Whether you’re building smart assistants, enhancing search, or enabling decision support, Spring AI offers a solid foundation.

 

I’ll be diving deeper into use cases and tutorials in future posts—stay tuned!

Wednesday, July 23, 2025

AI‑Assisted Coding vs Vibe Coding: Understanding the Costs, Benefits, and Risks in the Modern Enterprise

Over the last decade, large enterprises have consistently evolved their engineering practices—from Agile to DevOps, from Microservices to Platform Engineering. In 2025, two trends dominate the software development landscape: AI‑Assisted Coding and Vibe Coding. While they may overlap in tooling and intent, their emphasis and enterprise implications are different.

This post unpacks and contrasts these two approaches in terms of costs, benefits, and risks, with added context on their origins and key voices shaping the conversation.

 

AI‑Assisted Coding: Origins & Philosophy

The term "AI-assisted coding" became common in the late 2010s, as tools emerged to enhance developer productivity using machine learning. Early tools offered code completion, bug detection, and automated refactoring, trained on public code repositories. GitHub Copilot (2021), Amazon CodeWhisperer (2022), and now AI-native IDEs like Replit have integrated deep AI support.

“The Copilot team found that developers completed tasks 55% faster with AI suggestions.”GitHub Research, 2023

 

Vibe Coding: Origins & Philosophy


Coined by Andrej Karpathy (OpenAI cofounder and former Tesla AI director) on X in February 2025:

“There’s a new kind of coding I call ‘vibe coding’, where you fully give in to the vibes, embrace exponentials, and forget that the code even exists.”

The approach emphasizes working in "flow" with AI companions, focusing on intent and outcome over code syntax. It resonates with those building prototypes, MVPs, or experimenting creatively with LLMs.

“It’s not really coding – I just see stuff, say stuff, run stuff, and copy-paste stuff, and it mostly works.” – Karpathy

Critics argue that vibe coding trivializes the rigor of engineering:

"The term is misleading... It implies ease, but in practice it's mentally exhausting." – Andrew Ng, LangChain Conf 2025

 

Comparison Table: AI‑Assisted Coding vs Vibe Coding

Aspect AI‑Assisted Coding Vibe Coding
Origins & Philosophy ML-powered developer tools since ~2018 Coined by Karpathy in 2025; emphasizes flow and experimentation
Primary Focus Automating code & improving quality Prototyping, fast ideation, and flow
Costs Tool licensing, training, integration, code review overhead DevX investment, non-standard environments, prompt engineering
Benefits Speed, quality, better onboarding, fewer bugs Innovation, accessibility, creativity, team morale
Risks IP & security concerns, skill atrophy, AI hallucination Lack of accountability, fragile prototypes, inconsistent quality
Enterprise Fit Structured SDLC tasks, junior dev enablement MVPs, PoCs, experimental sprints, hackathons


 

Strategic Guidance for Enterprises

  1. Adopt AI‑Assisted Coding tactically: Use in boilerplate-heavy domains, onboarding flows, or test generation.
  2. Enable Vibe Coding safely: Encourage in low-risk environments, MVP tracks, or labs.
  3. Create DevX Guardrails: Establish standards around LLM prompts, code quality, and model trust boundaries.
  4. Measure Beyond Vibes: Track actual productivity metrics (defect rate, rework, test coverage) alongside developer satisfaction.

 

Conclusion

AI-assisted coding is here to stay. It augments developers and supports production-quality delivery. Vibe coding, meanwhile, embodies a cultural shift—toward creativity, rapid feedback, and AI-human interaction. Together, they represent the next evolution of software development.

The challenge for tech leaders is to harness both trends intentionally—balancing structure with spontaneity, and quality with speed.

 

How is your team adapting to this new era of development?