Skip to content

nanabb333/Geopolitical_Intelligence_Analyst_Copilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Geopolitical Intelligence Analyst Copilot

Geopolitical Intelligence Analyst Copilot is a deterministic geopolitical intelligence workflow platform currently validated on a semiconductor-focused historical analogue dataset. It turns analyst questions into structured intelligence briefs by combining scenario classification, historical analogue retrieval, observed market-reaction context, pathway framing, and Markdown memo export.

The repository demonstrates business analytics, risk analytics, workflow automation, and AI-assisted decision-support thinking in a local, auditable Python project. It is designed as a research-to-intelligence productivity layer, not a forecasting system, trading tool, or investment recommendation engine.

Product Overview

The product helps analysts move from an unstructured geopolitical question to a structured evidence brief suitable for portfolio manager, risk committee, strategy team, or graduate portfolio review. The V1 workflow is generalizable, while the current evidence base is intentionally narrower.

It is intentionally scoped as an analyst productivity tool. It does not replace analyst judgement, ingest live news, call external APIs, use LLMs, make forecasts, estimate probabilities, or recommend investments.

For a fast review, start with Project At A Glance, Recruiter Demo Guide, and Executive Demo Case.

Demo Workflow

Question
  -> Scenario Classification
  -> Historical Analogue Retrieval
  -> Market Reaction Comparison
  -> Observed Pathway Generation
  -> Executive Memo
  -> Markdown Export

The demo workflow is implemented through local CSV inputs and standard-library Python. Each step remains auditable:

  • scenario classification uses deterministic keyword rules;
  • historical analogue retrieval uses local coded events and transparent similarity scoring;
  • market comparison summarizes local event-study rows only;
  • observed pathways are deterministic analyst-review frames;
  • executive memo generation packages the evidence into a reusable Markdown report.

Scenario Intelligence Layer

The repository is moving from event-centric retrieval toward question-centric scenario intelligence while preserving the same deterministic workflow. Analyst questions can be organized into scenario families such as Technology Competition, Industrial Policy, Economic Security, Resource Competition, Supply Chain Risk, and Strategic Competition before analogue and market evidence review.

This layer improves product usability without adding forecasts, probabilities, investment advice, LLM calls, APIs, or workflow redesign. See Scenario Taxonomy, Question Library, Current Relevance Framework, and Scenario Intelligence Layer.

How To Run

Run the main scenario workflow from the repository root:

python3 src/run_scenario.py \
  --query "US announces a new semiconductor subsidy package." \
  --top-k 5 \
  --output results/semiconductor_subsidy_brief.md

Generate the Analyst Workbench report directly:

python3 src/generate_workbench_report.py \
  "US announces a new semiconductor subsidy package." \
  --top-k 5 \
  --output results/analyst_workbench_report.md

Run validation:

python3 -m compileall src
python3 -m unittest discover tests

Validation Evidence

The repository includes a Validation & Evidence Package for portfolio review:

Current validation status:

  • python3 -m compileall src: PASS
  • python3 -m unittest discover tests: PASS
  • Unit test result: 9 tests passing
  • Workbench report sections A-E: covered by tests
  • Safety-boundary language: covered by tests
  • No source logic changed during the evidence package sprint
  • Classification, retrieval, scoring, and report-generation logic preserved during this README packaging sprint

Data Coverage and Scope

The system is designed as a general geopolitical intelligence workflow platform. Current V1 validation uses the available semiconductor-focused historical analogue dataset. Coverage is strongest for U.S. semiconductor subsidies, CHIPS Act support announcements, export controls, entity-list actions, semiconductor-equipment restrictions, and selected China/Japan/Taiwan-linked cases from 2022-2024.

The recommended V2 expansion direction is a US-China strategic competition pilot dataset covering export controls, sanctions, AI chip restrictions, semiconductor industrial policy, entity-list actions, critical minerals, supply-chain relocation, strategic investment screening, and Taiwan-related tension as one subcategory. Taiwan is relevant, but it is not the central product framing.

The repository now includes a separate schema-governed V2 pilot file, data/us_china_strategic_competition_pilot.csv, with documentation in US-China Pilot Dataset Summary and US-China Pilot Coding Log. This pilot is for future dataset expansion planning and is not yet wired into the V1 workflow. It does not yet have V2 market-return rows and should not be described as fully integrated into the workbench.

Questions about Taiwan blockade, broad military escalation, shipping disruption, energy, cyber, critical minerals, broad sanctions, or real-time events are not directly supported by the current data. They should be reframed around currently supported semiconductor policy or technology restrictions, or deferred until future dataset expansion. This is a dataset coverage limitation, not a rejection of the workflow architecture. See Data Coverage Audit, Supported Questions Boundary, Dataset Expansion Roadmap, and Generalization Strategy.

Portfolio Value

This project is relevant to analytics and risk roles because it demonstrates how structured data, deterministic logic, and clear product framing can improve analyst throughput without overstating automation.

  • Business Analytics: converts an ambiguous decision-support workflow into repeatable inputs, outputs, documentation, and validation evidence.
  • Risk Analytics: structures geopolitical scenarios around historical analogues, observed event windows, uncertainty notes, and safety boundaries.
  • Workflow Automation: automates intake-to-memo packaging while preserving transparent intermediate steps for analyst review.
  • AI-assisted decision support: shows where deterministic automation can support intelligence workflows without LLM calls or opaque prediction claims.
  • Analyst Productivity: reduces first-pass memo assembly work and gives reviewers a consistent evidence format.

Who Uses This Product?

