Expand persona follow-ups for identity and favorites
This commit is contained in:
@@ -830,6 +830,7 @@ Current release theme:
|
|||||||
- personality and capability questions
|
- personality and capability questions
|
||||||
- favorite-style prompts like `what is your favorite color`
|
- favorite-style prompts like `what is your favorite color`
|
||||||
- mood / affect questions
|
- mood / affect questions
|
||||||
|
- recognition follow-ups like `do you know me`
|
||||||
- follow-up state prompts that should stay warm and locally grounded
|
- follow-up state prompts that should stay warm and locally grounded
|
||||||
- Next pass targets:
|
- Next pass targets:
|
||||||
- document the remaining persona inventory so we keep a clean checklist for the next passes
|
- document the remaining persona inventory so we keep a clean checklist for the next passes
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ Keep a running checklist of the legacy persona questions and identity surfaces w
|
|||||||
- affect and mood: `how are you`, `are you happy`, `are you sad`, `are you angry`
|
- affect and mood: `how are you`, `are you happy`, `are you sad`, `are you angry`
|
||||||
- memory and identity recall: `who am i`, `what is my name`, `when is my birthday`, `what is my favorite music`
|
- memory and identity recall: `who am i`, `what is my name`, `when is my birthday`, `what is my favorite music`
|
||||||
- greeting and presence charm: `good morning`, `welcome back`, `who is this`, person-aware greeting follow-ups
|
- greeting and presence charm: `good morning`, `welcome back`, `who is this`, person-aware greeting follow-ups
|
||||||
|
- recognition follow-ups: `do you know me`, `do you remember me`, `can you recognize me`
|
||||||
- seasonal and contextual charm: holiday prompts, pizza day, surprise offers, personal report personality hooks
|
- seasonal and contextual charm: holiday prompts, pizza day, surprise offers, personal report personality hooks
|
||||||
- conversational follow-ups that should stay local and warm instead of falling into generic chat
|
- conversational follow-ups that should stay local and warm instead of falling into generic chat
|
||||||
|
|
||||||
|
|||||||
@@ -3822,7 +3822,11 @@ public sealed class JiboInteractionService(
|
|||||||
"what s my name",
|
"what s my name",
|
||||||
"what's my name",
|
"what's my name",
|
||||||
"who am i",
|
"who am i",
|
||||||
"do you remember my name");
|
"do you remember my name",
|
||||||
|
"do you know me",
|
||||||
|
"do you remember me",
|
||||||
|
"who is this",
|
||||||
|
"can you recognize me");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string? TryExtractNameFact(string transcript)
|
private static string? TryExtractNameFact(string transcript)
|
||||||
|
|||||||
@@ -231,6 +231,49 @@ public sealed class JiboInteractionServiceTests
|
|||||||
Assert.Equal("I think you are Sam.", decision.ReplyText);
|
Assert.Equal("I think you are Sam.", decision.ReplyText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Theory]
|
||||||
|
[InlineData("do you know me")]
|
||||||
|
[InlineData("do you remember me")]
|
||||||
|
[InlineData("who is this")]
|
||||||
|
[InlineData("can you recognize me")]
|
||||||
|
public async Task BuildDecisionAsync_IdentityFollowUp_UsesPersonScopedNameWhenSpeakerIsKnown(string transcript)
|
||||||
|
{
|
||||||
|
var memoryStore = new InMemoryPersonalMemoryStore();
|
||||||
|
memoryStore.SetName(new PersonalMemoryTenantScope("acct-c", "loop-c", "device-c", "person-3"), "taylor");
|
||||||
|
var service = CreateService(memoryStore);
|
||||||
|
|
||||||
|
var decision = await service.BuildDecisionAsync(new TurnContext
|
||||||
|
{
|
||||||
|
RawTranscript = transcript,
|
||||||
|
NormalizedTranscript = transcript,
|
||||||
|
Attributes = new Dictionary<string, object?>
|
||||||
|
{
|
||||||
|
["accountId"] = "acct-c",
|
||||||
|
["loopId"] = "loop-c",
|
||||||
|
["context"] = """{"runtime":{"perception":{"speaker":"person-3"},"loop":{"users":[{"id":"person-3","firstName":"taylor"}]}}}"""
|
||||||
|
},
|
||||||
|
DeviceId = "device-c"
|
||||||
|
});
|
||||||
|
|
||||||
|
Assert.Equal("memory_get_name", decision.IntentName);
|
||||||
|
Assert.Equal("I think you are Taylor.", decision.ReplyText);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public async Task BuildDecisionAsync_IdentityFollowUp_RequestsNameWhenSpeakerIsUnknown()
|
||||||
|
{
|
||||||
|
var service = CreateService();
|
||||||
|
|
||||||
|
var decision = await service.BuildDecisionAsync(new TurnContext
|
||||||
|
{
|
||||||
|
RawTranscript = "do you know me",
|
||||||
|
NormalizedTranscript = "do you know me"
|
||||||
|
});
|
||||||
|
|
||||||
|
Assert.Equal("memory_get_name", decision.IntentName);
|
||||||
|
Assert.Equal("I do not know your name yet. You can say, my name is Alex.", decision.ReplyText);
|
||||||
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task BuildDecisionAsync_TriggerWithKnownIdentity_BuildsProactiveGreetingAndContext()
|
public async Task BuildDecisionAsync_TriggerWithKnownIdentity_BuildsProactiveGreetingAndContext()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user