Inferensys

Prompt

Pending Action Queue Extraction Prompt

A practical prompt playbook for using Pending Action Queue Extraction Prompt in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the job-to-be-done, ideal user, required context, and when not to use the Pending Action Queue Extraction Prompt.

Task-oriented assistants fail silently when they drop commitments. A user asks for a follow-up email, a refund check, or a document review, and three turns later the assistant has forgotten it. This prompt extracts a deduplicated, prioritized list of pending actions, deferred tasks, and unanswered questions from the full conversation history. It is designed for chat and copilot systems where the assistant must track commitments across turns and surface them before they are lost. Use this prompt when you need a structured action queue that can be committed to external state, displayed to a human operator, or fed into a downstream execution loop.

The ideal user is an AI engineer or product developer building a multi-turn assistant that must not lose track of obligations. Required context includes the full conversation history, a clear definition of what constitutes an actionable commitment in your domain, and an output schema that your application can parse. The prompt works best when the assistant has been instructed to acknowledge tasks explicitly, giving the extractor clear signals to work with. You should wire the extracted queue into your application state so that completed items are removed and new items are captured on each turn. Validate the output against a known schema before committing it, and log extraction failures for review.

Do not use this prompt for real-time task execution or tool calling. It extracts what is pending, not what to do next. It is not a replacement for a task manager, a workflow engine, or a tool-use planner. If your assistant needs to execute actions immediately, use a function-calling or agent planning prompt instead. This prompt is also not suitable for sessions where commitments are never explicitly stated—it cannot infer obligations the user never expressed. For high-stakes domains such as healthcare or finance, always require human review of the extracted queue before any action is taken. The next step after reading this section is to review the prompt template and adapt the output schema to your application's specific action taxonomy.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Pending Action Queue Extraction Prompt delivers reliable value and where it introduces operational risk. Use these cards to decide if this prompt fits your product architecture before you integrate it.

01

Good Fit: Task-Oriented Assistants

Use when: your assistant must track commitments across multiple turns, such as 'I'll check on that and get back to you' or 'Let's circle back to the pricing question.' The prompt excels at extracting deduplicated, prioritized action items from long conversation histories where dropped tasks directly erode user trust. Guardrail: pair with a session state store that persists the queue across sessions so actions survive disconnects.

02

Bad Fit: Single-Turn Q&A

Avoid when: your product handles isolated questions with no expectation of follow-through. Running action queue extraction on stateless Q&A adds latency and hallucination risk without user benefit. Guardrail: gate extraction behind a session-length threshold—only invoke after three or more turns with substantive assistant commitments.

03

Required Input: Complete Turn History

What to watch: the prompt cannot infer pending actions from the current turn alone. It needs the full conversation transcript including assistant promises, user deferrals, and unresolved questions. Truncated history produces false negatives. Guardrail: validate that the input includes at least the last N turns where N covers your maximum expected task deferral window.

04

Operational Risk: Completed Task Staleness

What to watch: the model may fail to remove tasks that were completed in later turns, especially when completion language is implicit ('that works,' 'got it'). Stale completed tasks pollute the queue and cause duplicate work. Guardrail: run a second-pass deduplication check comparing extracted actions against recent assistant confirmations of completion.

05

Operational Risk: Priority Drift

What to watch: the model may assign inconsistent priority levels to the same task across extractions, causing the queue order to shift unpredictably. This breaks downstream systems that depend on stable prioritization. Guardrail: use a fixed priority taxonomy in the prompt schema and validate priority stability across consecutive extractions with a diff check.

06

Operational Risk: Hallucinated Commitments

What to watch: the model may fabricate action items that the assistant never actually committed to, especially when the conversation implies a need but no explicit promise was made. Guardrail: require each extracted action to cite the specific turn and span where the commitment was made. Reject actions without evidence spans.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A copy-ready prompt for extracting a deduplicated, prioritized queue of pending actions from full conversation history.

This prompt template is designed to be appended to the end of a full conversation history. Its job is to scan every turn—both user and assistant—and extract a structured list of tasks, deferred actions, and unanswered questions that the assistant is responsible for. The output is a deduplicated, prioritized queue that your application can use to drive follow-up workflows, display a user-facing task list, or validate that no commitments were dropped. The prompt includes placeholders for your domain-specific action categories, prioritization rules, and output schema. Replace each square-bracket placeholder with values that match your product's task taxonomy and risk tolerance.

text
You are an assistant that extracts a pending action queue from the full conversation history above.

