From 2206a6dfa4bb7dc8a0352f04ba1be6c096cdb5ac Mon Sep 17 00:00:00 2001 From: Philippe Moussalli Date: Tue, 19 Dec 2023 10:39:51 +0100 Subject: [PATCH] Change default model to gpt3.5 turbo (#45) --- src/evaluation.ipynb | 4 ++-- src/pipeline_eval.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evaluation.ipynb b/src/evaluation.ipynb index 53f8bbc..6a0a92d 100644 --- a/src/evaluation.ipynb +++ b/src/evaluation.ipynb @@ -368,7 +368,7 @@ " \"retrieval_top_k\": 2,\n", " \"evaluation_module\": \"langchain.llms\",\n", " \"evaluation_llm\": \"OpenAI\",\n", - " \"evaluation_llm_kwargs\": {\"openai_api_key\": os.environ[\"OPENAI_KEY\"]}, # TODO: Update with your key or use a different model\n", + " \"evaluation_llm_kwargs\": {\"openai_api_key\": os.environ[\"OPENAI_KEY\"], model_name : \"gpt-3.5-turbo\"}, # TODO: Update with your key or use a different model\n", " \"evaluation_metrics\": [\"context_precision\", \"context_relevancy\"]\n", "}\n", "\n", @@ -495,7 +495,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.9.13" + "version": "3.10.12" } }, "nbformat": 4, diff --git a/src/pipeline_eval.py b/src/pipeline_eval.py index 707b9ca..fa4bee5 100644 --- a/src/pipeline_eval.py +++ b/src/pipeline_eval.py @@ -17,7 +17,7 @@ def create_pipeline( retrieval_top_k: int = 3, evaluation_module: str = "langchain.llms", evaluation_llm: str = "OpenAI", - evaluation_llm_kwargs: dict = {}, + evaluation_llm_kwargs: dict = {"model_name": "gpt-3.5-turbo"}, evaluation_metrics: list = ["context_precision", "context_relevancy"], ): """Create a Fondant pipeline based on the provided arguments."""