"This shows an example of loading a prompt along with an OutputParser from a file."
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "500dab26",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{\r\n",
" \"input_variables\": [\r\n",
" \"question\",\r\n",
" \"student_answer\"\r\n",
" ],\r\n",
" \"output_parser\": {\r\n",
" \"regex\": \"(.*?)\\\\nScore: (.*)\",\r\n",
" \"output_keys\": [\r\n",
" \"answer\",\r\n",
" \"score\"\r\n",
" ],\r\n",
" \"default_output_key\": null,\r\n",
" \"_type\": \"regex_parser\"\r\n",
" },\r\n",
" \"partial_variables\": {},\r\n",
" \"template\": \"Given the following question and student answer, provide a correct answer and score the student answer.\\nQuestion: {question}\\nStudent Answer: {student_answer}\\nCorrect Answer:\",\r\n",
"template":"Given the following question and student answer, provide a correct answer and score the student answer.\nQuestion: {question}\nStudent Answer: {student_answer}\nCorrect Answer:",