Your task:
1. Scan every user and assistant turn in the conversation history.
2. Identify all explicit and implicit commitments, deferred tasks, unanswered questions, and follow-up actions that the assistant is responsible for.
3. Exclude actions that have been explicitly completed, resolved, or canceled in later turns.
4. Deduplicate semantically equivalent actions, keeping the most recent or specific version.
5. Assign each action a priority from [PRIORITY_LEVELS].
6. Assign each action a category from [ACTION_CATEGORIES].
7. For each action, include a brief evidence span quoting the turn where the commitment originated.

[CONSTRAINTS]
- Do not invent actions that are not grounded in the conversation.
- If no pending actions exist, return an empty queue.
- If the conversation is ambiguous about whether an action is complete, mark it as [UNCERTAIN_STATUS] and include a clarification note.
- Do not include actions that the user explicitly declined or said they would handle themselves.

[OUTPUT_SCHEMA]
Return a JSON object with this exact structure:
{
  "pending_actions": [
    {
      "id": "unique-action-id",
      "description": "Concise action description",
      "priority": "[PRIORITY_LEVEL]",
      "category": "[ACTION_CATEGORY]",
      "status": "pending|in_progress|blocked|uncertain",
      "origin_turn": "Brief quote or turn reference showing where this action was created",
      "dependencies": ["id-of-blocking-action"],
      "clarification_needed": "Question to resolve if status is uncertain, otherwise null"
    }
  ],
  "completed_actions": [
    {
      "id": "unique-action-id",
      "description": "Action description",
      "resolution_turn": "Brief quote or turn reference showing completion"
    }
  ],
  "extraction_notes": ["Any caveats about ambiguity, missing context, or assumptions made"]
}

[PRIORITY_LEVELS]
- critical: Must be resolved in this session before any other work
- high: Should be addressed next
- medium: Address when higher-priority items are cleared
- low: Nice-to-have, can be deferred

[ACTION_CATEGORIES]
- follow_up_question: A question the assistant needs to ask the user
- external_research: Information the assistant needs to look up or retrieve
- system_action: An action the assistant needs to perform in an external system
- summary_or_handoff: A summary or handoff document the assistant needs to produce
- verification: A fact or claim the assistant needs to verify

[RISK_LEVEL]
- If any action involves financial, legal, medical, or safety decisions, mark it as high_risk: true and require human approval before execution.

To adapt this prompt for your application, replace the [PRIORITY_LEVELS] and [ACTION_CATEGORIES] placeholders with your domain-specific taxonomies. If your system uses a different output schema, replace the [OUTPUT_SCHEMA] block with your own JSON structure, but keep the core fields: a unique action ID, a description, a status, and an evidence reference. The [CONSTRAINTS] section should be tightened for your risk tolerance—for example, in regulated domains, add a constraint that any action touching customer data must be flagged for human review. The [UNCERTAIN_STATUS] placeholder should be set to a status value your downstream system can handle, such as needs_clarification or pending_review. Before deploying, run this prompt against a golden dataset of conversations with known pending actions and measure precision, recall, and deduplication accuracy. Pay special attention to conversations where actions are implied rather than explicitly stated, as these are the most common source of false negatives.

IMPLEMENTATION TABLE

Prompt Variables

Replace these placeholders before sending the prompt. Each variable controls extraction behavior, output shape, or safety boundaries for the pending action queue.

PlaceholderPurposeExampleValidation Notes

[CONVERSATION_HISTORY]

Full multi-turn dialogue text from which pending actions are extracted

User: Can you check my order? Assistant: Sure, what's the order ID? User: I'll find it. Also, remind me to follow up on the refund.

Must be non-empty string. Validate that turn boundaries are clearly delimited. Null or empty input should trigger an empty queue response, not hallucination.

[CURRENT_TIMESTAMP]

ISO-8601 timestamp marking when extraction runs, used to detect stale or overdue items

2025-03-15T14:30:00Z

Must parse as valid ISO-8601. Used for relative time checks on deferred tasks. Missing timestamp should cause the harness to inject server time rather than letting the model guess.

[OUTPUT_SCHEMA]

JSON schema describing the required output structure for each pending action

{"type": "object", "properties": {"action_id": {"type": "string"}, "description": {"type": "string"}, "priority": {"enum": ["high", "medium", "low"]}, "source_turn": {"type": "integer"}, "status": {"enum": ["pending", "in_progress", "deferred"]}, "deadline": {"type": "string"}}, "required": ["action_id", "description", "priority", "source_turn", "status"]}

Must be valid JSON Schema. Harness should validate output against this schema post-generation. Reject outputs that add fields outside the schema or omit required fields.

[MAX_ACTIONS]

Upper bound on the number of pending actions to return, preventing unbounded output

10

Must be a positive integer. Harness should truncate or request regeneration if output exceeds this count. Prevents context window exhaustion in long conversations.

[COMPLETION_INDICATORS]

List of phrases or patterns that signal a task has been resolved and should be excluded

