I am building a QnA chatbot. To train the chatbot, I uploaded a document that has process names such as FindCustomer, ContactCustomer, RecordPayment, VoidCharge, AddFlowSheetValue etc along with a few lines describing what each process does.
Now when I ask what information is needed to to add a flowsheet value, Curie correctly identifies the process AddFlowSheetValue as document 0 shown below:
document: 0,
object: ‘search_result’,
score: 164.705,
text: ‘AddFlowsheetValue This service receives the following data: Customer, Contact, User, Flowsheet row, Value, Comment, Instant, Flowsheet template. The service then files the flowsheet value and comment to the row on the template for the appropriate patient contact.’
However, the response I get from openAI API is:
answers: [
‘The following values can be provided while adding a flowsheet value:’,
‘The following values can be provided while adding a flowsheet value:’
],
Similarly, if I ask “How to cancel a charge router record”, if finds the following:
document: 0,
object: ‘search_result’,
score: 351.297,
text: ‘VoidCharges this web service voids a charge router record’
However the answer from API is a fabricated process as I get a response:
“You can cancel a charge router record by calling CancelChargeSession”
There is no process called CancelChargeSession in my training document.
My questions:
- How do I make sure that the answer returned used document 0? Can I use a threshold value for score
- How do I prevent open AI from making imaginery processes such as CancelChargeSession?