ตัวอย่าง Prompt #2

ตัวอย่าง Prompt technique ที่ทดสอบใช้งานร่วมกับ Eidy API

โดยเพิ่มเติมทั้งหมด 8 prompts

  1. General Compliance Check

  2. Verification of Medidcal Records

  3. Expense Accuracy Assessment

  4. Fraud Detection Investigation

  5. Documentation completeness

  6. Service Provision Verification

  7. Signature and Approval Verification

  8. Consistency Check

Prompt technique

General Compliance Check

import requests
import json
URL = 'https://api.eidy.cloud/v1/chat/completions'
EIDY_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

headers = {'content-type': 'application/json', 'Authorization': 'Bearer '+ EIDY_API_KEY}
message = [{
    'role': 'user',
    'content': """
    Review the expense claims submitted by healthcare providers to ensure they comply with the 2019 NHSO guidelines. Verify that all required documentation is complete and accurately reflects the services provided.
    ==================
    Provider: XYZ Clinic
    Service Date: January 15, 2019
    Claim Amount: 5,000 THB
    Documents Submitted: Patient record, service log, expense claim form, approval letter
    ==================
    """
}]
data = {
"messages" : message,
"model" : 'eidy',
"max_tokens" : 1024,
"temperature" : 0.1,
"stream" : False
}
res = requests.post(URL, headers=headers ,data=json.dumps(data))

response

{'id': '1719495606.9949834-eidy',
 'choices': [{'finish_reason': 'stop',
   'index': 0,
   'message': {'content': "Based on the provided information, it appears that the healthcare provider, XYZ Clinic, has submitted all the required documents for the expense claim. These include the patient record, service log, expense claim form, and approval letter.  To ensure compliance with the 2019 NHSO guidelines, it is necessary to review each document carefully.   1. Patient Record: Verify that the patient record is complete and accurately reflects the services provided on January 15, 2019. Check for any discrepancies or missing information.  2. Service Log: Review the service log to ensure that it matches the services mentioned in the patient record. Confirm that the services rendered are consistent with the claim amount of 5,000 THB.  3. Expense Claim Form: Ensure that the expense claim form is properly filled out and signed by the authorized personnel. Cross-check the claimed amount with the supporting documents (patient record and service log) to ensure accuracy.  4. Approval Letter: Verify that the approval letter is valid and corresponds to the services provided on January 15, 2019. Confirm that the letter includes the necessary details such as patient name, service date, and approved amount.  If all the documents are complete, accurate, and consistent with the 2019 NHSO guidelines, then the expense claim can be considered valid. However, if any discrepancies or incomplete documentation are found, further investigation and clarification may be required before approving the claim.  It is important to note that without access to the actual documents and specific guidelines, a definitive determination of the claim's validity cannot be made. It is recommended to consult the appropriate NHSO authorities for a final review and approval process.  The Answer is: The claim appears to be valid based on the information provided, but further verification is recommended according to the 2019 NHSO guidelines.",
    'role': 'assistant'},
   'text': "Based on the provided information, it appears that the healthcare provider, XYZ Clinic, has submitted all the required documents for the expense claim. These include the patient record, service log, expense claim form, and approval letter.  To ensure compliance with the 2019 NHSO guidelines, it is necessary to review each document carefully.   1. Patient Record: Verify that the patient record is complete and accurately reflects the services provided on January 15, 2019. Check for any discrepancies or missing information.  2. Service Log: Review the service log to ensure that it matches the services mentioned in the patient record. Confirm that the services rendered are consistent with the claim amount of 5,000 THB.  3. Expense Claim Form: Ensure that the expense claim form is properly filled out and signed by the authorized personnel. Cross-check the claimed amount with the supporting documents (patient record and service log) to ensure accuracy.  4. Approval Letter: Verify that the approval letter is valid and corresponds to the services provided on January 15, 2019. Confirm that the letter includes the necessary details such as patient name, service date, and approved amount.  If all the documents are complete, accurate, and consistent with the 2019 NHSO guidelines, then the expense claim can be considered valid. However, if any discrepancies or incomplete documentation are found, further investigation and clarification may be required before approving the claim.  It is important to note that without access to the actual documents and specific guidelines, a definitive determination of the claim's validity cannot be made. It is recommended to consult the appropriate NHSO authorities for a final review and approval process.  The Answer is: The claim appears to be valid based on the information provided, but further verification is recommended according to the 2019 NHSO guidelines."}],
 'created': 1719495606.9949834,
 'model': 'eidy',
 'object': 'chat.completion',
 'usage': {'completion_tokens': 371,
  'prompt_tokens': 201,
  'total_tokens': 572}}

Verification of Medical Records

import requests
import json
URL = 'https://api.eidy.cloud/v1/chat/completions'
EIDY_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

