Skip to content

Commit 6456d95

Browse files
authored
Merge pull request #58 from MaxLinCode/maxlin/update-clarification-response-prompt
Update clarification response prompt
2 parents d1758f6 + 9903be5 commit 6456d95

2 files changed

Lines changed: 19 additions & 7 deletions

File tree

apps/web/src/lib/server/decide-turn-policy.ts

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,23 @@ export function decideTurnPolicy(input: DecideTurnPolicyInput): TurnPolicyDecisi
7777
}
7878

7979
return {
80-
action: "ask_clarification",
81-
reason: "Confirmation language without one recoverable proposal should ask which proposal to apply.",
82-
requiresWrite: false,
83-
requiresConfirmation: false,
80+
action: "present_proposal",
81+
reason: "Confirmation language arrived for a ready consent-gated write, but no recoverable proposal exists yet; present proposal now.",
82+
requiresWrite: true,
83+
requiresConfirmation: true,
8484
useMutationPipeline: false,
85-
clarificationSlots: ["proposal"],
85+
clarificationSlots: [],
8686
committedSlots: commitResult.committedSlots
8787
};
88+
// return {
89+
// action: "ask_clarification",
90+
// reason: "Confirmation language without one recoverable proposal should ask which proposal to apply.",
91+
// requiresWrite: false,
92+
// requiresConfirmation: false,
93+
// useMutationPipeline: false,
94+
// clarificationSlots: ["proposal"],
95+
// committedSlots: commitResult.committedSlots
96+
// };
8897
case "clarification_answer":
8998
case "planning_request":
9099
case "edit_request":

packages/integrations/src/prompts/conversation-response.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export const conversationResponseSystemPrompt = buildPromptSpec([
1919
title: "Inputs",
2020
lines: [
2121
"The provided transcript and memory summary are continuity context only, not authoritative Atlas state.",
22-
"When entityRegistry or discourseState are present, use them as the primary reference-resolution aid for pronouns like 'it', 'that', or 'the other one'."
22+
"When entityRegistry or discourseState are present, use them as the primary reference-resolution aid for pronouns like 'it', 'that', or 'the other one'.",
23+
"When pending clarifications are present in discourseState, treat them as the current blocking questions and use them as the main guide for interpreting short follow-up replies."
2324
]
2425
},
2526
{
@@ -41,7 +42,9 @@ export const conversationResponseSystemPrompt = buildPromptSpec([
4142
"If the route is conversation, answer briefly and include one concrete next step when helpful.",
4243
"If the route is conversation_then_mutation, explain the likely intended action in hedged terms and make clear that any actual change would require confirmation or one missing required detail.",
4344
"For clear bare scheduling or delegated-slot requests on the conversation path, state the intended scheduling action briefly instead of fishing for optional preferences.",
44-
"Prefer replies like 'It sounds like you want me to schedule the oil change at the next reasonable opening' over replies like 'What day works?' or 'Do you have a preferred location?' when the target is already clear."
45+
"Prefer replies like 'It sounds like you want me to schedule the oil change at the next reasonable opening' over replies like 'What day works?' or 'Do you have a preferred location?' when the target is already clear.",
46+
"If discourseState includes active pending clarifications and the user reply plausibly fills one of them, respond in a way that reflects that specific missing detail instead of asking a different follow-up question.",
47+
"Do not ignore an active pending clarification by asking for a different slot unless the user changed the request or the target is still unclear."
4548
]
4649
},
4750
{

0 commit comments

Comments
 (0)