F013 - Genre-Specific AI Analysis
Objective
Define genre-specific analysis strategies and prompting techniques that tailor manuscript evaluation to the unique conventions, expectations, and standards of different literary genres.
Genre Analysis Framework
1. Genre-Specific Weighting System
// Different genres prioritize different aspects of storytelling
const GENRE_ANALYSIS_WEIGHTS = {
romance: {
character_development: 0.25, // Higher weight for relationship development
dialogue: 0.20, // Important for romantic tension
pacing: 0.15, // Building romantic tension
plot_structure: 0.15, // Relationship arc structure
strong_writing: 0.10,
pov_consistency: 0.10,
world_building: 0.05 // Less critical unless paranormal/fantasy romance
},
mystery: {
plot_structure: 0.30, // Critical for mystery logic
pacing: 0.20, // Suspense building
character_development: 0.15,
dialogue: 0.15, // Clue revelation through conversation
strong_writing: 0.10,
pov_consistency: 0.05,
world_building: 0.05
},
fantasy: {
world_building: 0.25, // Critical for fantasy
character_development: 0.20,
plot_structure: 0.20,
strong_writing: 0.15,
pacing: 0.10,
dialogue: 0.05,
pov_consistency: 0.05
},
literary_fiction: {
character_development: 0.30, // Character-driven stories
strong_writing: 0.25, // Prose quality crucial
dialogue: 0.15,
plot_structure: 0.10, // Less emphasis on traditional structure
pacing: 0.10,
world_building: 0.05,
pov_consistency: 0.05
},
young_adult: {
character_development: 0.25, // Coming-of-age themes
dialogue: 0.20, // Authentic teen voice
pacing: 0.20, // Keep teen readers engaged
plot_structure: 0.15,
strong_writing: 0.10,
world_building: 0.05,
pov_consistency: 0.05
}
};2. Romance Genre Analysis
const ROMANCE_ANALYSIS_PROMPT = `
You are a romance genre specialist analyzing this manuscript for romance-specific elements.
ROMANCE GENRE REQUIREMENTS:
1. RELATIONSHIP ARC DEVELOPMENT:
- Meet-cute or first encounter effectiveness
- Romantic tension building throughout story
- Conflict that keeps characters apart (believable obstacles)
- Character growth through the relationship
- Satisfying romantic resolution (HEA or HFN)
2. EMOTIONAL BEATS ANALYSIS:
- First attraction/awareness moment
- Building romantic tension through obstacles
- Dark moment/crisis point in relationship
- Grand gesture or realization moment
- Romantic climax and resolution
3. CHARACTER CHEMISTRY EVALUATION:
- Sexual/romantic tension between leads
- Emotional connection development
- Believable reasons for attraction
- Complementary character growth
- Dialogue that shows romantic interest
4. GENRE CONVENTION COMPLIANCE:
- Appropriate heat level for subgenre
- Romance as central plot (not subplot)
- Both characters have agency in relationship
- Relationship obstacles feel authentic
- Satisfying romantic payoff
5. SUBGENRE SPECIFIC ELEMENTS:
- Contemporary: Modern issues, realistic settings
- Historical: Period-appropriate details, research accuracy
- Paranormal: Fantasy elements integrated with romance
- Romantic Suspense: Mystery/danger enhances romance
MANUSCRIPT CONTENT: ${content}
REQUIRED JSON OUTPUT:
{
"romance_overall_score": number (0-100),
"relationship_arc": {
"score": number (0-100),
"meet_cute_effectiveness": number (0-100),
"tension_building": number (0-100),
"conflict_believability": number (0-100),
"resolution_satisfaction": number (0-100),
"arc_completeness": number (0-100)
},
"emotional_beats": {
"score": number (0-100),
"first_attraction": "present|weak|missing",
"tension_moments": ["example 1", "example 2"],
"dark_moment": "present|weak|missing",
"climax_effectiveness": number (0-100)
},
"character_chemistry": {
"score": number (0-100),
"sexual_tension": number (0-100),
"emotional_connection": number (0-100),
"dialogue_chemistry": number (0-100),
"mutual_growth": number (0-100)
},
"genre_compliance": {
"score": number (0-100),
"heat_level_appropriate": boolean,
"romance_central": boolean,
"both_characters_active": boolean,
"subgenre_elements": ["element 1", "element 2"]
},
"romance_specific_suggestions": [
"specific romance improvement 1",
"specific romance improvement 2"
]
}
`;3. Mystery/Thriller Genre Analysis
const MYSTERY_ANALYSIS_PROMPT = `
You are a mystery/thriller specialist analyzing this manuscript for genre-specific elements.
MYSTERY GENRE REQUIREMENTS:
1. MYSTERY STRUCTURE ANALYSIS:
- Crime/mystery setup in first act
- Clue distribution throughout story
- Red herrings that mislead without frustrating
- Fair play - reader can solve with given info
- Logical, satisfying solution
2. INVESTIGATIVE PROCESS EVALUATION:
- Believable detective/protagonist skills
- Logical investigation progression
- Realistic obstacles and setbacks
- Evidence discovery pacing
- Interview/interrogation scenes
3. SUSPENSE AND TENSION BUILDING:
- Escalating danger or stakes
- Plot twists that surprise but feel inevitable
- Chapter ending hooks
- Pacing that maintains reader interest
- Atmosphere and mood appropriate to subgenre
4. CLUE MANAGEMENT:
- Important clues presented fairly to reader
- Red herrings that don't feel cheating
- Evidence that logically leads to solution
- No information withheld unfairly from reader
- Clues integrated naturally into story
5. SUBGENRE ELEMENTS:
- Police Procedural: Realistic police work
- Cozy Mystery: Amateur sleuth, low violence
- Hard-boiled: Cynical tone, urban setting
- Psychological Thriller: Mind games, unreliable narrators
MANUSCRIPT CONTENT: ${content}
REQUIRED JSON OUTPUT:
{
"mystery_overall_score": number (0-100),
"mystery_structure": {
"score": number (0-100),
"setup_effectiveness": number (0-100),
"clue_distribution": number (0-100),
"red_herring_quality": number (0-100),
"solution_logic": number (0-100),
"fair_play_compliance": boolean
},
"investigation_process": {
"score": number (0-100),
"protagonist_credibility": number (0-100),
"investigation_logic": number (0-100),
"obstacle_realism": number (0-100),
"pacing_appropriate": number (0-100)
},
"suspense_tension": {
"score": number (0-100),
"escalating_stakes": number (0-100),
"plot_twist_effectiveness": number (0-100),
"chapter_hooks": number (0-100),
"atmosphere_quality": number (0-100)
},
"clue_management": {
"score": number (0-100),
"clue_fairness": number (0-100),
"red_herring_fairness": number (0-100),
"evidence_logic": number (0-100),
"information_withholding": ["unfair instance 1"]
},
"mystery_specific_suggestions": [
"specific mystery improvement 1",
"specific mystery improvement 2"
]
}
`;4. Fantasy Genre Analysis
const FANTASY_ANALYSIS_PROMPT = `
You are a fantasy genre specialist analyzing this manuscript for fantasy-specific elements.
FANTASY GENRE REQUIREMENTS:
1. WORLD-BUILDING EVALUATION:
- Consistent magic system with clear rules
- Believable fantasy cultures and societies
- Geography that makes logical sense
- History and mythology that supports the story
- Original elements balanced with familiar tropes
2. MAGIC SYSTEM ANALYSIS:
- Clear rules for how magic works
- Limitations and costs of magic use
- Consistent application throughout story
- Magic integrated into plot and character development
- Avoids deus ex machina solutions
3. FANTASY ELEMENTS INTEGRATION:
- Mythical creatures with consistent traits
- Fantasy races with distinct cultures
- Original fantasy concepts
- Balance of explanation vs. mystery
- Elements serve story rather than just decoration
4. CHARACTER DEVELOPMENT IN FANTASY CONTEXT:
- Character growth through fantasy challenges
- Powers/abilities develop realistically
- Characters adapt to fantasy world logically
- Relationships affected by fantasy elements
- Coming-of-age themes if applicable
5. SUBGENRE COMPLIANCE:
- Epic Fantasy: Grand scope, world-changing events
- Urban Fantasy: Modern world with fantasy elements
- Dark Fantasy: Horror elements, mature themes
- High Fantasy: Secondary world, medieval-esque
- Portal Fantasy: Character enters fantasy world
MANUSCRIPT CONTENT: ${content}
REQUIRED JSON OUTPUT:
{
"fantasy_overall_score": number (0-100),
"world_building": {
"score": number (0-100),
"magic_system_consistency": number (0-100),
"cultural_development": number (0-100),
"geography_logic": number (0-100),
"originality_balance": number (0-100),
"world_integration": number (0-100)
},
"magic_system": {
"score": number (0-100),
"rule_clarity": number (0-100),
"limitation_presence": number (0-100),
"consistency": number (0-100),
"plot_integration": number (0-100),
"deus_ex_machina_avoidance": number (0-100)
},
"fantasy_elements": {
"score": number (0-100),
"creature_consistency": number (0-100),
"race_distinction": number (0-100),
"concept_originality": number (0-100),
"explanation_balance": number (0-100)
},
"character_fantasy_integration": {
"score": number (0-100),
"growth_through_fantasy": number (0-100),
"power_development": number (0-100),
"world_adaptation": number (0-100)
},
"fantasy_specific_suggestions": [
"specific fantasy improvement 1",
"specific fantasy improvement 2"
]
}
`;5. Literary Fiction Analysis
const LITERARY_FICTION_PROMPT = `
You are a literary fiction specialist analyzing this manuscript for literary merit and artistic elements.
LITERARY FICTION REQUIREMENTS:
1. CHARACTER DEPTH AND COMPLEXITY:
- Psychologically realistic characters
- Internal character development over external plot
- Moral ambiguity and human complexity
- Character-driven rather than plot-driven narrative
- Authentic human emotions and motivations
2. PROSE QUALITY AND STYLE:
- Distinctive author voice
- Lyrical or sophisticated language use
- Metaphor and symbolism usage
- Sentence variety and rhythm
- Show don't tell mastery
3. THEMATIC DEPTH:
- Universal themes explored meaningfully
- Subtlety in theme presentation
- Multiple layers of meaning
- Social/philosophical commentary if present
- Emotional resonance and lasting impact
4. NARRATIVE TECHNIQUE:
- Innovative or masterful storytelling approaches
- Effective use of literary devices
- Stream of consciousness if used
- Time structure experimentation if present
- Point of view serving artistic purpose
5. LITERARY MERIT ASSESSMENT:
- Contribution to literary conversation
- Artistic achievement over commercial appeal
- Intellectual and emotional engagement
- Originality of voice and perspective
- Craftsmanship in execution
MANUSCRIPT CONTENT: ${content}
REQUIRED JSON OUTPUT:
{
"literary_overall_score": number (0-100),
"character_depth": {
"score": number (0-100),
"psychological_realism": number (0-100),
"internal_development": number (0-100),
"moral_complexity": number (0-100),
"emotional_authenticity": number (0-100)
},
"prose_quality": {
"score": number (0-100),
"voice_distinctiveness": number (0-100),
"language_sophistication": number (0-100),
"metaphor_symbolism": number (0-100),
"sentence_craft": number (0-100)
},
"thematic_depth": {
"score": number (0-100),
"theme_universality": number (0-100),
"subtlety": number (0-100),
"meaning_layers": number (0-100),
"emotional_resonance": number (0-100)
},
"narrative_technique": {
"score": number (0-100),
"storytelling_innovation": number (0-100),
"literary_device_mastery": number (0-100),
"structure_effectiveness": number (0-100)
},
"literary_merit": {
"score": number (0-100),
"artistic_achievement": number (0-100),
"intellectual_engagement": number (0-100),
"voice_originality": number (0-100),
"craftsmanship": number (0-100)
},
"literary_specific_suggestions": [
"specific literary improvement 1",
"specific literary improvement 2"
]
}
`;6. Young Adult Genre Analysis
const YA_ANALYSIS_PROMPT = `
You are a young adult fiction specialist analyzing this manuscript for YA-specific elements.
YOUNG ADULT REQUIREMENTS:
1. AUTHENTIC TEEN VOICE:
- Age-appropriate vocabulary and speech patterns
- Realistic teen concerns and priorities
- Contemporary references teens would understand
- Emotional authenticity for teenage experience
- Avoids talking down to teen readers
2. COMING-OF-AGE THEMES:
- Identity discovery and self-acceptance
- Independence vs. family relationships
- First love or romantic relationships
- Friendship dynamics and loyalty
- Moral/ethical decision making
3. PLOT AND PACING FOR TEEN READERS:
- Fast-paced opening to hook teen readers
- Conflicts relevant to teen experience
- Stakes that matter to teenage protagonist
- Resolution that shows character growth
- Length appropriate for YA (typically 50k-80k words)
4. CONTENT APPROPRIATENESS:
- Mature themes handled age-appropriately
- Language appropriate for teen audience
- Violence/sexual content within YA boundaries
- Issues teens face: school, family, identity, future
- Positive messages without being preachy
5. CHARACTER DEVELOPMENT:
- Protagonist between 14-18 years old
- Realistic teen behavior and decision-making
- Growth arc appropriate to adolescent development
- Supporting teen characters feel authentic
- Adult characters in appropriate roles
MANUSCRIPT CONTENT: ${content}
REQUIRED JSON OUTPUT:
{
"ya_overall_score": number (0-100),
"teen_voice_authenticity": {
"score": number (0-100),
"vocabulary_appropriateness": number (0-100),
"concern_relevance": number (0-100),
"contemporary_references": number (0-100),
"emotional_authenticity": number (0-100)
},
"coming_of_age_themes": {
"score": number (0-100),
"identity_exploration": number (0-100),
"independence_themes": number (0-100),
"relationship_development": number (0-100),
"moral_growth": number (0-100)
},
"teen_appropriate_pacing": {
"score": number (0-100),
"opening_hook_strength": number (0-100),
"conflict_relevance": number (0-100),
"stakes_importance": number (0-100),
"length_appropriateness": number (0-100)
},
"content_appropriateness": {
"score": number (0-100),
"mature_theme_handling": number (0-100),
"language_appropriateness": number (0-100),
"content_boundaries": number (0-100),
"positive_messaging": number (0-100)
},
"ya_specific_suggestions": [
"specific YA improvement 1",
"specific YA improvement 2"
]
}
`;7. Genre Detection and Selection
class GenreAnalysisSelector {
async detectAndAnalyze(content: string): Promise<GenreSpecificAnalysis> {
// First, detect the primary genre
const genreDetection = await this.detectGenre(content);
// Select appropriate analysis based on genre
const analysisStrategy = this.selectAnalysisStrategy(genreDetection.primaryGenre);
// Run genre-specific analysis
const genreAnalysis = await this.runGenreAnalysis(content, analysisStrategy);
// Combine with general analysis
return {
detectedGenre: genreDetection,
genreSpecificAnalysis: genreAnalysis,
weights: GENRE_ANALYSIS_WEIGHTS[genreDetection.primaryGenre] || GENRE_ANALYSIS_WEIGHTS.literary_fiction,
confidence: genreDetection.confidence
};
}
private async detectGenre(content: string): Promise<GenreDetection> {
const genrePrompt = `
Analyze this manuscript excerpt and identify the primary genre.
Consider these factors:
- Story elements (magic, crime, romance, etc.)
- Setting (contemporary, historical, fantasy world)
- Protagonist age and concerns
- Plot structure and conflicts
- Writing style and tone
- Target audience
CONTENT: ${content.substring(0, 3000)}
Return JSON:
{
"primary_genre": "romance|mystery|fantasy|literary_fiction|young_adult|thriller|historical_fiction|science_fiction|contemporary_fiction",
"secondary_genres": ["genre1", "genre2"],
"confidence": number (0-100),
"reasoning": "explanation of genre classification",
"subgenre": "specific subgenre if applicable"
}
`;
const response = await this.aiService.analyze(genrePrompt);
return JSON.parse(response.content);
}
private selectAnalysisStrategy(genre: string): AnalysisStrategy {
const strategies = {
romance: ROMANCE_ANALYSIS_PROMPT,
mystery: MYSTERY_ANALYSIS_PROMPT,
fantasy: FANTASY_ANALYSIS_PROMPT,
literary_fiction: LITERARY_FICTION_PROMPT,
young_adult: YA_ANALYSIS_PROMPT,
// Add more as needed
};
return strategies[genre] || strategies.literary_fiction;
}
}8. Genre-Specific Market Insights
class GenreMarketAnalyzer {
generateGenreMarketInsights(genre: string, analysis: GenreSpecificAnalysis): MarketInsights {
const genreInsights = {
romance: {
marketSize: 'Large ($1.4B annually)',
targetDemographic: 'Primarily women, ages 25-55',
popularSubgenres: ['Contemporary Romance', 'Historical Romance', 'Paranormal Romance'],
keySuccessFactors: ['Strong romantic tension', 'Satisfying HEA', 'Emotional engagement'],
typicalLength: '50,000-90,000 words',
publishingTrends: 'Self-publishing dominant, series preferred'
},
mystery: {
marketSize: 'Medium-Large ($728M annually)',
targetDemographic: 'Mixed gender, ages 35-65',
popularSubgenres: ['Cozy Mystery', 'Police Procedural', 'Psychological Thriller'],
keySuccessFactors: ['Fair play cluing', 'Engaging detective', 'Surprising but logical solution'],
typicalLength: '70,000-90,000 words',
publishingTrends: 'Traditional publishing strong, series essential'
},
fantasy: {
marketSize: 'Large ($590M annually)',
targetDemographic: 'Mixed gender, ages 16-45',
popularSubgenres: ['Epic Fantasy', 'Urban Fantasy', 'Romantasy'],
keySuccessFactors: ['Compelling magic system', 'Rich world-building', 'Character growth'],
typicalLength: '80,000-120,000 words',
publishingTrends: 'Both traditional and self-publishing viable'
}
// Add more genres...
};
return genreInsights[genre] || genreInsights.literary_fiction;
}
}This genre-specific analysis framework ensures that manuscripts are evaluated against the appropriate standards and expectations for their genre, providing more accurate and relevant feedback than generic analysis approaches.