headers = {'content-type': 'application/json', 'Authorization': 'Bearer '+ EIDY_API_KEY}
message = [{
    'role': 'user',
    'content': """
    Cross-check the patient medical records against the expense claims to confirm the accuracy and legitimacy of the services billed. Ensure that the medical records are fully documented and coded according to ICD-10 standards.
    ==================
  Patient ID: 12345
  Service Provided: Blood Test
  ICD-10 Code: R79.0 (Abnormal blood test results)
  Claim Amount: 2,500 THB
  Finding: Medical record matches the expense claim. Service is accurately coded and documented.
    ==================
    """
}]
data = {
"messages" : message,
"model" : 'eidy',
"max_tokens" : 1024,
"temperature" : 0.1,
"stream" : False
}
res = requests.post(URL, headers=headers ,data=json.dumps(data))

response

{'id': '1719495613.0590918-eidy',
 'choices': [{'finish_reason': 'stop',
   'index': 0,
   'message': {'content': 'Based on the provided information, the medical record matches the expense claim for the patient with ID 12345. The service provided, which is a blood test, has been accurately coded and documented according to ICD-10 standards using the code R79.0 for abnormal blood test results. The claim amount of 2,500 THB appears to be legitimate based on the information given.',
    'role': 'assistant'},
   'text': 'Based on the provided information, the medical record matches the expense claim for the patient with ID 12345. The service provided, which is a blood test, has been accurately coded and documented according to ICD-10 standards using the code R79.0 for abnormal blood test results. The claim amount of 2,500 THB appears to be legitimate based on the information given.'}],
 'created': 1719495613.0590918,
 'model': 'eidy',
 'object': 'chat.completion',
 'usage': {'completion_tokens': 77, 'prompt_tokens': 223, 'total_tokens': 300}}

Expense Accuracy Assessment

import requests
import json
URL = 'https://api.eidy.cloud/v1/chat/completions'
EIDY_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

headers = {'content-type': 'application/json', 'Authorization': 'Bearer '+ EIDY_API_KEY}
message = [{
    'role': 'user',
    'content': """
    Analyze the expense claims for testing services to verify the correctness of the amounts claimed. Compare these expenses with the standard costs for similar services and check for any discrepancies.
    ==================
  Service: MRI Scan
  Claimed Amount: 10,000 THB
  Standard Cost: 9,500 THB
  Finding: Claimed amount is slightly higher than the standard cost. Recommend verification of the reason for the higher cost.
    ==================
    """
}]
data = {
"messages" : message,
"model" : 'eidy',
"max_tokens" : 1024,
"temperature" : 0.1,
"stream" : False
}
res = requests.post(URL, headers=headers ,data=json.dumps(data))

response

{'id': '1719495832.583925-eidy',
 'choices': [{'finish_reason': 'stop',
   'index': 0,
   'message': {'content': 'Based on the provided information, the claimed amount for the MRI scan service is 10,000 THB, which is slightly higher than the standard cost of 9,500 THB. It is recommended to verify the reason for the higher cost to ensure accuracy and legitimacy of the expense claim.',
    'role': 'assistant'},
   'text': 'Based on the provided information, the claimed amount for the MRI scan service is 10,000 THB, which is slightly higher than the standard cost of 9,500 THB. It is recommended to verify the reason for the higher cost to ensure accuracy and legitimacy of the expense claim.'}],
 'created': 1719495832.583925,
 'model': 'eidy',
 'object': 'chat.completion',
 'usage': {'completion_tokens': 57, 'prompt_tokens': 203, 'total_tokens': 260}}

Fraud Detection Investigation

import requests
import json
URL = 'https://api.eidy.cloud/v1/chat/completions'
EIDY_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

headers = {'content-type': 'application/json', 'Authorization': 'Bearer '+ EIDY_API_KEY}
message = [{
    'role': 'user',
    'content': """
Identify any patterns or anomalies in the expense claims that may indicate potential fraud. Use statistical analysis to detect outliers and investigate any suspicious claims.
    ==================
  Provider: ABC Hospital
	Total Claims: 150,000 THB
	Average Claim Amount: 3,000 THB
	Suspicious Claim: 20,000 THB for a single blood test
	Finding: The high claim amount is an outlier. Further investigation revealed that the claim was for multiple tests, incorrectly consolidated.
    ==================
    """
}]
data = {
"messages" : message,
"model" : 'eidy',
"max_tokens" : 1024,
"temperature" : 0.1,
"stream" : False
}
res = requests.post(URL, headers=headers ,data=json.dumps(data))

response

