feat(ms-ai-architect): C3.3 — course_products (live-enumerert) + makeCourseClassifier (TDD) [skip-docs]
Produkt-slug->kategori-mapping for kurs-deteksjon (C3.3 av GODKJENT C3-spec).
- lib/taxonomy.mjs: makeCourseClassifier(tax) — speiler makeClassifier; forste
in-domain produkt vinner; skill AVLEDES fra category_skill (lagres ALDRI i
course_products -> kan ikke divergere); ukjent/tom/non-array -> null.
- data/domain-taxonomy.json: ny topp-niva course_products (slug->category) +
provenance. 15 in-domain live slugs.
- test-taxonomy.test.mjs (+6): atferd (in-domain->{skill,category}, first-wins,
out-of-domain/tom/non-array->null, manglende map) + REELL data-invariant
(hver slug-kategori resolver til skill, derivasjon matcher) + azure-openai-live.
ENUMERERING (gotcha #2, live mot /api/v1/modules?products=<slug> server-side):
- DOD (0 treff): azure-ai-foundry, ai-services, azure-ai-services, foundry ->
Foundry/AI-services-kurs dukker opp under 'azure-openai'.
- Slug-feller bekreftet live: 'fabric' (ikke microsoft-fabric), 'entra' (ikke
microsoft-entra-id), 'azure-cosmos-db' (ikke cosmos-db), 'azure-cognitive-search'
(ikke azure-ai-search).
- 'azure-kubernetes-service' live men EKSKLUDERT (ingen AI-kategori -> stoy).
- Inkluderte (15): azure-openai, azure-machine-learning, azure-cognitive-search,
azure-cosmos-db, fabric, azure-databricks, microsoft-copilot-studio,
power-automate, power-apps, power-platform, ai-builder, microsoft-365-copilot,
microsoft-purview, entra, defender-for-cloud.
Avvik fra spec 4.4-eksempel: course_products lagrer slug->category (ikke
slug->{skill,category}); skill avledes — anti-divergens, encapsulated av
makeCourseClassifier (downstream-kontrakt {skill,category} uendret).
Gate 7 C3.3 mott: test gronn, eval --json IDENTISK (refTall/K-counts uendret).
kb-update 263->269, validate PASSED (239/0), null regresjon.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
94c7f42128
commit
b9f51ea7b3
3 changed files with 111 additions and 1 deletions
|
|
@ -4,7 +4,8 @@
|
|||
"provenance": {
|
||||
"category_skill": "PHYSICAL DISK is canonical (skills/<skill>/references/<category>/). category-skill-map.json drifted on 4 entries (copilot-extensibility, monitoring-observability, performance-scalability, prompt-engineering) and is no longer consumed by code.",
|
||||
"sitemap_prefixes": "poll-sitemaps superset (18). discover-new-urls previously had only 12 — now reads this list for poll parity.",
|
||||
"notes": "dotnet_en-us_ deliberately excluded: 75 sitemaps, only ~12 matches — not worth weekly polling."
|
||||
"notes": "dotnet_en-us_ deliberately excluded: 75 sitemaps, only ~12 matches — not worth weekly polling.",
|
||||
"course_products": "Product slugs enumerated LIVE from the Learn Platform API (C3.3, server-side /api/v1/modules?products=<slug> probe). Doc slug 'azure-ai-foundry' is DEAD (0 hits) → Foundry/AI-services courses surface under 'azure-openai'. Slug gotchas confirmed live: 'fabric' (not 'microsoft-fabric'), 'entra' (not 'microsoft-entra-id'), 'azure-cosmos-db' (not 'cosmos-db'), 'azure-cognitive-search' (not 'azure-ai-search'). 'azure-kubernetes-service' is live but excluded (no AI category → noise). Maps slug->category; the owning skill is DERIVED from category_skill via makeCourseClassifier (never stored, cannot diverge)."
|
||||
},
|
||||
"sitemap_prefixes": [
|
||||
"azure_en-us_",
|
||||
|
|
@ -49,6 +50,23 @@
|
|||
"responsible-ai": "ms-ai-governance",
|
||||
"security-scoring": "ms-ai-security"
|
||||
},
|
||||
"course_products": {
|
||||
"azure-openai": "azure-ai-services",
|
||||
"azure-machine-learning": "mlops-genaiops",
|
||||
"azure-cognitive-search": "rag-architecture",
|
||||
"azure-cosmos-db": "data-engineering",
|
||||
"fabric": "data-engineering",
|
||||
"azure-databricks": "data-engineering",
|
||||
"microsoft-copilot-studio": "platforms",
|
||||
"power-automate": "platforms",
|
||||
"power-apps": "platforms",
|
||||
"power-platform": "platforms",
|
||||
"ai-builder": "platforms",
|
||||
"microsoft-365-copilot": "copilot-extensibility",
|
||||
"microsoft-purview": "responsible-ai",
|
||||
"entra": "ai-security-engineering",
|
||||
"defender-for-cloud": "ai-security-engineering"
|
||||
},
|
||||
"relevance": {
|
||||
"include": [
|
||||
{ "pattern": "/azure/ai-foundry/", "category": "azure-ai-services" },
|
||||
|
|
|
|||
|
|
@ -120,6 +120,31 @@ export function makeClassifier(tax) {
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a course classifier for the Learn Platform API course-detection spore
|
||||
* (C3). course_products maps an in-domain product slug → category; the owning
|
||||
* skill is DERIVED from category_skill (never stored redundantly), exactly as
|
||||
* makeClassifier derives skill for URL classification — so the slug→skill path
|
||||
* cannot diverge from the canonical category ownership. The FIRST in-domain
|
||||
* product in the list wins; a course whose products are all out-of-domain (no
|
||||
* slug in course_products) returns null and is therefore not a lead.
|
||||
* @param {object} tax
|
||||
* @returns {(products: string[]) => ({skill: string|null, category: string}|null)}
|
||||
*/
|
||||
export function makeCourseClassifier(tax) {
|
||||
const map = tax.course_products ?? {};
|
||||
return function classifyCourse(products) {
|
||||
if (!Array.isArray(products)) return null;
|
||||
for (const slug of products) {
|
||||
const category = map[slug];
|
||||
if (category) {
|
||||
return { skill: tax.category_skill[category] ?? null, category };
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Build a file-priority function mirroring report-changes getFilePriority:
|
||||
* ordered regex rules over the lowercased path; first match wins; else default.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue