• Written by Rob Kleiman

Can AI Find the Right Moment for a Video Ad?

TL;DR

  • At a weekend hackathon, our team built VibePoint, a prototype that places video ads at natural breaks in the story instead of at arbitrary timestamps.
  • TwelveLabs reads the video’s emotional beats and story structure, one AI step picks the ad slots, and a second AI agent searches an ad library for the best fit.
  • It’s a prototype without market validation, but it convinced me that the right moment matters as much as the right audience.

Most video ads are placed by the clock. Every few minutes, or at whatever timestamp the platform picks, an ad cuts in, whether the character is mid-sentence or mid-rescue. Targeting has gotten more precise about who sees an ad: demographics, keywords, interests. It has barely changed when they see it.

That was the question our team took on: me, Leonardo Piñeyro (CTO at Pento.ai) and Sarah Yu (an AI/ML developer in an applied AI master’s program) and Lan Mi, who met at the Generative AI in Advertising Hackathon at Betaworks in New York, during Advertising Week in October 2025. We chose the “Identity & Contextual Ads” challenge and asked: can AI find the moment in a story when an ad will feel least like an interruption?

The problem: ads that ignore the story

People watch stories to be moved. An ad that lands right after a cliffhanger, or in the middle of a joke, doesn’t just annoy the viewer. It also wastes the brand’s money, because nobody is in the mood to hear about car insurance while the hero is still hanging off a cliff.

My teammate Leo told a story that made this concrete. After the hackathon, his almost three-year-old son found a hotel TV remote and turned on Jurassic Park. Just as the action picked up, an ad break cut in. His son, who doesn’t watch regular TV, had no idea what had happened. That made Leo wonder: who decided the break goes there? When he looked into it, the answer was mostly people, watching the content and choosing break points by hand.

What we built

VibePoint takes a video, works out its emotional arc and story structure, and suggests where ads should go and which ads fit each moment.

Diagram of the VibePoint pipeline: a creator video goes to TwelveLabs for analysis (emotions, scenes, three acts, hero's-journey beats and natural breakpoints). A placement step using GPT-5 mini picks three to five ad slots and writes ad keywords for each moment. An ad search agent runs its own search queries over a TwelveLabs index of ads. A dashboard shows the break points on the timeline, the chosen ad, its similarity score and the reasoning.

  1. Analyze the story. Creator videos and ads live in two separate TwelveLabs indexes. For each creator video, we ask TwelveLabs for a summary, emotional moments with timestamps, scene labels and natural breakpoints. We also ask it to map the video onto classic storytelling frameworks: the three-act structure, story beats like the inciting incident and the climax, and the twelve stages of the hero’s journey.
  2. Pick the ad slots. A placement step (GPT-5 mini, returning structured JSON) reads that analysis and chooses the best few break points. Its rules come from marketing basics: use natural transitions, never interrupt mid-sentence or mid-action, and don’t place an ad in the first moments, before viewers are invested. For each slot it writes the themes and ad keywords that would fit.
  3. Find the ads. An AI agent built with the OpenAI Agents SDK gets the full context for every slot and decides on its own what to search for. It runs several searches over the ad index, which match on both visuals and audio, keeps only strong matches, and ranks ads by their average similarity score.
  4. Show the reasoning. A dashboard plays the video with the break points marked in red. For each one it shows the story beat (for example, “Call to Adventure”), the chosen ad, its similarity score and the searches the agent tried.

What we built it with

  • Video understanding: TwelveLabs. Its Analyze API reads each video, and its Search API matches ads on both visuals and audio. Creator videos and ads live in two separate TwelveLabs indexes.
  • AI models and agents: OpenAI GPT-5 mini for the placement step, returning structured JSON, and the OpenAI Agents SDK for the ad search agent.
  • Backend: Python with FastAPI and Pydantic, plus Amazon S3 for video uploads.
  • Dashboard: Next.js, React, TypeScript and Tailwind CSS, with the demo hosted on Vercel.
  • Planning: GitHub Spec Kit in Cursor. Before writing code, the team wrote a short project “constitution,” a spec, a plan and a task list, all of which are in the repo.

What surprised us

The agent picked good ads without seeing the ads. In one demo, a short animated film about a bird that wants to reach the ocean, the first break landed early, at the “call to adventure” beat. The agent searched for things like baby care products, soft animation style, family friendly, and the best match was a baby-products ad. It had never looked at the ad library. It worked out what kind of ad belonged there from the story alone.

Different stories produced different breaks. A second cartoon, about a student whose driving test gets interrupted by a bank robbery, has a much more action-heavy arc. The break points moved, and the matches changed with them: ads from Geico and Volkswagen instead of baby products.

Storytelling frameworks made good instructions. The three-act structure and the hero’s journey gave the model a shared vocabulary for “where are we in this story?” That turned a vague goal (“find a good moment”) into a structured one (“find the end of an ordeal, not the middle of it”).

Where it falls short

VibePoint is a weekend prototype, and it’s worth being clear about what it doesn’t prove.

  • No real viewers. Similarity scores measure how well an ad matches a moment, not whether people engage with it. Our placement prompt even asks the model to simulate viewer reactions. That’s a guess, not a measurement.
  • No market validation yet. In the Q&A after our talk, someone asked whether anyone was using it. Honestly, no. Broadcasters and streaming platforms already have ad-insertion tools, and something like VibePoint would probably have to plug into those rather than replace them.
  • Cost grows with the video library. Every video is indexed and analyzed by TwelveLabs, so the price grows with the amount of content.

Presenting it at Multimodal Fridays

In November 2025, Leo and I presented VibePoint on episode 102 of TwelveLabs’ Multimodal Fridays series, hosted by James Le, alongside two other projects from the same hackathon. I covered the problem and the storytelling model, and Leo walked through the architecture and the demo. TwelveLabs said afterward that the ad-insertion problem comes up with their own customers, which was the most encouraging feedback we got.

You can also watch the original hackathon demo:

What I took away

Context isn’t only about topic. It’s also about timing. The same ad can land well or badly depending on where the viewer is in the story, and AI video analysis is now good enough to make that a question you can test, not just a hunch.

The other lesson was about the weekend itself. A team that met at the hackathon, with members in different countries, went from an idea to a working pipeline and dashboard in two days. That’s partly the tools, and partly the fun of building without worrying yet about whether it’s a business.

For another build where AI sped things up but the fundamentals still decided the outcome, read So Here’s What Vibe Coding Can’t Teach You.

References

Keep reading

More from Things I've Built

All Things I've Built posts →