← Back to Case Studies
Internal PrototypeMarketing SaaS

RAG Copy Generation Assistant for a Marketing SaaS

3variants per request
80–85%first-attempt accuracy
10–20send-to-end latency
FastAPILangChainpgvectorOpenAIPythonPostgreSQL

Transparency note: This is an internal prototype, not a paid client engagement. It was built on public documentation patterns and synthetic campaign data to demonstrate what our studio can build and adapt for real SaaS teams.

01

Overview

This internal prototype explores how a retrieval-augmented generation (RAG) assistant could power an API-first copy generation service for a typical B2B marketing SaaS. These platforms often serve agencies and in-house growth teams who need fast, consistent ad copy across multiple channels without burning their copywriters out.

Using a mix of public documentation patterns and synthetic campaign data, this project demonstrates how an AI copywriting API can reliably generate platform-specific variants while staying grounded in product and brand context.

02

The Challenge

Marketing and advertising SaaS products that serve agencies or performance marketing teams typically sit in the middle of a growing bottleneck: they make launching campaigns easier, but the copy still needs to be written. For a 10–30 person agency, it's common to handle dozens of campaigns per week, each requiring multiple variants for Facebook, Instagram, Google Ads, LinkedIn, and email. Copywriters can easily spend several hours per campaign drafting, formatting, and tweaking variations.

SaaS teams like this typically struggle with:

Their users struggle to generate enough high-quality variations to test meaningfully, so they under-test and leave performance on the table.

Copywriting time becomes a hard bottleneck — launching a new campaign is gated by the availability of a few experienced writers.

Product documentation, brand guidelines, and example campaigns live in scattered places, making it difficult to reuse past learning systematically.

This prototype was designed to model what an embedded, API-driven copy assistant could look like inside such a SaaS platform: fast, reliable copy generation with clear quality signals, rather than a generic "chat with your AI" widget.

03

Our Approach

Instead of a monolithic "AI writer," this project focuses on a copy generation API that can be embedded into an existing marketing SaaS workflow. The goal is to offload repetitive drafting work while keeping humans in control of strategy and final approvals.

RAG Architecture

Ingestion

Product descriptions, brand attributes, tone guidelines, and campaign snippets are structured and normalized. In production, these come from the client's CRM, brand docs, and past campaigns; here we used synthetic briefs.

Indexing

Structured context is stored so it can be retrieved by product, client, or campaign. In production, this sits in a vector-augmented store keyed by account and product.

Retrieval

When a request comes in (e.g., "generate Instagram ads for Product X, tone: casual"), the system retrieves relevant product details, tone guidelines, and linked examples.

Generation

The LLM receives a carefully constructed prompt including product data, target platform, requested tone, and constraints, then returns three distinct ad variations, each scored on persuasion effectiveness.

Key Features

Platform-specific formatting

Each variant is shaped for a target channel — Instagram captions with hashtags, Google Ads character-aware structure, email subject lines — so teams don't have to re-edit for every platform.

Persuasion scoring engine

Every variation receives a 0–100 persuasion score based on CTA strength, emotional language, clarity, and use of social proof. Marketers can compare options without guessing.

Confidence and guardrails

The system avoids hallucinating product features. When retrieved context is thin or ambiguous, it falls back to safe phrasing and flags the response as low-confidence for human review.

Logging weak requests

When the system cannot confidently generate strong copy (e.g., missing product positioning), the request is logged so teams can improve their inputs or add missing documentation.

These choices are aimed at reliability and control: the assistant speeds up drafting but remains transparent, auditable, and aligned with the underlying product data and brand constraints.

04

Implementation Details

Backend
Python, FastAPI
Orchestration
LangChain RAG pipeline
Storage
PostgreSQL + pgvector
AI Layer
OpenAI-compatible embeddings & LLM
Interface
REST API + minimal review UI
Evaluation
RAGAS-style metrics + manual review

Chunking & context strategy

  • Product descriptions and brand docs split into semantically coherent sections — value proposition, feature list, objections, tone and style.
  • Only the most relevant sections for a given request are included in the prompt to avoid context overload and keep generations focused.

Retrieval method

  • Vector similarity search pulls the most relevant chunks of product/brand context based on the incoming request (product_id, platform, audience).
  • Simple metadata filters (account, product category, language) ensure we never mix contexts across different brands.

Evaluation & internal testing

  • Manually curated test set of synthetic briefs measured whether generated copy correctly reflected the product description, followed tone guidelines, and included a clear CTA.
  • RAG-style evaluation metrics (faithfulness, answer relevance) were approximated using automated checks plus human spot-review.

The overall design is intentionally straightforward so a client's engineering team can plug it into their stack, monitor it, and iterate on prompts or scoring without dealing with a black box.

05

Results from Internal Testing

These results are from internal tests and synthetic scenarios, not production usage at a real customer. They illustrate behavior and potential, not claimed ROI.

3 variations
per request

in ~10–20 seconds end-to-end, vs. several minutes for a human to draft the same spread

80–85%
first-attempt accuracy

of generated variations accurately reflected the provided product description and tone without needing edits

Scored
persuasion ranking

All responses included a structured persuasion score; higher-scored variants were generally preferred by reviewers

Industry Context (not claims from this prototype)

  • Public benchmarks for AI-assisted marketing workflows report significant reductions in time to first draft, sometimes enabling 3x or more experiments per campaign without increasing headcount.
  • Meaningful improvements in performance metrics (CTR, conversion rate) when teams systematically generate and test more targeted variants, even if AI never fully replaces human review.
06

What This Means for SaaS Teams

For a Head of Support, VP of CX, or CTO at a marketing or adtech SaaS, this prototype illustrates what an embedded copy assistant could look like inside your product — not a separate tool your customers have to learn, but an API and UI surface that sits where they already build campaigns. A production-grade version could help your users:

Generate more high-quality variants per campaign, so they can test ideas faster without adding more copywriters.

Standardize tone and messaging across platforms while still respecting brand and product constraints pulled from your own data.

Reduce the "blank page" problem for less experienced users, turning your product into a partner for campaign strategy rather than just an execution tool.

For a real client, we would:

Plug in your data

Connect to your product catalog, brand guidelines, and example campaigns. Scope retrieval so each customer only sees their own context.

Integrate with your stack

Expose the assistant via your existing API, UI components, or partner integrations so it fits naturally into your campaign builder.

Deploy in your environment

Run the service in your preferred cloud or VPC, aligned with your security and compliance requirements, with full observability.

Building a Marketing SaaS? Let's Talk.

This project is an internal prototype, built on public patterns and synthetic data to show what's realistically possible. If you're building a marketing or customer-facing SaaS and want to explore how a grounded, API-first AI assistant could fit into your product, I'd be happy to walk you through a live demo.

We can start with a small pilot that uses your documentation, product data, and workflows to prove value quickly.