Skip to content
AI Interfaces block

Grounding Split

How an answer is tied to its sources, and what the system does when it cannot find any.

156 linesNo dependenciesAdded 9 Sept 2026
  • grounding
  • rag
  • citations
  • retrieval
  • hallucination

What's included

  • components/grounding-split.tsx
  • No runtime dependencies

Works with

  • React
  • Next.js
  • Tailwind CSS
  • TypeScript

npx hoverlab add grounding-split

Or over MCP, from your editor's agent — no account needed.

License

Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.

Was this useful?

Start a page with this section — add more, order them, and leave with the page source.

Preview

Grounding

Every claim points at something

The interesting half of a retrieval system is not what it does when it finds the answer. It is what it does when it does not.

  • Citations on the sentenceNot a source list at the bottom. The claim and its evidence are next to each other or the citation is decoration.
  • Quoted, not paraphrasedThe retrieved passage is shown as written, so you can see whether it says what the answer claims.
  • It says when it does not knowNo passage above the relevance floor produces "I could not find this", not a fluent guess.
  • Stale sources are flaggedAge travels with the passage. A confident answer from a two-year-old document is the failure nobody catches.

Rendered live in your current theme — this is the same component whose source is below, not a screenshot of it.

Source

components/grounding-split.tsx
/**
 * <GroundingSplit> — How an answer is tied to its sources, and what the system does when it cannot find any.
 *
 * The interesting half of a retrieval system is not what it does when it
 * finds the answer. It is what it does when it does not, and the layout
 * problem is that a features list about grounding naturally describes only
 * the success path.
 *
 * So the third point is the failure path — no passage above the relevance
 * floor produces "I could not find this" rather than a fluent guess — and
 * it is the point the section is built around. The obvious wrong answer is
 * to list citation features and stop, which describes a system that
 * hallucinates confidently and cites nothing.
 *
 * The first point is a placement decision stated as a principle: citations
 * belong on the sentence, not in a source list at the bottom. A list of
 * seven sources under a paragraph of six claims cannot be checked by
 * anyone, which makes it decoration.
 *
 * The second point — quoted rather than paraphrased — is what makes the
 * first useful. A citation you cannot read the source text of only tells
 * you that a document was consulted, not that it says what the answer
 * claims.
 *
 * Accessibility: the tick is an inline `<svg>`, `aria-hidden`, filled with
 * `currentColor` so it inherits the text colour and is skipped rather than
 * announced four times; the heading names the section through
 * `aria-labelledby`; the points are a real `<ul>`.
 *
 * The panel is drawn rather than an `<img>` — no hosting, no layout shift,
 * correct in both themes. Pass `media` to show a real cited answer, which
 * is the strongest possible illustration of this particular section.
 */

import * as React from 'react'

export interface GroundingSplitPoint {
  label: string
  detail?: string
}

export interface GroundingSplitProps {
  eyebrow?: string
  heading?: string
  intro?: string
  points?: GroundingSplitPoint[]
  /** Your own visual. Omit for the drawn panel, which needs no asset. */
  media?: React.ReactNode
  className?: string
}

const POINTS: GroundingSplitPoint[] = [
  { label: "Citations on the sentence", detail: "Not a source list at the bottom. The claim and its evidence are next to each other or the citation is decoration." },
  { label: "Quoted, not paraphrased", detail: "The retrieved passage is shown as written, so you can see whether it says what the answer claims." },
  { label: "It says when it does not know", detail: "No passage above the relevance floor produces \"I could not find this\", not a fluent guess." },
  { label: "Stale sources are flagged", detail: "Age travels with the passage. A confident answer from a two-year-old document is the failure nobody catches." },
]

/*
  Per-instance id, hashed from props that differ between instances.

  A literal id is a latent duplicate the moment this block is rendered
  twice on one document -- two pages on a catalog hub, or one page using
  the section twice. `aria-labelledby` pointing at a duplicated id resolves
  to whichever element comes first, so the second copy is announced with
  the first copy's label. Server component, so no `useId`: hashing props
  gives each instance its own target and stays stable across server and
  client renders in a way a counter would not.
*/
function instanceId(...parts: (string | undefined)[]): string {
  const text = parts.filter(Boolean).join('|')
  let hash = 0
  for (let i = 0; i < text.length; i++) hash = (Math.imul(hash, 31) + text.charCodeAt(i)) | 0
  return (hash >>> 0).toString(36).slice(0, 6)
}

