{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Setup" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Load the API key and libaries." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from src.LLM_Evaluation import GPT\n", "import pandas as pd" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Load the Constants" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "PATH = 'data/Portuguese_test.csv'\n", "MODEL = \"gpt-3.5-turbo\"\n", "TEMPERATURE = 0.3\n", "N_REPETITIONS = 3\n", "REASONING = True\n", "LANGUAGES = ['english', 'portuguese']\n", "MAX_TOKENS = 500" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Create an Instance of the model" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "model = GPT(model=MODEL, temperature=TEMPERATURE, n_repetitions=N_REPETITIONS, reasoning=REASONING, languages=LANGUAGES, path=PATH, max_tokens=MAX_TOKENS)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### See characteristics of the model" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "gpt-3.5-turbo\n" ] } ], "source": [ "print(model.model)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", " You will be provided with medical queries in this languages: english, portuguese. The medical query will be delimited with #### characters.\n", " Each question will have 4 possible answer options. provide the letter with the answer and a short sentence answering why the answer was selected. \n", "\n", " Provide your output in json format with the keys: response, reasoning.\n", "\n", " Responses: A, B, C, D.\n", " \n" ] } ], "source": [ "print(model.system_message)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Test the model" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "question = \"\"\"What is the primary function of the cornea in the human eye?\n", "A) Refracting light onto the retina\n", "B) Producing aqueous humor\n", "C) Regulating pupil size\n", "D) Transmitting visual signals to the brain\"\"\"" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Response:\n", "{'response': 'A', 'reasoning': 'The primary function of the cornea in the human eye is to refract light onto the retina. This is because the cornea is the clear, outermost layer of the eye that helps to focus light onto the retina, which then sends visual signals to the brain.'}\n", "Answer: A\n", "Reasoning: The primary function of the cornea in the human eye is to refract light onto the retina. This is because the cornea is the clear, outermost layer of the eye that helps to focus light onto the retina, which then sends visual signals to the brain.\n" ] } ], "source": [ "response = model.get_completion_from_messages(question)\n", "\n", "print('Response:')\n", "print(response)\n", "\n", "print(f'Answer: {response[\"response\"]}')\n", "print(f'Reasoning: {response[\"reasoning\"]}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Modify the model" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", " You will be provided with medical queries in this languages: english, portuguese. The medical query will be delimited with #### characters.\n", " Each question will have 4 possible answer options. provide the letter with the answer and a short sentence answering why the answer was selected. Also print the area of the medicine to which the question refers to.\n", "\n", " Provide your output in json format with the keys: response, reasoning, area.\n", "\n", " Responses: A, B, C, D.\n", " \n" ] } ], "source": [ "model.add_extra_message('Also print the area of the medicine to which the question refers to.')\n", "model.add_output_key('area')\n", "print(model.system_message)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Response:\n", "{'response': 'A', 'reasoning': 'The primary function of the cornea in the human eye is to refract light onto the retina. This helps to focus the incoming light and contribute to clear vision.', 'area': 'Ophthalmology'}\n", "Area: Ophthalmology\n", "Answer: A\n", "Reasoning: The primary function of the cornea in the human eye is to refract light onto the retina. This helps to focus the incoming light and contribute to clear vision.\n" ] } ], "source": [ "response = model.get_completion_from_messages(question)\n", "\n", "print('Response:')\n", "print(response)\n", "\n", "print(f'Area: {response[\"area\"]}')\n", "print(f'Answer: {response[\"response\"]}')\n", "print(f'Reasoning: {response[\"reasoning\"]}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Run multiple experiments using the csv file" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "**************************************************\n", "Question 1: \n", "Language: english\n", "Question: \n", "In which ocular region are caliciform cells physiologically found?\n", "a) Cornea.\n", "b) Corneoscleral limbus.\n", "c) Gray line.\n", "d) Semilunar fold.\n", "Test #0: \n", "{'response': 'b', 'reasoning': 'The correct answer is b) Corneoscleral limbus. Caliciform cells are found in the corneoscleral limbus, which is the transitional zone between the cornea and the sclera.', 'area': 'Ophthalmology'}\n", "Test #1: \n", "{'response': 'b', 'reasoning': 'The correct answer is b) Corneoscleral limbus. Caliciform cells are found in the corneoscleral limbus, which is the transition zone between the cornea and the sclera.', 'area': 'Ophthalmology'}\n", "Test #2: \n", "{'response': 'b', 'reasoning': 'The correct answer is b) Corneoscleral limbus. Caliciform cells are found in the corneoscleral limbus, which is the transitional zone between the cornea and the sclera.', 'area': 'Ophthalmology'}\n", "Language: portuguese\n", "Question: \n", "Em qual região ocular células caliciformes são fisiologicamente encontradas?\n", "a)Córnea.\n", "b)Limbo corneoescleral.\n", "c)Linha cinzenta.\n", "d)Prega semilunar.\n", "Test #0: \n", "{'response': 'c', 'reasoning': 'As células caliciformes são encontradas na linha cinzenta.', 'area': 'Oftalmologia'}\n", "Test #1: \n", "{'response': 'c', 'reasoning': 'As células caliciformes são fisiologicamente encontradas na linha cinzenta.', 'area': 'Oftalmologia'}\n", "Test #2: \n", "{'response': 'c', 'reasoning': 'As células caliciformes são encontradas na linha cinzenta.', 'area': 'Oftalmologia'}\n", "**************************************************\n", "**************************************************\n", "Question 2: \n", "Language: english\n", "Question: \n", "Mark the alternative that best correlates the histological characteristics with the respective ocular tissues:\n", "\n", "I. Monolayer of cells tightly joined together by junctional complexes.\n", "II. Parallel and regular striations observed under optical microscopy, perpendicular to the epithelium.\n", "III. It contains bipolar cells, amacrine cells, horizontal cells and Muller cells.\n", "IV. It contains magnocellular, parvocellular and coniocellular cells.\n", "\n", "A. Photoreceptors.\n", "B. Retinal pigmented epithelium.\n", "C. Retinal ganglionic layer.\n", "D. Inner nuclear layer.\n", "Test #0: \n", "{'response': 'C', 'reasoning': 'The histological characteristics described in options III match the retinal ganglionic layer, which contains bipolar cells, amacrine cells, horizontal cells, and Muller cells.', 'area': 'Ophthalmology'}\n", "Test #1: \n", "{'response': 'C', 'reasoning': 'The histological characteristics described in options III and IV are consistent with the retinal ganglionic layer, which contains bipolar cells, amacrine cells, horizontal cells, Muller cells, magnocellular cells, parvocellular cells, and coniocellular cells.', 'area': 'Ophthalmology'}\n", "Test #2: \n", "{'response': 'C', 'reasoning': 'The histological characteristics described in option III, including the presence of bipolar cells, amacrine cells, horizontal cells, and Muller cells, are consistent with the retinal ganglionic layer.', 'area': 'Ophthalmology'}\n", "Language: portuguese\n", "Question: \n", "Assinale a alternativa que melhor correlaciona as características histológicas com os respectivos tecidos oculares:\n", "\n", "I. Monocamada de células fortemente unidas por complexos juncionais.\n", "II. Estriações paralelas e regulares observadas à microscopia óptica, perpendiculares ao epitélio.\n", "III. Contém células bipolares, células amácrinas, células horizontais e células de Muller.\n", "IV. Contém células magnocelulares, parvocelulares e coniocelulares.\n", "\n", "A. Fotorreceptores.\n", "B. Epitélio pigmentado da pigmentado da retina.\n", "C. Camada ganglionar retiniana.\n", "D. Camada nuclear interna.\n", "Test #0: \n", "{'response': 'C', 'reasoning': 'A camada ganglionar retiniana é caracterizada por conter células bipolares, células amácrinas, células horizontais e células de Muller.', 'area': 'Oftalmologia'}\n", "Test #1: \n", "{'response': 'B', 'reasoning': 'A alternativa B é a correta, pois descreve as características histológicas do epitélio pigmentado da retina, que inclui células fortemente unidas por complexos juncionais e estriações paralelas e regulares observadas à microscopia óptica, perpendiculares ao epitélio.', 'area': 'Oftalmologia'}\n", "Test #2: \n", "{'response': 'C', 'reasoning': 'A descrição das características histológicas corresponde à camada ganglionar retiniana, que contém células bipolares, células amácrinas, células horizontais e células de Muller.', 'area': 'Oftalmologia'}\n", "**************************************************\n", "**************************************************\n", "Question 3: \n", "Language: english\n", "Question: \n", "Order the three cell names found in the corneal epithelium, starting with the most superficial, followed by the intermediate and the deep.\n", "a) Flat, wing, basal.\n", "b) wing, basal, flat.\n", "c) Basal, flat, wing.\n", "d) wing, flat, basal.\n", "Test #0: \n", "{'response': 'c', 'reasoning': 'The correct order of the three cell names found in the corneal epithelium, starting with the most superficial, followed by the intermediate and the deep, is basal, flat, wing.', 'area': 'Ophthalmology'}\n", "Test #1: \n", "{'response': 'c', 'reasoning': 'The correct order of the three cell names found in the corneal epithelium, starting with the most superficial, followed by the intermediate and the deep, is basal, flat, wing.', 'area': 'Ophthalmology'}\n", "Test #2: \n", "{'response': 'c', 'reasoning': 'The correct order of the three cell names found in the corneal epithelium, starting with the most superficial, followed by the intermediate and the deep, is basal, flat, wing.', 'area': 'Ophthalmology'}\n", "Language: portuguese\n", "Question: \n", "Ordene as três denominações celulares encontradas no epitélio da córnea, iniciando pelo mais superficial, seguido do intermediário e do profundo.\n", "a)Plana, alada, basal.\n", "b)Alada, basal, plana.\n", "c)Basal, plana, alada.\n", "d)Alada, plana, basal.\n", "Test #0: \n", "{'response': 'c', 'reasoning': 'A ordem correta das denominações celulares encontradas no epitélio da córnea é: basal, plana, alada. Portanto, a opção c é a correta.', 'area': 'Oftalmologia'}\n", "Test #1: \n", "{'response': 'c', 'reasoning': 'A ordem correta das três denominações celulares encontradas no epitélio da córnea é: basal, plana, alada.', 'area': 'Oftalmologia'}\n", "Test #2: \n", "{'response': 'c', 'reasoning': 'A resposta correta é a letra c) Basal, plana, alada. O epitélio da córnea é composto por três camadas celulares: a camada basal, a camada plana e a camada alada. A camada basal é a mais profunda, seguida pela camada plana e, por fim, a camada alada.', 'area': 'Oftalmologia'}\n", "**************************************************\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
IDyeartestthemesubthemeportugueseenglishanswerresponse_english_0reasoning_english_0...area_english_2response_portuguese_0reasoning_portuguese_0area_portuguese_0response_portuguese_1reasoning_portuguese_1area_portuguese_1response_portuguese_2reasoning_portuguese_2area_portuguese_2
012022Teórica IAnatomiacorneaEm qual região ocular células caliciformes são...In which ocular region are caliciform cells ph...DbThe correct answer is b) Corneoscleral limbus.......OphthalmologycAs células caliciformes são encontradas na lin...OftalmologiacAs células caliciformes são fisiologicamente e...OftalmologiacAs células caliciformes são encontradas na lin...Oftalmologia
122022Teórica IAnatomiaretinaAssinale a alternativa que melhor correlaciona...Mark the alternative that best correlates the ...BCThe histological characteristics described in ......OphthalmologyCA camada ganglionar retiniana é caracterizada ...OftalmologiaBA alternativa B é a correta, pois descreve as ...OftalmologiaCA descrição das características histológicas c...Oftalmologia
232022Teórica IAnatomiacorneaOrdene as três denominações celulares encontra...Order the three cell names found in the cornea...AcThe correct order of the three cell names foun......OphthalmologycA ordem correta das denominações celulares enc...OftalmologiacA ordem correta das três denominações celulare...OftalmologiacA resposta correta é a letra c) Basal, plana, ...Oftalmologia
\n", "

