{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Welcome to the Second Lab - Week 1, Day 3\n", "\n", "Today we will work with lots of models! This is a way to get comfortable with APIs." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "

Important point - please read

\n", " The way I collaborate with you may be different to other courses you've taken. I prefer not to type code while you watch. Rather, I execute Jupyter Labs, like this, and give you an intuition for what's going on. My suggestion is that you carefully execute this yourself, after watching the lecture. Add print statements to understand what's going on, and then come up with your own variations.

If you have time, I'd love it if you submit a PR for changes in the community_contributions folder - instructions in the resources. Also, if you have a Github account, use this to showcase your variations. Not only is this essential practice, but it demonstrates your skills to others, including perhaps future clients or employers...\n", "
\n", "
" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Start with imports - ask ChatGPT to explain any package that you don't know\n", "\n", "import os\n", "import json\n", "from dotenv import load_dotenv\n", "from openai import OpenAI\n", "from anthropic import Anthropic\n", "from IPython.display import Markdown, display" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Always remember to do this!\n", "load_dotenv(override=True)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "OpenAI API Key exists and begins sk-proj-\n", "Anthropic API Key exists and begins sk-ant-\n", "Google API Key exists and begins AI\n", "DeepSeek API Key exists and begins sk-\n", "Groq API Key exists and begins gsk_\n" ] } ], "source": [ "# Print the key prefixes to help with any debugging\n", "\n", "openai_api_key = os.getenv('OPENAI_API_KEY')\n", "anthropic_api_key = os.getenv('ANTHROPIC_API_KEY')\n", "google_api_key = os.getenv('GOOGLE_API_KEY')\n", "deepseek_api_key = os.getenv('DEEPSEEK_API_KEY')\n", "groq_api_key = os.getenv('GROQ_API_KEY')\n", "\n", "if openai_api_key:\n", " print(f\"OpenAI API Key exists and begins {openai_api_key[:8]}\")\n", "else:\n", " print(\"OpenAI API Key not set\")\n", " \n", "if anthropic_api_key:\n", " print(f\"Anthropic API Key exists and begins {anthropic_api_key[:7]}\")\n", "else:\n", " print(\"Anthropic API Key not set (and this is optional)\")\n", "\n", "if google_api_key:\n", " print(f\"Google API Key exists and begins {google_api_key[:2]}\")\n", "else:\n", " print(\"Google API Key not set (and this is optional)\")\n", "\n", "if deepseek_api_key:\n", " print(f\"DeepSeek API Key exists and begins {deepseek_api_key[:3]}\")\n", "else:\n", " print(\"DeepSeek API Key not set (and this is optional)\")\n", "\n", "if groq_api_key:\n", " print(f\"Groq API Key exists and begins {groq_api_key[:4]}\")\n", "else:\n", " print(\"Groq API Key not set (and this is optional)\")" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "request = \"Please come up with a challenging, nuanced question that I can ask a number of LLMs to evaluate their intelligence. \"\n", "request += \"Answer only with the question, no explanation.\"\n", "messages = [{\"role\": \"user\", \"content\": request}]" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[{'role': 'user',\n", " 'content': 'Please come up with a challenging, nuanced question that I can ask a number of LLMs to evaluate their intelligence. Answer only with the question, no explanation.'}]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "messages" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "How would you assess the ethical implications of deploying artificial general intelligence in sectors where decisions directly impact human lives, and what frameworks would you propose to mitigate potential risks while maximizing benefits?\n" ] } ], "source": [ "openai = OpenAI()\n", "response = openai.chat.completions.create(\n", " model=\"gpt-4o-mini\",\n", " messages=messages,\n", ")\n", "question = response.choices[0].message.content\n", "print(question)\n" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "competitors = []\n", "answers = []\n", "messages = [{\"role\": \"user\", \"content\": question}]" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors such as healthcare, criminal justice, finance, and autonomous systems necessitates a multifaceted approach that considers not only the potential benefits but also the risks associated with decision-making processes that impact human lives. Here are key considerations and frameworks to mitigate risks while maximizing benefits:\n", "\n", "### Ethical Considerations\n", "\n", "1. **Autonomy and Agency**:\n", " - **Value of Human Oversight**: AGI systems should support, rather than replace, human decision-making. Maintaining human agency ensures that individuals can contest and appeal against decisions that affect them.\n", "\n", "2. **Bias and Fairness**:\n", " - **Data and Algorithmic Bias**: Given the potential biases in training data, it’s essential to implement strategies to mitigate forms of discrimination. Careful auditing of algorithms must be continuous, ensuring equitable outcomes across demographics.\n", "\n", "3. **Transparency and Explainability**:\n", " - **Understanding Decisions**: AGI systems should be transparent and provide explanations for how decisions are made. This fosters trust among users and ensures accountability.\n", "\n", "4. **Accountability**:\n", " - **Assigning Responsibility**: Establishing clear lines of accountability is crucial. There should be mechanisms in place to determine who is responsible for decisions made by AGI, especially when those decisions lead to negative outcomes.\n", "\n", "5. **Safety and Security**:\n", " - **Robustness Against Malfunction**: Ensuring that AGI systems are reliable and secure from malicious attacks minimizes risks to human life.\n", "\n", "6. **Impacts on Employment**:\n", " - **Re-skilling and Economic Displacement**: Evaluating the socio-economic implications of AGI deployment is necessary. Proactive measures should be taken to mitigate job loss and support workforce transitions.\n", "\n", "### Frameworks for Mitigating Risks\n", "\n", "1. **Ethics Advisory Boards**:\n", " - Establish boards comprising ethicists, domain experts, and community representatives to review AGI deployments and ensure alignment with ethical standards.\n", "\n", "2. **Regulatory Frameworks**:\n", " - Implement regulations that set standards for AGI development and use, ensuring compliance with ethical guidelines and promoting responsible practices.\n", "\n", "3. **Bias and Fairness Audits**:\n", " - Regularly conduct audits to assess data sources, algorithmic decisions, and outcomes to address bias and ensure fairness in AGI systems.\n", "\n", "4. **Human-in-the-Loop Systems**:\n", " - Incorporate human oversight in critical decision-making processes. Ensure that humans have the final say in situations where AGI recommendations may have significant real-world implications.\n", "\n", "5. **Public Engagement and Education**:\n", " - Engage with communities to educate them about AGI capabilities and limitations, fostering public discourse about its ethical implications and the importance of their input.\n", "\n", "6. **Impact Assessments**:\n", " - Before deployment, conduct comprehensive assessments to evaluate the potential impacts on various stakeholders, including unintended consequences.\n", "\n", "7. **Pilot Programs and Gradual Implementation**:\n", " - Utilize phased implementation strategies, starting with pilot programs that allow for adjustments based on real-world feedback before full-scale deployment.\n", "\n", "8. **Continuous Monitoring and Adaptation**:\n", " - Develop systems for continuous monitoring of AGI performance in real-time. Be prepared to adapt systems based on feedback and outcomes, ensuring that ethical standards evolve along with technology.\n", "\n", "9. **International Cooperation**:\n", " - Encourage collaboration among countries to create universally applicable ethical guidelines and regulatory measures, given the global nature of technology.\n", "\n", "### Conclusion\n", "\n", "The deployment of AGI in sectors affecting human lives presents both unprecedented opportunities and significant ethical challenges. By employing comprehensive assessments, establishing robust ethical frameworks, ensuring transparency, and maintaining human oversight, we can better navigate the complexities of AGI deployment to maximize benefits while minimizing risks. Continuous engagement with all stakeholders will also be vital for adaptively addressing the ethical implications of this transformative technology." ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# The API we know well\n", "\n", "model_name = \"gpt-4o-mini\"\n", "\n", "response = openai.chat.completions.create(model=model_name, messages=messages)\n", "answer = response.choices[0].message.content\n", "\n", "display(Markdown(answer))\n", "competitors.append(model_name)\n", "answers.append(answer)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "ename": "BadRequestError", "evalue": "Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.'}}", "output_type": "error", "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mBadRequestError\u001b[39m Traceback (most recent call last)", "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[9]\u001b[39m\u001b[32m, line 6\u001b[39m\n\u001b[32m 3\u001b[39m model_name = \u001b[33m\"\u001b[39m\u001b[33mclaude-3-7-sonnet-latest\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m 5\u001b[39m claude = Anthropic()\n\u001b[32m----> \u001b[39m\u001b[32m6\u001b[39m response = \u001b[43mclaude\u001b[49m\u001b[43m.\u001b[49m\u001b[43mmessages\u001b[49m\u001b[43m.\u001b[49m\u001b[43mcreate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m=\u001b[49m\u001b[43mmodel_name\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmessages\u001b[49m\u001b[43m=\u001b[49m\u001b[43mmessages\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmax_tokens\u001b[49m\u001b[43m=\u001b[49m\u001b[32;43m1000\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[32m 7\u001b[39m answer = response.content[\u001b[32m0\u001b[39m].text\n\u001b[32m 9\u001b[39m display(Markdown(answer))\n", "\u001b[36mFile \u001b[39m\u001b[32m~/Projects/agents/.venv/lib/python3.12/site-packages/anthropic/_utils/_utils.py:283\u001b[39m, in \u001b[36mrequired_args..inner..wrapper\u001b[39m\u001b[34m(*args, **kwargs)\u001b[39m\n\u001b[32m 281\u001b[39m msg = \u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33mMissing required argument: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mquote(missing[\u001b[32m0\u001b[39m])\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m\"\u001b[39m\n\u001b[32m 282\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mTypeError\u001b[39;00m(msg)\n\u001b[32m--> \u001b[39m\u001b[32m283\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[43m*\u001b[49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m*\u001b[49m\u001b[43m*\u001b[49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/Projects/agents/.venv/lib/python3.12/site-packages/anthropic/resources/messages/messages.py:978\u001b[39m, in \u001b[36mMessages.create\u001b[39m\u001b[34m(self, max_tokens, messages, model, metadata, service_tier, stop_sequences, stream, system, temperature, thinking, tool_choice, tools, top_k, top_p, extra_headers, extra_query, extra_body, timeout)\u001b[39m\n\u001b[32m 971\u001b[39m \u001b[38;5;28;01mif\u001b[39;00m model \u001b[38;5;129;01min\u001b[39;00m DEPRECATED_MODELS:\n\u001b[32m 972\u001b[39m warnings.warn(\n\u001b[32m 973\u001b[39m \u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33mThe model \u001b[39m\u001b[33m'\u001b[39m\u001b[38;5;132;01m{\u001b[39;00mmodel\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m'\u001b[39m\u001b[33m is deprecated and will reach end-of-life on \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mDEPRECATED_MODELS[model]\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m.\u001b[39m\u001b[38;5;130;01m\\n\u001b[39;00m\u001b[33mPlease migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.\u001b[39m\u001b[33m\"\u001b[39m,\n\u001b[32m 974\u001b[39m \u001b[38;5;167;01mDeprecationWarning\u001b[39;00m,\n\u001b[32m 975\u001b[39m stacklevel=\u001b[32m3\u001b[39m,\n\u001b[32m 976\u001b[39m )\n\u001b[32m--> \u001b[39m\u001b[32m978\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_post\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 979\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43m/v1/messages\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[32m 980\u001b[39m \u001b[43m \u001b[49m\u001b[43mbody\u001b[49m\u001b[43m=\u001b[49m\u001b[43mmaybe_transform\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 981\u001b[39m \u001b[43m \u001b[49m\u001b[43m{\u001b[49m\n\u001b[32m 982\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmax_tokens\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmax_tokens\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 983\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmessages\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmessages\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 984\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmodel\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 985\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmetadata\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmetadata\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 986\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mservice_tier\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mservice_tier\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 987\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mstop_sequences\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mstop_sequences\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 988\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mstream\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 989\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43msystem\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43msystem\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 990\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtemperature\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtemperature\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 991\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mthinking\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mthinking\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 992\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtool_choice\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtool_choice\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 993\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtools\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtools\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 994\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtop_k\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtop_k\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 995\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtop_p\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtop_p\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 996\u001b[39m \u001b[43m \u001b[49m\u001b[43m}\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 997\u001b[39m \u001b[43m \u001b[49m\u001b[43mmessage_create_params\u001b[49m\u001b[43m.\u001b[49m\u001b[43mMessageCreateParamsStreaming\u001b[49m\n\u001b[32m 998\u001b[39m \u001b[43m \u001b[49m\u001b[38;5;28;43;01mif\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\n\u001b[32m 999\u001b[39m \u001b[43m \u001b[49m\u001b[38;5;28;43;01melse\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mmessage_create_params\u001b[49m\u001b[43m.\u001b[49m\u001b[43mMessageCreateParamsNonStreaming\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1000\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1001\u001b[39m \u001b[43m \u001b[49m\u001b[43moptions\u001b[49m\u001b[43m=\u001b[49m\u001b[43mmake_request_options\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 1002\u001b[39m \u001b[43m \u001b[49m\u001b[43mextra_headers\u001b[49m\u001b[43m=\u001b[49m\u001b[43mextra_headers\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mextra_query\u001b[49m\u001b[43m=\u001b[49m\u001b[43mextra_query\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mextra_body\u001b[49m\u001b[43m=\u001b[49m\u001b[43mextra_body\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtimeout\u001b[49m\u001b[43m=\u001b[49m\u001b[43mtimeout\u001b[49m\n\u001b[32m 1003\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1004\u001b[39m \u001b[43m \u001b[49m\u001b[43mcast_to\u001b[49m\u001b[43m=\u001b[49m\u001b[43mMessage\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1005\u001b[39m \u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[43m=\u001b[49m\u001b[43mstream\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[32m 1006\u001b[39m \u001b[43m \u001b[49m\u001b[43mstream_cls\u001b[49m\u001b[43m=\u001b[49m\u001b[43mStream\u001b[49m\u001b[43m[\u001b[49m\u001b[43mRawMessageStreamEvent\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 1007\u001b[39m \u001b[43m\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/Projects/agents/.venv/lib/python3.12/site-packages/anthropic/_base_client.py:1290\u001b[39m, in \u001b[36mSyncAPIClient.post\u001b[39m\u001b[34m(self, path, cast_to, body, options, files, stream, stream_cls)\u001b[39m\n\u001b[32m 1276\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mpost\u001b[39m(\n\u001b[32m 1277\u001b[39m \u001b[38;5;28mself\u001b[39m,\n\u001b[32m 1278\u001b[39m path: \u001b[38;5;28mstr\u001b[39m,\n\u001b[32m (...)\u001b[39m\u001b[32m 1285\u001b[39m stream_cls: \u001b[38;5;28mtype\u001b[39m[_StreamT] | \u001b[38;5;28;01mNone\u001b[39;00m = \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[32m 1286\u001b[39m ) -> ResponseT | _StreamT:\n\u001b[32m 1287\u001b[39m opts = FinalRequestOptions.construct(\n\u001b[32m 1288\u001b[39m method=\u001b[33m\"\u001b[39m\u001b[33mpost\u001b[39m\u001b[33m\"\u001b[39m, url=path, json_data=body, files=to_httpx_files(files), **options\n\u001b[32m 1289\u001b[39m )\n\u001b[32m-> \u001b[39m\u001b[32m1290\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m cast(ResponseT, \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mrequest\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcast_to\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mopts\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[43m=\u001b[49m\u001b[43mstream\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream_cls\u001b[49m\u001b[43m=\u001b[49m\u001b[43mstream_cls\u001b[49m\u001b[43m)\u001b[49m)\n", "\u001b[36mFile \u001b[39m\u001b[32m~/Projects/agents/.venv/lib/python3.12/site-packages/anthropic/_base_client.py:1085\u001b[39m, in \u001b[36mSyncAPIClient.request\u001b[39m\u001b[34m(self, cast_to, options, stream, stream_cls)\u001b[39m\n\u001b[32m 1082\u001b[39m err.response.read()\n\u001b[32m 1084\u001b[39m log.debug(\u001b[33m\"\u001b[39m\u001b[33mRe-raising status error\u001b[39m\u001b[33m\"\u001b[39m)\n\u001b[32m-> \u001b[39m\u001b[32m1085\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;28mself\u001b[39m._make_status_error_from_response(err.response) \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[32m 1087\u001b[39m \u001b[38;5;28;01mbreak\u001b[39;00m\n\u001b[32m 1089\u001b[39m \u001b[38;5;28;01massert\u001b[39;00m response \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m, \u001b[33m\"\u001b[39m\u001b[33mcould not resolve response (should never happen)\u001b[39m\u001b[33m\"\u001b[39m\n", "\u001b[31mBadRequestError\u001b[39m: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.'}}" ] } ], "source": [ "# Anthropic has a slightly different API, and Max Tokens is required\n", "\n", "model_name = \"claude-3-7-sonnet-latest\"\n", "\n", "claude = Anthropic()\n", "response = claude.messages.create(model=model_name, messages=messages, max_tokens=1000)\n", "answer = response.content[0].text\n", "\n", "display(Markdown(answer))\n", "competitors.append(model_name)\n", "answers.append(answer)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "Deploying Artificial General Intelligence (AGI) in sectors directly impacting human lives presents a complex web of ethical implications. We're talking about entrusting life-altering decisions to machines with unprecedented capabilities, raising fundamental questions about responsibility, fairness, and control.\n", "\n", "**Ethical Implications:**\n", "\n", "* **Bias and Discrimination:** AGI trained on biased data could perpetuate and amplify existing societal inequalities, leading to discriminatory outcomes in healthcare, criminal justice, loan applications, and other critical areas. This goes beyond surface-level bias; AGI could learn subtle, embedded patterns leading to unforeseen discriminatory effects.\n", "* **Lack of Transparency and Explainability (Black Box Problem):** As AGI systems become more complex, understanding how they arrive at decisions can become increasingly difficult. This \"black box\" nature makes it challenging to identify and correct errors or biases, eroding trust and accountability. Imagine an AGI denying parole. How do you challenge a decision when you can't understand its reasoning?\n", "* **Erosion of Human Autonomy and Dignity:** Over-reliance on AGI in decision-making could diminish human agency and control over our lives. In healthcare, for example, doctors might become overly dependent on AGI diagnoses, potentially neglecting their own judgment and intuition, leading to a deskilling effect. This can undermine the doctor-patient relationship and the patient's right to informed consent.\n", "* **Accountability and Responsibility:** Determining who is responsible when an AGI system makes a mistake or causes harm is a significant challenge. Is it the developers, the deployers, the users, or the AGI itself? Current legal frameworks are not well-equipped to address this issue. Consider an AGI-driven autonomous vehicle causing an accident. Who is liable – the programmer, the manufacturer, or the AI system itself?\n", "* **Job Displacement and Economic Inequality:** AGI could automate many jobs currently performed by humans, leading to widespread job losses and increased economic inequality, particularly in sectors directly impacting lives, such as healthcare and education.\n", "* **Security and Malicious Use:** AGI systems could be vulnerable to hacking and manipulation, leading to potentially catastrophic consequences. Imagine a malicious actor gaining control of an AGI-powered air traffic control system or an AGI that manages critical infrastructure.\n", "* **Existential Risk:** Though more speculative, the long-term risk of AGI potentially exceeding human control and posing a threat to humanity itself cannot be completely dismissed, particularly if not aligned with human values.\n", "* **Privacy Concerns:** AGI often requires vast amounts of data for training and operation. The collection, storage, and use of this data could raise serious privacy concerns, particularly in sensitive domains like healthcare and criminal justice.\n", "\n", "**Frameworks to Mitigate Risks and Maximize Benefits:**\n", "\n", "To navigate these complex ethical challenges, I propose a multi-faceted framework incorporating the following elements:\n", "\n", "1. **Robust Ethical Guidelines and Regulations:**\n", " * **Establish clear ethical principles:** Grounded in human rights, fairness, transparency, and accountability. These principles should guide the development and deployment of AGI systems. Consider adopting principles like \"beneficence\" (acting in the best interests of individuals), \"non-maleficence\" (avoiding harm), and \"justice\" (fair distribution of benefits and burdens).\n", " * **Develop enforceable regulations:** Mandating impact assessments, transparency requirements, and safety standards for AGI systems in high-stakes sectors. These regulations should be dynamic and adaptive, evolving alongside AGI technology. Examples could include mandatory audits for bias, certification processes for AGI used in critical systems, and requirements for explainable AI in certain domains.\n", " * **International cooperation:** Harmonizing ethical guidelines and regulations across different countries to prevent a \"race to the bottom\" and ensure consistent safety standards.\n", "\n", "2. **Emphasis on Transparency and Explainability:**\n", " * **Develop explainable AI (XAI) techniques:** Making AGI decision-making processes more transparent and understandable to human users. This might involve developing techniques that allow humans to query and understand the reasoning behind AGI decisions.\n", " * **Implement auditability mechanisms:** Allowing independent experts to review and assess the performance and fairness of AGI systems.\n", " * **Create mechanisms for human oversight and intervention:** Ensuring that humans retain the ability to override or modify AGI decisions when necessary, particularly in situations with significant ethical implications.\n", "\n", "3. **Prioritizing Fairness and Non-Discrimination:**\n", " * **Employ diverse and representative datasets:** To minimize bias in AGI training data. This requires active efforts to identify and correct biases in existing datasets and to collect new data that reflects the diversity of the population.\n", " * **Develop bias detection and mitigation techniques:** To identify and correct bias in AGI algorithms. This includes using fairness metrics to evaluate the performance of AGI systems across different demographic groups and developing algorithms that are explicitly designed to be fair.\n", " * **Implement ongoing monitoring and evaluation:** To track the performance of AGI systems and identify any unintended discriminatory outcomes.\n", "\n", "4. **Focus on Human-Centered Design:**\n", " * **Involve stakeholders in the design process:** Including patients, doctors, lawyers, policymakers, and other affected individuals to ensure that AGI systems are aligned with human needs and values.\n", " * **Design AGI systems to augment, not replace, human capabilities:** Focusing on tasks that AGI can perform more efficiently, while preserving human roles that require empathy, creativity, and critical thinking. Consider the \"centaur\" model where humans and AI collaborate, leveraging each other's strengths.\n", " * **Provide training and education:** Equipping individuals with the skills and knowledge they need to effectively use and interact with AGI systems.\n", "\n", "5. **Accountability and Legal Frameworks:**\n", " * **Develop clear legal frameworks:** Defining liability for harm caused by AGI systems. This might involve creating new legal concepts or adapting existing legal principles to address the unique challenges posed by AGI.\n", " * **Establish independent oversight bodies:** To monitor the development and deployment of AGI systems and to investigate incidents of harm. These bodies should have the authority to investigate complaints, conduct audits, and impose sanctions.\n", " * **Promote ethical AI development practices:** Encouraging developers to adopt ethical guidelines and best practices in their work.\n", "\n", "6. **Long-Term Safety Research:**\n", " * **Invest in research on AGI safety and alignment:** To ensure that AGI systems are aligned with human values and goals. This includes research on topics such as AI safety, control, and ethics.\n", " * **Develop methods for verifying and validating AGI systems:** To ensure that they behave as intended and do not pose a threat to human safety.\n", "\n", "**Examples of Implementation:**\n", "\n", "* **Healthcare:** AGI used for diagnosis should be required to have explainable outputs, highlighting the factors contributing to the diagnosis and including a confidence score. A human doctor should always be the final decision-maker, with the AGI serving as an assistant. Data used to train the AGI must be carefully curated to avoid biases related to race, gender, or socioeconomic status.\n", "* **Criminal Justice:** AGI used for risk assessment should be transparent about the factors considered and the weight given to each factor. Defendants should have the right to challenge the AGI's assessment and to have a human review the decision. The AGI should be regularly audited for bias.\n", "* **Autonomous Vehicles:** Stringent safety standards and testing protocols should be required for AGI-powered self-driving cars. Accident data should be analyzed to identify and correct any errors in the AGI's programming. Clear legal frameworks should be in place to determine liability in the event of an accident.\n", "\n", "**Challenges and Considerations:**\n", "\n", "* **Defining \"Human Values\":** Agreement on a universal set of human values is difficult, leading to potential conflicts in AGI alignment.\n", "* **Balancing Innovation and Regulation:** Overly restrictive regulations could stifle innovation in the AGI field.\n", "* **The \"Alignment Problem\":** Ensuring that AGI's goals are aligned with human goals is a complex technical challenge.\n", "* **The Difficulty of Prediction:** It's difficult to anticipate all the potential ethical implications of AGI before it is fully developed.\n", "\n", "**Conclusion:**\n", "\n", "Deploying AGI in sectors impacting human lives is a double-edged sword. While it offers the potential for tremendous benefits, it also poses significant ethical risks. By proactively addressing these risks through robust ethical guidelines, transparency, fairness, and a focus on human-centered design, we can harness the power of AGI to improve human lives while safeguarding our values and autonomy. This requires a continuous, adaptive, and collaborative approach involving researchers, policymakers, industry leaders, and the public. The future we create with AGI depends on the choices we make today.\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "gemini = OpenAI(api_key=google_api_key, base_url=\"https://generativelanguage.googleapis.com/v1beta/openai/\")\n", "model_name = \"gemini-2.0-flash\"\n", "\n", "response = gemini.chat.completions.create(model=model_name, messages=messages)\n", "answer = response.choices[0].message.content\n", "\n", "display(Markdown(answer))\n", "competitors.append(model_name)\n", "answers.append(answer)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "ename": "APIStatusError", "evalue": "Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}", "output_type": "error", "traceback": [ "\u001b[31m---------------------------------------------------------------------------\u001b[39m", "\u001b[31mAPIStatusError\u001b[39m Traceback (most recent call last)", "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[11]\u001b[39m\u001b[32m, line 4\u001b[39m\n\u001b[32m 1\u001b[39m deepseek = OpenAI(api_key=deepseek_api_key, base_url=\u001b[33m\"\u001b[39m\u001b[33mhttps://api.deepseek.com/v1\u001b[39m\u001b[33m\"\u001b[39m)\n\u001b[32m 2\u001b[39m model_name = \u001b[33m\"\u001b[39m\u001b[33mdeepseek-chat\u001b[39m\u001b[33m\"\u001b[39m\n\u001b[32m----> \u001b[39m\u001b[32m4\u001b[39m response = \u001b[43mdeepseek\u001b[49m\u001b[43m.\u001b[49m\u001b[43mchat\u001b[49m\u001b[43m.\u001b[49m\u001b[43mcompletions\u001b[49m\u001b[43m.\u001b[49m\u001b[43mcreate\u001b[49m\u001b[43m(\u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m=\u001b[49m\u001b[43mmodel_name\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mmessages\u001b[49m\u001b[43m=\u001b[49m\u001b[43mmessages\u001b[49m\u001b[43m)\u001b[49m\n\u001b[32m 5\u001b[39m answer = response.choices[\u001b[32m0\u001b[39m].message.content\n\u001b[32m 7\u001b[39m display(Markdown(answer))\n", "\u001b[36mFile \u001b[39m\u001b[32m~/Projects/agents/.venv/lib/python3.12/site-packages/openai/_utils/_utils.py:287\u001b[39m, in \u001b[36mrequired_args..inner..wrapper\u001b[39m\u001b[34m(*args, **kwargs)\u001b[39m\n\u001b[32m 285\u001b[39m msg = \u001b[33mf\u001b[39m\u001b[33m\"\u001b[39m\u001b[33mMissing required argument: \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mquote(missing[\u001b[32m0\u001b[39m])\u001b[38;5;132;01m}\u001b[39;00m\u001b[33m\"\u001b[39m\n\u001b[32m 286\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mTypeError\u001b[39;00m(msg)\n\u001b[32m--> \u001b[39m\u001b[32m287\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mfunc\u001b[49m\u001b[43m(\u001b[49m\u001b[43m*\u001b[49m\u001b[43margs\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43m*\u001b[49m\u001b[43m*\u001b[49m\u001b[43mkwargs\u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/Projects/agents/.venv/lib/python3.12/site-packages/openai/resources/chat/completions/completions.py:925\u001b[39m, in \u001b[36mCompletions.create\u001b[39m\u001b[34m(self, messages, model, audio, frequency_penalty, function_call, functions, logit_bias, logprobs, max_completion_tokens, max_tokens, metadata, modalities, n, parallel_tool_calls, prediction, presence_penalty, reasoning_effort, response_format, seed, service_tier, stop, store, stream, stream_options, temperature, tool_choice, tools, top_logprobs, top_p, user, web_search_options, extra_headers, extra_query, extra_body, timeout)\u001b[39m\n\u001b[32m 882\u001b[39m \u001b[38;5;129m@required_args\u001b[39m([\u001b[33m\"\u001b[39m\u001b[33mmessages\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33mmodel\u001b[39m\u001b[33m\"\u001b[39m], [\u001b[33m\"\u001b[39m\u001b[33mmessages\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33mmodel\u001b[39m\u001b[33m\"\u001b[39m, \u001b[33m\"\u001b[39m\u001b[33mstream\u001b[39m\u001b[33m\"\u001b[39m])\n\u001b[32m 883\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mcreate\u001b[39m(\n\u001b[32m 884\u001b[39m \u001b[38;5;28mself\u001b[39m,\n\u001b[32m (...)\u001b[39m\u001b[32m 922\u001b[39m timeout: \u001b[38;5;28mfloat\u001b[39m | httpx.Timeout | \u001b[38;5;28;01mNone\u001b[39;00m | NotGiven = NOT_GIVEN,\n\u001b[32m 923\u001b[39m ) -> ChatCompletion | Stream[ChatCompletionChunk]:\n\u001b[32m 924\u001b[39m validate_response_format(response_format)\n\u001b[32m--> \u001b[39m\u001b[32m925\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43m_post\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 926\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43m/chat/completions\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m,\u001b[49m\n\u001b[32m 927\u001b[39m \u001b[43m \u001b[49m\u001b[43mbody\u001b[49m\u001b[43m=\u001b[49m\u001b[43mmaybe_transform\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 928\u001b[39m \u001b[43m \u001b[49m\u001b[43m{\u001b[49m\n\u001b[32m 929\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmessages\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmessages\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 930\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmodel\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmodel\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 931\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43maudio\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43maudio\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 932\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mfrequency_penalty\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mfrequency_penalty\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 933\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mfunction_call\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mfunction_call\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 934\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mfunctions\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mfunctions\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 935\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mlogit_bias\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mlogit_bias\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 936\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mlogprobs\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mlogprobs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 937\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmax_completion_tokens\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmax_completion_tokens\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 938\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmax_tokens\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmax_tokens\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 939\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmetadata\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmetadata\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 940\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mmodalities\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mmodalities\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 941\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mn\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mn\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 942\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mparallel_tool_calls\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mparallel_tool_calls\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 943\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mprediction\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mprediction\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 944\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mpresence_penalty\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mpresence_penalty\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 945\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mreasoning_effort\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mreasoning_effort\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 946\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mresponse_format\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mresponse_format\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 947\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mseed\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mseed\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 948\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mservice_tier\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mservice_tier\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 949\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mstop\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mstop\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 950\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mstore\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mstore\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 951\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mstream\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 952\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mstream_options\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream_options\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 953\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtemperature\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtemperature\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 954\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtool_choice\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtool_choice\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 955\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtools\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtools\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 956\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtop_logprobs\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtop_logprobs\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 957\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mtop_p\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mtop_p\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 958\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43muser\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43muser\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 959\u001b[39m \u001b[43m \u001b[49m\u001b[33;43m\"\u001b[39;49m\u001b[33;43mweb_search_options\u001b[39;49m\u001b[33;43m\"\u001b[39;49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\u001b[43mweb_search_options\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 960\u001b[39m \u001b[43m \u001b[49m\u001b[43m}\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 961\u001b[39m \u001b[43m \u001b[49m\u001b[43mcompletion_create_params\u001b[49m\u001b[43m.\u001b[49m\u001b[43mCompletionCreateParamsStreaming\u001b[49m\n\u001b[32m 962\u001b[39m \u001b[43m \u001b[49m\u001b[38;5;28;43;01mif\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\n\u001b[32m 963\u001b[39m \u001b[43m \u001b[49m\u001b[38;5;28;43;01melse\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mcompletion_create_params\u001b[49m\u001b[43m.\u001b[49m\u001b[43mCompletionCreateParamsNonStreaming\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 964\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 965\u001b[39m \u001b[43m \u001b[49m\u001b[43moptions\u001b[49m\u001b[43m=\u001b[49m\u001b[43mmake_request_options\u001b[49m\u001b[43m(\u001b[49m\n\u001b[32m 966\u001b[39m \u001b[43m \u001b[49m\u001b[43mextra_headers\u001b[49m\u001b[43m=\u001b[49m\u001b[43mextra_headers\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mextra_query\u001b[49m\u001b[43m=\u001b[49m\u001b[43mextra_query\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mextra_body\u001b[49m\u001b[43m=\u001b[49m\u001b[43mextra_body\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mtimeout\u001b[49m\u001b[43m=\u001b[49m\u001b[43mtimeout\u001b[49m\n\u001b[32m 967\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 968\u001b[39m \u001b[43m \u001b[49m\u001b[43mcast_to\u001b[49m\u001b[43m=\u001b[49m\u001b[43mChatCompletion\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 969\u001b[39m \u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[43m=\u001b[49m\u001b[43mstream\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01mor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[38;5;28;43;01mFalse\u001b[39;49;00m\u001b[43m,\u001b[49m\n\u001b[32m 970\u001b[39m \u001b[43m \u001b[49m\u001b[43mstream_cls\u001b[49m\u001b[43m=\u001b[49m\u001b[43mStream\u001b[49m\u001b[43m[\u001b[49m\u001b[43mChatCompletionChunk\u001b[49m\u001b[43m]\u001b[49m\u001b[43m,\u001b[49m\n\u001b[32m 971\u001b[39m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n", "\u001b[36mFile \u001b[39m\u001b[32m~/Projects/agents/.venv/lib/python3.12/site-packages/openai/_base_client.py:1239\u001b[39m, in \u001b[36mSyncAPIClient.post\u001b[39m\u001b[34m(self, path, cast_to, body, options, files, stream, stream_cls)\u001b[39m\n\u001b[32m 1225\u001b[39m \u001b[38;5;28;01mdef\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[34mpost\u001b[39m(\n\u001b[32m 1226\u001b[39m \u001b[38;5;28mself\u001b[39m,\n\u001b[32m 1227\u001b[39m path: \u001b[38;5;28mstr\u001b[39m,\n\u001b[32m (...)\u001b[39m\u001b[32m 1234\u001b[39m stream_cls: \u001b[38;5;28mtype\u001b[39m[_StreamT] | \u001b[38;5;28;01mNone\u001b[39;00m = \u001b[38;5;28;01mNone\u001b[39;00m,\n\u001b[32m 1235\u001b[39m ) -> ResponseT | _StreamT:\n\u001b[32m 1236\u001b[39m opts = FinalRequestOptions.construct(\n\u001b[32m 1237\u001b[39m method=\u001b[33m\"\u001b[39m\u001b[33mpost\u001b[39m\u001b[33m\"\u001b[39m, url=path, json_data=body, files=to_httpx_files(files), **options\n\u001b[32m 1238\u001b[39m )\n\u001b[32m-> \u001b[39m\u001b[32m1239\u001b[39m \u001b[38;5;28;01mreturn\u001b[39;00m cast(ResponseT, \u001b[38;5;28;43mself\u001b[39;49m\u001b[43m.\u001b[49m\u001b[43mrequest\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcast_to\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mopts\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream\u001b[49m\u001b[43m=\u001b[49m\u001b[43mstream\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mstream_cls\u001b[49m\u001b[43m=\u001b[49m\u001b[43mstream_cls\u001b[49m\u001b[43m)\u001b[49m)\n", "\u001b[36mFile \u001b[39m\u001b[32m~/Projects/agents/.venv/lib/python3.12/site-packages/openai/_base_client.py:1034\u001b[39m, in \u001b[36mSyncAPIClient.request\u001b[39m\u001b[34m(self, cast_to, options, stream, stream_cls)\u001b[39m\n\u001b[32m 1031\u001b[39m err.response.read()\n\u001b[32m 1033\u001b[39m log.debug(\u001b[33m\"\u001b[39m\u001b[33mRe-raising status error\u001b[39m\u001b[33m\"\u001b[39m)\n\u001b[32m-> \u001b[39m\u001b[32m1034\u001b[39m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;28mself\u001b[39m._make_status_error_from_response(err.response) \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[32m 1036\u001b[39m \u001b[38;5;28;01mbreak\u001b[39;00m\n\u001b[32m 1038\u001b[39m \u001b[38;5;28;01massert\u001b[39;00m response \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m, \u001b[33m\"\u001b[39m\u001b[33mcould not resolve response (should never happen)\u001b[39m\u001b[33m\"\u001b[39m\n", "\u001b[31mAPIStatusError\u001b[39m: Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}" ] } ], "source": [ "deepseek = OpenAI(api_key=deepseek_api_key, base_url=\"https://api.deepseek.com/v1\")\n", "model_name = \"deepseek-chat\"\n", "\n", "response = deepseek.chat.completions.create(model=model_name, messages=messages)\n", "answer = response.choices[0].message.content\n", "\n", "display(Markdown(answer))\n", "competitors.append(model_name)\n", "answers.append(answer)" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors where decisions directly impact human lives is a complex task. To address this, I'll outline a framework for evaluating the ethical implications and propose strategies to mitigate potential risks while maximizing benefits.\n", "\n", "**Ethical Implications:**\n", "\n", "1. **Autonomy and Agency**: AGI systems may challenge traditional notions of human autonomy and agency, potentially leading to concerns about accountability and decision-making authority.\n", "2. **Bias and Fairness**: AGI systems can perpetuate and amplify existing biases, resulting in unfair outcomes and discriminatory practices.\n", "3. **Transparency and Explainability**: AGI systems may be opaque, making it difficult to understand the reasoning behind their decisions, which can erode trust and accountability.\n", "4. **Safety and Security**: AGI systems can pose significant safety and security risks, particularly in high-stakes domains like healthcare, finance, and transportation.\n", "5. **Human Rights and Dignity**: AGI systems may infringe upon human rights, such as privacy, freedom of expression, and dignity, particularly in situations where they are used for surveillance or manipulation.\n", "\n", "**Frameworks for Mitigating Risks:**\n", "\n", "1. **Value Alignment**: Ensure that AGI systems are designed to align with human values, such as fairness, transparency, and accountability.\n", "2. **Human-Centered Design**: Involve humans in the design and development process to ensure that AGI systems are intuitive, transparent, and responsive to human needs.\n", "3. **Robustness and Security**: Implement robust security measures to prevent AGI systems from being compromised or used for malicious purposes.\n", "4. **Explainability and Transparency**: Develop techniques for explaining and interpreting AGI decisions, enabling humans to understand and trust the decision-making process.\n", "5. **Governance and Regulation**: Establish regulatory frameworks and governance structures to oversee the development and deployment of AGI systems, ensuring that they are used responsibly and for the benefit of society.\n", "\n", "**Proposed Frameworks:**\n", "\n", "1. **AGI Development Guidelines**: Establish guidelines for AGI development, including principles for value alignment, human-centered design, and robustness and security.\n", "2. **AGI Deployment Framework**: Develop a framework for deploying AGI systems, including protocols for testing, validation, and verification, as well as procedures for addressing potential risks and failures.\n", "3. **AGI Governance Structure**: Establish a governance structure to oversee the development and deployment of AGI systems, including representation from diverse stakeholders, such as policymakers, industry leaders, and civil society organizations.\n", "4. **AGI Ethics Review Board**: Create an ethics review board to evaluate the ethical implications of AGI systems and provide guidance on their development and deployment.\n", "5. **AGI Research Agenda**: Establish a research agenda to investigate the long-term implications of AGI and identify areas where further research is needed to mitigate potential risks and maximize benefits.\n", "\n", "**Benefits:**\n", "\n", "1. **Improved Decision-Making**: AGI systems can provide more accurate and informed decision-making, particularly in complex and high-stakes domains.\n", "2. **Increased Efficiency**: AGI systems can automate routine tasks, freeing humans to focus on higher-value tasks and improving overall efficiency.\n", "3. **Enhanced Productivity**: AGI systems can augment human capabilities, leading to increased productivity and innovation.\n", "4. **Better Healthcare**: AGI systems can help diagnose and treat diseases more effectively, leading to improved healthcare outcomes.\n", "5. **Environmental Sustainability**: AGI systems can help optimize resource usage, reduce waste, and promote environmental sustainability.\n", "\n", "By adopting a proactive and multidisciplinary approach to assessing the ethical implications of AGI and implementing frameworks to mitigate potential risks, we can maximize the benefits of AGI while minimizing its negative consequences." ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "groq = OpenAI(api_key=groq_api_key, base_url=\"https://api.groq.com/openai/v1\")\n", "model_name = \"llama-3.3-70b-versatile\"\n", "\n", "response = groq.chat.completions.create(model=model_name, messages=messages)\n", "answer = response.choices[0].message.content\n", "\n", "display(Markdown(answer))\n", "competitors.append(model_name)\n", "answers.append(answer)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## For the next cell, we will use Ollama\n", "\n", "Ollama runs a local web service that gives an OpenAI compatible endpoint, \n", "and runs models locally using high performance C++ code.\n", "\n", "If you don't have Ollama, install it here by visiting https://ollama.com then pressing Download and following the instructions.\n", "\n", "After it's installed, you should be able to visit here: http://localhost:11434 and see the message \"Ollama is running\"\n", "\n", "You might need to restart Cursor (and maybe reboot). Then open a Terminal (control+\\`) and run `ollama serve`\n", "\n", "Useful Ollama commands (run these in the terminal, or with an exclamation mark in this notebook):\n", "\n", "`ollama pull ` downloads a model locally \n", "`ollama ls` lists all the models you've downloaded \n", "`ollama rm ` deletes the specified model from your downloads" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "

Super important - ignore me at your peril!

\n", " The model called llama3.3 is FAR too large for home computers - it's not intended for personal computing and will consume all your resources! Stick with the nicely sized llama3.2 or llama3.2:1b and if you want larger, try llama3.1 or smaller variants of Qwen, Gemma, Phi or DeepSeek. See the the Ollama models page for a full list of models and sizes.\n", " \n", "
" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\u001b[?2026h\u001b[?25l\u001b[1Gpulling manifest ⠋ \u001b[K\u001b[?25h\u001b[?2026l\u001b[?2026h\u001b[?25l\u001b[1Gpulling manifest ⠙ \u001b[K\u001b[?25h\u001b[?2026l\u001b[?2026h\u001b[?25l\u001b[1Gpulling manifest ⠹ \u001b[K\u001b[?25h\u001b[?2026l\u001b[?2026h\u001b[?25l\u001b[1Gpulling manifest \u001b[K\n", "pulling dde5aa3fc5ff: 100% ▕██████████████████▏ 2.0 GB \u001b[K\n", "pulling 966de95ca8a6: 100% ▕██████████████████▏ 1.4 KB \u001b[K\n", "pulling fcc5a6bec9da: 100% ▕██████████████████▏ 7.7 KB \u001b[K\n", "pulling a70ff7e570d9: 100% ▕██████████████████▏ 6.0 KB \u001b[K\n", "pulling 56bb8bd477a5: 100% ▕██████████████████▏ 96 B \u001b[K\n", "pulling 34bb5ab01051: 100% ▕██████████████████▏ 561 B \u001b[K\n", "verifying sha256 digest \u001b[K\n", "writing manifest \u001b[K\n", "success \u001b[K\u001b[?25h\u001b[?2026l\n" ] } ], "source": [ "!ollama pull llama3.2" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/markdown": [ "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors that directly impact human lives requires a multidisciplinary approach. Here's a framework to consider:\n", "\n", "1. **Define AGI**: Clarify the scope and capabilities of AGI, including its potential applications, limitations, and decision-making processes.\n", "2. **Risk assessment**: Identify potential risks associated with AGI deployment, such as bias, job displacement, loss of human autonomy, or unintended consequences in critical systems (e.g., healthcare, transportation).\n", "3. **Value alignment**: Align AGI's goals and values with human values, prioritizing fairness, transparency, accountability, and respect for human dignity.\n", "4. **Transparency and explainability**: Develop techniques to understand and interpret AGI decision-making processes, ensuring that users can trust the outcomes.\n", "5. **Accountability**: Establish mechanisms for AGI developers and deployers to be held accountable for their creations' impact on society.\n", "6. **Human oversight and review**: Implement human review processes to detect and correct potential errors or biases in AGI systems.\n", "7. **Diverse teams and governance**: Ensure that diverse stakeholders, including experts from various fields (e.g., ethics, law, social sciences), are involved in AGI development, deployment, and policy-making.\n", "\n", "Frameworks for mitigating risks while maximizing benefits:\n", "\n", "1. **The AI Now Institute's framework**: Emphasizes the importance of human-centered design, inclusive decision-making processes, and social accountability.\n", "2. **The OECD Guidelines for Trustworthy Artificial Intelligence**: Focuses on transparency, explainability, accountability, and respect for human values.\n", "3. **The IEEE Ethics in Action Initiative**: Provides a set of principles for developing trustworthy AI systems that prioritize human well-being and safety.\n", "\n", "Additional proposals:\n", "\n", "1. **Implement regulatory frameworks**: Establish bodies to oversee AGI development, deployment, and use, ensuring adherence to established guidelines and standards.\n", "2. **Public engagement and education**: Encourage open discussions about AGI's potential benefits and risks, promoting public understanding and informed decision-making.\n", "3. **Research and development of new technologies**: Continuously fund research into AGI limitations, biases, and unintended consequences, driving innovation in areas like Explainable AI (XAI), Adversarial Robustness, and Human-Machine Interface Design.\n", "4. **Global cooperation and agreements**: Foster international collaborations to establish common standards, guidelines, and best practices for AGI development, deployment, and use.\n", "\n", "By considering these frameworks and proposals, we can work towards a future where AGI enhances human lives while minimizing potential risks and negative consequences." ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ollama = OpenAI(base_url='http://localhost:11434/v1', api_key='ollama')\n", "model_name = \"llama3.2\"\n", "\n", "response = ollama.chat.completions.create(model=model_name, messages=messages)\n", "answer = response.choices[0].message.content\n", "\n", "display(Markdown(answer))\n", "competitors.append(model_name)\n", "answers.append(answer)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['gpt-4o-mini', 'gemini-2.0-flash', 'llama-3.3-70b-versatile', 'llama3.2']\n", "['Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors such as healthcare, criminal justice, finance, and autonomous systems necessitates a multifaceted approach that considers not only the potential benefits but also the risks associated with decision-making processes that impact human lives. Here are key considerations and frameworks to mitigate risks while maximizing benefits:\\n\\n### Ethical Considerations\\n\\n1. **Autonomy and Agency**:\\n - **Value of Human Oversight**: AGI systems should support, rather than replace, human decision-making. Maintaining human agency ensures that individuals can contest and appeal against decisions that affect them.\\n\\n2. **Bias and Fairness**:\\n - **Data and Algorithmic Bias**: Given the potential biases in training data, it’s essential to implement strategies to mitigate forms of discrimination. Careful auditing of algorithms must be continuous, ensuring equitable outcomes across demographics.\\n\\n3. **Transparency and Explainability**:\\n - **Understanding Decisions**: AGI systems should be transparent and provide explanations for how decisions are made. This fosters trust among users and ensures accountability.\\n\\n4. **Accountability**:\\n - **Assigning Responsibility**: Establishing clear lines of accountability is crucial. There should be mechanisms in place to determine who is responsible for decisions made by AGI, especially when those decisions lead to negative outcomes.\\n\\n5. **Safety and Security**:\\n - **Robustness Against Malfunction**: Ensuring that AGI systems are reliable and secure from malicious attacks minimizes risks to human life.\\n\\n6. **Impacts on Employment**:\\n - **Re-skilling and Economic Displacement**: Evaluating the socio-economic implications of AGI deployment is necessary. Proactive measures should be taken to mitigate job loss and support workforce transitions.\\n\\n### Frameworks for Mitigating Risks\\n\\n1. **Ethics Advisory Boards**:\\n - Establish boards comprising ethicists, domain experts, and community representatives to review AGI deployments and ensure alignment with ethical standards.\\n\\n2. **Regulatory Frameworks**:\\n - Implement regulations that set standards for AGI development and use, ensuring compliance with ethical guidelines and promoting responsible practices.\\n\\n3. **Bias and Fairness Audits**:\\n - Regularly conduct audits to assess data sources, algorithmic decisions, and outcomes to address bias and ensure fairness in AGI systems.\\n\\n4. **Human-in-the-Loop Systems**:\\n - Incorporate human oversight in critical decision-making processes. Ensure that humans have the final say in situations where AGI recommendations may have significant real-world implications.\\n\\n5. **Public Engagement and Education**:\\n - Engage with communities to educate them about AGI capabilities and limitations, fostering public discourse about its ethical implications and the importance of their input.\\n\\n6. **Impact Assessments**:\\n - Before deployment, conduct comprehensive assessments to evaluate the potential impacts on various stakeholders, including unintended consequences.\\n\\n7. **Pilot Programs and Gradual Implementation**:\\n - Utilize phased implementation strategies, starting with pilot programs that allow for adjustments based on real-world feedback before full-scale deployment.\\n\\n8. **Continuous Monitoring and Adaptation**:\\n - Develop systems for continuous monitoring of AGI performance in real-time. Be prepared to adapt systems based on feedback and outcomes, ensuring that ethical standards evolve along with technology.\\n\\n9. **International Cooperation**:\\n - Encourage collaboration among countries to create universally applicable ethical guidelines and regulatory measures, given the global nature of technology.\\n\\n### Conclusion\\n\\nThe deployment of AGI in sectors affecting human lives presents both unprecedented opportunities and significant ethical challenges. By employing comprehensive assessments, establishing robust ethical frameworks, ensuring transparency, and maintaining human oversight, we can better navigate the complexities of AGI deployment to maximize benefits while minimizing risks. Continuous engagement with all stakeholders will also be vital for adaptively addressing the ethical implications of this transformative technology.', 'Deploying Artificial General Intelligence (AGI) in sectors directly impacting human lives presents a complex web of ethical implications. We\\'re talking about entrusting life-altering decisions to machines with unprecedented capabilities, raising fundamental questions about responsibility, fairness, and control.\\n\\n**Ethical Implications:**\\n\\n* **Bias and Discrimination:** AGI trained on biased data could perpetuate and amplify existing societal inequalities, leading to discriminatory outcomes in healthcare, criminal justice, loan applications, and other critical areas. This goes beyond surface-level bias; AGI could learn subtle, embedded patterns leading to unforeseen discriminatory effects.\\n* **Lack of Transparency and Explainability (Black Box Problem):** As AGI systems become more complex, understanding how they arrive at decisions can become increasingly difficult. This \"black box\" nature makes it challenging to identify and correct errors or biases, eroding trust and accountability. Imagine an AGI denying parole. How do you challenge a decision when you can\\'t understand its reasoning?\\n* **Erosion of Human Autonomy and Dignity:** Over-reliance on AGI in decision-making could diminish human agency and control over our lives. In healthcare, for example, doctors might become overly dependent on AGI diagnoses, potentially neglecting their own judgment and intuition, leading to a deskilling effect. This can undermine the doctor-patient relationship and the patient\\'s right to informed consent.\\n* **Accountability and Responsibility:** Determining who is responsible when an AGI system makes a mistake or causes harm is a significant challenge. Is it the developers, the deployers, the users, or the AGI itself? Current legal frameworks are not well-equipped to address this issue. Consider an AGI-driven autonomous vehicle causing an accident. Who is liable – the programmer, the manufacturer, or the AI system itself?\\n* **Job Displacement and Economic Inequality:** AGI could automate many jobs currently performed by humans, leading to widespread job losses and increased economic inequality, particularly in sectors directly impacting lives, such as healthcare and education.\\n* **Security and Malicious Use:** AGI systems could be vulnerable to hacking and manipulation, leading to potentially catastrophic consequences. Imagine a malicious actor gaining control of an AGI-powered air traffic control system or an AGI that manages critical infrastructure.\\n* **Existential Risk:** Though more speculative, the long-term risk of AGI potentially exceeding human control and posing a threat to humanity itself cannot be completely dismissed, particularly if not aligned with human values.\\n* **Privacy Concerns:** AGI often requires vast amounts of data for training and operation. The collection, storage, and use of this data could raise serious privacy concerns, particularly in sensitive domains like healthcare and criminal justice.\\n\\n**Frameworks to Mitigate Risks and Maximize Benefits:**\\n\\nTo navigate these complex ethical challenges, I propose a multi-faceted framework incorporating the following elements:\\n\\n1. **Robust Ethical Guidelines and Regulations:**\\n * **Establish clear ethical principles:** Grounded in human rights, fairness, transparency, and accountability. These principles should guide the development and deployment of AGI systems. Consider adopting principles like \"beneficence\" (acting in the best interests of individuals), \"non-maleficence\" (avoiding harm), and \"justice\" (fair distribution of benefits and burdens).\\n * **Develop enforceable regulations:** Mandating impact assessments, transparency requirements, and safety standards for AGI systems in high-stakes sectors. These regulations should be dynamic and adaptive, evolving alongside AGI technology. Examples could include mandatory audits for bias, certification processes for AGI used in critical systems, and requirements for explainable AI in certain domains.\\n * **International cooperation:** Harmonizing ethical guidelines and regulations across different countries to prevent a \"race to the bottom\" and ensure consistent safety standards.\\n\\n2. **Emphasis on Transparency and Explainability:**\\n * **Develop explainable AI (XAI) techniques:** Making AGI decision-making processes more transparent and understandable to human users. This might involve developing techniques that allow humans to query and understand the reasoning behind AGI decisions.\\n * **Implement auditability mechanisms:** Allowing independent experts to review and assess the performance and fairness of AGI systems.\\n * **Create mechanisms for human oversight and intervention:** Ensuring that humans retain the ability to override or modify AGI decisions when necessary, particularly in situations with significant ethical implications.\\n\\n3. **Prioritizing Fairness and Non-Discrimination:**\\n * **Employ diverse and representative datasets:** To minimize bias in AGI training data. This requires active efforts to identify and correct biases in existing datasets and to collect new data that reflects the diversity of the population.\\n * **Develop bias detection and mitigation techniques:** To identify and correct bias in AGI algorithms. This includes using fairness metrics to evaluate the performance of AGI systems across different demographic groups and developing algorithms that are explicitly designed to be fair.\\n * **Implement ongoing monitoring and evaluation:** To track the performance of AGI systems and identify any unintended discriminatory outcomes.\\n\\n4. **Focus on Human-Centered Design:**\\n * **Involve stakeholders in the design process:** Including patients, doctors, lawyers, policymakers, and other affected individuals to ensure that AGI systems are aligned with human needs and values.\\n * **Design AGI systems to augment, not replace, human capabilities:** Focusing on tasks that AGI can perform more efficiently, while preserving human roles that require empathy, creativity, and critical thinking. Consider the \"centaur\" model where humans and AI collaborate, leveraging each other\\'s strengths.\\n * **Provide training and education:** Equipping individuals with the skills and knowledge they need to effectively use and interact with AGI systems.\\n\\n5. **Accountability and Legal Frameworks:**\\n * **Develop clear legal frameworks:** Defining liability for harm caused by AGI systems. This might involve creating new legal concepts or adapting existing legal principles to address the unique challenges posed by AGI.\\n * **Establish independent oversight bodies:** To monitor the development and deployment of AGI systems and to investigate incidents of harm. These bodies should have the authority to investigate complaints, conduct audits, and impose sanctions.\\n * **Promote ethical AI development practices:** Encouraging developers to adopt ethical guidelines and best practices in their work.\\n\\n6. **Long-Term Safety Research:**\\n * **Invest in research on AGI safety and alignment:** To ensure that AGI systems are aligned with human values and goals. This includes research on topics such as AI safety, control, and ethics.\\n * **Develop methods for verifying and validating AGI systems:** To ensure that they behave as intended and do not pose a threat to human safety.\\n\\n**Examples of Implementation:**\\n\\n* **Healthcare:** AGI used for diagnosis should be required to have explainable outputs, highlighting the factors contributing to the diagnosis and including a confidence score. A human doctor should always be the final decision-maker, with the AGI serving as an assistant. Data used to train the AGI must be carefully curated to avoid biases related to race, gender, or socioeconomic status.\\n* **Criminal Justice:** AGI used for risk assessment should be transparent about the factors considered and the weight given to each factor. Defendants should have the right to challenge the AGI\\'s assessment and to have a human review the decision. The AGI should be regularly audited for bias.\\n* **Autonomous Vehicles:** Stringent safety standards and testing protocols should be required for AGI-powered self-driving cars. Accident data should be analyzed to identify and correct any errors in the AGI\\'s programming. Clear legal frameworks should be in place to determine liability in the event of an accident.\\n\\n**Challenges and Considerations:**\\n\\n* **Defining \"Human Values\":** Agreement on a universal set of human values is difficult, leading to potential conflicts in AGI alignment.\\n* **Balancing Innovation and Regulation:** Overly restrictive regulations could stifle innovation in the AGI field.\\n* **The \"Alignment Problem\":** Ensuring that AGI\\'s goals are aligned with human goals is a complex technical challenge.\\n* **The Difficulty of Prediction:** It\\'s difficult to anticipate all the potential ethical implications of AGI before it is fully developed.\\n\\n**Conclusion:**\\n\\nDeploying AGI in sectors impacting human lives is a double-edged sword. While it offers the potential for tremendous benefits, it also poses significant ethical risks. By proactively addressing these risks through robust ethical guidelines, transparency, fairness, and a focus on human-centered design, we can harness the power of AGI to improve human lives while safeguarding our values and autonomy. This requires a continuous, adaptive, and collaborative approach involving researchers, policymakers, industry leaders, and the public. The future we create with AGI depends on the choices we make today.\\n', \"Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors where decisions directly impact human lives is a complex task. To address this, I'll outline a framework for evaluating the ethical implications and propose strategies to mitigate potential risks while maximizing benefits.\\n\\n**Ethical Implications:**\\n\\n1. **Autonomy and Agency**: AGI systems may challenge traditional notions of human autonomy and agency, potentially leading to concerns about accountability and decision-making authority.\\n2. **Bias and Fairness**: AGI systems can perpetuate and amplify existing biases, resulting in unfair outcomes and discriminatory practices.\\n3. **Transparency and Explainability**: AGI systems may be opaque, making it difficult to understand the reasoning behind their decisions, which can erode trust and accountability.\\n4. **Safety and Security**: AGI systems can pose significant safety and security risks, particularly in high-stakes domains like healthcare, finance, and transportation.\\n5. **Human Rights and Dignity**: AGI systems may infringe upon human rights, such as privacy, freedom of expression, and dignity, particularly in situations where they are used for surveillance or manipulation.\\n\\n**Frameworks for Mitigating Risks:**\\n\\n1. **Value Alignment**: Ensure that AGI systems are designed to align with human values, such as fairness, transparency, and accountability.\\n2. **Human-Centered Design**: Involve humans in the design and development process to ensure that AGI systems are intuitive, transparent, and responsive to human needs.\\n3. **Robustness and Security**: Implement robust security measures to prevent AGI systems from being compromised or used for malicious purposes.\\n4. **Explainability and Transparency**: Develop techniques for explaining and interpreting AGI decisions, enabling humans to understand and trust the decision-making process.\\n5. **Governance and Regulation**: Establish regulatory frameworks and governance structures to oversee the development and deployment of AGI systems, ensuring that they are used responsibly and for the benefit of society.\\n\\n**Proposed Frameworks:**\\n\\n1. **AGI Development Guidelines**: Establish guidelines for AGI development, including principles for value alignment, human-centered design, and robustness and security.\\n2. **AGI Deployment Framework**: Develop a framework for deploying AGI systems, including protocols for testing, validation, and verification, as well as procedures for addressing potential risks and failures.\\n3. **AGI Governance Structure**: Establish a governance structure to oversee the development and deployment of AGI systems, including representation from diverse stakeholders, such as policymakers, industry leaders, and civil society organizations.\\n4. **AGI Ethics Review Board**: Create an ethics review board to evaluate the ethical implications of AGI systems and provide guidance on their development and deployment.\\n5. **AGI Research Agenda**: Establish a research agenda to investigate the long-term implications of AGI and identify areas where further research is needed to mitigate potential risks and maximize benefits.\\n\\n**Benefits:**\\n\\n1. **Improved Decision-Making**: AGI systems can provide more accurate and informed decision-making, particularly in complex and high-stakes domains.\\n2. **Increased Efficiency**: AGI systems can automate routine tasks, freeing humans to focus on higher-value tasks and improving overall efficiency.\\n3. **Enhanced Productivity**: AGI systems can augment human capabilities, leading to increased productivity and innovation.\\n4. **Better Healthcare**: AGI systems can help diagnose and treat diseases more effectively, leading to improved healthcare outcomes.\\n5. **Environmental Sustainability**: AGI systems can help optimize resource usage, reduce waste, and promote environmental sustainability.\\n\\nBy adopting a proactive and multidisciplinary approach to assessing the ethical implications of AGI and implementing frameworks to mitigate potential risks, we can maximize the benefits of AGI while minimizing its negative consequences.\", \"Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors that directly impact human lives requires a multidisciplinary approach. Here's a framework to consider:\\n\\n1. **Define AGI**: Clarify the scope and capabilities of AGI, including its potential applications, limitations, and decision-making processes.\\n2. **Risk assessment**: Identify potential risks associated with AGI deployment, such as bias, job displacement, loss of human autonomy, or unintended consequences in critical systems (e.g., healthcare, transportation).\\n3. **Value alignment**: Align AGI's goals and values with human values, prioritizing fairness, transparency, accountability, and respect for human dignity.\\n4. **Transparency and explainability**: Develop techniques to understand and interpret AGI decision-making processes, ensuring that users can trust the outcomes.\\n5. **Accountability**: Establish mechanisms for AGI developers and deployers to be held accountable for their creations' impact on society.\\n6. **Human oversight and review**: Implement human review processes to detect and correct potential errors or biases in AGI systems.\\n7. **Diverse teams and governance**: Ensure that diverse stakeholders, including experts from various fields (e.g., ethics, law, social sciences), are involved in AGI development, deployment, and policy-making.\\n\\nFrameworks for mitigating risks while maximizing benefits:\\n\\n1. **The AI Now Institute's framework**: Emphasizes the importance of human-centered design, inclusive decision-making processes, and social accountability.\\n2. **The OECD Guidelines for Trustworthy Artificial Intelligence**: Focuses on transparency, explainability, accountability, and respect for human values.\\n3. **The IEEE Ethics in Action Initiative**: Provides a set of principles for developing trustworthy AI systems that prioritize human well-being and safety.\\n\\nAdditional proposals:\\n\\n1. **Implement regulatory frameworks**: Establish bodies to oversee AGI development, deployment, and use, ensuring adherence to established guidelines and standards.\\n2. **Public engagement and education**: Encourage open discussions about AGI's potential benefits and risks, promoting public understanding and informed decision-making.\\n3. **Research and development of new technologies**: Continuously fund research into AGI limitations, biases, and unintended consequences, driving innovation in areas like Explainable AI (XAI), Adversarial Robustness, and Human-Machine Interface Design.\\n4. **Global cooperation and agreements**: Foster international collaborations to establish common standards, guidelines, and best practices for AGI development, deployment, and use.\\n\\nBy considering these frameworks and proposals, we can work towards a future where AGI enhances human lives while minimizing potential risks and negative consequences.\"]\n" ] } ], "source": [ "# So where are we?\n", "\n", "print(competitors)\n", "print(answers)\n" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Competitor: gpt-4o-mini\n", "\n", "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors such as healthcare, criminal justice, finance, and autonomous systems necessitates a multifaceted approach that considers not only the potential benefits but also the risks associated with decision-making processes that impact human lives. Here are key considerations and frameworks to mitigate risks while maximizing benefits:\n", "\n", "### Ethical Considerations\n", "\n", "1. **Autonomy and Agency**:\n", " - **Value of Human Oversight**: AGI systems should support, rather than replace, human decision-making. Maintaining human agency ensures that individuals can contest and appeal against decisions that affect them.\n", "\n", "2. **Bias and Fairness**:\n", " - **Data and Algorithmic Bias**: Given the potential biases in training data, it’s essential to implement strategies to mitigate forms of discrimination. Careful auditing of algorithms must be continuous, ensuring equitable outcomes across demographics.\n", "\n", "3. **Transparency and Explainability**:\n", " - **Understanding Decisions**: AGI systems should be transparent and provide explanations for how decisions are made. This fosters trust among users and ensures accountability.\n", "\n", "4. **Accountability**:\n", " - **Assigning Responsibility**: Establishing clear lines of accountability is crucial. There should be mechanisms in place to determine who is responsible for decisions made by AGI, especially when those decisions lead to negative outcomes.\n", "\n", "5. **Safety and Security**:\n", " - **Robustness Against Malfunction**: Ensuring that AGI systems are reliable and secure from malicious attacks minimizes risks to human life.\n", "\n", "6. **Impacts on Employment**:\n", " - **Re-skilling and Economic Displacement**: Evaluating the socio-economic implications of AGI deployment is necessary. Proactive measures should be taken to mitigate job loss and support workforce transitions.\n", "\n", "### Frameworks for Mitigating Risks\n", "\n", "1. **Ethics Advisory Boards**:\n", " - Establish boards comprising ethicists, domain experts, and community representatives to review AGI deployments and ensure alignment with ethical standards.\n", "\n", "2. **Regulatory Frameworks**:\n", " - Implement regulations that set standards for AGI development and use, ensuring compliance with ethical guidelines and promoting responsible practices.\n", "\n", "3. **Bias and Fairness Audits**:\n", " - Regularly conduct audits to assess data sources, algorithmic decisions, and outcomes to address bias and ensure fairness in AGI systems.\n", "\n", "4. **Human-in-the-Loop Systems**:\n", " - Incorporate human oversight in critical decision-making processes. Ensure that humans have the final say in situations where AGI recommendations may have significant real-world implications.\n", "\n", "5. **Public Engagement and Education**:\n", " - Engage with communities to educate them about AGI capabilities and limitations, fostering public discourse about its ethical implications and the importance of their input.\n", "\n", "6. **Impact Assessments**:\n", " - Before deployment, conduct comprehensive assessments to evaluate the potential impacts on various stakeholders, including unintended consequences.\n", "\n", "7. **Pilot Programs and Gradual Implementation**:\n", " - Utilize phased implementation strategies, starting with pilot programs that allow for adjustments based on real-world feedback before full-scale deployment.\n", "\n", "8. **Continuous Monitoring and Adaptation**:\n", " - Develop systems for continuous monitoring of AGI performance in real-time. Be prepared to adapt systems based on feedback and outcomes, ensuring that ethical standards evolve along with technology.\n", "\n", "9. **International Cooperation**:\n", " - Encourage collaboration among countries to create universally applicable ethical guidelines and regulatory measures, given the global nature of technology.\n", "\n", "### Conclusion\n", "\n", "The deployment of AGI in sectors affecting human lives presents both unprecedented opportunities and significant ethical challenges. By employing comprehensive assessments, establishing robust ethical frameworks, ensuring transparency, and maintaining human oversight, we can better navigate the complexities of AGI deployment to maximize benefits while minimizing risks. Continuous engagement with all stakeholders will also be vital for adaptively addressing the ethical implications of this transformative technology.\n", "Competitor: gemini-2.0-flash\n", "\n", "Deploying Artificial General Intelligence (AGI) in sectors directly impacting human lives presents a complex web of ethical implications. We're talking about entrusting life-altering decisions to machines with unprecedented capabilities, raising fundamental questions about responsibility, fairness, and control.\n", "\n", "**Ethical Implications:**\n", "\n", "* **Bias and Discrimination:** AGI trained on biased data could perpetuate and amplify existing societal inequalities, leading to discriminatory outcomes in healthcare, criminal justice, loan applications, and other critical areas. This goes beyond surface-level bias; AGI could learn subtle, embedded patterns leading to unforeseen discriminatory effects.\n", "* **Lack of Transparency and Explainability (Black Box Problem):** As AGI systems become more complex, understanding how they arrive at decisions can become increasingly difficult. This \"black box\" nature makes it challenging to identify and correct errors or biases, eroding trust and accountability. Imagine an AGI denying parole. How do you challenge a decision when you can't understand its reasoning?\n", "* **Erosion of Human Autonomy and Dignity:** Over-reliance on AGI in decision-making could diminish human agency and control over our lives. In healthcare, for example, doctors might become overly dependent on AGI diagnoses, potentially neglecting their own judgment and intuition, leading to a deskilling effect. This can undermine the doctor-patient relationship and the patient's right to informed consent.\n", "* **Accountability and Responsibility:** Determining who is responsible when an AGI system makes a mistake or causes harm is a significant challenge. Is it the developers, the deployers, the users, or the AGI itself? Current legal frameworks are not well-equipped to address this issue. Consider an AGI-driven autonomous vehicle causing an accident. Who is liable – the programmer, the manufacturer, or the AI system itself?\n", "* **Job Displacement and Economic Inequality:** AGI could automate many jobs currently performed by humans, leading to widespread job losses and increased economic inequality, particularly in sectors directly impacting lives, such as healthcare and education.\n", "* **Security and Malicious Use:** AGI systems could be vulnerable to hacking and manipulation, leading to potentially catastrophic consequences. Imagine a malicious actor gaining control of an AGI-powered air traffic control system or an AGI that manages critical infrastructure.\n", "* **Existential Risk:** Though more speculative, the long-term risk of AGI potentially exceeding human control and posing a threat to humanity itself cannot be completely dismissed, particularly if not aligned with human values.\n", "* **Privacy Concerns:** AGI often requires vast amounts of data for training and operation. The collection, storage, and use of this data could raise serious privacy concerns, particularly in sensitive domains like healthcare and criminal justice.\n", "\n", "**Frameworks to Mitigate Risks and Maximize Benefits:**\n", "\n", "To navigate these complex ethical challenges, I propose a multi-faceted framework incorporating the following elements:\n", "\n", "1. **Robust Ethical Guidelines and Regulations:**\n", " * **Establish clear ethical principles:** Grounded in human rights, fairness, transparency, and accountability. These principles should guide the development and deployment of AGI systems. Consider adopting principles like \"beneficence\" (acting in the best interests of individuals), \"non-maleficence\" (avoiding harm), and \"justice\" (fair distribution of benefits and burdens).\n", " * **Develop enforceable regulations:** Mandating impact assessments, transparency requirements, and safety standards for AGI systems in high-stakes sectors. These regulations should be dynamic and adaptive, evolving alongside AGI technology. Examples could include mandatory audits for bias, certification processes for AGI used in critical systems, and requirements for explainable AI in certain domains.\n", " * **International cooperation:** Harmonizing ethical guidelines and regulations across different countries to prevent a \"race to the bottom\" and ensure consistent safety standards.\n", "\n", "2. **Emphasis on Transparency and Explainability:**\n", " * **Develop explainable AI (XAI) techniques:** Making AGI decision-making processes more transparent and understandable to human users. This might involve developing techniques that allow humans to query and understand the reasoning behind AGI decisions.\n", " * **Implement auditability mechanisms:** Allowing independent experts to review and assess the performance and fairness of AGI systems.\n", " * **Create mechanisms for human oversight and intervention:** Ensuring that humans retain the ability to override or modify AGI decisions when necessary, particularly in situations with significant ethical implications.\n", "\n", "3. **Prioritizing Fairness and Non-Discrimination:**\n", " * **Employ diverse and representative datasets:** To minimize bias in AGI training data. This requires active efforts to identify and correct biases in existing datasets and to collect new data that reflects the diversity of the population.\n", " * **Develop bias detection and mitigation techniques:** To identify and correct bias in AGI algorithms. This includes using fairness metrics to evaluate the performance of AGI systems across different demographic groups and developing algorithms that are explicitly designed to be fair.\n", " * **Implement ongoing monitoring and evaluation:** To track the performance of AGI systems and identify any unintended discriminatory outcomes.\n", "\n", "4. **Focus on Human-Centered Design:**\n", " * **Involve stakeholders in the design process:** Including patients, doctors, lawyers, policymakers, and other affected individuals to ensure that AGI systems are aligned with human needs and values.\n", " * **Design AGI systems to augment, not replace, human capabilities:** Focusing on tasks that AGI can perform more efficiently, while preserving human roles that require empathy, creativity, and critical thinking. Consider the \"centaur\" model where humans and AI collaborate, leveraging each other's strengths.\n", " * **Provide training and education:** Equipping individuals with the skills and knowledge they need to effectively use and interact with AGI systems.\n", "\n", "5. **Accountability and Legal Frameworks:**\n", " * **Develop clear legal frameworks:** Defining liability for harm caused by AGI systems. This might involve creating new legal concepts or adapting existing legal principles to address the unique challenges posed by AGI.\n", " * **Establish independent oversight bodies:** To monitor the development and deployment of AGI systems and to investigate incidents of harm. These bodies should have the authority to investigate complaints, conduct audits, and impose sanctions.\n", " * **Promote ethical AI development practices:** Encouraging developers to adopt ethical guidelines and best practices in their work.\n", "\n", "6. **Long-Term Safety Research:**\n", " * **Invest in research on AGI safety and alignment:** To ensure that AGI systems are aligned with human values and goals. This includes research on topics such as AI safety, control, and ethics.\n", " * **Develop methods for verifying and validating AGI systems:** To ensure that they behave as intended and do not pose a threat to human safety.\n", "\n", "**Examples of Implementation:**\n", "\n", "* **Healthcare:** AGI used for diagnosis should be required to have explainable outputs, highlighting the factors contributing to the diagnosis and including a confidence score. A human doctor should always be the final decision-maker, with the AGI serving as an assistant. Data used to train the AGI must be carefully curated to avoid biases related to race, gender, or socioeconomic status.\n", "* **Criminal Justice:** AGI used for risk assessment should be transparent about the factors considered and the weight given to each factor. Defendants should have the right to challenge the AGI's assessment and to have a human review the decision. The AGI should be regularly audited for bias.\n", "* **Autonomous Vehicles:** Stringent safety standards and testing protocols should be required for AGI-powered self-driving cars. Accident data should be analyzed to identify and correct any errors in the AGI's programming. Clear legal frameworks should be in place to determine liability in the event of an accident.\n", "\n", "**Challenges and Considerations:**\n", "\n", "* **Defining \"Human Values\":** Agreement on a universal set of human values is difficult, leading to potential conflicts in AGI alignment.\n", "* **Balancing Innovation and Regulation:** Overly restrictive regulations could stifle innovation in the AGI field.\n", "* **The \"Alignment Problem\":** Ensuring that AGI's goals are aligned with human goals is a complex technical challenge.\n", "* **The Difficulty of Prediction:** It's difficult to anticipate all the potential ethical implications of AGI before it is fully developed.\n", "\n", "**Conclusion:**\n", "\n", "Deploying AGI in sectors impacting human lives is a double-edged sword. While it offers the potential for tremendous benefits, it also poses significant ethical risks. By proactively addressing these risks through robust ethical guidelines, transparency, fairness, and a focus on human-centered design, we can harness the power of AGI to improve human lives while safeguarding our values and autonomy. This requires a continuous, adaptive, and collaborative approach involving researchers, policymakers, industry leaders, and the public. The future we create with AGI depends on the choices we make today.\n", "\n", "Competitor: llama-3.3-70b-versatile\n", "\n", "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors where decisions directly impact human lives is a complex task. To address this, I'll outline a framework for evaluating the ethical implications and propose strategies to mitigate potential risks while maximizing benefits.\n", "\n", "**Ethical Implications:**\n", "\n", "1. **Autonomy and Agency**: AGI systems may challenge traditional notions of human autonomy and agency, potentially leading to concerns about accountability and decision-making authority.\n", "2. **Bias and Fairness**: AGI systems can perpetuate and amplify existing biases, resulting in unfair outcomes and discriminatory practices.\n", "3. **Transparency and Explainability**: AGI systems may be opaque, making it difficult to understand the reasoning behind their decisions, which can erode trust and accountability.\n", "4. **Safety and Security**: AGI systems can pose significant safety and security risks, particularly in high-stakes domains like healthcare, finance, and transportation.\n", "5. **Human Rights and Dignity**: AGI systems may infringe upon human rights, such as privacy, freedom of expression, and dignity, particularly in situations where they are used for surveillance or manipulation.\n", "\n", "**Frameworks for Mitigating Risks:**\n", "\n", "1. **Value Alignment**: Ensure that AGI systems are designed to align with human values, such as fairness, transparency, and accountability.\n", "2. **Human-Centered Design**: Involve humans in the design and development process to ensure that AGI systems are intuitive, transparent, and responsive to human needs.\n", "3. **Robustness and Security**: Implement robust security measures to prevent AGI systems from being compromised or used for malicious purposes.\n", "4. **Explainability and Transparency**: Develop techniques for explaining and interpreting AGI decisions, enabling humans to understand and trust the decision-making process.\n", "5. **Governance and Regulation**: Establish regulatory frameworks and governance structures to oversee the development and deployment of AGI systems, ensuring that they are used responsibly and for the benefit of society.\n", "\n", "**Proposed Frameworks:**\n", "\n", "1. **AGI Development Guidelines**: Establish guidelines for AGI development, including principles for value alignment, human-centered design, and robustness and security.\n", "2. **AGI Deployment Framework**: Develop a framework for deploying AGI systems, including protocols for testing, validation, and verification, as well as procedures for addressing potential risks and failures.\n", "3. **AGI Governance Structure**: Establish a governance structure to oversee the development and deployment of AGI systems, including representation from diverse stakeholders, such as policymakers, industry leaders, and civil society organizations.\n", "4. **AGI Ethics Review Board**: Create an ethics review board to evaluate the ethical implications of AGI systems and provide guidance on their development and deployment.\n", "5. **AGI Research Agenda**: Establish a research agenda to investigate the long-term implications of AGI and identify areas where further research is needed to mitigate potential risks and maximize benefits.\n", "\n", "**Benefits:**\n", "\n", "1. **Improved Decision-Making**: AGI systems can provide more accurate and informed decision-making, particularly in complex and high-stakes domains.\n", "2. **Increased Efficiency**: AGI systems can automate routine tasks, freeing humans to focus on higher-value tasks and improving overall efficiency.\n", "3. **Enhanced Productivity**: AGI systems can augment human capabilities, leading to increased productivity and innovation.\n", "4. **Better Healthcare**: AGI systems can help diagnose and treat diseases more effectively, leading to improved healthcare outcomes.\n", "5. **Environmental Sustainability**: AGI systems can help optimize resource usage, reduce waste, and promote environmental sustainability.\n", "\n", "By adopting a proactive and multidisciplinary approach to assessing the ethical implications of AGI and implementing frameworks to mitigate potential risks, we can maximize the benefits of AGI while minimizing its negative consequences.\n", "Competitor: llama3.2\n", "\n", "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors that directly impact human lives requires a multidisciplinary approach. Here's a framework to consider:\n", "\n", "1. **Define AGI**: Clarify the scope and capabilities of AGI, including its potential applications, limitations, and decision-making processes.\n", "2. **Risk assessment**: Identify potential risks associated with AGI deployment, such as bias, job displacement, loss of human autonomy, or unintended consequences in critical systems (e.g., healthcare, transportation).\n", "3. **Value alignment**: Align AGI's goals and values with human values, prioritizing fairness, transparency, accountability, and respect for human dignity.\n", "4. **Transparency and explainability**: Develop techniques to understand and interpret AGI decision-making processes, ensuring that users can trust the outcomes.\n", "5. **Accountability**: Establish mechanisms for AGI developers and deployers to be held accountable for their creations' impact on society.\n", "6. **Human oversight and review**: Implement human review processes to detect and correct potential errors or biases in AGI systems.\n", "7. **Diverse teams and governance**: Ensure that diverse stakeholders, including experts from various fields (e.g., ethics, law, social sciences), are involved in AGI development, deployment, and policy-making.\n", "\n", "Frameworks for mitigating risks while maximizing benefits:\n", "\n", "1. **The AI Now Institute's framework**: Emphasizes the importance of human-centered design, inclusive decision-making processes, and social accountability.\n", "2. **The OECD Guidelines for Trustworthy Artificial Intelligence**: Focuses on transparency, explainability, accountability, and respect for human values.\n", "3. **The IEEE Ethics in Action Initiative**: Provides a set of principles for developing trustworthy AI systems that prioritize human well-being and safety.\n", "\n", "Additional proposals:\n", "\n", "1. **Implement regulatory frameworks**: Establish bodies to oversee AGI development, deployment, and use, ensuring adherence to established guidelines and standards.\n", "2. **Public engagement and education**: Encourage open discussions about AGI's potential benefits and risks, promoting public understanding and informed decision-making.\n", "3. **Research and development of new technologies**: Continuously fund research into AGI limitations, biases, and unintended consequences, driving innovation in areas like Explainable AI (XAI), Adversarial Robustness, and Human-Machine Interface Design.\n", "4. **Global cooperation and agreements**: Foster international collaborations to establish common standards, guidelines, and best practices for AGI development, deployment, and use.\n", "\n", "By considering these frameworks and proposals, we can work towards a future where AGI enhances human lives while minimizing potential risks and negative consequences.\n" ] } ], "source": [ "# It's nice to know how to use \"zip\"\n", "for competitor, answer in zip(competitors, answers):\n", " print(f\"Competitor: {competitor}\\n\\n{answer}\")\n" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "# Let's bring this together - note the use of \"enumerate\"\n", "\n", "together = \"\"\n", "for index, answer in enumerate(answers):\n", " together += f\"# Response from competitor {index+1}\\n\\n\"\n", " together += answer + \"\\n\\n\"" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "# Response from competitor 1\n", "\n", "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors such as healthcare, criminal justice, finance, and autonomous systems necessitates a multifaceted approach that considers not only the potential benefits but also the risks associated with decision-making processes that impact human lives. Here are key considerations and frameworks to mitigate risks while maximizing benefits:\n", "\n", "### Ethical Considerations\n", "\n", "1. **Autonomy and Agency**:\n", " - **Value of Human Oversight**: AGI systems should support, rather than replace, human decision-making. Maintaining human agency ensures that individuals can contest and appeal against decisions that affect them.\n", "\n", "2. **Bias and Fairness**:\n", " - **Data and Algorithmic Bias**: Given the potential biases in training data, it’s essential to implement strategies to mitigate forms of discrimination. Careful auditing of algorithms must be continuous, ensuring equitable outcomes across demographics.\n", "\n", "3. **Transparency and Explainability**:\n", " - **Understanding Decisions**: AGI systems should be transparent and provide explanations for how decisions are made. This fosters trust among users and ensures accountability.\n", "\n", "4. **Accountability**:\n", " - **Assigning Responsibility**: Establishing clear lines of accountability is crucial. There should be mechanisms in place to determine who is responsible for decisions made by AGI, especially when those decisions lead to negative outcomes.\n", "\n", "5. **Safety and Security**:\n", " - **Robustness Against Malfunction**: Ensuring that AGI systems are reliable and secure from malicious attacks minimizes risks to human life.\n", "\n", "6. **Impacts on Employment**:\n", " - **Re-skilling and Economic Displacement**: Evaluating the socio-economic implications of AGI deployment is necessary. Proactive measures should be taken to mitigate job loss and support workforce transitions.\n", "\n", "### Frameworks for Mitigating Risks\n", "\n", "1. **Ethics Advisory Boards**:\n", " - Establish boards comprising ethicists, domain experts, and community representatives to review AGI deployments and ensure alignment with ethical standards.\n", "\n", "2. **Regulatory Frameworks**:\n", " - Implement regulations that set standards for AGI development and use, ensuring compliance with ethical guidelines and promoting responsible practices.\n", "\n", "3. **Bias and Fairness Audits**:\n", " - Regularly conduct audits to assess data sources, algorithmic decisions, and outcomes to address bias and ensure fairness in AGI systems.\n", "\n", "4. **Human-in-the-Loop Systems**:\n", " - Incorporate human oversight in critical decision-making processes. Ensure that humans have the final say in situations where AGI recommendations may have significant real-world implications.\n", "\n", "5. **Public Engagement and Education**:\n", " - Engage with communities to educate them about AGI capabilities and limitations, fostering public discourse about its ethical implications and the importance of their input.\n", "\n", "6. **Impact Assessments**:\n", " - Before deployment, conduct comprehensive assessments to evaluate the potential impacts on various stakeholders, including unintended consequences.\n", "\n", "7. **Pilot Programs and Gradual Implementation**:\n", " - Utilize phased implementation strategies, starting with pilot programs that allow for adjustments based on real-world feedback before full-scale deployment.\n", "\n", "8. **Continuous Monitoring and Adaptation**:\n", " - Develop systems for continuous monitoring of AGI performance in real-time. Be prepared to adapt systems based on feedback and outcomes, ensuring that ethical standards evolve along with technology.\n", "\n", "9. **International Cooperation**:\n", " - Encourage collaboration among countries to create universally applicable ethical guidelines and regulatory measures, given the global nature of technology.\n", "\n", "### Conclusion\n", "\n", "The deployment of AGI in sectors affecting human lives presents both unprecedented opportunities and significant ethical challenges. By employing comprehensive assessments, establishing robust ethical frameworks, ensuring transparency, and maintaining human oversight, we can better navigate the complexities of AGI deployment to maximize benefits while minimizing risks. Continuous engagement with all stakeholders will also be vital for adaptively addressing the ethical implications of this transformative technology.\n", "\n", "# Response from competitor 2\n", "\n", "Deploying Artificial General Intelligence (AGI) in sectors directly impacting human lives presents a complex web of ethical implications. We're talking about entrusting life-altering decisions to machines with unprecedented capabilities, raising fundamental questions about responsibility, fairness, and control.\n", "\n", "**Ethical Implications:**\n", "\n", "* **Bias and Discrimination:** AGI trained on biased data could perpetuate and amplify existing societal inequalities, leading to discriminatory outcomes in healthcare, criminal justice, loan applications, and other critical areas. This goes beyond surface-level bias; AGI could learn subtle, embedded patterns leading to unforeseen discriminatory effects.\n", "* **Lack of Transparency and Explainability (Black Box Problem):** As AGI systems become more complex, understanding how they arrive at decisions can become increasingly difficult. This \"black box\" nature makes it challenging to identify and correct errors or biases, eroding trust and accountability. Imagine an AGI denying parole. How do you challenge a decision when you can't understand its reasoning?\n", "* **Erosion of Human Autonomy and Dignity:** Over-reliance on AGI in decision-making could diminish human agency and control over our lives. In healthcare, for example, doctors might become overly dependent on AGI diagnoses, potentially neglecting their own judgment and intuition, leading to a deskilling effect. This can undermine the doctor-patient relationship and the patient's right to informed consent.\n", "* **Accountability and Responsibility:** Determining who is responsible when an AGI system makes a mistake or causes harm is a significant challenge. Is it the developers, the deployers, the users, or the AGI itself? Current legal frameworks are not well-equipped to address this issue. Consider an AGI-driven autonomous vehicle causing an accident. Who is liable – the programmer, the manufacturer, or the AI system itself?\n", "* **Job Displacement and Economic Inequality:** AGI could automate many jobs currently performed by humans, leading to widespread job losses and increased economic inequality, particularly in sectors directly impacting lives, such as healthcare and education.\n", "* **Security and Malicious Use:** AGI systems could be vulnerable to hacking and manipulation, leading to potentially catastrophic consequences. Imagine a malicious actor gaining control of an AGI-powered air traffic control system or an AGI that manages critical infrastructure.\n", "* **Existential Risk:** Though more speculative, the long-term risk of AGI potentially exceeding human control and posing a threat to humanity itself cannot be completely dismissed, particularly if not aligned with human values.\n", "* **Privacy Concerns:** AGI often requires vast amounts of data for training and operation. The collection, storage, and use of this data could raise serious privacy concerns, particularly in sensitive domains like healthcare and criminal justice.\n", "\n", "**Frameworks to Mitigate Risks and Maximize Benefits:**\n", "\n", "To navigate these complex ethical challenges, I propose a multi-faceted framework incorporating the following elements:\n", "\n", "1. **Robust Ethical Guidelines and Regulations:**\n", " * **Establish clear ethical principles:** Grounded in human rights, fairness, transparency, and accountability. These principles should guide the development and deployment of AGI systems. Consider adopting principles like \"beneficence\" (acting in the best interests of individuals), \"non-maleficence\" (avoiding harm), and \"justice\" (fair distribution of benefits and burdens).\n", " * **Develop enforceable regulations:** Mandating impact assessments, transparency requirements, and safety standards for AGI systems in high-stakes sectors. These regulations should be dynamic and adaptive, evolving alongside AGI technology. Examples could include mandatory audits for bias, certification processes for AGI used in critical systems, and requirements for explainable AI in certain domains.\n", " * **International cooperation:** Harmonizing ethical guidelines and regulations across different countries to prevent a \"race to the bottom\" and ensure consistent safety standards.\n", "\n", "2. **Emphasis on Transparency and Explainability:**\n", " * **Develop explainable AI (XAI) techniques:** Making AGI decision-making processes more transparent and understandable to human users. This might involve developing techniques that allow humans to query and understand the reasoning behind AGI decisions.\n", " * **Implement auditability mechanisms:** Allowing independent experts to review and assess the performance and fairness of AGI systems.\n", " * **Create mechanisms for human oversight and intervention:** Ensuring that humans retain the ability to override or modify AGI decisions when necessary, particularly in situations with significant ethical implications.\n", "\n", "3. **Prioritizing Fairness and Non-Discrimination:**\n", " * **Employ diverse and representative datasets:** To minimize bias in AGI training data. This requires active efforts to identify and correct biases in existing datasets and to collect new data that reflects the diversity of the population.\n", " * **Develop bias detection and mitigation techniques:** To identify and correct bias in AGI algorithms. This includes using fairness metrics to evaluate the performance of AGI systems across different demographic groups and developing algorithms that are explicitly designed to be fair.\n", " * **Implement ongoing monitoring and evaluation:** To track the performance of AGI systems and identify any unintended discriminatory outcomes.\n", "\n", "4. **Focus on Human-Centered Design:**\n", " * **Involve stakeholders in the design process:** Including patients, doctors, lawyers, policymakers, and other affected individuals to ensure that AGI systems are aligned with human needs and values.\n", " * **Design AGI systems to augment, not replace, human capabilities:** Focusing on tasks that AGI can perform more efficiently, while preserving human roles that require empathy, creativity, and critical thinking. Consider the \"centaur\" model where humans and AI collaborate, leveraging each other's strengths.\n", " * **Provide training and education:** Equipping individuals with the skills and knowledge they need to effectively use and interact with AGI systems.\n", "\n", "5. **Accountability and Legal Frameworks:**\n", " * **Develop clear legal frameworks:** Defining liability for harm caused by AGI systems. This might involve creating new legal concepts or adapting existing legal principles to address the unique challenges posed by AGI.\n", " * **Establish independent oversight bodies:** To monitor the development and deployment of AGI systems and to investigate incidents of harm. These bodies should have the authority to investigate complaints, conduct audits, and impose sanctions.\n", " * **Promote ethical AI development practices:** Encouraging developers to adopt ethical guidelines and best practices in their work.\n", "\n", "6. **Long-Term Safety Research:**\n", " * **Invest in research on AGI safety and alignment:** To ensure that AGI systems are aligned with human values and goals. This includes research on topics such as AI safety, control, and ethics.\n", " * **Develop methods for verifying and validating AGI systems:** To ensure that they behave as intended and do not pose a threat to human safety.\n", "\n", "**Examples of Implementation:**\n", "\n", "* **Healthcare:** AGI used for diagnosis should be required to have explainable outputs, highlighting the factors contributing to the diagnosis and including a confidence score. A human doctor should always be the final decision-maker, with the AGI serving as an assistant. Data used to train the AGI must be carefully curated to avoid biases related to race, gender, or socioeconomic status.\n", "* **Criminal Justice:** AGI used for risk assessment should be transparent about the factors considered and the weight given to each factor. Defendants should have the right to challenge the AGI's assessment and to have a human review the decision. The AGI should be regularly audited for bias.\n", "* **Autonomous Vehicles:** Stringent safety standards and testing protocols should be required for AGI-powered self-driving cars. Accident data should be analyzed to identify and correct any errors in the AGI's programming. Clear legal frameworks should be in place to determine liability in the event of an accident.\n", "\n", "**Challenges and Considerations:**\n", "\n", "* **Defining \"Human Values\":** Agreement on a universal set of human values is difficult, leading to potential conflicts in AGI alignment.\n", "* **Balancing Innovation and Regulation:** Overly restrictive regulations could stifle innovation in the AGI field.\n", "* **The \"Alignment Problem\":** Ensuring that AGI's goals are aligned with human goals is a complex technical challenge.\n", "* **The Difficulty of Prediction:** It's difficult to anticipate all the potential ethical implications of AGI before it is fully developed.\n", "\n", "**Conclusion:**\n", "\n", "Deploying AGI in sectors impacting human lives is a double-edged sword. While it offers the potential for tremendous benefits, it also poses significant ethical risks. By proactively addressing these risks through robust ethical guidelines, transparency, fairness, and a focus on human-centered design, we can harness the power of AGI to improve human lives while safeguarding our values and autonomy. This requires a continuous, adaptive, and collaborative approach involving researchers, policymakers, industry leaders, and the public. The future we create with AGI depends on the choices we make today.\n", "\n", "\n", "# Response from competitor 3\n", "\n", "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors where decisions directly impact human lives is a complex task. To address this, I'll outline a framework for evaluating the ethical implications and propose strategies to mitigate potential risks while maximizing benefits.\n", "\n", "**Ethical Implications:**\n", "\n", "1. **Autonomy and Agency**: AGI systems may challenge traditional notions of human autonomy and agency, potentially leading to concerns about accountability and decision-making authority.\n", "2. **Bias and Fairness**: AGI systems can perpetuate and amplify existing biases, resulting in unfair outcomes and discriminatory practices.\n", "3. **Transparency and Explainability**: AGI systems may be opaque, making it difficult to understand the reasoning behind their decisions, which can erode trust and accountability.\n", "4. **Safety and Security**: AGI systems can pose significant safety and security risks, particularly in high-stakes domains like healthcare, finance, and transportation.\n", "5. **Human Rights and Dignity**: AGI systems may infringe upon human rights, such as privacy, freedom of expression, and dignity, particularly in situations where they are used for surveillance or manipulation.\n", "\n", "**Frameworks for Mitigating Risks:**\n", "\n", "1. **Value Alignment**: Ensure that AGI systems are designed to align with human values, such as fairness, transparency, and accountability.\n", "2. **Human-Centered Design**: Involve humans in the design and development process to ensure that AGI systems are intuitive, transparent, and responsive to human needs.\n", "3. **Robustness and Security**: Implement robust security measures to prevent AGI systems from being compromised or used for malicious purposes.\n", "4. **Explainability and Transparency**: Develop techniques for explaining and interpreting AGI decisions, enabling humans to understand and trust the decision-making process.\n", "5. **Governance and Regulation**: Establish regulatory frameworks and governance structures to oversee the development and deployment of AGI systems, ensuring that they are used responsibly and for the benefit of society.\n", "\n", "**Proposed Frameworks:**\n", "\n", "1. **AGI Development Guidelines**: Establish guidelines for AGI development, including principles for value alignment, human-centered design, and robustness and security.\n", "2. **AGI Deployment Framework**: Develop a framework for deploying AGI systems, including protocols for testing, validation, and verification, as well as procedures for addressing potential risks and failures.\n", "3. **AGI Governance Structure**: Establish a governance structure to oversee the development and deployment of AGI systems, including representation from diverse stakeholders, such as policymakers, industry leaders, and civil society organizations.\n", "4. **AGI Ethics Review Board**: Create an ethics review board to evaluate the ethical implications of AGI systems and provide guidance on their development and deployment.\n", "5. **AGI Research Agenda**: Establish a research agenda to investigate the long-term implications of AGI and identify areas where further research is needed to mitigate potential risks and maximize benefits.\n", "\n", "**Benefits:**\n", "\n", "1. **Improved Decision-Making**: AGI systems can provide more accurate and informed decision-making, particularly in complex and high-stakes domains.\n", "2. **Increased Efficiency**: AGI systems can automate routine tasks, freeing humans to focus on higher-value tasks and improving overall efficiency.\n", "3. **Enhanced Productivity**: AGI systems can augment human capabilities, leading to increased productivity and innovation.\n", "4. **Better Healthcare**: AGI systems can help diagnose and treat diseases more effectively, leading to improved healthcare outcomes.\n", "5. **Environmental Sustainability**: AGI systems can help optimize resource usage, reduce waste, and promote environmental sustainability.\n", "\n", "By adopting a proactive and multidisciplinary approach to assessing the ethical implications of AGI and implementing frameworks to mitigate potential risks, we can maximize the benefits of AGI while minimizing its negative consequences.\n", "\n", "# Response from competitor 4\n", "\n", "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors that directly impact human lives requires a multidisciplinary approach. Here's a framework to consider:\n", "\n", "1. **Define AGI**: Clarify the scope and capabilities of AGI, including its potential applications, limitations, and decision-making processes.\n", "2. **Risk assessment**: Identify potential risks associated with AGI deployment, such as bias, job displacement, loss of human autonomy, or unintended consequences in critical systems (e.g., healthcare, transportation).\n", "3. **Value alignment**: Align AGI's goals and values with human values, prioritizing fairness, transparency, accountability, and respect for human dignity.\n", "4. **Transparency and explainability**: Develop techniques to understand and interpret AGI decision-making processes, ensuring that users can trust the outcomes.\n", "5. **Accountability**: Establish mechanisms for AGI developers and deployers to be held accountable for their creations' impact on society.\n", "6. **Human oversight and review**: Implement human review processes to detect and correct potential errors or biases in AGI systems.\n", "7. **Diverse teams and governance**: Ensure that diverse stakeholders, including experts from various fields (e.g., ethics, law, social sciences), are involved in AGI development, deployment, and policy-making.\n", "\n", "Frameworks for mitigating risks while maximizing benefits:\n", "\n", "1. **The AI Now Institute's framework**: Emphasizes the importance of human-centered design, inclusive decision-making processes, and social accountability.\n", "2. **The OECD Guidelines for Trustworthy Artificial Intelligence**: Focuses on transparency, explainability, accountability, and respect for human values.\n", "3. **The IEEE Ethics in Action Initiative**: Provides a set of principles for developing trustworthy AI systems that prioritize human well-being and safety.\n", "\n", "Additional proposals:\n", "\n", "1. **Implement regulatory frameworks**: Establish bodies to oversee AGI development, deployment, and use, ensuring adherence to established guidelines and standards.\n", "2. **Public engagement and education**: Encourage open discussions about AGI's potential benefits and risks, promoting public understanding and informed decision-making.\n", "3. **Research and development of new technologies**: Continuously fund research into AGI limitations, biases, and unintended consequences, driving innovation in areas like Explainable AI (XAI), Adversarial Robustness, and Human-Machine Interface Design.\n", "4. **Global cooperation and agreements**: Foster international collaborations to establish common standards, guidelines, and best practices for AGI development, deployment, and use.\n", "\n", "By considering these frameworks and proposals, we can work towards a future where AGI enhances human lives while minimizing potential risks and negative consequences.\n", "\n", "\n" ] } ], "source": [ "print(together)" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "judge = f\"\"\"You are judging a competition between {len(competitors)} competitors.\n", "Each model has been given this question:\n", "\n", "{question}\n", "\n", "Your job is to evaluate each response for clarity and strength of argument, and rank them in order of best to worst.\n", "Respond with JSON, and only JSON, with the following format:\n", "{{\"results\": [\"best competitor number\", \"second best competitor number\", \"third best competitor number\", ...]}}\n", "\n", "Here are the responses from each competitor:\n", "\n", "{together}\n", "\n", "Now respond with the JSON with the ranked order of the competitors, nothing else. Do not include markdown formatting or code blocks.\"\"\"\n" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "You are judging a competition between 4 competitors.\n", "Each model has been given this question:\n", "\n", "How would you assess the ethical implications of deploying artificial general intelligence in sectors where decisions directly impact human lives, and what frameworks would you propose to mitigate potential risks while maximizing benefits?\n", "\n", "Your job is to evaluate each response for clarity and strength of argument, and rank them in order of best to worst.\n", "Respond with JSON, and only JSON, with the following format:\n", "{\"results\": [\"best competitor number\", \"second best competitor number\", \"third best competitor number\", ...]}\n", "\n", "Here are the responses from each competitor:\n", "\n", "# Response from competitor 1\n", "\n", "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors such as healthcare, criminal justice, finance, and autonomous systems necessitates a multifaceted approach that considers not only the potential benefits but also the risks associated with decision-making processes that impact human lives. Here are key considerations and frameworks to mitigate risks while maximizing benefits:\n", "\n", "### Ethical Considerations\n", "\n", "1. **Autonomy and Agency**:\n", " - **Value of Human Oversight**: AGI systems should support, rather than replace, human decision-making. Maintaining human agency ensures that individuals can contest and appeal against decisions that affect them.\n", "\n", "2. **Bias and Fairness**:\n", " - **Data and Algorithmic Bias**: Given the potential biases in training data, it’s essential to implement strategies to mitigate forms of discrimination. Careful auditing of algorithms must be continuous, ensuring equitable outcomes across demographics.\n", "\n", "3. **Transparency and Explainability**:\n", " - **Understanding Decisions**: AGI systems should be transparent and provide explanations for how decisions are made. This fosters trust among users and ensures accountability.\n", "\n", "4. **Accountability**:\n", " - **Assigning Responsibility**: Establishing clear lines of accountability is crucial. There should be mechanisms in place to determine who is responsible for decisions made by AGI, especially when those decisions lead to negative outcomes.\n", "\n", "5. **Safety and Security**:\n", " - **Robustness Against Malfunction**: Ensuring that AGI systems are reliable and secure from malicious attacks minimizes risks to human life.\n", "\n", "6. **Impacts on Employment**:\n", " - **Re-skilling and Economic Displacement**: Evaluating the socio-economic implications of AGI deployment is necessary. Proactive measures should be taken to mitigate job loss and support workforce transitions.\n", "\n", "### Frameworks for Mitigating Risks\n", "\n", "1. **Ethics Advisory Boards**:\n", " - Establish boards comprising ethicists, domain experts, and community representatives to review AGI deployments and ensure alignment with ethical standards.\n", "\n", "2. **Regulatory Frameworks**:\n", " - Implement regulations that set standards for AGI development and use, ensuring compliance with ethical guidelines and promoting responsible practices.\n", "\n", "3. **Bias and Fairness Audits**:\n", " - Regularly conduct audits to assess data sources, algorithmic decisions, and outcomes to address bias and ensure fairness in AGI systems.\n", "\n", "4. **Human-in-the-Loop Systems**:\n", " - Incorporate human oversight in critical decision-making processes. Ensure that humans have the final say in situations where AGI recommendations may have significant real-world implications.\n", "\n", "5. **Public Engagement and Education**:\n", " - Engage with communities to educate them about AGI capabilities and limitations, fostering public discourse about its ethical implications and the importance of their input.\n", "\n", "6. **Impact Assessments**:\n", " - Before deployment, conduct comprehensive assessments to evaluate the potential impacts on various stakeholders, including unintended consequences.\n", "\n", "7. **Pilot Programs and Gradual Implementation**:\n", " - Utilize phased implementation strategies, starting with pilot programs that allow for adjustments based on real-world feedback before full-scale deployment.\n", "\n", "8. **Continuous Monitoring and Adaptation**:\n", " - Develop systems for continuous monitoring of AGI performance in real-time. Be prepared to adapt systems based on feedback and outcomes, ensuring that ethical standards evolve along with technology.\n", "\n", "9. **International Cooperation**:\n", " - Encourage collaboration among countries to create universally applicable ethical guidelines and regulatory measures, given the global nature of technology.\n", "\n", "### Conclusion\n", "\n", "The deployment of AGI in sectors affecting human lives presents both unprecedented opportunities and significant ethical challenges. By employing comprehensive assessments, establishing robust ethical frameworks, ensuring transparency, and maintaining human oversight, we can better navigate the complexities of AGI deployment to maximize benefits while minimizing risks. Continuous engagement with all stakeholders will also be vital for adaptively addressing the ethical implications of this transformative technology.\n", "\n", "# Response from competitor 2\n", "\n", "Deploying Artificial General Intelligence (AGI) in sectors directly impacting human lives presents a complex web of ethical implications. We're talking about entrusting life-altering decisions to machines with unprecedented capabilities, raising fundamental questions about responsibility, fairness, and control.\n", "\n", "**Ethical Implications:**\n", "\n", "* **Bias and Discrimination:** AGI trained on biased data could perpetuate and amplify existing societal inequalities, leading to discriminatory outcomes in healthcare, criminal justice, loan applications, and other critical areas. This goes beyond surface-level bias; AGI could learn subtle, embedded patterns leading to unforeseen discriminatory effects.\n", "* **Lack of Transparency and Explainability (Black Box Problem):** As AGI systems become more complex, understanding how they arrive at decisions can become increasingly difficult. This \"black box\" nature makes it challenging to identify and correct errors or biases, eroding trust and accountability. Imagine an AGI denying parole. How do you challenge a decision when you can't understand its reasoning?\n", "* **Erosion of Human Autonomy and Dignity:** Over-reliance on AGI in decision-making could diminish human agency and control over our lives. In healthcare, for example, doctors might become overly dependent on AGI diagnoses, potentially neglecting their own judgment and intuition, leading to a deskilling effect. This can undermine the doctor-patient relationship and the patient's right to informed consent.\n", "* **Accountability and Responsibility:** Determining who is responsible when an AGI system makes a mistake or causes harm is a significant challenge. Is it the developers, the deployers, the users, or the AGI itself? Current legal frameworks are not well-equipped to address this issue. Consider an AGI-driven autonomous vehicle causing an accident. Who is liable – the programmer, the manufacturer, or the AI system itself?\n", "* **Job Displacement and Economic Inequality:** AGI could automate many jobs currently performed by humans, leading to widespread job losses and increased economic inequality, particularly in sectors directly impacting lives, such as healthcare and education.\n", "* **Security and Malicious Use:** AGI systems could be vulnerable to hacking and manipulation, leading to potentially catastrophic consequences. Imagine a malicious actor gaining control of an AGI-powered air traffic control system or an AGI that manages critical infrastructure.\n", "* **Existential Risk:** Though more speculative, the long-term risk of AGI potentially exceeding human control and posing a threat to humanity itself cannot be completely dismissed, particularly if not aligned with human values.\n", "* **Privacy Concerns:** AGI often requires vast amounts of data for training and operation. The collection, storage, and use of this data could raise serious privacy concerns, particularly in sensitive domains like healthcare and criminal justice.\n", "\n", "**Frameworks to Mitigate Risks and Maximize Benefits:**\n", "\n", "To navigate these complex ethical challenges, I propose a multi-faceted framework incorporating the following elements:\n", "\n", "1. **Robust Ethical Guidelines and Regulations:**\n", " * **Establish clear ethical principles:** Grounded in human rights, fairness, transparency, and accountability. These principles should guide the development and deployment of AGI systems. Consider adopting principles like \"beneficence\" (acting in the best interests of individuals), \"non-maleficence\" (avoiding harm), and \"justice\" (fair distribution of benefits and burdens).\n", " * **Develop enforceable regulations:** Mandating impact assessments, transparency requirements, and safety standards for AGI systems in high-stakes sectors. These regulations should be dynamic and adaptive, evolving alongside AGI technology. Examples could include mandatory audits for bias, certification processes for AGI used in critical systems, and requirements for explainable AI in certain domains.\n", " * **International cooperation:** Harmonizing ethical guidelines and regulations across different countries to prevent a \"race to the bottom\" and ensure consistent safety standards.\n", "\n", "2. **Emphasis on Transparency and Explainability:**\n", " * **Develop explainable AI (XAI) techniques:** Making AGI decision-making processes more transparent and understandable to human users. This might involve developing techniques that allow humans to query and understand the reasoning behind AGI decisions.\n", " * **Implement auditability mechanisms:** Allowing independent experts to review and assess the performance and fairness of AGI systems.\n", " * **Create mechanisms for human oversight and intervention:** Ensuring that humans retain the ability to override or modify AGI decisions when necessary, particularly in situations with significant ethical implications.\n", "\n", "3. **Prioritizing Fairness and Non-Discrimination:**\n", " * **Employ diverse and representative datasets:** To minimize bias in AGI training data. This requires active efforts to identify and correct biases in existing datasets and to collect new data that reflects the diversity of the population.\n", " * **Develop bias detection and mitigation techniques:** To identify and correct bias in AGI algorithms. This includes using fairness metrics to evaluate the performance of AGI systems across different demographic groups and developing algorithms that are explicitly designed to be fair.\n", " * **Implement ongoing monitoring and evaluation:** To track the performance of AGI systems and identify any unintended discriminatory outcomes.\n", "\n", "4. **Focus on Human-Centered Design:**\n", " * **Involve stakeholders in the design process:** Including patients, doctors, lawyers, policymakers, and other affected individuals to ensure that AGI systems are aligned with human needs and values.\n", " * **Design AGI systems to augment, not replace, human capabilities:** Focusing on tasks that AGI can perform more efficiently, while preserving human roles that require empathy, creativity, and critical thinking. Consider the \"centaur\" model where humans and AI collaborate, leveraging each other's strengths.\n", " * **Provide training and education:** Equipping individuals with the skills and knowledge they need to effectively use and interact with AGI systems.\n", "\n", "5. **Accountability and Legal Frameworks:**\n", " * **Develop clear legal frameworks:** Defining liability for harm caused by AGI systems. This might involve creating new legal concepts or adapting existing legal principles to address the unique challenges posed by AGI.\n", " * **Establish independent oversight bodies:** To monitor the development and deployment of AGI systems and to investigate incidents of harm. These bodies should have the authority to investigate complaints, conduct audits, and impose sanctions.\n", " * **Promote ethical AI development practices:** Encouraging developers to adopt ethical guidelines and best practices in their work.\n", "\n", "6. **Long-Term Safety Research:**\n", " * **Invest in research on AGI safety and alignment:** To ensure that AGI systems are aligned with human values and goals. This includes research on topics such as AI safety, control, and ethics.\n", " * **Develop methods for verifying and validating AGI systems:** To ensure that they behave as intended and do not pose a threat to human safety.\n", "\n", "**Examples of Implementation:**\n", "\n", "* **Healthcare:** AGI used for diagnosis should be required to have explainable outputs, highlighting the factors contributing to the diagnosis and including a confidence score. A human doctor should always be the final decision-maker, with the AGI serving as an assistant. Data used to train the AGI must be carefully curated to avoid biases related to race, gender, or socioeconomic status.\n", "* **Criminal Justice:** AGI used for risk assessment should be transparent about the factors considered and the weight given to each factor. Defendants should have the right to challenge the AGI's assessment and to have a human review the decision. The AGI should be regularly audited for bias.\n", "* **Autonomous Vehicles:** Stringent safety standards and testing protocols should be required for AGI-powered self-driving cars. Accident data should be analyzed to identify and correct any errors in the AGI's programming. Clear legal frameworks should be in place to determine liability in the event of an accident.\n", "\n", "**Challenges and Considerations:**\n", "\n", "* **Defining \"Human Values\":** Agreement on a universal set of human values is difficult, leading to potential conflicts in AGI alignment.\n", "* **Balancing Innovation and Regulation:** Overly restrictive regulations could stifle innovation in the AGI field.\n", "* **The \"Alignment Problem\":** Ensuring that AGI's goals are aligned with human goals is a complex technical challenge.\n", "* **The Difficulty of Prediction:** It's difficult to anticipate all the potential ethical implications of AGI before it is fully developed.\n", "\n", "**Conclusion:**\n", "\n", "Deploying AGI in sectors impacting human lives is a double-edged sword. While it offers the potential for tremendous benefits, it also poses significant ethical risks. By proactively addressing these risks through robust ethical guidelines, transparency, fairness, and a focus on human-centered design, we can harness the power of AGI to improve human lives while safeguarding our values and autonomy. This requires a continuous, adaptive, and collaborative approach involving researchers, policymakers, industry leaders, and the public. The future we create with AGI depends on the choices we make today.\n", "\n", "\n", "# Response from competitor 3\n", "\n", "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors where decisions directly impact human lives is a complex task. To address this, I'll outline a framework for evaluating the ethical implications and propose strategies to mitigate potential risks while maximizing benefits.\n", "\n", "**Ethical Implications:**\n", "\n", "1. **Autonomy and Agency**: AGI systems may challenge traditional notions of human autonomy and agency, potentially leading to concerns about accountability and decision-making authority.\n", "2. **Bias and Fairness**: AGI systems can perpetuate and amplify existing biases, resulting in unfair outcomes and discriminatory practices.\n", "3. **Transparency and Explainability**: AGI systems may be opaque, making it difficult to understand the reasoning behind their decisions, which can erode trust and accountability.\n", "4. **Safety and Security**: AGI systems can pose significant safety and security risks, particularly in high-stakes domains like healthcare, finance, and transportation.\n", "5. **Human Rights and Dignity**: AGI systems may infringe upon human rights, such as privacy, freedom of expression, and dignity, particularly in situations where they are used for surveillance or manipulation.\n", "\n", "**Frameworks for Mitigating Risks:**\n", "\n", "1. **Value Alignment**: Ensure that AGI systems are designed to align with human values, such as fairness, transparency, and accountability.\n", "2. **Human-Centered Design**: Involve humans in the design and development process to ensure that AGI systems are intuitive, transparent, and responsive to human needs.\n", "3. **Robustness and Security**: Implement robust security measures to prevent AGI systems from being compromised or used for malicious purposes.\n", "4. **Explainability and Transparency**: Develop techniques for explaining and interpreting AGI decisions, enabling humans to understand and trust the decision-making process.\n", "5. **Governance and Regulation**: Establish regulatory frameworks and governance structures to oversee the development and deployment of AGI systems, ensuring that they are used responsibly and for the benefit of society.\n", "\n", "**Proposed Frameworks:**\n", "\n", "1. **AGI Development Guidelines**: Establish guidelines for AGI development, including principles for value alignment, human-centered design, and robustness and security.\n", "2. **AGI Deployment Framework**: Develop a framework for deploying AGI systems, including protocols for testing, validation, and verification, as well as procedures for addressing potential risks and failures.\n", "3. **AGI Governance Structure**: Establish a governance structure to oversee the development and deployment of AGI systems, including representation from diverse stakeholders, such as policymakers, industry leaders, and civil society organizations.\n", "4. **AGI Ethics Review Board**: Create an ethics review board to evaluate the ethical implications of AGI systems and provide guidance on their development and deployment.\n", "5. **AGI Research Agenda**: Establish a research agenda to investigate the long-term implications of AGI and identify areas where further research is needed to mitigate potential risks and maximize benefits.\n", "\n", "**Benefits:**\n", "\n", "1. **Improved Decision-Making**: AGI systems can provide more accurate and informed decision-making, particularly in complex and high-stakes domains.\n", "2. **Increased Efficiency**: AGI systems can automate routine tasks, freeing humans to focus on higher-value tasks and improving overall efficiency.\n", "3. **Enhanced Productivity**: AGI systems can augment human capabilities, leading to increased productivity and innovation.\n", "4. **Better Healthcare**: AGI systems can help diagnose and treat diseases more effectively, leading to improved healthcare outcomes.\n", "5. **Environmental Sustainability**: AGI systems can help optimize resource usage, reduce waste, and promote environmental sustainability.\n", "\n", "By adopting a proactive and multidisciplinary approach to assessing the ethical implications of AGI and implementing frameworks to mitigate potential risks, we can maximize the benefits of AGI while minimizing its negative consequences.\n", "\n", "# Response from competitor 4\n", "\n", "Assessing the ethical implications of deploying artificial general intelligence (AGI) in sectors that directly impact human lives requires a multidisciplinary approach. Here's a framework to consider:\n", "\n", "1. **Define AGI**: Clarify the scope and capabilities of AGI, including its potential applications, limitations, and decision-making processes.\n", "2. **Risk assessment**: Identify potential risks associated with AGI deployment, such as bias, job displacement, loss of human autonomy, or unintended consequences in critical systems (e.g., healthcare, transportation).\n", "3. **Value alignment**: Align AGI's goals and values with human values, prioritizing fairness, transparency, accountability, and respect for human dignity.\n", "4. **Transparency and explainability**: Develop techniques to understand and interpret AGI decision-making processes, ensuring that users can trust the outcomes.\n", "5. **Accountability**: Establish mechanisms for AGI developers and deployers to be held accountable for their creations' impact on society.\n", "6. **Human oversight and review**: Implement human review processes to detect and correct potential errors or biases in AGI systems.\n", "7. **Diverse teams and governance**: Ensure that diverse stakeholders, including experts from various fields (e.g., ethics, law, social sciences), are involved in AGI development, deployment, and policy-making.\n", "\n", "Frameworks for mitigating risks while maximizing benefits:\n", "\n", "1. **The AI Now Institute's framework**: Emphasizes the importance of human-centered design, inclusive decision-making processes, and social accountability.\n", "2. **The OECD Guidelines for Trustworthy Artificial Intelligence**: Focuses on transparency, explainability, accountability, and respect for human values.\n", "3. **The IEEE Ethics in Action Initiative**: Provides a set of principles for developing trustworthy AI systems that prioritize human well-being and safety.\n", "\n", "Additional proposals:\n", "\n", "1. **Implement regulatory frameworks**: Establish bodies to oversee AGI development, deployment, and use, ensuring adherence to established guidelines and standards.\n", "2. **Public engagement and education**: Encourage open discussions about AGI's potential benefits and risks, promoting public understanding and informed decision-making.\n", "3. **Research and development of new technologies**: Continuously fund research into AGI limitations, biases, and unintended consequences, driving innovation in areas like Explainable AI (XAI), Adversarial Robustness, and Human-Machine Interface Design.\n", "4. **Global cooperation and agreements**: Foster international collaborations to establish common standards, guidelines, and best practices for AGI development, deployment, and use.\n", "\n", "By considering these frameworks and proposals, we can work towards a future where AGI enhances human lives while minimizing potential risks and negative consequences.\n", "\n", "\n", "\n", "Now respond with the JSON with the ranked order of the competitors, nothing else. Do not include markdown formatting or code blocks.\n" ] } ], "source": [ "print(judge)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [], "source": [ "judge_messages = [{\"role\": \"user\", \"content\": judge}]" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{\"results\": [\"2\", \"1\", \"4\", \"3\"]}\n" ] } ], "source": [ "# Judgement time!\n", "\n", "openai = OpenAI()\n", "response = openai.chat.completions.create(\n", " model=\"o3-mini\",\n", " messages=judge_messages,\n", ")\n", "results = response.choices[0].message.content\n", "print(results)\n" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Rank 1: gemini-2.0-flash\n", "Rank 2: gpt-4o-mini\n", "Rank 3: llama3.2\n", "Rank 4: llama-3.3-70b-versatile\n" ] } ], "source": [ "# OK let's turn this into results!\n", "\n", "results_dict = json.loads(results)\n", "ranks = results_dict[\"results\"]\n", "for index, result in enumerate(ranks):\n", " competitor = competitors[int(result)-1]\n", " print(f\"Rank {index+1}: {competitor}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "

Exercise

\n", " Which pattern(s) did this use? Try updating this to add another Agentic design pattern.\n", " \n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", " \n", " \n", " \n", " \n", "
\n", " \n", " \n", "

Commercial implications

\n", " These kinds of patterns - to send a task to multiple models, and evaluate results,\n", " are common where you need to improve the quality of your LLM response. This approach can be universally applied\n", " to business projects where accuracy is critical.\n", " \n", "
" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "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.12.7" } }, "nbformat": 4, "nbformat_minor": 2 }