diff --git a/src/app/docs/docs-slug-renderer.tsx b/src/app/docs/docs-slug-renderer.tsx index ba194963..db3e66f6 100644 --- a/src/app/docs/docs-slug-renderer.tsx +++ b/src/app/docs/docs-slug-renderer.tsx @@ -91,6 +91,12 @@ async function renderLocalDocsPage( /> {loadedPage.messages.title} {description} + {localRef.section === "concepts" ? ( + + ) : null} {localRef.section !== "systems" && localRef.section !== "glossary" ? ( + + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + + +
+ +
+ +
+ +
diff --git a/src/content/docs/glossary/decoder/messages/en.json b/src/content/docs/glossary/decoder/messages/en.json index 972a2a30..73c027ad 100644 --- a/src/content/docs/glossary/decoder/messages/en.json +++ b/src/content/docs/glossary/decoder/messages/en.json @@ -32,5 +32,10 @@ "title": "References" } }, - "openingSummary": "A decoder reads representations from an encoder or earlier blocks and maps them to an output space, often autoregressively or iteratively until a full sample is formed." + "openingSummary": "A decoder reads representations from an encoder or earlier blocks and maps them to an output space, often autoregressively or iteratively until a full sample is formed.", + "relatedDocs": { + "concept.autoregressive-generation": { + "reason": "Autoregressive generation explains the token-by-token loop decoder-based language models repeat after each next-token choice." + } + } } diff --git a/src/content/registry/concepts/autoregressive-generation.json b/src/content/registry/concepts/autoregressive-generation.json index a7e69097..436ca46c 100644 --- a/src/content/registry/concepts/autoregressive-generation.json +++ b/src/content/registry/concepts/autoregressive-generation.json @@ -8,9 +8,16 @@ "Autoregressive generation", "autoregressive decoding", "next-token generation", + "next token generation", + "next-token prediction", "AR generation" ], - "tags": ["foundations", "taxonomy", "attention"], + "tags": [ + "foundations", + "taxonomy", + "attention", + "token-to-probability-chain" + ], "relatedIds": [ "concept.token", "concept.logit", @@ -24,20 +31,26 @@ "concept.decode", "concept.prefill-decode-split", "concept.encoder-decoder", + "concept.transformer", "concept.conditioning", "concept.denoising-generation", + "concept.diffusion-model", "concept.quantization" ], "citationIds": [ + "citation.attention-is-all-you-need", + "citation.gpt-2-report", + "citation.raffel-t5", "citation.brown-gpt-3", "citation.curious-case-neural-text-degeneration" ], "status": "published", "createdAt": "2026-06-04T12:30:00.000Z", - "updatedAt": "2026-06-18T00:00:00.000Z", + "updatedAt": "2026-06-22T00:00:00.000Z", "conceptType": "general", "sidebarGrouping": { - "glossary": "generation-and-diffusion" + "glossary": "generation-and-diffusion", + "concepts": "inference" }, "prerequisiteIds": [ "concept.token", @@ -47,5 +60,10 @@ "concept.decoder", "concept.encoder-decoder" ], - "explainsIds": ["concept.conditioning"] + "explainsIds": [ + "concept.sampling-overview", + "concept.prefill", + "concept.decode", + "concept.prefill-decode-split" + ] } diff --git a/src/lib/content/autoregressive-generation-concept.test.ts b/src/lib/content/autoregressive-generation-concept.test.ts new file mode 100644 index 00000000..74167634 --- /dev/null +++ b/src/lib/content/autoregressive-generation-concept.test.ts @@ -0,0 +1,159 @@ +import { describe, expect, test } from "bun:test"; +import { createElement } from "react"; +import { renderToStaticMarkup } from "react-dom/server"; +import { ModulePageProviders } from "@/features/docs/components/ModulePageProviders"; +import { loadConceptPage } from "@/lib/content/concept-page"; +import { renderConceptDocsShell } from "@/lib/content/concept-shell-render"; +import { stripHtmlTags } from "@/lib/content/glossary-test-helpers"; +import { loadPublishedDocsPages } from "@/lib/content/pages"; +import { + PUBLISHED_CONCEPT_SECTION_REGISTRY_IDS, + PUBLISHED_DOCS_REGISTRY_IDS, +} from "@/lib/content/published-docs-registry-ids"; +import { loadRegistry } from "@/lib/content/registry"; +import { + getConceptById, + listRelatedRegistryRecords, +} from "@/lib/content/registry-runtime"; +import { deriveCuratedRelatedItems } from "@/lib/content/related-docs"; +import { buildSearchDocuments } from "@/lib/search/build-documents"; +import { docsSearchApi } from "@/lib/search/search-server"; + +describe("Autoregressive generation concept page", () => { + test("canonical concept route is published for the existing registry record", () => { + const record = getConceptById("concept.autoregressive-generation"); + + expect(record?.status).toBe("published"); + expect( + PUBLISHED_CONCEPT_SECTION_REGISTRY_IDS.has( + "concept.autoregressive-generation", + ), + ).toBe(true); + expect(record?.relatedIds).toEqual( + expect.arrayContaining([ + "concept.decoder", + "concept.encoder-decoder", + "concept.kv-cache", + "concept.prefill", + "concept.prefill-decode-split", + "concept.sampling-overview", + ]), + ); + }); + + test("curated related items route the concept toward serving and token-chain neighbors", () => { + const source = getConceptById("concept.autoregressive-generation"); + if (!source) { + throw new Error("expected concept.autoregressive-generation in registry"); + } + + const items = deriveCuratedRelatedItems( + source, + listRelatedRegistryRecords(), + PUBLISHED_DOCS_REGISTRY_IDS, + ); + + expect( + items.find((item) => item.registryId === "concept.decoder")?.href, + ).toBe("/docs/glossary/decoder"); + expect( + items.find((item) => item.registryId === "concept.encoder-decoder")?.href, + ).toBe("/docs/glossary/encoder-decoder"); + expect( + items.find((item) => item.registryId === "concept.kv-cache")?.href, + ).toBe("/docs/concepts/kv-cache"); + expect( + items.find((item) => item.registryId === "concept.prefill")?.href, + ).toBe("/docs/concepts/prefill"); + expect( + items.find((item) => item.registryId === "concept.prefill-decode-split") + ?.href, + ).toBe("/docs/glossary/prefill-decode-split"); + }); + + test("page renders the token loop, serving bridge, and related links", async () => { + const page = await loadConceptPage("autoregressive-generation"); + + expect(page.frontmatter.kind).toBe("concept"); + expect(page.frontmatter.status).toBe("published"); + expect(page.frontmatter.registryId).toBe( + "concept.autoregressive-generation", + ); + expect(page.messages.openingSummary?.toLowerCase()).toContain( + "next-token loop", + ); + + const html = renderToStaticMarkup( + createElement(ModulePageProviders, { + messages: page.messages, + assets: page.assets, + // biome-ignore lint/correctness/noChildrenProp: third createElement arg conflicts with strict props typing + children: page.content, + }), + ); + + expect(html).toContain("What It Is"); + expect(html).toContain("One Token At A Time"); + expect(html).toContain("From Architecture To Serving"); + expect(html).toContain("diffusion-style generation"); + expect(html).toContain('href="/docs/glossary/decoder"'); + expect(html).toContain('href="/docs/glossary/encoder-decoder"'); + expect(html).toContain('href="/docs/concepts/kv-cache"'); + expect(html).toContain('href="/docs/concepts/prefill"'); + expect(html).toContain('href="/docs/glossary/prefill-decode-split"'); + expect(html).toContain('href="/docs/glossary/sampling-overview"'); + expect(html).toContain('data-testid="curated-related-docs"'); + expect(html).not.toContain("Reader Shortcut"); + expect(html).not.toContain("Phase"); + }); + + test("shell render includes the folded summary and all expected references", async () => { + const page = await loadConceptPage("autoregressive-generation"); + + const html = renderConceptDocsShell(page); + const plainHtml = stripHtmlTags(html); + + expect(html).toContain('data-testid="folded-opening-summary"'); + expect(plainHtml).toContain("Summary"); + expect(plainHtml).toContain( + "Autoregressive generation is the step-by-step next-token loop", + ); + expect(html).toContain('data-testid="citation-list"'); + expect(plainHtml).toContain("Attention Is All You Need"); + expect(plainHtml).toContain("Language Models are Unsupervised"); + expect(plainHtml).toContain( + "Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer", + ); + }); + + test("discovery publishes both the concept explainer and glossary bridge for autoregressive generation", async () => { + const registry = await loadRegistry(); + const pages = await loadPublishedDocsPages("en"); + const documents = buildSearchDocuments(pages, registry); + + const conceptDocument = documents.find( + (entry) => entry.url === "/docs/concepts/autoregressive-generation", + ); + const glossaryDocument = documents.find( + (entry) => entry.url === "/docs/glossary/autoregressive-generation", + ); + + expect(conceptDocument?.registryId).toBe( + "concept.autoregressive-generation", + ); + expect(conceptDocument?.kind).toBe("concept"); + expect(conceptDocument?.facets.kind).toBe("concept"); + expect(glossaryDocument?.registryId).toBe( + "concept.autoregressive-generation", + ); + expect(glossaryDocument?.kind).toBe("glossary"); + expect(glossaryDocument?.facets.kind).toBe("glossary"); + + const results = await docsSearchApi.search("next-token loop"); + expect( + results.some( + (result) => result.url === "/docs/concepts/autoregressive-generation", + ), + ).toBe(true); + }); +}); diff --git a/src/lib/content/autoregressive-generation-registry.test.ts b/src/lib/content/autoregressive-generation-registry.test.ts new file mode 100644 index 00000000..b78341e0 --- /dev/null +++ b/src/lib/content/autoregressive-generation-registry.test.ts @@ -0,0 +1,102 @@ +import { describe, expect, test } from "bun:test"; +import { PUBLISHED_DOCS_REGISTRY_IDS } from "@/lib/content/published-docs-registry-ids"; +import { registryRecordHref } from "@/lib/content/registry-linking"; +import { + getConceptById, + listRelatedRegistryRecords, +} from "@/lib/content/registry-runtime"; +import { deriveCuratedRelatedItems } from "@/lib/content/related-docs"; + +describe("Autoregressive generation registry discovery", () => { + test("record carries broad-concept metadata and routes canonically to the concept page", () => { + const record = getConceptById("concept.autoregressive-generation"); + + expect(record?.status).toBe("published"); + expect(record?.conceptType).toBe("general"); + expect(record?.aliases).toEqual( + expect.arrayContaining([ + "autoregressive decoding", + "next-token generation", + "next token generation", + "next-token prediction", + ]), + ); + expect(record?.tags).toEqual( + expect.arrayContaining([ + "foundations", + "taxonomy", + "attention", + "token-to-probability-chain", + ]), + ); + expect(record?.citationIds).toEqual( + expect.arrayContaining([ + "citation.attention-is-all-you-need", + "citation.gpt-2-report", + "citation.raffel-t5", + ]), + ); + expect(record?.sidebarGrouping).toEqual({ + glossary: "generation-and-diffusion", + concepts: "inference", + }); + expect(record?.explainsIds).toEqual([ + "concept.sampling-overview", + "concept.prefill", + "concept.decode", + "concept.prefill-decode-split", + ]); + expect( + PUBLISHED_DOCS_REGISTRY_IDS.has("concept.autoregressive-generation"), + ).toBe(true); + if (!record) { + throw new Error("expected concept.autoregressive-generation in registry"); + } + expect(registryRecordHref(record)).toBe( + "/docs/concepts/autoregressive-generation", + ); + }); + + test("curated related discovery connects the broad concept to nearby token, architecture, and serving docs", () => { + const source = getConceptById("concept.autoregressive-generation"); + if (!source) { + throw new Error("expected concept.autoregressive-generation in registry"); + } + + const items = deriveCuratedRelatedItems( + source, + listRelatedRegistryRecords(), + PUBLISHED_DOCS_REGISTRY_IDS, + ); + + expect( + items.find((item) => item.registryId === "concept.token")?.href, + ).toBe("/docs/glossary/token"); + expect( + items.find((item) => item.registryId === "concept.logit")?.href, + ).toBe("/docs/glossary/logit"); + expect( + items.find((item) => item.registryId === "concept.softmax")?.href, + ).toBe("/docs/glossary/softmax"); + expect( + items.find((item) => item.registryId === "concept.decoder")?.href, + ).toBe("/docs/glossary/decoder"); + expect( + items.find((item) => item.registryId === "concept.encoder-decoder")?.href, + ).toBe("/docs/glossary/encoder-decoder"); + expect( + items.find((item) => item.registryId === "concept.sampling-overview") + ?.href, + ).toBe("/docs/glossary/sampling-overview"); + expect( + items.find((item) => item.registryId === "concept.kv-cache")?.href, + ).toBe("/docs/concepts/kv-cache"); + expect( + items.find((item) => item.registryId === "concept.prefill")?.href, + ).toBe("/docs/concepts/prefill"); + expect( + items.find((item) => item.registryId === "concept.prefill-decode-split") + ?.href, + ).toBe("/docs/glossary/prefill-decode-split"); + }); +}); diff --git a/src/lib/content/citations.test.ts b/src/lib/content/citations.test.ts index e3ae0592..42dba7d9 100644 --- a/src/lib/content/citations.test.ts +++ b/src/lib/content/citations.test.ts @@ -31,6 +31,12 @@ const REPRESENTATIVE_CITATIONS = [ mla: "Raffel, Colin, et al.", url: "https://arxiv.org/abs/1910.10683", }, + { + id: "citation.gpt-2-report", + title: "Language Models are Unsupervised Multitask Learners", + mla: "Radford, Alec, et al.", + url: "https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf", + }, { id: "citation.peng-yarn", title: "YaRN: Efficient Context Window Extension of Large Language Models", @@ -60,7 +66,6 @@ describe("citations", () => { const citation = getCitationById(fixture.id); expect(citation?.title).toContain(fixture.title); expect(citation?.mla).toContain(fixture.mla); - expect(citation?.mla).toContain(fixture.url); expect(citation?.url).toBe(fixture.url); } }); @@ -71,7 +76,6 @@ describe("citations", () => { expect(records.length).toBeGreaterThan(0); expect(ids.size).toBe(records.length); - for (const fixture of REPRESENTATIVE_CITATIONS) { expect(ids.has(fixture.id)).toBe(true); expect(records.find((record) => record.id === fixture.id)).toEqual( diff --git a/src/lib/content/concept-shell-render.tsx b/src/lib/content/concept-shell-render.tsx new file mode 100644 index 00000000..e8c4f32d --- /dev/null +++ b/src/lib/content/concept-shell-render.tsx @@ -0,0 +1,44 @@ +import { DocsDescription, DocsTitle } from "fumadocs-ui/layouts/docs/page"; +import type { ReactNode } from "react"; +import { createElement } from "react"; +import { renderToStaticMarkup } from "react-dom/server"; +import { FoldedOpeningSummary } from "@/features/docs/components/FoldedOpeningSummary"; +import { ModulePageProviders } from "@/features/docs/components/ModulePageProviders"; +import type { LoadedConceptPage } from "@/lib/content/concept-page-load"; + +/** Renders concept docs shell markup matching production title, description, and folded-summary wiring. */ +export function renderConceptDocsShell( + loadedPage: LoadedConceptPage, + options?: { articleChildren?: ReactNode }, +): string { + return renderToStaticMarkup( + createElement( + ModulePageProviders, + { + messages: loadedPage.messages, + assets: loadedPage.assets, + }, + createElement("div", null, [ + createElement(DocsTitle, { key: "title" }, loadedPage.messages.title), + createElement( + DocsDescription, + { key: "description" }, + loadedPage.messages.description, + ), + createElement(FoldedOpeningSummary, { + key: "summary", + label: "Summary", + summary: loadedPage.messages.openingSummary, + }), + createElement( + "article", + { + key: "article", + "data-registry-id": loadedPage.frontmatter.registryId, + }, + options?.articleChildren ?? loadedPage.content, + ), + ]), + ), + ); +} diff --git a/src/lib/content/content-reconciliation-attention-tag.test.ts b/src/lib/content/content-reconciliation-attention-tag.test.ts index ee3ced15..2c26c918 100644 --- a/src/lib/content/content-reconciliation-attention-tag.test.ts +++ b/src/lib/content/content-reconciliation-attention-tag.test.ts @@ -97,6 +97,7 @@ describe("Phase 2/3 reconciliation attention tag landing (US-007)", () => { const conceptGroup = groups.find((group) => group.kind === "concept"); expect(conceptGroup?.kindLabel).toBe("Concept"); expect(conceptGroup?.resources.map((resource) => resource.url)).toEqual([ + "/docs/concepts/autoregressive-generation", "/docs/concepts/kv-cache", "/docs/concepts/prefill", ]); @@ -162,6 +163,7 @@ describe("Phase 2/3 reconciliation attention tag page render (US-007)", () => { } expect(html).toContain("Linear Attention"); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/concepts/kv-cache"'); expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); expect(html).toContain('href="/docs/glossary/decode"'); diff --git a/src/lib/content/content-reconciliation-variant-related-docs.test.tsx b/src/lib/content/content-reconciliation-variant-related-docs.test.tsx index dbad055c..f1bf0952 100644 --- a/src/lib/content/content-reconciliation-variant-related-docs.test.tsx +++ b/src/lib/content/content-reconciliation-variant-related-docs.test.tsx @@ -243,7 +243,7 @@ describe("Phase 2/3 reconciliation attention-variant related docs (US-011)", () expect(html).toContain("Same classification: attention mechanisms"); expect(html).toContain('data-testid="curated-related-docs"'); expect(html).toContain('href="/docs/modules/attention"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/glossary/encoder"'); expect(html).toContain('href="/docs/concepts/transformer-architecture"'); expect(html).toContain('href="/docs/glossary/encoder-decoder"'); diff --git a/src/lib/content/decode-glossary.test.ts b/src/lib/content/decode-glossary.test.ts index 6af9138f..c70e3fd2 100644 --- a/src/lib/content/decode-glossary.test.ts +++ b/src/lib/content/decode-glossary.test.ts @@ -154,7 +154,7 @@ describe("Phase 5 decode glossary page (US-003)", () => { expect(html).toContain('href="/docs/concepts/kv-cache"'); expect(html).toContain('href="/docs/concepts/prefill"'); expect(html).toContain('href="/docs/glossary/prefill-decode-split"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/modules/attention"'); expect(html).toContain('href="/docs/modules/multi-query-attention"'); expect(html).toContain('href="/docs/modules/grouped-query-attention"'); diff --git a/src/lib/content/encoder-decoder-architecture-glossary.test.ts b/src/lib/content/encoder-decoder-architecture-glossary.test.ts index 42917473..1f7574ee 100644 --- a/src/lib/content/encoder-decoder-architecture-glossary.test.ts +++ b/src/lib/content/encoder-decoder-architecture-glossary.test.ts @@ -84,12 +84,22 @@ describe("Phase 2 encoder-decoder architecture glossary pages (US-002)", () => { test("encoder-decoder surfaces published autoregressive generation and transformer links", async () => { const html = await renderGlossaryHtml("encoder-decoder"); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/glossary/transformer"'); expect(html).toContain("Transformers"); expect(html).not.toContain("Planned related doc"); }); + test("decoder surfaces the autoregressive generation explainer with a decoder-specific reason label", async () => { + const html = await renderGlossaryHtml("decoder"); + + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); + expect(html).toContain( + "Autoregressive generation explains the token-by-token loop decoder-based language models repeat after each next-token choice.", + ); + expect(html).toContain('data-testid="curated-related-docs"'); + }); + test("encoder-decoder links to encoder and decoder peers", async () => { const html = await renderGlossaryHtml("encoder-decoder"); diff --git a/src/lib/content/generation-generalization-chain.test.ts b/src/lib/content/generation-generalization-chain.test.ts index e329adfd..ec05862c 100644 --- a/src/lib/content/generation-generalization-chain.test.ts +++ b/src/lib/content/generation-generalization-chain.test.ts @@ -118,8 +118,8 @@ const CLUSTER_REASON_LABEL_SAMPLES: { }, ]; -function slugFromGlossaryHref(href: string): string { - return href.replace("/docs/glossary/", ""); +function slugFromDocsHref(href: string): string { + return href.replace("/docs/glossary/", "").replace("/docs/concepts/", ""); } function collectPublishedRelatedItems(registryId: string): RelatedDocItem[] { @@ -157,7 +157,7 @@ function findPublishedHrefToSlug( preferredSlugs: string[] = [], ): string | undefined { const matches = collectPublishedRelatedItems(registryId).filter( - (item) => item.href && matchesSlug(slugFromGlossaryHref(item.href)), + (item) => item.href && matchesSlug(slugFromDocsHref(item.href)), ); for (const preferred of preferredSlugs) { @@ -367,7 +367,7 @@ describe("Phase 2 generation and generalization foundation chain (US-006)", () = ); expect( autoregressiveResults.some( - (result) => result.url === "/docs/glossary/autoregressive-generation", + (result) => result.url === "/docs/concepts/autoregressive-generation", ), ).toBe(true); @@ -398,7 +398,7 @@ describe("Phase 2 generation and generalization foundation chain (US-006)", () = (slug) => GENERATION_SLUGS.has(slug), ); expect(generationHref).toBeDefined(); - const generationSlug = slugFromGlossaryHref(generationHref ?? ""); + const generationSlug = slugFromDocsHref(generationHref ?? ""); traversal.push(generationSlug); const evaluationHref = findPublishedHrefToSlug( @@ -407,7 +407,7 @@ describe("Phase 2 generation and generalization foundation chain (US-006)", () = ["generalization", "perplexity", "scaling-law", "emergent-behavior"], ); expect(evaluationHref).toBeDefined(); - traversal.push(slugFromGlossaryHref(evaluationHref ?? "")); + traversal.push(slugFromDocsHref(evaluationHref ?? "")); expect(traversal).toEqual([ "architecture", diff --git a/src/lib/content/generation-paradigm-glossary.test.ts b/src/lib/content/generation-paradigm-glossary.test.ts index 5413e68c..21a95d0b 100644 --- a/src/lib/content/generation-paradigm-glossary.test.ts +++ b/src/lib/content/generation-paradigm-glossary.test.ts @@ -90,14 +90,14 @@ describe("Phase 2 generation paradigm glossary pages (US-003)", () => { expect(html).toContain('href="/docs/glossary/latent"'); expect(html).toContain('href="/docs/glossary/latent-space"'); expect(html).toContain('href="/docs/glossary/generative-model"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); }); test("conditioning links to both generation paradigms and special tokens with reason labels", async () => { const html = await renderGlossaryHtml("conditioning"); expect(html).toContain('href="/docs/glossary/special-tokens"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/glossary/denoising-generation"'); expect(html).toContain("curated"); }); diff --git a/src/lib/content/greedy-decoding-glossary.test.ts b/src/lib/content/greedy-decoding-glossary.test.ts index a8453ed3..4dc7543b 100644 --- a/src/lib/content/greedy-decoding-glossary.test.ts +++ b/src/lib/content/greedy-decoding-glossary.test.ts @@ -95,7 +95,7 @@ describe("Phase 5 greedy decoding glossary page (phase-5-sampling-basics-decisio items.some( (item) => item.registryId === "concept.autoregressive-generation" && - item.href === "/docs/glossary/autoregressive-generation" && + item.href === "/docs/concepts/autoregressive-generation" && item.isPlanned === false, ), ).toBe(true); @@ -178,7 +178,7 @@ describe("Phase 5 greedy decoding glossary page (phase-5-sampling-basics-decisio ); expect(html).toContain('href="/docs/glossary/sampling-overview"'); expect(html).toContain('href="/docs/glossary/temperature"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/glossary/top-k-sampling"'); expect(html).toContain('href="/docs/glossary/top-p-sampling"'); expect(html).toContain('data-testid="curated-related-docs"'); diff --git a/src/lib/content/kv-cache-glossary.test.ts b/src/lib/content/kv-cache-glossary.test.ts index 97b7ebb9..b3d6f0bf 100644 --- a/src/lib/content/kv-cache-glossary.test.ts +++ b/src/lib/content/kv-cache-glossary.test.ts @@ -80,7 +80,7 @@ describe("Phase 5 KV cache glossary page (US-001)", () => { items.some( (item) => item.registryId === "concept.autoregressive-generation" && - item.href === "/docs/glossary/autoregressive-generation", + item.href === "/docs/concepts/autoregressive-generation", ), ).toBe(true); expect( @@ -153,7 +153,7 @@ describe("Phase 5 KV cache glossary page (US-001)", () => { expect(html).toContain('href="/docs/glossary/decode"'); expect(html).toContain('href="/docs/concepts/prefill"'); expect(html).toContain('href="/docs/glossary/decode"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/modules/attention"'); expect(html).toContain('href="/docs/modules/multi-query-attention"'); expect(html).toContain('href="/docs/modules/grouped-query-attention"'); diff --git a/src/lib/content/prefill-concept.test.ts b/src/lib/content/prefill-concept.test.ts index b8bef6b3..0b2f249e 100644 --- a/src/lib/content/prefill-concept.test.ts +++ b/src/lib/content/prefill-concept.test.ts @@ -89,7 +89,7 @@ describe("prefill concept page (prefill-concept-page-001)", () => { items.some( (item) => item.registryId === "concept.autoregressive-generation" && - item.href === "/docs/glossary/autoregressive-generation", + item.href === "/docs/concepts/autoregressive-generation", ), ).toBe(true); expect( @@ -152,7 +152,7 @@ describe("prefill concept page (prefill-concept-page-001)", () => { expect(html).toContain('href="/docs/concepts/kv-cache"'); expect(html).toContain('href="/docs/glossary/decode"'); expect(html).toContain('href="/docs/glossary/prefill-decode-split"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/modules/attention"'); expect(html).toContain('href="/docs/modules/grouped-query-attention"'); expect(html).toContain('href="/search?q=time%20to%20first%20token"'); diff --git a/src/lib/content/prefill-decode-split-glossary.test.ts b/src/lib/content/prefill-decode-split-glossary.test.ts index 5403f9f8..34c8da70 100644 --- a/src/lib/content/prefill-decode-split-glossary.test.ts +++ b/src/lib/content/prefill-decode-split-glossary.test.ts @@ -181,7 +181,7 @@ describe("Phase 5 prefill/decode split glossary page (US-004)", () => { expect(html).toContain('href="/search?q=chunked%20prefill"'); expect(html).toContain('href="/search?q=speculative%20decoding"'); expect(html).toContain('href="/search?q=quantization"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/modules/attention"'); expect(html).toContain('href="/docs/modules/multi-query-attention"'); expect(html).toContain('href="/docs/modules/grouped-query-attention"'); diff --git a/src/lib/content/quantization-concept.test.ts b/src/lib/content/quantization-concept.test.ts index 1c32c02e..35960361 100644 --- a/src/lib/content/quantization-concept.test.ts +++ b/src/lib/content/quantization-concept.test.ts @@ -78,7 +78,7 @@ describe("Phase 5 quantization overview concept page (chapter-5-quantization-001 items.find( (item) => item.registryId === "concept.autoregressive-generation", )?.href, - ).toBe("/docs/glossary/autoregressive-generation"); + ).toBe("/docs/concepts/autoregressive-generation"); expect( items.find((item) => item.registryId === "module.multi-query-attention") ?.href, @@ -121,7 +121,7 @@ describe("Phase 5 quantization overview concept page (chapter-5-quantization-001 ); expect(html).toContain('href="/docs/glossary/parameter"'); expect(html).toContain('href="/docs/glossary/activation"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/modules/multi-query-attention"'); expect(html).toContain('href="/docs/modules/grouped-query-attention"'); expect(html).toContain('href="/tags/quantization"'); diff --git a/src/lib/content/sampling-overview-glossary.test.ts b/src/lib/content/sampling-overview-glossary.test.ts index 302b34ec..eae53ae4 100644 --- a/src/lib/content/sampling-overview-glossary.test.ts +++ b/src/lib/content/sampling-overview-glossary.test.ts @@ -97,7 +97,7 @@ describe("Phase 5 sampling overview glossary page (phase-5-sampling-basics-decis items.some( (item) => item.registryId === "concept.autoregressive-generation" && - item.href === "/docs/glossary/autoregressive-generation" && + item.href === "/docs/concepts/autoregressive-generation" && item.isPlanned === false, ), ).toBe(true); @@ -194,7 +194,7 @@ describe("Phase 5 sampling overview glossary page (phase-5-sampling-basics-decis ); expect(html).toContain('href="/docs/glossary/temperature"'); expect(html).toContain('href="/docs/glossary/softmax"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/glossary/greedy-decoding"'); expect(html).toContain('href="/docs/glossary/top-k-sampling"'); expect(html).toContain('href="/docs/glossary/top-p-sampling"'); diff --git a/src/lib/content/transformer-glossary.test.ts b/src/lib/content/transformer-glossary.test.ts index 23a77d52..83f0e4ea 100644 --- a/src/lib/content/transformer-glossary.test.ts +++ b/src/lib/content/transformer-glossary.test.ts @@ -78,7 +78,7 @@ describe("Phase 2 transformer model-family glossary page (US-001)", () => { expect(html).toContain('href="/docs/glossary/architecture"'); expect(html).toContain('href="/docs/glossary/module"'); expect(html).toContain('href="/docs/glossary/encoder-decoder"'); - expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/glossary/foundation-model"'); }); diff --git a/src/lib/source.test.ts b/src/lib/source.test.ts index a962599c..4f50dbc4 100644 --- a/src/lib/source.test.ts +++ b/src/lib/source.test.ts @@ -107,6 +107,7 @@ const MODULE_INDEX_URLS = [ ] as const; const CONCEPT_INDEX_URLS = [ + "/docs/concepts/autoregressive-generation", "/docs/concepts/alibi", "/docs/concepts/context-extension", "/docs/concepts/prefill", diff --git a/src/tests/content/attention-tag-landing.test.ts b/src/tests/content/attention-tag-landing.test.ts index c0f73822..4e9920a1 100644 --- a/src/tests/content/attention-tag-landing.test.ts +++ b/src/tests/content/attention-tag-landing.test.ts @@ -76,6 +76,7 @@ describe("attention tag landing resources", () => { const conceptGroup = groups.find((group) => group.kind === "concept"); expect(conceptGroup?.resources.map((resource) => resource.url)).toEqual([ + "/docs/concepts/autoregressive-generation", "/docs/concepts/kv-cache", "/docs/concepts/prefill", ]); @@ -166,6 +167,7 @@ describe("attention tag landing page render", () => { expect(html).toContain("Attention"); expect(html).toContain("Module"); + expect(html).toContain("Concept"); expect(html).toContain("Glossary"); expect(html).toContain('href="/docs/modules/attention"'); expect(html).toContain("Bidirectional Attention"); @@ -195,6 +197,7 @@ describe("attention tag landing page render", () => { expect(html).toContain("DeepSeek-V4"); expect(html).toContain('href="/docs/papers/deepseek-v4"'); expect(html).toContain("Autoregressive Generation"); + expect(html).toContain('href="/docs/concepts/autoregressive-generation"'); expect(html).toContain('href="/docs/glossary/autoregressive-generation"'); expect(html).toContain("Decode"); expect(html).toContain('href="/docs/glossary/decode"'); diff --git a/src/tests/search/orama-index.test.ts b/src/tests/search/orama-index.test.ts index ac5ef32d..2fecfa8a 100644 --- a/src/tests/search/orama-index.test.ts +++ b/src/tests/search/orama-index.test.ts @@ -104,6 +104,7 @@ const ENCODER_DECODER_URLS = [ "/docs/glossary/encoder-decoder", ] as const; const GENERATION_PARADIGM_URLS = [ + "/docs/concepts/autoregressive-generation", "/docs/glossary/autoregressive-generation", "/docs/glossary/denoising-generation", "/docs/glossary/conditioning",