Skip to main content

How Rally's AI Works

A breakdown of the pipeline that finds opportunities, scores them, and generates comments in your voice.

End-to-End Pipeline

1

Ingest

Apify

2

Analyze

Gemini

3

Score

Claude

4

Surface

Claude

Apify
Gemini
Claude
Claude

Each stage enriches data for the next. Video analysis feeds scoring context, scores determine surfacing, and surfaced posts get comment variants generated.

The Pipeline in Detail

1. Ingestion — Apify Scraping
Every 4 hours via background cron

Rally monitors TikTok for posts matching your hashtags, topics, and tracked creators using Apify scrapers. Fresh content (up to 7 days old) is stored with full metadata.

Fields: caption, views, likes, comments, shares, author username/followers, hashtags, thumbnail, video URL, posted timestamp

2. Video Analysis — Gemini 2.0 Flash
Multimodal understanding of video content

Each video is analyzed using Google Gemini's multimodal model — visual content, audio/speech, on-screen text, and mood. Optional: scoring works from caption and metadata alone if Gemini isn't configured.

Output: summary, content_type, mood, key_topics, audio_description, text_on_screen, brand_safety, engagement_hooks, suggested_comment_angles

3. Scoring — Claude Sonnet
Composite confidence score (0-100)

Claude evaluates each video against your brand profile, producing three sub-scores and a composite. When learned preferences exist, Rally uses an enhanced prompt variant.

Scores: relevance (0-100), timing (0-100), reach (0-100)

Threshold: posts < 65 filtered · Concurrency: 3 parallel

4. Comment Generation — Claude Sonnet
3 variants per surfaced post + self-critique

For each surfaced post, Claude generates 3 comment variants with different styles (playful, genuine, curious). A self-critique loop checks quality — regenerating up to 2x if needed.

Input: brand voice/tone/dos/donts, video caption, analysis, scores

Output: 3 comments with style label + reasoning

5. Your Approval
Human-in-the-loop — nothing posts automatically

Rally presents opportunities with full transparency: the post, reasoning, confidence score, timing indicator, and suggested comments. You review, approve or skip, and copy the comment to post manually.

Agent Architecture

Three distinct AI surfaces, each designed for a different interaction mode.

TodayCuration pipeline

Ranked post queue. Runs the full pipeline and presents results for your daily review.

WorkmateAutonomous agent

Background agent on a 15-minute cycle. Generates daily reports, manages approval queue, tracks progress.

AskChat assistant

Conversational AI for on-demand questions — analyze posts, generate scripts, explore trends. Streaming responses with tool calling.

Feedback Loop

Every action you take teaches Rally what matters to your brand.

Approve

Reinforce this post type + voice style

Skip

Deprioritize this topic or creator

Edit

Adjust voice and tone calibration

Regenerate

Quality bar not met — improve generation

Rally uses the last 50 actions to build learned preferences via the curation-analysis-with-feedback prompt variant.

Design Principles

  • Transparent reasoning. Every surfaced post includes scoring breakdown and plain-English reasoning.
  • Your voice, not generic. Comments generated using your tone, style guidelines, example comments, and banned words.
  • Quality over quantity. Only opportunities above a 65% confidence threshold are surfaced.
  • Human-in-the-loop. Nothing posts without your explicit approval. Deliberate design choice.
  • Learning flywheel. Approve/skip/edit actions feed back into scoring via the last 50 actions.
  • Graceful degradation. Gemini and Braintrust are optional. Rally works with just an Anthropic API key.