The intended users are analysts who need structured geopolitical risk context rather than forecasts or trading recommendations: risk analysts, strategy analysts, market intelligence analysts, policy analysts, and corporate planning analysts. The system helps them frame questions, retrieve historical analogues, review available market evidence, and prepare executive-ready memos with clear caveats.

See Analyst Use Cases, Intelligence Playbooks, Analyst Personas, Business Value Framework, and Product Demo Walkthrough.

Example Analyst Questions

Representative analyst questions are grouped by:

  • Taiwan Risk
  • Semiconductor Policy
  • Military Escalation
  • Strategic Investment
  • Technology Restrictions

See Example Analyst Questions for the full 15-question set.

Representative Outputs

Placeholder documentation files are available for curated portfolio examples:

These files are documentation placeholders for future generated reports. They do not add product functionality.

Reproducibility

The same query and local CSV inputs produce the same report. The commands in How To Run provide the reproducible scenario workflow and validation steps. No external APIs, LLM calls, live news feeds, dashboards, forecasting modules, or investment-recommendation logic are used.

What The System Does Not Do

  • No live news retrieval
  • No external APIs
  • No LLM calls
  • No forecasting
  • No return predictions
  • No probability estimates
  • No trading signals
  • No investment recommendations

Similarity scores are deterministic retrieval scores only. They are not probabilities.

Analyst Workbench

src/run_scenario.py generates a structured Markdown workbench report with clearly separated sections:

  • A. Scenario Classification
  • B. Historical Analogues
  • C. Market Reaction Comparison
  • D. Observed Pathways
  • E. Executive Memo

The workflow preserves the existing classification and retrieval logic. It extends orchestration and presentation by packaging matched classification terms, ranked analogues, observed event-study reaction summaries, deterministic pathway frames, executive memo language, and export-package metadata into one analyst-ready report.

Use it when a portfolio manager, risk committee, strategy team, or analyst-review process needs a disciplined first-pass scenario memo grounded in local historical analogues. The workbench remains deterministic: it uses local CSV files only and does not add LLM calls, APIs, dashboards, real-time monitoring, forecasting, or investment recommendations.

See Analyst Workbench for workflow details, inputs, outputs, and intended use.

Example User Query

US announces a new semiconductor subsidy package.

Example output summary:

Classification: support / subsidy_award / semiconductors
Analog retrieval: CHIPS Act and semiconductor state-support events
Market reaction comparison: observed event-study windows from local CSV data
Pathways: state support, reallocation, anticipation, and implementation uncertainty
Brief type: historical analog decision-support memo

Additional curated examples are available in examples/.

Repository Structure

Geopolitical_Intelligence_Analyst_Copilot/
  data/
    events.csv
    event_firm_returns.csv
    sample_user_queries.csv
    us_china_strategic_competition_pilot.csv
  docs/
    analyst_validation_suite.md
    analyst_workbench.md
    architecture.md
    data_coverage_audit.md
    dataset_expansion_roadmap.md
    example_questions.md
    generalization_strategy.md
    supported_questions_boundary.md
    us_china_pilot_coding_log.md
    us_china_pilot_dataset_summary.md
    workflow_acceptance_tests.md
    example_outputs/
    methodology.md
    product_spec.md
    roadmap.md
    safety_boundaries.md
  examples/
    export_controls_brief.md
    semiconductor_subsidy_brief.md
  results/
    .gitkeep
  src/
    classify_event.py
    compare_market_reactions.py
    generate_brief.py
    generate_pathways.py
    generate_workbench_report.py
    retrieve_analogs.py
    run_scenario.py
  tests/
    test_classify_event.py
    test_generate_brief.py
    test_generate_workbench_report.py
    test_retrieve_analogs.py

Documentation

Core Scripts

  • src/run_scenario.py: main Analyst Workbench orchestration CLI
  • src/classify_event.py: deterministic rule-based event classification
  • src/retrieve_analogs.py: weighted historical analog retrieval
  • src/compare_market_reactions.py: observed event-study reaction summaries
  • src/generate_pathways.py: deterministic qualitative scenario pathways
  • src/generate_workbench_report.py: structured Markdown Analyst Workbench report generation
  • src/generate_brief.py: legacy Markdown executive brief generation

Existing scripts remain directly runnable for inspection and debugging.

Inputs

  • data/events.csv: coded geopolitical event database
  • data/event_firm_returns.csv: event-level firm return outcomes and abnormal return windows
  • data/sample_user_queries.csv: example user questions for local testing

Relationship to Flagship System

Opportunity Under Geopolitical Competition = flagship evidence-intelligence system

Geopolitical Intelligence Analyst Copilot = workflow automation layer

The flagship system contains the broader evidence base and geopolitical competition framing. This copilot focuses on analyst productivity: scenario intake, classification, retrieval, and memo generation. Its workflow architecture is generalizable, while V1 dataset validation is semiconductor-focused.

Skills Demonstrated

  • Product analytics architecture
  • Geopolitical risk intelligence design
  • Business, risk, and strategy analytics framing
  • Analyst productivity workflow automation
  • Historical analog retrieval
  • Event classification
  • Event-study interpretation
  • Executive brief generation
  • Responsible AI/product safety boundaries
  • Standard-library Python implementation
  • Reproducible local workflow design

Safety Boundary

The generated brief supports research and strategic analysis only. It must not be used as a forecast, return prediction, trading signal, or investment recommendation.

About

Lightweight analyst copilot for deterministic geopolitical scenario classification, historical analogue retrieval, and executive brief generation.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages