Alwrity technical documentation
This commit is contained in:
1519
docs-site/docs/features/blog-writer/api-reference.md
Normal file
1519
docs-site/docs/features/blog-writer/api-reference.md
Normal file
File diff suppressed because it is too large
Load Diff
442
docs-site/docs/features/blog-writer/implementation-overview.md
Normal file
442
docs-site/docs/features/blog-writer/implementation-overview.md
Normal file
@@ -0,0 +1,442 @@
|
||||
# Blog Writer Implementation Overview
|
||||
|
||||
The ALwrity Blog Writer is a comprehensive AI-powered content creation system that transforms research into high-quality, SEO-optimized blog posts through a sophisticated multi-phase workflow.
|
||||
|
||||
## 🏗️ Architecture Overview
|
||||
|
||||
The Blog Writer follows a modular, service-oriented architecture with clear separation of concerns:
|
||||
|
||||
```mermaid
|
||||
graph TB
|
||||
A[Blog Writer API Router] --> B[Task Manager]
|
||||
A --> C[Cache Manager]
|
||||
A --> D[Blog Writer Service]
|
||||
|
||||
D --> E[Research Service]
|
||||
D --> F[Outline Service]
|
||||
D --> G[Content Generator]
|
||||
D --> H[SEO Analyzer]
|
||||
D --> I[Quality Assurance]
|
||||
|
||||
E --> J[Google Search Grounding]
|
||||
E --> K[Research Cache]
|
||||
|
||||
F --> L[Outline Cache]
|
||||
F --> M[AI Outline Generation]
|
||||
|
||||
G --> N[Enhanced Content Generator]
|
||||
G --> O[Medium Blog Generator]
|
||||
G --> P[Blog Rewriter]
|
||||
|
||||
H --> Q[SEO Analysis Engine]
|
||||
H --> R[Metadata Generator]
|
||||
|
||||
I --> S[Hallucination Detection]
|
||||
I --> T[Content Optimization]
|
||||
|
||||
style A fill:#e1f5fe
|
||||
style D fill:#f3e5f5
|
||||
style E fill:#e8f5e8
|
||||
style F fill:#fff3e0
|
||||
style G fill:#fce4ec
|
||||
style H fill:#f1f8e9
|
||||
style I fill:#e0f2f1
|
||||
```
|
||||
|
||||
## 📋 Core Components
|
||||
|
||||
### 1. **API Router** (`router.py`)
|
||||
- **Purpose**: Main entry point for all Blog Writer operations
|
||||
- **Key Features**:
|
||||
- RESTful API endpoints for all blog writing phases
|
||||
- Background task management with polling
|
||||
- Comprehensive error handling and logging
|
||||
- Cache management endpoints
|
||||
|
||||
### 2. **Task Manager** (`task_manager.py`)
|
||||
- **Purpose**: Manages background operations and progress tracking
|
||||
- **Key Features**:
|
||||
- Asynchronous task execution
|
||||
- Real-time progress updates
|
||||
- Task status tracking and cleanup
|
||||
- Memory management (1-hour task retention)
|
||||
|
||||
### 3. **Cache Manager** (`cache_manager.py`)
|
||||
- **Purpose**: Handles research and outline caching for performance
|
||||
- **Key Features**:
|
||||
- Research cache statistics and management
|
||||
- Outline cache operations
|
||||
- Cache invalidation and clearing
|
||||
- Performance optimization
|
||||
|
||||
### 4. **Blog Writer Service** (`blog_writer_service.py`)
|
||||
- **Purpose**: Main orchestrator coordinating all blog writing operations
|
||||
- **Key Features**:
|
||||
- Service coordination and workflow management
|
||||
- Integration with specialized services
|
||||
- Progress tracking and error handling
|
||||
- Task management integration
|
||||
|
||||
## 🔄 Blog Writing Workflow
|
||||
|
||||
The Blog Writer implements a sophisticated 6-phase workflow:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start([User Input: Keywords & Topic]) --> Phase1[Phase 1: Research & Discovery]
|
||||
|
||||
Phase1 --> P1A[Keyword Analysis]
|
||||
Phase1 --> P1B[Google Search Grounding]
|
||||
Phase1 --> P1C[Source Collection]
|
||||
Phase1 --> P1D[Competitor Analysis]
|
||||
Phase1 --> P1E[Research Caching]
|
||||
|
||||
P1A --> Phase2[Phase 2: Outline Generation]
|
||||
P1B --> Phase2
|
||||
P1C --> Phase2
|
||||
P1D --> Phase2
|
||||
P1E --> Phase2
|
||||
|
||||
Phase2 --> P2A[Content Structure Planning]
|
||||
Phase2 --> P2B[Section Definition]
|
||||
Phase2 --> P2C[Source Mapping]
|
||||
Phase2 --> P2D[Word Count Distribution]
|
||||
Phase2 --> P2E[Title Generation]
|
||||
|
||||
P2A --> Phase3[Phase 3: Content Generation]
|
||||
P2B --> Phase3
|
||||
P2C --> Phase3
|
||||
P2D --> Phase3
|
||||
P2E --> Phase3
|
||||
|
||||
Phase3 --> P3A[Section-by-Section Writing]
|
||||
Phase3 --> P3B[Citation Integration]
|
||||
Phase3 --> P3C[Continuity Maintenance]
|
||||
Phase3 --> P3D[Quality Assurance]
|
||||
|
||||
P3A --> Phase4[Phase 4: SEO Analysis]
|
||||
P3B --> Phase4
|
||||
P3C --> Phase4
|
||||
P3D --> Phase4
|
||||
|
||||
Phase4 --> P4A[Content Structure Analysis]
|
||||
Phase4 --> P4B[Keyword Optimization]
|
||||
Phase4 --> P4C[Readability Assessment]
|
||||
Phase4 --> P4D[SEO Scoring]
|
||||
Phase4 --> P4E[Recommendation Generation]
|
||||
|
||||
P4A --> Phase5[Phase 5: Quality Assurance]
|
||||
P4B --> Phase5
|
||||
P4C --> Phase5
|
||||
P4D --> Phase5
|
||||
P4E --> Phase5
|
||||
|
||||
Phase5 --> P5A[Fact Verification]
|
||||
Phase5 --> P5B[Hallucination Detection]
|
||||
Phase5 --> P5C[Content Validation]
|
||||
Phase5 --> P5D[Quality Scoring]
|
||||
|
||||
P5A --> Phase6[Phase 6: Publishing]
|
||||
P5B --> Phase6
|
||||
P5C --> Phase6
|
||||
P5D --> Phase6
|
||||
|
||||
Phase6 --> P6A[Platform Integration]
|
||||
Phase6 --> P6B[Metadata Generation]
|
||||
Phase6 --> P6C[Content Formatting]
|
||||
Phase6 --> P6D[Scheduling]
|
||||
|
||||
P6A --> End([Published Blog Post])
|
||||
P6B --> End
|
||||
P6C --> End
|
||||
P6D --> End
|
||||
|
||||
style Start fill:#e3f2fd
|
||||
style Phase1 fill:#e8f5e8
|
||||
style Phase2 fill:#fff3e0
|
||||
style Phase3 fill:#fce4ec
|
||||
style Phase4 fill:#f1f8e9
|
||||
style Phase5 fill:#e0f2f1
|
||||
style Phase6 fill:#f3e5f5
|
||||
style End fill:#e1f5fe
|
||||
```
|
||||
|
||||
### Phase 1: Research & Discovery
|
||||
**Endpoint**: `POST /api/blog/research/start`
|
||||
|
||||
**Process**:
|
||||
1. **Keyword Analysis**: Analyze provided keywords for search intent
|
||||
2. **Google Search Grounding**: Leverage Google's search capabilities for real-time data
|
||||
3. **Source Collection**: Gather credible sources and research materials
|
||||
4. **Competitor Analysis**: Analyze competing content and identify gaps
|
||||
5. **Research Caching**: Store research results for future use
|
||||
|
||||
**Key Features**:
|
||||
- Real-time web search integration
|
||||
- Source credibility scoring
|
||||
- Research data caching
|
||||
- Progress tracking with detailed messages
|
||||
|
||||
### Phase 2: Outline Generation
|
||||
**Endpoint**: `POST /api/blog/outline/start`
|
||||
|
||||
**Process**:
|
||||
1. **Content Structure Planning**: Create logical content flow
|
||||
2. **Section Definition**: Define headings, subheadings, and key points
|
||||
3. **Source Mapping**: Map research sources to specific sections
|
||||
4. **Word Count Distribution**: Optimize word count across sections
|
||||
5. **Title Generation**: Create multiple compelling title options
|
||||
|
||||
**Key Features**:
|
||||
- AI-powered outline generation
|
||||
- Source-to-section mapping
|
||||
- Multiple title options
|
||||
- Outline optimization and refinement
|
||||
|
||||
### Phase 3: Content Generation
|
||||
**Endpoint**: `POST /api/blog/section/generate`
|
||||
|
||||
**Process**:
|
||||
1. **Section-by-Section Writing**: Generate content for each outline section
|
||||
2. **Citation Integration**: Automatically include source citations
|
||||
3. **Continuity Maintenance**: Ensure content flow and consistency
|
||||
4. **Quality Assurance**: Implement quality checks during generation
|
||||
|
||||
**Key Features**:
|
||||
- Individual section generation
|
||||
- Automatic citation integration
|
||||
- Content continuity tracking
|
||||
- Multiple generation modes (draft/polished)
|
||||
|
||||
### Phase 4: SEO Analysis & Optimization
|
||||
**Endpoint**: `POST /api/blog/seo/analyze`
|
||||
|
||||
**Process**:
|
||||
1. **Content Structure Analysis**: Evaluate heading structure and organization
|
||||
2. **Keyword Optimization**: Analyze keyword density and placement
|
||||
3. **Readability Assessment**: Check content readability and flow
|
||||
4. **SEO Scoring**: Generate comprehensive SEO scores
|
||||
5. **Recommendation Generation**: Provide actionable optimization suggestions
|
||||
|
||||
**Key Features**:
|
||||
- Comprehensive SEO analysis
|
||||
- Real-time progress updates
|
||||
- Detailed scoring and recommendations
|
||||
- Visualization data for UI integration
|
||||
|
||||
### Phase 5: Quality Assurance
|
||||
**Endpoint**: `POST /api/blog/quality/hallucination-check`
|
||||
|
||||
**Process**:
|
||||
1. **Fact Verification**: Check content against research sources
|
||||
2. **Hallucination Detection**: Identify potential AI-generated inaccuracies
|
||||
3. **Content Validation**: Ensure factual accuracy and credibility
|
||||
4. **Quality Scoring**: Generate content quality metrics
|
||||
|
||||
**Key Features**:
|
||||
- AI-powered fact-checking
|
||||
- Source verification
|
||||
- Quality scoring and metrics
|
||||
- Improvement suggestions
|
||||
|
||||
### Phase 6: Publishing & Distribution
|
||||
**Endpoint**: `POST /api/blog/publish`
|
||||
|
||||
**Process**:
|
||||
1. **Platform Integration**: Support for WordPress and Wix
|
||||
2. **Metadata Generation**: Create SEO metadata and social tags
|
||||
3. **Content Formatting**: Format content for target platform
|
||||
4. **Scheduling**: Support for scheduled publishing
|
||||
|
||||
**Key Features**:
|
||||
- Multi-platform publishing
|
||||
- SEO metadata generation
|
||||
- Social media optimization
|
||||
- Publishing scheduling
|
||||
|
||||
## 🚀 Advanced Features
|
||||
|
||||
### Medium Blog Generation
|
||||
**Endpoint**: `POST /api/blog/generate/medium/start`
|
||||
|
||||
A streamlined approach for shorter content (≤1000 words):
|
||||
- Single-pass content generation
|
||||
- Optimized for quick turnaround
|
||||
- Cached content reuse
|
||||
- Simplified workflow
|
||||
|
||||
### Content Optimization
|
||||
**Endpoint**: `POST /api/blog/section/optimize`
|
||||
|
||||
Advanced content improvement:
|
||||
- AI-powered content enhancement
|
||||
- Flow analysis and improvement
|
||||
- Engagement optimization
|
||||
- Performance tracking
|
||||
|
||||
### Blog Rewriting
|
||||
**Endpoint**: `POST /api/blog/rewrite/start`
|
||||
|
||||
Content improvement based on feedback:
|
||||
- User feedback integration
|
||||
- Iterative content improvement
|
||||
- Quality enhancement
|
||||
- Version tracking
|
||||
|
||||
## 📊 Data Flow Architecture
|
||||
|
||||
The Blog Writer processes data through a sophisticated pipeline with caching and optimization:
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
User[User Input] --> API[API Router]
|
||||
API --> TaskMgr[Task Manager]
|
||||
API --> CacheMgr[Cache Manager]
|
||||
|
||||
TaskMgr --> Research[Research Service]
|
||||
Research --> GSCache[Research Cache]
|
||||
Research --> GSearch[Google Search]
|
||||
|
||||
TaskMgr --> Outline[Outline Service]
|
||||
Outline --> OCache[Outline Cache]
|
||||
Outline --> AI[AI Models]
|
||||
|
||||
TaskMgr --> Content[Content Generator]
|
||||
Content --> CCache[Content Cache]
|
||||
Content --> AI
|
||||
|
||||
TaskMgr --> SEO[SEO Analyzer]
|
||||
SEO --> SEOEngine[SEO Engine]
|
||||
|
||||
TaskMgr --> QA[Quality Assurance]
|
||||
QA --> FactCheck[Fact Checker]
|
||||
|
||||
GSCache --> Research
|
||||
OCache --> Outline
|
||||
CCache --> Content
|
||||
|
||||
Research --> Outline
|
||||
Outline --> Content
|
||||
Content --> SEO
|
||||
SEO --> QA
|
||||
QA --> Publish[Publishing]
|
||||
|
||||
style User fill:#e3f2fd
|
||||
style API fill:#e1f5fe
|
||||
style TaskMgr fill:#f3e5f5
|
||||
style CacheMgr fill:#f3e5f5
|
||||
style Research fill:#e8f5e8
|
||||
style Outline fill:#fff3e0
|
||||
style Content fill:#fce4ec
|
||||
style SEO fill:#f1f8e9
|
||||
style QA fill:#e0f2f1
|
||||
style Publish fill:#e1f5fe
|
||||
```
|
||||
|
||||
## 📊 Data Models
|
||||
|
||||
### Core Request/Response Models
|
||||
|
||||
**BlogResearchRequest**:
|
||||
```python
|
||||
{
|
||||
"keywords": ["list", "of", "keywords"],
|
||||
"topic": "optional topic",
|
||||
"industry": "optional industry",
|
||||
"target_audience": "optional audience",
|
||||
"tone": "optional tone",
|
||||
"word_count_target": 1500,
|
||||
"persona": PersonaInfo
|
||||
}
|
||||
```
|
||||
|
||||
**BlogOutlineResponse**:
|
||||
```python
|
||||
{
|
||||
"success": true,
|
||||
"title_options": ["title1", "title2", "title3"],
|
||||
"outline": [BlogOutlineSection],
|
||||
"source_mapping_stats": SourceMappingStats,
|
||||
"grounding_insights": GroundingInsights,
|
||||
"optimization_results": OptimizationResults,
|
||||
"research_coverage": ResearchCoverage
|
||||
}
|
||||
```
|
||||
|
||||
**BlogSectionResponse**:
|
||||
```python
|
||||
{
|
||||
"success": true,
|
||||
"markdown": "generated content",
|
||||
"citations": [ResearchSource],
|
||||
"continuity_metrics": ContinuityMetrics
|
||||
}
|
||||
```
|
||||
|
||||
## 🔧 Technical Implementation
|
||||
|
||||
### Background Task Processing
|
||||
- **Asynchronous Execution**: All long-running operations use background tasks
|
||||
- **Progress Tracking**: Real-time progress updates with detailed messages
|
||||
- **Error Handling**: Comprehensive error handling and graceful failures
|
||||
- **Memory Management**: Automatic cleanup of old tasks
|
||||
|
||||
### Caching Strategy
|
||||
- **Research Caching**: Cache research results by keywords
|
||||
- **Outline Caching**: Cache generated outlines for reuse
|
||||
- **Content Caching**: Cache generated content sections
|
||||
- **Performance Optimization**: Reduce API calls and improve response times
|
||||
|
||||
### Integration Points
|
||||
- **Google Search Grounding**: Real-time web search integration
|
||||
- **AI Providers**: Support for multiple AI providers (Gemini, OpenAI, etc.)
|
||||
- **Platform APIs**: Integration with WordPress and Wix APIs
|
||||
- **Analytics**: Integration with SEO and performance analytics
|
||||
|
||||
## 🎯 Performance Characteristics
|
||||
|
||||
### Response Times
|
||||
- **Research Phase**: 30-60 seconds (depending on complexity)
|
||||
- **Outline Generation**: 15-30 seconds
|
||||
- **Content Generation**: 20-40 seconds per section
|
||||
- **SEO Analysis**: 10-20 seconds
|
||||
- **Quality Assurance**: 15-25 seconds
|
||||
|
||||
### Scalability Features
|
||||
- **Background Processing**: Non-blocking operations
|
||||
- **Caching**: Reduced API calls and improved performance
|
||||
- **Task Management**: Efficient resource utilization
|
||||
- **Error Recovery**: Graceful handling of failures
|
||||
|
||||
## 🔒 Quality Assurance
|
||||
|
||||
### Content Quality
|
||||
- **Fact Verification**: Source-based fact checking
|
||||
- **Hallucination Detection**: AI accuracy validation
|
||||
- **Continuity Tracking**: Content flow and consistency
|
||||
- **Quality Scoring**: Comprehensive quality metrics
|
||||
|
||||
### Technical Quality
|
||||
- **Error Handling**: Comprehensive error management
|
||||
- **Logging**: Detailed operation logging
|
||||
- **Monitoring**: Performance and usage monitoring
|
||||
- **Testing**: Automated testing and validation
|
||||
|
||||
## 📈 Future Enhancements
|
||||
|
||||
### Planned Features
|
||||
- **Multi-language Support**: Content generation in multiple languages
|
||||
- **Advanced Analytics**: Detailed performance analytics
|
||||
- **Custom Templates**: User-defined content templates
|
||||
- **Collaboration Features**: Multi-user content creation
|
||||
- **API Extensions**: Additional platform integrations
|
||||
|
||||
### Performance Improvements
|
||||
- **Caching Optimization**: Enhanced caching strategies
|
||||
- **Parallel Processing**: Improved concurrent operations
|
||||
- **Resource Optimization**: Better resource utilization
|
||||
- **Response Time Reduction**: Faster operation completion
|
||||
|
||||
---
|
||||
|
||||
*This implementation overview provides a comprehensive understanding of the Blog Writer's architecture, workflow, and technical capabilities. For detailed API documentation, see the [API Reference](api-reference.md).*
|
||||
832
docs-site/docs/features/blog-writer/implementation-spec.md
Normal file
832
docs-site/docs/features/blog-writer/implementation-spec.md
Normal file
@@ -0,0 +1,832 @@
|
||||
# Blog Writer Implementation Specification
|
||||
|
||||
This technical specification document outlines the implementation details, architecture, and technical requirements for ALwrity's Blog Writer feature.
|
||||
|
||||
## Architecture Overview
|
||||
|
||||
### System Architecture
|
||||
|
||||
The Blog Writer is built on a microservices architecture with the following key components:
|
||||
|
||||
```mermaid
|
||||
graph TB
|
||||
subgraph "Frontend Layer"
|
||||
UI[React UI Components]
|
||||
State[Redux State Management]
|
||||
Router[React Router]
|
||||
end
|
||||
|
||||
subgraph "Backend Layer"
|
||||
API[FastAPI Application]
|
||||
Auth[Authentication Service]
|
||||
Cache[Redis Cache]
|
||||
Queue[Celery Task Queue]
|
||||
end
|
||||
|
||||
subgraph "AI Services Layer"
|
||||
Gemini[Google Gemini API]
|
||||
Research[Research Services]
|
||||
SEO[SEO Analysis Engine]
|
||||
Content[Content Generation]
|
||||
end
|
||||
|
||||
subgraph "Data Layer"
|
||||
DB[(PostgreSQL Database)]
|
||||
Files[File Storage]
|
||||
Logs[Application Logs]
|
||||
end
|
||||
|
||||
subgraph "External APIs"
|
||||
Tavily[Tavily Research API]
|
||||
Serper[Serper Search API]
|
||||
GSC[Google Search Console]
|
||||
end
|
||||
|
||||
UI --> API
|
||||
State --> API
|
||||
Router --> API
|
||||
|
||||
API --> Auth
|
||||
API --> Cache
|
||||
API --> Queue
|
||||
|
||||
API --> Gemini
|
||||
API --> Research
|
||||
API --> SEO
|
||||
API --> Content
|
||||
|
||||
Research --> Tavily
|
||||
Research --> Serper
|
||||
SEO --> GSC
|
||||
|
||||
API --> DB
|
||||
Content --> Files
|
||||
API --> Logs
|
||||
|
||||
style UI fill:#e3f2fd
|
||||
style API fill:#f3e5f5
|
||||
style Gemini fill:#e8f5e8
|
||||
style DB fill:#fff3e0
|
||||
```
|
||||
|
||||
### Technology Stack
|
||||
|
||||
#### Frontend
|
||||
- **Framework**: React 18+ with TypeScript
|
||||
- **UI Library**: Material-UI (MUI) v5
|
||||
- **State Management**: Redux Toolkit
|
||||
- **Routing**: React Router v6
|
||||
- **HTTP Client**: Axios
|
||||
- **Form Handling**: React Hook Form
|
||||
- **Rich Text Editor**: TinyMCE or Quill
|
||||
|
||||
#### Backend
|
||||
- **Framework**: FastAPI (Python 3.10+)
|
||||
- **Database**: PostgreSQL with SQLAlchemy ORM
|
||||
- **Authentication**: JWT with Clerk integration
|
||||
- **API Documentation**: OpenAPI/Swagger
|
||||
- **Background Tasks**: Celery with Redis
|
||||
- **Caching**: Redis
|
||||
- **File Storage**: AWS S3 or local storage
|
||||
|
||||
#### AI Services
|
||||
- **Primary AI**: Google Gemini API
|
||||
- **Research**: Tavily, Serper, Metaphor APIs
|
||||
- **SEO Analysis**: Custom algorithms + external APIs
|
||||
- **Image Generation**: Stability AI
|
||||
- **Content Moderation**: Custom + external services
|
||||
|
||||
## API Endpoints
|
||||
|
||||
### Core Blog Writer Endpoints
|
||||
|
||||
#### Content Generation
|
||||
```http
|
||||
POST /api/blog-writer/generate
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {api_key}
|
||||
|
||||
{
|
||||
"topic": "AI in Digital Marketing",
|
||||
"target_audience": "Marketing professionals",
|
||||
"content_type": "how-to-guide",
|
||||
"word_count": 1500,
|
||||
"tone": "professional",
|
||||
"keywords": ["AI", "digital marketing", "automation"],
|
||||
"research_depth": "comprehensive",
|
||||
"include_seo_analysis": true
|
||||
}
|
||||
```
|
||||
|
||||
#### Research Integration
|
||||
```http
|
||||
POST /api/blog-writer/research
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {api_key}
|
||||
|
||||
{
|
||||
"topic": "Content Strategy",
|
||||
"research_depth": "comprehensive",
|
||||
"sources": ["web", "academic", "industry"],
|
||||
"language": "en",
|
||||
"date_range": "last_12_months"
|
||||
}
|
||||
```
|
||||
|
||||
#### SEO Analysis
|
||||
```http
|
||||
POST /api/blog-writer/seo/analyze
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {api_key}
|
||||
|
||||
{
|
||||
"content": "Your blog post content here...",
|
||||
"target_keywords": ["content strategy", "digital marketing"],
|
||||
"competitor_urls": ["https://example.com"],
|
||||
"analysis_depth": "comprehensive"
|
||||
}
|
||||
```
|
||||
|
||||
### Response Formats
|
||||
|
||||
#### Success Response
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"data": {
|
||||
"content": {
|
||||
"title": "AI in Digital Marketing: A Comprehensive Guide",
|
||||
"body": "Generated content here...",
|
||||
"word_count": 1500,
|
||||
"reading_time": "6 minutes"
|
||||
},
|
||||
"research": {
|
||||
"sources": [...],
|
||||
"key_facts": [...],
|
||||
"trends": [...]
|
||||
},
|
||||
"seo_analysis": {
|
||||
"score": 85,
|
||||
"recommendations": [...],
|
||||
"keyword_analysis": {...}
|
||||
},
|
||||
"metadata": {
|
||||
"generated_at": "2024-01-15T10:30:00Z",
|
||||
"processing_time": "45 seconds",
|
||||
"ai_model": "gemini-pro"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Error Response
|
||||
```json
|
||||
{
|
||||
"success": false,
|
||||
"error": {
|
||||
"code": "CONTENT_GENERATION_FAILED",
|
||||
"message": "Failed to generate content",
|
||||
"details": {
|
||||
"reason": "AI service timeout",
|
||||
"suggestion": "Try again with a shorter content length"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Database Schema
|
||||
|
||||
### Core Tables
|
||||
|
||||
#### Blog Posts
|
||||
```sql
|
||||
CREATE TABLE blog_posts (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
user_id UUID NOT NULL REFERENCES users(id),
|
||||
title VARCHAR(255) NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
status VARCHAR(50) DEFAULT 'draft',
|
||||
word_count INTEGER,
|
||||
reading_time INTEGER,
|
||||
seo_score INTEGER,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
published_at TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE INDEX idx_blog_posts_user_id ON blog_posts(user_id);
|
||||
CREATE INDEX idx_blog_posts_status ON blog_posts(status);
|
||||
CREATE INDEX idx_blog_posts_created_at ON blog_posts(created_at);
|
||||
```
|
||||
|
||||
#### Research Data
|
||||
```sql
|
||||
CREATE TABLE research_data (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
blog_post_id UUID REFERENCES blog_posts(id),
|
||||
source_url VARCHAR(500),
|
||||
source_title VARCHAR(255),
|
||||
content TEXT,
|
||||
credibility_score INTEGER,
|
||||
relevance_score INTEGER,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE INDEX idx_research_data_blog_post_id ON research_data(blog_post_id);
|
||||
CREATE INDEX idx_research_data_credibility ON research_data(credibility_score);
|
||||
```
|
||||
|
||||
#### SEO Analysis
|
||||
```sql
|
||||
CREATE TABLE seo_analysis (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
blog_post_id UUID REFERENCES blog_posts(id),
|
||||
overall_score INTEGER,
|
||||
keyword_score INTEGER,
|
||||
content_score INTEGER,
|
||||
technical_score INTEGER,
|
||||
readability_score INTEGER,
|
||||
recommendations JSONB,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE INDEX idx_seo_analysis_blog_post_id ON seo_analysis(blog_post_id);
|
||||
```
|
||||
|
||||
## AI Integration
|
||||
|
||||
### Google Gemini Integration
|
||||
|
||||
#### Configuration
|
||||
```python
|
||||
import google.generativeai as genai
|
||||
|
||||
class GeminiService:
|
||||
def __init__(self, api_key: str):
|
||||
genai.configure(api_key=api_key)
|
||||
self.model = genai.GenerativeModel('gemini-pro')
|
||||
|
||||
async def generate_content(self, prompt: str, **kwargs) -> str:
|
||||
try:
|
||||
response = await self.model.generate_content_async(
|
||||
prompt,
|
||||
generation_config=genai.types.GenerationConfig(
|
||||
temperature=kwargs.get('temperature', 0.7),
|
||||
max_output_tokens=kwargs.get('max_tokens', 2048),
|
||||
top_p=kwargs.get('top_p', 0.8),
|
||||
top_k=kwargs.get('top_k', 40)
|
||||
)
|
||||
)
|
||||
return response.text
|
||||
except Exception as e:
|
||||
raise ContentGenerationError(f"Gemini API error: {str(e)}")
|
||||
```
|
||||
|
||||
#### Prompt Engineering
|
||||
```python
|
||||
class BlogWriterPrompts:
|
||||
@staticmethod
|
||||
def generate_blog_post(topic: str, audience: str, word_count: int) -> str:
|
||||
return f"""
|
||||
Write a comprehensive blog post about "{topic}" for {audience}.
|
||||
|
||||
Requirements:
|
||||
- Word count: {word_count} words
|
||||
- Tone: Professional and engaging
|
||||
- Structure: Introduction, main sections, conclusion
|
||||
- Include actionable insights and examples
|
||||
- Use subheadings for better readability
|
||||
- Include a compelling call-to-action
|
||||
|
||||
Please ensure the content is:
|
||||
- Well-researched and factual
|
||||
- SEO-friendly
|
||||
- Engaging and valuable to readers
|
||||
- Free from plagiarism
|
||||
"""
|
||||
|
||||
@staticmethod
|
||||
def generate_outline(topic: str, audience: str) -> str:
|
||||
return f"""
|
||||
Create a detailed outline for a blog post about "{topic}" for {audience}.
|
||||
|
||||
Include:
|
||||
- Compelling headline
|
||||
- Introduction hook
|
||||
- 3-5 main sections with sub-points
|
||||
- Conclusion with call-to-action
|
||||
- Suggested word count for each section
|
||||
"""
|
||||
```
|
||||
|
||||
### Research Service Integration
|
||||
|
||||
#### Multi-Source Research
|
||||
```python
|
||||
class ResearchService:
|
||||
def __init__(self):
|
||||
self.tavily_client = TavilyClient(api_key=settings.TAVILY_API_KEY)
|
||||
self.serper_client = SerperClient(api_key=settings.SERPER_API_KEY)
|
||||
self.metaphor_client = MetaphorClient(api_key=settings.METAPHOR_API_KEY)
|
||||
|
||||
async def comprehensive_research(self, topic: str, depth: str = "comprehensive") -> Dict:
|
||||
research_results = {
|
||||
"web_sources": await self._web_research(topic),
|
||||
"academic_sources": await self._academic_research(topic),
|
||||
"industry_sources": await self._industry_research(topic),
|
||||
"news_sources": await self._news_research(topic)
|
||||
}
|
||||
|
||||
return self._process_research_results(research_results)
|
||||
|
||||
async def _web_research(self, topic: str) -> List[Dict]:
|
||||
# Tavily web search
|
||||
tavily_results = await self.tavily_client.search(
|
||||
query=topic,
|
||||
search_depth="advanced",
|
||||
max_results=10
|
||||
)
|
||||
|
||||
# Serper Google search
|
||||
serper_results = await self.serper_client.search(
|
||||
query=topic,
|
||||
num_results=10
|
||||
)
|
||||
|
||||
return self._merge_search_results(tavily_results, serper_results)
|
||||
```
|
||||
|
||||
## Frontend Components
|
||||
|
||||
### React Components Structure
|
||||
|
||||
```
|
||||
src/
|
||||
├── components/
|
||||
│ ├── BlogWriter/
|
||||
│ │ ├── BlogWriterContainer.tsx
|
||||
│ │ ├── TopicInput.tsx
|
||||
│ │ ├── ContentEditor.tsx
|
||||
│ │ ├── ResearchPanel.tsx
|
||||
│ │ ├── SEOAnalysis.tsx
|
||||
│ │ └── ContentPreview.tsx
|
||||
│ ├── shared/
|
||||
│ │ ├── LoadingSpinner.tsx
|
||||
│ │ ├── ErrorBoundary.tsx
|
||||
│ │ └── ProgressBar.tsx
|
||||
│ └── ui/
|
||||
│ ├── Button.tsx
|
||||
│ ├── Input.tsx
|
||||
│ └── Modal.tsx
|
||||
```
|
||||
|
||||
### Main Blog Writer Component
|
||||
```typescript
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { BlogWriterContainer } from './BlogWriterContainer';
|
||||
import { ResearchPanel } from './ResearchPanel';
|
||||
import { SEOAnalysis } from './SEOAnalysis';
|
||||
import { ContentEditor } from './ContentEditor';
|
||||
|
||||
interface BlogWriterProps {
|
||||
initialTopic?: string;
|
||||
onContentGenerated?: (content: BlogContent) => void;
|
||||
}
|
||||
|
||||
export const BlogWriter: React.FC<BlogWriterProps> = ({
|
||||
initialTopic,
|
||||
onContentGenerated
|
||||
}) => {
|
||||
const [currentStep, setCurrentStep] = useState<'input' | 'research' | 'generation' | 'editing' | 'analysis'>('input');
|
||||
const [blogData, setBlogData] = useState<BlogData>({
|
||||
topic: initialTopic || '',
|
||||
audience: '',
|
||||
wordCount: 1000,
|
||||
tone: 'professional',
|
||||
keywords: []
|
||||
});
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const { content, research, seoAnalysis, loading, error } = useSelector(
|
||||
(state: RootState) => state.blogWriter
|
||||
);
|
||||
|
||||
const handleGenerateContent = async () => {
|
||||
setCurrentStep('generation');
|
||||
dispatch(generateBlogContent(blogData));
|
||||
};
|
||||
|
||||
const handleResearchComplete = (researchData: ResearchData) => {
|
||||
setBlogData(prev => ({ ...prev, research: researchData }));
|
||||
setCurrentStep('generation');
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="blog-writer">
|
||||
<BlogWriterContainer
|
||||
currentStep={currentStep}
|
||||
blogData={blogData}
|
||||
onDataChange={setBlogData}
|
||||
onGenerate={handleGenerateContent}
|
||||
/>
|
||||
|
||||
{currentStep === 'research' && (
|
||||
<ResearchPanel
|
||||
topic={blogData.topic}
|
||||
onComplete={handleResearchComplete}
|
||||
/>
|
||||
)}
|
||||
|
||||
{currentStep === 'editing' && content && (
|
||||
<ContentEditor
|
||||
content={content}
|
||||
onContentChange={(newContent) => setBlogData(prev => ({ ...prev, content: newContent }))}
|
||||
/>
|
||||
)}
|
||||
|
||||
{currentStep === 'analysis' && (
|
||||
<SEOAnalysis
|
||||
content={content}
|
||||
targetKeywords={blogData.keywords}
|
||||
onAnalysisComplete={(analysis) => setBlogData(prev => ({ ...prev, seoAnalysis: analysis }))}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
## State Management
|
||||
|
||||
### Redux Store Structure
|
||||
```typescript
|
||||
interface BlogWriterState {
|
||||
// Input data
|
||||
topic: string;
|
||||
audience: string;
|
||||
wordCount: number;
|
||||
tone: string;
|
||||
keywords: string[];
|
||||
|
||||
// Generated content
|
||||
content: BlogContent | null;
|
||||
research: ResearchData | null;
|
||||
seoAnalysis: SEOAnalysis | null;
|
||||
|
||||
// UI state
|
||||
currentStep: 'input' | 'research' | 'generation' | 'editing' | 'analysis';
|
||||
loading: boolean;
|
||||
error: string | null;
|
||||
|
||||
// Progress tracking
|
||||
generationProgress: number;
|
||||
researchProgress: number;
|
||||
}
|
||||
|
||||
// Actions
|
||||
export const blogWriterSlice = createSlice({
|
||||
name: 'blogWriter',
|
||||
initialState,
|
||||
reducers: {
|
||||
setTopic: (state, action) => {
|
||||
state.topic = action.payload;
|
||||
},
|
||||
setAudience: (state, action) => {
|
||||
state.audience = action.payload;
|
||||
},
|
||||
setWordCount: (state, action) => {
|
||||
state.wordCount = action.payload;
|
||||
},
|
||||
setTone: (state, action) => {
|
||||
state.tone = action.payload;
|
||||
},
|
||||
setKeywords: (state, action) => {
|
||||
state.keywords = action.payload;
|
||||
},
|
||||
setCurrentStep: (state, action) => {
|
||||
state.currentStep = action.payload;
|
||||
},
|
||||
setLoading: (state, action) => {
|
||||
state.loading = action.payload;
|
||||
},
|
||||
setError: (state, action) => {
|
||||
state.error = action.payload;
|
||||
},
|
||||
setContent: (state, action) => {
|
||||
state.content = action.payload;
|
||||
},
|
||||
setResearch: (state, action) => {
|
||||
state.research = action.payload;
|
||||
},
|
||||
setSEOAnalysis: (state, action) => {
|
||||
state.seoAnalysis = action.payload;
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
### Error Types
|
||||
```python
|
||||
class BlogWriterError(Exception):
|
||||
"""Base exception for Blog Writer errors"""
|
||||
pass
|
||||
|
||||
class ContentGenerationError(BlogWriterError):
|
||||
"""Error during content generation"""
|
||||
pass
|
||||
|
||||
class ResearchError(BlogWriterError):
|
||||
"""Error during research process"""
|
||||
pass
|
||||
|
||||
class SEOAnalysisError(BlogWriterError):
|
||||
"""Error during SEO analysis"""
|
||||
pass
|
||||
|
||||
class ValidationError(BlogWriterError):
|
||||
"""Input validation error"""
|
||||
pass
|
||||
```
|
||||
|
||||
### Error Handling Middleware
|
||||
```python
|
||||
from fastapi import HTTPException, Request
|
||||
from fastapi.responses import JSONResponse
|
||||
|
||||
@app.exception_handler(BlogWriterError)
|
||||
async def blog_writer_error_handler(request: Request, exc: BlogWriterError):
|
||||
return JSONResponse(
|
||||
status_code=400,
|
||||
content={
|
||||
"success": False,
|
||||
"error": {
|
||||
"code": exc.__class__.__name__,
|
||||
"message": str(exc),
|
||||
"details": getattr(exc, 'details', {})
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@app.exception_handler(ValidationError)
|
||||
async def validation_error_handler(request: Request, exc: ValidationError):
|
||||
return JSONResponse(
|
||||
status_code=422,
|
||||
content={
|
||||
"success": False,
|
||||
"error": {
|
||||
"code": "VALIDATION_ERROR",
|
||||
"message": "Request validation failed",
|
||||
"details": {
|
||||
"field": exc.field,
|
||||
"message": str(exc)
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Caching Strategy
|
||||
```python
|
||||
from functools import lru_cache
|
||||
import redis
|
||||
|
||||
class CacheService:
|
||||
def __init__(self):
|
||||
self.redis_client = redis.Redis(host='localhost', port=6379, db=0)
|
||||
|
||||
@lru_cache(maxsize=1000)
|
||||
def get_research_cache(self, topic: str, depth: str) -> Dict:
|
||||
cache_key = f"research:{topic}:{depth}"
|
||||
cached_data = self.redis_client.get(cache_key)
|
||||
|
||||
if cached_data:
|
||||
return json.loads(cached_data)
|
||||
|
||||
return None
|
||||
|
||||
def set_research_cache(self, topic: str, depth: str, data: Dict, ttl: int = 3600):
|
||||
cache_key = f"research:{topic}:{depth}"
|
||||
self.redis_client.setex(
|
||||
cache_key,
|
||||
ttl,
|
||||
json.dumps(data)
|
||||
)
|
||||
```
|
||||
|
||||
### Background Processing
|
||||
```python
|
||||
from celery import Celery
|
||||
|
||||
celery_app = Celery('blog_writer')
|
||||
|
||||
@celery_app.task
|
||||
def generate_blog_content_async(topic: str, audience: str, word_count: int):
|
||||
"""Generate blog content asynchronously"""
|
||||
try:
|
||||
# Generate content
|
||||
content = generate_content(topic, audience, word_count)
|
||||
|
||||
# Perform research
|
||||
research = perform_research(topic)
|
||||
|
||||
# SEO analysis
|
||||
seo_analysis = perform_seo_analysis(content)
|
||||
|
||||
return {
|
||||
"content": content,
|
||||
"research": research,
|
||||
"seo_analysis": seo_analysis
|
||||
}
|
||||
except Exception as e:
|
||||
raise ContentGenerationError(f"Async generation failed: {str(e)}")
|
||||
```
|
||||
|
||||
## Security Considerations
|
||||
|
||||
### Input Validation
|
||||
```python
|
||||
from pydantic import BaseModel, validator
|
||||
import re
|
||||
|
||||
class BlogGenerationRequest(BaseModel):
|
||||
topic: str
|
||||
audience: str
|
||||
word_count: int
|
||||
tone: str
|
||||
keywords: List[str]
|
||||
|
||||
@validator('topic')
|
||||
def validate_topic(cls, v):
|
||||
if len(v) < 3 or len(v) > 200:
|
||||
raise ValueError('Topic must be between 3 and 200 characters')
|
||||
return v.strip()
|
||||
|
||||
@validator('word_count')
|
||||
def validate_word_count(cls, v):
|
||||
if v < 100 or v > 10000:
|
||||
raise ValueError('Word count must be between 100 and 10,000')
|
||||
return v
|
||||
|
||||
@validator('tone')
|
||||
def validate_tone(cls, v):
|
||||
allowed_tones = ['professional', 'casual', 'friendly', 'authoritative', 'conversational']
|
||||
if v not in allowed_tones:
|
||||
raise ValueError(f'Tone must be one of: {", ".join(allowed_tones)}')
|
||||
return v
|
||||
```
|
||||
|
||||
### Rate Limiting
|
||||
```python
|
||||
from slowapi import Limiter, _rate_limit_exceeded_handler
|
||||
from slowapi.util import get_remote_address
|
||||
from slowapi.errors import RateLimitExceeded
|
||||
|
||||
limiter = Limiter(key_func=get_remote_address)
|
||||
app.state.limiter = limiter
|
||||
app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)
|
||||
|
||||
@app.post("/api/blog-writer/generate")
|
||||
@limiter.limit("10/minute")
|
||||
async def generate_blog_content(request: Request, data: BlogGenerationRequest):
|
||||
# Implementation
|
||||
pass
|
||||
```
|
||||
|
||||
## Testing Strategy
|
||||
|
||||
### Unit Tests
|
||||
```python
|
||||
import pytest
|
||||
from unittest.mock import Mock, patch
|
||||
from blog_writer.services import BlogWriterService
|
||||
|
||||
class TestBlogWriterService:
|
||||
@pytest.fixture
|
||||
def blog_writer_service(self):
|
||||
return BlogWriterService()
|
||||
|
||||
@patch('blog_writer.services.GeminiService')
|
||||
def test_generate_content_success(self, mock_gemini, blog_writer_service):
|
||||
# Mock Gemini response
|
||||
mock_gemini.return_value.generate_content.return_value = "Generated content"
|
||||
|
||||
# Test content generation
|
||||
result = blog_writer_service.generate_content(
|
||||
topic="AI in Marketing",
|
||||
audience="Marketing professionals",
|
||||
word_count=1000
|
||||
)
|
||||
|
||||
assert result["content"] == "Generated content"
|
||||
assert result["word_count"] == 1000
|
||||
|
||||
def test_validate_input_data(self, blog_writer_service):
|
||||
# Test input validation
|
||||
with pytest.raises(ValidationError):
|
||||
blog_writer_service.validate_input({
|
||||
"topic": "", # Empty topic
|
||||
"word_count": 50 # Too short
|
||||
})
|
||||
```
|
||||
|
||||
### Integration Tests
|
||||
```python
|
||||
import pytest
|
||||
from fastapi.testclient import TestClient
|
||||
from app import app
|
||||
|
||||
client = TestClient(app)
|
||||
|
||||
def test_blog_generation_endpoint():
|
||||
response = client.post(
|
||||
"/api/blog-writer/generate",
|
||||
json={
|
||||
"topic": "AI in Digital Marketing",
|
||||
"audience": "Marketing professionals",
|
||||
"word_count": 1000,
|
||||
"tone": "professional"
|
||||
},
|
||||
headers={"Authorization": "Bearer test_token"}
|
||||
)
|
||||
|
||||
assert response.status_code == 200
|
||||
data = response.json()
|
||||
assert data["success"] is True
|
||||
assert "content" in data["data"]
|
||||
```
|
||||
|
||||
## Deployment Configuration
|
||||
|
||||
### Docker Configuration
|
||||
```dockerfile
|
||||
# Dockerfile
|
||||
FROM python:3.10-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
```
|
||||
|
||||
### Environment Variables
|
||||
```bash
|
||||
# .env
|
||||
DATABASE_URL=postgresql://user:password@localhost/alwrity
|
||||
REDIS_URL=redis://localhost:6379
|
||||
GEMINI_API_KEY=your_gemini_api_key
|
||||
TAVILY_API_KEY=your_tavily_api_key
|
||||
SERPER_API_KEY=your_serper_api_key
|
||||
METAPHOR_API_KEY=your_metaphor_api_key
|
||||
STABILITY_API_KEY=your_stability_api_key
|
||||
SECRET_KEY=your_secret_key
|
||||
CORS_ORIGINS=http://localhost:3000
|
||||
```
|
||||
|
||||
### Kubernetes Deployment
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: blog-writer-api
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: blog-writer-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: blog-writer-api
|
||||
spec:
|
||||
containers:
|
||||
- name: blog-writer-api
|
||||
image: alwrity/blog-writer-api:latest
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
env:
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: alwrity-secrets
|
||||
key: database-url
|
||||
- name: GEMINI_API_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: alwrity-secrets
|
||||
key: gemini-api-key
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
*This implementation specification provides the technical foundation for building a robust, scalable Blog Writer feature. For more details on specific components, refer to the individual feature documentation.*
|
||||
@@ -1,50 +1,50 @@
|
||||
# Blog Writer Overview
|
||||
|
||||
The ALwrity Blog Writer is a powerful AI-driven content creation tool that helps you generate high-quality, SEO-optimized blog posts with minimal effort.
|
||||
The ALwrity Blog Writer is a powerful AI-driven content creation tool that helps you generate high-quality, SEO-optimized blog posts with minimal effort. It's designed for users with medium to low technical knowledge, making professional content creation accessible to everyone.
|
||||
|
||||
## Key Features
|
||||
|
||||
### 🤖 AI-Powered Content Generation
|
||||
- **Topic Research**: Automated research and fact-checking
|
||||
- **Content Structure**: Intelligent outline generation
|
||||
- **Writing Styles**: Multiple writing styles and tones
|
||||
- **SEO Optimization**: Built-in SEO analysis and recommendations
|
||||
- **Research Integration**: Automated web research with source verification
|
||||
- **Smart Outlines**: AI-generated content outlines that you can customize
|
||||
- **Section-by-Section Writing**: Generate content one section at a time
|
||||
- **Multiple Writing Styles**: Choose from different tones and styles
|
||||
|
||||
### 📊 Research Integration
|
||||
- **Real-time Research**: Access to current information
|
||||
- **Source Verification**: Fact-checking and source validation
|
||||
- **Trend Analysis**: Current trends and topics
|
||||
- **Competitor Analysis**: Content gap identification
|
||||
### 📊 Research & Analysis
|
||||
- **Web Research**: Real-time research with source citations
|
||||
- **Fact Checking**: Built-in hallucination detection and verification
|
||||
- **Content Optimization**: AI-powered content improvement suggestions
|
||||
- **SEO Integration**: Built-in SEO analysis and recommendations
|
||||
|
||||
### 🎯 SEO Optimization
|
||||
- **Keyword Analysis**: Primary and secondary keyword optimization
|
||||
- **Meta Tags**: Automatic meta description and title generation
|
||||
- **Readability**: Content readability optimization
|
||||
- **Internal Linking**: Smart internal linking suggestions
|
||||
### 🎯 User-Friendly Features
|
||||
- **Visual Editor**: Easy-to-use WYSIWYG editor with markdown support
|
||||
- **Progress Tracking**: Real-time progress monitoring for long tasks
|
||||
- **Title Suggestions**: AI-generated title options to choose from
|
||||
- **Publishing Tools**: Direct publishing to various platforms
|
||||
|
||||
## How It Works
|
||||
|
||||
### 1. Content Planning
|
||||
```mermaid
|
||||
graph TD
|
||||
A[Topic Input] --> B[Research Phase]
|
||||
B --> C[Outline Generation]
|
||||
C --> D[Content Creation]
|
||||
D --> E[SEO Analysis]
|
||||
E --> F[Final Review]
|
||||
```
|
||||
### Simple 4-Step Process
|
||||
|
||||
### 2. Research Process
|
||||
- **Topic Analysis**: Understanding the subject matter
|
||||
- **Keyword Research**: Identifying relevant keywords
|
||||
- **Competitor Analysis**: Analyzing top-performing content
|
||||
- **Source Gathering**: Collecting reliable information
|
||||
1. **Research Your Topic** - Enter your topic and keywords, then let AI research the latest information
|
||||
2. **Create an Outline** - AI generates a content outline that you can customize and refine
|
||||
3. **Write Section by Section** - Generate content for each section using AI, then edit as needed
|
||||
4. **Optimize and Publish** - Review SEO suggestions, make final edits, and publish your content
|
||||
|
||||
### 3. Content Generation
|
||||
- **Introduction**: Engaging opening paragraphs
|
||||
- **Body Content**: Well-structured main content
|
||||
- **Conclusion**: Compelling closing statements
|
||||
- **Call-to-Action**: Strategic CTAs placement
|
||||
### What Happens Behind the Scenes
|
||||
|
||||
- **Research Phase**: AI searches the web for current information and sources
|
||||
- **Outline Generation**: Creates a logical structure with headings and key points
|
||||
- **Content Writing**: Generates engaging, informative content for each section
|
||||
- **Quality Checks**: Runs fact-checking and SEO analysis automatically
|
||||
- **Publishing**: Formats content for your chosen platform
|
||||
|
||||
### User-Friendly Features
|
||||
|
||||
- **Progress Tracking**: See real-time progress for research and writing tasks
|
||||
- **Visual Editor**: Edit content with an easy-to-use WYSIWYG interface
|
||||
- **Title Suggestions**: Choose from AI-generated title options
|
||||
- **SEO Integration**: Get SEO suggestions as you write
|
||||
|
||||
## Content Types
|
||||
|
||||
@@ -153,7 +153,7 @@ graph TD
|
||||
1. **[Research Integration](research.md)** - Set up automated research
|
||||
2. **[SEO Analysis](seo-analysis.md)** - Configure SEO optimization
|
||||
3. **[Implementation Spec](implementation-spec.md)** - Technical details
|
||||
4. **[Best Practices](../guides/best-practices.md)** - Optimization tips
|
||||
4. **[Best Practices](../../guides/best-practices.md)** - Optimization tips
|
||||
|
||||
## Related Features
|
||||
|
||||
|
||||
334
docs-site/docs/features/blog-writer/research.md
Normal file
334
docs-site/docs/features/blog-writer/research.md
Normal file
@@ -0,0 +1,334 @@
|
||||
# Research Integration
|
||||
|
||||
ALwrity's Blog Writer includes powerful research integration capabilities that automatically gather, analyze, and verify information to create well-researched, accurate, and comprehensive blog content.
|
||||
|
||||
## What is Research Integration?
|
||||
|
||||
Research Integration is an AI-powered feature that automatically conducts comprehensive research on your chosen topic, gathering information from multiple sources, verifying facts, and organizing insights to support your content creation process.
|
||||
|
||||
### Key Benefits
|
||||
|
||||
- **Comprehensive Research**: Gather information from multiple reliable sources
|
||||
- **Fact Verification**: Verify claims and statistics automatically
|
||||
- **Source Attribution**: Provide proper citations and references
|
||||
- **Trend Analysis**: Identify current trends and developments
|
||||
- **Competitive Intelligence**: Analyze competitor content and strategies
|
||||
|
||||
## Research Process
|
||||
|
||||
### 1. Topic Analysis
|
||||
|
||||
#### Initial Research Setup
|
||||
- **Topic Understanding**: AI analyzes your topic and identifies key aspects
|
||||
- **Research Scope**: Determines the breadth and depth of research needed
|
||||
- **Source Selection**: Identifies relevant and authoritative sources
|
||||
- **Research Strategy**: Develops a comprehensive research approach
|
||||
|
||||
#### Research Parameters
|
||||
```json
|
||||
{
|
||||
"topic": "AI in Digital Marketing",
|
||||
"research_depth": "comprehensive",
|
||||
"sources": ["web", "academic", "industry"],
|
||||
"language": "en",
|
||||
"date_range": "last_12_months",
|
||||
"fact_checking": true
|
||||
}
|
||||
```
|
||||
|
||||
### 2. Multi-Source Research
|
||||
|
||||
#### Web Research
|
||||
- **Search Engines**: Google, Bing, and specialized search engines
|
||||
- **News Sources**: Current news and industry updates
|
||||
- **Blogs and Articles**: Industry blogs and expert articles
|
||||
- **Forums and Communities**: Reddit, Quora, and professional forums
|
||||
- **Social Media**: Twitter, LinkedIn, and industry discussions
|
||||
|
||||
#### Academic Sources
|
||||
- **Research Papers**: Academic journals and research publications
|
||||
- **Studies and Reports**: Industry studies and market research
|
||||
- **White Papers**: Technical and business white papers
|
||||
- **Case Studies**: Real-world examples and case studies
|
||||
- **Expert Opinions**: Industry expert insights and analysis
|
||||
|
||||
#### Industry Sources
|
||||
- **Industry Reports**: Market research and industry analysis
|
||||
- **Company Publications**: Official company blogs and reports
|
||||
- **Professional Networks**: LinkedIn articles and professional content
|
||||
- **Trade Publications**: Industry-specific magazines and journals
|
||||
- **Conference Materials**: Industry conference presentations and papers
|
||||
|
||||
### 3. Information Processing
|
||||
|
||||
#### Data Collection
|
||||
- **Content Extraction**: Extract relevant information from sources
|
||||
- **Fact Identification**: Identify key facts, statistics, and claims
|
||||
- **Quote Collection**: Gather relevant quotes and expert opinions
|
||||
- **Trend Identification**: Identify current trends and patterns
|
||||
- **Gap Analysis**: Find information gaps and opportunities
|
||||
|
||||
#### Information Verification
|
||||
- **Fact Checking**: Verify facts against multiple sources
|
||||
- **Source Credibility**: Assess source authority and reliability
|
||||
- **Date Verification**: Ensure information is current and relevant
|
||||
- **Bias Detection**: Identify potential bias in sources
|
||||
- **Cross-Reference**: Cross-reference information across sources
|
||||
|
||||
## Research Features
|
||||
|
||||
### Real-Time Research
|
||||
|
||||
#### Live Data Access
|
||||
- **Current Information**: Access to real-time data and updates
|
||||
- **Trend Monitoring**: Track current trends and developments
|
||||
- **News Integration**: Include latest news and updates
|
||||
- **Social Media Monitoring**: Track social media discussions
|
||||
- **Market Data**: Access current market information
|
||||
|
||||
#### Dynamic Updates
|
||||
- **Content Freshness**: Ensure content includes latest information
|
||||
- **Trend Integration**: Incorporate current trends and developments
|
||||
- **News Relevance**: Include relevant recent news
|
||||
- **Market Updates**: Include current market conditions
|
||||
- **Expert Insights**: Access latest expert opinions
|
||||
|
||||
### Source Verification
|
||||
|
||||
#### Credibility Assessment
|
||||
- **Domain Authority**: Check website authority and credibility
|
||||
- **Author Credentials**: Verify author expertise and credentials
|
||||
- **Publication Standards**: Assess publication quality and standards
|
||||
- **Peer Review**: Check for peer review and validation
|
||||
- **Fact-Checking**: Cross-reference with fact-checking organizations
|
||||
|
||||
#### Source Diversity
|
||||
- **Multiple Perspectives**: Include diverse viewpoints and opinions
|
||||
- **Source Types**: Mix different types of sources
|
||||
- **Geographic Diversity**: Include international sources
|
||||
- **Temporal Range**: Include both recent and historical sources
|
||||
- **Expertise Levels**: Include both expert and general sources
|
||||
|
||||
### Fact Checking
|
||||
|
||||
#### Automated Verification
|
||||
- **Claim Verification**: Verify specific claims and statements
|
||||
- **Statistical Validation**: Check statistics and numerical data
|
||||
- **Quote Verification**: Verify quotes and attributions
|
||||
- **Date Accuracy**: Ensure dates and timelines are correct
|
||||
- **Context Validation**: Verify context and interpretation
|
||||
|
||||
#### Manual Review
|
||||
- **Expert Review**: Human expert review of critical information
|
||||
- **Quality Assurance**: Manual quality checks and validation
|
||||
- **Bias Assessment**: Human assessment of potential bias
|
||||
- **Context Analysis**: Human analysis of context and interpretation
|
||||
- **Final Validation**: Final human validation of research quality
|
||||
|
||||
## Research Output
|
||||
|
||||
### Organized Information
|
||||
|
||||
#### Structured Data
|
||||
- **Key Facts**: Organized list of key facts and information
|
||||
- **Statistics**: Relevant statistics and numerical data
|
||||
- **Quotes**: Expert quotes and opinions
|
||||
- **Trends**: Current trends and developments
|
||||
- **Sources**: Complete source list with citations
|
||||
|
||||
#### Research Summary
|
||||
- **Executive Summary**: High-level overview of research findings
|
||||
- **Key Insights**: Main insights and discoveries
|
||||
- **Trend Analysis**: Analysis of current trends
|
||||
- **Gap Identification**: Information gaps and opportunities
|
||||
- **Recommendations**: Research-based recommendations
|
||||
|
||||
### Source Citations
|
||||
|
||||
#### Citation Format
|
||||
- **APA Style**: Academic citation format
|
||||
- **MLA Style**: Modern Language Association format
|
||||
- **Chicago Style**: Chicago Manual of Style format
|
||||
- **Custom Format**: Customizable citation format
|
||||
- **Hyperlinks**: Direct links to source materials
|
||||
|
||||
#### Source Information
|
||||
- **Author Details**: Author name, credentials, and affiliation
|
||||
- **Publication Information**: Publication name, date, and details
|
||||
- **URL and Access**: Direct links and access information
|
||||
- **Credibility Score**: Source credibility assessment
|
||||
- **Last Updated**: Last update or verification date
|
||||
|
||||
## Integration with Content Creation
|
||||
|
||||
### Content Planning
|
||||
|
||||
#### Research-Informed Planning
|
||||
- **Topic Development**: Develop topics based on research insights
|
||||
- **Content Structure**: Structure content based on research findings
|
||||
- **Key Points**: Identify key points from research
|
||||
- **Supporting Evidence**: Gather supporting evidence and examples
|
||||
- **Expert Opinions**: Include relevant expert opinions
|
||||
|
||||
#### Content Strategy
|
||||
- **Audience Insights**: Understand audience based on research
|
||||
- **Competitive Analysis**: Analyze competitor content and strategies
|
||||
- **Trend Integration**: Incorporate current trends and developments
|
||||
- **Gap Opportunities**: Identify content gaps and opportunities
|
||||
- **Value Proposition**: Develop unique value propositions
|
||||
|
||||
### Content Enhancement
|
||||
|
||||
#### Evidence-Based Content
|
||||
- **Factual Accuracy**: Ensure all facts are accurate and verified
|
||||
- **Statistical Support**: Support claims with relevant statistics
|
||||
- **Expert Validation**: Include expert opinions and validation
|
||||
- **Case Studies**: Include relevant case studies and examples
|
||||
- **Trend Analysis**: Incorporate current trend analysis
|
||||
|
||||
#### Credibility Building
|
||||
- **Source Attribution**: Proper attribution of all sources
|
||||
- **Expert Quotes**: Include relevant expert quotes
|
||||
- **Data Visualization**: Present data in clear, visual formats
|
||||
- **Transparency**: Show research process and methodology
|
||||
- **Quality Assurance**: Maintain high quality standards
|
||||
|
||||
## Research Tools and Sources
|
||||
|
||||
### Web Research Tools
|
||||
|
||||
#### Search Engines
|
||||
- **Google Search**: Comprehensive web search
|
||||
- **Bing Search**: Alternative search engine
|
||||
- **DuckDuckGo**: Privacy-focused search
|
||||
- **Specialized Search**: Industry-specific search engines
|
||||
- **Academic Search**: Academic and research databases
|
||||
|
||||
#### Research Platforms
|
||||
- **Google Scholar**: Academic research and papers
|
||||
- **ResearchGate**: Academic network and research
|
||||
- **JSTOR**: Academic journal database
|
||||
- **PubMed**: Medical and scientific research
|
||||
- **IEEE Xplore**: Technical and engineering research
|
||||
|
||||
### Industry Sources
|
||||
|
||||
#### Market Research
|
||||
- **Statista**: Statistical data and market research
|
||||
- **IBISWorld**: Industry research and analysis
|
||||
- **McKinsey**: Business and industry insights
|
||||
- **Deloitte**: Professional services research
|
||||
- **PwC**: Business and industry analysis
|
||||
|
||||
#### News and Media
|
||||
- **Reuters**: International news and analysis
|
||||
- **Bloomberg**: Business and financial news
|
||||
- **TechCrunch**: Technology news and analysis
|
||||
- **Harvard Business Review**: Business insights and analysis
|
||||
- **MIT Technology Review**: Technology and innovation news
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Research Quality
|
||||
|
||||
#### Source Selection
|
||||
1. **Authority**: Choose authoritative and credible sources
|
||||
2. **Recency**: Prefer recent and up-to-date information
|
||||
3. **Relevance**: Ensure sources are relevant to your topic
|
||||
4. **Diversity**: Include diverse perspectives and sources
|
||||
5. **Verification**: Cross-reference information across sources
|
||||
|
||||
#### Information Processing
|
||||
1. **Accuracy**: Verify all facts and claims
|
||||
2. **Context**: Understand context and interpretation
|
||||
3. **Bias Awareness**: Be aware of potential bias
|
||||
4. **Completeness**: Ensure comprehensive coverage
|
||||
5. **Quality**: Maintain high quality standards
|
||||
|
||||
### Content Integration
|
||||
|
||||
#### Research Application
|
||||
1. **Relevance**: Use research that's relevant to your audience
|
||||
2. **Balance**: Balance different perspectives and opinions
|
||||
3. **Clarity**: Present research findings clearly
|
||||
4. **Attribution**: Properly attribute all sources
|
||||
5. **Value**: Add value through research insights
|
||||
|
||||
#### Quality Assurance
|
||||
1. **Fact Checking**: Verify all facts and claims
|
||||
2. **Source Review**: Review and validate all sources
|
||||
3. **Expert Input**: Seek expert input when needed
|
||||
4. **Peer Review**: Get peer review of research quality
|
||||
5. **Continuous Improvement**: Continuously improve research process
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Custom Research
|
||||
|
||||
#### Research Parameters
|
||||
- **Custom Sources**: Specify custom source preferences
|
||||
- **Research Depth**: Adjust research depth and scope
|
||||
- **Language Settings**: Set research language preferences
|
||||
- **Date Ranges**: Specify date ranges for research
|
||||
- **Geographic Focus**: Set geographic focus for research
|
||||
|
||||
#### Research Filters
|
||||
- **Source Types**: Filter by source types and categories
|
||||
- **Credibility Thresholds**: Set minimum credibility requirements
|
||||
- **Date Filters**: Filter by publication date
|
||||
- **Language Filters**: Filter by language
|
||||
- **Topic Filters**: Filter by topic relevance
|
||||
|
||||
### Research Analytics
|
||||
|
||||
#### Performance Tracking
|
||||
- **Research Quality**: Track research quality metrics
|
||||
- **Source Performance**: Monitor source performance
|
||||
- **Accuracy Rates**: Track fact-checking accuracy
|
||||
- **User Satisfaction**: Monitor user satisfaction with research
|
||||
- **Improvement Areas**: Identify areas for improvement
|
||||
|
||||
#### Research Insights
|
||||
- **Trend Analysis**: Analyze research trends and patterns
|
||||
- **Source Analysis**: Analyze source performance and quality
|
||||
- **Content Impact**: Measure impact of research on content
|
||||
- **Audience Engagement**: Track audience engagement with research
|
||||
- **ROI Analysis**: Analyze return on research investment
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
#### Research Quality
|
||||
- **Insufficient Sources**: Add more diverse sources
|
||||
- **Outdated Information**: Update research with current information
|
||||
- **Bias Detection**: Address potential bias in sources
|
||||
- **Fact Verification**: Improve fact-checking process
|
||||
- **Source Credibility**: Improve source selection criteria
|
||||
|
||||
#### Technical Issues
|
||||
- **API Connectivity**: Resolve API connection issues
|
||||
- **Data Processing**: Fix data processing problems
|
||||
- **Source Access**: Resolve source access issues
|
||||
- **Performance Issues**: Address performance concerns
|
||||
- **Integration Problems**: Fix integration issues
|
||||
|
||||
### Getting Help
|
||||
|
||||
#### Support Resources
|
||||
- **Documentation**: Review research integration documentation
|
||||
- **Tutorials**: Watch research feature tutorials
|
||||
- **Best Practices**: Follow research best practices
|
||||
- **Community**: Join user community discussions
|
||||
- **Support**: Contact technical support
|
||||
|
||||
#### Optimization Tips
|
||||
- **Settings Review**: Regularly review research settings
|
||||
- **Source Management**: Maintain source quality and diversity
|
||||
- **Quality Monitoring**: Monitor research quality continuously
|
||||
- **Performance Tracking**: Track research performance metrics
|
||||
- **Continuous Improvement**: Continuously improve research process
|
||||
|
||||
---
|
||||
|
||||
*Ready to enhance your content with comprehensive research? [Start with our First Steps Guide](../../getting-started/first-steps.md) and [Explore Blog Writer Features](overview.md) to begin creating well-researched, authoritative content!*
|
||||
343
docs-site/docs/features/blog-writer/seo-analysis.md
Normal file
343
docs-site/docs/features/blog-writer/seo-analysis.md
Normal file
@@ -0,0 +1,343 @@
|
||||
# SEO Analysis
|
||||
|
||||
ALwrity's Blog Writer includes comprehensive SEO analysis capabilities that automatically optimize your content for search engines, improve readability, and enhance your content's search visibility.
|
||||
|
||||
## What is SEO Analysis?
|
||||
|
||||
SEO Analysis is an AI-powered feature that evaluates your blog content for search engine optimization, providing detailed insights, recommendations, and automated optimizations to improve your content's search ranking and visibility.
|
||||
|
||||
### Key Benefits
|
||||
|
||||
- **Search Optimization**: Optimize content for search engines
|
||||
- **Keyword Analysis**: Analyze and optimize keyword usage
|
||||
- **Readability Enhancement**: Improve content readability and user experience
|
||||
- **Technical SEO**: Ensure proper technical SEO implementation
|
||||
- **Performance Insights**: Track and improve SEO performance
|
||||
|
||||
## SEO Analysis Process
|
||||
|
||||
### 1. Content Analysis
|
||||
|
||||
#### Initial Assessment
|
||||
- **Content Structure**: Analyze heading hierarchy and content organization
|
||||
- **Keyword Density**: Check keyword usage and density
|
||||
- **Content Length**: Evaluate content length and depth
|
||||
- **Readability**: Assess content readability and user experience
|
||||
- **Technical Elements**: Check technical SEO elements
|
||||
|
||||
#### Analysis Parameters
|
||||
```json
|
||||
{
|
||||
"content": "Your blog post content here...",
|
||||
"target_keywords": ["primary keyword", "secondary keyword"],
|
||||
"competitor_urls": ["https://competitor1.com", "https://competitor2.com"],
|
||||
"analysis_depth": "comprehensive",
|
||||
"optimization_goals": ["rankings", "traffic", "engagement"]
|
||||
}
|
||||
```
|
||||
|
||||
### 2. Keyword Analysis
|
||||
|
||||
#### Primary Keywords
|
||||
- **Keyword Density**: Analyze primary keyword density
|
||||
- **Keyword Placement**: Check keyword placement and distribution
|
||||
- **Keyword Variations**: Identify keyword variations and synonyms
|
||||
- **Long-Tail Keywords**: Analyze long-tail keyword usage
|
||||
- **Semantic Keywords**: Check semantic keyword integration
|
||||
|
||||
#### Secondary Keywords
|
||||
- **Related Terms**: Identify related terms and phrases
|
||||
- **LSI Keywords**: Check latent semantic indexing keywords
|
||||
- **Contextual Keywords**: Analyze contextual keyword usage
|
||||
- **Industry Terms**: Include industry-specific terminology
|
||||
- **User Intent**: Match keywords to user search intent
|
||||
|
||||
### 3. Content Optimization
|
||||
|
||||
#### Structure Analysis
|
||||
- **Heading Hierarchy**: Check H1, H2, H3 structure
|
||||
- **Paragraph Length**: Analyze paragraph length and structure
|
||||
- **List Usage**: Check for bullet points and numbered lists
|
||||
- **Content Flow**: Analyze content flow and organization
|
||||
- **Section Balance**: Ensure balanced content sections
|
||||
|
||||
#### Readability Assessment
|
||||
- **Reading Level**: Assess content reading level
|
||||
- **Sentence Length**: Analyze sentence length and complexity
|
||||
- **Word Choice**: Check word choice and vocabulary
|
||||
- **Clarity**: Assess content clarity and understanding
|
||||
- **Engagement**: Evaluate content engagement potential
|
||||
|
||||
## SEO Analysis Features
|
||||
|
||||
### Keyword Optimization
|
||||
|
||||
#### Keyword Research
|
||||
- **Primary Keywords**: Identify main target keywords
|
||||
- **Secondary Keywords**: Find supporting keywords
|
||||
- **Long-Tail Keywords**: Discover specific, less competitive phrases
|
||||
- **LSI Keywords**: Find semantically related terms
|
||||
- **Competitor Keywords**: Analyze competitor keyword usage
|
||||
|
||||
#### Keyword Implementation
|
||||
- **Title Optimization**: Optimize title tags for keywords
|
||||
- **Meta Description**: Create keyword-rich meta descriptions
|
||||
- **Heading Tags**: Optimize heading tags for keywords
|
||||
- **Content Integration**: Naturally integrate keywords into content
|
||||
- **Internal Linking**: Use keywords in internal links
|
||||
|
||||
### Content Structure
|
||||
|
||||
#### Heading Optimization
|
||||
- **H1 Tag**: Single, keyword-rich H1 tag
|
||||
- **H2 Tags**: Logical H2 tag structure
|
||||
- **H3 Tags**: Detailed H3 tag organization
|
||||
- **Heading Balance**: Balanced heading distribution
|
||||
- **Keyword Integration**: Keywords in relevant headings
|
||||
|
||||
#### Content Organization
|
||||
- **Introduction**: Engaging, keyword-rich introduction
|
||||
- **Body Sections**: Well-organized body content
|
||||
- **Conclusion**: Strong, actionable conclusion
|
||||
- **Call-to-Action**: Clear, compelling CTAs
|
||||
- **Content Flow**: Smooth content flow and transitions
|
||||
|
||||
### Technical SEO
|
||||
|
||||
#### Meta Tags
|
||||
- **Title Tag**: Optimized title tag (50-60 characters)
|
||||
- **Meta Description**: Compelling meta description (150-160 characters)
|
||||
- **Meta Keywords**: Relevant meta keywords
|
||||
- **Open Graph**: Social media optimization tags
|
||||
- **Schema Markup**: Structured data implementation
|
||||
|
||||
#### Content Elements
|
||||
- **Image Alt Text**: Descriptive alt text for images
|
||||
- **Internal Links**: Strategic internal linking
|
||||
- **External Links**: Relevant external link placement
|
||||
- **URL Structure**: Clean, keyword-rich URLs
|
||||
- **Content Length**: Optimal content length for SEO
|
||||
|
||||
## Analysis Results
|
||||
|
||||
### SEO Score
|
||||
|
||||
#### Overall Score
|
||||
- **SEO Score**: Overall SEO performance score (0-100)
|
||||
- **Keyword Score**: Keyword optimization score
|
||||
- **Content Score**: Content quality and structure score
|
||||
- **Technical Score**: Technical SEO implementation score
|
||||
- **Readability Score**: Content readability score
|
||||
|
||||
#### Score Breakdown
|
||||
```json
|
||||
{
|
||||
"overall_score": 85,
|
||||
"keyword_score": 90,
|
||||
"content_score": 80,
|
||||
"technical_score": 85,
|
||||
"readability_score": 88,
|
||||
"recommendations": [
|
||||
"Improve meta description length",
|
||||
"Add more internal links",
|
||||
"Optimize image alt text"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Detailed Recommendations
|
||||
|
||||
#### Keyword Optimization
|
||||
- **Keyword Density**: Adjust keyword density for optimal results
|
||||
- **Keyword Placement**: Improve keyword placement and distribution
|
||||
- **Keyword Variations**: Add more keyword variations
|
||||
- **Long-Tail Keywords**: Include more long-tail keywords
|
||||
- **Semantic Keywords**: Add semantically related terms
|
||||
|
||||
#### Content Improvement
|
||||
- **Heading Structure**: Improve heading hierarchy
|
||||
- **Paragraph Length**: Optimize paragraph length
|
||||
- **Content Flow**: Enhance content flow and organization
|
||||
- **Readability**: Improve content readability
|
||||
- **Engagement**: Increase content engagement
|
||||
|
||||
#### Technical Optimization
|
||||
- **Meta Tags**: Optimize meta tags and descriptions
|
||||
- **Image Optimization**: Improve image alt text and optimization
|
||||
- **Internal Linking**: Add strategic internal links
|
||||
- **URL Structure**: Optimize URL structure
|
||||
- **Schema Markup**: Implement structured data
|
||||
|
||||
## Competitive Analysis
|
||||
|
||||
### Competitor Comparison
|
||||
|
||||
#### Content Analysis
|
||||
- **Content Length**: Compare content length with competitors
|
||||
- **Keyword Usage**: Analyze competitor keyword strategies
|
||||
- **Content Structure**: Compare content organization
|
||||
- **Readability**: Assess competitor content readability
|
||||
- **Engagement**: Compare engagement potential
|
||||
|
||||
#### SEO Performance
|
||||
- **Search Rankings**: Compare search engine rankings
|
||||
- **Traffic Analysis**: Analyze competitor traffic patterns
|
||||
- **Backlink Profile**: Compare backlink strategies
|
||||
- **Social Signals**: Analyze social media performance
|
||||
- **Content Gaps**: Identify content opportunities
|
||||
|
||||
### Gap Analysis
|
||||
|
||||
#### Content Opportunities
|
||||
- **Missing Topics**: Identify topics competitors haven't covered
|
||||
- **Content Depth**: Find areas for deeper content coverage
|
||||
- **Keyword Gaps**: Discover keyword opportunities
|
||||
- **Format Gaps**: Identify content format opportunities
|
||||
- **Audience Gaps**: Find underserved audience segments
|
||||
|
||||
#### Competitive Advantages
|
||||
- **Unique Angles**: Develop unique content angles
|
||||
- **Expertise Showcase**: Highlight unique expertise
|
||||
- **Better Coverage**: Provide more comprehensive coverage
|
||||
- **Improved Quality**: Create higher quality content
|
||||
- **Enhanced User Experience**: Improve user experience
|
||||
|
||||
## Performance Tracking
|
||||
|
||||
### SEO Metrics
|
||||
|
||||
#### Search Performance
|
||||
- **Search Rankings**: Track keyword rankings
|
||||
- **Organic Traffic**: Monitor organic search traffic
|
||||
- **Click-Through Rate**: Track search result clicks
|
||||
- **Impression Share**: Monitor search impression share
|
||||
- **Average Position**: Track average search position
|
||||
|
||||
#### Content Performance
|
||||
- **Page Views**: Monitor page view metrics
|
||||
- **Time on Page**: Track user engagement time
|
||||
- **Bounce Rate**: Monitor bounce rate
|
||||
- **Conversion Rate**: Track conversion metrics
|
||||
- **Social Shares**: Monitor social media shares
|
||||
|
||||
### Analytics Integration
|
||||
|
||||
#### Google Analytics
|
||||
- **Traffic Sources**: Analyze traffic sources
|
||||
- **User Behavior**: Track user behavior patterns
|
||||
- **Content Performance**: Monitor content performance
|
||||
- **Conversion Tracking**: Track conversion metrics
|
||||
- **Audience Insights**: Analyze audience demographics
|
||||
|
||||
#### Search Console
|
||||
- **Search Queries**: Monitor search query performance
|
||||
- **Click Data**: Track click-through rates
|
||||
- **Impression Data**: Monitor search impressions
|
||||
- **Position Data**: Track search position changes
|
||||
- **Coverage Issues**: Identify technical issues
|
||||
|
||||
## Best Practices
|
||||
|
||||
### Content Optimization
|
||||
|
||||
#### Keyword Strategy
|
||||
1. **Primary Focus**: Focus on one primary keyword per page
|
||||
2. **Natural Integration**: Integrate keywords naturally
|
||||
3. **Semantic Keywords**: Use semantically related terms
|
||||
4. **Long-Tail Keywords**: Target specific, long-tail phrases
|
||||
5. **User Intent**: Match keywords to user search intent
|
||||
|
||||
#### Content Quality
|
||||
1. **Original Content**: Create original, unique content
|
||||
2. **Comprehensive Coverage**: Provide comprehensive topic coverage
|
||||
3. **Expert Authority**: Demonstrate expertise and authority
|
||||
4. **User Value**: Provide clear value to users
|
||||
5. **Engagement**: Create engaging, shareable content
|
||||
|
||||
### Technical SEO
|
||||
|
||||
#### On-Page Optimization
|
||||
1. **Title Tags**: Create compelling, keyword-rich titles
|
||||
2. **Meta Descriptions**: Write engaging meta descriptions
|
||||
3. **Heading Structure**: Use proper heading hierarchy
|
||||
4. **Internal Linking**: Implement strategic internal linking
|
||||
5. **Image Optimization**: Optimize images with alt text
|
||||
|
||||
#### Site Performance
|
||||
1. **Page Speed**: Optimize page loading speed
|
||||
2. **Mobile Optimization**: Ensure mobile-friendly design
|
||||
3. **SSL Certificate**: Use HTTPS for security
|
||||
4. **Clean URLs**: Use clean, descriptive URLs
|
||||
5. **Schema Markup**: Implement structured data
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### AI-Powered Optimization
|
||||
|
||||
#### Content Enhancement
|
||||
- **Automatic Optimization**: AI-powered content optimization
|
||||
- **Keyword Suggestions**: Intelligent keyword recommendations
|
||||
- **Content Improvement**: Automated content improvement suggestions
|
||||
- **Readability Enhancement**: AI-powered readability improvements
|
||||
- **Engagement Optimization**: Optimize for user engagement
|
||||
|
||||
#### Performance Prediction
|
||||
- **Ranking Prediction**: Predict potential search rankings
|
||||
- **Traffic Forecasting**: Forecast organic traffic potential
|
||||
- **Engagement Prediction**: Predict user engagement levels
|
||||
- **Conversion Optimization**: Optimize for conversions
|
||||
- **ROI Analysis**: Analyze return on SEO investment
|
||||
|
||||
### Customization Options
|
||||
|
||||
#### Analysis Settings
|
||||
- **Keyword Preferences**: Set keyword analysis preferences
|
||||
- **Competitor Selection**: Choose competitors for analysis
|
||||
- **Analysis Depth**: Adjust analysis depth and detail
|
||||
- **Optimization Goals**: Set specific optimization goals
|
||||
- **Quality Standards**: Define quality standards and thresholds
|
||||
|
||||
#### Reporting Options
|
||||
- **Custom Reports**: Create custom SEO reports
|
||||
- **Scheduled Reports**: Set up automated reporting
|
||||
- **Performance Dashboards**: Create performance dashboards
|
||||
- **Alert Systems**: Set up performance alerts
|
||||
- **Export Options**: Export data in various formats
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
#### SEO Analysis Problems
|
||||
- **Low SEO Scores**: Address low SEO performance
|
||||
- **Keyword Issues**: Resolve keyword optimization problems
|
||||
- **Content Quality**: Improve content quality and structure
|
||||
- **Technical Issues**: Fix technical SEO problems
|
||||
- **Performance Issues**: Address performance concerns
|
||||
|
||||
#### Optimization Challenges
|
||||
- **Keyword Overuse**: Avoid keyword stuffing
|
||||
- **Content Duplication**: Prevent duplicate content issues
|
||||
- **Technical Errors**: Fix technical SEO errors
|
||||
- **Performance Problems**: Resolve performance issues
|
||||
- **Competition Analysis**: Improve competitive analysis
|
||||
|
||||
### Getting Help
|
||||
|
||||
#### Support Resources
|
||||
- **Documentation**: Review SEO analysis documentation
|
||||
- **Tutorials**: Watch SEO optimization tutorials
|
||||
- **Best Practices**: Follow SEO best practices
|
||||
- **Community**: Join user community discussions
|
||||
- **Support**: Contact technical support
|
||||
|
||||
#### Optimization Tips
|
||||
- **Regular Analysis**: Perform regular SEO analysis
|
||||
- **Continuous Improvement**: Continuously improve SEO performance
|
||||
- **Performance Monitoring**: Monitor SEO performance metrics
|
||||
- **Competitive Analysis**: Regular competitive analysis
|
||||
- **Quality Assurance**: Maintain high quality standards
|
||||
|
||||
---
|
||||
|
||||
*Ready to optimize your content for search engines? [Start with our First Steps Guide](../../getting-started/first-steps.md) and [Explore Blog Writer Features](overview.md) to begin creating SEO-optimized, high-ranking content!*
|
||||
811
docs-site/docs/features/blog-writer/workflow-guide.md
Normal file
811
docs-site/docs/features/blog-writer/workflow-guide.md
Normal file
@@ -0,0 +1,811 @@
|
||||
# Blog Writer Workflow Guide
|
||||
|
||||
A comprehensive guide to using the ALwrity Blog Writer, from initial research to published content. This guide walks you through each phase of the blog writing process with practical examples and best practices.
|
||||
|
||||
## 🎯 Overview
|
||||
|
||||
The ALwrity Blog Writer follows a sophisticated 6-phase workflow designed to create high-quality, SEO-optimized blog content:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A[Start: Keywords & Topic] --> B[Phase 1: Research & Discovery]
|
||||
B --> C[Phase 2: Outline Generation]
|
||||
C --> D[Phase 3: Content Generation]
|
||||
D --> E[Phase 4: SEO Analysis]
|
||||
E --> F[Phase 5: Quality Assurance]
|
||||
F --> G[Phase 6: Publishing]
|
||||
|
||||
B --> B1[Web Search & Source Collection]
|
||||
B --> B2[Competitor Analysis]
|
||||
B --> B3[Research Caching]
|
||||
|
||||
C --> C1[Content Structure Planning]
|
||||
C --> C2[Section Definition]
|
||||
C --> C3[Source Mapping]
|
||||
|
||||
D --> D1[Section-by-Section Writing]
|
||||
D --> D2[Citation Integration]
|
||||
D --> D3[Continuity Tracking]
|
||||
|
||||
E --> E1[SEO Scoring]
|
||||
E --> E2[Keyword Analysis]
|
||||
E --> E3[Readability Assessment]
|
||||
|
||||
F --> F1[Fact Verification]
|
||||
F --> F2[Hallucination Detection]
|
||||
F --> F3[Quality Scoring]
|
||||
|
||||
G --> G1[Platform Integration]
|
||||
G --> G2[Metadata Generation]
|
||||
G --> G3[Content Publishing]
|
||||
|
||||
style A fill:#e3f2fd
|
||||
style B fill:#e8f5e8
|
||||
style C fill:#fff3e0
|
||||
style D fill:#fce4ec
|
||||
style E fill:#f1f8e9
|
||||
style F fill:#e0f2f1
|
||||
style G fill:#f3e5f5
|
||||
```
|
||||
|
||||
## ⏱️ Timeline Overview
|
||||
|
||||
Each phase has specific time requirements and dependencies:
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Blog Writing Workflow Timeline
|
||||
dateFormat X
|
||||
axisFormat %M:%S
|
||||
|
||||
section Research
|
||||
Keyword Analysis :0, 10
|
||||
Web Search :10, 30
|
||||
Source Collection :20, 40
|
||||
Competitor Analysis :30, 50
|
||||
Research Caching :40, 60
|
||||
|
||||
section Outline
|
||||
Structure Planning :60, 70
|
||||
Section Definition :70, 80
|
||||
Source Mapping :80, 90
|
||||
Title Generation :90, 100
|
||||
|
||||
section Content
|
||||
Section 1 Writing :100, 120
|
||||
Section 2 Writing :120, 140
|
||||
Section 3 Writing :140, 160
|
||||
Citation Integration :160, 170
|
||||
|
||||
section SEO
|
||||
Structure Analysis :170, 180
|
||||
Keyword Analysis :180, 190
|
||||
Readability Check :190, 200
|
||||
SEO Scoring :200, 210
|
||||
|
||||
section Quality
|
||||
Fact Verification :210, 220
|
||||
Hallucination Check :220, 230
|
||||
Quality Scoring :230, 240
|
||||
|
||||
section Publishing
|
||||
Platform Integration :240, 250
|
||||
Metadata Generation :250, 260
|
||||
Content Publishing :260, 270
|
||||
```
|
||||
|
||||
## 📋 Prerequisites
|
||||
|
||||
Before starting, ensure you have:
|
||||
|
||||
- **API Access**: Valid ALwrity API key
|
||||
- **Research Keywords**: 3-5 relevant keywords for your topic
|
||||
- **Target Audience**: Clear understanding of your audience
|
||||
- **Content Goals**: Defined objectives for your blog post
|
||||
- **Word Count Target**: Desired length (typically 1000-3000 words)
|
||||
|
||||
## 🔍 Phase 1: Research & Discovery
|
||||
|
||||
### Step 1: Initiate Research
|
||||
|
||||
**Endpoint**: `POST /api/blog/research/start`
|
||||
|
||||
**Request Example**:
|
||||
```json
|
||||
{
|
||||
"keywords": ["artificial intelligence", "healthcare", "medical diagnosis"],
|
||||
"topic": "AI in Medical Diagnosis",
|
||||
"industry": "Healthcare Technology",
|
||||
"target_audience": "Healthcare professionals and medical researchers",
|
||||
"tone": "Professional and authoritative",
|
||||
"word_count_target": 2000,
|
||||
"persona": {
|
||||
"persona_id": "healthcare_professional",
|
||||
"tone": "authoritative",
|
||||
"audience": "healthcare professionals",
|
||||
"industry": "healthcare"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**What Happens**:
|
||||
1. **Keyword Analysis**: AI analyzes your keywords for search intent and relevance
|
||||
2. **Web Search**: Google Search grounding finds current, credible sources
|
||||
3. **Source Collection**: Gathers 10-20 high-quality research sources
|
||||
4. **Competitor Analysis**: Identifies competing content and gaps
|
||||
5. **Research Caching**: Stores results for future use
|
||||
|
||||
**Expected Duration**: 30-60 seconds
|
||||
|
||||
### Step 2: Monitor Research Progress
|
||||
|
||||
**Endpoint**: `GET /api/blog/research/status/{task_id}`
|
||||
|
||||
**Progress Messages**:
|
||||
- "🔍 Starting research operation..."
|
||||
- "📋 Checking cache for existing research..."
|
||||
- "🌐 Conducting web search..."
|
||||
- "📊 Analyzing sources..."
|
||||
- "✅ Research completed successfully! Found 15 sources and 8 search queries."
|
||||
|
||||
**Success Indicators**:
|
||||
- `status: "completed"`
|
||||
- 10+ credible sources
|
||||
- Comprehensive keyword analysis
|
||||
- Identified content gaps and opportunities
|
||||
|
||||
### Step 3: Review Research Results
|
||||
|
||||
**Key Data Points**:
|
||||
- **Sources**: Credible, recent research materials
|
||||
- **Keyword Analysis**: Primary and secondary keywords
|
||||
- **Competitor Analysis**: Top competing content
|
||||
- **Suggested Angles**: Unique content opportunities
|
||||
- **Search Queries**: AI-generated search terms
|
||||
|
||||
**Quality Checklist**:
|
||||
- ✅ Sources are recent (within 2 years)
|
||||
- ✅ High credibility scores (0.8+)
|
||||
- ✅ Diverse source types (academic, industry, government)
|
||||
- ✅ Relevant to your target audience
|
||||
- ✅ Covers multiple aspects of your topic
|
||||
|
||||
## 📝 Phase 2: Outline Generation
|
||||
|
||||
### Step 1: Generate Outline
|
||||
|
||||
**Endpoint**: `POST /api/blog/outline/start`
|
||||
|
||||
**Request Example**:
|
||||
```json
|
||||
{
|
||||
"research": {
|
||||
"success": true,
|
||||
"sources": [...],
|
||||
"keyword_analysis": {...},
|
||||
"competitor_analysis": {...},
|
||||
"suggested_angles": [...],
|
||||
"search_queries": [...],
|
||||
"grounding_metadata": {...}
|
||||
},
|
||||
"persona": {
|
||||
"persona_id": "healthcare_professional",
|
||||
"tone": "authoritative",
|
||||
"audience": "healthcare professionals",
|
||||
"industry": "healthcare"
|
||||
},
|
||||
"word_count": 2000,
|
||||
"custom_instructions": "Focus on practical implementation examples and case studies"
|
||||
}
|
||||
```
|
||||
|
||||
**What Happens**:
|
||||
1. **Content Structure Planning**: Creates logical flow and organization
|
||||
2. **Section Definition**: Defines headings, subheadings, and key points
|
||||
3. **Source Mapping**: Maps research sources to specific sections
|
||||
4. **Word Count Distribution**: Optimizes word count across sections
|
||||
5. **Title Generation**: Creates multiple compelling title options
|
||||
|
||||
**Expected Duration**: 15-30 seconds
|
||||
|
||||
### Step 2: Review Generated Outline
|
||||
|
||||
**Key Components**:
|
||||
- **Title Options**: 3-5 compelling, SEO-optimized titles
|
||||
- **Outline Sections**: 5-8 well-structured sections
|
||||
- **Source Mapping**: Research sources mapped to sections
|
||||
- **Word Distribution**: Balanced word count across sections
|
||||
- **Quality Metrics**: Overall outline quality score
|
||||
|
||||
**Quality Checklist**:
|
||||
- ✅ Logical content flow and progression
|
||||
- ✅ Balanced word count distribution
|
||||
- ✅ Strong source coverage (80%+ sources mapped)
|
||||
- ✅ SEO-optimized headings and structure
|
||||
- ✅ Engaging title options
|
||||
|
||||
### Step 3: Refine Outline (Optional)
|
||||
|
||||
**Endpoint**: `POST /api/blog/outline/refine`
|
||||
|
||||
**Common Refinements**:
|
||||
- **Enhance Flow**: Improve section transitions
|
||||
- **Optimize Structure**: Better heading hierarchy
|
||||
- **Rebalance Word Count**: Adjust section lengths
|
||||
- **Add Sections**: Include missing content areas
|
||||
- **Improve SEO**: Better keyword distribution
|
||||
|
||||
## ✍️ Phase 3: Content Generation
|
||||
|
||||
### Step 1: Generate Section Content
|
||||
|
||||
**Endpoint**: `POST /api/blog/section/generate`
|
||||
|
||||
**Request Example**:
|
||||
```json
|
||||
{
|
||||
"section": {
|
||||
"id": "intro",
|
||||
"heading": "Introduction: AI Revolution in Medical Diagnosis",
|
||||
"subheadings": [
|
||||
"Current State of Medical Diagnosis",
|
||||
"The Promise of AI Technology"
|
||||
],
|
||||
"key_points": [
|
||||
"AI adoption rates in healthcare",
|
||||
"Key benefits of AI diagnosis",
|
||||
"Overview of current applications"
|
||||
],
|
||||
"references": [...],
|
||||
"target_words": 300,
|
||||
"keywords": ["AI healthcare", "medical diagnosis", "healthcare technology"]
|
||||
},
|
||||
"keywords": ["AI healthcare", "medical diagnosis"],
|
||||
"tone": "professional",
|
||||
"persona": {
|
||||
"persona_id": "healthcare_professional",
|
||||
"tone": "authoritative",
|
||||
"audience": "healthcare professionals",
|
||||
"industry": "healthcare"
|
||||
},
|
||||
"mode": "polished"
|
||||
}
|
||||
```
|
||||
|
||||
**What Happens**:
|
||||
1. **Content Generation**: AI writes section content based on outline
|
||||
2. **Citation Integration**: Automatically includes source citations
|
||||
3. **Continuity Tracking**: Maintains content flow and consistency
|
||||
4. **Quality Assurance**: Implements quality checks during generation
|
||||
|
||||
**Expected Duration**: 20-40 seconds per section
|
||||
|
||||
### Step 2: Review Generated Content
|
||||
|
||||
**Key Components**:
|
||||
- **Markdown Content**: Well-formatted, engaging content
|
||||
- **Citations**: Properly integrated source references
|
||||
- **Continuity Metrics**: Content flow and consistency scores
|
||||
- **Quality Scores**: Readability and engagement metrics
|
||||
|
||||
**Quality Checklist**:
|
||||
- ✅ Meets target word count (±10%)
|
||||
- ✅ Includes relevant citations
|
||||
- ✅ Maintains professional tone
|
||||
- ✅ Good readability score (70+)
|
||||
- ✅ Proper keyword integration
|
||||
|
||||
### Step 3: Generate Remaining Sections
|
||||
|
||||
Repeat the process for each outline section:
|
||||
|
||||
1. **Introduction** (300 words)
|
||||
2. **Key Applications** (500 words)
|
||||
3. **Benefits and Challenges** (400 words)
|
||||
4. **Implementation Strategies** (500 words)
|
||||
5. **Future Outlook** (300 words)
|
||||
|
||||
**Pro Tips**:
|
||||
- Generate sections in order for better continuity
|
||||
- Review each section before proceeding
|
||||
- Use continuity metrics to ensure flow
|
||||
- Adjust tone and style as needed
|
||||
|
||||
## 🔍 Phase 4: SEO Analysis & Optimization
|
||||
|
||||
### Step 1: Perform SEO Analysis
|
||||
|
||||
**Endpoint**: `POST /api/blog/seo/analyze`
|
||||
|
||||
**Request Example**:
|
||||
```json
|
||||
{
|
||||
"content": "# AI in Medical Diagnosis\n\nComplete blog content here...",
|
||||
"blog_title": "AI in Medical Diagnosis: Transforming Healthcare Through Technology",
|
||||
"keywords": ["AI healthcare", "medical diagnosis", "healthcare technology"],
|
||||
"research_data": {
|
||||
"sources": [...],
|
||||
"keyword_analysis": {...},
|
||||
"competitor_analysis": {...}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**What Happens**:
|
||||
1. **Content Structure Analysis**: Evaluates heading hierarchy and organization
|
||||
2. **Keyword Optimization**: Analyzes keyword density and placement
|
||||
3. **Readability Assessment**: Checks content readability and flow
|
||||
4. **SEO Scoring**: Generates comprehensive SEO scores
|
||||
5. **Recommendation Generation**: Provides actionable optimization suggestions
|
||||
|
||||
**Expected Duration**: 10-20 seconds
|
||||
|
||||
### Step 2: Review SEO Analysis
|
||||
|
||||
**Key Metrics**:
|
||||
- **Overall SEO Score**: 0-100 (aim for 80+)
|
||||
- **Keyword Density**: Optimal range (1-3%)
|
||||
- **Readability Score**: Flesch Reading Ease (aim for 70+)
|
||||
- **Structure Analysis**: Heading hierarchy and organization
|
||||
- **Recommendations**: Specific improvement suggestions
|
||||
|
||||
**Quality Checklist**:
|
||||
- ✅ SEO score above 80
|
||||
- ✅ Optimal keyword density
|
||||
- ✅ Good readability score
|
||||
- ✅ Proper heading structure
|
||||
- ✅ Actionable recommendations
|
||||
|
||||
### Step 3: Generate SEO Metadata
|
||||
|
||||
**Endpoint**: `POST /api/blog/seo/metadata`
|
||||
|
||||
**Request Example**:
|
||||
```json
|
||||
{
|
||||
"content": "# AI in Medical Diagnosis\n\nComplete blog content here...",
|
||||
"title": "AI in Medical Diagnosis: Transforming Healthcare Through Technology",
|
||||
"keywords": ["AI healthcare", "medical diagnosis", "healthcare technology"],
|
||||
"research_data": {
|
||||
"sources": [...],
|
||||
"keyword_analysis": {...}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Generated Metadata**:
|
||||
- **SEO Title**: Optimized for search engines
|
||||
- **Meta Description**: Compelling 155-character description
|
||||
- **URL Slug**: SEO-friendly URL structure
|
||||
- **Tags & Categories**: Relevant content classification
|
||||
- **Social Media Tags**: Open Graph and Twitter Card data
|
||||
- **JSON-LD Schema**: Structured data for search engines
|
||||
|
||||
## 🛡️ Phase 5: Quality Assurance
|
||||
|
||||
### Step 1: Perform Hallucination Check
|
||||
|
||||
**Endpoint**: `POST /api/blog/quality/hallucination-check`
|
||||
|
||||
**Request Example**:
|
||||
```json
|
||||
{
|
||||
"content": "Complete blog content here...",
|
||||
"sources": [
|
||||
"https://example.com/source1",
|
||||
"https://example.com/source2"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**What Happens**:
|
||||
1. **Fact Verification**: Checks content against research sources
|
||||
2. **Hallucination Detection**: Identifies potential AI-generated inaccuracies
|
||||
3. **Content Validation**: Ensures factual accuracy and credibility
|
||||
4. **Quality Scoring**: Generates content quality metrics
|
||||
|
||||
**Expected Duration**: 15-25 seconds
|
||||
|
||||
### Step 2: Review Quality Results
|
||||
|
||||
**Key Metrics**:
|
||||
- **Factual Accuracy**: Percentage of verified claims
|
||||
- **Source Coverage**: Percentage of content backed by sources
|
||||
- **Quality Score**: Overall content quality (0-100)
|
||||
- **Improvement Suggestions**: Specific enhancement recommendations
|
||||
|
||||
**Quality Checklist**:
|
||||
- ✅ High factual accuracy (90%+)
|
||||
- ✅ Good source coverage (80%+)
|
||||
- ✅ Quality score above 85
|
||||
- ✅ No major factual errors
|
||||
- ✅ Clear improvement suggestions
|
||||
|
||||
### Step 3: Content Optimization (Optional)
|
||||
|
||||
**Endpoint**: `POST /api/blog/section/optimize`
|
||||
|
||||
**Common Optimizations**:
|
||||
- **Improve Readability**: Simplify complex sentences
|
||||
- **Enhance Engagement**: Add compelling examples and stories
|
||||
- **Strengthen Arguments**: Provide more supporting evidence
|
||||
- **Fix Flow Issues**: Improve section transitions
|
||||
- **Optimize Keywords**: Better keyword integration
|
||||
|
||||
## 🚀 Phase 6: Publishing & Distribution
|
||||
|
||||
### Step 1: Prepare for Publishing
|
||||
|
||||
**Endpoint**: `POST /api/blog/publish`
|
||||
|
||||
**Request Example**:
|
||||
```json
|
||||
{
|
||||
"platform": "wordpress",
|
||||
"html": "<h1>AI in Medical Diagnosis</h1><p>Content here...</p>",
|
||||
"metadata": {
|
||||
"seo_title": "AI in Medical Diagnosis: Transforming Healthcare Through Technology",
|
||||
"meta_description": "Discover how AI is transforming medical diagnosis...",
|
||||
"url_slug": "ai-medical-diagnosis-healthcare-technology",
|
||||
"blog_tags": ["AI healthcare", "medical diagnosis", "healthcare technology"],
|
||||
"blog_categories": ["Healthcare Technology", "Artificial Intelligence"],
|
||||
"social_hashtags": ["#AIHealthcare", "#MedicalAI", "#HealthTech"]
|
||||
},
|
||||
"schedule_time": "2024-01-20T09:00:00Z"
|
||||
}
|
||||
```
|
||||
|
||||
**What Happens**:
|
||||
1. **Platform Integration**: Connects to WordPress or Wix
|
||||
2. **Content Formatting**: Formats content for target platform
|
||||
3. **Metadata Application**: Applies SEO metadata and tags
|
||||
4. **Publishing**: Publishes content or schedules for later
|
||||
|
||||
**Expected Duration**: 5-15 seconds
|
||||
|
||||
### Step 2: Verify Publication
|
||||
|
||||
**Success Indicators**:
|
||||
- ✅ Content published successfully
|
||||
- ✅ SEO metadata applied correctly
|
||||
- ✅ Social media tags included
|
||||
- ✅ URL generated and accessible
|
||||
- ✅ Scheduled publication confirmed (if applicable)
|
||||
|
||||
## 🔄 Blog Rewrite Workflow
|
||||
|
||||
The Blog Writer includes a sophisticated rewrite system for content improvement:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start([User Provides Feedback]) --> Analyze[Analyze Original Content]
|
||||
Analyze --> Extract[Extract Improvement Areas]
|
||||
Extract --> Plan[Plan Rewrite Strategy]
|
||||
|
||||
Plan --> Preserve[Preserve Core Elements]
|
||||
Plan --> Enhance[Enhance Identified Areas]
|
||||
Plan --> Add[Add New Elements]
|
||||
|
||||
Preserve --> Structure[Maintain Structure]
|
||||
Preserve --> Arguments[Keep Main Arguments]
|
||||
Preserve --> Data[Preserve Key Data]
|
||||
|
||||
Enhance --> Engagement[Improve Engagement]
|
||||
Enhance --> Clarity[Enhance Clarity]
|
||||
Enhance --> Examples[Add Examples]
|
||||
|
||||
Add --> Hook[Compelling Hook]
|
||||
Add --> Transitions[Better Transitions]
|
||||
Add --> CTA[Strong Call-to-Action]
|
||||
|
||||
Structure --> Rewrite[Generate Rewritten Content]
|
||||
Arguments --> Rewrite
|
||||
Data --> Rewrite
|
||||
Engagement --> Rewrite
|
||||
Clarity --> Rewrite
|
||||
Examples --> Rewrite
|
||||
Hook --> Rewrite
|
||||
Transitions --> Rewrite
|
||||
CTA --> Rewrite
|
||||
|
||||
Rewrite --> Quality[Quality Assessment]
|
||||
Quality --> Compare[Compare Improvements]
|
||||
Compare --> Final[Final Review]
|
||||
Final --> Complete([Enhanced Blog])
|
||||
|
||||
style Start fill:#e3f2fd
|
||||
style Analyze fill:#e8f5e8
|
||||
style Plan fill:#fff3e0
|
||||
style Rewrite fill:#fce4ec
|
||||
style Quality fill:#f1f8e9
|
||||
style Complete fill:#e1f5fe
|
||||
```
|
||||
|
||||
## 🔀 Workflow Decision Tree
|
||||
|
||||
The Blog Writer adapts its workflow based on your specific needs:
|
||||
|
||||
```mermaid
|
||||
flowchart TD
|
||||
Start([Start Blog Creation]) --> Input{What's your content goal?}
|
||||
|
||||
Input -->|Quick Content| Quick[Medium Blog Generation<br/>≤1000 words]
|
||||
Input -->|Comprehensive Content| Full[Full Blog Workflow<br/>1000+ words]
|
||||
Input -->|Content Improvement| Rewrite[Blog Rewriting<br/>Based on feedback]
|
||||
|
||||
Quick --> QuickResearch[Basic Research]
|
||||
QuickResearch --> QuickOutline[Simple Outline]
|
||||
QuickOutline --> QuickContent[Single-pass Generation]
|
||||
QuickContent --> QuickSEO[Basic SEO]
|
||||
QuickSEO --> QuickPublish[Publish]
|
||||
|
||||
Full --> FullResearch[Comprehensive Research]
|
||||
FullResearch --> FullOutline[Detailed Outline]
|
||||
FullOutline --> FullContent[Section-by-Section]
|
||||
FullContent --> FullSEO[Advanced SEO]
|
||||
FullSEO --> FullQA[Quality Assurance]
|
||||
FullQA --> FullPublish[Publish]
|
||||
|
||||
Rewrite --> RewriteAnalysis[Analyze Current Content]
|
||||
RewriteAnalysis --> RewriteFeedback[Apply User Feedback]
|
||||
RewriteFeedback --> RewriteImprove[Improve Content]
|
||||
RewriteImprove --> RewriteQA[Quality Check]
|
||||
RewriteQA --> RewritePublish[Publish Updated]
|
||||
|
||||
style Start fill:#e3f2fd
|
||||
style Quick fill:#e8f5e8
|
||||
style Full fill:#fff3e0
|
||||
style Rewrite fill:#fce4ec
|
||||
style QuickPublish fill:#e1f5fe
|
||||
style FullPublish fill:#e1f5fe
|
||||
style RewritePublish fill:#e1f5fe
|
||||
```
|
||||
|
||||
## 🔄 Blog Rewrite Workflow
|
||||
|
||||
### When to Use Blog Rewrite
|
||||
|
||||
The Blog Rewrite feature is ideal when you need to:
|
||||
|
||||
- **Improve Engagement**: Make content more compelling and reader-friendly
|
||||
- **Add Examples**: Include specific, relevant examples and case studies
|
||||
- **Enhance Clarity**: Improve readability and reduce complexity
|
||||
- **Update Information**: Incorporate new data or recent developments
|
||||
- **Refine Tone**: Adjust the writing style for different audiences
|
||||
- **Optimize Structure**: Improve flow and logical progression
|
||||
|
||||
### Rewrite Process
|
||||
|
||||
#### Step 1: Provide Feedback
|
||||
```json
|
||||
{
|
||||
"user_feedback": {
|
||||
"improvements_needed": [
|
||||
"Make the introduction more engaging",
|
||||
"Add more specific examples",
|
||||
"Improve the conclusion"
|
||||
],
|
||||
"target_audience": "healthcare professionals",
|
||||
"tone": "professional",
|
||||
"focus_areas": ["engagement", "examples", "clarity"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Step 2: Configure Rewrite Options
|
||||
```json
|
||||
{
|
||||
"rewrite_options": {
|
||||
"preserve_structure": true,
|
||||
"enhance_engagement": true,
|
||||
"add_examples": true,
|
||||
"improve_clarity": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Step 3: Monitor Progress
|
||||
- **Started**: Task initiated successfully
|
||||
- **Analyzing**: Reviewing original content and feedback
|
||||
- **Planning**: Developing rewrite strategy
|
||||
- **Rewriting**: Generating improved content
|
||||
- **Reviewing**: Final quality assessment
|
||||
- **Completed**: Enhanced content ready
|
||||
|
||||
#### Step 4: Review Results
|
||||
The rewrite system provides:
|
||||
- **Original vs. Rewritten Content**: Side-by-side comparison
|
||||
- **Improvements Made**: Detailed list of enhancements
|
||||
- **Quality Metrics**: Before/after scores for engagement, readability, clarity
|
||||
- **Preserved Elements**: What was maintained from the original
|
||||
- **New Elements**: What was added or enhanced
|
||||
|
||||
### Rewrite Best Practices
|
||||
|
||||
#### Effective Feedback
|
||||
- **Be Specific**: Instead of "make it better," specify "add more healthcare examples"
|
||||
- **Focus Areas**: Identify 2-3 key areas for improvement
|
||||
- **Target Audience**: Clearly define who will read the content
|
||||
- **Tone Guidelines**: Specify the desired writing style
|
||||
|
||||
#### Quality Expectations
|
||||
- **Engagement Score**: Target 0.85+ for compelling content
|
||||
- **Readability Score**: Target 0.80+ for clear communication
|
||||
- **Clarity Score**: Target 0.90+ for professional content
|
||||
- **Overall Improvement**: Expect 15-25% improvement in quality metrics
|
||||
|
||||
#### Common Use Cases
|
||||
1. **Content Refresh**: Update existing blog posts with new information
|
||||
2. **Audience Adaptation**: Modify content for different reader groups
|
||||
3. **Engagement Boost**: Make technical content more accessible
|
||||
4. **SEO Enhancement**: Improve content for better search rankings
|
||||
5. **Brand Alignment**: Adjust tone to match brand voice
|
||||
|
||||
## 🎯 Best Practices
|
||||
|
||||
### Research Phase
|
||||
- **Use Specific Keywords**: Avoid overly broad terms
|
||||
- **Define Clear Audience**: Be specific about target readers
|
||||
- **Set Realistic Word Count**: 1000-3000 words typically optimal
|
||||
- **Review Source Quality**: Ensure credible, recent sources
|
||||
|
||||
### Outline Phase
|
||||
- **Review Title Options**: Choose the most compelling and SEO-friendly
|
||||
- **Check Section Balance**: Ensure even word count distribution
|
||||
- **Verify Source Mapping**: Confirm good source coverage
|
||||
- **Refine as Needed**: Use refinement tools for better structure
|
||||
|
||||
### Content Generation
|
||||
- **Generate in Order**: Maintain content flow and continuity
|
||||
- **Review Each Section**: Check quality before proceeding
|
||||
- **Monitor Continuity**: Use continuity metrics for consistency
|
||||
- **Adjust Tone**: Ensure consistent voice throughout
|
||||
|
||||
### SEO Optimization
|
||||
- **Aim for High Scores**: Target SEO score above 80
|
||||
- **Optimize Keywords**: Ensure proper density and placement
|
||||
- **Improve Readability**: Target Flesch score above 70
|
||||
- **Follow Recommendations**: Implement suggested improvements
|
||||
|
||||
### Quality Assurance
|
||||
- **Verify Facts**: Ensure high factual accuracy
|
||||
- **Check Sources**: Confirm good source coverage
|
||||
- **Review Quality**: Aim for quality score above 85
|
||||
- **Address Issues**: Fix any identified problems
|
||||
|
||||
### Publishing
|
||||
- **Choose Right Platform**: Select appropriate publishing platform
|
||||
- **Apply Metadata**: Ensure all SEO metadata is included
|
||||
- **Schedule Strategically**: Publish at optimal times
|
||||
- **Verify Results**: Confirm successful publication
|
||||
|
||||
## 🚨 Common Issues & Solutions
|
||||
|
||||
### Research Issues
|
||||
**Problem**: Low-quality sources
|
||||
**Solution**: Refine keywords, adjust topic focus, increase word count target
|
||||
|
||||
**Problem**: Insufficient research data
|
||||
**Solution**: Add more keywords, broaden topic scope, adjust target audience
|
||||
|
||||
### Outline Issues
|
||||
**Problem**: Poor section structure
|
||||
**Solution**: Use outline refinement, adjust custom instructions, review research data
|
||||
|
||||
**Problem**: Unbalanced word distribution
|
||||
**Solution**: Use rebalance outline feature, adjust target word counts
|
||||
|
||||
### Content Issues
|
||||
**Problem**: Low continuity scores
|
||||
**Solution**: Generate sections in order, review continuity metrics, adjust tone
|
||||
|
||||
**Problem**: Poor readability
|
||||
**Solution**: Use content optimization, simplify language, improve structure
|
||||
|
||||
### SEO Issues
|
||||
**Problem**: Low SEO scores
|
||||
**Solution**: Improve keyword density, enhance structure, follow recommendations
|
||||
|
||||
**Problem**: Poor readability scores
|
||||
**Solution**: Simplify sentences, improve paragraph structure, use shorter words
|
||||
|
||||
### Quality Issues
|
||||
**Problem**: Low factual accuracy
|
||||
**Solution**: Review sources, improve citations, verify claims
|
||||
|
||||
**Problem**: Poor source coverage
|
||||
**Solution**: Add more research sources, improve source mapping, enhance citations
|
||||
|
||||
## 📊 Performance Metrics
|
||||
|
||||
### Target Metrics Visualization
|
||||
|
||||
```mermaid
|
||||
pie title Quality Metrics Distribution
|
||||
"Research Quality (25%)" : 25
|
||||
"Content Quality (30%)" : 30
|
||||
"SEO Performance (20%)" : 20
|
||||
"Factual Accuracy (15%)" : 15
|
||||
"Readability (10%)" : 10
|
||||
```
|
||||
|
||||
### Performance Dashboard
|
||||
|
||||
```mermaid
|
||||
graph LR
|
||||
subgraph "Research Phase"
|
||||
R1[Sources: 10+]
|
||||
R2[Credibility: 0.8+]
|
||||
R3[Coverage: 80%+]
|
||||
end
|
||||
|
||||
subgraph "Outline Phase"
|
||||
O1[Structure: Optimal]
|
||||
O2[Balance: Even]
|
||||
O3[SEO: Optimized]
|
||||
end
|
||||
|
||||
subgraph "Content Phase"
|
||||
C1[Quality: 85+]
|
||||
C2[Readability: 70+]
|
||||
C3[Continuity: 90+]
|
||||
end
|
||||
|
||||
subgraph "SEO Phase"
|
||||
S1[Score: 80+]
|
||||
S2[Keywords: Optimal]
|
||||
S3[Structure: Good]
|
||||
end
|
||||
|
||||
subgraph "Quality Phase"
|
||||
Q1[Accuracy: 90+]
|
||||
Q2[Sources: 80%+]
|
||||
Q3[Facts: Verified]
|
||||
end
|
||||
|
||||
R1 --> O1
|
||||
R2 --> O2
|
||||
R3 --> O3
|
||||
O1 --> C1
|
||||
O2 --> C2
|
||||
O3 --> C3
|
||||
C1 --> S1
|
||||
C2 --> S2
|
||||
C3 --> S3
|
||||
S1 --> Q1
|
||||
S2 --> Q2
|
||||
S3 --> Q3
|
||||
|
||||
style R1 fill:#e8f5e8
|
||||
style R2 fill:#e8f5e8
|
||||
style R3 fill:#e8f5e8
|
||||
style O1 fill:#fff3e0
|
||||
style O2 fill:#fff3e0
|
||||
style O3 fill:#fff3e0
|
||||
style C1 fill:#fce4ec
|
||||
style C2 fill:#fce4ec
|
||||
style C3 fill:#fce4ec
|
||||
style S1 fill:#f1f8e9
|
||||
style S2 fill:#f1f8e9
|
||||
style S3 fill:#f1f8e9
|
||||
style Q1 fill:#e0f2f1
|
||||
style Q2 fill:#e0f2f1
|
||||
style Q3 fill:#e0f2f1
|
||||
```
|
||||
|
||||
### Target Metrics
|
||||
- **Research Quality**: 10+ credible sources, 0.8+ credibility scores
|
||||
- **Outline Quality**: 80%+ source coverage, balanced word distribution
|
||||
- **Content Quality**: 85+ quality score, 70+ readability score
|
||||
- **SEO Performance**: 80+ SEO score, optimal keyword density
|
||||
- **Factual Accuracy**: 90%+ accuracy, 80%+ source coverage
|
||||
|
||||
### Monitoring
|
||||
- **Track Progress**: Monitor each phase completion
|
||||
- **Review Metrics**: Check quality scores at each step
|
||||
- **Address Issues**: Fix problems as they arise
|
||||
- **Optimize Continuously**: Use feedback for improvement
|
||||
|
||||
---
|
||||
|
||||
*This workflow guide provides a comprehensive approach to using the ALwrity Blog Writer effectively. For technical details, see the [API Reference](api-reference.md) and [Implementation Overview](implementation-overview.md).*
|
||||
Reference in New Issue
Block a user