Created
December 17, 2023 18:24
-
-
Save shahules786/06c740ae53d4bb50ac3f3d537d36e587 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nli_prompt = RagasPrompt( | |
instruction="""Natural language inference. Use only "Yes" (1) or "No" (0) as a binary verdict.""", | |
examples=[ | |
{ | |
"Context":"""John is a student at XYZ University. He is pursuing a degree in Computer Science. He is enrolled in several courses this semester, including Data Structures, Algorithms, and Database Management. John is a diligent student and spends a significant amount of time studying and completing assignments. He often stays late in the library to work on his projects. | |
statement_1: John is majoring in Biology. | |
statement_2: John is taking a course on Artificial Intelligence. | |
statement_3: John is a dedicated student. | |
statement_4: John has a part-time job.""", | |
"Answer":"""[ | |
{ | |
"statement_1": "John is majoring in Biology.", | |
"reason": "John's major is explicitly mentioned as Computer Science. There is no information suggesting he is majoring in Biology.", | |
"verdict": "0" | |
}, | |
{ | |
"statement_2": "John is taking a course on Artificial Intelligence.", | |
"reason": "The context mentions the courses John is currently enrolled in, and Artificial Intelligence is not mentioned. Therefore, it cannot be deduced that John is taking a course on AI.", | |
"verdict": "0" | |
}, | |
{ | |
"statement_3": "John is a dedicated student.", | |
"reason": "The context states that he spends a significant amount of time studying and completing assignments. Additionally, it mentions that he often stays late in the library to work on his projects, which implies dedication.", | |
"verdict": "1" | |
}, | |
{ | |
"statement_4": "John has a part-time job.", | |
"reason": "There is no information given in the context about John having a part-time job.", | |
"verdict": "0" | |
}] | |
""" | |
} | |
], | |
input_keys=["Context"], | |
output_key="Answer", | |
output_type="JSON" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment