hf_inference.nlp.zero_shot
Classify text into any custom set of categories without requiring model fine-tuning or training data. Provide a list of 2–20 candidate labels; the model determines which best describes the input text. Returns labels ranked by confidence score. Supports multi-label mode (text can match multiple ca...
This record as markdown: /tools/io-github-whiteknightonhorse-apibase/hf-inference.nlp.zero-shot.md
What hf_inference.nlp.zero_shot does on Apibase
AI agents use hf_inference.nlp.zero_shot to create or update resources in Apibase, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Apibase environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Input text to process. Maximum ~10,000 characters depending on model context window. |
model | string | — | HuggingFace model ID to use for zero-shot classification. Default: "facebook/bart-large-mnli" (MNLI-trained, accurate but slower). Alternatives: "cross-encoder/ |
multi_label | boolean | — | If true, scores are independent for each label (text can match multiple categories simultaneously). If false (default), scores are mutually exclusive and sum to |
candidate_labels | array | Yes | List of candidate category labels to classify the text into (2–20 labels). Example: ["politics", "sports", "technology", "entertainment"]. Labels can be any des |
Parameters from the server's own tool schema.
Why hf_inference.nlp.zero_shot is rated Medium
An AI agent can call hf_inference.nlp.zero_shot faster than any human can review: one bad instruction and it creates or modifies resources in Apibase by the hundred, each call as confident as the last.
Attacks that exploit this kind of access
The rule that runs hf_inference.nlp.zero_shot safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Apibase, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For hf_inference.nlp.zero_shot, this is the rule to start with:
hf_inference.nlp.zero_shot stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Apibase, apply this rule, and every hf_inference.nlp.zero_shot call is checked against it from then on.
Questions about hf_inference.nlp.zero_shot
Classify text into any custom set of categories without requiring model fine-tuning or training data. Provide a list of 2–20 candidate labels; the model determines which best describes the input text. Returns labels ranked by confidence score. Supports multi-label mode (text can match multiple categories). Default model: facebook/bart-large-mnli. Ideal for routing, content moderation, intent detection, and ad-hoc categorization tasks. It is categorised as a Write tool in the Apibase MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
hf_inference.nlp.zero_shot accepts 4 parameters: text, model, multi_label, candidate_labels. Required: text, candidate_labels. The full parameter table on this page comes from the server's own tool schema.
Register the Apibase MCP server in PolicyLayer and add a rule for hf_inference.nlp.zero_shot: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Apibase. Nothing to install.
hf_inference.nlp.zero_shot is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the hf_inference.nlp.zero_shot rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for hf_inference.nlp.zero_shot. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
hf_inference.nlp.zero_shot is provided by the Apibase MCP server (apibase-mcp-client). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Apibase, and thousands of servers like it.
This server
Across the catalogue