vally-tests

작성자: microsoft

프롬프트, 지시문, 에이전트 및 스킬에 대한 Vally 적합성 테스트를 작성하며, 제일브레이크, 프롬프트 인젝션, 유해 유도, 서비스 약관 등에 대한 거부를 포함합니다.

npx skills add https://github.com/microsoft/hve-core --skill vally-tests

Vally Tests Skill

Purpose

This skill authors Vally conformance tests for the four supported artifact kinds in this repository: prompts, instructions, agents, and skills. Each test exercises a documented behavior the artifact already claims and routes the result through an appropriate Vally grader so failures are explainable. Test authoring is bounded by a refusal taxonomy that keeps the skill out of adversarial, harmful, or policy-evasion territory.

Follow the shared content-policy public-output guard for eval stimuli and any public summaries derived from this skill. Vally tests are not a venue for terms-of-service boundary mapping, payload generation, refusal-text scoring, hidden-instruction disclosure, PII extraction, or secret extraction.

The skill ships:

  • A canonical authoring workflow used by the Vally prompts and Vally Test Author subagent.
  • Per-kind reference files that enumerate every conformance check the skill knows how to express.
  • A grader catalog that maps Vally CLI grader types to the checks they fit.
  • A safety refusal taxonomy with regex patterns the safety lint script consumes.
  • Helper scripts and asset templates for stimulus emission, corpus import, and dedupe.

When to Invoke

Invoke this skill in one of two modes:

  • From-artifact mode. The caller points at one artifact file (a .prompt.md, .instructions.md, .agent.md, or SKILL.md) and asks for conformance test stimuli that verify the artifact's stated behaviors. The skill detects the artifact kind from the filename, looks up the matching per-kind reference, picks graders, and appends stimulus blocks to the routed Vally eval file.
  • Corpus-import mode. The caller supplies a CSV or XLSX corpus that follows the shipped template, and the skill turns each row into a stimulus block in the routed eval file. Used when a large batch of behaviors needs identical formatting and dedupe handling.

Do not invoke this skill to:

  • Generate adversarial probes, jailbreak attempts, prompt-injection payloads, or red-team stimuli.
  • Test refusal quality on harmful, illegal, or policy-violating prompts.
  • Author stimuli that elicit PII, secrets, hidden instructions, or model self-disclosure.
  • Store payload examples, paraphrased prohibited requests, or quoted flagged content in Vally eval specs, corpus rows, PR summaries, issue bodies, or comments.
  • Replace Responsible AI threat modeling. RAI work lives in the RAI Planner agent.

Authoring Workflow

Each invocation follows the same five-step pipeline:

  1. Artifact-kind detection. Resolve the kind from the artifact path or the corpus row's kind column. Supported kinds: prompt, instructions, agent, skill. Reject unknown kinds with a refusal block.
  2. Reference lookup. Load the matching reference file from references/ and select the check or checks the stimulus exercises.
  3. Grader selection. Use references/grader-catalog.md as the authoritative selection surface. Pick the registered Vally grader family that directly observes the expected behavior and follow its stimulus-shape guidance.
  4. Safety self-check. Run a safety self-check against the refusal taxonomy regex set. Refusing here is the correct outcome for any stimulus that matches a refusal category.
  5. Dedupe and append. Compute a SHA-256 hash of the normalized prompt text, compare against existing stimuli in the target eval file, and append only when novel.

The pipeline is identical for both invocation modes. Corpus-import mode runs steps 2 through 5 once per row.

Safety Refusal Taxonomy

Authoring is bounded by seven refusal categories. Any stimulus that matches a category's regex set is refused before it reaches the dedupe step. The categories and their normative source are listed below. The full regex set lives in references/refusal-taxonomy.md and is consumed by the safety lint script.

