Browse documentation

AI Services

RankFlow AI — AI Services Documentation Index

Version: 2.0.0

docs/specs/ai/ai-services-index.md
On this page

Version: 2.0.0
Date: 2026-06-16
Scope: All AI/LLM touchpoints, prompt engineering, model routing, evaluation, and personalization
Target Audience: AI Engineers, Backend Engineers, Content Strategists, Prompt Engineers, Product Team
Classification: Internal — Engineering & AI Operations


Document Purpose#

This is the master index for all AI services documentation. RankFlow AI is a heavily AI-dependent platform — every client touchpoint that involves content generation, text processing, or decision-making goes through the LLM layer. This documentation ensures that every AI interaction is:

  1. Routed correctly — the right model for the right task
  2. Personalized — unique brand voice per client, not generic AI output
  3. Evaluated — quality-checked before reaching the customer
  4. Cost-controlled — optimized for margin while maintaining quality
  5. Compliant — medical-safe, legally sound, culturally appropriate
  6. Observable — every generation is logged, measured, and improvable

Documentation Map#

Document File Scope Lines
AI Architecture ai-services-01-architecture.md LLM Gateway, Router, Multi-Model Strategy, Cost Management, Fallback Chain, Circuit Breaker, Provider Integrations ~500
Prompt Engineering ai-services-02-prompts.md Meta Prompt System, Brand Voice Framework, Template System, Variable Schema, Prompt Versioning, A/B Testing ~600
AI Evaluation ai-services-03-evaluation.md Quality Metrics, LLM-as-Judge, Automated Scoring, Human-in-the-Loop, Feedback Loop, Prompt Improvement ~500
Feature Prompts ai-services-04-features.md Per-feature detailed prompt templates with full variable schemas: Landing Page, GBP, Social, Citation, Review, SEO, Report, Blog, Schema, FAQ ~800
Image & Vernacular ai-services-05-image-vernacular.md Image generation strategy (DALL-E, Gemini), Vernacular content (Malayalam, Tamil, Hindi), Translation pipeline, Cultural adaptation ~400
Medical Compliance ai-services-06-compliance.md Safety guardrails, Medical compliance filters, HIPAA considerations, Content approval gates, Banned phrase lists, Disclaimer system ~400

Total: ~3,200 lines across 6 documents


AI Touchpoint Inventory#

From the business flow map, these are all AI touchpoints across the platform:

Onboarding (One-Time)#

# Touchpoint Task Key Model Cost Target
1 Landing Page Hero Section landing_page_hero claude-sonnet ~$0.005
2 Landing Page About Section landing_page_about claude-sonnet ~$0.005
3 Landing Page Services Section landing_page_services claude-haiku ~$0.002
4 Landing Page FAQ Section landing_page_faq claude-haiku ~$0.003
5 Landing Page SEO Articles (3-5) landing_page_article claude-sonnet ~$0.015 each
6 Schema Markup (JSON-LD) schema_markup claude-sonnet ~$0.008
7 Meta Title & Description meta_description gpt-4o-mini ~$0.001
8 Citation Descriptions (30x) citation_description gpt-4o-mini ~$0.002 total
9 First GBP Post gbp_post claude-haiku ~$0.003
10 First Social Posts (1-4 platforms) social_caption gpt-4o-mini ~$0.001 each
11 Welcome Report Action Items report_summary claude-sonnet ~$0.005

Recurring (Daily/Weekly/Monthly)#

# Touchpoint Frequency Task Key Model Cost Target
12 GBP Post Generation 2-3x/week gbp_post claude-haiku ~$0.003
13 Social Post Generation 2-4x/week social_caption gpt-4o-mini ~$0.001
14 Review Reply Generation Daily review_reply claude-haiku ~$0.002
15 Review Sentiment Analysis Daily sentiment_analysis gpt-4o-mini ~$0.001
16 Hashtag Generation Per post hashtag_generation gpt-4o-mini ~$0.001
17 Image Prompt Generation Per post image_prompt claude-haiku ~$0.002
18 Content Refresh / Rewrite Monthly content_refresh claude-sonnet ~$0.010
19 Site Evolution Weekly site_evolution claude-sonnet ~$0.008
20 Blog Post Generation 2-3x/week blog_post claude-sonnet ~$0.012
21 Monthly Report Action Items Monthly report_summary claude-sonnet ~$0.005
22 SEO Audit Monthly seo_audit claude-sonnet ~$0.008
23 Keyword Research Monthly keyword_research gpt-4o ~$0.005
24 Alt Text Generation On image upload alt_text gpt-4o-mini ~$0.001
25 NAP Check Summary Monthly nap_summary claude-haiku ~$0.002
26 Weekly Digest Content Weekly digest_summary claude-haiku ~$0.002
27 Vernacular Translation Quarterly translation claude-sonnet ~$0.008
28 Cross-Platform Adaptation Per post platform_adapt gpt-4o-mini ~$0.001
29 AI Engine Optimization Monthly aeo_content claude-sonnet ~$0.010
30 FAQ Update Monthly faq_update claude-haiku ~$0.003

Ad-Hoc / On-Demand#

# Touchpoint Task Key Model Cost Target
31 Content Edit (AI Assist) content_edit claude-sonnet ~$0.005
32 Landing Page Section Regenerate section_regenerate claude-sonnet ~$0.005
33 Citation Resubmit Description citation_description gpt-4o-mini ~$0.001
34 Custom Report Summary report_summary claude-sonnet ~$0.005
35 Customer Support Auto-Reply Draft support_reply claude-haiku ~$0.002
36 Lead Follow-up Email Draft lead_email claude-haiku ~$0.003
37 A/B Test Variant Generation ab_variant claude-sonnet ~$0.008
38 Landing Page Template Copy template_copy claude-sonnet ~$0.010
39 Cancellation Save Offer Text save_offer claude-haiku ~$0.002
40 Trial Upgrade Email upgrade_email claude-haiku ~$0.003

Total AI Cost Budget per Client per Month#

Plan Client Count Monthly AI Cost ARPU AI Cost %
Starter 1 ~$0.50 $48 ~1.0%
Growth 3 ~$1.80 $144 ~1.3%
Pro 10 ~$5.50 $480 ~1.1%
System-wide @ 100 clients 100 ~$200 ~$9,500 ~2.1%
System-wide @ 500 clients 500 ~$850 ~$47,500 ~1.8%
System-wide @ 1000 clients 1000 ~$1,500 ~$95,000 ~1.6%

Key Principles#

  1. Every client gets a unique voice — No generic AI output. Every generation is personalized via the Meta Prompt System.
  2. Model selection is cost-aware — Complex tasks get expensive models; bulk tasks get cheap models. Per-generation cost is logged and alertable.
  3. Quality is measured, not assumed — Every generation gets an automated quality score. Low scores trigger regeneration or human review.
  4. Medical compliance is non-negotiable — All content passes through a compliance filter before reaching the customer. Banned phrases are blocked at the prompt level.
  5. Prompts are versioned and A/B tested — Prompt templates live in the database, versioned, and continuously improved via A/B testing.
  6. Fallbacks are automatic — If a model fails, the system automatically retries with a fallback model. If all fail, the job is queued for human intervention.
  7. Vernacular is first-class — Malayalam, Tamil, and Hindi content is not an afterthought. It's generated with native speaker quality via model selection and cultural context.

Last updated: 2026-06-16. All 40 AI touchpoints documented across 6 specification files.