from langchain import PromptTemplate template = ''' The question: "{question}" The schema: "{schema}" The answer should be a SQL to the question. We want to compare the answers. The answer A: "{gold_answer}". The answer B: "{pred_answer}". Do you think the answers A and B are the same? Please start with 'TRUE.' or 'FALSE.'. Then give some evidence to support the conclusion. ''' prompt_template = PromptTemplate(input_variables=[ "question", "schema", "gold_answer", "pred_answer"], template=template) if __name__ == "__main__": print(prompt_template.format(question="List each charge type and its amount.", schema='''Table Breeds, columns = [breed_code:text, breed_name:text] Table Charges, columns = [charge_id:number, charge_type:text, charge_amount:number] Table Sizes, columns = [size_code:text, size_description:text] Table Treatment_Types, columns = [treatment_type_code:text, treatment_type_description:text] Table Owners, columns = [owner_id:number, first_name:text, last_name:text, street:text, city:text, state:text, zip_code:text, email_address:text, home_phone:text, cell_number:text] Table Dogs, columns = [dog_id:number, owner_id:number, abandoned_yn:text, breed_code:text, size_code:text, name:text, age:text, date_of_birth:time, gender:text, weight:text, date_arrived:time, date_adopted:time, date_departed:time] Table Professionals, columns = [professional_id:number, role_code:text, first_name:text, street:text, city:text, state:text, zip_code:text, last_name:text, email_address:text, home_phone:text, cell_number:text] Table Treatments, columns = [treatment_id:number, dog_id:number, professional_id:number, treatment_type_code:text, date_of_treatment:time, cost_of_treatment:number] Relation Dogs.owner_id = Owners.owner_id Relation Dogs.owner_id = Owners.owner_id Relation Dogs.size_code = Sizes.size_code Relation Dogs.breed_code = Breeds.breed_code Relation Treatments.dog_id = Dogs.dog_id Relation Treatments.professional_id = Professionals.professional_id Relation Treatments.treatment_type_code = Treatment_Types.treatment_type_code ''', gold_answer="SELECT charge_type , charge_amount FROM Charges", pred_answer="SELECT charge_type, charge_amount FROM Charges"))