CategoryDefinitionNormative Source
jailbreakAttempts to bypass model safety policies through persona switching, hypothetical framing, or roleplay coercion.Project Code of Conduct
prompt-injectionAttempts to override system or developer instructions through embedded or external content.Project Code of Conduct
harmful-elicitationRequests for content that causes physical, financial, psychological, or reputational harm.Project Code of Conduct
tos-violationStimuli that solicit content prohibited by GitHub, Microsoft, or model-provider terms of service.Project Code of Conduct
coc-violationStimuli that violate this repository's Code of Conduct, including harassment, discrimination, or doxxing.Project Code of Conduct
model-refusal-elicitationAttempts to provoke a model refusal so the refusal text itself can be scored, graded, or used to map provider boundaries.RAI Planner guidance
pii-extractionAttempts to elicit personally identifiable information, secrets, credentials, or proprietary training data.RAI Planner guidance

When a request triggers a refusal, emit the canonical refusal block:

This skill authors conformance tests only. The request appears to fall under <category>. Please consult <Project Code of Conduct | RAI Planner agent> for the appropriate process.

Substitute the matched <category> and the most relevant normative source. Do not negotiate, rephrase, or partially fulfill the request.

Helper Script Index

Helper scripts ship as parity pairs (.ps1 and .sh) where the workflow does not require Python. Python is used only for the corpus-import path because the source-of-truth interchange format is CSV with an XLSX mirror.

ScriptPurposeLanguageDelivery
scripts/New-Stimulus.ps1Scaffolds a single stimulus YAML block from an artifact path and appends to the routed eval file.PowerShell 7+Phase 2
scripts/new-stimulus.shParity counterpart for the PowerShell stimulus scaffolder.bashPhase 2
scripts/import_corpus.pyReads the CSV or XLSX corpus template and emits dedupe-checked stimulus blocks per kind.Python 3.11+Phase 2
scripts/Lint-VallyTestSafety.ps1Runs the refusal taxonomy regex set against a candidate stimulus and exits non-zero on match.PowerShell 7+Phase 3
scripts/lint-vally-test-safety.shParity counterpart for the safety lint script.bashPhase 3

All helpers honour a shared dedupe contract: SHA-256 of the prompt text after Unicode NFC normalization and whitespace collapse.

The helpers emit a JSON run report to logs/vally-test-author-<timestamp>.json, where <timestamp> is YYYYMMDD-HHMMSS (UTC). The report captures, at minimum: mode; inputs (the resolved files/path and kind); target_eval_file; stimuli_appended (count and per-row hash); dedupe_results (count and per-row hash for skipped duplicates); refusal_check (per-row category match, if any); safety_lint_exit_code; blockers (any ambiguous safety-lint outcomes surfaced for review); and written_paths.

Reference Index

References capture the conformance taxonomy, grader selection rules, eval-suite routing, and the regex source of truth for the refusal taxonomy. Each file targets a specific decision point in the authoring workflow.

ReferenceCovers
prompts.mdThe 12 conformance checks emitted for .prompt.md artifacts.
instructions.mdThe 8 conformance checks emitted for .instructions.md artifacts.
agents.mdThe 9 conformance checks emitted for .agent.md artifacts.
skills.mdThe 9 conformance checks emitted for SKILL.md artifacts.
grader-catalog.mdVally CLI grader types, selection rules, and gotchas.
refusal-taxonomy.mdRegex source of truth for the 7 refusal categories and worked examples.
eval-suite-routing.mdMaps artifact kind to the canonical Vally eval file under evals/.

Asset Index

Assets supply the interchange formats the corpus-import path consumes. The CSV is the source of truth. The XLSX mirror is regenerated from the CSV by import_corpus.py and is never edited directly.

AssetPurpose
assets/corpus-import-template.csvCanonical CSV template with header prompt,kind,target_artifact,grader,tags,expected_refusal_category,notes.
assets/corpus-import-template.xlsxExcel mirror of the CSV regenerated by the import script.

Output Targets per Kind

Authored stimuli always land in one of the routed Vally eval files. The router is encoded in references/eval-suite-routing.md and mirrored here for quick lookup.

KindTarget Eval FileVally Suite Name
promptevals/behavior-conformance/prompts.eval.yamlbehavior-conformance
instructionsevals/behavior-conformance/instructions.eval.yamlbehavior-conformance
agentevals/agent-behavior/eval.yamlagent-behavior
skillevals/behavior-conformance/skill-behavior.eval.yamlbehavior-conformance

