Skip to content
2 changes: 2 additions & 0 deletions Controllers/ProcessRunningController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public async Task<ActionResult> ProcessRunner()
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
return BadRequest($"An error occured: {ex.Message}");
}
}
Expand Down Expand Up @@ -106,6 +107,7 @@ public ActionResult SendFileDetails([FromBody] UploadedFilesRequest filesrequest
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
return BadRequest($"An error occured: {ex.Message}");
}
}
Expand Down
2 changes: 2 additions & 0 deletions Models/Reporting/ActionConclusion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ public class ActionConclusion
public string? PhoneUpdateTo { get; set; }
public string? PhoneChanged { get; set; }
public string? AddressChanged { get; set; }
[FieldQuoted]
public string? AddressUpdateFrom { get; set; }
[FieldQuoted]
public string? AddressUpdateTo { get; set; }
}
}
Expand Down
1 change: 1 addition & 0 deletions Models/Reporting/FraudConclusion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class FraudConclusion

public string? FraudConclusionNotes { get; set; }
public string? FraudConclusionType { get; set; }
[FieldQuoted]
public string? Recommendation { get; set; }
}

Expand Down
60 changes: 55 additions & 5 deletions Util/CallLogsChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@ internal class CallLogChecker
private string _promptVerificationConclusion = @"PersonID: {{$personid}}
{{$query}}

