An intelligent system for analyzing enterprise AI case studies using the Claude 3.5 Sonnet API. The system supports two main modes of operation:
- Analyzing case studies from provided URLs in a CSV file.
- Discovering and analyzing case studies from company websites using the Firecrawl API.
- CSV Mode: Analyze specific case study URLs provided in a CSV file.
- Website Mode: Automatically discover and analyze case studies from company websites using Firecrawl's map endpoint.
- Intelligent case study identification powered by Claude 3.5 Sonnet.
- Content extraction handled by Firecrawl's scrape endpoint.
- Content Extraction (via Firecrawl API):
- Map endpoint (
/v1/map
): Discovers links on the website. - Scrape endpoint (
/v1/scrape
): Extracts content in markdown format and retrieves metadata for context.
- Map endpoint (
- Case Study Identification:
- Uses Claude to identify potential case study links.
- Filters content to ensure only relevant case studies are processed.
- Content Analysis:
- Checks for enterprise AI qualification.
- Performs a detailed, multi-section analysis.
- Assesses business impact and technology stack.
The system creates three types of reports:
- Executive Summary
- AI Strategy Analysis
- Technical Implementation Details
- Business Impact Assessment
- Key Success Factors
- Lessons Learned
- Patterns across multiple implementations.
- Common success factors.
- Technology trends.
- ROI metrics and implementation challenges.
- Company profiles
- Technology stacks
- Success metrics and implementation scales
- Overall trends in enterprise AI adoption
-
Map Endpoint (
/v1/map
):map_result = app.map_url(website_url, params={'includeSubdomains': True})
Used for discovering all links on a website.
-
Scrape Endpoint (
/v1/scrape
):params = { "url": url, "onlyMainContent": True, "formats": ["markdown"], "timeout": 30000 }
Used for content extraction from specific pages.
- Link Analysis: Identifies relevant case study URLs.
- Content Analysis: Checks for enterprise AI relevance.
- Report Generation: Produces comprehensive, structured analysis reports.
Input (CSV/Website) → Firecrawl Map → Link Analysis → Content Extraction → Claude Analysis → Report Generation
project/
├── src/
│ ├── scrapers/
│ │ ├── website_crawler.py # Firecrawl map integration
│ │ └── web_loader.py # Firecrawl scrape integration
│ ├── processors/
│ │ └── claude_processor.py # Claude API integration
│ ├── config.py # Configuration settings
│ └── main.py # Main application logic
├── input/ # Input CSV files
├── raw_content/ # Extracted raw content
│ └── case_[id]/
│ ├── raw_content.txt
│ ├── structured_content.json
│ └── metadata.json
├── reports/
│ ├── individual/ # Individual reports
│ ├── cross_case_analysis/ # Cross-case analysis
│ └── executive_dashboard/ # Executive dashboard
└── logs/ # Processing logs
-
Clone the repository:
git clone https://github.com/yourusername/ai-case-study-analyzer.git cd ai-case-study-analyzer
-
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables in
.env
:ANTHROPIC_API_KEY=your_claude_api_key FIRECRAWL_API_KEY=your_firecrawl_api_key
- Place your CSV file in the
input/
directory with a column namedurl
containing case study URLs.
- Provide a company website URL to:
- Map all website links using Firecrawl.
- Identify and analyze case study content using Claude.
- Extract content and generate comprehensive reports.
Run the analyzer:
python -m src.main
-
Map Endpoint:
- Discovers all links on a website.
- Parameters:
includeSubdomains: true
,ignoreSitemap: false
,limit: 5000
.
-
Scrape Endpoint:
- Extracts main content from individual pages.
- Parameters:
onlyMainContent: true
,formats: ["markdown"]
,timeout: 30000
.
-
Link Analysis:
- Model:
claude-3-5-sonnet-20241022
. - Temperature:
0.2
. - Max tokens:
4096
.
- Model:
-
Content Analysis:
- Checks for enterprise AI qualification.
- Performs multi-section analysis and report generation.
# Enterprise AI Implementation Report: [Company Name]
1. **Executive Summary**
[Summary of implementation and outcomes]
2. **AI Strategy Analysis**
[Detailed analysis of AI strategy]
{
"case_1": {
"company": {...},
"technologies": [...],
"success_factors": {...},
"business_impact": {...}
}
}
Contributions are welcome!
This project is licensed under the MIT License.