本文へ移動
cccskills
無料GitHub で公開

agent-action-input-slot-extraction

Use when designing how an Agentforce agent extracts structured input parameters (slots) from a user's natural-language utterance to invoke an action. Triggers: 'agent extract date from user', 'agent action argument extraction', 'agentforce slot filling', 'agent invocable input mapping', 'agent fails to fill required parameter'. NOT for action authoring (use agentforce/agent-actions) or for prompt-template variable binding (use agentforce/prompt-builder-templates).

インストール方法を見る

含まれるファイル(2)

  • SKILL.md9.1 KB
  • source.json1.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Agent Action Input Slot Extraction

Activate when the agent invokes an Apex/Flow action correctly but with the wrong arguments — date misread, account id missing, picklist value paraphrased, phone number truncated. The skill produces tuned input-variable descriptions, utterance-level test cases, and a re-prompt policy for ambiguous or missing inputs.


Before Starting

Gather this context before working on anything in this domain:

  • The action's invocable definition: each input variable's name, type, description, and required flag. The description is the primary signal the LLM uses to extract values; vague descriptions → wrong slots.
  • Real user utterances. Synthetic test cases miss the verbal patterns users actually produce ("schedule it for next Tuesday afternoon, ish").
  • Whether the action is a one-shot invocation or part of a multi-turn flow. Multi-turn allows re-prompts; one-shot must succeed-or-fail with the first utterance.

Core Concepts

How slot extraction works

When the agent recognizes that an action should be invoked, it constructs an LLM prompt containing:

  • The action's invocable input variables and their descriptions
  • The user's utterance(s)
  • The conversation context

The LLM extracts values for each input variable and validates them against the input type. Missing required inputs trigger a re-prompt cycle.

The description field is the lever. A description like "Date" gets misread for any date in the utterance. "The customer's preferred appointment date in ISO 8601 (YYYY-MM-DD); reject relative phrases like 'next week'" constrains extraction.

Types and coercion

Input typeExtraction behaviorCommon failure
DateLLM parses natural language → ISO date"next Tuesday" parses inconsistently across timezones
DateTimeSame + time-of-dayVague times ("afternoon") get pinned to noon by default
StringFree-formVerbose users put unrelated content in the slot
Picklist (Apex enum / Flow choice)LLM matches utterance to one of the valuesSynonyms get rejected unless described
Id (lookup)LLM extracts a name; the action must resolve to an IdLLM hallucinates IDs starting with valid prefixes
BooleanAffirmative/negative cuesNegation in mid-sentence ("no, wait, yes")

Re-prompt strategy

When a required slot can't be extracted, the agent re-prompts: "What date should I schedule the appointment for?". The re-prompt template should be configured per input. Without configuration, the agent generates a generic prompt that often confuses the user.

For ambiguous extraction (two plausible values), the better pattern is to confirm: "Did you mean Tuesday March 12 or March 19?".


Common Patterns

Pattern: explicit format constraint in description

When to use: Date, datetime, phone, id, anything with a canonical format.

How it works: Description includes the format and an explicit reject clause. "Account record ID; must be exactly 18 alphanumeric characters starting with '001'. Reject names or fragments."

Why not the alternative: A description of "Account ID" alone causes the LLM to hallucinate IDs from account names.

Pattern: enumerate picklist values inline

When to use: Apex enum or Flow choice as input.

How it works: Description lists every valid value with disambiguation. "Severity: one of LOW (cosmetic, no impact), MEDIUM (workaround exists), HIGH (production blocked). Synonyms: 'critical' = HIGH; 'minor' = LOW."

Why not the alternative: Without enumeration, the LLM matches user phrasing to the closest type member, often wrong ('urgent' → MEDIUM when policy says HIGH).

Pattern: name-to-Id resolution outside the LLM

When to use: Action takes a record Id but users speak in names.

How it works: Define the input as a String accountName. Inside the Apex/Flow action, resolve to Id via SOQL with proper escaping and ambiguity handling. Never let the LLM emit IDs.


Decision Guidance

SituationRecommended ApproachReason
User must specify an exact dateDate input + ISO-format description + reject relativesRelative phrasing parses inconsistently
Action takes a lookup recordString name input; Apex resolves to IdLLMs hallucinate IDs; resolution belongs in Apex
Required slot may be missingConfigure re-prompt text per inputGeneric re-prompt confuses users
Multiple plausible values for a slotDisambiguate via confirmation prompt before actionAction with wrong slot is worse than slow action
Free-form note textString with no constraint descriptionLLM extracts the user's verbatim sentence; no extraction logic needed