3 rows × 26 columns

\n", "
" ], "text/plain": [ " ID year test theme subtheme \\\n", "0 1 2022 Teórica I Anatomia cornea \n", "1 2 2022 Teórica I Anatomia retina \n", "2 3 2022 Teórica I Anatomia cornea \n", "\n", " portuguese \\\n", "0 Em qual região ocular células caliciformes são... \n", "1 Assinale a alternativa que melhor correlaciona... \n", "2 Ordene as três denominações celulares encontra... \n", "\n", " english answer \\\n", "0 In which ocular region are caliciform cells ph... D \n", "1 Mark the alternative that best correlates the ... B \n", "2 Order the three cell names found in the cornea... A \n", "\n", " response_english_0 reasoning_english_0 ... \\\n", "0 b The correct answer is b) Corneoscleral limbus.... ... \n", "1 C The histological characteristics described in ... ... \n", "2 c The correct order of the three cell names foun... ... \n", "\n", " area_english_2 response_portuguese_0 \\\n", "0 Ophthalmology c \n", "1 Ophthalmology C \n", "2 Ophthalmology c \n", "\n", " reasoning_portuguese_0 area_portuguese_0 \\\n", "0 As células caliciformes são encontradas na lin... Oftalmologia \n", "1 A camada ganglionar retiniana é caracterizada ... Oftalmologia \n", "2 A ordem correta das denominações celulares enc... Oftalmologia \n", "\n", " response_portuguese_1 reasoning_portuguese_1 \\\n", "0 c As células caliciformes são fisiologicamente e... \n", "1 B A alternativa B é a correta, pois descreve as ... \n", "2 c A ordem correta das três denominações celulare... \n", "\n", " area_portuguese_1 response_portuguese_2 \\\n", "0 Oftalmologia c \n", "1 Oftalmologia C \n", "2 Oftalmologia c \n", "\n", " reasoning_portuguese_2 area_portuguese_2 \n", "0 As células caliciformes são encontradas na lin... Oftalmologia \n", "1 A descrição das características histológicas c... Oftalmologia \n", "2 A resposta correta é a letra c) Basal, plana, ... Oftalmologia \n", "\n", "[3 rows x 26 columns]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = model.llm_language_evaluation(save=False)\n", "df" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "**************************************************\n", "Question 1: \n", "Language: english\n", "Question: \n", "In which ocular region are caliciform cells physiologically found?\n", "a) Cornea.\n", "b) Corneoscleral limbus.\n", "c) Gray line.\n", "d) Semilunar fold.\n", "Test #0: \n", "{'response': 'b', 'area': 'Ophthalmology'}\n", "Test #1: \n", "{'response': 'b', 'area': 'Ophthalmology'}\n", "Test #2: \n", "{'response': 'b', 'area': 'Ophthalmology'}\n", "Language: portuguese\n", "Question: \n", "Em qual região ocular células caliciformes são fisiologicamente encontradas?\n", "a)Córnea.\n", "b)Limbo corneoescleral.\n", "c)Linha cinzenta.\n", "d)Prega semilunar.\n", "Test #0: \n", "{'response': 'c', 'area': 'Oftalmologia'}\n", "Test #1: \n", "{'response': 'c', 'area': 'Oftalmologia'}\n", "Test #2: \n", "{'response': 'c', 'area': 'Oftalmologia'}\n", "**************************************************\n", "**************************************************\n", "Question 2: \n", "Language: english\n", "Question: \n", "Mark the alternative that best correlates the histological characteristics with the respective ocular tissues:\n", "\n", "I. Monolayer of cells tightly joined together by junctional complexes.\n", "II. Parallel and regular striations observed under optical microscopy, perpendicular to the epithelium.\n", "III. It contains bipolar cells, amacrine cells, horizontal cells and Muller cells.\n", "IV. It contains magnocellular, parvocellular and coniocellular cells.\n", "\n", "A. Photoreceptors.\n", "B. Retinal pigmented epithelium.\n", "C. Retinal ganglionic layer.\n", "D. Inner nuclear layer.\n", "Test #0: \n", "{'response': 'C', 'area': 'Ophthalmology'}\n", "Test #1: \n", "{'response': 'C', 'area': 'Ophthalmology'}\n", "Test #2: \n", "{'response': 'C', 'area': 'Retina'}\n", "Language: portuguese\n", "Question: \n", "Assinale a alternativa que melhor correlaciona as características histológicas com os respectivos tecidos oculares:\n", "\n", "I. Monocamada de células fortemente unidas por complexos juncionais.\n", "II. Estriações paralelas e regulares observadas à microscopia óptica, perpendiculares ao epitélio.\n", "III. Contém células bipolares, células amácrinas, células horizontais e células de Muller.\n", "IV. Contém células magnocelulares, parvocelulares e coniocelulares.\n", "\n", "A. Fotorreceptores.\n", "B. Epitélio pigmentado da pigmentado da retina.\n", "C. Camada ganglionar retiniana.\n", "D. Camada nuclear interna.\n", "Test #0: \n", "{'response': 'C', 'area': 'Oftalmologia'}\n", "Test #1: \n", "{'response': 'B', 'area': 'Oftalmologia'}\n", "Test #2: \n", "{'response': 'C', 'area': 'Oftalmologia'}\n", "**************************************************\n", "**************************************************\n", "Question 3: \n", "Language: english\n", "Question: \n", "Order the three cell names found in the corneal epithelium, starting with the most superficial, followed by the intermediate and the deep.\n", "a) Flat, wing, basal.\n", "b) wing, basal, flat.\n", "c) Basal, flat, wing.\n", "d) wing, flat, basal.\n", "Test #0: \n", "{'response': 'c', 'area': 'Ophthalmology'}\n", "Test #1: \n", "{'response': 'c', 'area': 'Ophthalmology'}\n", "Test #2: \n", "{'response': 'c', 'area': 'Ophthalmology'}\n", "Language: portuguese\n", "Question: \n", "Ordene as três denominações celulares encontradas no epitélio da córnea, iniciando pelo mais superficial, seguido do intermediário e do profundo.\n", "a)Plana, alada, basal.\n", "b)Alada, basal, plana.\n", "c)Basal, plana, alada.\n", "d)Alada, plana, basal.\n", "Test #0: \n", "{'response': 'c', 'area': 'Oftalmologia'}\n", "Test #1: \n", "{'response': 'c', 'area': 'Oftalmologia'}\n", "Test #2: \n", "{'response': 'c', 'area': 'Oftalmologia'}\n", "**************************************************\n" ] }, { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
IDyeartestthemesubthemeportugueseenglishanswerresponse_english_0area_english_0response_english_1area_english_1response_english_2area_english_2response_portuguese_0area_portuguese_0response_portuguese_1area_portuguese_1response_portuguese_2area_portuguese_2
012022Teórica IAnatomiacorneaEm qual região ocular células caliciformes são...In which ocular region are caliciform cells ph...DbOphthalmologybOphthalmologybOphthalmologycOftalmologiacOftalmologiacOftalmologia
122022Teórica IAnatomiaretinaAssinale a alternativa que melhor correlaciona...Mark the alternative that best correlates the ...BCOphthalmologyCOphthalmologyCRetinaCOftalmologiaBOftalmologiaCOftalmologia
232022Teórica IAnatomiacorneaOrdene as três denominações celulares encontra...Order the three cell names found in the cornea...AcOphthalmologycOphthalmologycOphthalmologycOftalmologiacOftalmologiacOftalmologia
\n", "
" ], "text/plain": [ " ID year test theme subtheme \\\n", "0 1 2022 Teórica I Anatomia cornea \n", "1 2 2022 Teórica I Anatomia retina \n", "2 3 2022 Teórica I Anatomia cornea \n", "\n", " portuguese \\\n", "0 Em qual região ocular células caliciformes são... \n", "1 Assinale a alternativa que melhor correlaciona... \n", "2 Ordene as três denominações celulares encontra... \n", "\n", " english answer \\\n", "0 In which ocular region are caliciform cells ph... D \n", "1 Mark the alternative that best correlates the ... B \n", "2 Order the three cell names found in the cornea... A \n", "\n", " response_english_0 area_english_0 response_english_1 area_english_1 \\\n", "0 b Ophthalmology b Ophthalmology \n", "1 C Ophthalmology C Ophthalmology \n", "2 c Ophthalmology c Ophthalmology \n", "\n", " response_english_2 area_english_2 response_portuguese_0 area_portuguese_0 \\\n", "0 b Ophthalmology c Oftalmologia \n", "1 C Retina C Oftalmologia \n", "2 c Ophthalmology c Oftalmologia \n", "\n", " response_portuguese_1 area_portuguese_1 response_portuguese_2 \\\n", "0 c Oftalmologia c \n", "1 B Oftalmologia C \n", "2 c Oftalmologia c \n", "\n", " area_portuguese_2 \n", "0 Oftalmologia \n", "1 Oftalmologia \n", "2 Oftalmologia " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "### Suggestion:\n", "# When running multiple experiments, it's recommended to change the value of REASONING to False, since running the reasoning multiple times can be time consuming.\n", "model.change_reasoning(False)\n", "\n", "df = model.llm_language_evaluation(save=False)\n", "df" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python [conda env:nlp_bias_vpython=3_8_15]", "language": "python", "name": "conda-env-nlp_bias_vpython_3_8_15-py" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.15" } }, "nbformat": 4, "nbformat_minor": 4 }