["done", "completed", "resolved", "all set", "that worked", "no longer needed"]

Must be a JSON array of strings. Harness should log when an action is excluded due to a completion indicator match for auditability. Empty array means no automatic completion detection.

[DEFERRAL_PATTERNS]

Phrases that indicate a task was postponed rather than completed, requiring future re-surfacing

["later", "remind me", "follow up", "circle back", "after the", "once we"]

Must be a JSON array of strings. Deferred actions should carry a 'deferred' status and retain their original source turn. Harness should verify deferred items appear in output with correct status.

[PRIORITY_RULES]

Heuristics for assigning high, medium, or low priority to extracted actions

High: explicit deadline, blocking dependency, or user urgency markers. Medium: task-oriented request without urgency. Low: informational or nice-to-have mentions.

Must be a non-empty string. Harness should spot-check priority assignments against these rules in eval. Vague rules produce inconsistent priority labeling across runs.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Pending Action Queue Extraction prompt into a reliable production workflow with validation, deduplication, and state reconciliation.

The Pending Action Queue Extraction prompt is not a standalone feature—it is a state reconciliation step that must run reliably at session boundaries, on a timer, or before the assistant generates its next response. The core risk is drift: the model may fail to remove completed tasks, duplicate existing items, or hallucinate commitments the user never made. The implementation harness must treat the extracted queue as a proposed update to a source-of-truth action list, not as the authoritative state itself. This means every extraction result passes through a validation layer before it is committed to the application's action store.

Wire the prompt into your application as a pre-generation hook that fires after each user turn or after every N turns, depending on your latency budget and context window pressure. Pass the full conversation history (or a pruned, high-salience subset) as [CONVERSATION_HISTORY] and the current action queue as [EXISTING_QUEUE]. The model returns a JSON object with new_tasks, completed_tasks, carried_forward_tasks, and unresolved_questions arrays. Before accepting the output, run three validation checks: (1) schema validation—ensure every task object has required fields (id, description, priority, source_turn); (2) deduplication—compare new task descriptions against the existing queue using embedding similarity or fuzzy matching to prevent near-duplicate entries; (3) source grounding—verify that each source_turn reference exists in the conversation history and that the quoted text actually implies a commitment. If validation fails, retry the prompt once with the validation errors injected as [PREVIOUS_ERRORS]. If it fails twice, escalate to a human review queue or log the raw extraction for offline debugging.

For model choice, use a model with strong instruction-following and JSON mode support—GPT-4o, Claude 3.5 Sonnet, or equivalent. Set temperature=0 or very low (0.1) to minimize creative drift in task descriptions. If your application uses tool-calling, expose the extraction as a tool with a strict schema rather than relying on unstructured output parsing. Log every extraction result, including the raw model output, validation pass/fail status, and the final committed queue diff. This audit trail is essential for debugging dropped commitments and for demonstrating state integrity to compliance reviewers. Avoid running this prompt on every single turn in high-frequency chat applications—batch it or trigger it on detected topic shifts, session boundaries, or explicit user confirmation of task completion to keep latency and cost under control.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, data types, and validation rules for the Pending Action Queue Extraction JSON output. Use this contract to validate model responses before committing actions to downstream systems.

Field or ElementType or FormatRequiredValidation Rule

pending_actions

Array of objects

Must be a non-null array. Empty array is valid when no pending actions exist. Schema check: Array.isArray()

pending_actions[].action_id

String, UUID v4

Must be a valid UUID v4 string. Uniqueness enforced across the array. Parse check: regex match against UUID v4 pattern

pending_actions[].description

String, 10-500 chars

Must be a non-empty string between 10 and 500 characters. Describes the action in imperative form. Length check: trim and count

pending_actions[].source_turn_index

Integer >= 0

Must reference a valid turn index from the provided conversation history. Range check: 0 <= value < total_turns. Null not allowed

pending_actions[].priority

Enum: critical | high | medium | low

Must be one of the four allowed enum values. Lowercase only. Enum check: strict string match

pending_actions[].status

Enum: pending | in_progress | deferred

Must be one of the three allowed enum values. Default is pending. Enum check: strict string match

pending_actions[].deferred_until_turn

Integer or null

If status is deferred, must be an integer turn index greater than source_turn_index. If status is not deferred, must be null. Conditional check

pending_actions[].related_entity

String or null

Free-text entity reference from conversation. Null allowed when no entity is associated. Null check: explicit null, not empty string

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when extracting pending action queues from conversation history, and how to prevent dropped commitments in production.

01

Completed Tasks Not Removed

