author worked on before college were writing and programming.',     'result': ' Writing and programming.'}Next, we can use a language model to score them programaticallyfrom langchain.evaluation.qa import QAEvalChainllm = OpenAI(temperature=0)eval_chain = QAEvalChain.from_llm(llm)graded_outputs = eval_chain.evaluate(    dataset, predictions, question_key="question", prediction_key="result")We can add in the graded output to the predictions dict and then get a count of the grades.for i, prediction in enumerate(predictions):    prediction["grade"] = graded_outputs[i]["text"]from collections import CounterCounter([pred["grade"] for pred in predictions])    Counter({' CORRECT': 12, ' INCORRECT': 10})We can also filter the datapoints to the incorrect examples and look at them.incorrect = [pred for pred in predictions if pred["grade"] == " INCORRECT"]incorrect[0]    {'question': 'What did the author write their dissertation on?',     'answer': 'The author wrote their dissertation on applications of continuations.',     'result': ' The author does not mention what their dissertation was on, so it is not known.',     'grade': ' INCORRECT'}PreviousEvaluating an OpenAPI ChainNextQuestion Answering Benchmarking: State of the Union AddressLoading the dataSetting up a chainMake a predictionMake many predictionsEvaluate performanceCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright Â© 2023 LangChain, Inc.