SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.11586 · ICLR · 2025

Broaden your SCOPE! Efficient Multi-turn Conversation Planning for LLMs using Semantic Space

Bryan Kian, Hsiang Low, Chuan-Sheng Foo, Zhiliang Chen, Xinyuan Niu

arXiv · PDF · Open in the Atlas

Code that ran

1 of 1 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2503.11586.json · badge: /api/ran/2503.11586.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
chenzhiliang94/convo-plan-scope canonical (classifier label)
classifier basis: classifier_2025
1 ran · 0 no recorded run
FunctionStatusWhere it lives
MCTS Ran
ran on a synthesized input · constructed an object; no result was computed
chenzhiliang94/convo-plan-scope/monte_carlo_tree_search/mcts.py
code served (permissive licence) · get_code("2d85b76831c5a641")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MCTS: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import random
import time

# Define a minimal State class
class State:
    def __init__(self, depth=0, is_terminal=False):
        self.depth = depth
        self.is_terminal = is_terminal

# Define a minimal Node class for MCTS
class Node:
    def __init__(self, state, parent=None):
        self.state = state
        self.parent = parent
        self.children = []
        self.visit_count = 0
        self.value_sum = 0.0
    
    def select(self):
        # Simple selection: return self if leaf, otherwise select best child
        if len(self.children) == 0:
            return self
        # UCB-like selection
        best_child = self.children[0]
        for child in self.children[1:]:
            if child.visit_count < best_child.visit_count:
                best_child = child
        return best_child.select()
    
    def expand(self):
        # Create a child node and return it with an action
        new_depth = self.state.depth + 1
        child_state = State(depth=new_depth, is_terminal=new_depth > 3)
        child = Node(child_state, parent=self)
        self.children.append(child)
        action = 0
        return child, action
    
    def back_propagate(self, reward, child):
        self.visit_count += 1
        self.value_sum += reward
        if self.parent is not None:
            self.parent.back_propagate(reward, self)
    
    def back_propagate_simple(self, reward):
        self.visit_count += 1
        self.value_sum += reward
        if self.parent is not None:
            self.parent.back_propagate_simple(reward)

# Define a minimal MDP class
class SimpleMDP:
    def __init__(self):
        self.discount_factor = 0.99
        self.actions = [0, 1, 2]
    
    def is_terminal(self, state):
        return state.is_terminal or state.depth > 5
    
    def get_actions_in_simulation(self, state):
        return self.actions
    
    def execute_in_simulation(self, state, action, seed=None):
        if seed is not None:
            random.seed(seed)
        new_depth = state.depth + 1
        new_state = State(depth=new_depth, is_terminal=new_depth > 5)
        reward = random.uniform(0.0, 1.0)
        return new_state, reward
    
    def get_discount_factor(self):
        return self.discount_factor

# Define a minimal Q-function (nn.Module)
class SimpleQFunction(nn.Module):
    def __init__(self, state_dim=4, action_dim=3):
        super().__init__()
        self.linear = nn.Linear(state_dim, action_dim)
    
    def forward(self, state_features):
        return self.linear(state_features)

# Define a minimal Bandit class
class SimpleBandit:
    def __init__(self, num_arms=3):
        self.num_arms = num_arms
    
    def select_arm(self):
        return random.randint(0, self.num_arms - 1)

# Create instances for ARGS
torch.manual_seed(0)
random.seed(0)

mdp = SimpleMDP()
qfunction = SimpleQFunction(state_dim=4, action_dim=3)
bandit = SimpleBandit(num_arms=3)
terminating_heuristic_q_function = SimpleQFunction(state_dim=4, action_dim=3)

ARGS = {
    "mdp": mdp,
    "qfunction": qfunction,
    "bandit": bandit,
    "terminating_heuristic_q_function": terminating_heuristic_q_function
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MCTS — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MCTS output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 1 samples lifted from this paper's linked repositories, 1 carry a function identity and 0 do not. Of the 1 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 1 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large language models (LLMs) are used in chatbots or AI assistants to hold conversations with a human user. In such applications, the quality (e.g., user engagement, safety) of a conversation is important and can only be exactly known at the end of the conversation. To maximize its expected quality, conversation planning reasons about the stochastic transitions within a conversation to select the optimal LLM response at each turn. Existing simulation-based conversation planning algorithms typically select the optimal response by simulating future conversations with a large number of LLM queries at every turn. However, this process is extremely time-consuming and hence impractical for real-time conversations. This paper presents a novel approach called Semantic space COnversation Planning with improved Efficiency (SCOPE) that exploits the dense semantic representation of conversations to perform conversation planning efficiently. In particular, SCOPE models the stochastic transitions in conversation semantics and their associated rewards to plan entirely within the semantic space. By doing so, SCOPE selects the optimal LLM response at every conversation turn without needing additional LLM queries for simulation. As a result, SCOPE can perform conversation planning 70 times faster than conventional simulation-based planning algorithms when applied to a wide variety of conversation starters and two reward functions seen in the real world, yet achieving a higher reward within a practical planning budget. Our code can be found at: https://github.com/chenzhiliang94/convo-plan-SCOPE.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2503.11586")
get_code_for_paper("2503.11586")
have("2503.11586")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2503.11586.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2503.11586.svg)](https://syntology.ai/paper/2503.11586)

Connect an agent — have() is free.