AI Enterprise Case Study Analyzer
Repository

AI Enterprise Case Study Analyzer

An intelligent system for analyzing enterprise AI case studies using the Claude 3.5 Sonnet API.

Research
Claude 3.5

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:

  1. Analyzing case studies from provided URLs in a CSV file.
  2. 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.
  • 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

  1. Clone the repository:

    git clone https://github.com/yourusername/ai-case-study-analyzer.git
    cd ai-case-study-analyzer
    
  2. Create a virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. 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 named url containing case study URLs.

2. Website Analysis Mode

  • Provide a company website URL to:
    1. Map all website links using Firecrawl.
    2. Identify and analyze case study content using Claude.
    3. Extract content and generate comprehensive reports.

Run the analyzer:

python -m src.main

Related Templates

Explore more templates similar to this one

Playground

Top Italian Restaurants in SF

Search for websites that contain the top italian restaurants in SF. With page content

New
/search
Playground

Zed.dev Crawl

The first step of many to create an LLM-friendly document for Zed's configuration.

/crawl
Playground

Developers.campsite.com Crawl

/crawl
Snippet

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.

o3 mini
Research
Snippet

o1 Web Crawler

o1
Crawler
Playground

Docs.google.com Scrape

/scrape
Playground

test

/scrape
Snippet

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.

Llama 4
Extractor