{'id': '1719495924.6400552-eidy',
 'choices': [{'finish_reason': 'stop',
   'index': 0,
   'message': {'content': 'Based on the provided data, there is a potential anomaly in the expense claims that may indicate potential fraud. The average claim amount for ABC Hospital is 3,000 THB, but there is a suspicious claim for 20,000 THB for a single blood test.  To identify patterns or anomalies, we can use statistical analysis to detect outliers. In this case, the claim amount of 20,000 THB stands out significantly from the average claim amount.  Further investigation into the suspicious claim revealed that it was incorrectly consolidated and included multiple tests. This finding suggests that the high claim amount was due to an error rather than fraudulent activity.  Therefore, based on the analysis and investigation, it appears that the anomaly in the expense claims was due to an error in consolidating multiple tests rather than potential fraud.  The answer is: The anomaly in the expense claims was due to an error in consolidating multiple tests rather than potential fraud.',
    'role': 'assistant'},
   'text': 'Based on the provided data, there is a potential anomaly in the expense claims that may indicate potential fraud. The average claim amount for ABC Hospital is 3,000 THB, but there is a suspicious claim for 20,000 THB for a single blood test.  To identify patterns or anomalies, we can use statistical analysis to detect outliers. In this case, the claim amount of 20,000 THB stands out significantly from the average claim amount.  Further investigation into the suspicious claim revealed that it was incorrectly consolidated and included multiple tests. This finding suggests that the high claim amount was due to an error rather than fraudulent activity.  Therefore, based on the analysis and investigation, it appears that the anomaly in the expense claims was due to an error in consolidating multiple tests rather than potential fraud.  The answer is: The anomaly in the expense claims was due to an error in consolidating multiple tests rather than potential fraud.'}],
 'created': 1719495924.6400552,
 'model': 'eidy',
 'object': 'chat.completion',
 'usage': {'completion_tokens': 187,
  'prompt_tokens': 212,
  'total_tokens': 399}}

Documentation Completeness

import requests
import json
URL = 'https://api.eidy.cloud/v1/chat/completions'
EIDY_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

headers = {'content-type': 'application/json', 'Authorization': 'Bearer '+ EIDY_API_KEY}
message = [{
    'role': 'user',
    'content': """
Evaluate the completeness of the submitted documentation for expense claims. Ensure that all required forms, approvals, and signatures are present and correctly filled out.
    ==================
	Provider: DEF Medical Center
	Claim Date: February 10, 2019
	Documents: Expense claim form, service log, patient consent form
	Missing Document: Approval letter
	Finding: The approval letter is missing. The claim cannot be processed until the complete documentation is submitted.
    ==================
    """
}]
data = {
"messages" : message,
"model" : 'eidy',
"max_tokens" : 1024,
"temperature" : 0.1,
"stream" : False
}
res = requests.post(URL, headers=headers ,data=json.dumps(data))

response

{'id': '1719496028.953363-eidy',
 'choices': [{'finish_reason': 'stop',
   'index': 0,
   'message': {'content': 'Based on the information provided, the submitted documentation for the expense claim is incomplete. The required approval letter is missing. Therefore, the claim cannot be processed until the complete documentation, including the approval letter, is submitted.',
    'role': 'assistant'},
   'text': 'Based on the information provided, the submitted documentation for the expense claim is incomplete. The required approval letter is missing. Therefore, the claim cannot be processed until the complete documentation, including the approval letter, is submitted.'}],
 'created': 1719496028.953363,
 'model': 'eidy',
 'object': 'chat.completion',
 'usage': {'completion_tokens': 43, 'prompt_tokens': 209, 'total_tokens': 252}}

Service Provision Verification

import requests
import json
URL = 'https://api.eidy.cloud/v1/chat/completions'
EIDY_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

headers = {'content-type': 'application/json', 'Authorization': 'Bearer '+ EIDY_API_KEY}
message = [{
    'role': 'user',
    'content': """
Verify that the services billed in the expense claims were actually provided to the patients. Cross-reference the service logs and patient records to confirm the dates and details of the services.
    ==================
	Patient ID: 67890
	Service Date: March 5, 2019
	Service Provided: Ultrasound
	Service Log: Matches patient record
	Finding: The service was provided as claimed. Dates and details are consistent across documents.
    ==================
    """
}]
data = {
"messages" : message,
"model" : 'eidy',
"max_tokens" : 1024,
"temperature" : 0.1,
"stream" : False
}
res = requests.post(URL, headers=headers ,data=json.dumps(data))

response

