Skip to main content
All templates

Two ways to use this template

Use with your coding agent
  1. 1. Click "Copy prompt" below
  2. 2. Paste into Cursor, Claude Code, Codex, or any coding agent
  3. 3. Your agent builds the app — it asks questions along the way so the result is exactly what you want
or
Read step-by-step

Follow the steps below to set things up manually, at your own pace.

Content Moderator

Internal content moderation tool with per-channel guidelines, AI-powered compliance scoring via Model Serving, and a moderator review workflow backed by Lakebase and Genie analytics.

Content Moderator preview

Includes a working starter app

Real, runnable code lives on GitHub. When you copy the prompt above, your coding agent clones it as the starting point and adapts it to your data and use case.

examples/content-moderator/template/
View on GitHub

Content Moderator

This template demonstrates an internal content moderation tool built on Databricks: authors submit content for different channels (company blog, LinkedIn, Twitter, newsletter, press releases), moderators maintain per-channel guidelines, and an LLM scores each submission against those guidelines before a human reviewer makes the final call.

Data Flow

Content moves through a review pipeline backed by Lakebase and AI Gateway:

  1. Authors submit content to Lakebase Postgres, specifying a title, body, and content target (blog, LinkedIn, etc.).
  2. AI scoring triggers automatically. The server fetches active guidelines for the content target, sends the content plus guidelines to a Model Serving endpoint via AI Gateway, and stores the compliance score (0-100), flagged issues, and improvement suggestions.
  3. Moderators review from a queue that shows AI scores alongside each submission. They approve, reject, or request revisions with feedback.
  4. Guidelines management lets moderators create and update rules per content target. When guidelines change, moderators can re-analyze existing submissions.
  5. SQL Warehouse queries power the analytics dashboard (submission counts, approval rates, average compliance scores by target).
  6. A Genie Space over the content moderation tables enables natural language questions about content performance.

What to Adapt

Setup and provisioning are documented in the repository’s template/README.md.

To make this template your own:

  • Lakebase: Point the app's databricks.yml at your own Lakebase project, branch, and database.
  • SQL Warehouse: Set the warehouse ID for the analytics queries.
  • Serving Endpoint: Set the model serving endpoint name for AI content analysis (e.g. databricks-claude-sonnet-4). AI scoring is optional; the app works without it.
  • Genie Space: Create a Genie space over the content_moderation tables and set the space ID.
  • Content Targets: Adjust the target list in the server routes and client utils to match your organization's content channels.
  • Guidelines: Replace the seed guidelines with your organization's actual content policies.
  • Seed Data: The seed script creates 7 guidelines, 10 sample submissions, and 5 reviews. Replace with your own data or use the app's Submit form.

Built on these templates

This example's codebase and the agent prompt above both build on top of the templates below. Open one to dive into a specific technique on its own or apply it to a different project.

Template
App with Lakebase

Wire up a Databricks App with Lakebase for persistent data storage. Includes schema setup and full CRUD API routes.

Template
Genie Conversational Analytics

Embed a Databricks AI/BI Genie chat interface so users can explore data through natural language. Configure a Genie space, wire up server and client plugins, declare app resources, and deploy.

Template
Query AI Gateway Endpoints

Query AI Gateway endpoints for production-ready access to foundation models with built-in governance.