Skip to content

Agentic PM Analytics

One-line definition

The layer that lets an AI agent orchestrate this repo's deterministic analytics safely — routing a natural-language question to the right function, never doing the arithmetic itself.

The roadmap bullets, and where each one actually lives

  • Deterministic analytics tools — all of src/pm/, built across every prior phase.
  • Tool schemas — docs/tool_schema.json, generated by scripts/generate_tool_schema.py (name/module/parameters/docstring for every public function; tests/test_tool_schema.py keeps it in sync).
  • Natural-language query layer — skills/pm-query/SKILL.md (/pm-query).
  • Grounding — both skills resolve a topic to its specific reference page, notebook, and test before answering (see /tutor's routing table and /pm-query's tool-schema lookup).
  • Guardrails — AGENTS.md's hard rules (never fill in exercises, never compute arithmetic without running real code, state approximation limitations) apply to every skill in this repo, not just these two.
  • Evals — docs/agentic_analytics_evals.md, a manually-run checklist with pre-verified expected outputs (there's no automated harness for skill-routing behavior in a plain git repo, and this doesn't pretend otherwise).
  • Explainability — /pm-query must cite the exact function, module, and inputs behind every answer, not just state a number.
  • Observability — both skills log every session/query to docs/tutor_sessions/ and docs/analytics_queries/ respectively.
  • Tutor agents — skills/tutor/SKILL.md (/tutor), built in an earlier session, plus skills/pmexpert/SKILL.md (/pmexpert), a later addition that sequences the whole curriculum through /tutor's same routing table and personas rather than duplicating them, and adds quiz/scenario/exam modes /tutor doesn't have.

Why PMs care

An LLM confidently stating a plausible-sounding DV01 or VaR without having actually computed it is worse than not answering — it looks authoritative and is uncheckable at a glance. Routing every numeric answer through tested, deterministic code (and citing exactly which function ran) is what makes an agent layer trustworthy enough to use for real analytics rather than just explanation.

Common mistakes

  • letting an agent "estimate" a number from the formula in its own reasoning instead of executing the actual function
  • an agent answering a question in a domain this repo has deliberately left conceptual-only (OAS, credit migration, hierarchical risk parity, multi-period optimization) by approximating anyway, rather than saying plainly that it isn't implemented

tutor skill (skills/tutor/SKILL.md), mastery skill (skills/pmexpert/SKILL.md), docs/tool_schema.json, AGENTS.md.