[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69BKZBE6VJ6WD1HX1M7PXG8":3,"skill-same:01M69BKZBE6VJ6WD1HX1M7PXG8":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M69BKZBE6VJ6WD1HX1M7PXG8","benchmark-qed-setup","benchmark-qed 工作区配置","Initialize and configure benchmark-qed workspaces for RAG benchmarking. Use when: setting up a new benchmarking project, initializing config files for question generation or evaluation, downloading sample datasets, or modifying benchmark-qed settings.yaml configuration. Also use when the user mentions \"benchmark-qed config\", workspace setup, or needs to prepare a benchmarking environment — even if they don't say \"setup\" explicitly.","初始化并配置 benchmark-qed 工作区以进行 RAG 基准测试。使用场景：建立新的基准测试项目、初始化用于问题生成或评估的配置文件、下载示例数据集，或修改 benchmark-qed 的 settings.yaml 配置。当用户提到“benchmark-qed config”、工作区设置或需要准备基准测试环境时也使用——即使用户没有明确说出“setup”。","microsoft\u002Fbenchmark-qed","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69BKPH852RZE1NZFW5DFVSA",104,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\u002Fblob\u002Fmain\u002F.apm\u002Fskills\u002Fbenchmark-qed-setup\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BZTWSXAPNKVKA1N0JGMJK2","AI 模型评估与基准测试","SCENARIO","使用场景",[31,32,33,34,35,36,37],"setup","benchmark","benchmark qed setup","config","prepare","benchmarking","rag","2026-11-10 10:12:30",false,"---\nname: benchmark-qed-setup\ndescription: >\n  Initialize and configure benchmark-qed workspaces for RAG benchmarking.\n  Use when: setting up a new benchmarking project, initializing config files\n  for question generation or evaluation, downloading sample datasets,\n  or modifying benchmark-qed settings.yaml configuration. Also use when\n  the user mentions \"benchmark-qed config\", workspace setup, or needs to\n  prepare a benchmarking environment — even if they don't say \"setup\" explicitly.\n---\n\n# Benchmark-QED Workspace Setup\n\nInitialize workspaces, generate configuration files, download datasets, and manage settings for the benchmark-qed RAG benchmarking tool.\n\n## Prerequisites\n\nbenchmark-qed requires Python 3.11+ and uv. Run commands with `uvx` to avoid installing globally:\n\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed \u003Ccommand>\n```\n\nPin a specific version for reproducibility:\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed@v1.2.3\" benchmark-qed \u003Ccommand>\n```\n\nIf `uvx` is unavailable, install uv first:\n```bash\npip install uv && uvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed \u003Ccommand>\n```\n\n## Procedure\n\n### Step 1 — Initialize a Workspace\n\n**Option A (Recommended): Interactive wizard**\n\nThe interactive wizard guides you through configuration with sensible defaults:\n\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed init \u003Croot_directory>\n```\n\nThis walks through:\n\n- Config type selection (autoq, autoe_pairwise, autoe_differential_pairwise, autoe_reference, autoe_assertion)\n- LLM provider selection with Azure-specific prompts (endpoint, API version)\n- Section-by-section customization (press Enter to accept defaults)\n- Automatic YAML validation before writing\n\n**Option B: Non-interactive (template-based)**\n\nGenerate a static template and edit manually:\n\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed config init \u003Cconfig_type> \u003Croot_directory>\n```\n\n**Config types** (pick one):\n| Type | Purpose |\n|------|---------|\n| `autoq` | Question generation (includes all prompt templates) |\n| `autoe_pairwise` | Pairwise comparison evaluation |\n| `autoe_differential_pairwise` | Two-stage extract-and-judge pairwise evaluation |\n| `autoe_reference` | Reference-based scoring |\n| `autoe_assertion` | Assertion-based scoring |\n\nExample:\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed config init autoq .\u002Fmy_workspace\n```\n\n**Storage options** for `config init`:\n| Option | Description |\n|--------|-------------|\n| `--storage-type` \u002F `-s` | `local` (default) or `blob`. When `blob`, storage config sections are scaffolded as active YAML (not commented out). |\n| `--container-name` | Pre-fill the blob container name in generated storage config. |\n| `--account-url` | Pre-fill the account URL (managed-identity auth) in generated storage config. |\n| `--connection-string` | Pre-fill the connection string in generated storage config. |\n| `--base-dir` | Pre-fill a base prefix path within the container. |\n\nWhen `--storage-type blob` is combined with `--account-url` or `--connection-string`, the generated config and prompt files are also uploaded directly to the blob container.\n\nExample (blob):\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed config init autoq .\u002Fmy_workspace \\\n  --storage-type blob \\\n  --container-name my-datasets \\\n  --account-url https:\u002F\u002Fmyaccount.blob.core.windows.net \\\n  --base-dir experiments\u002Frun1\n```\n\nThis creates:\n```\nroot\u002F\n├── .env              # API key placeholder\n├── input\u002F            # Place your data here\n├── settings.yaml     # Main configuration file\n└── prompts\u002F          # LLM prompt templates\n```\n\n### Step 2 — Download Sample Data (Optional)\n\nDownload sample datasets for testing. This command has an interactive confirmation prompt with no `--yes` flag — use one of these approaches to avoid hanging:\n\n**Bash\u002FLinux\u002FmacOS:**\n```bash\necho y | uvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed data download \u003Cdataset> \u003Coutput_dir>\n```\n\n**PowerShell:**\n```powershell\n\"y\" | uvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed data download \u003Cdataset> \u003Coutput_dir>\n```\n\n**Available datasets**: `AP_news`, `podcast`, `example_answers`\n\n**Storage options** for `data download`:\n| Option | Description |\n|--------|-------------|\n| `--storage-type` | Set to `blob` to upload the dataset to Azure Blob Storage instead of extracting locally. |\n| `--container-name` | The blob container name. |\n| `--account-url` | Azure storage account URL (managed-identity auth). |\n| `--connection-string` | Azure storage connection string (alternative to `--account-url`). |\n| `--base-dir` | Base prefix in blob storage. Files are stored as `{base_dir}\u002F{output_dir}\u002F`. |\n\nExample (download to blob):\n```bash\necho y | uvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed data download AP_news datasets \\\n  --storage-type blob \\\n  --container-name my-datasets \\\n  --account-url https:\u002F\u002Fmyaccount.blob.core.windows.net\n```\n\n### Step 3 — Gather Configuration Choices from the User\n\nBefore writing any values into `settings.yaml`, **prompt the user with `ask_user`** to collect the LLM \u002F auth \u002F endpoint settings. Do not guess — these decisions are environment-specific and getting them wrong wastes downstream LLM calls. Use enum\u002Fboolean fields whenever possible so the user picks from a known set rather than typing free-form text.\n\nAsk in **a single `ask_user` form** (split into two if the workflow is autoq, since autoq also needs an embedding model). Tailor the follow-up fields based on the provider\u002Fauth choice — if the first answer reveals an Azure provider, ask the Azure-only fields in a second form.\n\n#### LLM (chat) fields to collect\n\n| Field | Type | Options \u002F examples | Notes |\n|-------|------|--------------------|-------|\n| `llm_provider` | enum | `openai.chat`, `azure.openai.chat`, `azure.inference.chat` | See provider table in [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md). |\n| `model` | string | `gpt-4.1`, `gpt-4o`, `o3-mini`, an Azure deployment name | For Azure providers this is the **deployment name**, not the base model id. |\n| `auth_type` | enum | `api_key` (default), `azure_managed_identity` | `azure_managed_identity` is only valid for `azure.*` providers. |\n| `api_key_env_var` | string | `OPENAI_API_KEY` (default), `AZURE_OPENAI_API_KEY`, … | Only ask when `auth_type=api_key`. The skill writes `${VAR_NAME}` into YAML and adds the variable to `.env`. |\n| `azure_endpoint` | string (uri) | e.g. `https:\u002F\u002Fmy-resource.openai.azure.com\u002F` | Only ask for `azure.*` providers. |\n| `api_version` | string | e.g. `2024-06-01` | Only ask for `azure.openai.*` providers. |\n| `concurrent_requests` | integer | default `4` | Optional; offer the default. |\n| `retry` | object | defaults to `exponential_backoff`\u002F6 retries | Optional. The `config init` scaffold now writes a default `retry:` block; offer to keep the defaults unless the user has a reason to change them. See [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md) for fields. |\n\n#### Embedding fields to collect (autoq only)\n\nAsk the same shape of questions for the embedding model:\n\n| Field | Type | Notes |\n|-------|------|-------|\n| `embedding_provider` | enum (`openai.embedding`, `azure.openai.embedding`, `azure.inference.embedding`) | Must be an *embedding* provider. |\n| `embedding_model` | string | e.g. `text-embedding-3-large`, or an Azure deployment name. |\n| Reuse `auth_type` \u002F `api_key_env_var` \u002F `azure_endpoint` \u002F `api_version` from the chat answers unless the user wants different values — ask a yes\u002Fno `reuse_chat_auth` boolean first. |\n\n#### Input data fields (autoq only)\n\n| Field | Type | Notes |\n|-------|------|-------|\n| `dataset_path` | string | Path to CSV\u002FJSON dataset, e.g. `.\u002Finput\u002Fdata.csv`. |\n| `input_type` | enum (`csv`, `json`) | |\n| `text_column` | string | Column\u002Fkey containing the text content. |\n\n#### Eval-config-specific fields (autoe_*)\n\nOnly ask the questions relevant to the chosen `config_type`:\n\n- `autoe_pairwise`: `base.name` + `base.answer_base_path`, plus a list of `others` (each with `name` and `answer_base_path`), `question_sets`, and whether to keep the default persistent SQLite `cache_config` or select `json`, `memory`, or `none`.\n- `autoe_differential_pairwise`: the same condition and question-set fields as\n  pairwise, plus whether to keep the default stage-aware SQLite cache. Explain\n  that extraction and verdict entries are stored independently.\n- `autoe_reference`: `reference.name` + `reference.answer_base_path`, a list of `generated` conditions with `name` and `answer_base_path`, and whether to keep the default persistent SQLite `cache_config` or select another backend.\n- `autoe_assertion`: in single-RAG mode, `generated.name` +\n  `generated.answer_base_path`, `assertions.assertions_path`, and whether to\n  keep the default persistent SQLite `cache_config` or select `json`, `memory`,\n  or `none`. Explain that this cache does not apply to multi-RAG or\n  hierarchical scoring. In multi-RAG mode (`rag_methods` provided), ask for\n  `input_dir`, `output_dir`, `rag_methods` list, and `question_sets`.\n\n#### Storage fields (all config types, optional)\n\nAsk the user if they want to use Azure Blob Storage for input\u002Foutput. If yes, collect:\n\n| Field | Type | Notes |\n|-------|------|-------|\n| `use_blob_storage` | boolean | Whether to configure cloud storage. |\n| `storage_container_name` | string | Azure Blob container name (e.g. `my-datasets`). |\n| `storage_auth_method` | enum (`connection_string`, `managed_identity`) | How to authenticate to Azure. |\n| `storage_connection_string_env_var` | string | Env var name for connection string (default: `AZURE_STORAGE_CONNECTION_STRING`). Only when `storage_auth_method=connection_string`. |\n| `storage_account_url` | string (uri) | Storage account URL. Only when `storage_auth_method=managed_identity`. |\n| `storage_base_dir` | string | Optional prefix path within the container. |\n| `separate_output_container` | boolean | Whether output uses a different container than input. |\n\nIf storage is enabled, write the appropriate `input.storage`, `input_storage`, and\u002For `output_storage` blocks into `settings.yaml`.\n\nIf the user declines a field, fall back to the documented default and call out the assumption in your response.\n\n### Step 4 — Apply the Answers\n\nUse the answers from Step 3 to edit `settings.yaml` and `.env` directly:\n\n```yaml\n# LLM configuration (template — substitute values from ask_user answers)\nchat_model:\n  model: \u003Cmodel from ask_user>\n  llm_provider: \u003Cllm_provider from ask_user>\n  auth_type: \u003Cauth_type from ask_user>\n  api_key: ${\u003Capi_key_env_var>}        # only when auth_type=api_key\n  concurrent_requests: \u003Cconcurrent_requests>\n  init_args:                            # only for azure.* providers\n    azure_endpoint: \u003Cazure_endpoint>\n    api_version: \"\u003Capi_version>\"        # azure.openai.* only\n  retry:                                # scaffolded by `config init`; keep unless customized\n    type: exponential_backoff\n    max_retries: 6\n    base_delay: 2.0\n    max_delay: 30.0\n    jitter: true\n\n# Input data (autoq only)\ninput:\n  dataset_path: \u003Cdataset_path>\n  input_type: \u003Cinput_type>\n  text_column: \u003Ctext_column>\n```\n\n**Rules when writing the YAML:**\n\n- Omit `api_key` entirely when `auth_type=azure_managed_identity` — do not leave `${OPENAI_API_KEY}` in place.\n- Omit `init_args` for non-Azure providers.\n- Quote `api_version` (it would otherwise be parsed as a date).\n- For `azure_managed_identity`, do **not** add anything to `.env` for that key.\n- For `api_key` auth, append `\u003Capi_key_env_var>=\u003Cplaceholder>` to `.env` if the variable is missing, and tell the user to replace the placeholder with their real key before running any command.\n\nFor the full set of optional fields, read [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md).\n\n### Step 5 — Review Settings with the User\n\nAfter writing `settings.yaml`, **show the user the generated configuration** and ask if they want to customize anything. This is critical — the generated config uses sensible defaults, but users often need to tune dataset-specific or environment-specific values.\n\n1. Read the generated `settings.yaml` and display its contents to the user (use `show_file`).\n2. Use `ask_user` with a boolean field: *\"Would you like to customize any settings before proceeding?\"*\n3. If the user wants changes, use `ask_user` with a **free-text string field**: *\"Describe what you'd like to change\"* — let them say it in their own words (e.g., \"increase num_questions to 50 for all types\", \"change the model to gpt-4o\", \"set trials to 6 and add a custom criterion\"). Then apply the requested changes to `settings.yaml`.\n4. After applying changes, show the updated file and ask again: *\"Any other changes?\"* (boolean). Repeat until the user says no.\n\nDo **not** limit the user to predefined sections — they should be able to modify any field in `settings.yaml` by describing what they want.\n\n**Sections the user is most likely to customize** (call these out):\n\n- **autoq**: `num_questions` per type, `num_clusters`, `chunk_size`, assertion settings, `concurrent_requests`\n- **autoe_pairwise**: `trials`, `criteria`, `question_sets`, `cache_config`\n- **autoe_differential_pairwise**: `trials`, `criteria`, four extract\u002Fjudge prompts, `cache_config`\n- **autoe_reference**: `score_min`\u002F`score_max`, `trials`, `criteria`, `cache_config`\n- **autoe_assertion**: `pass_threshold`, `trials`\n\nFor the full set of optional fields and best practices, read [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md).\n\n### Step 6 — Validate Configuration\n\nThe benchmark-qed CLI validates `settings.yaml` via pydantic at startup, so any missing or malformed fields are reported when you run a command. After applying the answers, run the actual target command (e.g. `benchmark-qed autoq …`) — config errors surface immediately, before any LLM calls.\n\n## Best Practices\n\nSee [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md) for detailed best practices covering LLM configuration, prompts, question generation, assertion generation, evaluation, and retrieval.\n\nKey highlights:\n\n- Use `${OPENAI_API_KEY}` env var substitution — never hardcode secrets\n- Use `benchmark-qed init` (interactive wizard) to avoid manual YAML errors\n- Pin a specific version of benchmark-qed for reproducibility in CI\u002FCD\n\n## Gotchas\n\n- The `data download` command blocks on `typer.confirm()`. Always use `echo y | uvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed data download ...` to prevent hanging.\n- Environment variables in YAML use `${VAR_NAME}` syntax (resolved at load time via python-dotenv).\n- The `.env` file must be in the workspace root directory, not the project root.\n- Config types `autoe_pairwise`, `autoe_reference`, and `autoe_assertion` generate different settings.yaml templates — use the correct type for your evaluation method.\n- Prompts are copied as `.txt` files using Python `string.Template` syntax (`$variable` or `${variable}`).\n- **`prompt_config` key**: The runtime expects `prompt_config` (singular) for all autoe config types. Both `benchmark-qed init` and `config init` now generate the correct key. If you hand-edit YAML, ensure you use `prompt_config`, not `prompts_config`.\n- **`config init --storage-type blob`**: When combined with `--account-url` or `--connection-string`, the command uploads the generated `settings.yaml` and prompt files directly to blob storage. Without those auth options, it only scaffolds the storage YAML sections locally.\n- **Pairwise cache location**: The generated SQLite cache path is local even\n  when pairwise input\u002Foutput storage uses Azure Blob Storage. Set\n  `cache_config.type: none` to disable caching or choose another supported\n  backend explicitly.\n- **Assertion cache scope**: The generated `autoe_assertion` SQLite cache\n  applies to standard single-RAG answer-level scoring only. Multi-RAG and\n  hierarchical scoring do not use it; chunk-assertion scoring uses a separate\n  cache.\n- **Blob URI format**: CLI commands accept `blob:\u002F\u002F\u003Ccontainer>\u002F\u003Ckey>` for config paths. The CLI downloads the config and all sibling files (prompt templates) to a temp directory so relative paths resolve correctly. Credentials can be passed via `--account-url`\u002F`--connection-string` or the environment variables `AZURE_STORAGE_ACCOUNT_URL`\u002F`AZURE_STORAGE_CONNECTION_STRING`.\n- **Storage config in YAML**: AutoQ uses `input.storage` (nested under `input`) and `output_storage` (top-level). AutoE uses `input_storage` and `output_storage` (both top-level). When storage is omitted, local filesystem is used.\n- **graphrag-llm backend**: As of the graphrag-llm migration, built-in providers (OpenAI, Azure OpenAI, Azure AI Inference) are served by `graphrag-llm`'s LiteLLM-backed factory. Custom providers must implement the `graphrag_llm.completion.LLMCompletion` or `graphrag_llm.embedding.LLMEmbedding` interfaces (the older `benchmark_qed.llm.type.base.ChatModel` \u002F `EmbeddingModel` Protocols have been removed). See [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md#custom-llm-providers).\n","# Benchmark-QED Workspace Setup\n\nInitialize workspaces, generate configuration files, download datasets, and manage settings for the benchmark-qed RAG benchmarking tool.\n\n## Prerequisites\n\nbenchmark-qed requires Python 3.11+ and uv. Run commands with `uvx` to avoid installing globally:\n\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed \u003Ccommand>\n```\n\nPin a specific version for reproducibility:\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed@v1.2.3\" benchmark-qed \u003Ccommand>\n```\n\nIf `uvx` is unavailable, install uv first:\n```bash\npip install uv && uvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed \u003Ccommand>\n```\n\n## Procedure\n\n### Step 1 — Initialize a Workspace\n\n**Option A (Recommended): Interactive wizard**\n\nThe interactive wizard guides you through configuration with sensible defaults:\n\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed init \u003Croot_directory>\n```\n\nThis walks through:\n\n- Config type selection (autoq, autoe_pairwise, autoe_differential_pairwise, autoe_reference, autoe_assertion)\n- LLM provider selection with Azure-specific prompts (endpoint, API version)\n- Section-by-section customization (press Enter to accept defaults)\n- Automatic YAML validation before writing\n\n**Option B: Non-interactive (template-based)**\n\nGenerate a static template and edit manually:\n\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed config init \u003Cconfig_type> \u003Croot_directory>\n```\n\n**Config types** (pick one):\n| Type | Purpose |\n|------|---------|\n| `autoq` | Question generation (includes all prompt templates) |\n| `autoe_pairwise` | Pairwise comparison evaluation |\n| `autoe_differential_pairwise` | Two-stage extract-and-judge pairwise evaluation |\n| `autoe_reference` | Reference-based scoring |\n| `autoe_assertion` | Assertion-based scoring |\n\nExample:\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed config init autoq .\u002Fmy_workspace\n```\n\n**Storage options** for `config init`:\n| Option | Description |\n|--------|-------------|\n| `--storage-type` \u002F `-s` | `local` (default) or `blob`. When `blob`, storage config sections are scaffolded as active YAML (not commented out). |\n| `--container-name` | Pre-fill the blob container name in generated storage config. |\n| `--account-url` | Pre-fill the account URL (managed-identity auth) in generated storage config. |\n| `--connection-string` | Pre-fill the connection string in generated storage config. |\n| `--base-dir` | Pre-fill a base prefix path within the container. |\n\nWhen `--storage-type blob` is combined with `--account-url` or `--connection-string`, the generated config and prompt files are also uploaded directly to the blob container.\n\nExample (blob):\n```bash\nuvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed config init autoq .\u002Fmy_workspace \\\n  --storage-type blob \\\n  --container-name my-datasets \\\n  --account-url https:\u002F\u002Fmyaccount.blob.core.windows.net \\\n  --base-dir experiments\u002Frun1\n```\n\nThis creates:\n```\nroot\u002F\n├── .env              # API key placeholder\n├── input\u002F            # Place your data here\n├── settings.yaml     # Main configuration file\n└── prompts\u002F          # LLM prompt templates\n```\n\n### Step 2 — Download Sample Data (Optional)\n\nDownload sample datasets for testing. This command has an interactive confirmation prompt with no `--yes` flag — use one of these approaches to avoid hanging:\n\n**Bash\u002FLinux\u002FmacOS:**\n```bash\necho y | uvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed data download \u003Cdataset> \u003Coutput_dir>\n```\n\n**PowerShell:**\n```powershell\n\"y\" | uvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed data download \u003Cdataset> \u003Coutput_dir>\n```\n\n**Available datasets**: `AP_news`, `podcast`, `example_answers`\n\n**Storage options** for `data download`:\n| Option | Description |\n|--------|-------------|\n| `--storage-type` | Set to `blob` to upload the dataset to Azure Blob Storage instead of extracting locally. |\n| `--container-name` | The blob container name. |\n| `--account-url` | Azure storage account URL (managed-identity auth). |\n| `--connection-string` | Azure storage connection string (alternative to `--account-url`). |\n| `--base-dir` | Base prefix in blob storage. Files are stored as `{base_dir}\u002F{output_dir}\u002F`. |\n\nExample (download to blob):\n```bash\necho y | uvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed data download AP_news datasets \\\n  --storage-type blob \\\n  --container-name my-datasets \\\n  --account-url https:\u002F\u002Fmyaccount.blob.core.windows.net\n```\n\n### Step 3 — Gather Configuration Choices from the User\n\nBefore writing any values into `settings.yaml`, **prompt the user with `ask_user`** to collect the LLM \u002F auth \u002F endpoint settings. Do not guess — these decisions are environment-specific and getting them wrong wastes downstream LLM calls. Use enum\u002Fboolean fields whenever possible so the user picks from a known set rather than typing free-form text.\n\nAsk in **a single `ask_user` form** (split into two if the workflow is autoq, since autoq also needs an embedding model). Tailor the follow-up fields based on the provider\u002Fauth choice — if the first answer reveals an Azure provider, ask the Azure-only fields in a second form.\n\n#### LLM (chat) fields to collect\n\n| Field | Type | Options \u002F examples | Notes |\n|-------|------|--------------------|-------|\n| `llm_provider` | enum | `openai.chat`, `azure.openai.chat`, `azure.inference.chat` | See provider table in [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md). |\n| `model` | string | `gpt-4.1`, `gpt-4o`, `o3-mini`, an Azure deployment name | For Azure providers this is the **deployment name**, not the base model id. |\n| `auth_type` | enum | `api_key` (default), `azure_managed_identity` | `azure_managed_identity` is only valid for `azure.*` providers. |\n| `api_key_env_var` | string | `OPENAI_API_KEY` (default), `AZURE_OPENAI_API_KEY`, … | Only ask when `auth_type=api_key`. The skill writes `${VAR_NAME}` into YAML and adds the variable to `.env`. |\n| `azure_endpoint` | string (uri) | e.g. `https:\u002F\u002Fmy-resource.openai.azure.com\u002F` | Only ask for `azure.*` providers. |\n| `api_version` | string | e.g. `2024-06-01` | Only ask for `azure.openai.*` providers. |\n| `concurrent_requests` | integer | default `4` | Optional; offer the default. |\n| `retry` | object | defaults to `exponential_backoff`\u002F6 retries | Optional. The `config init` scaffold now writes a default `retry:` block; offer to keep the defaults unless the user has a reason to change them. See [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md) for fields. |\n\n#### Embedding fields to collect (autoq only)\n\nAsk the same shape of questions for the embedding model:\n\n| Field | Type | Notes |\n|-------|------|-------|\n| `embedding_provider` | enum (`openai.embedding`, `azure.openai.embedding`, `azure.inference.embedding`) | Must be an *embedding* provider. |\n| `embedding_model` | string | e.g. `text-embedding-3-large`, or an Azure deployment name. |\n| Reuse `auth_type` \u002F `api_key_env_var` \u002F `azure_endpoint` \u002F `api_version` from the chat answers unless the user wants different values — ask a yes\u002Fno `reuse_chat_auth` boolean first. |\n\n#### Input data fields (autoq only)\n\n| Field | Type | Notes |\n|-------|------|-------|\n| `dataset_path` | string | Path to CSV\u002FJSON dataset, e.g. `.\u002Finput\u002Fdata.csv`. |\n| `input_type` | enum (`csv`, `json`) | |\n| `text_column` | string | Column\u002Fkey containing the text content. |\n\n#### Eval-config-specific fields (autoe_*)\n\nOnly ask the questions relevant to the chosen `config_type`:\n\n- `autoe_pairwise`: `base.name` + `base.answer_base_path`, plus a list of `others` (each with `name` and `answer_base_path`), `question_sets`, and whether to keep the default persistent SQLite `cache_config` or select `json`, `memory`, or `none`.\n- `autoe_differential_pairwise`: the same condition and question-set fields as\n  pairwise, plus whether to keep the default stage-aware SQLite cache. Explain\n  that extraction and verdict entries are stored independently.\n- `autoe_reference`: `reference.name` + `reference.answer_base_path`, a list of `generated` conditions with `name` and `answer_base_path`, and whether to keep the default persistent SQLite `cache_config` or select another backend.\n- `autoe_assertion`: in single-RAG mode, `generated.name` +\n  `generated.answer_base_path`, `assertions.assertions_path`, and whether to\n  keep the default persistent SQLite `cache_config` or select `json`, `memory`,\n  or `none`. Explain that this cache does not apply to multi-RAG or\n  hierarchical scoring. In multi-RAG mode (`rag_methods` provided), ask for\n  `input_dir`, `output_dir`, `rag_methods` list, and `question_sets`.\n\n#### Storage fields (all config types, optional)\n\nAsk the user if they want to use Azure Blob Storage for input\u002Foutput. If yes, collect:\n\n| Field | Type | Notes |\n|-------|------|-------|\n| `use_blob_storage` | boolean | Whether to configure cloud storage. |\n| `storage_container_name` | string | Azure Blob container name (e.g. `my-datasets`). |\n| `storage_auth_method` | enum (`connection_string`, `managed_identity`) | How to authenticate to Azure. |\n| `storage_connection_string_env_var` | string | Env var name for connection string (default: `AZURE_STORAGE_CONNECTION_STRING`). Only when `storage_auth_method=connection_string`. |\n| `storage_account_url` | string (uri) | Storage account URL. Only when `storage_auth_method=managed_identity`. |\n| `storage_base_dir` | string | Optional prefix path within the container. |\n| `separate_output_container` | boolean | Whether output uses a different container than input. |\n\nIf storage is enabled, write the appropriate `input.storage`, `input_storage`, and\u002For `output_storage` blocks into `settings.yaml`.\n\nIf the user declines a field, fall back to the documented default and call out the assumption in your response.\n\n### Step 4 — Apply the Answers\n\nUse the answers from Step 3 to edit `settings.yaml` and `.env` directly:\n\n```yaml\n# LLM configuration (template — substitute values from ask_user answers)\nchat_model:\n  model: \u003Cmodel from ask_user>\n  llm_provider: \u003Cllm_provider from ask_user>\n  auth_type: \u003Cauth_type from ask_user>\n  api_key: ${\u003Capi_key_env_var>}        # only when auth_type=api_key\n  concurrent_requests: \u003Cconcurrent_requests>\n  init_args:                            # only for azure.* providers\n    azure_endpoint: \u003Cazure_endpoint>\n    api_version: \"\u003Capi_version>\"        # azure.openai.* only\n  retry:                                # scaffolded by `config init`; keep unless customized\n    type: exponential_backoff\n    max_retries: 6\n    base_delay: 2.0\n    max_delay: 30.0\n    jitter: true\n\n# Input data (autoq only)\ninput:\n  dataset_path: \u003Cdataset_path>\n  input_type: \u003Cinput_type>\n  text_column: \u003Ctext_column>\n```\n\n**Rules when writing the YAML:**\n\n- Omit `api_key` entirely when `auth_type=azure_managed_identity` — do not leave `${OPENAI_API_KEY}` in place.\n- Omit `init_args` for non-Azure providers.\n- Quote `api_version` (it would otherwise be parsed as a date).\n- For `azure_managed_identity`, do **not** add anything to `.env` for that key.\n- For `api_key` auth, append `\u003Capi_key_env_var>=\u003Cplaceholder>` to `.env` if the variable is missing, and tell the user to replace the placeholder with their real key before running any command.\n\nFor the full set of optional fields, read [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md).\n\n### Step 5 — Review Settings with the User\n\nAfter writing `settings.yaml`, **show the user the generated configuration** and ask if they want to customize anything. This is critical — the generated config uses sensible defaults, but users often need to tune dataset-specific or environment-specific values.\n\n1. Read the generated `settings.yaml` and display its contents to the user (use `show_file`).\n2. Use `ask_user` with a boolean field: *\"Would you like to customize any settings before proceeding?\"*\n3. If the user wants changes, use `ask_user` with a **free-text string field**: *\"Describe what you'd like to change\"* — let them say it in their own words (e.g., \"increase num_questions to 50 for all types\", \"change the model to gpt-4o\", \"set trials to 6 and add a custom criterion\"). Then apply the requested changes to `settings.yaml`.\n4. After applying changes, show the updated file and ask again: *\"Any other changes?\"* (boolean). Repeat until the user says no.\n\nDo **not** limit the user to predefined sections — they should be able to modify any field in `settings.yaml` by describing what they want.\n\n**Sections the user is most likely to customize** (call these out):\n\n- **autoq**: `num_questions` per type, `num_clusters`, `chunk_size`, assertion settings, `concurrent_requests`\n- **autoe_pairwise**: `trials`, `criteria`, `question_sets`, `cache_config`\n- **autoe_differential_pairwise**: `trials`, `criteria`, four extract\u002Fjudge prompts, `cache_config`\n- **autoe_reference**: `score_min`\u002F`score_max`, `trials`, `criteria`, `cache_config`\n- **autoe_assertion**: `pass_threshold`, `trials`\n\nFor the full set of optional fields and best practices, read [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md).\n\n### Step 6 — Validate Configuration\n\nThe benchmark-qed CLI validates `settings.yaml` via pydantic at startup, so any missing or malformed fields are reported when you run a command. After applying the answers, run the actual target command (e.g. `benchmark-qed autoq …`) — config errors surface immediately, before any LLM calls.\n\n## Best Practices\n\nSee [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md) for detailed best practices covering LLM configuration, prompts, question generation, assertion generation, evaluation, and retrieval.\n\nKey highlights:\n\n- Use `${OPENAI_API_KEY}` env var substitution — never hardcode secrets\n- Use `benchmark-qed init` (interactive wizard) to avoid manual YAML errors\n- Pin a specific version of benchmark-qed for reproducibility in CI\u002FCD\n\n## Gotchas\n\n- The `data download` command blocks on `typer.confirm()`. Always use `echo y | uvx --from \"git+https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\" benchmark-qed data download ...` to prevent hanging.\n- Environment variables in YAML use `${VAR_NAME}` syntax (resolved at load time via python-dotenv).\n- The `.env` file must be in the workspace root directory, not the project root.\n- Config types `autoe_pairwise`, `autoe_reference`, and `autoe_assertion` generate different settings.yaml templates — use the correct type for your evaluation method.\n- Prompts are copied as `.txt` files using Python `string.Template` syntax (`$variable` or `${variable}`).\n- **`prompt_config` key**: The runtime expects `prompt_config` (singular) for all autoe config types. Both `benchmark-qed init` and `config init` now generate the correct key. If you hand-edit YAML, ensure you use `prompt_config`, not `prompts_config`.\n- **`config init --storage-type blob`**: When combined with `--account-url` or `--connection-string`, the command uploads the generated `settings.yaml` and prompt files directly to blob storage. Without those auth options, it only scaffolds the storage YAML sections locally.\n- **Pairwise cache location**: The generated SQLite cache path is local even\n  when pairwise input\u002Foutput storage uses Azure Blob Storage. Set\n  `cache_config.type: none` to disable caching or choose another supported\n  backend explicitly.\n- **Assertion cache scope**: The generated `autoe_assertion` SQLite cache\n  applies to standard single-RAG answer-level scoring only. Multi-RAG and\n  hierarchical scoring do not use it; chunk-assertion scoring uses a separate\n  cache.\n- **Blob URI format**: CLI commands accept `blob:\u002F\u002F\u003Ccontainer>\u002F\u003Ckey>` for config paths. The CLI downloads the config and all sibling files (prompt templates) to a temp directory so relative paths resolve correctly. Credentials can be passed via `--account-url`\u002F`--connection-string` or the environment variables `AZURE_STORAGE_ACCOUNT_URL`\u002F`AZURE_STORAGE_CONNECTION_STRING`.\n- **Storage config in YAML**: AutoQ uses `input.storage` (nested under `input`) and `output_storage` (top-level). AutoE uses `input_storage` and `output_storage` (both top-level). When storage is omitted, local filesystem is used.\n- **graphrag-llm backend**: As of the graphrag-llm migration, built-in providers (OpenAI, Azure OpenAI, Azure AI Inference) are served by `graphrag-llm`'s LiteLLM-backed factory. Custom providers must implement the `graphrag_llm.completion.LLMCompletion` or `graphrag_llm.embedding.LLMEmbedding` interfaces (the older `benchmark_qed.llm.type.base.ChatModel` \u002F `EmbeddingModel` Protocols have been removed). See [references\u002Fconfig-reference.md](references\u002Fconfig-reference.md#custom-llm-providers).\n",{"name":5,"description":7},"main","7366a97e7a0b2fefda7b1fbb4cc5d43c791fabaa",".apm\u002Fskills\u002Fbenchmark-qed-setup",24,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed","https:\u002F\u002Fmicrosoft.github.io\u002Fbenchmark-qed\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-07 01:53:43",{"source":9,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add microsoft\u002Fbenchmark-qed --skill benchmark-qed-setup",{"tool":59,"command":60},"bunx","bunx skills add microsoft\u002Fbenchmark-qed --skill benchmark-qed-setup",{"tool":62,"command":63},"pnpm","pnpm dlx skills add microsoft\u002Fbenchmark-qed --skill benchmark-qed-setup","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\u002Fblob\u002Fmain\u002F.apm\u002Fskills\u002Fbenchmark-qed-setup\u002FSKILL.md",true,[67],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fconfig-reference.md","REFERENCE","参考文档",23209,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\u002Fblob\u002Fmain\u002F.apm\u002Fskills\u002Fbenchmark-qed-setup\u002Freferences\u002Fconfig-reference.md",[74,88],{"skillNo":75,"name":76,"nameZh":77,"description":78,"descriptionZh":79,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":80,"categories":81,"keywords":84,"publishedAt":38},"01M69BKWP6SD1EWM9AGXW54EYN","benchmark-qed-autoq","RAG 基准问题生成","Generate benchmark questions and assertions from input data using benchmark-qed. Use when: generating local, global, linked, or activity questions for RAG benchmarking, creating assertions for existing questions, computing assertion statistics, or running the autoq question generation pipeline. Also use when the user wants to create a benchmark question set, build evaluation questions from a dataset, or generate ground-truth assertions — even if they don't say \"autoq\" explicitly.","使用 benchmark-qed 从输入数据生成基准问题和断言。适用于：为 RAG 基准测试生成局部、全局、链接或活动问题，为现有问题创建断言，计算断言统计，或运行 autoq 问题生成流水线。当用户想要创建基准问题集、从数据集构建评估问题，或生成真值断言时也适用——即使用户没有明确说“autoq”。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\u002Fblob\u002Fmain\u002F.apm\u002Fskills\u002Fbenchmark-qed-autoq\u002FSKILL.md",[82,83],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[32,85,36,37,86,87],"benchmark qed autoq","create","generate",{"skillNo":89,"name":90,"nameZh":91,"description":92,"descriptionZh":93,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":94,"categories":95,"keywords":98,"publishedAt":38},"01M69BKT1MSCAN07KS096R4DG9","benchmark-qed-autoe","RAG 系统输出评估","Evaluate RAG system outputs using benchmark-qed scoring methods. Use when: running pairwise comparisons, reference-based scoring, assertion-based evaluation (flat or hierarchical), retrieval metrics, or statistical significance tests on RAG outputs. Also use when the user wants to score, compare, or evaluate RAG methods, measure retrieval quality, or run significance tests on benchmark results — even if they don't say \"autoe\" explicitly.","使用 benchmark-qed 评分方法评估 RAG 系统输出。适用于：运行成对比较、基于参考的评分、基于断言的评估（扁平或分层）、检索指标，或对 RAG 输出进行统计显著性检验。当用户想要对 RAG 方法进行评分、比较或评估、衡量检索质量，或对基准结果进行显著性检验时也适用——即使用户没有明确说“autoe”。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fbenchmark-qed\u002Fblob\u002Fmain\u002F.apm\u002Fskills\u002Fbenchmark-qed-autoe\u002FSKILL.md",[96,97],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[32,99,37,100],"benchmark qed autoe","run"]