Project Purpose
Raw EDGAR 10-K filings (SGML / HTML) for S&P 500 companies
RAG extraction + Claude API scoring across 15 venturing dimensions
Master CSV, per-company dashboards & reports, portfolio HTML dashboard
Understand which venturing practices companies use and what corporate objectives they serve
Analysis Pipeline
Preprocess
Use the complete extracted narrative — all of Items 1/1A/2/7/8 including financial statements & footnotes. Already-clean narratives are used as-is (no lossy re-preprocessing). Fetch XBRL structured financials.
Entity Discovery
Curated CVC fund names from company_context.json + BM25/cosine index lookup + Claude refinement. The RAG index is used only for entity discovery — not for the scored evidence.
Windowed Extraction
Tile the entire narrative into overlapping 60K-char windows (6K overlap) and scan every window for all 15 dimensions. Nothing is truncated; evidence merged + deduped across windows. Comprehensive LLM extraction (not cosine matching).
Ensemble Scoring
5 independent scoring passes on the same evidence (temperature=0). Report the per-dimension median with min/max/std uncertainty. Distinct cache slots → fresh samples, reproducible reruns.
Financials + XBRL
Claude extracts revenue, R&D, margins, CVC totals; authoritative XBRL values overlay all standard GAAP metrics.
Caching
Server-side prompt caching on the shared prompt prefix (esp. the ensemble passes) + on-disk response cache for exact reproducibility. Pinned model snapshot claude-sonnet-4-5-20250929.
Dimension Framework (15 Dimensions)
- P1 Corporate Venture Capital
- P2 Accelerators & Incubators
- P3 Venture Building
- P4 Venture Clienting
- A1 Mentorship
- A2 Business Services
- A3 Workspace
- A4 Events
- O1 Risk Management
- O2 Market Expansion
- O3 Access to New Technology
- O4 Develop Business Ecosystems
- O5 Social & Environmental Impact
- O6 Entrepreneurial Culture & Capabilities
- O7 Financial Return
Scores are 0–100 per dimension. Max total = 1500. A Practice × Objective alignment matrix (15×7) is also produced for each company showing which practices serve which objectives.
Current Results (6 Companies) — canonical: windowed + ensemble + curated web (2026-06-05)
temperature=0, pinned model claude-sonnet-4-5-20250929) with
curated-web evidence merged for all six (--with-scraped). Total =
median of 5 per-pass totals; the bracketed range is the observed min–max across passes (also the
error bars on each company's dashboard_uncertainty.png). Every company additionally carries an
investment_and_funds field (fund sizes + investment preferences). Portfolio average:
1024 / 1500.
| Ticker | Company | Total (median) | Range | % of 1500 | Tier | Top Practice | Top Objective |
|---|---|---|---|---|---|---|---|
| AMZN | Amazon.com Inc. | 1136–1225 | 78% | Tier 1 | Corporate Venture Capital (92) | Develop Business Ecosystems (95) | |
| GOOGL | Alphabet Inc. | 1089–1175 | 77% | Tier 1 | Venture Building (95) | Access to New Technology (96) | |
| MSFT | Microsoft Corporation | 1003–1076 | 71% | Tier 1 | Venture Building (85) | Access to New Technology (92) | |
| CSCO | Cisco Systems Inc. | 933–990 | 65% | Tier 1 | Accelerators and Incubators (82) | Access to New Technology (88) | |
| QCOM | Qualcomm Inc. | 835–972 | 63% | Tier 1 | Corporate Venture Capital (92) | Market Expansion (88) | |
| MRK | Merck & Co. Inc. | 815–842 | 56% | Tier 1 | Corporate Venture Capital (85) | Access to New Technology (82) |
Key cross-portfolio findings (curated-web augmented): all six are now Tier 1
once curated CVC/accelerator/impact evidence is merged. Access to New Technology is the
dominant objective for 4 of 6; Corporate Venture Capital is the most common top practice,
while the two largest tech players (GOOGL, MSFT) are led by Venture Building and Cisco by
Accelerators & Incubators. Sample fund detail captured in investment_and_funds:
Qualcomm Ventures $2B+ AUM / $3B+ deployed, Amazon Climate Pledge Fund $2B + Industrial Innovation Fund $1B,
Merck MRL Ventures $500M, Cisco $1B Global AI Fund, Microsoft Climate Innovation Fund $1B.
Module Architecture
| File | Role |
|---|---|
| cv_config.py | Single source of truth — all dimension lists, colors, thresholds, file paths, model names |
| cv_toolkit.py | CLI entry point — all subcommands (rubrics, describe, preprocess, analyze, csv, charts, report, portfolio-report) |
| cv_analyzer.py | Core pipeline — SGML extraction, financial window selection, 15 extraction calls, scoring call, checkpoint/resume |
| cv_rag.py | BM25 + embedding hybrid index; investment entity discovery; enriched CVC query building |
| cv_framework.py | Builds rubrics from framework/*.txt definitions; adds brief_descriptions via Haiku |
| cv_visualizer.py | Per-company PNGs: P×O heatmap, dashboard (bars + matrix + financials), word clouds |
| cv_portfolio.py | Portfolio heatmap, mean scores, What Works analysis, interactive HTML dashboard, portfolio.docx |
| cv_report.py | Per-company .docx report; build_summary_row() for CSV flattening |
| company_context.json | Curated CVC fund names, portfolio companies, dimension hints per ticker — injected into prompts |
Key Problems Solved
20250929; response cache gives exact reruns.list(set(...)) (hash-order varies per run). Switched to dict.fromkeys for stable, reproducible ordering.word_cloud_text from scoring); prompt caching on the shared prefix; ANTHROPIC_API_KEY loaded from git-ignored .env..find() string search and capped tag-stripping regex <[^>]{1,300}>.named_funds = set() re-initialising the set after Stage 0 populated it. Removed the re-initialisation line.len(f) > 2, excluding 2-character names. Fixed to len(f) >= 2.`+data_json+` (literal string not interpolation). Fixed to {data_json} inside Python f-string.Output Files
Next Steps
Quick Command Reference
| Command | What it does |
|---|---|
| python cv_toolkit.py rubrics | Build scoring rubrics from framework/*.txt definitions (run once) |
| python cv_toolkit.py describe | Add plain-English brief_descriptions to each rubric via Haiku (run once) |
| python cv_toolkit.py preprocess --ticker X --file Y | Extract narrative + financials from raw EDGAR SGML |
| python cv_toolkit.py analyze --ticker X --file Y | Windowed extraction + ensemble scoring for one company |
| python cv_toolkit.py --ensemble N analyze ... | Override ensemble passes (N=1 disables; default 5) |
| python cv_toolkit.py --word-clouds analyze ... | Re-enable word clouds (OFF by default to save API) |
| bash run_batch_v2.sh --force | Full v2 batch (windowed + ensemble) for all companies |
| python ensemble_report.py outputs_v2/<T> | Build ensemble table (CSV/MD) + error-bar figure |
| python cv_toolkit.py scrape --ticker X | Scrape curated CVC/Accelerator/Impact URLs → scraped/<X>/result.json (optional) |
| python cv_toolkit.py analyze ... --with-scraped | Merge curated-web evidence (all 15 dims) into the 10-K evidence before scoring (off by default) |
| python cv_toolkit.py csv | Rebuild master_dataframe.csv from all analysis.json files |
| python cv_toolkit.py charts | Regenerate per-company PNGs (plain + uncertainty dashboards) |
| python cv_toolkit.py report | Generate .docx reports for all companies |
| python cv_toolkit.py portfolio-report | Heatmaps + HTML dashboard + portfolio.docx |