Return the Verification Conclusion of the query. The Verification Conclusion must be in the format of JSON that consists of PersonID, ActivityRelatedTo, FormOfAuthentication, Phone Number properties. The phone number will contain 10 digits and may or may not have dashes. If there are multiple numbers listed, identify the most recent, updated phone number. If there is no phone number, return 'no phone number'.
If ActivityRelatedTo is not 'Inbound Call' VerificationCompleted should be set to 'No'. ActivityRelatedTo must be set to 'Inbound Call' and FormOfAuthentication must be 'KBA' or 'ID Verification' or 'One Time Passcode' before VerficationsCompleted can be set to 'Yes', otherwise VerficationsCompleted must be set to 'No'. The JSON format should be:
Return the Verification Conclusion of the query.
The Verification Conclusion must be in the format of JSON that consists of PersonID, ActivityRelatedTo, FormOfAuthentication, Phone Number properties.
The phone number will contain 10 digits and may or may not have dashes.
If there are multiple numbers listed, identify the most recent, updated phone number.
If there is no phone number, return 'no phone number'.
If ActivityRelatedTo is not 'Inbound Call' VerificationCompleted should be set to 'No'.
ActivityRelatedTo must be set to 'Inbound Call' and FormOfAuthentication must be 'KBA' or 'ID Verification' or 'One Time Passcode' before VerficationsCompleted can be set to 'Yes'
, otherwise VerficationsCompleted must be set to 'No'. The JSON format should be:
[JSON]
{
'PersonID': '12345',
Expand Down Expand Up @@ -63,8 +69,17 @@ [JSON END]
PassedStep3a: {{$passedstep3a}}
{{$query}}

Return the Fraud Conclusion intent of the query. The Fraud Conclusion must be in the format of JSON that consists of FraudConclusionNotes, FraudConclusionType, Recommendation properties. The FraudConclusionNotes should a short summary based on your review of the query. The FraudConclusionType should be either 'No Fraud Detected' or 'Possible Account Takeover'. The Recommendation should be your recommendations for futher action based on your conclusions.
If InStep3a is false, then PassedStep3a has no impact on your logic. If InStep3a is true and PassedStep3a is true, this means the the PersonID has passed all verificaiton steps and the form of authentication was 'One Time Passcode' and it should be noted in the FraudCOnclusionNotes that this record passed Step3a and therefore should not be considered fraud. If based on the settings of InStep3a and PassedStep3a it's concluded this record is NOT fraud
Return the Fraud Conclusion intent of the query.
The Fraud Conclusion must be in the format of JSON that consists of FraudConclusionNotes, FraudConclusionType, Recommendation properties.
The FraudConclusionNotes should a short summary based on your review of the query.
The FraudConclusionType should be either 'No Fraud Detected' or 'Possible Account Takeover'.
The Recommendation should be your recommendations for futher action based on your conclusions.
If InStep3a is false, then PassedStep3a has no impact on your logic.
If InStep3a is true and PassedStep3a is true,
this means the the PersonID has passed all verificaiton steps and the form of authentication was 'One Time Passcode'
and it should be noted in the FraudCOnclusionNotes that this record passed Step3a
and therefore should not be considered fraud.
If based on the settings of InStep3a and PassedStep3a it's concluded this record is NOT fraud
then this should be reflected in the Recommendation, FraudConclusionNotes and FraudConclusionType.
The JSON format should be:
[JSON]
Expand All @@ -89,7 +104,10 @@ [JSON END]
private string _promptActionConclusion = @"PersonID: {{$personid}}
{{$query}}

Return the Action Conclusion intent of the query. The Acton Conclusion must be in the format of JSON that consists of PersonID, CallerAuthenticated, FormOfAuthentication, ThirdPartyInvolved, WasCallTransferred, PhoneUpdateFrom, PhoneUpdatedTo, PhoneChanged, AddressChanged, AddressUpdateFrom, AddressUpdateTo properties. The JSON format should be:
Return the Action Conclusion intent of the query.
The Acton Conclusion must be in the format of JSON that consists of
PersonID, CallerAuthenticated, FormOfAuthentication, ThirdPartyInvolved, WasCallTransferred, PhoneUpdateFrom, PhoneUpdatedTo, PhoneChanged, AddressChanged, AddressUpdateFrom, AddressUpdateTo properties.
The JSON format should be:

[JSON]
{
Expand Down Expand Up @@ -137,6 +155,9 @@ public async Task<string> CheckVerificationIntentAsync(Kernel kernel, string per

KernelArguments arguments2 = new(executionSettings) { { "query", query }, { "personid", personid } };
string result = "";
timerCallback = new TimerCallback(OnTimerElapsed);
var timer = new Timer(timerCallback, null, 10 * 1000, 10 * 1000);
var startTime = DateTime.UtcNow;
try
{
// KernelArguments arguments = new(new OpenAIPromptExecutionSettings { ResponseFormat = "json_object" }) { { "query", query } };
Expand All @@ -146,8 +167,14 @@ public async Task<string> CheckVerificationIntentAsync(Kernel kernel, string per
}
catch (Exception ex)
{
timer.Dispose();
Console.WriteLine(ex);
}
finally
{
timer.Dispose();
Console.WriteLine($"Duration of Semantic Kernel for CheckVerificationIntentAsync: { DateTime.UtcNow - startTime } ");
}
return result ?? "";
}

Expand All @@ -162,6 +189,9 @@ public async Task<string> CheckFraudIntentAsync(Kernel kernel, string personid,

KernelArguments arguments2 = new(executionSettings) { { "query", query }, { "personid", personid }, { "instep3a", instep3a }, { "passedstep3a", passedstep3a } };
string result = "";
timerCallback = new TimerCallback(OnTimerElapsed);
var timer = new Timer(timerCallback, null, 10 * 1000, 10 * 1000);
var startTime = DateTime.UtcNow;
try
{
// KernelArguments arguments = new(new OpenAIPromptExecutionSettings { ResponseFormat = "json_object" }) { { "query", query } };
Expand All @@ -173,6 +203,11 @@ public async Task<string> CheckFraudIntentAsync(Kernel kernel, string personid,
{
Console.WriteLine(ex);
}
finally
{
timer.Dispose();
Console.WriteLine($"Duration of Semantic Kernel for CheckFraudIntentAsync: {DateTime.UtcNow - startTime} ");
}
return result ?? "";
}

Expand All @@ -187,6 +222,10 @@ public async Task<string> CheckActionConclusionAsync(Kernel kernel, string perso

KernelArguments arguments2 = new(executionSettings) { { "query", query }, { "personid", personid } };
string result = "";
timerCallback = new TimerCallback(OnTimerElapsed);
var timer = new Timer(timerCallback, null, 10 * 1000, 10 * 1000);

var startTime = DateTime.UtcNow;
try
{
// KernelArguments arguments = new(new OpenAIPromptExecutionSettings { ResponseFormat = "json_object" }) { { "query", query } };
Expand All @@ -198,8 +237,19 @@ public async Task<string> CheckActionConclusionAsync(Kernel kernel, string perso
{
Console.WriteLine(ex);
}
finally
{
timer.Dispose();
Console.WriteLine($"Duration of Semantic Kernel for CheckActionConclusionAsync: {DateTime.UtcNow - startTime} ");
}
return result ?? "";
}

static TimerCallback timerCallback;
static void OnTimerElapsed(object state)
{
Console.WriteLine("Still working...");
}
}
}