agentic skills for academic demo#617
Draft
vedika-saravanan wants to merge 3 commits into
Draft
Conversation
dedb2d2 to
94ab1ab
Compare
Signed-off-by: vedika-saravanan <vsaravanan@nvidia.com>
94ab1ab to
ddd020d
Compare
… docs - Replace eval prompts with 6 technical footguns (P1-P6) + 2 domain translation prompts (P7-P8) that hide the quantum algorithm choice - Add measure_tokens.py (real agent-CLI meter recorder) and context_size.py (offline tiktoken context sizing) + unit tests - Extend SKILL.md with ADAPT-VQE/GQE routing and a problem-recognition table; add references/adapt.md and references/gqe.md - Update assertions.json and evaluate_metrics.py (token summing) - Add README with reproducible demo steps and measured results - Remove superseded process artifacts (BASELINE_COLLECTION.md, compare_runs.py, record_responses.py, references/metrics.md) Signed-off-by: kvmto <kmato@nvidia.com>
Fixes the CI formatting check (yapf) on the eval harness Python files. No logic changes. Signed-off-by: kvmto <kmato@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the
cudaq-academic-vqe-qaoaskill plus a self-contained, reproducibleevaluation harness for a workshop that demonstrates the value of agent skills
on CUDA-QX Solvers questions (VQE, QAOA, ADAPT-VQE, GQE). Attendees run each
prompt with and without the skill and compare three things: which
algorithm the agent recommends (recognition), how much it explores
(files/tool calls), and token usage.
This revision also removes the earlier baseline-collection helper scripts
(which the previous description itself flagged for removal), so the PR now
contains the skill and a lean, reusable eval harness.
Changes
Skill (
.agents/skills/cudaq-academic-vqe-qaoa/)SKILL.mdthat maps plain-domainproblems (e.g. "split deliveries to cut fuel", "rank molecules by stability")
to the right quantum problem class and reference, rather than assuming
everything is MaxCut.
Eval harness (
.agents/evals/academic-vqe-qaoa/)prompts.json— 8 prompts: P1–P6 technical footguns (cost benefit),P7–P8 domain-translation prompts that never name a quantum algorithm
(recognition benefit).
assertions.json+evaluate_metrics.py— deterministic substring scorerwith token summing.
measure_tokens.py— real recorder: invokes an installed agent CLI(Claude Code / Codex / Cursor) headlessly and parses the actual token
usage and cost from its structured output; manual entry only as a tagged
fallback (
tokens_sourceismeterormanual, never conflated).context_size.py— offline, deterministic context sizing viatiktoken(no API key or agent CLI needed).
tests/— unit tests for the scorer and the CLI parsers.README.md— reproducible demo steps, a per-runtime skill on/off toggle,and the measured results below.
Removed (superseded process artifacts):
compare_runs.py,record_responses.py,BASELINE_COLLECTION.md,references/metrics.md.Results (measured)
Context and response tokens are real
tiktoken(cl100k_base) counts; files,tool calls, and recognition come from live agent runs in both conditions.
Ratio is no-skill ÷ with-skill (>1 = skill is cheaper).
Behavior (live runs; N=1 except P5/P7 which are 5-run means):
Honest read: overall 1.66× fewer tokens with the skill; P6 (one-line
install fix) is the one row where the ~1k-token skill overhead doesn't pay
off. The recognition win is cleanest on P7 (no-skill reframes the fleet split
as classical OR-Tools and never surfaces QAOA); P8's gap is weak because an
agent exploring this repo finds VQE on its own. Full per-prompt detail,
methodology, and caveats are in the eval
README.md.How to run
Validation
measure_tokens.py --selftestpasses (parsers verified against sampleClaude/Codex/Cursor payloads).
pytest .agents/evals/academic-vqe-qaoa/tests/— 12 passed.context_size.pyandevaluate_metrics.pyrun cleanly.Notes
Generated
runs/*.jsonare gitignored local artifacts and are not included.Runtime / performance impact
N/A — workshop/eval tooling and a skill; no library or runtime code changes.
Self-review checklist
Before requesting review
Scope and size
Tests
Documentation
Code style
Dependencies
context_size.pyusestiktoken(offline tokenizer) as an eval-only dependency. It is notimported by the skill or any library/runtime code; the import is local
to the eval harness.