What to watch: The model fails to recognize that a task was completed in a later turn and re-emits it as still pending. This creates infinite loops where the assistant keeps asking about resolved items. Guardrail: Include explicit instructions to cross-reference each extracted action against later turns for resolution evidence. Add a post-extraction deduplication check that compares new actions against a known completed-task list stored in session state.

02

Implicit Commitments Dropped

What to watch: The assistant said 'I'll look into that' or 'Let me check and get back to you' but the extraction prompt treats only explicit 'I will' statements as actions. Soft commitments are the most common source of dropped tasks in production. Guardrail: Expand the extraction schema to capture both explicit promises and implied follow-ups. Use few-shot examples showing soft-commitment phrases mapped to pending actions. Validate recall against a human-annotated commitment list.

03

Priority Inversion Under Load

What to watch: When the conversation is long, the model defaults to recency bias and ranks newer, lower-priority tasks above older, critical ones. Urgent actions buried mid-conversation get deprioritized or missed entirely. Guardrail: Require the prompt to assign priority based on explicit urgency signals in the text, not turn position. Add a priority validation step that flags actions where the assigned priority contradicts user-stated urgency markers like 'urgent,' 'ASAP,' or 'blocking.'

04

Entity Reference Decay

What to watch: Actions reference entities like 'the account' or 'that error' without resolving them to specific IDs. When the action queue is passed to a downstream system, the references are unresolvable. Guardrail: Require each extracted action to include a resolved entity identifier or an explicit 'unresolved' flag with the ambiguous reference preserved. Add a post-extraction validation that rejects actions with dangling references unless they are explicitly marked for clarification.

05

Duplicate Actions Across Turns

What to watch: The same action is extracted from multiple turns where the user repeated themselves or the assistant re-stated the commitment. The queue bloats with duplicates, causing wasted work and user frustration. Guardrail: Implement semantic deduplication in the extraction prompt by instructing the model to group semantically equivalent actions and emit only the most recent or most specific version. Add a post-processing dedup step using embedding similarity with a threshold tuned on your domain.

06

Context Window Truncation Silently Drops Actions

What to watch: The conversation history exceeds the context window, and older turns containing critical commitments are truncated before the extraction prompt runs. The model never sees them, so they cannot be extracted. Guardrail: Never rely solely on raw conversation history for action extraction. Maintain an external pending-action store that is updated incrementally per turn. Use the extraction prompt only as a recovery mechanism, and validate its output against the persisted store to detect dropped items.

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks on a golden dataset of 20-50 conversations with known action items. Each row defines a pass/fail criterion for the Pending Action Queue Extraction Prompt before shipping.

CriterionPass StandardFailure SignalTest Method

Action Item Recall

All ground-truth pending actions appear in the output queue

Missing action item present in golden label set

Exact match against golden action item IDs; count false negatives

Completed Action Exclusion

Zero completed or resolved actions appear in the pending queue

Action marked as done in conversation history appears in output

Check output queue against golden completed-action list; flag any overlap

Deduplication

No semantically duplicate action items in the output queue

Two or more queue entries refer to the same task with different phrasing

Cosine similarity > 0.85 between any pair of output action descriptions triggers manual review

Priority Ordering

Output queue is ordered by urgency or dependency as specified in [PRIORITY_RULES]

High-priority item appears after a low-priority item without justification

Compare output order against golden priority ranking; Kendall tau distance < 2

Unanswered Question Capture

All explicit unanswered questions from the conversation appear as action items

User question marked as unanswered in golden set is absent from output

String match or semantic match against golden unanswered-question list; recall >= 0.95

Hallucination Prevention

Zero action items fabricated from information not present in conversation history

Output contains a task, commitment, or question never mentioned in the transcript

Human annotator reviews each output action item for source grounding; precision >= 1.0

Schema Compliance

Output matches [OUTPUT_SCHEMA] exactly: required fields present, types correct, no extra fields

Missing required field, wrong type, or unexpected field in any queue entry

JSON Schema validator run against output; must pass with zero errors

Assignee Detection

Action items include correct assignee when explicitly stated in conversation

Assignee field is null when conversation specifies who should act, or wrong person assigned

Compare output assignee field against golden assignee labels; accuracy >= 0.90

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a simple JSON output instruction. Skip strict schema validation and deduplication logic in the prompt itself—handle those in post-processing. Focus on getting the model to reliably extract action items and unanswered questions from a single conversation transcript.

code
Extract a list of pending actions and unanswered questions from [CONVERSATION_HISTORY].
Return JSON: {"pending_actions": [{"description": "...", "priority": "high|medium|low"}], "unanswered_questions": ["..."]}

Watch for

  • Completed tasks appearing in the pending list because the model missed the resolution turn
  • Duplicate actions with slightly different phrasing
  • Actions attributed to the wrong participant
  • Missing priority field when the prompt doesn't enforce the enum
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.