export function GroundingSplit({
  eyebrow = "Grounding",
  heading = "Every claim points at something",
  intro = "The interesting half of a retrieval system is not what it does when it finds the answer. It is what it does when it does not.",
  points = POINTS,
  media,
  className,
}: GroundingSplitProps) {
  const uid = instanceId(heading, eyebrow)

  return (
    <section
      aria-labelledby={`grounding-split-heading-${uid}`}
      className={`w-full bg-background px-6 py-16 sm:py-24 ${className ?? ''}`}
    >
      <div className="mx-auto grid max-w-6xl items-center gap-12 lg:grid-cols-2">
        <div>
          <p className="text-sm font-medium text-primary">{eyebrow}</p>
          <h2
            id={`grounding-split-heading-${uid}`}
            className="mt-2 text-3xl font-semibold tracking-tight text-foreground sm:text-4xl"
          >
            {heading}
          </h2>
          <p className="mt-4 text-base text-muted-foreground">{intro}</p>

          <ul className="mt-8 space-y-4">
            {points.map((point) => (
              <li key={point.label} className="flex gap-3">
                {/*
                  currentColor, not a token in a raw colour function. These
                  are complete oklch() values, so hsl(var(--primary)) is not
                  a colour and the declaration is dropped silently.
                */}
                <svg
                  aria-hidden="true"
                  viewBox="0 0 20 20"
                  className="mt-0.5 size-5 shrink-0 text-primary"
                  fill="currentColor"
                >
                  <path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z" />
                </svg>
                <span>
                  <span className="block text-sm font-medium text-foreground">{point.label}</span>
                  {point.detail ? (
                    <span className="mt-0.5 block text-sm text-muted-foreground">
                      {point.detail}
                    </span>
                  ) : null}
                </span>
              </li>
            ))}
          </ul>
        </div>

        {/*
          The drawn panel rather than an <img>. No asset to host, no layout
          shift while it loads, and it themes with the rest of the page —
          which a screenshot of somebody's light-mode dashboard does not.
        */}
        <div className="rounded-xl border border-border bg-card p-6 shadow-sm">
          {media ?? (
            <div aria-hidden="true" className="space-y-3">
              <div className="h-3 w-1/3 rounded bg-primary/30 border border-transparent" />
              <div className="h-24 rounded-lg bg-muted border border-transparent" />
              <div className="grid grid-cols-3 gap-3">
                <div className="h-14 rounded-lg bg-muted border border-transparent" />
                <div className="h-14 rounded-lg bg-muted border border-transparent" />
                <div className="h-14 rounded-lg bg-muted border border-transparent" />
              </div>
              <div className="h-3 w-2/3 rounded bg-muted border border-transparent" />
              <div className="h-3 w-1/2 rounded bg-muted border border-transparent" />
            </div>
          )}
        </div>
      </div>
    </section>
  )
}

Before you paste

  • Styling is Tailwind utility classes on semantic tokens (bg-card, text-muted-foreground) — it inherits your theme instead of overriding it.
  • Nothing to install. No component library, no icon package.
  • Every prop has a default, so it renders standalone before you wire it up.

Where it goes

Drop it at components/grounding-split.tsx and import it where you need the section:

import { GroundingSplit } from '@/components/grounding-split'

Customize

2 of this block’s props are simple enough to drive from here. Change them and the block below re-renders — it is the same component whose source is above, not a mock of it. Everything else it accepts is in the table underneath.

Props

Read out of the component’s own type and signature, so this cannot drift from the source below. Every prop has a default — the component renders standalone before you pass it anything.

PropTypeDefault
eyebrowstring"Grounding"
headingstring"Every claim points at something"
introstring—
pointsGroundingSplitPoint[]POINTS
mediaYour own visual. Omit for the drawn panel, which needs no asset.React.ReactNode—
classNamestring—

Not using React?

The same block rendered once to markup, wrapped as a file your framework compiles. Tailwind classes are framework-agnostic, so the design transfers intact — the behaviour does not.

grounding-split.html
<!--
  Grounding Split — markup from the Hoverlab catalog.

  This is the block rendered once to HTML and wrapped as a component
  file. It is not a port of the React source: the Tailwind classes carry
  the design, which is the part that took the work, and they are the same
  in every framework.

  This block has no interactive behaviour, so nothing is missing.
