import type { Metadata } from 'next'; import Link from 'next/link'; import { EntityBadge } from '@/components/ui/badges'; import { Container, Note, PageHeader, Section } from '@/components/ui/section'; import { Unavailable } from '@/components/ui/unavailable'; import { api, safe } from '@/lib/api'; import { fmtInt, num } from '@/lib/format'; import { routes, typeLabel } from '@/lib/site'; import { type BuilderOptions, QueryBuilder } from './builder'; export const metadata: Metadata = { title: 'Explore — structured query builder and every entity type', description: 'Build a structured query over the AI Atlas graph (organization, family, parameters, context, licence, openness, modality, release year, status, reasoning) and browse every entity type with live counts.', alternates: { canonical: '/explore' } }; export const revalidate = 300; const BLURB: Record = { model: 'Canonical model releases: parameters, context, openness, prices, benchmarks, lineage.', artifact: 'Checkpoints, quantisations, conversions and packagings of canonical models.', model_family: 'Families grouping canonical models (Llama 4, Qwen3, Claude…).', company: 'Labs and companies that develop, serve or study AI.', organization: 'Organizations, labs and universities.', paper: 'Research papers linked to the models and benchmarks they describe.', researcher: 'Authors of the papers in the atlas (name-only rows for now).', provider: 'Inference providers and their published prices per 1M tokens.', benchmark: 'Evaluation suites with results and configurations.', hardware: 'GPUs, accelerators and devices with memory and bandwidth specs.', framework: 'Training, inference and agent frameworks.', library: 'Libraries and SDKs.', dataset: 'Training and evaluation datasets.', license: 'Licences from the ontology with their permissions.', tool: 'Developer tools, agents and MCP servers.', repository: 'Code repositories linked to models and frameworks.', }; export default async function ExplorePage({ searchParams }: { searchParams: Promise> }) { const sp = await searchParams; const [types, models, benches] = await Promise.all([safe(api.exploreTypes()), safe(api.models({ limit: 1, facets: 1 })), safe(api.benchmarks())]); const items = (types?.items ?? []).slice().sort((a, b) => (num(b.count) ?? 0) - (num(a.count) ?? 0)); const total = items.reduce((n, t) => n + (num(t.count) ?? 0), 0); const f = models?.facets ?? {}; const options: BuilderOptions = { types: items.map((t) => ({ entity_type: t.entity_type, count: num(t.count) ?? 0, label: t.label })), organizations: (f.organizations ?? []).map((o) => ({ slug: o.slug, name: o.name, count: num(o.count) ?? 0 })), families: ((f.families ?? []) as { value: string; label?: string; count: unknown }[]).map((x) => ({ value: x.value, label: x.label ?? x.value, count: num(x.count) ?? 0 })), licenses: ((f.licenses ?? []) as { value: string; label?: string; count: unknown }[]).map((x) => ({ value: x.value, label: x.label ?? x.value, count: num(x.count) ?? 0 })), openness: (f.openness ?? []).map((x) => ({ value: x.value, count: num(x.count) ?? 0 })), modalities: (f.modalities ?? []).map((x) => ({ value: x.value, count: num(x.count) ?? 0 })), status: (f.status ?? []).map((x) => ({ value: x.value, count: num(x.count) ?? 0 })), benchmarks: (benches?.items ?? []).map((b) => ({ slug: b.slug, name: b.name })), }; const initial: Record = {}; for (const [k, v] of Object.entries(sp)) if (typeof v === 'string' && v) initial[k] = v; return ( {fmtInt(total)} entities

: undefined} />
{!types ? : }
{!types ? ( ) : (
    {items.map((t) => (
  • {fmtInt(t.count)}

    {t.label || typeLabel(t.entity_type, true)}

    {BLURB[t.entity_type] ?? `All ${typeLabel(t.entity_type, true).toLowerCase()} in the graph.`}

  • ))}
)} Prefer words? Search compiles plain English into these same filters and shows them back as chips.
); }