Top-K Tokens

Debugger-style panel showing the language model's next-token probabilities, with the top candidate highlighted and bars scaled to softmax weight.

next_tokentop 5
The capital of France is
  • Paris64.3%
  • the18.7%
  • located8.1%
  • also4.2%
  • a2.1%

New here? Read the installation guide.

Import & use
import { Ai16 } from "@/components/beste/piece/ai16";

<Ai16
  title="next_token"
  context="The capital of France is"
  topPrefix="top"
  tokens={[
    {
      "token": "Paris",
      "probability": 0.643
    },
    {
      "token": "the",
      "probability": 0.187
    },
    {
      "token": "located",
      "probability": 0.081
    },
    {
      "token": "also",
      "probability": 0.042
    },
    {
      "token": "a",
      "probability": 0.021
    }
  ]}
/>

More AI pieces

View all AI

"where is my order?"

order_status
87%
shipping_eta
9%
refund_request
4%

Intent Classifier

Intent ranking panel with the raw user input quoted above and a list of candidate labels with confidence bars.

stream142 tok/s
The quick brown fox jumps over

Token Stream

Live token visualizer with tone-tinted token chips, tokens-per-second rate, and a pulsing caret at the end.

docs
top_k = 5
lang:ensection:guides

Vector Search Filter

Vector query bar with namespace name, top_k value, and removable key:value filter chips for metadata.

Context window92.0K / 200K
46% of window in use

Context Gauge

Context-window card with a tokens-used-of-max readout and a violet-to-fuchsia gradient fill bar.

Implementing rate limits with Redis
0.92

Use INCR with an EXPIRE TTL to build a fixed-window limiter that resets every minute.

docs/guides/rate-limits.md

KB Search Result

Knowledge base hit card with a document title, snippet, source path, and an emerald similarity score badge.

Query
Retrieve
Rerank
Answer

RAG Pipeline

Horizontal pipeline diagram with tone-tinted stage nodes connected by arrows, showing the path from query to answer.