Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions src/app/(home)/_components/benchmark-results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@ import Link from "next/link";

// Published runs: content/docs/memory-benchmark/{beam,index,longmemeval}.mdx.
// Keep sample sizes beside the scores; these are separate benchmark protocols.
// Owner-approved homepage figures only. Full tables live on /docs/network/results.
const GAINS = [
{
value: "1.77x",
label: "One Kimetsu brain",
detail:
"Better answers than no memory (+77%; Qwen 7B on LoCoMo, 40.3 vs 22.8).",
},
{
value: "22% to 65%",
label: "As a network",
detail:
"Each agent answers better with merged memory than with only its own (Qwen 7B and 0.5B, LoCoMo and LongMemEval).",
},
{
value: "about 99%",
label: "Over QUIC between machines",
detail: "Of the gain kept (7B LoCoMo 40.1 vs 40.3).",
},
] as const;

export function BenchmarkResults() {
return (
<section
Expand Down Expand Up @@ -103,6 +124,36 @@ export function BenchmarkResults() {
questions; the memory pipeline uses local search, embeddings, and
reranking, with no LLM calls.
</p>
<div className="mt-10">
<h3 className="km-text-lg leading-7 font-semibold">
What Kimetsu adds
</h3>
<div className="mt-4 grid gap-4 lg:grid-cols-3">
{GAINS.map((gain) => (
<article
key={gain.label}
className="rounded-2xl border border-fd-border p-4"
>
<p className="km-text-xl font-mono leading-8 font-semibold tracking-tight text-fd-primary">
{gain.value}
</p>
<p className="km-text-sm mt-2 leading-5 font-medium">
{gain.label}
</p>
<p className="km-text-xs mt-2 leading-5 text-fd-muted-foreground">
{gain.detail}
</p>
</article>
))}
</div>
<p className="km-text-xs mt-4 max-w-4xl leading-5 text-fd-muted-foreground">
Token F1 on LoCoMo (answerable questions) and LongMemEval (proxy F1,
not the official judge). QUIC measured on one machine over loopback.{" "}
<Link href="/docs/network/results" className="km-text-link">
Tables and caveats
</Link>
</p>
</div>
</section>
);
}
52 changes: 0 additions & 52 deletions src/app/(home)/_components/network-section.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
import Link from "next/link";
import { NetworkDiagram } from "./network-diagram";

// Owner-approved homepage figures only. Full tables live on /docs/network/results.
const GAINS = [
{
value: "1.77x",
label: "One Kimetsu brain",
detail:
"Better answers than no memory (+77%; Qwen 7B on LoCoMo, 40.3 vs 22.8).",
},
{
value: "22% to 65%",
label: "As a network",
detail:
"Each agent answers better with merged memory than with only its own (Qwen 7B and 0.5B, LoCoMo and LongMemEval).",
},
{
value: "about 99%",
label: "Over QUIC between machines",
detail: "Of the gain kept (7B LoCoMo 40.1 vs 40.3).",
},
] as const;

const FLOW = [
{
title: "Invite",
Expand Down Expand Up @@ -98,37 +77,6 @@ export function NetworkSection() {
))}
</ol>

<div className="mt-10">
<h3 className="km-text-lg leading-7 font-semibold">
What Kimetsu adds
</h3>
<div className="mt-4 grid gap-4 lg:grid-cols-3">
{GAINS.map((gain) => (
<article
key={gain.value + gain.label}
className="rounded-2xl border border-fd-border p-4"
>
<p className="km-text-xl font-mono leading-8 font-semibold tracking-tight text-fd-primary">
{gain.value}
</p>
<p className="km-text-sm mt-2 leading-5 font-medium">
{gain.label}
</p>
<p className="km-text-xs mt-2 leading-5 text-fd-muted-foreground">
{gain.detail}
</p>
</article>
))}
</div>
<p className="km-text-xs mt-4 max-w-4xl leading-5 text-fd-muted-foreground">
Token F1 on LoCoMo (answerable questions) and LongMemEval (proxy F1,
not the official judge). QUIC measured on one machine over loopback.{" "}
<Link href="/docs/network/results" className="km-text-link">
Tables and caveats
</Link>
</p>
</div>

<p className="mt-10">
<a href="#get-started" className="km-text-link">
Install commands in Get started
Expand Down
46 changes: 37 additions & 9 deletions tests/homepage-network.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ const section = await readFile(
new URL("../src/app/(home)/_components/network-section.tsx", import.meta.url),
"utf8",
);
const benchmarks = await readFile(
new URL(
"../src/app/(home)/_components/benchmark-results.tsx",
import.meta.url,
),
"utf8",
);
const page = await readFile(
new URL("../src/app/(home)/page.tsx", import.meta.url),
"utf8",
Expand All @@ -32,18 +39,38 @@ test("places the network section under the hero and before benchmarks", () => {
assert.match(section, /href="\/docs\/network"/);
});

test("uses only the three approved homepage figures", () => {
assert.match(section, /1\.77x/);
assert.match(section, /\+77%/);
assert.match(section, /40\.3 vs 22\.8/);
assert.match(section, /22% to 65%/);
assert.match(section, /about 99%/);
assert.match(section, /40\.1 vs 40\.3/);
test("renders the three network figures inside benchmarks, not the network section", () => {
const start = benchmarks.indexOf('id="benchmarks"');
const end = benchmarks.indexOf("</section>", start);
assert.ok(start >= 0 && end > start);
const block = benchmarks.slice(start, end);
const h2 = block.indexOf("Benchmark results");
const singleBrain = block.indexOf("BEAM 100K");
const networkLabel = block.search(/>\s*What Kimetsu adds\s*</);
const gainsMap = block.indexOf("{GAINS.map");
assert.ok(
h2 >= 0 &&
singleBrain > h2 &&
networkLabel > singleBrain &&
gainsMap > networkLabel,
);
assert.match(block, /<h2[^>]*>\s*Benchmark results\s*<\/h2>/);
assert.match(block, /<h3[^>]*>\s*What Kimetsu adds\s*<\/h3>/);
for (const figure of ["1.77x", "22% to 65%", "about 99%"]) {
assert.equal(benchmarks.split(figure).length - 1, 1, figure);
assert.equal(section.includes(figure), false, figure);
}
assert.match(benchmarks, /\+77%/);
assert.match(benchmarks, /40\.3 vs 22\.8/);
assert.match(benchmarks, /40\.1 vs 40\.3/);
assert.match(
section,
block,
/Token F1 on LoCoMo \(answerable questions\) and LongMemEval \(proxy F1,\s+not the official judge\)\. QUIC measured on one machine over loopback\./,
);
assert.match(section, /href="\/docs\/network\/results"/);
assert.match(block, /href="\/docs\/network\/results"/);
assert.match(block, /Tables and caveats/);
assert.equal(section.includes("Tables and caveats"), false);
assert.equal(section.includes('href="/docs/network/results"'), false);
for (const banned of [
"+17.5",
"+13.6",
Expand All @@ -57,6 +84,7 @@ test("uses only the three approved homepage figures", () => {
"31.8",
"38.9",
]) {
assert.equal(block.includes(banned), false, banned);
assert.equal(section.includes(banned), false, banned);
}
});
Expand Down
Loading