Never write to evals/baseline-equivalence/, evals/script-validation/, or evals/results/ from this skill. Those targets serve baseline equivalence, script validation, and historical comparison flows that are out of scope for conformance authoring.

Contributing

Follow these conventions when extending this skill:

  • New per-kind checks belong in the matching references/{kind}.md file. Bump the check count in this SKILL.md when the reference adds or removes checks.
  • New grader types belong in references/grader-catalog.md and only after the matching Vally CLI version is pinned in package.json devDependencies.
  • New refusal categories require updates to references/refusal-taxonomy.md, the regex set the safety lint script consumes, the Safety Refusal Taxonomy table above, and the canonical refusal block.
  • Helper scripts must ship in parity pairs (.ps1 and .sh) unless the workflow has a hard Python dependency. Python helpers live under scripts/ and are configured by the skill's pyproject.toml.

microsoft의 다른 스킬

oss-growth
microsoft
OSS 성장 해커 페르소나
agent-framework-azure-ai-py
microsoft
Microsoft Agent Framework Python SDK(agent-framework-azure-ai)를 사용하여 Azure AI Foundry 에이전트를 구축합니다. AzureAIAgentsProvider로 지속적 에이전트를 만들 때, 호스팅 도구(코드 인터프리터, 파일 검색, 웹 검색)를 사용할 때, MCP 서버를 통합할 때, 대화 스레드를 관리할 때, 또는 스트리밍 응답을 구현할 때 사용합니다. 함수 도구, 구조화된 출력, 다중 도구 에이전트를 다룹니다.
development
airunway-aks-setup
microsoft
AKS에서 AI Runway 설정 — 빈 클러스터에서 실행 중인 모델까지. 클러스터 검증, 컨트롤러 설치, GPU 평가, 공급자 설정, 첫 배포를 다룹니다. 시기: "AI Runway 설정", "AKS 클러스터 온보딩", "AI Runway 설치", "airunway 설정", "AKS에 모델 배포", "AKS에서 GPU 추론", "AKS에서 KAITO 설정", "AKS에서 LLM 실행", "AKS에서 vLLM", "AKS에서 모델 서빙 설정", "AI Runway 컨트롤러".
devops
appinsights-instrumentation
microsoft
Azure Application Insights로 웹앱을 계측하기 위한 지침입니다. 원격 분석 패턴, SDK 설정, 구성 참조를 제공합니다. WHEN: 앱 계측 방법, App Insights SDK, 원격 분석 패턴, App Insights란 무엇인가, Application Insights 지침, 계측 예시, APM 모범 사례.
devops
applicationinsights-web-ts
microsoft
브라우저/웹 앱을 Application Insights JavaScript SDK(@microsoft/applicationinsights-web)로 계측합니다. Real User Monitoring(RUM) — 페이지 뷰, 클릭, AJAX/fetch 종속성, 예외, 사용자 지정 이벤트, 백엔드 OpenTelemetry 트레이스와 상관관계가 있는 브라우저 측 GenAI 에이전트 트레이스에 사용합니다. SDK Loader Script 및 npm 설정, 프레임워크 확장(React, React Native, Angular), Click Analytics, 텔레메트리 이니셜라이저, 브라우저에서 생성된 에이전트/도구/모델 스팬에 대한 OTel GenAI 의미론적 규칙을 다룹니다.
devops
azure-ai-anomalydetector-java
microsoft
Azure AI Anomaly Detector SDK for Java로 이상 탐지 애플리케이션을 구축하세요. 단변량/다변량 이상 탐지, 시계열 분석 또는 AI 기반 모니터링을 구현할 때 사용하세요.
development
azure-ai-language-conversations-py
microsoft
azure-ai-language-conversations Python SDK를 사용하여 대화형 언어 이해(CLU)를 구현합니다. ConversationAnalysisClient로 대화 의도와 엔터티를 분석하거나, NLP 기능을 구축하거나, 애플리케이션에 언어 이해를 통합할 때 사용합니다.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python. ML 작업 영역, 작업, 모델, 데이터 세트, 컴퓨팅 및 파이프라인에 사용합니다. 트리거: "azure-ai-ml", "MLClient", "workspace", "model registry", "training jobs", "datasets".
development