Skip to main content
Glama
agaskell

interp-playground

by agaskell

run_prompt

Run prompts through Gemma 2 2B and report active SAE features per token and layer, with Neuronpedia labels and activation rankings.

Instructions

Run a prompt through the model and report which SAE features are active.

Returns, per layer:
- top_features: the 10 features most strongly active anywhere in the text,
  each at its peak token, with its Neuronpedia label, density (fraction of
  all tokens it fires on) and the output tokens it promotes.
- tokens: for each token, its top_k features.

`act` is the raw activation. `rel` is act / the feature's typical max
activation, so rel near 1 means firing about as hard as it ever does.
Rankings use rel. Features active on >10% of all tokens carry little
meaning and are hidden unless include_dense is true. The <bos> token is
omitted. The first real token often shows position artifacts: features
with very large activations unrelated to its meaning.

Args:
    prompt: Text to run. Gemma 2 2B is a base model, not a chat model.
    layers: Residual-stream layers to read (0-25). Default [12].
    top_k: Features to list per token.
    max_new_tokens: If > 0, greedily generate this many tokens first and
        analyze prompt + completion.
    include_dense: Include features active on >10% of tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_kNo
layersNo
promptYes
include_denseNo
max_new_tokensNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so well: it documents the return structure (top_features, tokens), explains the act vs rel normalization ('rel is act / the feature's typical max activation'), and discloses non-obvious filtering behavior — dense features (>10% of tokens) are hidden unless include_dense, the <bos> token is omitted, and first-token position artifacts occur. It also warns the model is a base model, not a chat model.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the body is organized as a bulleted output spec followed by parameter notes, so it scans well. It is on the longer side and repeats return-value detail that the output schema already covers, but nearly every sentence carries operational meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter analysis tool with an output schema and no annotations, the description supplies everything needed to invoke it correctly: parameter meaning, activation ranking semantics, dense-feature suppression, and known artifact caveats.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description compensates by explaining prompt, layers (range 0-25), max_new_tokens, and include_dense in semantic terms. top_k ('Features to list per token') is thinner and near-circular, and the description says the layers default is [12] while the schema declares null, a minor inconsistency.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence states a specific verb and resource ('Run a prompt through the model and report which SAE features are active'), naming both the input and the class of output. There are no sibling tools, so no differentiation is needed, and an agent immediately knows what the tool produces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives conditional usage cues tied to parameters, e.g. 'max_new_tokens: If > 0, greedily generate this many tokens first' and 'include_dense is true', which tells the agent when to flip those switches. It stops short of explicit when-to-use/when-not framing, but with no alternatives to route between, this is clear context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools