Description
AI Enterprise Case Study Analyzer
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.
Core Features
1. Case Study Discovery & Analysis
- 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.
2. Content Processing Pipeline
- 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.
3. Report Generation
The system creates three types of reports:
a. Individual Case Study Reports (reports/individual/
)
- Executive Summary
- AI Strategy Analysis
- Technical Implementation Details
- Business Impact Assessment
- Key Success Factors
- Lessons Learned
b. Cross-Case Analysis (reports/cross_case_analysis/
)
- Patterns across multiple implementations.
- Common success factors.
- Technology trends.
- ROI metrics and implementation challenges.
c. Executive Dashboard (reports/executive_dashboard/
)
- Company profiles
- Technology stacks
- Success metrics and implementation scales
- Overall trends in enterprise AI adoption
Technical Architecture
1. Firecrawl Integration
-
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.
2. Claude 3.5 Sonnet Integration
- Link Analysis: Identifies relevant case study URLs.
- Content Analysis: Checks for enterprise AI relevance.
- Report Generation: Produces comprehensive, structured analysis reports.
3. Data Processing Workflow
Input (CSV/Website) β Firecrawl Map β Link Analysis β Content Extraction β Claude Analysis β Report Generation
Project Structure
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
Installation & Setup
-
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
Usage
1. CSV Analysis Mode
- Place your CSV file in the
input/
directory with a column namedurl
containing case study URLs.
2. Website Analysis Mode
- 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
Related Templates
Explore more templates similar to this one
Top Italian Restaurants in SF
Search for websites that contain the top italian restaurants in SF. With page content
Zed.dev Crawl
The first step of many to create an LLM-friendly document for Zed's configuration.
Developers.campsite.com Crawl
o3 mini Company Researcher
This Python script integrates SerpAPI, OpenAI's O3 Mini model, and Firecrawl to create a comprehensive company research tool. The workflow begins by using SerpAPI to search for company information, then leverages the O3 Mini model to intelligently select the most relevant URLs from search results, and finally employs Firecrawl's extraction API to pull detailed information from those sources. The code includes robust error handling, polling mechanisms for extraction results, and clear formatting of the output, making it an efficient tool for gathering structured company information based on specific user objectives.
o1 Web Crawler
Docs.google.com Scrape
test
Llama 4 Maverick Web Extractor
This Python script integrates SerpAPI, Together AI's Llama 4 Maverick model (specifically "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8"), and Firecrawl to extract structured company information. The workflow first uses SerpAPI to search for company data, then employs the Llama 4 model to intelligently select the most relevant URLs (prioritizing official sources and limiting to 3 URLs), and finally leverages Firecrawl's extraction API to pull detailed information from those sources. The code includes robust error handling, logging, and polling mechanisms to ensure reliable data extraction across the entire process.