3.2 KiB
3.2 KiB
Marketing Assistant AI - Data Directory
This directory contains the data used by the Marketing Assistant AI system.
Structure
- past_campaigns/: Contains JSON files of past marketing campaigns used for training and reference
- user_queries/: Stores user queries and requests for analytics and model improvement
- style_guidelines/: Contains brand tone and voice guidelines
- vector_store/: Generated vector database for content retrieval (created automatically)
- db/: Contains SQLite database files for structured data storage
File Formats
Past Campaigns
Past campaign files are stored as JSON with the following structure:
{
"content": "The actual marketing content text",
"content_type": "email_campaign|social_media|blog_post|etc",
"metadata": {
"campaign_name": "Name of the campaign",
"performance_metrics": {
"open_rate": 0.42,
"click_rate": 0.15,
"conversion_rate": 0.08
},
"content_type": "Same as above",
"added_at": "2024-01-01T12:00:00Z",
"training_data": true
},
"document_id": "unique-identifier",
"timestamp": "2024-01-01T12:00:00Z"
}
User Queries
User query files store information about requests made to the AI:
{
"prompt": "The user's prompt text",
"parameters": {
"content_type": "Type of content requested",
"tone": "Requested tone",
"length": "short|medium|long",
"include_cta": true|false
},
"timestamp": "2024-01-01T12:00:00Z",
"generated_content": "The AI-generated content",
"feedback": "Optional user feedback",
"performance_score": 0.95
}
Brand Style Guidelines
Brand style is stored as a JSON file with the following structure:
{
"brand_name": "Adriana James",
"tone": ["professional", "friendly", "inspirational"],
"voice_characteristics": ["clear", "direct", "empowering"],
"taboo_words": ["cheap", "discount", "bargain"],
"preferred_terms": {
"customers": "clients",
"products": "solutions",
"problems": "challenges"
},
"last_updated": "2024-01-01T12:00:00Z",
"version": "1.0"
}
Data Management
Adding Past Campaigns
- Use the API endpoint
POST /training-datawith the appropriate JSON payload - Alternatively, add a JSON file to the
past_campaignsdirectory following the format above
Updating Brand Style
- Use the API endpoint
PUT /brand-stylewith the updated style guidelines - The system will automatically update the style file and create a backup
Managing User Queries
- User queries are automatically stored when using the generation API
- Each query is stored with its parameters, generated content, and any feedback
- Use the
GET /user-queriesendpoint to retrieve historical data with pagination
Vector Store Management
The vector store is automatically maintained by the system:
- New content is automatically embedded and added to the store
- Similar content can be retrieved using the
POST /find-similarendpoint - The store is periodically optimized for performance
Backup and Maintenance
- All JSON files are versioned and can be restored if needed
- The SQLite database is automatically backed up daily
- The vector store can be rebuilt from the source content if necessary