ac-tool/backend/prompts
Vadym Samoilenko 72c50b2c92 Initial commit — AC Tool unified application
Merges ac-helper (PHP Activation Calendar) and brief-extractor (Python AI)
into a single Docker app with React/TypeScript frontend.

Features:
- Brief upload → AI extraction → review → Activation Calendar import
- Handsontable v17 spreadsheet with dependent dropdowns (148 categories)
- AI natural language commands via Gemini (YOLO mode, voice input)
- Azure AD MSAL SPA PKCE authentication, user roles (user/admin)
- CSV Activation Calendar export
- Real-time WebSocket job progress
- Admin: user management, dropdown Excel upload
- Multi-stage Dockerfile, docker-compose, nginx proxy instructions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 13:24:46 +00:00
..
backup_old Initial commit — AC Tool unified application 2026-03-23 13:24:46 +00:00
ac_command.txt Initial commit — AC Tool unified application 2026-03-23 13:24:46 +00:00
consolidation_analysis.txt Initial commit — AC Tool unified application 2026-03-23 13:24:46 +00:00
multi_perspective_analysis.txt Initial commit — AC Tool unified application 2026-03-23 13:24:46 +00:00
README.md Initial commit — AC Tool unified application 2026-03-23 13:24:46 +00:00
system_multi_perspective.txt Initial commit — AC Tool unified application 2026-03-23 13:24:46 +00:00
system_validation.txt Initial commit — AC Tool unified application 2026-03-23 13:24:46 +00:00
universal_schema.json Initial commit — AC Tool unified application 2026-03-23 13:24:46 +00:00
validation_analysis.txt Initial commit — AC Tool unified application 2026-03-23 13:24:46 +00:00

AI Prompts Directory

This directory contains the AI prompts used by the Enhanced Brief Processing System, extracted from the main Python code for better maintainability and editability.

Files Overview

Core Analysis Prompts

  • multi_perspective_analysis.txt - Main prompt for extracting marketing deliverables from documents

    • Used in _perform_multi_perspective_analysis() method
    • Contains comprehensive extraction rules and multiplier handling logic
    • Template parameter: {doc_type} (e.g., "powerpoint", "word", "pdf")
  • validation_analysis.txt - Quality assurance prompt for validating extractions

    • Used in _enhance_and_validate_results() method
    • Validates completeness and accuracy of initial extraction
    • Template parameters: {asset_count}, {doc_type}

System Messages

  • system_multi_perspective.txt - System message for main analysis
  • system_validation.txt - System message for validation phase

Usage in Code

The prompts are loaded dynamically using the _load_prompt() method in the DocumentAnalyzer class:

# Load and format prompts
prompt_template = self._load_prompt('multi_perspective_analysis')
prompt = prompt_template.format(doc_type=doc_type.value)

system_message = self._load_prompt('system_multi_perspective')

Benefits of External Prompts

  1. Easy Editing - Modify prompts without touching Python code
  2. Version Control - Track prompt changes separately from code changes
  3. Readability - View full prompts in text editors with proper formatting
  4. Collaboration - Non-programmers can review and modify prompts
  5. Testing - Easier to A/B test different prompt variations

Template Variables

multi_perspective_analysis.txt

  • {doc_type} - Document type (powerpoint, word, pdf, excel)

validation_analysis.txt

  • {asset_count} - Number of assets found in initial extraction
  • {doc_type} - Document type from metadata

Modifying Prompts

  1. Edit the .txt files directly
  2. Use standard Python string formatting for variables: {variable_name}
  3. Test changes by running the processing script
  4. No code changes required when modifying prompt content