Talk Less, Call RightEnhancing Role-Play LLM Agents with Automatic Prompt Optimization and Role Prompting

EMNLP 2025 Wordplay Workshop — Spotlight

Saksorn Ruangtanusak1, Pittawat Taveekitworachai2, Kunat Pipatanakul2

1SCBX R&D 2SCB 10X R&D, SCBX Group, Thailand

API track Team HarryPeter

Task 1

Task-oriented
dialogue

Choose and execute the right action.

Task 2

Context-aware
dialogue

Stay grounded in the character and world.

Task 3 · Hybrid

One dialogue agent that combines both capabilities.

User query

Can you tell me more about the Hunter’s Bow? How strong is it?

Call tool

check_basic_info(
“Hunter’s Bow”)

NPC response

The Hunter’s Bow is light and rapid-firing, with attack power well-suited for quick hunts.

  1. 01User query
  2. 02 · LLMFunction call
  3. 03Game API calls
  4. 04 · LLMDialogue
  5. 05Response
From a player’s request to a grounded character response. The agent selects a tool, retrieves game information, and responds in character. Adapted from slide 5 of the presentation.

Abstract

This report investigates approaches for prompting a tool-augmented large language model (LLM) to act as a role-playing dialogue agent in the API track of the Commonsense Persona-grounded Dialogue Challenge (CPDC) 2025. In this setting, dialogue agents often produce overly long in-character responses (over-speaking) while failing to use tools effectively according to the persona (under-acting), such as generating function calls that do not exist or making unnecessary tool calls before answering.

We explore four prompting approaches to address these issues: basic role prompting, improved role prompting, automatic prompt optimization (APO), and rule-based role prompting. The rule-based role prompting (RRP) approach achieved the best performance through two techniques—character-card/scene-contract design and strict enforcement of function calling—leading to an overall score of 0.571, compared with the zero-shot baseline’s 0.519.

These findings show how explicit rules can improve the effectiveness and reliability of role-playing dialogue agents in this setting. The best-performing prompts and APO tool are available in the project repository.

Adapted from the abstract of arXiv v2.

Conversation and action in the same game world

A game’s non-player character needs to stay in character while selecting the right tools and arguments. CPDC 2025 tests both capabilities. Team HarryPeter participated in the API track using GPT-4o-mini, improving prompts for a shared underlying model.

Setting: paper §3 and the official challenge.

From role descriptions to explicit rules

The baseline uses separate function-planning and dialogue prompts. Four approaches build on that starting point:

01

Role
prompting

General instruction
Role info
Task input
02

Improved role
prompting

Improved instruction
Role info
Task input
03

Optimized
prompt

Prompt
Optimizer
Optimized prompt
04

Rule-based role
prompting

Improved instruction
Rules
Role info
Task input
Four approaches to prompting a role-playing agent. Explicit rules add control over tool use. Adapted from Figure 1. Original figure.
  1. Basic role prompting. Add persona and scene information, and express tool outputs as narrative summaries.
  2. Improved role prompting. Refine instructions manually after examining invented functions, repeated calls, and tool misuse.
  3. Automatic prompt optimization. Try a zero-shot rewrite with Claude Sonnet 4 and an iterative ProTeGi feedback loop.
  4. Rule-based role prompting. Combine a Character-Card/Scene Contract (CSC) with Hard-Enforced Function Calling (HEF) instructions.
ProTeGi optimization loop: a prompt and task input produce responses; an evaluator compares responses with ground truth; feedback informs a natural-language gradient; an optimizer revises the prompt for the next iteration.
The ProTeGi loop uses evaluation feedback to refine prompts, with a budget of up to ten iterations and early stopping. Original Figure 2 from the paper. View full size.

Rules that address recurring failures

Action first: make the relevant function call before producing the character’s response. Fewer calls: consolidate information needs with a composite tool where available. Exact schemas: use valid function names and parameter keys, and ask for clarification when the target is ambiguous.

The CSC listing specifies at most one call per turn. The HEF listing allows a hard cap of four while favoring one. These are distinct prompt constraints in the source; the page does not assume a single universal call limit.

The largest gain is in task execution

Rule-based role prompting achieves the highest overall and Task 1 scores among the reported variants. Improved role prompting retains the highest Task 2 score.

Table 1 · CPDC 2025 API-track test-set scores. Higher is better; bold values mark the best score in each column.
ApproachOverallTask 1Task 2
Baseline0.5190.4420.597
Basic role prompt0.5230.4510.595
Improved role prompt0.5330.4480.617
Optimized prompt (APO)0.5380.4640.613
Rule-based role prompt0.5710.5310.611

Task 1 rises from 0.442 to 0.531: a gain of 0.089, or about 20.1% relative to the baseline. Task 2 rises from 0.597 to 0.611, but remains below the improved role prompt’s 0.617.

Partial correctness still exceeds exact accuracy

A separate local evaluation uses the starter kit’s training data as a validation set. These call-level metrics describe the best configuration; they are not the private-test leaderboard scores above.

Table 2 · Call-level accuracy, with exact and partial-credit evaluation reported separately.
MetricExactPartial
Function name accuracy0.3080.714
Argument accuracy0.2310.643

The gap between partial credit and exact matches leaves substantial room to improve argument grounding. In particular, 71.4% partial function-name accuracy does not mean 71.4% fully correct calls.

Results and evaluation definitions: paper §5, Tables 1–2.

What changes in a conversation?

Two examples from the paper illustrate changes in tool selection. The traces below are reported examples, not a live agent demo.

One information request, fewer calls

A player asks about the Hunter’s Bow and its strength. The unconstrained agent requests general information and attack information separately.

Before

check_basic_info("Hunter’s Bow")
check_attack("Hunter’s Bow")

With rule-based prompting

check_basic_info("Hunter’s Bow")

The composite information tool consolidates the request into one call.

A tool call before the reply

A player wants to join the Commercial Escort quest. The earlier agent replies with an acceptance message without calling a tool. The rule-based example first calls:

check_basic_info("Commercial Escort quest")

This illustrates a change in call ordering. The shown trace is an information lookup; it does not by itself demonstrate that quest enrollment was executed.

Adapted from paper §5.3 and slide 11 of the supplied presentation.

Limitations

The study concerns the CPDC API-track setting with GPT-4o-mini. Its results do not establish that these constraints work equally well across models or open-ended environments. A strict one-call policy can underserve requests that need multiple tools, and exact argument accuracy remains low. Including the full dialogue history also adds latency; history-truncation strategies were not studied.

BibTeX

@misc{ruangtanusak2025talklesscallright,
  title = {Talk Less, Call Right: Enhancing Role-Play LLM Agents with Automatic Prompt Optimization and Role Prompting},
  author = {Saksorn Ruangtanusak and Pittawat Taveekitworachai and Kunat Pipatanakul},
  year = {2025},
  eprint = {2509.00482},
  archivePrefix = {arXiv},
  primaryClass = {cs.CL},
  doi = {10.48550/arXiv.2509.00482},
  url = {https://arxiv.org/abs/2509.00482}
}