{'id': '1719496115.3759995-eidy',
 'choices': [{'finish_reason': 'stop',
   'index': 0,
   'message': {'content': 'Based on the information provided, the service billed in the expense claim for Patient ID 67890 on March 5, 2019, matches the service log and patient records. The ultrasound service was provided as claimed, and the dates and details are consistent across all documents. Therefore, the service billed is valid and can be processed for reimbursement.',
    'role': 'assistant'},
   'text': 'Based on the information provided, the service billed in the expense claim for Patient ID 67890 on March 5, 2019, matches the service log and patient records. The ultrasound service was provided as claimed, and the dates and details are consistent across all documents. Therefore, the service billed is valid and can be processed for reimbursement.'}],
 'created': 1719496115.3759995,
 'model': 'eidy',
 'object': 'chat.completion',
 'usage': {'completion_tokens': 69, 'prompt_tokens': 204, 'total_tokens': 273}}

Signature and Approval Verification

import requests
import json
URL = 'https://api.eidy.cloud/v1/chat/completions'
EIDY_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

headers = {'content-type': 'application/json', 'Authorization': 'Bearer '+ EIDY_API_KEY}
message = [{
    'role': 'user',
    'content': """
Ensure the authenticity of the signatures and stamps on the expense claim documents. Check for the presence of necessary approvals from authorized personnel.
    ==================
  Provider: GHI Clinic
	Claim Form: Signed by Dr. John Doe
	Approval Letter: Stamped by NHSO
	Finding: All signatures and stamps are authentic. Necessary approvals are present.
    ==================
    """
}]
data = {
"messages" : message,
"model" : 'eidy',
"max_tokens" : 1024,
"temperature" : 0.1,
"stream" : False
}
res = requests.post(URL, headers=headers ,data=json.dumps(data))

response

{'id': '1719496210.8316877-eidy',
 'choices': [{'finish_reason': 'stop',
   'index': 0,
   'message': {'content': 'Based on the provided information, the healthcare claim for the GHI Clinic appears to be valid. The signatures on the claim form by Dr. John Doe and the stamp on the approval letter from NHSO are authentic, and all necessary approvals are present. Therefore, this claim can be processed further.',
    'role': 'assistant'},
   'text': 'Based on the provided information, the healthcare claim for the GHI Clinic appears to be valid. The signatures on the claim form by Dr. John Doe and the stamp on the approval letter from NHSO are authentic, and all necessary approvals are present. Therefore, this claim can be processed further.'}],
 'created': 1719496210.8316877,
 'model': 'eidy',
 'object': 'chat.completion',
 'usage': {'completion_tokens': 59, 'prompt_tokens': 188, 'total_tokens': 247}}

Consistancy Check

import requests
import json
URL = 'https://api.eidy.cloud/v1/chat/completions'
EIDY_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

headers = {'content-type': 'application/json', 'Authorization': 'Bearer '+ EIDY_API_KEY}
message = [{
    'role': 'user',
    'content': """
Check for consistency across all submitted documents. Ensure that there is no conflicting information between the medical records, expense claims, and service logs.
    ==================
  Provider: JKL Health Services
	Patient ID: 11223
	Service Date: April 20, 2019
	Medical Record: Blood Test
	Expense Claim: Ultrasound
	Finding: Inconsistency detected. The medical record shows a blood test, but the expense claim is for an ultrasound. Recommend correction and resubmission.
    ==================
    """
}]
data = {
"messages" : message,
"model" : 'eidy',
"max_tokens" : 1024,
"temperature" : 0.1,
"stream" : False
}
res = requests.post(URL, headers=headers ,data=json.dumps(data))

response

{'id': '1719496309.8787956-eidy',
 'choices': [{'finish_reason': 'stop',
   'index': 0,
   'message': {'content': 'Based on the information provided, there is an inconsistency between the medical record and the expense claim for the patient with ID 11223 at JKL Health Services on April 20, 2019. The medical record indicates a blood test was performed, while the expense claim is for an ultrasound.  To resolve this issue, it is recommended to correct the inconsistency and resubmit the claim. This can be done by ensuring that the expense claim accurately reflects the services rendered as per the medical record. In this case, if an ultrasound was indeed performed, the expense claim should be updated to reflect that.  It is important to ensure accuracy and consistency in documentation to avoid any delays or issues with reimbursement or patient care.',
    'role': 'assistant'},
   'text': 'Based on the information provided, there is an inconsistency between the medical record and the expense claim for the patient with ID 11223 at JKL Health Services on April 20, 2019. The medical record indicates a blood test was performed, while the expense claim is for an ultrasound.  To resolve this issue, it is recommended to correct the inconsistency and resubmit the claim. This can be done by ensuring that the expense claim accurately reflects the services rendered as per the medical record. In this case, if an ultrasound was indeed performed, the expense claim should be updated to reflect that.  It is important to ensure accuracy and consistency in documentation to avoid any delays or issues with reimbursement or patient care.'}],
 'created': 1719496309.8787956,
 'model': 'eidy',
 'object': 'chat.completion',
 'usage': {'completion_tokens': 144,
  'prompt_tokens': 221,
  'total_tokens': 365}}

Last updated