Recommended Workflow

  1. List every invocable input the action exposes. For each, ask: what's the canonical type? what synonyms or formats might appear? is it required?
  2. Write a specific description per input. Include format, examples, reject clauses. Treat the description as the LLM's instruction manual for that slot.
  3. Build a sample-utterance test set: 10–20 utterances per slot covering typical, edge-case, and adversarial phrasings.
  4. For required slots, configure a re-prompt template that names the missing slot and gives an example.
  5. For lookup-type slots, change the input from Id to String <name> and resolve inside the action; document the lookup ambiguity policy (first match? prompt for clarification? abort?).
  6. Run the test utterances through the agent test harness (Agent Builder → Test in App). Record extraction accuracy per slot.
  7. Iterate on the descriptions until extraction accuracy crosses your bar (typically ≥95% for high-stakes actions, lower for low-stakes).

Review Checklist

  • Each input has a description that includes format + examples + reject clauses
  • Picklist/enum inputs enumerate values with synonym disambiguation
  • Lookup/Id inputs are taken as names, resolved inside the action
  • Required-slot re-prompts configured with slot name and example
  • Test-utterance suite covers ≥10 utterances per slot
  • Accuracy measured and meets the action's stakes

Salesforce-Specific Gotchas

  1. Description text is the primary lever; the variable name is secondary — String d with description "appointment date" extracts as well as String appointmentDate with the same description. Don't rely on naming.
  2. Date inputs default to the running user's timezone — "next Tuesday" relative to which timezone? Specify in the description.
  3. Required + no value extracted = agent emits a built-in re-prompt — Often phrased awkwardly. Always override.
  4. Hallucinated IDs validate as the right shape but reference no record — Apex must check existence and surface a clear error to the agent loop, not silently fail.
  5. Picklist values must match exactly — The LLM may emit "high" when the picklist value is "HIGH". Apex enum coercion fails. Normalize case in the action.

Output Artifacts

ArtifactDescription
Tuned invocable input definitionsUpdated description= strings on every input
Test-utterance suiteYAML/CSV: utterance → expected slot values
Re-prompt template per slotPer-input override of the generic agent re-prompt
Resolution policy for lookup inputsDocumented in the action's class header

Related Skills

  • agentforce/agent-actions — for the broader action design and invocation flow
  • agentforce/agentforce-tool-use-patterns — for when an action call leads into another tool call
  • agentforce/agentforce-eval-harness — for measuring extraction accuracy at scale
  • agentforce/custom-agent-actions-apex — for Apex implementation patterns of name-to-Id resolution

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

007

無料

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

Guides the creation of agile user stories and Gherkin feature files. Use when the user wants to create a user story, write acceptance criteria, define Gherkin scenarios, or author BDD feature files. This should trigger for requests such as Create a user story; Write a user story; I need to write a user story. Part of cursor-rules-java project

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

Facilitates conversational discovery to create Architectural Decision Records (ADRs) for non-functional requirements using the ISO/IEC 25010:2023 quality model. Use when the user wants to document quality attributes, NFR decisions, security/performance/scalability architecture, or design systems with measurable quality criteria. This should trigger for requests such as Create ADR for Non-functional requirements; Document Non-functional requirements; Capture Non-functional requirements; Generate Non-functional requirements in an ADR. Part of cursor-rules-java project

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

Run a health check on an existing project: dependency audit, security scan, test runner detection, CI/CD evaluation, and missing configuration analysis. Maps the three execution gates (pre/in/post) from /10x-bootstrapper to an assessment framework for existing codebases. Reads optional context/foundation/stack-assessment.md from /10x-stack-assess to focus checks on identified gaps. Writes context/foundation/health-check.md with findings, prioritized fixes, and an agent-readiness verdict. Use when the user has an existing project and wants to verify its health before working with an agent. Trigger phrases: "health check", "check my project", "audit my project", "is my project healthy", "sprawdź projekt", "audyt projektu", "health-check", "project health". Use AFTER /10x-stack-assess (brownfield chain), BEFORE agent onboarding (m1-l4).

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

10x-team

無料

You MUST use this when building projects end-to-end. Orchestrates all 12 team roles — automatically switches between CTO, architect, PM, engineers, SRE, security, DBA, QA, and EM based on the current phase of work. Starts with brainstorming before any implementation.

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

Use when you need to add or configure Maven plugins in your pom.xml — including quality tools (enforcer, surefire, failsafe, jacoco, pitest, spotbugs, pmd), security scanning (OWASP), code formatting (Spotless), version management, container image build (Jib), build information tracking, and benchmarking (JMH) — through a consultative, modular step-by-step approach that only adds what you actually need. This should trigger for requests such as Add Maven plugins in pom.xml; Improve Maven plugins in pom.xml. Part of cursor-rules-java project

日本語の概要は準備中です。原文の説明を表示しています。

aibot88/sec_skill_store42026年5月27日 更新

aibot88 のスキルをすべて見る

このスキルの問題を報告する