-->
<section aria-labelledby="grounding-split-heading-ntm9xc" class="w-full bg-background px-6 py-16 sm:py-24 ">
  <div class="mx-auto grid max-w-6xl items-center gap-12 lg:grid-cols-2">
    <div>
      <p class="text-sm font-medium text-primary">Grounding</p>
      <h2 id="grounding-split-heading-ntm9xc" class="mt-2 text-3xl font-semibold tracking-tight text-foreground sm:text-4xl">Every claim points at something</h2>
      <p class="mt-4 text-base text-muted-foreground">The interesting half of a retrieval system is not what it does when it finds the answer. It is what it does when it does not.</p>
      <ul class="mt-8 space-y-4">
        <li class="flex gap-3">
          <svg aria-hidden="true" viewBox="0 0 20 20" class="mt-0.5 size-5 shrink-0 text-primary" fill="currentColor">
            <path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z"></path>
          </svg>
          <span>
            <span class="block text-sm font-medium text-foreground">Citations on the sentence</span>
            <span class="mt-0.5 block text-sm text-muted-foreground">Not a source list at the bottom. The claim and its evidence are next to each other or the citation is decoration.</span>
          </span>
        </li>
        <li class="flex gap-3">
          <svg aria-hidden="true" viewBox="0 0 20 20" class="mt-0.5 size-5 shrink-0 text-primary" fill="currentColor">
            <path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z"></path>
          </svg>
          <span>
            <span class="block text-sm font-medium text-foreground">Quoted, not paraphrased</span>
            <span class="mt-0.5 block text-sm text-muted-foreground">The retrieved passage is shown as written, so you can see whether it says what the answer claims.</span>
          </span>
        </li>
        <li class="flex gap-3">
          <svg aria-hidden="true" viewBox="0 0 20 20" class="mt-0.5 size-5 shrink-0 text-primary" fill="currentColor">
            <path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z"></path>
          </svg>
          <span>
            <span class="block text-sm font-medium text-foreground">It says when it does not know</span>
            <span class="mt-0.5 block text-sm text-muted-foreground">No passage above the relevance floor produces &quot;I could not find this&quot;, not a fluent guess.</span>
          </span>
        </li>
        <li class="flex gap-3">
          <svg aria-hidden="true" viewBox="0 0 20 20" class="mt-0.5 size-5 shrink-0 text-primary" fill="currentColor">
            <path d="M16.7 5.3a1 1 0 0 1 0 1.4l-7.5 7.5a1 1 0 0 1-1.4 0L3.3 9.7a1 1 0 1 1 1.4-1.4l3.8 3.8 6.8-6.8a1 1 0 0 1 1.4 0Z"></path>
          </svg>
          <span>
            <span class="block text-sm font-medium text-foreground">Stale sources are flagged</span>
            <span class="mt-0.5 block text-sm text-muted-foreground">Age travels with the passage. A confident answer from a two-year-old document is the failure nobody catches.</span>
          </span>
        </li>
      </ul>
    </div>
    <div class="rounded-xl border border-border bg-card p-6 shadow-sm">
      <div aria-hidden="true" class="space-y-3">
        <div class="h-3 w-1/3 rounded bg-primary/30 border border-transparent"></div>
        <div class="h-24 rounded-lg bg-muted border border-transparent"></div>
        <div class="grid grid-cols-3 gap-3">
          <div class="h-14 rounded-lg bg-muted border border-transparent"></div>
          <div class="h-14 rounded-lg bg-muted border border-transparent"></div>
          <div class="h-14 rounded-lg bg-muted border border-transparent"></div>
        </div>
        <div class="h-3 w-2/3 rounded bg-muted border border-transparent"></div>
        <div class="h-3 w-1/2 rounded bg-muted border border-transparent"></div>
      </div>
    </div>
  </div>
</section>
  • This is rendered HTML, not a translation of the React source. The Tailwind classes carry the design and work in any framework.
  • It is one frame: the component in its initial state, with no props applied beyond the defaults.
  • Requires Tailwind, and the design tokens the classes reference (bg-card, text-muted-foreground, and so on). The template ZIPs ship a globals.css that defines them.

What each framework gets across the whole catalog — effects convert properly; this rung is markup.

For AI

The component, its props, the design tokens it expects and the command that installs it — as one prompt. Paste it into Claude, Cursor, v0 or ChatGPT and what they build around it will match the rest of the catalog instead of inventing its own system.

See the prompt

Used in these pages

Want the whole screen instead of this one section? Open a page and copy it entire.

8 more blocks in Retrieval & Context

All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.

Browse Retrieval & Context

Shipping one commercially

Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.

  • A commercial licence for everything in the catalog
  • Unlimited bundle exports, in Vue, Svelte and Tailwind
  • One payment — no subscription, nothing to renew
Pro — $79 once

More Retrieval & Context blocks

View category
Open the full page for this block

Retrieved Context Chunks

The RAG debugging surface: ranked passages with similarity as a meter, matched spans in real mark elements, and filter chips wired as a radiogroup so arrows move between them.

Retrieval & Context327 lines1 dep
Open the full page for this block

Answer Source Citations

The published footnotes under an answer — ordered list, real cite and time elements, the claim each source supports, and a staleness warning written in words rather than shown as an amber dot.

Retrieval & Context231 lines1 dep
Open the full page for this block

Knowledge Source Picker

Choosing what the assistant may read, with indexing state told honestly — a half-indexed source says so rather than showing a green tick — and the footer stating the effect of the selection, not its cardinality.

Retrieval & Context345 lines1 dep
Open the full page for this block

Nothing Found, Answered Honestly

The refusal screen: says plainly that nothing was found, shows where it looked and the near-misses below threshold, and offers the two real ways out instead of inventing an answer.

Retrieval & Context180 lines1 dep
Open the full page for this block

Context Window Budget

What is in the context and what fell out of it — a stacked budget with the reply reserve drawn as a segment, and the dropped chunks named with the reason, which is the part nobody ships.

Retrieval & Context309 lines1 dep
Open the full page for this block

Index Freshness Panel

A green tick means the connector works, not that the answers are current. Freshness as an age in words per source, the headline taken from the stalest one, and a failed sync that still says what age it is answering from.

Retrieval & Context246 lines1 dep
Open the full page for this block

Retrieval Freshness List

Retrieved sources ranked by how stale they are, because a confident answer from a two-year-old document is the failure people do not catch.

Retrieval & Context151 linesNo deps
Open the full page for this block

Context Scope List

Which sources this answer may draw on, shown as a scope the user can read before asking rather than a citation list after.

Retrieval & Context152 linesNo deps