[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69BCFPN3MJQWK63RGCHA419":3,"skill-same:01M69BCFPN3MJQWK63RGCHA419":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":46,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M69BCFPN3MJQWK63RGCHA419","zavacliniq",null,"ZavaClinIQ – AI-powered outpatient clinical assistant using SQL Server 2025 vector search + Foundry Local (phi-4, qwen3-embedding). Use when: deploying zavacliniq scripts, building clinical evidence embeddings, running vector search procs, generating AI care plans via RAG, working in sqlserver2025\u002Fzavacliniq\u002F.","microsoft\u002Fsqlaiinaction","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69BC4075NPTSFVZYMHFBX6F",4,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fsqlaiinaction\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fzavacliniq\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[5,29,30,31,32,33,34],"assistant","foundry","foundry local","sql","sql server","rag","2026-11-10 10:12:30",false,"---\nname: zavacliniq\ndescription: 'ZavaClinIQ – AI-powered outpatient clinical assistant using SQL Server 2025 vector search + Foundry Local (phi-4, qwen3-embedding). Use when: deploying zavacliniq scripts, building clinical evidence embeddings, running vector search procs, generating AI care plans via RAG, working in sqlserver2025\u002Fzavacliniq\u002F.'\n---\n\n# ZavaClinIQ – SQL Server 2025 + Foundry Local\n\n## Architecture\n- **SQL Server 2025** on localhost, Windows auth, database `zavacliniq`\n- **Foundry Local CLI 0.10.1+** (public preview) — one daemon serves ALL loaded models on a single pinned port (`5273`)\n- **Embeddings**: `qwen3-embedding-0.6b` (1024 dims) — public catalog\n- **Chat**: `phi-4` (auto-selects GPU variant per machine) — public catalog\n- **Caddy HTTPS proxy**: port 8444 → embeddings, port 8445 → chat, both → `127.0.0.1:5273` ([build\u002FCaddyfile](..\u002F..\u002F..\u002Fsqlserver2025\u002Fzavacliniq\u002Fbuild\u002FCaddyfile))\n- **Provisioning**: `build\u002FSetup-FoundryLocal.ps1` verifies\u002Finstalls the CLI, pins the port, starts the daemon, downloads + loads both models, smoke-tests embeddings, installs + starts Caddy, HTTPS sanity-checks both Caddy ports, then imports Caddy's root CA into the Local Computer store and restarts SQL Server (one UAC prompt; skipped when already trusted, and skippable with `-SkipCertTrust`). `build\u002FTeardown-FoundryLocal.ps1` reverses the Foundry\u002FCaddy side (stops Caddy, unloads models, stops daemon, clears cache, resets port) for a clean re-run. There is **no separate database teardown** — `Deploy-ZavaClinIQ.ps1` step 01 drops + recreates `zavacliniq` on every run.\n- **sqlcmd**: run the T-SQL scripts with `sqlcmd -E -I` (Windows auth; `-I` sets `QUOTED_IDENTIFIER ON`, which sqlcmd otherwise defaults OFF)\n\n## Flow\n```\nSQL Server 2025 → HTTPS → Caddy proxy → Foundry Local (localhost)\n```\n- Embeddings: `AI_GENERATE_EMBEDDINGS(@prompt USE MODEL FoundryLocalEmbeddingModel)` → 1024-dim vector\n- Chat: `sp_invoke_external_rest_endpoint` → `https:\u002F\u002Flocalhost:8445\u002Fv1\u002Fchat\u002Fcompletions`\n- Vector search: `VECTOR_SEARCH()` with DiskANN index (cosine metric)\n- Care plan: vector search → prompt assembly → Foundry Local inference → JSON parse → ledger insert\n\n## Critical Facts\n- Vector dimensions are **1024** (qwen3-embedding-0.6b)\n- **Requires Foundry Local CLI 0.10.1+** — both `qwen3-embedding-0.6b` and `phi-4` are in the\n  public catalog. Install with `winget install Microsoft.FoundryLocal`. In 0.10.x a single\n  daemon serves every loaded model on one port (no per-service ports).\n- `sp_invoke_external_rest_endpoint` max timeout is **230 seconds** — prompts must stay concise\n- Phi-4 model ID is **variant-specific** per machine — proc auto-detects via `\u002Fv1\u002Fmodels` endpoint\n- `foundry model load` (NOT `foundry model run`) — `run` is interactive chat, `load` serves the REST API\n- Daemon port is pinned via `foundry config set port 5273`; start with `foundry server start` (0.10.x; the old `foundry service` commands are gone)\n- `00_prereqs.sql` (enables `external rest endpoint`) and `01_database.sql` (creates the database) run against **master**. All other scripts run against **zavacliniq**.\n- Post-filter compensation: `VECTOR_SEARCH()` applies JOINs\u002FWHERE after the ANN scan, so procs over-fetch 3x\n- Care plan proc generates structured JSON: assessment, contraindications, medications (name\u002Fdose\u002Froute), follow-up\n- Care plans are persisted to `care.CarePlanLedger` (append-only ledger) with full audit trail\n\n## Database Design\n- **Schemas**: `content` (clinical documents + chunks + embeddings), `care` (care plans, ledger, patient vitals, patient-clinic links), `org` (clinics), `ref` (US states lookup)\n- **Ledger**: `care.CarePlanLedger` uses `LEDGER = ON (APPEND_ONLY = ON)` for audit immutability\n- **ADR**: `ACCELERATED_DATABASE_RECOVERY = ON`\n- **Optimized Locking**: `OPTIMIZED_LOCKING = ON`\n\n## Stored Procedures\n| Proc | Purpose |\n|------|---------|\n| `content.SearchChunksByPrompt_Vector` | Vector search for clinical evidence chunks (3x over-fetch) |\n| `care.usp_ai_agent_care_plan` | RAG agent: vector search → prompt assembly → Foundry Local chat → JSON parse → ledger insert |\n\n## Script Execution Order\n\nAll setup scripts are in the `build\u002F` subfolder (`sqlserver2025\u002Fzavacliniq\u002Fbuild\u002F`).\n\n**One-shot deploy (preferred):** run the build set in order, stopping on the first error:\n\n```powershell\nc:\\sqlaiinaction\\sqlserver2025\\zavacliniq\\build\\Deploy-ZavaClinIQ.ps1\n```\n\nThe explicit per-script sequence below is what the deploy script runs — use it for\nmanual\u002Fstep-by-step execution:\n\n```powershell\n$scriptDir = 'c:\\sqlaiinaction\\sqlserver2025\\zavacliniq\\build'\n# -I sets QUOTED_IDENTIFIER ON (sqlcmd defaults it OFF) — required by the JSON\n# CHECK constraints in 02_schema and CREATE VECTOR INDEX in 06.\n\n# Prerequisites (run against master):\nsqlcmd -S localhost -d master     -E -I -i \"$scriptDir\\00_prereqs.sql\"\nsqlcmd -S localhost -d master     -E -I -i \"$scriptDir\\01_database.sql\"\n\n# Against zavacliniq (all remaining):\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\02_schema.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\03_seeddata.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\04_ai_model.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\05_generate_embeddings.sql\"           # calls Foundry Local\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\06_create_vector_index.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\07_create_proc_for_vector_search.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\08_ai_agent_care_plan.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\09_add_clinics.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\10_verify.sql\"\n```\n\n## Demo Scripts (run live after deployment)\nThe two live demo scripts are in the `demo\u002F` subfolder:\n```powershell\n$demoDir = 'c:\\sqlaiinaction\\sqlserver2025\\zavacliniq\\demo'\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$demoDir\\04_call_vector_search.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$demoDir\\06_call_ai_agent_care_plan.sql\"          # full RAG pipeline (~60-85s)\n```\n\n## Demo Walkthrough (on-stage)\nConsolidated teaching-order scripts live in `sqlserver2025\u002Fzavacliniq\u002Fdemo\u002F`; presentation\nassets in `sqlserver2025\u002Fzavacliniq\u002Fresources\u002F`. Only two demo scripts are executed live;\nthe rest are **do not execute** (they recreate already-deployed objects).\n1. `resources\u002Farchitecture-slide.png` (or `.html` full-screen) — frame: SQL 2025 + Foundry Local, one edge device, no cloud\n2. `demo\u002F01_clinical_evidence_building_blocks.sql` — building blocks (EXTERNAL MODEL, VECTOR(1024), AI_GENERATE_EMBEDDINGS, VECTOR INDEX) — walk through\n3. `demo\u002F02_security_and_prereqs.sql` — four trust layers (sp_configure, HTTPS\u002FTLS, cert, least-priv) — walk through\n4. `demo\u002F03_vector_search_proc.sql` — vector search proc — walk through\n5. `demo\u002F04_call_vector_search.sql` — **EXECUTE LIVE** — clinical question → ranked evidence (~400ms)\n6. `demo\u002F05_ai_agent_care_plan_proc.sql` — RAG agent proc — walk through\n7. `demo\u002F06_call_ai_agent_care_plan.sql` — **EXECUTE LIVE** — Art Vandelay (hypertensive emergency) → care plan + ledger (~60-85s)\n8. `demo\u002Fssms_copilot_prompt.md` (optional) · `resources\u002Ftablet-demo.html` (optional visual closer)\n\n**All procs are created by `build\u002F`, not `demo\u002F`.** `demo\u002F03` and `demo\u002F05` are read-only teaching copies of\n`build\u002F07` (`content.SearchChunksByPrompt_Vector`) and `build\u002F09` (`care.usp_ai_agent_care_plan`) — same object\nnames via `CREATE OR ALTER`, so running them would **overwrite** the deployed procs with reformatted\u002Fcondensed\nvariants, not create duplicates. Only `demo\u002F04` and `demo\u002F06` execute; `demo\u002F01`\u002F`02` are narration-only.\n\n**Auto-run the live scripts:** `demo\u002FRun-LiveDemo.ps1` runs only `demo\u002F04` + `demo\u002F06` in order (skips the\nnarration\u002Fteaching copies), with per-script timing; `-Pause` waits for Enter before each for stage pacing.\n\nRegenerate `architecture-slide.png` with the **html-slide-to-png** skill (Edge classic headless, `--window-size=1280,720 --force-device-scale-factor=2`).\n\n## Seed Data\n- 15 clinical documents, 38 text chunks (SOPs, symptom playbooks, escalation policies, allergy cross-reference)\n- 25 clinic locations, 5 patients with vitals and care plans (added by `09_add_clinics.sql`)\n\n## Prerequisites (before running scripts)\n1. Run `build\u002FSetup-FoundryLocal.ps1` — provisions the Foundry daemon + both models, starts Caddy on 8444\u002F8445, HTTPS sanity-checks both ports, and imports Caddy's root CA + restarts SQL Server (one UAC prompt; skipped when already trusted, or with `-SkipCertTrust`).\n2. `sp_invoke_external_rest_endpoint` enabled — handled by `00_prereqs.sql`.\n\n## Troubleshooting\n- `AI_GENERATE_EMBEDDINGS` TLS error → re-run `build\u002FSetup-FoundryLocal.ps1` (auto-imports Caddy's root CA + restarts SQL), or import `%APPDATA%\\Caddy\\pki\\authorities\\local\\root.crt` via `certlm.msc` and restart SQL\n- `04_ai_model.sql` fails its embedding sanity check → the Foundry daemon (`127.0.0.1:5273`) or Caddy (`https:\u002F\u002Flocalhost:8444`) is down, or the cert isn't trusted — re-run `Setup-FoundryLocal.ps1`\n- Care plan times out (>230s) → reduce chunk preview length, lower max_tokens\n- Phi-4 not found → run `foundry model load phi-4`, verify the daemon on port `5273` (`foundry server status`)\n- Vector search returns fewer rows than expected → proc already over-fetches 3x\n- Embedding generation fails → check Caddy running + both models loaded (`foundry model load`)\n- `foundry model run` instead of `load` → `run` is interactive chat; use `load`\n\n## Demo Narrative\nOutpatient AI assistant: doctor enters symptoms on a clinic tablet, SQL Server 2025 searches clinical evidence via vector search, assembles a grounded prompt, calls a local SLM (phi-4), and generates a structured care plan — all on the laptop, no cloud, no API keys.\n","# ZavaClinIQ – SQL Server 2025 + Foundry Local\n\n## Architecture\n- **SQL Server 2025** on localhost, Windows auth, database `zavacliniq`\n- **Foundry Local CLI 0.10.1+** (public preview) — one daemon serves ALL loaded models on a single pinned port (`5273`)\n- **Embeddings**: `qwen3-embedding-0.6b` (1024 dims) — public catalog\n- **Chat**: `phi-4` (auto-selects GPU variant per machine) — public catalog\n- **Caddy HTTPS proxy**: port 8444 → embeddings, port 8445 → chat, both → `127.0.0.1:5273` ([build\u002FCaddyfile](..\u002F..\u002F..\u002Fsqlserver2025\u002Fzavacliniq\u002Fbuild\u002FCaddyfile))\n- **Provisioning**: `build\u002FSetup-FoundryLocal.ps1` verifies\u002Finstalls the CLI, pins the port, starts the daemon, downloads + loads both models, smoke-tests embeddings, installs + starts Caddy, HTTPS sanity-checks both Caddy ports, then imports Caddy's root CA into the Local Computer store and restarts SQL Server (one UAC prompt; skipped when already trusted, and skippable with `-SkipCertTrust`). `build\u002FTeardown-FoundryLocal.ps1` reverses the Foundry\u002FCaddy side (stops Caddy, unloads models, stops daemon, clears cache, resets port) for a clean re-run. There is **no separate database teardown** — `Deploy-ZavaClinIQ.ps1` step 01 drops + recreates `zavacliniq` on every run.\n- **sqlcmd**: run the T-SQL scripts with `sqlcmd -E -I` (Windows auth; `-I` sets `QUOTED_IDENTIFIER ON`, which sqlcmd otherwise defaults OFF)\n\n## Flow\n```\nSQL Server 2025 → HTTPS → Caddy proxy → Foundry Local (localhost)\n```\n- Embeddings: `AI_GENERATE_EMBEDDINGS(@prompt USE MODEL FoundryLocalEmbeddingModel)` → 1024-dim vector\n- Chat: `sp_invoke_external_rest_endpoint` → `https:\u002F\u002Flocalhost:8445\u002Fv1\u002Fchat\u002Fcompletions`\n- Vector search: `VECTOR_SEARCH()` with DiskANN index (cosine metric)\n- Care plan: vector search → prompt assembly → Foundry Local inference → JSON parse → ledger insert\n\n## Critical Facts\n- Vector dimensions are **1024** (qwen3-embedding-0.6b)\n- **Requires Foundry Local CLI 0.10.1+** — both `qwen3-embedding-0.6b` and `phi-4` are in the\n  public catalog. Install with `winget install Microsoft.FoundryLocal`. In 0.10.x a single\n  daemon serves every loaded model on one port (no per-service ports).\n- `sp_invoke_external_rest_endpoint` max timeout is **230 seconds** — prompts must stay concise\n- Phi-4 model ID is **variant-specific** per machine — proc auto-detects via `\u002Fv1\u002Fmodels` endpoint\n- `foundry model load` (NOT `foundry model run`) — `run` is interactive chat, `load` serves the REST API\n- Daemon port is pinned via `foundry config set port 5273`; start with `foundry server start` (0.10.x; the old `foundry service` commands are gone)\n- `00_prereqs.sql` (enables `external rest endpoint`) and `01_database.sql` (creates the database) run against **master**. All other scripts run against **zavacliniq**.\n- Post-filter compensation: `VECTOR_SEARCH()` applies JOINs\u002FWHERE after the ANN scan, so procs over-fetch 3x\n- Care plan proc generates structured JSON: assessment, contraindications, medications (name\u002Fdose\u002Froute), follow-up\n- Care plans are persisted to `care.CarePlanLedger` (append-only ledger) with full audit trail\n\n## Database Design\n- **Schemas**: `content` (clinical documents + chunks + embeddings), `care` (care plans, ledger, patient vitals, patient-clinic links), `org` (clinics), `ref` (US states lookup)\n- **Ledger**: `care.CarePlanLedger` uses `LEDGER = ON (APPEND_ONLY = ON)` for audit immutability\n- **ADR**: `ACCELERATED_DATABASE_RECOVERY = ON`\n- **Optimized Locking**: `OPTIMIZED_LOCKING = ON`\n\n## Stored Procedures\n| Proc | Purpose |\n|------|---------|\n| `content.SearchChunksByPrompt_Vector` | Vector search for clinical evidence chunks (3x over-fetch) |\n| `care.usp_ai_agent_care_plan` | RAG agent: vector search → prompt assembly → Foundry Local chat → JSON parse → ledger insert |\n\n## Script Execution Order\n\nAll setup scripts are in the `build\u002F` subfolder (`sqlserver2025\u002Fzavacliniq\u002Fbuild\u002F`).\n\n**One-shot deploy (preferred):** run the build set in order, stopping on the first error:\n\n```powershell\nc:\\sqlaiinaction\\sqlserver2025\\zavacliniq\\build\\Deploy-ZavaClinIQ.ps1\n```\n\nThe explicit per-script sequence below is what the deploy script runs — use it for\nmanual\u002Fstep-by-step execution:\n\n```powershell\n$scriptDir = 'c:\\sqlaiinaction\\sqlserver2025\\zavacliniq\\build'\n# -I sets QUOTED_IDENTIFIER ON (sqlcmd defaults it OFF) — required by the JSON\n# CHECK constraints in 02_schema and CREATE VECTOR INDEX in 06.\n\n# Prerequisites (run against master):\nsqlcmd -S localhost -d master     -E -I -i \"$scriptDir\\00_prereqs.sql\"\nsqlcmd -S localhost -d master     -E -I -i \"$scriptDir\\01_database.sql\"\n\n# Against zavacliniq (all remaining):\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\02_schema.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\03_seeddata.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\04_ai_model.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\05_generate_embeddings.sql\"           # calls Foundry Local\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\06_create_vector_index.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\07_create_proc_for_vector_search.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\08_ai_agent_care_plan.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\09_add_clinics.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$scriptDir\\10_verify.sql\"\n```\n\n## Demo Scripts (run live after deployment)\nThe two live demo scripts are in the `demo\u002F` subfolder:\n```powershell\n$demoDir = 'c:\\sqlaiinaction\\sqlserver2025\\zavacliniq\\demo'\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$demoDir\\04_call_vector_search.sql\"\nsqlcmd -S localhost -d zavacliniq -E -I -i \"$demoDir\\06_call_ai_agent_care_plan.sql\"          # full RAG pipeline (~60-85s)\n```\n\n## Demo Walkthrough (on-stage)\nConsolidated teaching-order scripts live in `sqlserver2025\u002Fzavacliniq\u002Fdemo\u002F`; presentation\nassets in `sqlserver2025\u002Fzavacliniq\u002Fresources\u002F`. Only two demo scripts are executed live;\nthe rest are **do not execute** (they recreate already-deployed objects).\n1. `resources\u002Farchitecture-slide.png` (or `.html` full-screen) — frame: SQL 2025 + Foundry Local, one edge device, no cloud\n2. `demo\u002F01_clinical_evidence_building_blocks.sql` — building blocks (EXTERNAL MODEL, VECTOR(1024), AI_GENERATE_EMBEDDINGS, VECTOR INDEX) — walk through\n3. `demo\u002F02_security_and_prereqs.sql` — four trust layers (sp_configure, HTTPS\u002FTLS, cert, least-priv) — walk through\n4. `demo\u002F03_vector_search_proc.sql` — vector search proc — walk through\n5. `demo\u002F04_call_vector_search.sql` — **EXECUTE LIVE** — clinical question → ranked evidence (~400ms)\n6. `demo\u002F05_ai_agent_care_plan_proc.sql` — RAG agent proc — walk through\n7. `demo\u002F06_call_ai_agent_care_plan.sql` — **EXECUTE LIVE** — Art Vandelay (hypertensive emergency) → care plan + ledger (~60-85s)\n8. `demo\u002Fssms_copilot_prompt.md` (optional) · `resources\u002Ftablet-demo.html` (optional visual closer)\n\n**All procs are created by `build\u002F`, not `demo\u002F`.** `demo\u002F03` and `demo\u002F05` are read-only teaching copies of\n`build\u002F07` (`content.SearchChunksByPrompt_Vector`) and `build\u002F09` (`care.usp_ai_agent_care_plan`) — same object\nnames via `CREATE OR ALTER`, so running them would **overwrite** the deployed procs with reformatted\u002Fcondensed\nvariants, not create duplicates. Only `demo\u002F04` and `demo\u002F06` execute; `demo\u002F01`\u002F`02` are narration-only.\n\n**Auto-run the live scripts:** `demo\u002FRun-LiveDemo.ps1` runs only `demo\u002F04` + `demo\u002F06` in order (skips the\nnarration\u002Fteaching copies), with per-script timing; `-Pause` waits for Enter before each for stage pacing.\n\nRegenerate `architecture-slide.png` with the **html-slide-to-png** skill (Edge classic headless, `--window-size=1280,720 --force-device-scale-factor=2`).\n\n## Seed Data\n- 15 clinical documents, 38 text chunks (SOPs, symptom playbooks, escalation policies, allergy cross-reference)\n- 25 clinic locations, 5 patients with vitals and care plans (added by `09_add_clinics.sql`)\n\n## Prerequisites (before running scripts)\n1. Run `build\u002FSetup-FoundryLocal.ps1` — provisions the Foundry daemon + both models, starts Caddy on 8444\u002F8445, HTTPS sanity-checks both ports, and imports Caddy's root CA + restarts SQL Server (one UAC prompt; skipped when already trusted, or with `-SkipCertTrust`).\n2. `sp_invoke_external_rest_endpoint` enabled — handled by `00_prereqs.sql`.\n\n## Troubleshooting\n- `AI_GENERATE_EMBEDDINGS` TLS error → re-run `build\u002FSetup-FoundryLocal.ps1` (auto-imports Caddy's root CA + restarts SQL), or import `%APPDATA%\\Caddy\\pki\\authorities\\local\\root.crt` via `certlm.msc` and restart SQL\n- `04_ai_model.sql` fails its embedding sanity check → the Foundry daemon (`127.0.0.1:5273`) or Caddy (`https:\u002F\u002Flocalhost:8444`) is down, or the cert isn't trusted — re-run `Setup-FoundryLocal.ps1`\n- Care plan times out (>230s) → reduce chunk preview length, lower max_tokens\n- Phi-4 not found → run `foundry model load phi-4`, verify the daemon on port `5273` (`foundry server status`)\n- Vector search returns fewer rows than expected → proc already over-fetches 3x\n- Embedding generation fails → check Caddy running + both models loaded (`foundry model load`)\n- `foundry model run` instead of `load` → `run` is interactive chat; use `load`\n\n## Demo Narrative\nOutpatient AI assistant: doctor enters symptoms on a clinic tablet, SQL Server 2025 searches clinical evidence via vector search, assembles a grounded prompt, calls a local SLM (phi-4), and generates a structured care plan — all on the laptop, no cloud, no API keys.\n",{"name":5,"description":7},"main","40bff503a54ac860d895552d2bc92af2aaabcc19",".github\u002Fskills\u002Fzavacliniq",0,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fsqlaiinaction","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-08-19 04:59:09",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add microsoft\u002Fsqlaiinaction --skill zavacliniq",{"tool":55,"command":56},"bunx","bunx skills add microsoft\u002Fsqlaiinaction --skill zavacliniq",{"tool":58,"command":59},"pnpm","pnpm dlx skills add microsoft\u002Fsqlaiinaction --skill zavacliniq","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fsqlaiinaction\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fzavacliniq\u002FSKILL.md",true,[],[64,81,89,101,110,129],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":74,"publishedAt":35},"01M69BCMJP8JZZ7V6HJJ3PM18N","zavalivesite-demo","Build \u002F prep \u002F run \u002F teardown lifecycle for the \"SQL and AI for Developers in Action\" (azuresqlcontainer) live-site demo — the Azure SQL preview container, one-command demo prep, idempotent container start, connectivity test, and teardown. Use when the user asks to prep\u002Fbuild\u002Fstart\u002Frecreate\u002Ftest\u002Freset\u002Fteardown the live site (Zava On-Call Console) demo environment. NOT for incident triage — that is the live-site-sql skill.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fsqlaiinaction\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fzavalivesite-demo\u002FSKILL.md",[70,71],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":72,"categoryName":73,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[75,76,77,32,78,79,80],"zavalivesite demo","run","azure","azure sql","test","triage",{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":88,"publishedAt":35},"01M69BCJDBJYX2MDVJGRD0QAN8","zavahospital","ZavaHospital – AI-powered inpatient clinical assistant using SQL Server 2025 vector search + NVIDIA NIM on AKS (GPU). Use when: deploying zavahospital build scripts, building encounter\u002Fdoctor-note embeddings, running vector search or clinical recommendation procs, presenting the on-stage demo, or working in sqlserver2025\u002Fzavahospital\u002F.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fsqlaiinaction\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fzavahospital\u002FSKILL.md",[87],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[83,33,32,29],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":98,"publishedAt":35},"01M69BCDBWJJCCPNAAAP1F30J7","live-site-sql","Live-site triage playbook for Azure SQL on-call incidents — protocol, diagnostic catalog (dx_index_exists, dx_resource_pressure, dx_deadlock_recent), hybrid search, and grounded mitigation generation. Loaded by the live-site-sql custom agent. Use when the user asks to mitigate, triage, or diagnose a Zava SQL incident.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fsqlaiinaction\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Flive-site-sql\u002FSKILL.md",[95,96,97],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":72,"categoryName":73,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},[99,32,77,100,78,80],"live site sql","diagnose",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":108,"publishedAt":35},"01M69BCB6CJWGTYS0REKX18TNQ","hyperscaleai","ZavaFin Act 3 \"Add AI\" demo — Azure SQL Hyperscale DiskANN vector search + in-database Phi-4 loan scoring, all in T-SQL. Use when the user wants to build\u002Fprovision the demo (Provision-Hyperscale, Deploy-Base, build SQL 00–04), run the demo live (Run-LiveDemo.ps1 — e.g. \"build demo\", \"run demo live\", \"run the hyperscale demo\"), tear it down, or work anywhere under hyperscale\u002F.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fsqlaiinaction\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fhyperscaleai\u002FSKILL.md",[107],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[103,76,77,32,78,109],"deploy",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":119,"publishedAt":35},"01M69BC8WVW4HXH0NVJMDG27G9","html-slide-to-png","Render a fixed-size HTML slide\u002Fdiagram to a crisp, full-frame PNG for PowerPoint or docs. Use when asked to \"generate a PNG from an HTML slide\", \"make a slide image\", \"export architecture-slide.html to PNG\", or when a browser-tool screenshot comes out clipped\u002Fblank. Uses Edge\u002FChrome CLASSIC headless — NOT the VS Code Playwright browser tool (its headed viewport is stuck tiny and clips everything).","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fsqlaiinaction\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fhtml-slide-to-png\u002FSKILL.md",[116],{"categoryNo":117,"categoryName":118,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[120,121,122,123,124,125,126,127,128],"html slide to png","docs","image","playwright","chrome","generate","powerpoint","diagram","architecture",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":35},"01M69BC6Q4KJ8WBWF87R69EPM6","demo-runbook","Presenter guide for walking Anna (or anyone) through the SQL + AI in Action demos live on stage. Use when the user asks to \"walk me through the \u003Cdemo> demo\", \"what's my next step \u002F what do I say next \u002F give me the next prompt\", \"how do I present \u003Cdemo>\", or is mid-demo and needs the next beat's narration, literal prompt, and expected result. Routes to the per-demo PRESENTER-RUNBOOK.md files. Covers zavacliniq, zavahospital, azuresqlcontainer (live-site), and hyperscale. Does NOT build\u002Fdeploy — hand off environment lifecycle to the demo-specific skills.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fsqlaiinaction\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fdemo-runbook\u002FSKILL.md",[],[136,32,109],"demo runbook"]