Repository: langchain-ai/learning-langchain Branch: master Commit: 89301c62ac34 Files: 169 Total size: 1.5 MB Directory structure: gitextract__8u75gon/ ├── .gitignore ├── README.md ├── ch1/ │ ├── js/ │ │ ├── a-llm.js │ │ ├── b-chat.js │ │ ├── c-system.js │ │ ├── d-prompt.js │ │ ├── e-prompt-model.js │ │ ├── f-chat-prompt.js │ │ ├── g-chat-prompt-model.js │ │ ├── h-structured.js │ │ ├── i-csv.js │ │ ├── j-methods.js │ │ ├── k-imperative.js │ │ ├── ka-stream.js │ │ └── l-declarative.js │ └── py/ │ ├── a-llm.py │ ├── b-chat.py │ ├── c-system.py │ ├── d-prompt.py │ ├── e-prompt-model.py │ ├── f-chat-prompt.py │ ├── g-chat-prompt-model.py │ ├── h-structured.py │ ├── i-csv.py │ ├── j-methods.py │ ├── k-imperative.py │ ├── ka-stream.py │ ├── kb-async.py │ └── l-declarative.py ├── ch10/ │ ├── js/ │ │ ├── agent-evaluation-rag.js │ │ ├── agent-evaluation-sql.js │ │ ├── agent-sql-graph.js │ │ ├── create-rag-dataset.js │ │ ├── create-sql-dataset.js │ │ ├── rag-graph.js │ │ ├── retrieve-and-grade.js │ │ └── search-graph.js │ └── py/ │ ├── agent_evaluation_rag.py │ ├── agent_evaluation_sql.py │ ├── agent_sql_graph.py │ ├── create_rag_dataset.py │ ├── create_sql_dataset.py │ ├── rag_graph.py │ ├── retrieve_and_grade.py │ └── search_graph.py ├── ch2/ │ ├── js/ │ │ ├── a-text-loader.js │ │ ├── b-web-loader.js │ │ ├── c-pdf-loader.js │ │ ├── d-rec-text-splitter.js │ │ ├── e-rec-text-splitter-code.js │ │ ├── f-markdown-splitter.js │ │ ├── g-embeddings.js │ │ ├── h-load-split-embed.js │ │ ├── i-pg-vector.js │ │ ├── j-record-manager.js │ │ └── k-multi-vector-retriever.js │ └── py/ │ ├── a-text-loader.py │ ├── b-web-loader.py │ ├── c-pdf-loader.py │ ├── d-rec-text-splitter.py │ ├── e-rec-text-splitter-code.py │ ├── f-markdown-splitter.py │ ├── g-embeddings.py │ ├── h-load-split-embed.py │ ├── i-pg-vector.py │ ├── j-record-manager.py │ ├── k-multi-vector-retriever.py │ └── l-rag-colbert.py ├── ch3/ │ ├── js/ │ │ ├── a-basic-rag.js │ │ ├── b-rewrite.js │ │ ├── c-multi-query.js │ │ ├── d-rag-fusion.js │ │ ├── e-hyde.js │ │ ├── f-router.js │ │ ├── g-semantic-router.js │ │ ├── h-self-query.js │ │ └── i-sql-example.js │ └── py/ │ ├── a-basic-rag.py │ ├── b-rewrite.py │ ├── c-multi-query.py │ ├── d-rag-fusion.py │ ├── e-hyde.py │ ├── f-router.py │ ├── g-semantic-router.py │ ├── h-self-query.py │ └── i-sql-example.py ├── ch4/ │ ├── js/ │ │ ├── a-simple-memory.js │ │ ├── b-state-graph.js │ │ ├── c-persistent-memory.js │ │ ├── d-trim-messages.js │ │ ├── e-filter-messages.js │ │ └── f-merge-messages.js │ └── py/ │ ├── a-simple-memory.py │ ├── b-state-graph.py │ ├── c-persistent-memory.py │ ├── d-trim-messages.py │ ├── e-filter-messages.py │ └── f-merge-messages.py ├── ch5/ │ ├── js/ │ │ ├── a-chatbot.js │ │ ├── b-sql-generator.js │ │ └── c-multi-rag.js │ └── py/ │ ├── a-chatbot.py │ ├── b-sql-generator.py │ └── c-multi-rag.py ├── ch6/ │ ├── js/ │ │ ├── a-basic-agent.js │ │ ├── b-force-first-tool.js │ │ └── c-many-tools.js │ └── py/ │ ├── a-basic-agent.py │ ├── b-force-first-tool.py │ └── c-many-tools.py ├── ch7/ │ ├── js/ │ │ ├── a-reflection.js │ │ ├── b-subgraph-direct.js │ │ ├── c-subgraph-function.js │ │ └── d-supervisor.js │ └── py/ │ ├── a-reflection.py │ ├── b-subgraph-direct.py │ ├── c-subgraph-function.py │ └── d-supervisor.py ├── ch8/ │ ├── js/ │ │ ├── a-structured-output.js │ │ ├── b-streaming-output.js │ │ ├── c-interrupt.js │ │ ├── d-authorize.js │ │ ├── e-resume.js │ │ ├── f-edit-state.js │ │ └── g-fork.js │ └── py/ │ ├── a-structured-output.py │ ├── b-streaming-output.py │ ├── c-interrupt.py │ ├── d-authorize.py │ ├── e-resume.py │ ├── f-edit-state.py │ └── g-fork.py ├── ch9/ │ ├── README.md │ ├── js/ │ │ ├── .gitignore │ │ ├── demo.ts │ │ ├── langgraph.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── ingestion_graph/ │ │ │ │ ├── configuration.ts │ │ │ │ ├── graph.ts │ │ │ │ └── state.ts │ │ │ ├── retrieval_graph/ │ │ │ │ ├── configuration.ts │ │ │ │ ├── graph.ts │ │ │ │ ├── state.ts │ │ │ │ └── utils.ts │ │ │ └── shared/ │ │ │ ├── configuration.ts │ │ │ ├── retrieval.ts │ │ │ ├── state.ts │ │ │ └── utils.ts │ │ └── tsconfig.json │ └── py/ │ ├── demo.py │ ├── langgraph.json │ ├── pyproject.toml │ └── src/ │ ├── docSplits.json │ ├── ingestion_graph/ │ │ ├── __init__.py │ │ ├── configuration.py │ │ ├── graph.py │ │ └── state.py │ ├── retrieval_graph/ │ │ ├── __init__.py │ │ ├── configuration.py │ │ ├── graph.py │ │ ├── state.py │ │ └── utils.py │ └── shared/ │ ├── __init__.py │ ├── configuration.py │ ├── retrieval.py │ └── state.py ├── package.json ├── pyproject.toml └── test.txt ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ # ===== Python ===== # Python __pycache__/ *.py[cod] *$py.class *.so .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg # Virtual Environment venv/ env/ ENV/ .env .venv/ # IDEs and Editors .idea/ .vscode/ *.swp *.swo *~ # OS generated files .DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes ehthumbs.db Thumbs.db # Logs and databases *.log *.sqlite *.db # Coverage and testing .coverage htmlcov/ .tox/ .pytest_cache/ coverage.xml *.cover # Documentation docs/_build/ # ===== JavaScript ===== # Node modules node_modules/ # Optional npm cache .npm # Optional eslint cache .eslintcache # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn .yarn/ .yarn-integrity # dotenv environment variables .env .env.test .env.production # Build output dist/ build/ # Logs logs/ # VS Code .vscode/ # IntelliJ/WebStorm .idea/ # Jest coverage coverage/ ================================================ FILE: README.md ================================================ # Learning LangChain Code Examples This repository contains code examples (in python and javascript) from each chapter of the book ["Learning LangChain: Building AI and LLM Applications with LangChain and LangGraph"](https://www.oreilly.com/library/view/learning-langchain/9781098167271/) published by O'Reilly Media. To run the examples, you can clone the repository and run the examples in your preferred language folders. ## Table of Contents - [Quick Start](#quick-start) - [Environment variables setup](#environment-variables-setup) - [Running the chapter examples](#running-the-chapter-examples) - [Repository Structure](#repository-structure) - [Chapter-wise Examples](#chapter-wise-examples) - [Docker Setup and Usage](#docker-setup-and-usage) - [Installing Docker](#installing-docker) - [Running the PostgreSQL Container](#running-the-postgresql-container) - [Troubleshooting Docker](#troubleshooting-docker) - [Setting up Chinook.db with SQLite](#setting-up-chinookdb-with-sqlite) - [General Troubleshooting](#general-troubleshooting) ## Quick Start ### Environment variables setup First, we need the environment variables required to run the examples in this repository. You can find the full list in the `.env.example` file. Copy this file to a `.env` and fill in the values: ```bash cp .env.example .env ``` - **OPENAI_API_KEY**: You can get your key [here](https://platform.openai.com/account/api-keys). This will enable you to run the examples that require an OpenAI model. - **LANGCHAIN_API_KEY**: You can get your key by creating an account [here](https://smith.langchain.com/). This will enable you to interact with the LangSmith tracing and debugging tools. - **LANGCHAIN_TRACING_V2=true**: This is required to enable visual tracing and debugging in LangSmith for the examples. If you want to run the production example in chapter 9, you need a Supabase account and a Supabase API key: 1. To register for a Supabase account, go to [supabase.com](https://supabase.com) and sign up. 2. Once you have an account, create a new project then navigate to the settings section. 3. In the settings section, navigate to the API section to see your keys. 4. Copy the project URL and service_role key and add them to the `.env` file as values for `SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY`. ### Running the chapter examples #### For Python examples: If you haven't installed Python on your system, install it first as per the instructions [here](https://www.python.org/downloads/). 1. Create a virtual environment: ```bash python -m venv .venv ``` 2. Activate the virtual environment: For MacOS/Linux: ```bash source .venv/bin/activate ``` For Windows: ```bash .venv\Scripts\activate ``` After activation, your terminal prompt should prefix with (venv), indicating that the virtual environment is active. 3. Install the dependencies in the pyproject.toml file: ```bash pip install -e . ``` 4. Verify the installation: ```bash pip list ``` 5. Run an example to see the output: ```bash python ch2/py/a-text-loader.py ``` #### For JavaScript examples: If you haven't installed Node.js on your system, install it first as per the instructions [here](https://nodejs.org/). 1. Install the dependencies in the package.json file: ```bash npm install ``` 2. Run the example to see the output: ```bash node ch2/js/a-text-loader.js ``` ## Repository Structure The repository is structured as follows: ``` ├── .env.example # Example environment variables ├── learning-langchain # Root directory │ ├── ch1 # Chapter 1 examples │ │ ├── js # JavaScript examples │ │ │ ├── a-llm.js # Example file │ │ │ └── ... │ │ └── py # Python examples │ │ ├── a-llm.py # Example file │ │ └── ... │ ├── ch2 # Chapter 2 examples │ │ ├── js # JavaScript examples │ │ │ └── ... │ │ └── py # Python examples │ │ └── ... │ ├── ... # Remaining chapters │ ├── test.pdf # Test PDF file │ ├── test.txt # Test text file │ ├── package.json # JavaScript dependencies │ ├── pyproject.toml # Python dependencies │ └── README.md # This file └── ... ``` Each chapter (ch1, ch2, etc.) contains subdirectories `js` and `py` for JavaScript and Python examples, respectively. ## Chapter-wise Examples Here's a brief overview of the code examples available for each chapter: ### Chapter 1: Introduction to LangChain Demonstrates basic usage of LLMs, Chat models, prompts, and output parsers. Files: - `ch1/js/*.js`: JavaScript examples - `ch1/py/*.py`: Python examples ### Chapter 2: Document Loading and Data Transformation Covers loading data from various sources (text files, web pages, PDFs), splitting text into chunks, and creating embeddings. Files: - `ch2/js/*.js`: JavaScript examples - `ch2/py/*.py`: Python examples ### Chapter 3: Retrieval Explores different retrieval strategies, including basic RAG, query rewriting, multi-query, RAG fusion, and self-query. Files: - `ch3/js/*.js`: JavaScript examples - `ch3/py/*.py`: Python examples ### Chapter 4: Memory Demonstrates how to add memory to your chains and agents, including simple memory, state graphs, persistent memory, and message trimming/filtering/merging. Files: - `ch4/js/*.js`: JavaScript examples - `ch4/py/*.py`: Python examples ### Chapter 5: Chatbots Shows how to build chatbots using LangGraph, including basic chatbots, SQL generators, and multi-RAG chatbots. Files: - `ch5/js/*.js`: JavaScript examples - `ch5/py/*.py`: Python examples ### Chapter 6: Agents Covers building agents with tools, including basic agents, forcing the first tool, and using many tools. Files: - `ch6/js/*.js`: JavaScript examples - `ch6/py/*.py`: Python examples ### Chapter 7: Subgraphs Explores how to use subgraphs to create more complex agents, including reflection, direct subgraphs, function subgraphs, and supervisors. Files: - `ch7/js/*.js`: JavaScript examples - `ch7/py/*.py`: Python examples ### Chapter 8: Productionizing LangGraph Demonstrates how to productionize LangGraph applications, including structured output, streaming output, interruption, authorization, resuming, editing state, and forking. Files: - `ch8/js/*.js`: JavaScript examples - `ch8/py/*.py`: Python examples ### Chapter 9: Deployment Provides examples of deploying LangGraph applications. Files: - `ch9/js/*`: JavaScript examples - `ch9/py/*`: Python examples #### Running the Local Development Server You can run the local development server for either JavaScript or Python implementations from the root directory: ##### For JavaScript: ```bash # Using npm script npm run langgraph:dev ``` ##### For Python: You have two options: 1. Using the CLI directly: ```bash langgraph dev -c ch9/py/langgraph.json --verbose ``` 2. Using the installed script command: ```bash langgraph-dev ``` Note: To use the script command, make sure you have installed the package in development mode (`pip install -e .`). ### Chapter 10: Evaluation Shows how to evaluate LangChain applications, including agent evaluation for RAG and SQL, and creating datasets. Files: - `ch10/js/*.js`: JavaScript examples - `ch10/py/*.py`: Python examples ## Docker Setup and Usage Several examples in this repository require Docker to be installed and running to set up a PostgreSQL database with the pgvector extension. This section provides guidance on setting up Docker and running the PostgreSQL container. ### Installing Docker 1. Download Docker Desktop: Go to the Docker [website](https://www.docker.com/get-started/) and download the appropriate version for your operating system (Windows, macOS, or Linux). 2. Install Docker Desktop: - Windows: Double-click the downloaded installer and follow the on-screen instructions. You may need to enable virtualization in your BIOS settings. - macOS: Drag the Docker icon to the Applications folder and double-click to start. - Linux: Follow the instructions provided on the Docker website for your specific distribution. 3. Start Docker Desktop: After installation, start Docker Desktop. On Windows and macOS, it will run in the system tray. On Linux, you may need to start it manually. 4. Verify the installation: To check if Docker is installed, run: ```bash docker --version ``` ### Running the PostgreSQL Container Run the Docker command: Open a terminal or command prompt and run the following command to start the PostgreSQL container with the pgvector extension: ```bash docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 ``` Explanation of the command: - `docker run`: Starts a new container. - `--name pgvector-container`: Assigns the name "pgvector-container" to the container. - `-e POSTGRES_USER=langchain`: Sets the PostgreSQL user to "langchain". - `-e POSTGRES_PASSWORD=langchain`: Sets the PostgreSQL password to "langchain". - `-e POSTGRES_DB=langchain`: Sets the default database name to "langchain". - `-p 6024:5432`: Maps port 6024 on your host machine to port 5432 in the container (PostgreSQL's default port). - `-d pgvector/pgvector:pg16`: Specifies the image to use (pgvector/pgvector:pg16), which includes PostgreSQL 16 and the pgvector extension. #### Verify the Container is Running: Run the following command to list running containers: ```bash docker ps ``` You should see the "pgvector-container" listed with a status of "Up". #### Accessing the PostgreSQL Database: You can now access the PostgreSQL database from your code using the following connection string: ``` postgresql://langchain:langchain@localhost:6024/langchain ``` ### Troubleshooting Docker #### Docker Desktop Not Starting: - **Windows**: Ensure that virtualization is enabled in your BIOS settings. Check the Docker Desktop logs for any specific error messages. - **macOS**: Make sure you have granted Docker Desktop the necessary permissions in System Preferences. - **Linux**: Ensure that the Docker daemon is running and that your user has the necessary permissions to run Docker commands. #### Container Not Running: Check the container logs for any errors: ```bash docker logs pgvector-container ``` Look for error messages related to PostgreSQL startup or pgvector initialization. #### Port Conflict: If port 6024 is already in use, you can change the port mapping in the docker run command to an available port. For example, `-p 6025:5432`. #### Image Not Found: Ensure that you have an internet connection and that the pgvector/pgvector:pg16 image is available on Docker Hub. #### Permissions Issues: On Linux, you may encounter permissions issues when running Docker commands. Ensure that your user is part of the docker group: ```bash sudo usermod -aG docker $USER newgrp docker ``` #### General Docker Troubleshooting: - Restart Docker Desktop - Update Docker Desktop to the latest version - Check the Docker documentation for troubleshooting tips specific to your operating system ### Setting up Chinook.db with SQLite Some examples in Chapter 3 and Chapter 10 use the Chinook database, a sample database for a digital media store, with SQLite. Here's how to set it up: #### Download the Chinook Database Schema: Open a terminal or command prompt and use curl to download the Chinook databas: ```bash curl -s https://raw.githubusercontent.com/lerocha/chinook-database/master/ChinookDatabase/DataSources/Chinook_Sqlite.sql | sqlite3 Chinook.db ``` This will create a file called `Chinook.db` in the current directory. #### Verify the Setup: You can verify that the database is set up correctly by connecting to it using the sqlite3 tool and running a simple query: ```bash sqlite3 Chinook.db ``` Then, inside the sqlite3 prompt, run: ```sql SELECT * FROM Artist LIMIT 10; ``` If the setup is successful, you should see the first 10 rows from the Artist table. #### Place Chinook.db in the Correct Directory: Ensure that the Chinook.db file is located in the same directory as the code examples that use it. ## General Troubleshooting ### Dependency Conflicts: If you encounter errors related to conflicting dependencies, try creating a fresh virtual environment and reinstalling the dependencies. Ensure that your package.json or pyproject.toml files specify compatible versions of the libraries. ### PgVector Vector Store Installation or Connection Errors: #### Errors for Python: If you can't find `psycopg` or `psycopg_binary`: Try to reinstall psycopg with the `[binary]` extra, which includes pre-compiled binaries and necessary dependencies: ```bash pip install psycopg[binary] ``` Then run the file again. If you're having issues connecting to Postgres via Docker, you can try some alternative vector stores: 1. Use the memory vector store instead: This is a simple vector store that stores vectors in memory. It is not persistent and will be lost when the program is terminated. Here's the [API for Python](https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/memory) and [docs for Javascript](https://js.langchain.com/docs/modules/data_connection/vectorstores/integrations/memory). 2. You can also use Chroma-- an AI-native open-source vector database. You can install Chroma as per the instructions for [Python](https://python.langchain.com/docs/integrations/vectorstores/chroma) or [Javascript](https://js.langchain.com/docs/modules/data_connection/vectorstores/integrations/chroma). ================================================ FILE: ch1/js/a-llm.js ================================================ import { ChatOpenAI } from '@langchain/openai'; const model = new ChatOpenAI({ model: 'gpt-3.5-turbo' }); const response = await model.invoke('The sky is'); console.log(response); ================================================ FILE: ch1/js/b-chat.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { HumanMessage } from '@langchain/core/messages'; const model = new ChatOpenAI(); const prompt = [new HumanMessage('What is the capital of France?')]; const response = await model.invoke(prompt); console.log(response); ================================================ FILE: ch1/js/c-system.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { HumanMessage, SystemMessage } from '@langchain/core/messages'; const model = new ChatOpenAI(); const prompt = [ new SystemMessage( 'You are a helpful assistant that responds to questions with three exclamation marks.' ), new HumanMessage('What is the capital of France?'), ]; const response = await model.invoke(prompt); console.log(response); ================================================ FILE: ch1/js/d-prompt.js ================================================ import { PromptTemplate } from '@langchain/core/prompts'; const template = PromptTemplate.fromTemplate(`Answer the question based on the context below. If the question cannot be answered using the information provided, answer with "I don't know". Context: {context} Question: {question} Answer: `); const response = await template.invoke({ context: "The most recent advancements in NLP are being driven by Large Language Models (LLMs). These models outperform their smaller counterparts and have become invaluable for developers who are creating applications with NLP capabilities. Developers can tap into these models through Hugging Face's `transformers` library, or by utilizing OpenAI and Cohere's offerings through the `openai` and `cohere` libraries, respectively.", question: 'Which model providers offer LLMs?', }); console.log(response); ================================================ FILE: ch1/js/e-prompt-model.js ================================================ import { PromptTemplate } from '@langchain/core/prompts'; import { OpenAI } from '@langchain/openai'; const model = new OpenAI({ model: 'gpt-3.5-turbo', }); const template = PromptTemplate.fromTemplate(`Answer the question based on the context below. If the question cannot be answered using the information provided, answer with "I don't know". Context: {context} Question: {question} Answer: `); const prompt = await template.invoke({ context: "The most recent advancements in NLP are being driven by Large Language Models (LLMs). These models outperform their smaller counterparts and have become invaluable for developers who are creating applications with NLP capabilities. Developers can tap into these models through Hugging Face's `transformers` library, or by utilizing OpenAI and Cohere's offerings through the `openai` and `cohere` libraries, respectively.", question: 'Which model providers offer LLMs?', }); const response = await model.invoke(prompt); console.log(response); ================================================ FILE: ch1/js/f-chat-prompt.js ================================================ import { ChatPromptTemplate } from '@langchain/core/prompts'; const template = ChatPromptTemplate.fromMessages([ [ 'system', 'Answer the question based on the context below. If the question cannot be answered using the information provided, answer with "I don\'t know".', ], ['human', 'Context: {context}'], ['human', 'Question: {question}'], ]); const response = await template.invoke({ context: "The most recent advancements in NLP are being driven by Large Language Models (LLMs). These models outperform their smaller counterparts and have become invaluable for developers who are creating applications with NLP capabilities. Developers can tap into these models through Hugging Face's `transformers` library, or by utilizing OpenAI and Cohere's offerings through the `openai` and `cohere` libraries, respectively.", question: 'Which model providers offer LLMs?', }); console.log(response); ================================================ FILE: ch1/js/g-chat-prompt-model.js ================================================ import { ChatPromptTemplate } from '@langchain/core/prompts'; import { ChatOpenAI } from '@langchain/openai'; const model = new ChatOpenAI(); const template = ChatPromptTemplate.fromMessages([ [ 'system', 'Answer the question based on the context below. If the question cannot be answered using the information provided, answer with "I don\'t know".', ], ['human', 'Context: {context}'], ['human', 'Question: {question}'], ]); const prompt = await template.invoke({ context: "The most recent advancements in NLP are being driven by Large Language Models (LLMs). These models outperform their smaller counterparts and have become invaluable for developers who are creating applications with NLP capabilities. Developers can tap into these models through Hugging Face's `transformers` library, or by utilizing OpenAI and Cohere's offerings through the `openai` and `cohere` libraries, respectively.", question: 'Which model providers offer LLMs?', }); const response = await model.invoke(prompt); console.log(response); ================================================ FILE: ch1/js/h-structured.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { z } from 'zod'; const answerSchema = z .object({ answer: z.string().describe("The answer to the user's question"), justification: z.string().describe('Justification for the answer'), }) .describe( "An answer to the user's question along with justification for the answer." ); const model = new ChatOpenAI({ model: 'gpt-3.5-turbo', temperature: 0, }).withStructuredOutput(answerSchema); const response = await model.invoke( 'What weighs more, a pound of bricks or a pound of feathers' ); console.log(response); ================================================ FILE: ch1/js/i-csv.js ================================================ import { CommaSeparatedListOutputParser } from '@langchain/core/output_parsers'; const parser = new CommaSeparatedListOutputParser(); const response = await parser.invoke('apple, banana, cherry'); console.log(response); ================================================ FILE: ch1/js/j-methods.js ================================================ import { ChatOpenAI } from '@langchain/openai'; const model = new ChatOpenAI(); const response = await model.invoke('Hi there!'); console.log(response); // Hi! const completions = await model.batch(['Hi there!', 'Bye!']); // ['Hi!', 'See you!'] for await (const token of await model.stream('Bye!')) { console.log(token); // Good // bye // ! } ================================================ FILE: ch1/js/k-imperative.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { RunnableLambda } from '@langchain/core/runnables'; // the building blocks const template = ChatPromptTemplate.fromMessages([ ['system', 'You are a helpful assistant.'], ['human', '{question}'], ]); const model = new ChatOpenAI({ model: 'gpt-3.5-turbo', }); // combine them in a function // RunnableLambda adds the same Runnable interface for any function you write const chatbot = RunnableLambda.from(async (values) => { const prompt = await template.invoke(values); return await model.invoke(prompt); }); // use it const response = await chatbot.invoke({ question: 'Which model providers offer LLMs?', }); console.log(response); ================================================ FILE: ch1/js/ka-stream.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { RunnableLambda } from '@langchain/core/runnables'; const template = ChatPromptTemplate.fromMessages([ ['system', 'You are a helpful assistant.'], ['human', '{question}'], ]); const model = new ChatOpenAI({ model: 'gpt-3.5-turbo', }); const chatbot = RunnableLambda.from(async function* (values) { const prompt = await template.invoke(values); for await (const token of await model.stream(prompt)) { yield token; } }); for await (const token of await chatbot.stream({ question: 'Which model providers offer LLMs?', })) { console.log(token); } ================================================ FILE: ch1/js/l-declarative.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { RunnableLambda } from '@langchain/core/runnables'; // the building blocks const template = ChatPromptTemplate.fromMessages([ ['system', 'You are a helpful assistant.'], ['human', '{question}'], ]); const model = new ChatOpenAI({ model: 'gpt-3.5-turbo', }); // combine them in a function const chatbot = template.pipe(model); // use it const response = await chatbot.invoke({ question: 'Which model providers offer LLMs?', }); console.log(response); //streaming for await (const part of chatbot.stream({ question: 'Which model providers offer LLMs?', })) { console.log(part); } ================================================ FILE: ch1/py/a-llm.py ================================================ from langchain_openai.chat_models import ChatOpenAI model = ChatOpenAI(model="gpt-3.5-turbo") response = model.invoke("The sky is") print(response.content) ================================================ FILE: ch1/py/b-chat.py ================================================ from langchain_openai.chat_models import ChatOpenAI from langchain_core.messages import HumanMessage model = ChatOpenAI() prompt = [HumanMessage("What is the capital of France?")] response = model.invoke(prompt) print(response.content) ================================================ FILE: ch1/py/c-system.py ================================================ from langchain_core.messages import HumanMessage, SystemMessage from langchain_openai.chat_models import ChatOpenAI model = ChatOpenAI() system_msg = SystemMessage( "You are a helpful assistant that responds to questions with three exclamation marks." ) human_msg = HumanMessage("What is the capital of France?") response = model.invoke([system_msg, human_msg]) print(response.content) ================================================ FILE: ch1/py/d-prompt.py ================================================ from langchain_core.prompts import PromptTemplate template = PromptTemplate.from_template("""Answer the question based on the context below. If the question cannot be answered using the information provided, answer with "I don't know". Context: {context} Question: {question} Answer: """) response = template.invoke( { "context": "The most recent advancements in NLP are being driven by Large Language Models (LLMs). These models outperform their smaller counterparts and have become invaluable for developers who are creating applications with NLP capabilities. Developers can tap into these models through Hugging Face's `transformers` library, or by utilizing OpenAI and Cohere's offerings through the `openai` and `cohere` libraries, respectively.", "question": "Which model providers offer LLMs?", } ) print(response) ================================================ FILE: ch1/py/e-prompt-model.py ================================================ from langchain_openai.chat_models import ChatOpenAI from langchain_core.prompts import PromptTemplate # both `template` and `model` can be reused many times template = PromptTemplate.from_template("""Answer the question based on the context below. If the question cannot be answered using the information provided, answer with "I don't know". Context: {context} Question: {question} Answer: """) model = ChatOpenAI(model="gpt-3.5-turbo") # `prompt` and `completion` are the results of using template and model once prompt = template.invoke( { "context": "The most recent advancements in NLP are being driven by Large Language Models (LLMs). These models outperform their smaller counterparts and have become invaluable for developers who are creating applications with NLP capabilities. Developers can tap into these models through Hugging Face's `transformers` library, or by utilizing OpenAI and Cohere's offerings through the `openai` and `cohere` libraries, respectively.", "question": "Which model providers offer LLMs?", } ) response = model.invoke(prompt) print(response) ================================================ FILE: ch1/py/f-chat-prompt.py ================================================ from langchain_core.prompts import ChatPromptTemplate template = ChatPromptTemplate.from_messages( [ ( "system", 'Answer the question based on the context below. If the question cannot be answered using the information provided, answer with "I don\'t know".', ), ("human", "Context: {context}"), ("human", "Question: {question}"), ] ) response = template.invoke( { "context": "The most recent advancements in NLP are being driven by Large Language Models (LLMs). These models outperform their smaller counterparts and have become invaluable for developers who are creating applications with NLP capabilities. Developers can tap into these models through Hugging Face's `transformers` library, or by utilizing OpenAI and Cohere's offerings through the `openai` and `cohere` libraries, respectively.", "question": "Which model providers offer LLMs?", } ) print(response) ================================================ FILE: ch1/py/g-chat-prompt-model.py ================================================ from langchain_openai.chat_models import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate # both `template` and `model` can be reused many times template = ChatPromptTemplate.from_messages( [ ( "system", 'Answer the question based on the context below. If the question cannot be answered using the information provided, answer with "I don\'t know".', ), ("human", "Context: {context}"), ("human", "Question: {question}"), ] ) model = ChatOpenAI() # `prompt` and `completion` are the results of using template and model once prompt = template.invoke( { "context": "The most recent advancements in NLP are being driven by Large Language Models (LLMs). These models outperform their smaller counterparts and have become invaluable for developers who are creating applications with NLP capabilities. Developers can tap into these models through Hugging Face's `transformers` library, or by utilizing OpenAI and Cohere's offerings through the `openai` and `cohere` libraries, respectively.", "question": "Which model providers offer LLMs?", } ) print(model.invoke(prompt)) ================================================ FILE: ch1/py/h-structured.py ================================================ from langchain_openai import ChatOpenAI from pydantic import BaseModel class AnswerWithJustification(BaseModel): """An answer to the user's question along with justification for the answer.""" answer: str """The answer to the user's question""" justification: str """Justification for the answer""" llm = ChatOpenAI(model="gpt-3.5", temperature=0) structured_llm = llm.with_structured_output(AnswerWithJustification) response = structured_llm.invoke( "What weighs more, a pound of bricks or a pound of feathers") print(response) ================================================ FILE: ch1/py/i-csv.py ================================================ from langchain_core.output_parsers import CommaSeparatedListOutputParser parser = CommaSeparatedListOutputParser() response = parser.invoke("apple, banana, cherry") print(response) ================================================ FILE: ch1/py/j-methods.py ================================================ from langchain_openai.chat_models import ChatOpenAI model = ChatOpenAI(model="gpt-3.5-turbo") completion = model.invoke("Hi there!") # Hi! completions = model.batch(["Hi there!", "Bye!"]) # ['Hi!', 'See you!'] for token in model.stream("Bye!"): print(token) # Good # bye # ! ================================================ FILE: ch1/py/k-imperative.py ================================================ from langchain_openai.chat_models import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate from langchain_core.runnables import chain # the building blocks template = ChatPromptTemplate.from_messages( [ ("system", "You are a helpful assistant."), ("human", "{question}"), ] ) model = ChatOpenAI(model="gpt-3.5-turbo") # combine them in a function # @chain decorator adds the same Runnable interface for any function you write @chain def chatbot(values): prompt = template.invoke(values) return model.invoke(prompt) # use it response = chatbot.invoke({"question": "Which model providers offer LLMs?"}) print(response.content) ================================================ FILE: ch1/py/ka-stream.py ================================================ from langchain_core.runnables import chain from langchain_openai.chat_models import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate model = ChatOpenAI(model="gpt-3.5-turbo") template = ChatPromptTemplate.from_messages( [ ("system", "You are a helpful assistant."), ("human", "{question}"), ] ) @chain def chatbot(values): prompt = template.invoke(values) for token in model.stream(prompt): yield token for part in chatbot.stream({"question": "Which model providers offer LLMs?"}): print(part) ================================================ FILE: ch1/py/kb-async.py ================================================ from langchain_core.runnables import chain from langchain_openai.chat_models import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate template = ChatPromptTemplate.from_messages( [ ("system", "You are a helpful assistant."), ("human", "{question}"), ] ) model = ChatOpenAI(model="gpt-3.5-turbo") @chain async def chatbot(values): prompt = await template.ainvoke(values) return await model.ainvoke(prompt) async def main(): return await chatbot.ainvoke({"question": "Which model providers offer LLMs?"}) if __name__ == "__main__": import asyncio print(asyncio.run(main())) ================================================ FILE: ch1/py/l-declarative.py ================================================ from langchain_openai.chat_models import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate # the building blocks template = ChatPromptTemplate.from_messages( [ ("system", "You are a helpful assistant."), ("human", "{question}"), ] ) model = ChatOpenAI() # combine them with the | operator chatbot = template | model # use it response = chatbot.invoke({"question": "Which model providers offer LLMs?"}) print(response.content) # streaming for part in chatbot.stream({"question": "Which model providers offer LLMs?"}): print(part) ================================================ FILE: ch10/js/agent-evaluation-rag.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { evaluate } from 'langsmith/evaluation'; import { traceable } from 'langsmith/traceable'; import { graph } from './rag-graph.js'; import { z } from 'zod'; const defaultDataset = 'langchain-blogs-qa'; const experimentPrefix = 'langchain-blogs-qa-evals'; const llm = new ChatOpenAI({ model: 'gpt-4o', temperature: 0 }); const EVALUATION_PROMPT = `You are a teacher grading a quiz. You will be given a QUESTION, the GROUND TRUTH (correct) RESPONSE, and the STUDENT RESPONSE. Here is the grade criteria to follow: (1) Grade the student responses based ONLY on their factual accuracy relative to the ground truth answer. (2) Ensure that the student response does not contain any conflicting statements. (3) It is OK if the student response contains more information than the ground truth response, as long as it is factually accurate relative to the ground truth response. Correctness: True means that the student's response meets all of the criteria. False means that the student's response does not meet all of the criteria. Explain your reasoning in a step-by-step manner to ensure your reasoning and conclusion are correct.`; const userPrompt = `QUESTION: {question} GROUND TRUTH RESPONSE: {reference} STUDENT RESPONSE: {answer}`; const prompt = ChatPromptTemplate.fromMessages([ ['system', EVALUATION_PROMPT], ['user', userPrompt], ]); // LLM-as-judge output schema const grade = z .object({ reasoning: z .string() .describe( 'Explain your reasoning for whether the actual response is correct or not.' ), isCorrect: z .boolean() .describe( 'True if the student response is mostly or exactly correct, otherwise False.' ), }) .describe( 'Compare the expected and actual answers and grade the actual answer.' ); const graderLlm = prompt.pipe(llm.withStructuredOutput(grade)); const evaluateAgent = async (run, example) => { const question = run.inputs.question; const answer = run.outputs.answer; const reference = example.outputs.answer; const grade = await graderLlm.invoke({ question, reference, answer }); const isCorrect = grade.isCorrect; return { key: 'correct', score: Number(isCorrect) }; }; const runGraph = traceable(async (inputs) => { const answer = await graph.invoke({ question: inputs.question }); return { answer: answer.answer }; }); await evaluate((inputs) => runGraph(inputs), { data: defaultDataset, evaluators: [evaluateAgent], experimentPrefix, maxConcurrency: 4, }); ================================================ FILE: ch10/js/agent-evaluation-sql.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { graph } from './agent-sql-graph.js'; import crypto from 'crypto'; import * as hub from 'langchain/hub'; import { evaluate } from 'langsmith/evaluation'; import { traceable } from 'langsmith/traceable'; import { z } from 'zod'; const thread_id = crypto.randomUUID(); const config = { configurable: { thread_id: thread_id, }, }; const llm = new ChatOpenAI({ model: 'gpt-4o-mini', temperature: 0 }); const predictSQLAgentAnswer = traceable(async (example) => { const messages = await graph.invoke( { messages: ['user', example.input] }, config ); return { response: messages.messages[messages.messages.length - 1].content }; }); const gradePromptAnswerAccuracy = await hub.pull( 'langchain-ai/rag-answer-vs-reference' ); const grade = z.object({ score: z.number(), }); const answerEvaluator = async (run, example) => { const input_question = example.inputs['input']; const reference = example.outputs['output']; const prediction = run.outputs['response']; const grader = gradePromptAnswerAccuracy.pipe(llm); const score = await grader.invoke({ question: input_question, correct_answer: reference, student_answer: prediction, }); return { key: 'answer_v_reference_score', score: score.Score }; }; const datasetName = 'sql-agent-response'; const experimentPrefix = 'sql-agent-gpt4o'; const experimentResults = await evaluate( (inputs) => predictSQLAgentAnswer(inputs), { data: datasetName, evaluators: [answerEvaluator], experimentPrefix, maxConcurrency: 4, } ); // Single tool evaluation const predictAssistant = traceable(async (example) => { const result = await graph.invoke( { messages: [['user', example.input]] }, config ); return { response: result }; }); const checkSpecificToolCall = async (run, example) => { const response = run.outputs['response']; const messages = response.messages; let firstToolCall = null; for (const message of messages) { if (message.tool_calls?.length > 0) { // Get the name of the first tool call in the message firstToolCall = message.tool_calls[0].name; break; } } const expected_tool_call = 'list-tables-sql'; const score = firstToolCall === expected_tool_call ? 1 : 0; return { key: 'single_tool_call', score: score, }; }; const singleToolCallResults = await evaluate( (inputs) => predictAssistant(inputs), { data: datasetName, evaluators: [checkSpecificToolCall], experimentPrefix: `${experimentPrefix}-single-tool`, maxConcurrency: 4, } ); const EXPECTED_TOOLS = { LIST_TABLES: 'list-tables-sql', SCHEMA: 'info-sql', QUERY_CHECK: 'query-checker', QUERY_EXEC: 'query-sql', RESULT_CHECK: 'checkResult', }; const containsAllToolCallsAnyOrder = async ({ run, example }) => { const expected = [ EXPECTED_TOOLS.LIST_TABLES, EXPECTED_TOOLS.SCHEMA, EXPECTED_TOOLS.QUERY_CHECK, EXPECTED_TOOLS.QUERY_EXEC, ]; const messages = run.outputs?.response?.messages || []; const toolCalls = Array.from( new Set( messages.flatMap( (m) => m.tool_calls?.map((tc) => tc.name) || m.name || [] ) ) ); const score = expected.every((tool) => toolCalls.includes(tool)) ? 1 : 0; return { key: 'multi_tool_call_any_order', score }; }; const containsAllToolCallsInOrder = async ({ run, example }) => { const expectedSequence = [ EXPECTED_TOOLS.LIST_TABLES, EXPECTED_TOOLS.SCHEMA, EXPECTED_TOOLS.QUERY_CHECK, EXPECTED_TOOLS.QUERY_EXEC, ]; const messages = run.outputs?.response?.messages || []; const toolCalls = messages.flatMap( (m) => m.tool_calls?.map((tc) => tc.name) || m.name || [] ); let seqIndex = 0; for (const call of toolCalls) { if (call === expectedSequence[seqIndex]) { seqIndex++; if (seqIndex === expectedSequence.length) break; } } return { key: 'multi_tool_call_in_order', score: seqIndex === expectedSequence.length ? 1 : 0, }; }; const containsAllToolCallsExactOrder = async ({ run, example }) => { const expectedSequence = [ EXPECTED_TOOLS.LIST_TABLES, EXPECTED_TOOLS.SCHEMA, EXPECTED_TOOLS.QUERY_CHECK, EXPECTED_TOOLS.QUERY_EXEC, ]; const messages = run.outputs?.response?.messages || []; const toolCalls = messages.flatMap( (m) => m.tool_calls?.map((tc) => tc.name) || m.name || [] ); // Find the first occurrence sequence const firstOccurrences = []; for (const call of toolCalls) { if (call === expectedSequence[firstOccurrences.length]) { firstOccurrences.push(call); if (firstOccurrences.length === expectedSequence.length) break; } } const score = JSON.stringify(firstOccurrences) === JSON.stringify(expectedSequence) ? 1 : 0; return { key: 'multi_tool_call_exact_order', score }; }; // Prediction functions for different evaluation types const predictSqlAgentMessages = traceable(async (example) => { const result = await graph.invoke( { messages: [['user', example.input]] }, config ); return { response: result }; }); // Trajectory Evaluation Execution const trajectoryResults = await evaluate( (inputs) => predictSqlAgentMessages(inputs), { data: datasetName, evaluators: [ containsAllToolCallsAnyOrder, containsAllToolCallsInOrder, containsAllToolCallsExactOrder, ], experimentPrefix: `${experimentPrefix}-full-trajectory`, maxConcurrency: 4, } ); ================================================ FILE: ch10/js/agent-sql-graph.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { SqlDatabase } from 'langchain/sql_db'; import { DataSource } from 'typeorm'; import { SqlToolkit } from 'langchain/agents/toolkits/sql'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { z } from 'zod'; import { tool } from '@langchain/core/tools'; import { ToolNode } from '@langchain/langgraph/prebuilt'; import { SqliteSaver } from '@langchain/langgraph-checkpoint-sqlite'; import { StateGraph, MessagesAnnotation, END, START, } from '@langchain/langgraph'; import Database from 'better-sqlite3'; // LLM const llm = new ChatOpenAI({ model: 'gpt-4o', temperature: 0 }); // SQL toolkit const datasource = new DataSource({ type: 'sqlite', database: 'Chinook_Sqlite.sqlite', }); const db = await SqlDatabase.fromDataSourceParams({ appDataSource: datasource, }); console.log(db.allTables.map((t) => t.tableName)); const toolkit = new SqlToolkit(db, llm); const tools = toolkit.getTools(); // Query checking const queryCheckSystemPrompt = `You are a SQL expert with a strong attention to detail. Double check the SQLite query for common mistakes, including: - Using NOT IN with NULL values - Using UNION when UNION ALL should have been used - Using BETWEEN for exclusive ranges - Data type mismatch in predicates - Properly quoting identifiers - Using the correct number of arguments for functions - Casting to the correct data type - Using the proper columns for joins If there are any of the above mistakes, rewrite the query. If there are no mistakes, just reproduce the original query. Execute the correct query with the appropriate tool.`; const queryCheckPrompt = ChatPromptTemplate.fromMessages([ ['system', queryCheckSystemPrompt], ['user', '{query}'], ]); const queryChain = queryCheckPrompt.pipe(llm); const checkQueryTool = tool( async (input) => { const res = await queryChain.invoke(input.query); return res.content; }, { name: 'checkQuery', description: 'Use this tool to double check if your query is correct before executing it.', schema: z.object({ query: z.string(), }), } ); // Query result checking const queryResultCheckSystemPrompt = `You are grading the result of a SQL query from a DB. - Check that the result is not empty. - If it is empty, instruct the system to re-try!`; const queryResultCheckPrompt = ChatPromptTemplate.fromMessages([ ['system', queryResultCheckSystemPrompt], ['user', '{query_result}'], ]); const queryResultChain = queryResultCheckPrompt.pipe(llm); const checkResultTool = tool( async (input) => { const res = await queryResultChain.invoke(input.query); return res.content; }, { name: 'checkResult', description: 'Use this tool to check the query result from the database to confirm it is not empty and is relevant.', schema: z.object({ query_result: z.string(), }), } ); tools.push(checkQueryTool, checkResultTool); // Assistant runnable const queryGenSystem = ` ROLE: You are an agent designed to interact with a SQL database. You have access to tools for interacting with the database. GOAL: Given an input question, create a syntactically correct SQLite query to run, then look at the results of the query and return the answer. INSTRUCTIONS: - Only use the below tools for the following operations. - Only use the information returned by the below tools to construct your final answer. - To start you should ALWAYS look at the tables in the database to see what you can query. Do NOT skip this step. - Then you should query the schema of the most relevant tables. - Write your query based upon the schema of the tables. You MUST double check your query before executing it. - Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most 5 results. - You can order the results by a relevant column to return the most interesting examples in the database. - Never query for all the columns from a specific table, only ask for the relevant columns given the question. - If you get an error while executing a query, rewrite the query and try again. - If the query returns a result, use check_result tool to check the query result. - If the query result result is empty, think about the table schema, rewrite the query, and try again. - DO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database. `; const queryGenPrompt = ChatPromptTemplate.fromMessages([ ['system', queryGenSystem], ['placeholder', '{messages}'], ]); const modelWithTools = queryGenPrompt.pipe(llm.bindTools(tools)); const handleToolError = async (state) => { const { messages } = state; const toolsByName = { checkQuery: checkQueryTool, checkResult: checkResultTool, }; const lastMessage = messages[messages.length - 1]; const outputMessages = []; for (const toolCall of lastMessage.tool_calls) { try { const toolResult = await toolsByName[toolCall.name].invoke(toolCall); outputMessages.push(toolResult); } catch (error) { // Return the error if the tool call fails outputMessages.push( new ToolMessage({ content: error.message, name: toolCall.name, tool_call_id: toolCall.id, additional_kwargs: { error }, }) ); } } return { messages: outputMessages }; }; const toolNodeForGraph = new ToolNode(tools).withFallbacks([handleToolError]); const shouldContinue = (state) => { const { messages } = state; const lastMessage = messages[messages.length - 1]; if ( 'tool_calls' in lastMessage && Array.isArray(lastMessage.tool_calls) && lastMessage.tool_calls?.length ) { return 'tools'; } return END; }; export const callModel = async (state) => { const { messages } = state; const response = await modelWithTools.invoke({ messages }); return { messages: response }; }; const builder = new StateGraph(MessagesAnnotation) // Define the two nodes we will cycle between .addNode('agent', callModel) .addNode('tools', toolNodeForGraph) .addEdge(START, 'agent') .addConditionalEdges('agent', shouldContinue, ['tools', END]) .addEdge('tools', 'agent'); const memory = new SqliteSaver(new Database(':memory:')); export const graph = builder.compile({ checkpointer: memory }); ================================================ FILE: ch10/js/create-rag-dataset.js ================================================ import { Client } from 'langsmith'; const client = new Client(); const exampleInputs = [ [ 'Which companies are highlighted as top LangGraph agent adopters in 2024?', 'The top adopters include Uber (code migration tools), AppFolio (property management copilot), LinkedIn (SQL Bot), Elastic (AI assistant), and Replit (multi-agent development platform) :cite[3].', ], [ "How did AppFolio's AI copilot impact property managers?", "AppFolio's Realm-X AI copilot saved property managers over 10 hours per week by automating queries, bulk actions, and scheduling :cite[3].", ], [ 'What infrastructure trends dominated LLM usage in 2024?', 'OpenAI remained the top LLM provider (6x more usage than Ollama), while open-source models via Ollama and Groq surged. Chroma and FAISS led vector stores, with MongoDB and Elastic gaining traction :cite[2]:cite[5].', ], [ 'How did LangGraph improve agent workflows compared to 2023?', 'LangGraph usage grew to 43% of LangSmith organizations, with 21.9% of traces involving tool calls (up from 0.5% in 2023), enabling complex multi-step tasks like database writes :cite[2]:cite[7].', ], [ "What distinguishes Replit's LangGraph implementation?", "Replit's agent emphasizes human-in-the-loop validation and a multi-agent architecture for code generation, combining autonomy with controlled outputs :cite[3].", ], ]; const datasetName = 'langchain-blogs-qa'; // Create dataset const dataset = await client.createDataset(datasetName, { description: 'Langchain blogs QA.', }); // Prepare inputs, outputs, and metadata for bulk creation const inputs = exampleInputs.map(([inputPrompt]) => ({ question: inputPrompt, })); const outputs = exampleInputs.map(([, outputAnswer]) => ({ answer: outputAnswer, })); const metadata = exampleInputs.map(() => ({ source: 'LangChain Blog' })); // Use the bulk createExamples method await client.createExamples({ inputs, outputs, metadata, datasetId: dataset.id, }); console.log( `Dataset created in langsmith with ID: ${dataset.id}\n Navigate to ${dataset.url}.` ); ================================================ FILE: ch10/js/create-sql-dataset.js ================================================ import { Client } from 'langsmith'; const client = new Client(); const exampleInputs = [ [ "Which country's customers spent the most? And how much did they spend?", 'The country whose customers spent the most is the USA, with a total expenditure of $523.06', ], [ 'What was the most purchased track of 2013?', 'The most purchased track of 2013 was Hot Girl.', ], [ 'How many albums does the artist Led Zeppelin have?', 'Led Zeppelin has 14 albums', ], [ "What is the total price for the album 'Big Ones'?", 'The total price for the album "Big Ones" is 14.85', ], [ 'Which sales agent made the most in sales in 2009?', 'Steve Johnson made the most sales in 2009', ], ]; const datasetName = 'sql-agent-response'; if (!(await client.hasDataset({ datasetName }))) { client.createDataset(datasetName); // Prepare inputs, outputs, and metadata for bulk creation const inputs = exampleInputs.map(([inputPrompt]) => ({ question: inputPrompt, })); const outputs = exampleInputs.map(([, outputAnswer]) => ({ answer: outputAnswer, })); await client.createExamples({ inputs, outputs, datasetId: dataset.id, }); } ================================================ FILE: ch10/js/rag-graph.js ================================================ import { Annotation, StateGraph } from '@langchain/langgraph'; import { CheerioWebBaseLoader } from '@langchain/community/document_loaders/web/cheerio'; import { RecursiveCharacterTextSplitter } from 'langchain/text_splitter'; import { MemoryVectorStore } from 'langchain/vectorstores/memory'; import { ChatOpenAI, OpenAIEmbeddings } from '@langchain/openai'; import * as hub from 'langchain/hub'; import { StringOutputParser } from '@langchain/core/output_parsers'; const GraphState = Annotation.Root({ question: Annotation(), scrapedDocuments: Annotation(), vectorstore: Annotation(), answer: Annotation(), }); const scrapeBlogPosts = async (state) => { const urls = [ 'https://blog.langchain.dev/top-5-langgraph-agents-in-production-2024/', 'https://blog.langchain.dev/langchain-state-of-ai-2024/', 'https://blog.langchain.dev/introducing-ambient-agents/', ]; const loadDocs = async (urls) => { const docs = []; for (const url of urls) { const loader = new CheerioWebBaseLoader(url); const loadedDocs = await loader.load(); docs.push(...loadedDocs); } return docs; }; const scrapedDocuments = await loadDocs(urls); return { scrapedDocuments }; }; const indexing = async (state) => { const textSplitter = new RecursiveCharacterTextSplitter({ chunkSize: 1000, chunkOverlap: 0, }); const docSplits = await textSplitter.splitDocuments(state.scrapedDocuments); const vectorstore = new MemoryVectorStore(new OpenAIEmbeddings()); await vectorstore.addDocuments(docSplits); console.log('vectorstore: ', vectorstore); return { vectorstore }; }; const retrieveAndGenerate = async (state) => { const { question, vectorstore } = state; const retriever = vectorstore.asRetriever(); const prompt = await hub.pull('rlm/rag-prompt'); const llm = new ChatOpenAI({ model: 'gpt-3.5-turbo', temperature: 0 }); const docs = await retriever.invoke(question); const chain = prompt.pipe(llm).pipe(new StringOutputParser()); const answer = await chain.invoke({ context: docs, question }); console.log('answer: ', answer); return { answer }; }; const workflow = new StateGraph(GraphState) .addNode('retrieve_and_generate', retrieveAndGenerate) .addNode('scrape_blog_posts', scrapeBlogPosts) .addNode('indexing', indexing) .addEdge('__start__', 'scrape_blog_posts') .addEdge('scrape_blog_posts', 'indexing') .addEdge('indexing', 'retrieve_and_generate') .addEdge('retrieve_and_generate', '__end__'); const graph = workflow.compile(); await graph.invoke({ question: 'What are ambient agents?' }); ================================================ FILE: ch10/js/retrieve-and-grade.js ================================================ import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; import { CheerioWebBaseLoader } from '@langchain/community/document_loaders/web/cheerio'; import { InMemoryVectorStore } from '@langchain/community/vectorstores/in_memory'; import { OpenAIEmbeddings } from '@langchain/openai'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { z } from 'zod'; import { ChatOpenAI } from '@langchain/openai'; const urls = [ 'https://blog.langchain.dev/top-5-langgraph-agents-in-production-2024/', 'https://blog.langchain.dev/langchain-state-of-ai-2024/', 'https://blog.langchain.dev/introducing-ambient-agents/', ]; // Load documents from URLs const loadDocs = async (urls) => { const docs = []; for (const url of urls) { const loader = new CheerioWebBaseLoader(url); const loadedDocs = await loader.load(); docs.push(...loadedDocs); } return docs; }; const docsList = await loadDocs(urls); // Initialize the text splitter const textSplitter = new RecursiveCharacterTextSplitter({ chunkSize: 250, chunkOverlap: 0, }); // Split the documents into smaller chunks const docSplits = textSplitter.splitDocuments(docsList); // Add to vector database const vectorstore = await InMemoryVectorStore.fromDocuments( docSplits, new OpenAIEmbeddings() ); const retriever = vectorstore.asRetriever(); // The `retriever` object can now be used for querying const question = 'What are 2 LangGraph agents used in production in 2024?'; const docs = retriever.invoke(question); console.log('Retrieved documents: \n', docs[0].page_content); // Define the schema using Zod const GradeDocumentsSchema = z.object({ binary_score: z .string() .describe("Documents are relevant to the question, 'yes' or 'no'"), }); // Initialize LLM with structured output using Zod schema const llm = new ChatOpenAI({ model: 'gpt-3.5-turbo', temperature: 0 }); const structuredLLMGrader = llm.withStructuredOutput(GradeDocumentsSchema); // System and prompt template const systemMessage = `You are a grader assessing relevance of a retrieved document to a user question. If the document contains keyword(s) or semantic meaning related to the question, grade it as relevant. Give a binary score 'yes' or 'no' to indicate whether the document is relevant to the question.`; const gradePrompt = ChatPromptTemplate.fromMessages([ { role: 'system', content: systemMessage }, { role: 'human', content: 'Retrieved document: \n\n {document} \n\n User question: {question}', }, ]); // Combine prompt with the structured output const retrievalGrader = gradePrompt.pipe(structuredLLMGrader); // Grade retrieved documents const results = await retrievalGrader.invoke({ question, document: docs[0].page_content, }); console.log('\n\nGrading results: \n', results); ================================================ FILE: ch10/js/search-graph.js ================================================ import { Annotation, StateGraph, START, END } from '@langchain/langgraph'; import { StringOutputParser } from '@langchain/core/output_parsers'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { ChatOpenAI } from '@langchain/openai'; import { DuckDuckGoSearch } from '@langchain/community/tools/duckduckgo_search'; import * as hub from 'langchain/hub'; import { retriever, retrievalGrader } from './retrieve-and-grade.js'; import { Document } from '@langchain/core/documents'; // LLM setup const prompt = await hub.pull('rlm/rag-prompt'); const llm = new ChatOpenAI({ modelName: 'gpt-4', temperature: 0 }); // Fixed model name const ragChain = prompt.pipe(llm).pipe(new StringOutputParser()); const webSearchTool = new DuckDuckGoSearch(); // Question rewriting prompt const rewritePrompt = ChatPromptTemplate.fromMessages([ [ 'system', `You are a question re-writer that converts an input question to a better version that is optimized for web search. Look at the input and try to reason about the underlying semantic intent / meaning.`, ], [ 'human', 'Here is the initial question: \n\n {question} \n Formulate an improved question.', ], ]); const questionRewriter = rewritePrompt.pipe(llm).pipe(new StringOutputParser()); // Create the graph state const GraphState = Annotation.Root({ question: Annotation(), generation: Annotation(), webSearch: Annotation(), documents: Annotation({ reducer: (currentState, updateValue) => currentState.concat(updateValue), default: () => [], }), }); // Node functions const retrieve = async (state) => { const documents = await retriever.invoke(state.question); return { question: state.question, documents }; }; const generate = async (state) => { const { question, documents } = state; const context = documents.map((doc) => doc.pageContent).join('\n'); const generation = await ragChain.invoke({ context, question }); console.log('Final answer:', generation); return { documents, question, generation }; }; const gradeDocuments = async (state) => { const { question, documents } = state; const filteredDocs = []; let webSearch = 'No'; for (const doc of documents) { try { const score = await retrievalGrader.invoke({ question: question, document: doc.pageContent, }); if (score.binary_score === 'yes') { console.log('---GRADE: DOCUMENT RELEVANT---'); filteredDocs.push(doc); } else { console.log('---GRADE: DOCUMENT NOT RELEVANT---'); webSearch = 'Yes'; } } catch (error) { console.error('Error grading document:', error); webSearch = 'Yes'; } } return { documents: filteredDocs, question, webSearch, }; }; const transformQuery = async (state) => { const betterQuestion = await questionRewriter.invoke({ question: state.question, }); console.log('Transformed question:', betterQuestion); return { documents: state.documents, question: betterQuestion }; }; const webSearch = async (state) => { console.log('---WEB SEARCH---'); const webResult = await webSearchTool.invoke(state.question); const webResultsDocument = new Document({ pageContent: webResult }); // Fixed document concatenation const updatedDocuments = [...state.documents, webResultsDocument]; return { documents: updatedDocuments, question: state.question }; }; // Routing function const generateRoute = (state) => { return state.webSearch === 'Yes' ? 'transform_query' : 'generate'; }; // Create and compile the graph const workflow = new StateGraph(GraphState) .addNode('retrieve', retrieve) .addNode('grade_documents', gradeDocuments) .addNode('transform_query', transformQuery) .addNode('generate', generate) .addNode('web_search_node', webSearch) .addEdge(START, 'retrieve') .addEdge('retrieve', 'grade_documents') .addConditionalEdges('grade_documents', generateRoute) .addEdge('transform_query', 'web_search_node') .addEdge('web_search_node', 'generate') .addEdge('generate', END); const graph = workflow.compile(); const result = await graph.invoke({ question: 'What are the Top 5 LangGraph Agents in Production 2024?', }); console.log(result); ================================================ FILE: ch10/py/agent_evaluation_rag.py ================================================ from typing import Optional from langchain_openai import ChatOpenAI from langsmith import Client, evaluate, aevaluate from langsmith.evaluation import EvaluationResults from pydantic import BaseModel, Field from typing_extensions import Annotated, TypedDict from rag_graph import graph client = Client() DEFAULT_DATASET_NAME = "langchain-blogs-qa" llm = ChatOpenAI(model="gpt-4o", temperature=0) EVALUATION_PROMPT = f"""You are a teacher grading a quiz. You will be given a QUESTION, the GROUND TRUTH (correct) RESPONSE, and the STUDENT RESPONSE. Here is the grade criteria to follow: (1) Grade the student responses based ONLY on their factual accuracy relative to the ground truth answer. (2) Ensure that the student response does not contain any conflicting statements. (3) It is OK if the student response contains more information than the ground truth response, as long as it is factually accurate relative to the ground truth response. Correctness: True means that the student's response meets all of the criteria. False means that the student's response does not meet all of the criteria. Explain your reasoning in a step-by-step manner to ensure your reasoning and conclusion are correct.""" # LLM-as-judge output schema class Grade(TypedDict): """Compare the expected and actual answers and grade the actual answer.""" reasoning: Annotated[str, ..., "Explain your reasoning for whether the actual response is correct or not."] is_correct: Annotated[bool, ..., "True if the student response is mostly or exactly correct, otherwise False."] grader_llm = llm.with_structured_output(Grade) # PUBLIC API def transform_dataset_inputs(inputs: dict) -> dict: """Transform LangSmith dataset inputs to match the agent's input schema before invoking the agent.""" # see the `Example input` in the README for reference on what `inputs` dict should look like # the dataset inputs already match the agent's input schema, but you can add any additional processing here return inputs def transform_agent_outputs(outputs: dict) -> dict: """Transform agent outputs to match the LangSmith dataset output schema.""" # see the `Example output` in the README for reference on what the output should look like return {"info": outputs["info"]} # Evaluator function async def evaluate_agent(inputs: dict, outputs: dict, reference_outputs: dict) -> bool: """Evaluate if the final response is equivalent to reference response.""" # Note that we assume the outputs has a 'response' dictionary. We'll need to make sure # that the target function we define includes this key. user = f"""QUESTION: {inputs['question']} GROUND TRUTH RESPONSE: {reference_outputs['answer']} STUDENT RESPONSE: {outputs['answer']}""" grade = await grader_llm.ainvoke([{"role": "system", "content": EVALUATION_PROMPT}, {"role": "user", "content": user}]) is_correct = grade["is_correct"] return is_correct # Target function async def run_graph(inputs: dict) -> dict: """Run graph and track the trajectory it takes along with the final response.""" result = await graph.ainvoke({ "question": inputs["question"] }) return {"answer": result["answer"].content} # run evaluation async def run_eval( dataset_name: str, experiment_prefix: Optional[str] = None, ) -> EvaluationResults: dataset = client.read_dataset(dataset_name=dataset_name) results = await aevaluate( run_graph, data=dataset, evaluators=[evaluate_agent], experiment_prefix=experiment_prefix, ) return results async def main(): experiment_results = await run_eval(dataset_name=DEFAULT_DATASET_NAME, experiment_prefix="langchain-blogs-qa-evals") if __name__ == "__main__": import asyncio asyncio.run(main()) ================================================ FILE: ch10/py/agent_evaluation_sql.py ================================================ from agent_sql_graph import builder from langchain import hub from langchain_openai import ChatOpenAI from langsmith.evaluation import evaluate from langsmith.schemas import Example, Run from langchain_core.runnables import Runnable from agent_sql_graph import assistant_runnable import uuid _printed = set() thread_id = str(uuid.uuid4()) experiment_prefix = "sql-agent-gpt4o" metadata = "chinook-gpt-4o-base-case-agent" config = { "configurable": { # Checkpoints are accessed by thread_id "thread_id": thread_id, } } def predict_sql_agent_answer(example: dict): """Use this for answer evaluation""" msg = {"messages": ("user", example["input"])} messages = graph.invoke(msg, config) return {"response": messages['messages'][-1].content} # Grade prompt grade_prompt_answer_accuracy = hub.pull( "langchain-ai/rag-answer-vs-reference") def answer_evaluator(run, example) -> dict: """ A simple evaluator for RAG answer accuracy """ # Get question, ground truth answer, chain answer input_question = example.inputs["input"] reference = example.outputs["output"] prediction = run.outputs["response"] # LLM grader llm = ChatOpenAI(model="gpt-4o", temperature=0) # Structured prompt answer_grader = grade_prompt_answer_accuracy | llm # Run evaluator score = answer_grader.invoke({"question": input_question, "correct_answer": reference, "student_answer": prediction}) score = score["Score"] return {"key": "answer_v_reference_score", "score": score} dataset_name = "sql-agent-response" experiment_results = evaluate( predict_sql_agent_answer, data=dataset_name, evaluators=[answer_evaluator], num_repetitions=3, experiment_prefix=experiment_prefix, metadata={"version": metadata}, ) """ Single tool evaluation """ def predict_assistant(example: dict): """Invoke assistant for single tool call evaluation""" msg = [("user", example["input"])] result = assistant_runnable.invoke({"messages": msg}) return {"response": result} def check_specific_tool_call(root_run: Run, example: Example) -> dict: """ Check if the first tool call in the response matches the expected tool call. """ # Exepected tool call expected_tool_call = 'sql_db_list_tables' # Run response = root_run.outputs["response"] # Get tool call try: tool_call = getattr(response, 'tool_calls', [])[0]['name'] except (IndexError, KeyError): tool_call = None score = 1 if tool_call == expected_tool_call else 0 return {"score": score, "key": "single_tool_call"} experiment_results = evaluate( predict_assistant, data=dataset_name, evaluators=[check_specific_tool_call], experiment_prefix=experiment_prefix + "-single-tool", num_repetitions=3, metadata={"version": metadata}, ) """ Agent trajectory evaluation """ def predict_sql_agent_messages(example: dict): """Use this for answer evaluation""" msg = {"messages": ("user", example["input"])} graph = builder.compile() messages = graph.invoke(msg, config) return {"response": messages} def find_tool_calls(messages): """ Find all tool calls in the messages returned """ tool_calls = [tc['name'] for m in messages['messages'] for tc in getattr(m, 'tool_calls', [])] return tool_calls def contains_all_tool_calls_any_order(root_run: Run, example: Example) -> dict: """ Check if all expected tools are called in any order. """ expected = ['sql_db_list_tables', 'sql_db_schema', 'sql_db_query_checker', 'sql_db_query', 'check_result'] messages = root_run.outputs["response"] tool_calls = find_tool_calls(messages) # Optionally, log the tool calls - # print("Here are my tool calls:") # print(tool_calls) if set(expected) <= set(tool_calls): score = 1 else: score = 0 return {"score": int(score), "key": "multi_tool_call_any_order"} def contains_all_tool_calls_in_order(root_run: Run, example: Example) -> dict: """ Check if all expected tools are called in exact order. """ messages = root_run.outputs["response"] tool_calls = find_tool_calls(messages) # Optionally, log the tool calls - # print("Here are my tool calls:") # print(tool_calls) it = iter(tool_calls) expected = ['sql_db_list_tables', 'sql_db_schema', 'sql_db_query_checker', 'sql_db_query', 'check_result'] if all(elem in it for elem in expected): score = 1 else: score = 0 return {"score": int(score), "key": "multi_tool_call_in_order"} def contains_all_tool_calls_in_order_exact_match(root_run: Run, example: Example) -> dict: """ Check if all expected tools are called in exact order and without any additional tool calls. """ expected = ['sql_db_list_tables', 'sql_db_schema', 'sql_db_query_checker', 'sql_db_query', 'check_result'] messages = root_run.outputs["response"] tool_calls = find_tool_calls(messages) # Optionally, log the tool calls - # print("Here are my tool calls:") # print(tool_calls) if tool_calls == expected: score = 1 else: score = 0 return {"score": int(score), "key": "multi_tool_call_in_exact_order"} experiment_results = evaluate( predict_sql_agent_messages, data=dataset_name, evaluators=[contains_all_tool_calls_any_order, contains_all_tool_calls_in_order, contains_all_tool_calls_in_order_exact_match], experiment_prefix=experiment_prefix + "-trajectory", num_repetitions=3, metadata={"version": metadata}, ) ================================================ FILE: ch10/py/agent_sql_graph.py ================================================ from langgraph.checkpoint.sqlite import SqliteSaver from langgraph.graph import END, StateGraph from langgraph.prebuilt import ToolNode, tools_condition from langchain_core.messages import ToolMessage from langchain_core.runnables import RunnableLambda, Runnable, RunnableConfig from typing import Annotated from typing_extensions import TypedDict from langgraph.graph.message import AnyMessage, add_messages import json from langchain_community.agent_toolkits import SQLDatabaseToolkit from langchain_core.messages import AIMessage from langchain_core.prompts import ChatPromptTemplate from langchain.agents import tool from langchain_openai import ChatOpenAI from langchain_community.utilities import SQLDatabase db = SQLDatabase.from_uri("sqlite:///Chinook.db") print(db.dialect) print(db.get_usable_table_names()) db.run("SELECT * FROM Artist LIMIT 10;") # gpt4o llm = ChatOpenAI(model="gpt-4o", temperature=0) experiment_prefix = "sql-agent-gpt4o" metadata = "Chinook, gpt-4o agent" # SQL toolkit toolkit = SQLDatabaseToolkit(db=db, llm=llm) tools = toolkit.get_tools() # Query checking query_check_system = """You are a SQL expert with a strong attention to detail. Double check the SQLite query for common mistakes, including: - Using NOT IN with NULL values - Using UNION when UNION ALL should have been used - Using BETWEEN for exclusive ranges - Data type mismatch in predicates - Properly quoting identifiers - Using the correct number of arguments for functions - Casting to the correct data type - Using the proper columns for joins If there are any of the above mistakes, rewrite the query. If there are no mistakes, just reproduce the original query. Execute the correct query with the appropriate tool.""" query_check_prompt = ChatPromptTemplate.from_messages( [("system", query_check_system), ("user", "{query}")]) query_check = query_check_prompt | llm @tool def check_query_tool(query: str) -> str: """ Use this tool to double check if your query is correct before executing it. """ return query_check.invoke({"query": query}).content # Query result checking query_result_check_system = """You are grading the result of a SQL query from a DB. - Check that the result is not empty. - If it is empty, instruct the system to re-try!""" query_result_check_prompt = ChatPromptTemplate.from_messages( [("system", query_result_check_system), ("user", "{query_result}")]) query_result_check = query_result_check_prompt | llm @tool def check_result(query_result: str) -> str: """ Use this tool to check the query result from the database to confirm it is not empty and is relevant. """ return query_result_check.invoke({"query_result": query_result}).content tools.append(check_query_tool) tools.append(check_result) class State(TypedDict): messages: Annotated[list[AnyMessage], add_messages] def create_tool_node_with_fallback(tools: list) -> dict: return ToolNode(tools).with_fallbacks( [RunnableLambda(handle_tool_error)], exception_key="error" ) def _print_event(event: dict, _printed: set, max_length=1500): current_state = event.get("dialog_state") if current_state: print(f"Currently in: ", current_state[-1]) message = event.get("messages") if message: if isinstance(message, list): message = message[-1] if message.id not in _printed: msg_repr = message.pretty_repr(html=True) if len(msg_repr) > max_length: msg_repr = msg_repr[:max_length] + " ... (truncated)" print(msg_repr) _printed.add(message.id) def handle_tool_error(state) -> dict: error = state.get("error") tool_calls = state["messages"][-1].tool_calls return { "messages": [ ToolMessage( content=f"Error: {repr(error)}\n please fix your mistakes.", tool_call_id=tc["id"], ) for tc in tool_calls ] } # Assistant class Assistant: def __init__(self, runnable: Runnable): self.runnable = runnable def __call__(self, state: State, config: RunnableConfig): while True: # Append to state state = {**state} # Invoke the tool-calling LLM result = self.runnable.invoke(state) # If it is a tool call -> response is valid # If it has meaninful text -> response is valid # Otherwise, we re-prompt it b/c response is not meaninful if not result.tool_calls and ( not result.content or isinstance(result.content, list) and not result.content[0].get("text") ): messages = state["messages"] + \ [("user", "Respond with a real output.")] state = {**state, "messages": messages} else: break return {"messages": result} # Assistant runnable query_gen_system = """ ROLE: You are an agent designed to interact with a SQL database. You have access to tools for interacting with the database. GOAL: Given an input question, create a syntactically correct SQLite query to run, then look at the results of the query and return the answer. INSTRUCTIONS: - Only use the below tools for the following operations. - Only use the information returned by the below tools to construct your final answer. - To start you should ALWAYS look at the tables in the database to see what you can query. Do NOT skip this step. - Then you should query the schema of the most relevant tables. - Write your query based upon the schema of the tables. You MUST double check your query before executing it. - Unless the user specifies a specific number of examples they wish to obtain, always limit your query to at most 5 results. - You can order the results by a relevant column to return the most interesting examples in the database. - Never query for all the columns from a specific table, only ask for the relevant columns given the question. - If you get an error while executing a query, rewrite the query and try again. - If the query returns a result, use check_result tool to check the query result. - If the query result result is empty, think about the table schema, rewrite the query, and try again. - DO NOT make any DML statements (INSERT, UPDATE, DELETE, DROP etc.) to the database.""" query_gen_prompt = ChatPromptTemplate.from_messages( [("system", query_gen_system), ("placeholder", "{messages}")]) assistant_runnable = query_gen_prompt | llm.bind_tools(tools) # Graph builder = StateGraph(State) # Define nodes: these do the work builder.add_node("assistant", Assistant(assistant_runnable)) builder.add_node("tools", create_tool_node_with_fallback(tools)) # Define edges: these determine how the control flow moves builder.set_entry_point("assistant") builder.add_conditional_edges( "assistant", # If the latest message (result) from assistant is a tool call -> tools_condition routes to tools # If the latest message (result) from assistant is a not a tool call -> tools_condition routes to END tools_condition, # "tools" calls one of our tools. END causes the graph to terminate (and respond to the user) {"tools": "tools", END: END}, ) builder.add_edge("tools", "assistant") # The checkpointer lets the graph persist its state memory = SqliteSaver.from_conn_string(":memory:") graph = builder.compile(checkpointer=memory) ================================================ FILE: ch10/py/create_rag_dataset.py ================================================ from langsmith import wrappers, Client from pydantic import BaseModel, Field from openai import OpenAI client = Client() openai_client = wrappers.wrap_openai(OpenAI()) examples = [ { "question": "Which companies are highlighted as top LangGraph agent adopters in 2024?", "answer": "The top adopters include Uber (code migration tools), AppFolio (property management copilot), LinkedIn (SQL Bot), Elastic (AI assistant), and Replit (multi-agent development platform) :cite[3]." }, { "question": "How did AppFolio's AI copilot impact property managers?", "answer": "AppFolio's Realm-X AI copilot saved property managers over 10 hours per week by automating queries, bulk actions, and scheduling :cite[3]." }, { "question": "What infrastructure trends dominated LLM usage in 2024?", "answer": "OpenAI remained the top LLM provider (6x more usage than Ollama), while open-source models via Ollama and Groq surged. Chroma and FAISS led vector stores, with MongoDB and Elastic gaining traction :cite[2]:cite[5]." }, { "question": "How did LangGraph improve agent workflows compared to 2023?", "answer": "LangGraph usage grew to 43% of LangSmith organizations, with 21.9% of traces involving tool calls (up from 0.5% in 2023), enabling complex multi-step tasks like database writes :cite[2]:cite[7]." }, { "question": "What distinguishes Replit's LangGraph implementation?", "answer": "Replit's agent emphasizes human-in-the-loop validation and a multi-agent architecture for code generation, combining autonomy with controlled outputs :cite[3]." } ] inputs = [{"question": example["question"]} for example in examples] outputs = [{"answer": example["answer"]} for example in examples] # Programmatically create a dataset in LangSmith dataset = client.create_dataset( dataset_name="langchain-blogs-qa", description="Langchain blogs QA." ) # Add examples to the dataset client.create_examples(inputs=inputs, outputs=outputs, dataset_id=dataset.id) print( f"Dataset created in langsmith with ID: {dataset.id}\n Navigate to {dataset.url}.") ================================================ FILE: ch10/py/create_sql_dataset.py ================================================ from langsmith import Client client = Client() # Create a dataset examples = [ ("Which country's customers spent the most? And how much did they spend?", "The country whose customers spent the most is the USA, with a total expenditure of $523.06"), ("What was the most purchased track of 2013?", "The most purchased track of 2013 was Hot Girl."), ("How many albums does the artist Led Zeppelin have?", "Led Zeppelin has 14 albums"), ("What is the total price for the album “Big Ones”?", "The total price for the album 'Big Ones' is 14.85"), ("Which sales agent made the most in sales in 2009?", "Steve Johnson made the most sales in 2009"), ] dataset_name = "sql-agent-response" if not client.has_dataset(dataset_name=dataset_name): dataset = client.create_dataset(dataset_name=dataset_name) inputs, outputs = zip( *[({"input": text}, {"output": label}) for text, label in examples] ) client.create_examples( inputs=inputs, outputs=outputs, dataset_id=dataset.id) ================================================ FILE: ch10/py/rag_graph.py ================================================ from typing import List, TypedDict from langchain_community.document_loaders import WebBaseLoader from langchain.schema import Document from langgraph.graph import END, StateGraph, START from langchain_community.vectorstores import InMemoryVectorStore from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_openai import OpenAIEmbeddings from langchain import hub from langchain_openai import ChatOpenAI class GraphState(TypedDict): """ Represents the state of our graph. Attributes: question: question scraped_documents: list of documents vectorstore: vectorstore """ question: str scraped_documents: List[str] vectorstore: InMemoryVectorStore answer: str def scrape_blog_posts(state) -> List[Document]: """ Scrape the blog posts and create a list of documents """ urls = [ "https://blog.langchain.dev/top-5-langgraph-agents-in-production-2024/", "https://blog.langchain.dev/langchain-state-of-ai-2024/", "https://blog.langchain.dev/introducing-ambient-agents/", ] docs = [WebBaseLoader(url).load() for url in urls] docs_list = [item for sublist in docs for item in sublist] return {"scraped_documents": docs_list} def indexing(state): """ Index the documents """ text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder( chunk_size=250, chunk_overlap=0 ) doc_splits = text_splitter.split_documents(state["scraped_documents"]) # Add to vectorDB vectorstore = InMemoryVectorStore.from_documents( documents=doc_splits, embedding=OpenAIEmbeddings(), ) return {"vectorstore": vectorstore} def retrieve_and_generate(state): """ Retrieve documents from vectorstore and generate answer """ question = state["question"] vectorstore = state["vectorstore"] retriever = vectorstore.as_retriever() prompt = hub.pull("rlm/rag-prompt") llm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0) # fetch relevant documents docs = retriever.invoke(question) # format prompt formatted = prompt.invoke( {"context": docs, "question": question}) # generate answer answer = llm.invoke(formatted) return {"answer": answer} # Graph workflow = StateGraph(GraphState) # Define the nodes workflow.add_node("retrieve_and_generate", retrieve_and_generate) # retrieve workflow.add_node("scrape_blog_posts", scrape_blog_posts) # scrape web workflow.add_node("indexing", indexing) # index # Build graph workflow.add_edge(START, "scrape_blog_posts") workflow.add_edge("scrape_blog_posts", "indexing") workflow.add_edge("indexing", "retrieve_and_generate") workflow.add_edge("retrieve_and_generate", END) # Compile graph = workflow.compile() ================================================ FILE: ch10/py/retrieve_and_grade.py ================================================ from langchain.text_splitter import RecursiveCharacterTextSplitter from langchain_community.document_loaders import WebBaseLoader from langchain_community.vectorstores import InMemoryVectorStore from langchain_openai import OpenAIEmbeddings from langchain_core.prompts import ChatPromptTemplate from pydantic import BaseModel, Field from langchain_openai import ChatOpenAI # --- Create an index of documents --- urls = [ "https://blog.langchain.dev/top-5-langgraph-agents-in-production-2024/", "https://blog.langchain.dev/langchain-state-of-ai-2024/", "https://blog.langchain.dev/introducing-ambient-agents/", ] docs = [WebBaseLoader(url).load() for url in urls] docs_list = [item for sublist in docs for item in sublist] text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder( chunk_size=250, chunk_overlap=0 ) doc_splits = text_splitter.split_documents(docs_list) # Add to vectorDB vectorstore = InMemoryVectorStore.from_documents( documents=doc_splits, embedding=OpenAIEmbeddings(), ) retriever = vectorstore.as_retriever() # Retrieve the relevant documents results = retriever.invoke( "What are 2 LangGraph agents used in production in 2024?") print("Results: \n", results) # --- Create a grader for retrieved documents --- # Data model class GradeDocuments(BaseModel): """Binary score for relevance check on retrieved documents.""" binary_score: str = Field( description="Documents are relevant to the question, 'yes' or 'no'" ) # LLM with structured output llm = ChatOpenAI(temperature=0) structured_llm_grader = llm.with_structured_output(GradeDocuments) # Prompt system = """You are a grader assessing relevance of a retrieved document to a user question. If the document contains keyword(s) or semantic meaning related to the question, grade it as relevant. Give a binary score 'yes' or 'no' score to indicate whether the document is relevant to the question.""" grade_prompt = ChatPromptTemplate.from_messages( [ ("system", system), ("human", "Retrieved document: \n\n {document} \n\n User question: {question}"), ] ) retrieval_grader = grade_prompt | structured_llm_grader # --- Grade retrieved documents --- question = "What are 2 LangGraph agents used in production in 2024?" # as an example retrieval_grader.invoke({"question": question, "document": doc_txt}) docs = retriever.invoke(question) doc_txt = docs[0].page_content result = retrieval_grader.invoke({"question": question, "document": doc_txt}) print("\n\nGrade Result: \n", result) ================================================ FILE: ch10/py/search_graph.py ================================================ from typing import List, TypedDict from langchain_core.documents import Document from langchain_community.tools import DuckDuckGoSearchRun from langgraph.graph import END, StateGraph, START from retrieve_and_grade import retrieval_grader from retrieve_and_grade import retriever from langchain_core.output_parsers import StrOutputParser from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate from langchain_core.output_parsers import StrOutputParser from langchain import hub # Prompt prompt = hub.pull("rlm/rag-prompt") # LLM llm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0) rag_chain = prompt | llm | StrOutputParser() # Prompt system = """You a question re-writer that converts an input question to a better version that is optimized \n for web search. Look at the input and try to reason about the underlying semantic intent / meaning.""" re_write_prompt = ChatPromptTemplate.from_messages( [ ("system", system), ( "human", "Here is the initial question: \n\n {question} \n Formulate an improved question.", ), ] ) question_rewriter = re_write_prompt | llm | StrOutputParser() # --- Create the graph --- web_search_tool = DuckDuckGoSearchRun() class GraphState(TypedDict): """ Represents the state of our graph. Attributes: question: question generation: LLM generation web_search: whether to add search documents: list of documents """ question: str generation: str web_search: str documents: List[str] def retrieve(state): """ Retrieve documents Args: state (dict): The current graph state Returns: state (dict): New key added to state, documents, that contains retrieved documents """ question = state["question"] # Retrieval documents = retriever.invoke(question) return {"documents": documents, "question": question} def generate(state): """ Generate answer Args: state (dict): The current graph state Returns: state (dict): New key added to state, generation, that contains LLM generation """ question = state["question"] documents = state["documents"] # RAG generation generation = rag_chain.invoke({"context": documents, "question": question}) return {"documents": documents, "question": question, "generation": generation} def grade_documents(state): """ Determines whether the retrieved documents are relevant to the question. Args: state (dict): The current graph state Returns: state (dict): Updates documents key with only filtered relevant documents """ question = state["question"] documents = state["documents"] # Score each doc filtered_docs = [] web_search = "No" for d in documents: score = retrieval_grader.invoke( {"question": question, "document": d.page_content} ) grade = score.binary_score if grade == "yes": print("---GRADE: DOCUMENT RELEVANT---") filtered_docs.append(d) else: print("---GRADE: DOCUMENT NOT RELEVANT---") web_search = "Yes" continue return {"documents": filtered_docs, "question": question, "web_search": web_search} def transform_query(state): """ Transform the query to produce a better question. Args: state (dict): The current graph state Returns: state (dict): Updates question key with a re-phrased question """ question = state["question"] documents = state["documents"] # Re-write question better_question = question_rewriter.invoke({"question": question}) return {"documents": documents, "question": better_question} def web_search(state): """ Web search based on the re-phrased question. Args: state (dict): The current graph state Returns: state (dict): Updates documents key with appended web results """ print("---WEB SEARCH---") question = state["question"] documents = state["documents"] # Web search docs = web_search_tool.invoke({"query": question}) web_results = "\n".join([d["content"] for d in docs]) web_results = Document(page_content=web_results) documents.append(web_results) return {"documents": documents, "question": question} # Edges def decide_to_generate(state): """ Determines whether to generate an answer, or re-generate a question. Args: state (dict): The current graph state Returns: str: Binary decision for next node to call """ state["question"] web_search = state["web_search"] state["documents"] if web_search == "Yes": # All documents have been filtered check_relevance # We will re-generate a new query return "transform_query" else: # We have relevant documents, so generate answer return "generate" # Graph workflow = StateGraph(GraphState) # Define the nodes workflow.add_node("retrieve", retrieve) # retrieve workflow.add_node("grade_documents", grade_documents) # grade documents workflow.add_node("generate", generate) # generatae workflow.add_node("transform_query", transform_query) # transform_query workflow.add_node("web_search_node", web_search) # web search # Build graph workflow.add_edge(START, "retrieve") workflow.add_edge("retrieve", "grade_documents") workflow.add_conditional_edges( "grade_documents", decide_to_generate, { "transform_query": "transform_query", "generate": "generate", }, ) workflow.add_edge("transform_query", "web_search_node") workflow.add_edge("web_search_node", "generate") workflow.add_edge("generate", END) # Compile app = workflow.compile() ================================================ FILE: ch2/js/a-text-loader.js ================================================ import { TextLoader } from 'langchain/document_loaders/fs/text'; const loader = new TextLoader('./test.txt'); const docs = await loader.load(); console.log(docs); ================================================ FILE: ch2/js/b-web-loader.js ================================================ import { CheerioWebBaseLoader } from '@langchain/community/document_loaders/web/cheerio'; const loader = new CheerioWebBaseLoader('https://www.langchain.com/'); const docs = await loader.load(); console.log(docs); ================================================ FILE: ch2/js/c-pdf-loader.js ================================================ // install the pdf parsing library: npm install pdf-parse import { PDFLoader } from '@langchain/community/document_loaders/fs/pdf'; const loader = new PDFLoader('./test.pdf'); const docs = await loader.load(); console.log(docs); ================================================ FILE: ch2/js/d-rec-text-splitter.js ================================================ import { TextLoader } from 'langchain/document_loaders/fs/text'; import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; const loader = new TextLoader('./test.txt'); // or any other loader const docs = await loader.load(); const splitter = new RecursiveCharacterTextSplitter({ chunkSize: 1000, chunkOverlap: 200, }); const splittedDocs = await splitter.splitDocuments(docs); console.log(splittedDocs); ================================================ FILE: ch2/js/e-rec-text-splitter-code.js ================================================ import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; const PYTHON_CODE = ` def hello_world(): print("Hello, World!") # Call the function hello_world() `; const pythonSplitter = RecursiveCharacterTextSplitter.fromLanguage('python', { chunkSize: 50, chunkOverlap: 0, }); const pythonDocs = await pythonSplitter.createDocuments([PYTHON_CODE]); console.log(pythonDocs); ================================================ FILE: ch2/js/f-markdown-splitter.js ================================================ import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; const markdownText = ` # 🦜🔗 LangChain ⚡ Building applications with LLMs through composability ⚡ ## Quick Install \`\`\`bash pip install langchain \`\`\` As an open source project in a rapidly developing field, we are extremely open to contributions. `; const mdSplitter = RecursiveCharacterTextSplitter.fromLanguage('markdown', { chunkSize: 60, chunkOverlap: 0, }); const mdDocs = await mdSplitter.createDocuments( [markdownText], [{ source: 'https://www.langchain.com' }] ); console.log(mdDocs); ================================================ FILE: ch2/js/g-embeddings.js ================================================ import { OpenAIEmbeddings } from '@langchain/openai'; const model = new OpenAIEmbeddings(); const embeddings = await model.embedDocuments([ 'Hi there!', 'Oh, hello!', "What's your name?", 'My friends call me World', 'Hello World!', ]); console.log(embeddings); ================================================ FILE: ch2/js/h-load-split-embed.js ================================================ import { TextLoader } from 'langchain/document_loaders/fs/text'; import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; import { OpenAIEmbeddings } from '@langchain/openai'; const loader = new TextLoader('./test.txt'); const docs = await loader.load(); // Split the document const splitter = new RecursiveCharacterTextSplitter({ chunkSize: 1000, chunkOverlap: 200, }); const chunks = await splitter.splitDocuments(docs); console.log(chunks); // Generate embeddings const model = new OpenAIEmbeddings(); const embeddings = await model.embedDocuments(chunks.map((c) => c.pageContent)); console.log(embeddings); ================================================ FILE: ch2/js/i-pg-vector.js ================================================ /** 1. Ensure docker is installed and running (https://docs.docker.com/get-docker/) 2. Run the following command to start the postgres container: docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 3. Use the connection string below for the postgres container */ import { TextLoader } from 'langchain/document_loaders/fs/text'; import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; import { OpenAIEmbeddings } from '@langchain/openai'; import { PGVectorStore } from '@langchain/community/vectorstores/pgvector'; import { v4 as uuidv4 } from 'uuid'; const connectionString = 'postgresql://langchain:langchain@localhost:6024/langchain'; // Load the document, split it into chunks const loader = new TextLoader('./test.txt'); const raw_docs = await loader.load(); const splitter = new RecursiveCharacterTextSplitter({ chunkSize: 1000, chunkOverlap: 200, }); const docs = await splitter.splitDocuments(raw_docs); // embed each chunk and insert it into the vector store const model = new OpenAIEmbeddings(); const db = await PGVectorStore.fromDocuments(docs, model, { postgresConnectionOptions: { connectionString, }, }); console.log('Vector store created successfully'); const results = await db.similaritySearch('query', 4); console.log(`Similarity search results: ${JSON.stringify(results)}`); console.log('Adding documents to the vector store'); const ids = [uuidv4(), uuidv4()]; await db.addDocuments( [ { pageContent: 'there are cats in the pond', metadata: { location: 'pond', topic: 'animals' }, }, { pageContent: 'ducks are also found in the pond', metadata: { location: 'pond', topic: 'animals' }, }, ], { ids } ); console.log('Documents added successfully'); await db.delete({ ids: [ids[1]] }); console.log('second document deleted successfully'); ================================================ FILE: ch2/js/j-record-manager.js ================================================ /** 1. Ensure docker is installed and running (https://docs.docker.com/get-docker/) 2. Run the following command to start the postgres container: docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 3. Use the connection string below for the postgres container */ import { PostgresRecordManager } from '@langchain/community/indexes/postgres'; import { index } from 'langchain/indexes'; import { OpenAIEmbeddings } from '@langchain/openai'; import { PGVectorStore } from '@langchain/community/vectorstores/pgvector'; import { v4 as uuidv4 } from 'uuid'; const tableName = 'test_langchain'; const connectionString = 'postgresql://langchain:langchain@localhost:6024/langchain'; // Load the document, split it into chunks const config = { postgresConnectionOptions: { connectionString, }, tableName: tableName, columns: { idColumnName: 'id', vectorColumnName: 'vector', contentColumnName: 'content', metadataColumnName: 'metadata', }, }; const vectorStore = await PGVectorStore.initialize( new OpenAIEmbeddings(), config ); // Create a new record manager const recordManagerConfig = { postgresConnectionOptions: { connectionString, }, tableName: 'upsertion_records', }; const recordManager = new PostgresRecordManager( 'test_namespace', recordManagerConfig ); // Create the schema if it doesn't exist await recordManager.createSchema(); const docs = [ { pageContent: 'there are cats in the pond', metadata: { id: uuidv4(), source: 'cats.txt' }, }, { pageContent: 'ducks are also found in the pond', metadata: { id: uuidv4(), source: 'ducks.txt' }, }, ]; // the first attempt will index both documents const index_attempt_1 = await index({ docsSource: docs, recordManager, vectorStore, options: { cleanup: 'incremental', // prevent duplicate documents by id from being indexed sourceIdKey: 'source', // the key in the metadata that will be used to identify the document }, }); console.log(index_attempt_1); // the second attempt will skip indexing because the identical documents already exist const index_attempt_2 = await index({ docsSource: docs, recordManager, vectorStore, options: { cleanup: 'incremental', sourceIdKey: 'source', }, }); console.log(index_attempt_2); // If we mutate a document, the new version will be written and all old versions sharing the same source will be deleted. docs[0].pageContent = 'I modified the first document content'; const index_attempt_3 = await index({ docsSource: docs, recordManager, vectorStore, options: { cleanup: 'incremental', sourceIdKey: 'source', }, }); console.log(index_attempt_3); ================================================ FILE: ch2/js/k-multi-vector-retriever.js ================================================ import * as uuid from 'uuid'; import { MultiVectorRetriever } from 'langchain/retrievers/multi_vector'; import { OpenAIEmbeddings } from '@langchain/openai'; import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; import { InMemoryStore } from '@langchain/core/stores'; import { TextLoader } from 'langchain/document_loaders/fs/text'; import { Document } from '@langchain/core/documents'; import { PGVectorStore } from '@langchain/community/vectorstores/pgvector'; import { ChatOpenAI } from '@langchain/openai'; import { PromptTemplate } from '@langchain/core/prompts'; import { RunnableSequence } from '@langchain/core/runnables'; import { StringOutputParser } from '@langchain/core/output_parsers'; const connectionString = 'postgresql://langchain:langchain@localhost:6024/langchain'; const collectionName = 'summaries'; const textLoader = new TextLoader('./test.txt'); const parentDocuments = await textLoader.load(); const splitter = new RecursiveCharacterTextSplitter({ chunkSize: 10000, chunkOverlap: 20, }); const docs = await splitter.splitDocuments(parentDocuments); const prompt = PromptTemplate.fromTemplate( `Summarize the following document:\n\n{doc}` ); const llm = new ChatOpenAI({ modelName: 'gpt-3.5-turbo' }); const chain = RunnableSequence.from([ { doc: (doc) => doc.pageContent }, prompt, llm, new StringOutputParser(), ]); // batch summarization chain across the chunks const summaries = await chain.batch(docs, { maxConcurrency: 5, }); const idKey = 'doc_id'; const docIds = docs.map((_) => uuid.v4()); // create summary docs with metadata linking to the original docs const summaryDocs = summaries.map((summary, i) => { const summaryDoc = new Document({ pageContent: summary, metadata: { [idKey]: docIds[i], }, }); return summaryDoc; }); // The byteStore to use to store the original chunks const byteStore = new InMemoryStore(); // vector store for the summaries const vectorStore = await PGVectorStore.fromDocuments( docs, new OpenAIEmbeddings(), { postgresConnectionOptions: { connectionString, }, } ); const retriever = new MultiVectorRetriever({ vectorstore: vectorStore, byteStore, idKey, }); const keyValuePairs = docs.map((originalDoc, i) => [docIds[i], originalDoc]); // Use the retriever to add the original chunks to the document store await retriever.docstore.mset(keyValuePairs); // Vectorstore alone retrieves the small chunks const vectorstoreResult = await retriever.vectorstore.similaritySearch( 'chapter on philosophy', 2 ); console.log(`summary: ${vectorstoreResult[0].pageContent}`); console.log( `summary retrieved length: ${vectorstoreResult[0].pageContent.length}` ); // Retriever returns larger chunk result const retrieverResult = await retriever.invoke('chapter on philosophy'); console.log( `multi-vector retrieved chunk length: ${retrieverResult[0].pageContent.length}` ); ================================================ FILE: ch2/py/a-text-loader.py ================================================ from langchain_community.document_loaders import TextLoader loader = TextLoader('./test.txt', encoding="utf-8") docs = loader.load() print(docs) ================================================ FILE: ch2/py/b-web-loader.py ================================================ """ Install the beautifulsoup4 package: ```bash pip install beautifulsoup4 ``` """ from langchain_community.document_loaders import WebBaseLoader loader = WebBaseLoader('https://www.langchain.com/') docs = loader.load() print(docs) ================================================ FILE: ch2/py/c-pdf-loader.py ================================================ # install the pdf parsing library !pip install pypdf from langchain_community.document_loaders import PyPDFLoader loader = PyPDFLoader('./test.pdf') pages = loader.load() print(pages) ================================================ FILE: ch2/py/d-rec-text-splitter.py ================================================ from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_community.document_loaders import TextLoader loader = TextLoader('./test.txt', encoding="utf-8") docs = loader.load() splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200) splitted_docs = splitter.split_documents(docs) print(splitted_docs) ================================================ FILE: ch2/py/e-rec-text-splitter-code.py ================================================ from langchain_text_splitters import ( Language, RecursiveCharacterTextSplitter, ) PYTHON_CODE = """ def hello_world(): print("Hello, World!") # Call the function hello_world() """ python_splitter = RecursiveCharacterTextSplitter.from_language( language=Language.PYTHON, chunk_size=50, chunk_overlap=0 ) python_docs = python_splitter.create_documents([PYTHON_CODE]) print(python_docs) ================================================ FILE: ch2/py/f-markdown-splitter.py ================================================ from langchain_text_splitters import ( Language, RecursiveCharacterTextSplitter, ) markdown_text = """ # 🦜🔗 LangChain ⚡ Building applications with LLMs through composability ⚡ ## Quick Install ```bash pip install langchain ``` As an open source project in a rapidly developing field, we are extremely open to contributions. """ md_splitter = RecursiveCharacterTextSplitter.from_language( language=Language.MARKDOWN, chunk_size=60, chunk_overlap=0 ) md_docs = md_splitter.create_documents( [markdown_text], [{"source": "https://www.langchain.com"}]) print(md_docs) ================================================ FILE: ch2/py/g-embeddings.py ================================================ from langchain_openai import OpenAIEmbeddings model = OpenAIEmbeddings(model="text-embedding-3-small") embeddings = model.embed_documents([ "Hi there!", "Oh, hello!", "What's your name?", "My friends call me World", "Hello World!" ]) print(embeddings) ================================================ FILE: ch2/py/h-load-split-embed.py ================================================ from langchain_community.document_loaders import TextLoader from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_openai import OpenAIEmbeddings # Load the document loader = TextLoader("./test.txt", encoding="utf-8") doc = loader.load() # Split the document splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200) chunks = splitter.split_documents(doc) # Generate embeddings embeddings_model = OpenAIEmbeddings(model="text-embedding-3-small") embeddings = embeddings_model.embed_documents( [chunk.page_content for chunk in chunks] ) print(embeddings) ================================================ FILE: ch2/py/i-pg-vector.py ================================================ """ 1. Ensure docker is installed and running (https://docs.docker.com/get-docker/) 2. pip install -qU langchain_postgres 3. Run the following command to start the postgres container: docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 4. Use the connection string below for the postgres container """ from langchain_community.document_loaders import TextLoader from langchain_openai import OpenAIEmbeddings from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_postgres.vectorstores import PGVector from langchain_core.documents import Document import uuid # See docker command above to launch a postgres instance with pgvector enabled. connection = "postgresql+psycopg://langchain:langchain@localhost:6024/langchain" # Load the document, split it into chunks raw_documents = TextLoader('./test.txt', encoding="utf-8").load() text_splitter = RecursiveCharacterTextSplitter( chunk_size=1000, chunk_overlap=200) documents = text_splitter.split_documents(raw_documents) # Create embeddings for the documents embeddings_model = OpenAIEmbeddings() db = PGVector.from_documents( documents, embeddings_model, connection=connection) results = db.similarity_search("query", k=4) print(results) print("Adding documents to the vector store") ids = [str(uuid.uuid4()), str(uuid.uuid4())] db.add_documents( [ Document( page_content="there are cats in the pond", metadata={"location": "pond", "topic": "animals"}, ), Document( page_content="ducks are also found in the pond", metadata={"location": "pond", "topic": "animals"}, ), ], ids=ids, ) print("Documents added successfully.\n Fetched documents count:", len(db.get_by_ids(ids))) print("Deleting document with id", ids[1]) db.delete({"ids": ids}) print("Document deleted successfully.\n Fetched documents count:", len(db.get_by_ids(ids))) ================================================ FILE: ch2/py/j-record-manager.py ================================================ from langchain.indexes import SQLRecordManager, index from langchain_postgres.vectorstores import PGVector from langchain_openai import OpenAIEmbeddings from langchain.docstore.document import Document connection = "postgresql+psycopg://langchain:langchain@localhost:6024/langchain" collection_name = "my_docs" embeddings_model = OpenAIEmbeddings(model="text-embedding-3-small") namespace = "my_docs_namespace" vectorstore = PGVector( embeddings=embeddings_model, collection_name=collection_name, connection=connection, use_jsonb=True, ) record_manager = SQLRecordManager( namespace, db_url="postgresql+psycopg://langchain:langchain@localhost:6024/langchain", ) # Create the schema if it doesn't exist record_manager.create_schema() # Create documents docs = [ Document(page_content='there are cats in the pond', metadata={ "id": 1, "source": "cats.txt"}), Document(page_content='ducks are also found in the pond', metadata={ "id": 2, "source": "ducks.txt"}), ] # Index the documents index_1 = index( docs, record_manager, vectorstore, cleanup="incremental", # prevent duplicate documents source_id_key="source", # use the source field as the source_id ) print("Index attempt 1:", index_1) # second time you attempt to index, it will not add the documents again index_2 = index( docs, record_manager, vectorstore, cleanup="incremental", source_id_key="source", ) print("Index attempt 2:", index_2) # If we mutate a document, the new version will be written and all old versions sharing the same source will be deleted. docs[0].page_content = "I just modified this document!" index_3 = index( docs, record_manager, vectorstore, cleanup="incremental", source_id_key="source", ) print("Index attempt 3:", index_3) ================================================ FILE: ch2/py/k-multi-vector-retriever.py ================================================ from langchain_community.document_loaders import TextLoader from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_openai import OpenAIEmbeddings from langchain_postgres.vectorstores import PGVector from langchain_core.output_parsers import StrOutputParser from langchain_core.prompts import ChatPromptTemplate from pydantic import BaseModel from langchain_core.runnables import RunnablePassthrough from langchain_openai import ChatOpenAI from langchain_core.documents import Document from langchain.retrievers.multi_vector import MultiVectorRetriever from langchain.storage import InMemoryStore import uuid connection = "postgresql+psycopg://langchain:langchain@localhost:6024/langchain" collection_name = "summaries" embeddings_model = OpenAIEmbeddings() # Load the document loader = TextLoader("./test.txt", encoding="utf-8") docs = loader.load() print("length of loaded docs: ", len(docs[0].page_content)) # Split the document splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=200) chunks = splitter.split_documents(docs) # The rest of your code remains the same, starting from: prompt_text = "Summarize the following document:\n\n{doc}" prompt = ChatPromptTemplate.from_template(prompt_text) llm = ChatOpenAI(temperature=0, model="gpt-3.5-turbo") summarize_chain = { "doc": lambda x: x.page_content} | prompt | llm | StrOutputParser() # batch the chain across the chunks summaries = summarize_chain.batch(chunks, {"max_concurrency": 5}) # The vectorstore to use to index the child chunks vectorstore = PGVector( embeddings=embeddings_model, collection_name=collection_name, connection=connection, use_jsonb=True, ) # The storage layer for the parent documents store = InMemoryStore() id_key = "doc_id" # indexing the summaries in our vector store, whilst retaining the original documents in our document store: retriever = MultiVectorRetriever( vectorstore=vectorstore, docstore=store, id_key=id_key, ) # Changed from summaries to chunks since we need same length as docs doc_ids = [str(uuid.uuid4()) for _ in chunks] # Each summary is linked to the original document by the doc_id summary_docs = [ Document(page_content=s, metadata={id_key: doc_ids[i]}) for i, s in enumerate(summaries) ] # Add the document summaries to the vector store for similarity search retriever.vectorstore.add_documents(summary_docs) # Store the original documents in the document store, linked to their summaries via doc_ids # This allows us to first search summaries efficiently, then fetch the full docs when needed retriever.docstore.mset(list(zip(doc_ids, chunks))) # vector store retrieves the summaries sub_docs = retriever.vectorstore.similarity_search( "chapter on philosophy", k=2) print("sub docs: ", sub_docs[0].page_content) print("length of sub docs:\n", len(sub_docs[0].page_content)) # Whereas the retriever will return the larger source document chunks: retrieved_docs = retriever.invoke("chapter on philosophy") print("length of retrieved docs: ", len(retrieved_docs[0].page_content)) ================================================ FILE: ch2/py/l-rag-colbert.py ================================================ """ - Windows is not supported. RAGatouille doesn't appear to work outside WSL and has issues with WSL1. Some users have had success running RAGatouille in WSL2. - Only on python. - Read full docs here: https://github.com/AnswerDotAI/RAGatouille/blob/8183aad64a9a6ba805d4066dcab489d97615d316/README.md - To install run: ```bash pip install -U ragatouille transformers ``` """ from ragatouille import RAGPretrainedModel import requests RAG = RAGPretrainedModel.from_pretrained("colbert-ir/colbertv2.0") def get_wikipedia_page(title: str): """ Retrieve the full text content of a Wikipedia page. :param title: str - Title of the Wikipedia page. :return: str - Full text content of the page as raw string. """ # Wikipedia API endpoint URL = "https://en.wikipedia.org/w/api.php" # Parameters for the API request params = { "action": "query", "format": "json", "titles": title, "prop": "extracts", "explaintext": True, } # Custom User-Agent header to comply with Wikipedia's best practices headers = {"User-Agent": "RAGatouille_tutorial/0.0.1"} response = requests.get(URL, params=params, headers=headers) data = response.json() # Extracting page content page = next(iter(data["query"]["pages"].values())) return page["extract"] if "extract" in page else None full_document = get_wikipedia_page("Hayao_Miyazaki") # Create an index RAG.index( collection=[full_document], index_name="Miyazaki-123", max_document_length=180, split_documents=True, ) # query results = RAG.search(query="What animation studio did Miyazaki found?", k=3) print(results) # Alternative: Utilize langchain retriever retriever = RAG.as_langchain_retriever(k=3) retriever.invoke("What animation studio did Miyazaki found?") ================================================ FILE: ch3/js/a-basic-rag.js ================================================ /** 1. Ensure docker is installed and running (https://docs.docker.com/get-docker/) 2. Run the following command to start the postgres container: docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 3. Use the connection string below for the postgres container */ import { TextLoader } from 'langchain/document_loaders/fs/text'; import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; import { OpenAIEmbeddings } from '@langchain/openai'; import { PGVectorStore } from '@langchain/community/vectorstores/pgvector'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { ChatOpenAI } from '@langchain/openai'; import { RunnableLambda } from '@langchain/core/runnables'; const connectionString = 'postgresql://langchain:langchain@localhost:6024/langchain'; // Load the document, split it into chunks const loader = new TextLoader('./test.txt'); const raw_docs = await loader.load(); const splitter = new RecursiveCharacterTextSplitter({ chunkSize: 1000, chunkOverlap: 200, }); const splitDocs = await splitter.splitDocuments(raw_docs); // embed each chunk and insert it into the vector store const model = new OpenAIEmbeddings(); const db = await PGVectorStore.fromDocuments(splitDocs, model, { postgresConnectionOptions: { connectionString, }, }); // retrieve 2 relevant documents from the vector store const retriever = db.asRetriever({ k: 2 }); const query = 'Who are the key figures in the ancient greek history of philosophy?'; // fetch relevant documents const docs = await retriever.invoke(query); console.log( `fetched document based on similarity search query:\n ${docs[0].pageContent}\n\n` ); /** * Provide retrieved docs as context to the LLM to answer a user's question */ const prompt = ChatPromptTemplate.fromTemplate( 'Answer the question based only on the following context:\n {context}\n\nQuestion: {question}' ); const llm = new ChatOpenAI({ temperature: 0, modelName: 'gpt-3.5-turbo' }); const chain = prompt.pipe(llm); const result = await chain.invoke({ context: docs, question: query, }); console.log(result); console.log('\n\n'); // run again but this time encapsulate the logic for efficiency console.log( 'Running again but this time encapsulate the logic for efficiency\n' ); const qa = RunnableLambda.from(async (input) => { // fetch relevant documents const docs = await retriever.invoke(input); // format prompt const formatted = await prompt.invoke({ context: docs, question: input }); // generate answer const answer = await llm.invoke(formatted); return answer; }); const finalResult = await qa.invoke(query); console.log(finalResult); ================================================ FILE: ch3/js/b-rewrite.js ================================================ /** 1. Ensure docker is installed and running (https://docs.docker.com/get-docker/) 2. Run the following command to start the postgres container: docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 3. Use the connection string below for the postgres container */ import { TextLoader } from 'langchain/document_loaders/fs/text'; import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; import { OpenAIEmbeddings } from '@langchain/openai'; import { PGVectorStore } from '@langchain/community/vectorstores/pgvector'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { ChatOpenAI } from '@langchain/openai'; import { RunnableLambda } from '@langchain/core/runnables'; const connectionString = 'postgresql://langchain:langchain@localhost:6024/langchain'; // Load the document, split it into chunks const loader = new TextLoader('./test.txt'); const raw_docs = await loader.load(); const splitter = new RecursiveCharacterTextSplitter({ chunkSize: 1000, chunkOverlap: 200, }); const splitDocs = await splitter.splitDocuments(raw_docs); // embed each chunk and insert it into the vector store const model = new OpenAIEmbeddings(); const db = await PGVectorStore.fromDocuments(splitDocs, model, { postgresConnectionOptions: { connectionString, }, }); // retrieve 2 relevant documents from the vector store const retriever = db.asRetriever({ k: 2 }); /** * Query starts with irrelevant information before asking the relevant question */ const query = 'Today I woke up and brushed my teeth, then I sat down to read the news. But then I forgot the food on the cooker. Who are some key figures in the ancient greek history of philosophy?'; /** * Provide retrieved docs as context to the LLM to answer a user's question */ const prompt = ChatPromptTemplate.fromTemplate( 'Answer the question based only on the following context:\n {context}\n\nQuestion: {question}' ); const llm = new ChatOpenAI({ temperature: 0, modelName: 'gpt-3.5-turbo' }); const qa = RunnableLambda.from(async (input) => { // fetch relevant documents const docs = await retriever.invoke(input); // format prompt const formatted = await prompt.invoke({ context: docs, question: input }); // generate answer const answer = await llm.invoke(formatted); return { answer, docs }; }); const result = await qa.invoke(query); console.log(result); console.log('\n\nCall model again with rewritten query\n\n'); const rewritePrompt = ChatPromptTemplate.fromTemplate( `Provide a better search query for web search engine to answer the given question, end the queries with '**'. Question: {question} Answer:` ); const rewriter = rewritePrompt.pipe(llm).pipe((message) => { return message.content.replaceAll('"', '').replaceAll('**'); }); const rewriterQA = RunnableLambda.from(async (input) => { const newQuery = await rewriter.invoke({ question: input }); // fetch relevant documents console.log('New query: ', newQuery); const docs = await retriever.invoke(newQuery); // format prompt const formatted = await prompt.invoke({ context: docs, question: input }); // generate answer const answer = await llm.invoke(formatted); return answer; }); const finalResult = await rewriterQA.invoke(query); console.log(finalResult); ================================================ FILE: ch3/js/c-multi-query.js ================================================ /** 1. Ensure docker is installed and running (https://docs.docker.com/get-docker/) 2. Run the following command to start the postgres container: docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 3. Use the connection string below for the postgres container */ import { TextLoader } from 'langchain/document_loaders/fs/text'; import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; import { OpenAIEmbeddings } from '@langchain/openai'; import { PGVectorStore } from '@langchain/community/vectorstores/pgvector'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { ChatOpenAI } from '@langchain/openai'; import { RunnableLambda } from '@langchain/core/runnables'; const connectionString = 'postgresql://langchain:langchain@localhost:6024/langchain'; // Load the document, split it into chunks const loader = new TextLoader('./test.txt'); const raw_docs = await loader.load(); const splitter = new RecursiveCharacterTextSplitter({ chunkSize: 1000, chunkOverlap: 200, }); const splitDocs = await splitter.splitDocuments(raw_docs); // embed each chunk and insert it into the vector store const model = new OpenAIEmbeddings(); const db = await PGVectorStore.fromDocuments(splitDocs, model, { postgresConnectionOptions: { connectionString, }, }); // retrieve 2 relevant documents from the vector store const retriever = db.asRetriever({ k: 2 }); /** * Provide retrieved docs as context to the LLM to answer a user's question */ const llm = new ChatOpenAI({ temperature: 0, modelName: 'gpt-3.5-turbo' }); const perspectivesPrompt = ChatPromptTemplate.fromTemplate( `You are an AI language model assistant. Your task is to generate five different versions of the given user question to retrieve relevant documents from a vector database. By generating multiple perspectives on the user question, your goal is to help the user overcome some of the limitations of the distance-based similarity search. Provide these alternative questions separated by newlines. Original question: {question}` ); const queryGen = perspectivesPrompt.pipe(llm).pipe((message) => { return message.content.split('\n'); }); /** * This chain retrieves and combines the documents from the vector store for each query */ const retrievalChain = queryGen .pipe(retriever.batch.bind(retriever)) .pipe((documentLists) => { const dedupedDocs = {}; documentLists.flat().forEach((doc) => { dedupedDocs[doc.pageContent] = doc; }); return Object.values(dedupedDocs); }); const prompt = ChatPromptTemplate.fromTemplate( 'Answer the question based only on the following context:\n {context}\n\nQuestion: {question}' ); console.log('Running multi query qa\n'); const multiQueryQa = RunnableLambda.from(async (input) => { // fetch relevant documents const docs = await retrievalChain.invoke({ question: input }); // format prompt const formatted = await prompt.invoke({ context: docs, question: input }); // generate answer const answer = await llm.invoke(formatted); return answer; }); const result = await multiQueryQa.invoke( 'Who are the key figures in the ancient greek history of philosophy?' ); console.log(result); ================================================ FILE: ch3/js/d-rag-fusion.js ================================================ /** 1. Ensure docker is installed and running (https://docs.docker.com/get-docker/) 2. Run the following command to start the postgres container: docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 3. Use the connection string below for the postgres container */ import { TextLoader } from 'langchain/document_loaders/fs/text'; import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; import { OpenAIEmbeddings } from '@langchain/openai'; import { PGVectorStore } from '@langchain/community/vectorstores/pgvector'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { ChatOpenAI } from '@langchain/openai'; import { RunnableLambda } from '@langchain/core/runnables'; const connectionString = 'postgresql://langchain:langchain@localhost:6024/langchain'; // Load the document, split it into chunks const loader = new TextLoader('./test.txt'); const raw_docs = await loader.load(); const splitter = new RecursiveCharacterTextSplitter({ chunkSize: 1000, chunkOverlap: 200, }); const splitDocs = await splitter.splitDocuments(raw_docs); // embed each chunk and insert it into the vector store const model = new OpenAIEmbeddings(); const db = await PGVectorStore.fromDocuments(splitDocs, model, { postgresConnectionOptions: { connectionString, }, }); // retrieve 2 relevant documents from the vector store const retriever = db.asRetriever({ k: 2 }); /** * Provide retrieved docs as context to the LLM to answer a user's question */ const llm = new ChatOpenAI({ temperature: 0, modelName: 'gpt-3.5-turbo' }); const perspectivesPrompt = ChatPromptTemplate.fromTemplate( `You are a helpful assistant that generates multiple search queries based on a single input query. \n Generate multiple search queries related to: {question} \n Output (4 queries):` ); const queryGen = perspectivesPrompt.pipe(llm).pipe((message) => { return message.content.split('\n'); }); function reciprocalRankFusion(results, k = 60) { // Initialize a dictionary to hold fused scores for each document // Documents will be keyed by their contents to ensure uniqueness const fusedScores = {}; const documents = {}; results.forEach((docs) => { docs.forEach((doc, rank) => { // Use the document contents as the key for uniqueness const key = doc.pageContent; // If the document hasn't been seen yet, // - initialize score to 0 // - save it for later if (!(key in fusedScores)) { fusedScores[key] = 0; documents[key] = 0; } // Update the score of the document using the RRF formula: // 1 / (rank + k) fusedScores[key] += 1 / (rank + k); }); }); // Sort the documents based on their fused scores in descending order to get the final reranked results const sorted = Object.entries(fusedScores).sort((a, b) => b[1] - a[1]); // retrieve the corresponding doc for each key return sorted.map(([key]) => documents[key]); } const prompt = ChatPromptTemplate.fromTemplate( 'Answer the question based only on the following context:\n {context}\n\nQuestion: {question}' ); const retrievalChain = queryGen .pipe(retriever.batch.bind(retriever)) .pipe(reciprocalRankFusion); console.log('Running rag fusion\n'); const ragFusion = RunnableLambda.from(async (input) => { // fetch relevant documents const docs = await retrievalChain.invoke({ question: input }); // format prompt const formatted = await prompt.invoke({ context: docs, question: input }); // generate answer const answer = await llm.invoke(formatted); return answer; }); const result = await ragFusion.invoke( 'Who are the key figures in the ancient greek history of philosophy?' ); console.log(result); ================================================ FILE: ch3/js/e-hyde.js ================================================ /** 1. Ensure docker is installed and running (https://docs.docker.com/get-docker/) 2. Run the following command to start the postgres container: docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 3. Use the connection string below for the postgres container */ import { TextLoader } from 'langchain/document_loaders/fs/text'; import { RecursiveCharacterTextSplitter } from '@langchain/textsplitters'; import { OpenAIEmbeddings } from '@langchain/openai'; import { PGVectorStore } from '@langchain/community/vectorstores/pgvector'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { ChatOpenAI } from '@langchain/openai'; import { RunnableLambda } from '@langchain/core/runnables'; const connectionString = 'postgresql://langchain:langchain@localhost:6024/langchain'; // Load the document, split it into chunks const loader = new TextLoader('./test.txt'); const raw_docs = await loader.load(); const splitter = new RecursiveCharacterTextSplitter({ chunkSize: 1000, chunkOverlap: 200, }); const splitDocs = await splitter.splitDocuments(raw_docs); // embed each chunk and insert it into the vector store const model = new OpenAIEmbeddings(); const db = await PGVectorStore.fromDocuments(splitDocs, model, { postgresConnectionOptions: { connectionString, }, }); // retrieve 2 relevant documents from the vector store const retriever = db.asRetriever({ k: 2 }); /** * Provide retrieved docs as context to the LLM to answer a user's question */ const llm = new ChatOpenAI({ temperature: 0, modelName: 'gpt-3.5-turbo' }); const hydePrompt = ChatPromptTemplate.fromTemplate( `Please write a passage to answer the question.\n Question: {question} \n Passage:` ); const generatedDoc = hydePrompt.pipe(llm).pipe((msg) => msg.content); /** * This chain retrieves and combines the documents from the vector store for each query */ const retrievalChain = generatedDoc.pipe(retriever); const prompt = ChatPromptTemplate.fromTemplate( 'Answer the question based only on the following context:\n {context}\n\nQuestion: {question}' ); console.log('Running hyde\n'); const hydeQa = RunnableLambda.from(async (input) => { // fetch relevant documents const docs = await retrievalChain.invoke(input); // format prompt const formatted = await prompt.invoke({ context: docs, question: input }); // generate answer const answer = await llm.invoke(formatted); return answer; }); const result = await hydeQa.invoke( 'Who are some lesser known philosophers in the ancient greek history of philosophy?' ); console.log(result); ================================================ FILE: ch3/js/f-router.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { z } from 'zod'; import { ChatPromptTemplate } from '@langchain/core/prompts'; const routeQuery = z .object({ datasource: z .enum(['python_docs', 'js_docs']) .describe( 'Given a user question, choose which datasource would be most relevant for answering their question' ), }) .describe('Route a user query to the most relevant datasource.'); const llm = new ChatOpenAI({ model: 'gpt-3.5-turbo', temperature: 0 }); // withStructuredOutput is a method that allows us to use the structured output of the model const structuredLlm = llm.withStructuredOutput(routeQuery, { name: 'RouteQuery', }); const prompt = ChatPromptTemplate.fromMessages([ [ 'system', `You are an expert at routing a user question to the appropriate data source. Based on the programming language the question is referring to, route it to the relevant data source.`, ], ['human', '{question}'], ]); const router = prompt.pipe(structuredLlm); const question = `Why doesn't the following code work: from langchain_core.prompts import ChatPromptTemplate prompt = ChatPromptTemplate.from_messages(["human", "speak in {language}"]) prompt.invoke("french") `; const result = await router.invoke({ question }); console.log('Routing to: ', result); /** Once we’ve extracted the relevant data source, we can pass the value into another function to execute additional logic as required: */ const chooseRoute = (result) => { if (result.datasource.toLowerCase().includes('python_docs')) { return 'chain for python_docs'; } else { return 'chain for js_docs'; } }; const fullChain = router.pipe(chooseRoute); const finalResult = await fullChain.invoke({ question }); console.log('Choose route: ', finalResult); ================================================ FILE: ch3/js/g-semantic-router.js ================================================ import { cosineSimilarity } from '@langchain/core/utils/math'; import { ChatOpenAI, OpenAIEmbeddings } from '@langchain/openai'; import { PromptTemplate } from '@langchain/core/prompts'; import { RunnableLambda } from '@langchain/core/runnables'; const physicsTemplate = `You are a very smart physics professor. You are great at answering questions about physics in a concise and easy-to-understand manner. When you don't know the answer to a question, you admit that you don't know. Here is a question: {query}`; const mathTemplate = `You are a very good mathematician. You are great at answering math questions. You are so good because you are able to break down hard problems into their component parts, answer the component parts, and then put them together to answer the broader question. Here is a question: {query}`; const embeddings = new OpenAIEmbeddings(); const promptTemplates = [physicsTemplate, mathTemplate]; const promptEmbeddings = await embeddings.embedDocuments(promptTemplates); const promptRouter = RunnableLambda.from(async (query) => { // Embed question const queryEmbedding = await embeddings.embedQuery(query); // Compute similarity const similarities = cosineSimilarity([queryEmbedding], promptEmbeddings)[0]; // Pick the prompt most similar to the input question const mostSimilar = similarities[0] > similarities[1] ? promptTemplates[0] : promptTemplates[1]; console.log( `Using ${mostSimilar === promptTemplates[0] ? 'PHYSICS' : 'MATH'}` ); return PromptTemplate.fromTemplate(mostSimilar).invoke({ query }); }); const semanticRouter = promptRouter.pipe( new ChatOpenAI({ modelName: 'gpt-3.5-turbo', temperature: 0 }) ); const result = await semanticRouter.invoke('What is a black hole'); console.log('\nSemantic router result: ', result); ================================================ FILE: ch3/js/h-self-query.js ================================================ import { ChatOpenAI } from '@langchain/openai'; import { SelfQueryRetriever } from 'langchain/retrievers/self_query'; import { FunctionalTranslator } from '@langchain/core/structured_query'; import { MemoryVectorStore } from 'langchain/vectorstores/memory'; import { Document } from 'langchain/document'; import { AttributeInfo } from 'langchain/chains/query_constructor'; import { OpenAIEmbeddings } from '@langchain/openai'; /** * First, we create a bunch of documents. You can load your own documents here instead. * Each document has a pageContent and a metadata field. Make sure your metadata matches the AttributeInfo below. */ const docs = [ new Document({ pageContent: 'A bunch of scientists bring back dinosaurs and mayhem breaks loose', metadata: { year: 1993, rating: 7.7, genre: 'science fiction', length: 122, }, }), new Document({ pageContent: 'Leo DiCaprio gets lost in a dream within a dream within a dream within a ...', metadata: { year: 2010, director: 'Christopher Nolan', rating: 8.2, length: 148, }, }), new Document({ pageContent: 'A psychologist / detective gets lost in a series of dreams within dreams within dreams and Inception reused the idea', metadata: { year: 2006, director: 'Satoshi Kon', rating: 8.6 }, }), new Document({ pageContent: 'A bunch of normal-sized women are supremely wholesome and some men pine after them', metadata: { year: 2019, director: 'Greta Gerwig', rating: 8.3, length: 135, }, }), new Document({ pageContent: 'Toys come alive and have a blast doing so', metadata: { year: 1995, genre: 'animated', length: 77 }, }), new Document({ pageContent: 'Three men walk into the Zone, three men walk out of the Zone', metadata: { year: 1979, director: 'Andrei Tarkovsky', genre: 'science fiction', rating: 9.9, }, }), ]; const llm = new ChatOpenAI({ modelName: 'gpt-3.5-turbo', temperature: 0 }); const embeddings = new OpenAIEmbeddings(); const vectorStore = await MemoryVectorStore.fromDocuments(docs, embeddings); /** * First, we define the attributes we want to be able to query on. * in this case, we want to be able to query on the genre, year, director, rating, and length of the movie. * We also provide a description of each attribute and the type of the attribute. * This is used to generate the query prompts. */ const fields = [ { name: 'genre', description: 'The genre of the movie', type: 'string or array of strings', }, { name: 'year', description: 'The year the movie was released', type: 'number', }, { name: 'director', description: 'The director of the movie', type: 'string', }, { name: 'rating', description: 'The rating of the movie (1-10)', type: 'number', }, { name: 'length', description: 'The length of the movie in minutes', type: 'number', }, ]; const attributeInfos = fields.map( (field) => new AttributeInfo(field.name, field.description, field.type) ); const description = 'Brief summary of a movie'; const selfQueryRetriever = SelfQueryRetriever.fromLLM({ llm, vectorStore, description, attributeInfo: attributeInfos, /** * We need to use a translator that translates the queries into a * filter format that the vector store can understand. LangChain provides one * here. */ structuredQueryTranslator: new FunctionalTranslator(), }); const result = await selfQueryRetriever.invoke( 'Which movies are less than 90 minutes?' ); console.log(result); ================================================ FILE: ch3/js/i-sql-example.js ================================================ /* The below example will use a SQLite connection with the Chinook database, which is a sample database that represents a digital media store. Follow these installation steps to create Chinook.db in the same directory as this notebook. You can also download and build the database via the command line: ```bash curl -s https://raw.githubusercontent.com/lerocha/chinook-database/master/ChinookDatabase/DataSources/Chinook_Sqlite.sql | sqlite3 Chinook.db ``` Afterwards, place `Chinook.db` in the same directory where this code is running. */ import { ChatOpenAI } from '@langchain/openai'; import { createSqlQueryChain } from 'langchain/chains/sql_db'; import { SqlDatabase } from 'langchain/sql_db'; import { DataSource } from 'typeorm'; import { QuerySqlTool } from 'langchain/tools/sql'; const datasource = new DataSource({ type: 'sqlite', database: 'Chinook.db', //this should be the path to the db }); const db = await SqlDatabase.fromDataSourceParams({ appDataSource: datasource, }); //test that the db is working await db.run('SELECT * FROM Artist LIMIT 10;'); const llm = new ChatOpenAI({ modelName: 'gpt-4o', temperature: 0 }); // convert question to sql query const writeQuery = await createSqlQueryChain({ llm, db, dialect: 'sqlite' }); // execute query const executeQuery = new QuerySqlTool(db); // combined const chain = writeQuery.pipe(executeQuery); const result = await chain.invoke({ question: 'How many employees are there?', }); console.log(result); ================================================ FILE: ch3/py/a-basic-rag.py ================================================ """ 1. Ensure docker is installed and running (https://docs.docker.com/get-docker/) 2. pip install -qU langchain_postgres 3. Run the following command to start the postgres container: docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 4. Use the connection string below for the postgres container """ from langchain_community.document_loaders import TextLoader from langchain_openai import OpenAIEmbeddings from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_postgres.vectorstores import PGVector from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate from langchain_core.runnables import chain # See docker command above to launch a postgres instance with pgvector enabled. connection = "postgresql+psycopg://langchain:langchain@localhost:6024/langchain" # Load the document, split it into chunks raw_documents = TextLoader('./test.txt', encoding='utf-8').load() text_splitter = RecursiveCharacterTextSplitter( chunk_size=1000, chunk_overlap=200) documents = text_splitter.split_documents(raw_documents) # Create embeddings for the documents embeddings_model = OpenAIEmbeddings() db = PGVector.from_documents( documents, embeddings_model, connection=connection) # create retriever to retrieve 2 relevant documents retriever = db.as_retriever(search_kwargs={"k": 2}) query = 'Who are the key figures in the ancient greek history of philosophy?' # fetch relevant documents docs = retriever.invoke(query) print(docs[0].page_content) prompt = ChatPromptTemplate.from_template( """Answer the question based only on the following context: {context} Question: {question} """ ) llm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0) llm_chain = prompt | llm # answer the question based on relevant documents result = llm_chain.invoke({"context": docs, "question": query}) print(result) print("\n\n") # Run again but this time encapsulate the logic for efficiency # @chain decorator transforms this function into a LangChain runnable, # making it compatible with LangChain's chain operations and pipeline print("Running again but this time encapsulate the logic for efficiency\n") @chain def qa(input): # fetch relevant documents docs = retriever.invoke(input) # format prompt formatted = prompt.invoke({"context": docs, "question": input}) # generate answer answer = llm.invoke(formatted) return answer # run it result = qa.invoke(query) print(result.content) ================================================ FILE: ch3/py/b-rewrite.py ================================================ """ 1. Ensure docker is installed and running (https://docs.docker.com/get-docker/) 2. pip install -qU langchain_postgres 3. Run the following command to start the postgres container: docker run \ --name pgvector-container \ -e POSTGRES_USER=langchain \ -e POSTGRES_PASSWORD=langchain \ -e POSTGRES_DB=langchain \ -p 6024:5432 \ -d pgvector/pgvector:pg16 4. Use the connection string below for the postgres container """ from langchain_community.document_loaders import TextLoader from langchain_openai import OpenAIEmbeddings from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_postgres.vectorstores import PGVector from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate from langchain_core.runnables import chain # See docker command above to launch a postgres instance with pgvector enabled. connection = "postgresql+psycopg://langchain:langchain@localhost:6024/langchain" # Load the document, split it into chunks raw_documents = TextLoader('./test.txt', encoding='utf-8').load() text_splitter = RecursiveCharacterTextSplitter( chunk_size=1000, chunk_overlap=200) documents = text_splitter.split_documents(raw_documents) # Create embeddings for the documents embeddings_model = OpenAIEmbeddings() db = PGVector.from_documents( documents, embeddings_model, connection=connection) # create retriever to retrieve 2 relevant documents retriever = db.as_retriever(search_kwargs={"k": 2}) # Query starts with irrelevant information before asking the relevant question query = 'Today I woke up and brushed my teeth, then I sat down to read the news. But then I forgot the food on the cooker. Who are some key figures in the ancient greek history of philosophy?' # fetch relevant documents docs = retriever.invoke(query) print(docs[0].page_content) print("\n\n") prompt = ChatPromptTemplate.from_template( """Answer the question based only on the following context: {context} Question: {question} """ ) llm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0) # Run again but this time encapsulate the logic for efficiency # @chain decorator transforms this function into a LangChain runnable, # making it compatible with LangChain's chain operations and pipeline @chain def qa(input): # fetch relevant documents docs = retriever.invoke(input) # format prompt formatted = prompt.invoke({"context": docs, "question": input}) # generate answer answer = llm.invoke(formatted) return answer # run it result = qa.invoke(query) print(result.content) print("\nRewrite the query to improve accuracy\n") rewrite_prompt = ChatPromptTemplate.from_template( """Provide a better search query for web search engine to answer the given question, end the queries with ’**’. Question: {x} Answer:""") def parse_rewriter_output(message): return message.content.strip('"').strip("**") rewriter = rewrite_prompt | llm | parse_rewriter_output @chain def qa_rrr(input): # rewrite the query new_query = rewriter.invoke(input) print("Rewritten query: ", new_query) # fetch relevant documents docs = retriever.invoke(new_query) # format prompt formatted = prompt.invoke({"context": docs, "question": input}) # generate answer answer = llm.invoke(formatted) return answer print("\nCall model again with rewritten query\n") # call model again with rewritten query result = qa_rrr.invoke(query) print(result.content) ================================================ FILE: ch3/py/c-multi-query.py ================================================ from langchain_community.document_loaders import TextLoader from langchain_openai import OpenAIEmbeddings from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_postgres.vectorstores import PGVector from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate from langchain_core.runnables import chain # See docker command above to launch a postgres instance with pgvector enabled. connection = "postgresql+psycopg://langchain:langchain@localhost:6024/langchain" # Load the document, split it into chunks raw_documents = TextLoader('./test.txt', encoding='utf-8').load() text_splitter = RecursiveCharacterTextSplitter( chunk_size=1000, chunk_overlap=200) documents = text_splitter.split_documents(raw_documents) # Create embeddings for the documents embeddings_model = OpenAIEmbeddings() db = PGVector.from_documents( documents, embeddings_model, connection=connection) # create retriever to retrieve 2 relevant documents retriever = db.as_retriever(search_kwargs={"k": 5}) # instruction to generate multiple queries perspectives_prompt = ChatPromptTemplate.from_template( """You are an AI language model assistant. Your task is to generate five different versions of the given user question to retrieve relevant documents from a vector database. By generating multiple perspectives on the user question, your goal is to help the user overcome some of the limitations of the distance-based similarity search. Provide these alternative questions separated by newlines. Original question: {question}""") llm = ChatOpenAI(model="gpt-3.5-turbo") def parse_queries_output(message): return message.content.split('\n') query_gen = perspectives_prompt | llm | parse_queries_output def get_unique_union(document_lists): # Flatten list of lists, and dedupe them deduped_docs = { doc.page_content: doc for sublist in document_lists for doc in sublist} # return a flat list of unique docs return list(deduped_docs.values()) retrieval_chain = query_gen | retriever.batch | get_unique_union prompt = ChatPromptTemplate.from_template( """Answer the question based only on the following context: {context} Question: {question} """ ) query = "Who are the key figures in the ancient greek history of philosophy?" @chain def multi_query_qa(input): # fetch relevant documents docs = retrieval_chain.invoke(input) # format prompt formatted = prompt.invoke( {"context": docs, "question": input}) # generate answer answer = llm.invoke(formatted) return answer # run print("Running multi query qa\n") result = multi_query_qa.invoke(query) print(result.content) ================================================ FILE: ch3/py/d-rag-fusion.py ================================================ from langchain_community.document_loaders import TextLoader from langchain_openai import OpenAIEmbeddings from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_postgres.vectorstores import PGVector from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate from langchain_core.runnables import chain # See docker command above to launch a postgres instance with pgvector enabled. connection = "postgresql+psycopg://langchain:langchain@localhost:6024/langchain" # Load the document, split it into chunks raw_documents = TextLoader('./test.txt', encoding='utf-8').load() text_splitter = RecursiveCharacterTextSplitter( chunk_size=1000, chunk_overlap=200) documents = text_splitter.split_documents(raw_documents) # Create embeddings for the documents embeddings_model = OpenAIEmbeddings() db = PGVector.from_documents( documents, embeddings_model, connection=connection) # create retriever to retrieve 2 relevant documents retriever = db.as_retriever(search_kwargs={"k": 5}) prompt_rag_fusion = ChatPromptTemplate.from_template( """You are a helpful assistant that generates multiple search queries based on a single input query. \n Generate multiple search queries related to: {question} \n Output (4 queries):""") def parse_queries_output(message): return message.content.split('\n') llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0) query_gen = prompt_rag_fusion | llm | parse_queries_output query = "Who are the key figures in the ancient greek history of philosophy?" generated_queries = query_gen.invoke(query) print("generated queries: ", generated_queries) """ we fetch relevant documents for each query and pass them into a function to rerank (that is, reorder according to relevancy) the final list of relevant documents. """ def reciprocal_rank_fusion(results: list[list], k=60): """reciprocal rank fusion on multiple lists of ranked documents and an optional parameter k used in the RRF formula""" # Initialize a dictionary to hold fused scores for each document # Documents will be keyed by their contents to ensure uniqueness fused_scores = {} documents = {} for docs in results: # Iterate through each document in the list, with its rank (position in the list) for rank, doc in enumerate(docs): doc_str = doc.page_content if doc_str not in fused_scores: fused_scores[doc_str] = 0 documents[doc_str] = doc fused_scores[doc_str] += 1 / (rank + k) # sort the documents based on their fused scores in descending order to get the final reranked results reranked_doc_strs = sorted( fused_scores, key=lambda d: fused_scores[d], reverse=True) return [documents[doc_str] for doc_str in reranked_doc_strs] retrieval_chain = query_gen | retriever.batch | reciprocal_rank_fusion result = retrieval_chain.invoke(query) print("retrieved context using rank fusion: ", result[0].page_content) print("\n\n") print("Use model to answer question based on retrieved docs\n") prompt = ChatPromptTemplate.from_template( """Answer the question based only on the following context: {context} Question: {question} """ ) query = "Who are the some important yet not well known philosophers in the ancient greek history of philosophy?" @chain def rag_fusion(input): # fetch relevant documents docs = retrieval_chain.invoke(input) # format prompt formatted = prompt.invoke( {"context": docs, "question": input}) # generate answer answer = llm.invoke(formatted) return answer # run print("Running rag fusion\n") result = rag_fusion.invoke(query) print(result.content) ================================================ FILE: ch3/py/e-hyde.py ================================================ from langchain_community.document_loaders import TextLoader from langchain_openai import OpenAIEmbeddings from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_postgres.vectorstores import PGVector from langchain_openai import ChatOpenAI from langchain_core.prompts import ChatPromptTemplate from langchain_core.runnables import chain from langchain_core.output_parsers import StrOutputParser # See docker command above to launch a postgres instance with pgvector enabled. connection = "postgresql+psycopg://langchain:langchain@localhost:6024/langchain" # Load the document, split it into chunks raw_documents = TextLoader('./test.txt', encoding='utf-8').load() text_splitter = RecursiveCharacterTextSplitter( chunk_size=1000, chunk_overlap=200) documents = text_splitter.split_documents(raw_documents) # Create embeddings for the documents embeddings_model = OpenAIEmbeddings() db = PGVector.from_documents( documents, embeddings_model, connection=connection) # create retriever to retrieve 2 relevant documents retriever = db.as_retriever(search_kwargs={"k": 5}) prompt_hyde = ChatPromptTemplate.from_template( """Please write a passage to answer the question.\n Question: {question} \n Passage:""") generate_doc = (prompt_hyde | ChatOpenAI(temperature=0) | StrOutputParser()) """ Next, we take the hypothetical document generated above and use it as input to the retriever, which will generate its embedding and search for similar documents in the vector store: """ retrieval_chain = generate_doc | retriever query = "Who are some lesser known philosophers in the ancient greek history of philosophy?" prompt = ChatPromptTemplate.from_template( """Answer the question based only on the following context: {context} Question: {question} """ ) llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0) @chain def qa(input): # fetch relevant documents from the hyde retrieval chain defined earlier docs = retrieval_chain.invoke(input) # format prompt formatted = prompt.invoke({"context": docs, "question": input}) # generate answer answer = llm.invoke(formatted) return answer print("Running hyde\n") result = qa.invoke(query) print("\n\n") print(result.content) ================================================ FILE: ch3/py/f-router.py ================================================ from typing import Literal from langchain_core.prompts import ChatPromptTemplate from pydantic import BaseModel, Field from langchain_openai import ChatOpenAI from langchain_core.runnables import RunnableLambda # Data model class class RouteQuery(BaseModel): """Route a user query to the most relevant datasource.""" datasource: Literal["python_docs", "js_docs"] = Field( ..., description="Given a user question, choose which datasource would be most relevant for answering their question", ) # Prompt template # LLM with function call llm = ChatOpenAI(model="gpt-4o", temperature=0) """ with_structured_output: Model wrapper that returns outputs formatted to match the given schema. """ structured_llm = llm.with_structured_output(RouteQuery) # Prompt system = """You are an expert at routing a user question to the appropriate data source. Based on the programming language the question is referring to, route it to the relevant data source.""" prompt = ChatPromptTemplate.from_messages( [("system", system), ("human", "{question}")] ) # Define router router = prompt | structured_llm # Run question = """Why doesn't the following code work: from langchain_core.prompts import ChatPromptTemplate prompt = ChatPromptTemplate.from_messages(["human", "speak in {language}"]) prompt.invoke("french") """ result = router.invoke({"question": question}) print("\nRouting to: ", result) """ Once we extracted the relevant data source, we can pass the value into another function to execute additional logic as required: """ def choose_route(result): if "python_docs" in result.datasource.lower(): return "chain for python_docs" else: return "chain for js_docs" full_chain = router | RunnableLambda(choose_route) result = full_chain.invoke({"question": question}) print("\nChoose route: ", result) ================================================ FILE: ch3/py/g-semantic-router.py ================================================ from langchain.utils.math import cosine_similarity from langchain_core.output_parsers import StrOutputParser from langchain_core.prompts import PromptTemplate from langchain_core.runnables import chain from langchain_openai import ChatOpenAI, OpenAIEmbeddings physics_template = """You are a very smart physics professor. You are great at answering questions about physics in a concise and easy-to-understand manner. When you don't know the answer to a question, you admit that you don't know. Here is a question: {query}""" math_template = """You are a very good mathematician. You are great at answering math questions. You are so good because you are able to break down hard problems into their component parts, answer the component parts, and then put them together to answer the broader question. Here is a question: {query}""" # Embed prompts embeddings = OpenAIEmbeddings() prompt_templates = [physics_template, math_template] prompt_embeddings = embeddings.embed_documents(prompt_templates) # Route question to prompt @chain def prompt_router(query): query_embedding = embeddings.embed_query(query) similarity = cosine_similarity([query_embedding], prompt_embeddings)[0] most_similar = prompt_templates[similarity.argmax()] print("Using MATH" if most_similar == math_template else "Using PHYSICS") return PromptTemplate.from_template(most_similar) semantic_router = (prompt_router | ChatOpenAI() | StrOutputParser()) result = semantic_router.invoke("What's a black hole") print("\nSemantic router result: ", result) ================================================ FILE: ch3/py/h-self-query.py ================================================ # pip install lark from langchain.chains.query_constructor.base import AttributeInfo from langchain.retrievers.self_query.base import SelfQueryRetriever from langchain_openai import ChatOpenAI from langchain_community.document_loaders import TextLoader from langchain_openai import OpenAIEmbeddings from langchain_text_splitters import RecursiveCharacterTextSplitter from langchain_postgres.vectorstores import PGVector from langchain_core.documents import Document # See docker command above to launch a postgres instance with pgvector enabled. connection = "postgresql+psycopg://langchain:langchain@localhost:6024/langchain" docs = [ Document( page_content="A bunch of scientists bring back dinosaurs and mayhem breaks loose", metadata={"year": 1993, "rating": 7.7, "genre": "science fiction"}, ), Document( page_content="Leo DiCaprio gets lost in a dream within a dream within a dream within a ...", metadata={"year": 2010, "director": "Christopher Nolan", "rating": 8.2}, ), Document( page_content="A psychologist / detective gets lost in a series of dreams within dreams within dreams and Inception reused the idea", metadata={"year": 2006, "director": "Satoshi Kon", "rating": 8.6}, ), Document( page_content="A bunch of normal-sized women are supremely wholesome and some men pine after them", metadata={"year": 2019, "director": "Greta Gerwig", "rating": 8.3}, ), Document( page_content="Toys come alive and have a blast doing so", metadata={"year": 1995, "genre": "animated"}, ), Document( page_content="Three men walk into the Zone, three men walk out of the Zone", metadata={ "year": 1979, "director": "Andrei Tarkovsky", "genre": "thriller", "rating": 9.9, }, ), ] # Create embeddings for the documents embeddings_model = OpenAIEmbeddings() vectorstore = PGVector.from_documents( docs, embeddings_model, connection=connection) # Define the fields for the query fields = [ AttributeInfo( name="genre", description="The genre of the movie", type="string or list[string]", ), AttributeInfo( name="year", description="The year the movie was released", type="integer", ), AttributeInfo( name="director", description="The name of the movie director", type="string", ), AttributeInfo( name="rating", description="A 1-10 rating for the movie", type="float", ), ] description = "Brief summary of a movie" llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0) retriever = SelfQueryRetriever.from_llm(llm, vectorstore, description, fields) # This example only specifies a filter print(retriever.invoke("I want to watch a movie rated higher than 8.5")) print('\n') # This example specifies multiple filters print(retriever.invoke( "What's a highly rated (above 8.5) science fiction film?")) ================================================ FILE: ch3/py/i-sql-example.py ================================================ """ The below example will use a SQLite connection with the Chinook database, which is a sample database that represents a digital media store. Follow these installation steps to create Chinook.db in the same directory as this notebook. You can also download and build the database via the command line: ```bash curl -s https://raw.githubusercontent.com/lerocha/chinook-database/master/ChinookDatabase/DataSources/Chinook_Sqlite.sql | sqlite3 Chinook.db ``` Afterwards, place `Chinook.db` in the same directory where this code is running. """ from langchain_community.tools import QuerySQLDatabaseTool from langchain_community.utilities import SQLDatabase from langchain.chains import create_sql_query_chain # replace this with the connection details of your db from langchain_openai import ChatOpenAI db = SQLDatabase.from_uri("sqlite:///Chinook.db") print(db.get_usable_table_names()) llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0) # convert question to sql query write_query = create_sql_query_chain(llm, db) # Execute SQL query execute_query = QuerySQLDatabaseTool(db=db) # combined chain = write_query | execute_query combined_chain = write_query | execute_query # run the chain result = combined_chain.invoke({"question": "How many employees are there?"}) print(result) ================================================ FILE: ch4/js/a-simple-memory.js ================================================ import { ChatPromptTemplate } from '@langchain/core/prompts'; import { ChatOpenAI } from '@langchain/openai'; const prompt = ChatPromptTemplate.fromMessages([ [ 'system', 'You are a helpful assistant. Answer all questions to the best of your ability.', ], ['placeholder', '{messages}'], ]); const model = new ChatOpenAI(); const chain = prompt.pipe(model); const response = await chain.invoke({ messages: [ [ 'human', 'Translate this sentence from English to French: I love programming.', ], ['ai', "J'adore programmer."], ['human', 'What did you just say?'], ], }); console.log(response.content); ================================================ FILE: ch4/js/b-state-graph.js ================================================ import { StateGraph, Annotation, messagesStateReducer, START, END, } from '@langchain/langgraph'; import { ChatOpenAI } from '@langchain/openai'; import { HumanMessage } from '@langchain/core/messages'; const State = { messages: Annotation({ reducer: messagesStateReducer, default: () => [], }), }; let builder = new StateGraph(State); const model = new ChatOpenAI(); async function chatbot(state) { const answer = await model.invoke(state.messages); return { messages: answer }; } builder = builder.addNode('chatbot', chatbot); builder = builder.addEdge(START, 'chatbot').addEdge('chatbot', END); let graph = builder.compile(); // Run the graph const input = { messages: [new HumanMessage('hi!')] }; for await (const chunk of await graph.stream(input)) { console.log(chunk); } ================================================ FILE: ch4/js/c-persistent-memory.js ================================================ import { StateGraph, Annotation, messagesStateReducer, START, } from "@langchain/langgraph"; import { ChatOpenAI } from "@langchain/openai"; import { MemorySaver } from "@langchain/langgraph"; import { HumanMessage } from "@langchain/core/messages"; const State = { messages: Annotation({ reducer: messagesStateReducer, default: () => [], }), }; let builder = new StateGraph(State); const model = new ChatOpenAI(); async function chatbot(state) { const answer = await model.invoke(state.messages); return { messages: answer }; } builder = builder.addNode("chatbot", chatbot); builder = builder.addEdge(START, "chatbot").addEdge("chatbot", END); // Add persistence const graph = builder.compile({ checkpointer: new MemorySaver() }); // Configure thread const thread1 = { configurable: { thread_id: "1" } }; // Run with persistence const result_1 = await graph.invoke( { messages: [new HumanMessage("hi, my name is Jack!")], }, thread1, ); console.log(result_1); const result_2 = await graph.invoke( { messages: [new HumanMessage("what is my name?")], }, thread1, ); console.log(result_2); // Get state await graph.getState(thread1); ================================================ FILE: ch4/js/d-trim-messages.js ================================================ import { AIMessage, HumanMessage, SystemMessage, trimMessages, } from "@langchain/core/messages"; import { ChatOpenAI } from "@langchain/openai"; const messages = [ new SystemMessage("you're a good assistant"), new HumanMessage("hi! I'm bob"), new AIMessage("hi!"), new HumanMessage("I like vanilla ice cream"), new AIMessage("nice"), new HumanMessage("whats 2 + 2"), new AIMessage("4"), new HumanMessage("thanks"), new AIMessage("no problem!"), new HumanMessage("having fun?"), new AIMessage("yes!"), ]; const trimmer = trimMessages({ maxTokens: 65, strategy: "last", tokenCounter: new ChatOpenAI({ modelName: "gpt-4o" }), includeSystem: true, allowPartial: false, startOn: "human", }); const trimmed = await trimmer.invoke(messages); console.log(trimmed); ================================================ FILE: ch4/js/e-filter-messages.js ================================================ import { HumanMessage, SystemMessage, AIMessage, filterMessages, } from '@langchain/core/messages'; const messages = [ new SystemMessage({ content: 'you are a good assistant', id: '1' }), new HumanMessage({ content: 'example input', id: '2', name: 'example_user' }), new AIMessage({ content: 'example output', id: '3', name: 'example_assistant', }), new HumanMessage({ content: 'real input', id: '4', name: 'bob' }), new AIMessage({ content: 'real output', id: '5', name: 'alice' }), ]; // Filter for human messages const filterByHumanMessages = filterMessages(messages, { includeTypes: ['human'], }); console.log(`Human messages: ${JSON.stringify(filterByHumanMessages)}`); // Filter to exclude names const filterByExcludedNames = filterMessages(messages, { excludeNames: ['example_user', 'example_assistant'], }); console.log( `\nExcluding example names: ${JSON.stringify(filterByExcludedNames)}` ); // Filter by types and IDs const filterByTypesAndIDs = filterMessages(messages, { includeTypes: ['human', 'ai'], excludeIds: ['3'], }); console.log( `\nFiltered by types and IDs: ${JSON.stringify(filterByTypesAndIDs)}` ); ================================================ FILE: ch4/js/f-merge-messages.js ================================================ import { HumanMessage, SystemMessage, AIMessage, mergeMessageRuns, } from '@langchain/core/messages'; const messages = [ new SystemMessage("you're a good assistant."), new SystemMessage('you always respond with a joke.'), new HumanMessage({ content: [{ type: 'text', text: "i wonder why it's called langchain" }], }), new HumanMessage('and who is harrison chasing anyways'), new AIMessage( 'Well, I guess they thought "WordRope" and "SentenceString" just didn\'t have the same ring to it!' ), new AIMessage( "Why, he's probably chasing after the last cup of coffee in the office!" ), ]; // Merge consecutive messages const mergedMessages = mergeMessageRuns(messages); console.log(mergedMessages); ================================================ FILE: ch4/py/a-simple-memory.py ================================================ from langchain_core.prompts import ChatPromptTemplate from langchain_openai import ChatOpenAI prompt = ChatPromptTemplate.from_messages([ ("system", "You are a helpful assistant. Answer all questions to the best of your ability."), ("placeholder", "{messages}"), ]) model = ChatOpenAI() chain = prompt | model response = chain.invoke({ "messages": [ ("human", "Translate this sentence from English to French: I love programming."), ("ai", "J'adore programmer."), ("human", "What did you just say?"), ], }) print(response.content) ================================================ FILE: ch4/py/b-state-graph.py ================================================ from typing import Annotated, TypedDict from langchain_core.messages import HumanMessage from langchain_openai import ChatOpenAI from langgraph.graph import StateGraph, START, END, add_messages from langgraph.checkpoint.memory import MemorySaver class State(TypedDict): messages: Annotated[list, add_messages] builder = StateGraph(State) model = ChatOpenAI() def chatbot(state: State): answer = model.invoke(state["messages"]) return {"messages": [answer]} # Add the chatbot node builder.add_node("chatbot", chatbot) # Add edges builder.add_edge(START, "chatbot") builder.add_edge("chatbot", END) graph = builder.compile() # Run the graph input = {"messages": [HumanMessage("hi!")]} for chunk in graph.stream(input): print(chunk) ================================================ FILE: ch4/py/c-persistent-memory.py ================================================ from typing import Annotated, TypedDict from langchain_core.messages import HumanMessage from langchain_openai import ChatOpenAI from langgraph.graph import StateGraph, START, END, add_messages from langgraph.checkpoint.memory import MemorySaver class State(TypedDict): messages: Annotated[list, add_messages] builder = StateGraph(State) model = ChatOpenAI() def chatbot(state: State): answer = model.invoke(state["messages"]) return {"messages": [answer]} builder.add_node("chatbot", chatbot) builder.add_edge(START, "chatbot") builder.add_edge("chatbot", END) # Add persistence with MemorySaver graph = builder.compile(checkpointer=MemorySaver()) # Configure thread thread1 = {"configurable": {"thread_id": "1"}} # Run with persistence result_1 = graph.invoke({"messages": [HumanMessage("hi, my name is Jack!")]}, thread1) print(result_1) result_2 = graph.invoke({"messages": [HumanMessage("what is my name?")]}, thread1) print(result_2) # Get state print(graph.get_state(thread1)) ================================================ FILE: ch4/py/d-trim-messages.py ================================================ from langchain_core.messages import ( SystemMessage, HumanMessage, AIMessage, trim_messages, ) from langchain_openai import ChatOpenAI # Define sample messages messages = [ SystemMessage(content="you're a good assistant"), HumanMessage(content="hi! I'm bob"), AIMessage(content="hi!"), HumanMessage(content="I like vanilla ice cream"), AIMessage(content="nice"), HumanMessage(content="whats 2 + 2"), AIMessage(content="4"), HumanMessage(content="thanks"), AIMessage(content="no problem!"), HumanMessage(content="having fun?"), AIMessage(content="yes!"), ] # Create trimmer trimmer = trim_messages( max_tokens=65, strategy="last", token_counter=ChatOpenAI(model="gpt-4o"), include_system=True, allow_partial=False, start_on="human", ) # Apply trimming trimmed = trimmer.invoke(messages) print(trimmed) ================================================ FILE: ch4/py/e-filter-messages.py ================================================ from langchain_core.messages import ( AIMessage, HumanMessage, SystemMessage, filter_messages, ) # Sample messages messages = [ SystemMessage(content="you are a good assistant", id="1"), HumanMessage(content="example input", id="2", name="example_user"), AIMessage(content="example output", id="3", name="example_assistant"), HumanMessage(content="real input", id="4", name="bob"), AIMessage(content="real output", id="5", name="alice"), ] # Filter for human messages human_messages = filter_messages(messages, include_types="human") print("Human messages:", human_messages) # Filter to exclude certain names excluded_names = filter_messages( messages, exclude_names=["example_user", "example_assistant"] ) print("\nExcluding example names:", excluded_names) # Filter by types and IDs filtered_messages = filter_messages( messages, include_types=["human", "ai"], exclude_ids=["3"] ) print("\nFiltered by types and IDs:", filtered_messages) ================================================ FILE: ch4/py/f-merge-messages.py ================================================ from langchain_core.messages import ( AIMessage, HumanMessage, SystemMessage, merge_message_runs, ) # Sample messages with consecutive messages of same type messages = [ SystemMessage(content="you're a good assistant."), SystemMessage(content="you always respond with a joke."), HumanMessage( content=[{"type": "text", "text": "i wonder why it's called langchain"}] ), HumanMessage(content="and who is harrison chasing anyways"), AIMessage( content='Well, I guess they thought "WordRope" and "SentenceString" just didn\'t have the same ring to it!' ), AIMessage( content="Why, he's probably chasing after the last cup of coffee in the office!" ), ] # Merge consecutive messages merged = merge_message_runs(messages) print(merged) ================================================ FILE: ch5/js/a-chatbot.js ================================================ import { StateGraph, Annotation, messagesStateReducer, START, END, } from '@langchain/langgraph'; import { ChatOpenAI } from '@langchain/openai'; import { HumanMessage } from '@langchain/core/messages'; const model = new ChatOpenAI(); const State = { // Messages have the type "list". The `add_messages` // function in the annotation defines how this state should // be updated (in this case, it appends new messages to the // list, rather than replacing the previous messages) messages: Annotation({ reducer: messagesStateReducer, default: () => [], }), }; async function chatbot(state) { const answer = await model.invoke(state.messages); return { messages: answer }; } const builder = new StateGraph(State) .addNode('chatbot', chatbot) .addEdge(START, 'chatbot') .addEdge('chatbot', END); const graph = builder.compile(); // Example usage const input = { messages: [new HumanMessage('hi!')] }; for await (const chunk of await graph.stream(input)) { console.log(chunk); } ================================================ FILE: ch5/js/b-sql-generator.js ================================================ import { HumanMessage, SystemMessage } from "@langchain/core/messages"; import { ChatOpenAI } from "@langchain/openai"; import { StateGraph, Annotation, messagesStateReducer, START, END, } from "@langchain/langgraph"; // useful to generate SQL query const modelLowTemp = new ChatOpenAI({ temperature: 0.1 }); // useful to generate natural language outputs const modelHighTemp = new ChatOpenAI({ temperature: 0.7 }); const annotation = Annotation.Root({ messages: Annotation({ reducer: messagesStateReducer, default: () => [] }), user_query: Annotation(), sql_query: Annotation(), sql_explanation: Annotation(), }); const generatePrompt = new SystemMessage( "You are a helpful data analyst, who generates SQL queries for users based on their questions.", ); async function generateSql(state) { const userMessage = new HumanMessage(state.user_query); const messages = [generatePrompt, ...state.messages, userMessage]; const res = await modelLowTemp.invoke(messages); return { sql_query: res.content, // update conversation history messages: [userMessage, res], }; } const explainPrompt = new SystemMessage( "You are a helpful data analyst, who explains SQL queries to users.", ); async function explainSql(state) { const messages = [explainPrompt, ...state.messages]; const res = await modelHighTemp.invoke(messages); return { sql_explanation: res.content, // update conversation history messages: res, }; } const builder = new StateGraph(annotation) .addNode("generate_sql", generateSql) .addNode("explain_sql", explainSql) .addEdge(START, "generate_sql") .addEdge("generate_sql", "explain_sql") .addEdge("explain_sql", END); const graph = builder.compile(); // Example usage const result = await graph.invoke({ user_query: "What is the total sales for each product?", }); console.log(result); ================================================ FILE: ch5/js/c-multi-rag.js ================================================ import { HumanMessage, SystemMessage } from "@langchain/core/messages"; import { ChatOpenAI, OpenAIEmbeddings } from "@langchain/openai"; import { MemoryVectorStore } from "langchain/vectorstores/memory"; import { StateGraph, Annotation, messagesStateReducer, START, END, } from "@langchain/langgraph"; const embeddings = new OpenAIEmbeddings(); // useful to generate SQL query const modelLowTemp = new ChatOpenAI({ temperature: 0.1 }); // useful to generate natural language outputs const modelHighTemp = new ChatOpenAI({ temperature: 0.7 }); const annotation = Annotation.Root({ messages: Annotation({ reducer: messagesStateReducer, default: () => [] }), user_query: Annotation(), domain: Annotation(), documents: Annotation(), answer: Annotation(), }); // Sample documents for testing const sampleDocs = [ { pageContent: "Patient medical record...", metadata: { domain: "records" } }, { pageContent: "Insurance policy details...", metadata: { domain: "insurance" }, }, ]; // Initialize vector stores const medicalRecordsStore = await MemoryVectorStore.fromDocuments( sampleDocs, embeddings, ); const medicalRecordsRetriever = medicalRecordsStore.asRetriever(); const insuranceFaqsStore = await MemoryVectorStore.fromDocuments( sampleDocs, embeddings, ); const insuranceFaqsRetriever = insuranceFaqsStore.asRetriever(); const routerPrompt = new SystemMessage( `You need to decide which domain to route the user query to. You have two domains to choose from: - records: contains medical records of the patient, such as diagnosis, treatment, and prescriptions. - insurance: contains frequently asked questions about insurance policies, claims, and coverage. Output only the domain name.`, ); async function routerNode(state) { const userMessage = new HumanMessage(state.user_query); const messages = [routerPrompt, ...state.messages, userMessage]; const res = await modelLowTemp.invoke(messages); return { domain: res.content, // update conversation history messages: [userMessage, res], }; } function pickRetriever(state) { if (state.domain === "records") { return "retrieve_medical_records"; } else { return "retrieve_insurance_faqs"; } } async function retrieveMedicalRecords(state) { const documents = await medicalRecordsRetriever.invoke(state.user_query); return { documents, }; } async function retrieveInsuranceFaqs(state) { const documents = await insuranceFaqsRetriever.invoke(state.user_query); return { documents, }; } const medicalRecordsPrompt = new SystemMessage( "You are a helpful medical chatbot, who answers questions based on the patient's medical records, such as diagnosis, treatment, and prescriptions.", ); const insuranceFaqsPrompt = new SystemMessage( "You are a helpful medical insurance chatbot, who answers frequently asked questions about insurance policies, claims, and coverage.", ); async function generateAnswer(state) { const prompt = state.domain === "records" ? medicalRecordsPrompt : insuranceFaqsPrompt; const messages = [ prompt, ...state.messages, new HumanMessage(`Documents: ${state.documents}`), ]; const res = await modelHighTemp.invoke(messages); return { answer: res.content, // update conversation history messages: res, }; } const builder = new StateGraph(annotation) .addNode("router", routerNode) .addNode("retrieve_medical_records", retrieveMedicalRecords) .addNode("retrieve_insurance_faqs", retrieveInsuranceFaqs) .addNode("generate_answer", generateAnswer) .addEdge(START, "router") .addConditionalEdges("router", pickRetriever) .addEdge("retrieve_medical_records", "generate_answer") .addEdge("retrieve_insurance_faqs", "generate_answer") .addEdge("generate_answer", END); const graph = builder.compile(); // Example usage const input = { user_query: "Am I covered for COVID-19 treatment?", }; for await (const chunk of await graph.stream(input)) { console.log(chunk); } ================================================ FILE: ch5/py/a-chatbot.py ================================================ from typing import Annotated, TypedDict from langgraph.graph import StateGraph, START, END from langgraph.graph.message import add_messages from langchain_openai import ChatOpenAI from langchain_core.messages import HumanMessage model = ChatOpenAI() class State(TypedDict): # Messages have the type "list". The `add_messages` # function in the annotation defines how this state should # be updated (in this case, it appends new messages to the # list, rather than replacing the previous messages) messages: Annotated[list, add_messages] def chatbot(state: State): answer = model.invoke(state["messages"]) return {"messages": [answer]} builder = StateGraph(State) builder.add_node("chatbot", chatbot) builder.add_edge(START, "chatbot") builder.add_edge("chatbot", END) graph = builder.compile() # Example usage input = {"messages": [HumanMessage("hi!")]} for chunk in graph.stream(input): print(chunk) ================================================ FILE: ch5/py/b-sql-generator.py ================================================ from typing import Annotated, TypedDict from langchain_core.messages import HumanMessage, SystemMessage from langchain_openai import ChatOpenAI from langgraph.graph import END, START, StateGraph from langgraph.graph.message import add_messages # useful to generate SQL query model_low_temp = ChatOpenAI(temperature=0.1) # useful to generate natural language outputs model_high_temp = ChatOpenAI(temperature=0.7) class State(TypedDict): # to track conversation history messages: Annotated[list, add_messages] # input user_query: str # output sql_query: str sql_explanation: str class Input(TypedDict): user_query: str class Output(TypedDict): sql_query: str sql_explanation: str generate_prompt = SystemMessage( "You are a helpful data analyst, who generates SQL queries for users based on their questions." ) def generate_sql(state: State) -> State: user_message = HumanMessage(state["user_query"]) messages = [generate_prompt, *state["messages"], user_message] res = model_low_temp.invoke(messages) return { "sql_query": res.content, # update conversation history "messages": [user_message, res], } explain_prompt = SystemMessage( "You are a helpful data analyst, who explains SQL queries to users." ) def explain_sql(state: State) -> State: messages = [ explain_prompt, # contains user's query and SQL query from prev step *state["messages"], ] res = model_high_temp.invoke(messages) return { "sql_explanation": res.content, # update conversation history "messages": res, } builder = StateGraph(State, input=Input, output=Output) builder.add_node("generate_sql", generate_sql) builder.add_node("explain_sql", explain_sql) builder.add_edge(START, "generate_sql") builder.add_edge("generate_sql", "explain_sql") builder.add_edge("explain_sql", END) graph = builder.compile() # Example usage result = graph.invoke({"user_query": "What is the total sales for each product?"}) print(result) ================================================ FILE: ch5/py/c-multi-rag.py ================================================ from typing import Annotated, Literal, TypedDict from langchain_core.documents import Document from langchain_core.messages import HumanMessage, SystemMessage from langchain_core.vectorstores.in_memory import InMemoryVectorStore from langchain_openai import ChatOpenAI, OpenAIEmbeddings from langgraph.graph import END, START, StateGraph from langgraph.graph.message import add_messages embeddings = OpenAIEmbeddings() # useful to generate SQL query model_low_temp = ChatOpenAI(temperature=0.1) # useful to generate natural language outputs model_high_temp = ChatOpenAI(temperature=0.7) class State(TypedDict): # to track conversation history messages: Annotated[list, add_messages] # input user_query: str # output domain: Literal["records", "insurance"] documents: list[Document] answer: str class Input(TypedDict): user_query: str class Output(TypedDict): documents: list[Document] answer: str # Sample documents for testing sample_docs = [ Document(page_content="Patient medical record...", metadata={"domain": "records"}), Document( page_content="Insurance policy details...", metadata={"domain": "insurance"} ), ] # Initialize vector stores medical_records_store = InMemoryVectorStore.from_documents(sample_docs, embeddings) medical_records_retriever = medical_records_store.as_retriever() insurance_faqs_store = InMemoryVectorStore.from_documents(sample_docs, embeddings) insurance_faqs_retriever = insurance_faqs_store.as_retriever() router_prompt = SystemMessage( """You need to decide which domain to route the user query to. You have two domains to choose from: - records: contains medical records of the patient, such as diagnosis, treatment, and prescriptions. - insurance: contains frequently asked questions about insurance policies, claims, and coverage. Output only the domain name.""" ) def router_node(state: State) -> State: user_message = HumanMessage(state["user_query"]) messages = [router_prompt, *state["messages"], user_message] res = model_low_temp.invoke(messages) return { "domain": res.content, # update conversation history "messages": [user_message, res], } def pick_retriever( state: State, ) -> Literal["retrieve_medical_records", "retrieve_insurance_faqs"]: if state["domain"] == "records": return "retrieve_medical_records" else: return "retrieve_insurance_faqs" def retrieve_medical_records(state: State) -> State: documents = medical_records_retriever.invoke(state["user_query"]) return { "documents": documents, } def retrieve_insurance_faqs(state: State) -> State: documents = insurance_faqs_retriever.invoke(state["user_query"]) return { "documents": documents, } medical_records_prompt = SystemMessage( "You are a helpful medical chatbot, who answers questions based on the patient's medical records, such as diagnosis, treatment, and prescriptions." ) insurance_faqs_prompt = SystemMessage( "You are a helpful medical insurance chatbot, who answers frequently asked questions about insurance policies, claims, and coverage." ) def generate_answer(state: State) -> State: if state["domain"] == "records": prompt = medical_records_prompt else: prompt = insurance_faqs_prompt messages = [ prompt, *state["messages"], HumanMessage(f"Documents: {state['documents']}"), ] res = model_high_temp.invoke(messages) return { "answer": res.content, # update conversation history "messages": res, } builder = StateGraph(State, input=Input, output=Output) builder.add_node("router", router_node) builder.add_node("retrieve_medical_records", retrieve_medical_records) builder.add_node("retrieve_insurance_faqs", retrieve_insurance_faqs) builder.add_node("generate_answer", generate_answer) builder.add_edge(START, "router") builder.add_conditional_edges("router", pick_retriever) builder.add_edge("retrieve_medical_records", "generate_answer") builder.add_edge("retrieve_insurance_faqs", "generate_answer") builder.add_edge("generate_answer", END) graph = builder.compile() # Example usage input = {"user_query": "Am I covered for COVID-19 treatment?"} for chunk in graph.stream(input): print(chunk) ================================================ FILE: ch6/js/a-basic-agent.js ================================================ import { DuckDuckGoSearch } from "@langchain/community/tools/duckduckgo_search"; import { Calculator } from "@langchain/community/tools/calculator"; import { StateGraph, Annotation, messagesStateReducer, START, } from "@langchain/langgraph"; import { ToolNode, toolsCondition } from "@langchain/langgraph/prebuilt"; import { ChatOpenAI } from "@langchain/openai"; import { HumanMessage } from "@langchain/core/messages"; const search = new DuckDuckGoSearch(); const calculator = new Calculator(); const tools = [search, calculator]; const model = new ChatOpenAI({ temperature: 0.1, }).bindTools(tools); const annotation = Annotation.Root({ messages: Annotation({ reducer: messagesStateReducer, default: () => [], }), }); async function modelNode(state) { const res = await model.invoke(state.messages); return { messages: res }; } const builder = new StateGraph(annotation) .addNode("model", modelNode) .addNode("tools", new ToolNode(tools)) .addEdge(START, "model") .addConditionalEdges("model", toolsCondition) .addEdge("tools", "model"); const graph = builder.compile(); // Example usage const input = { messages: [ new HumanMessage( "How old was the 30th president of the United States when he died?", ), ], }; for await (const c of await graph.stream(input)) { console.log(c); } ================================================ FILE: ch6/js/b-force-first-tool.js ================================================ import { DuckDuckGoSearch } from "@langchain/community/tools/duckduckgo_search"; import { Calculator } from "@langchain/community/tools/calculator"; import { AIMessage, HumanMessage } from "@langchain/core/messages"; import { StateGraph, Annotation, messagesStateReducer, START, } from "@langchain/langgraph"; import { ToolNode, toolsCondition } from "@langchain/langgraph/prebuilt"; import { ChatOpenAI } from "@langchain/openai"; const search = new DuckDuckGoSearch(); const calculator = new Calculator(); const tools = [search, calculator]; const model = new ChatOpenAI({ temperature: 0.1 }).bindTools(tools); const annotation = Annotation.Root({ messages: Annotation({ reducer: messagesStateReducer, default: () => [] }), }); async function firstModelNode(state) { const query = state.messages[state.messages.length - 1].content; const searchToolCall = { name: "duckduckgo_search", args: { query }, id: Math.random().toString(), }; return { messages: [new AIMessage({ content: "", tool_calls: [searchToolCall] })], }; } async function modelNode(state) { const res = await model.invoke(state.messages); return { messages: res }; } const builder = new StateGraph(annotation) .addNode("first_model", firstModelNode) .addNode("model", modelNode) .addNode("tools", new ToolNode(tools)) .addEdge(START, "first_model") .addEdge("first_model", "tools") .addEdge("tools", "model") .addConditionalEdges("model", toolsCondition); const graph = builder.compile(); // Example usage const input = { messages: [ new HumanMessage( "How old was the 30th president of the United States when he died?", ), ], }; for await (const c of await graph.stream(input)) { console.log(c); } ================================================ FILE: ch6/js/c-many-tools.js ================================================ import { DuckDuckGoSearch } from '@langchain/community/tools/duckduckgo_search'; import { Calculator } from '@langchain/community/tools/calculator'; import { ChatOpenAI } from '@langchain/openai'; import { OpenAIEmbeddings } from '@langchain/openai'; import { Document } from '@langchain/core/documents'; import { MemoryVectorStore } from 'langchain/vectorstores/memory'; import { StateGraph, Annotation, messagesStateReducer, START, } from '@langchain/langgraph'; import { ToolNode, toolsCondition } from '@langchain/langgraph/prebuilt'; import { HumanMessage } from '@langchain/core/messages'; const search = new DuckDuckGoSearch(); const calculator = new Calculator(); const tools = [search, calculator]; const embeddings = new OpenAIEmbeddings(); const model = new ChatOpenAI({ temperature: 0.1 }); // Create vector store and retriever const toolsStore = await MemoryVectorStore.fromDocuments( tools.map( (tool) => new Document({ pageContent: tool.description, metadata: { name: tool.constructor.name }, }) ), embeddings ); const toolsRetriever = toolsStore.asRetriever(); const annotation = Annotation.Root({ messages: Annotation({ reducer: messagesStateReducer, default: () => [] }), selected_tools: Annotation(), }); async function modelNode(state) { const selectedTools = tools.filter((tool) => state.selected_tools.includes(tool.constructor.name) ); const res = await model.bindTools(selectedTools).invoke(state.messages); return { messages: res }; } async function selectTools(state) { const query = state.messages[state.messages.length - 1].content; const toolDocs = await toolsRetriever.invoke(query); return { selected_tools: toolDocs.map((doc) => doc.metadata.name), }; } const builder = new StateGraph(annotation) .addNode('select_tools', selectTools) .addNode('model', modelNode) .addNode('tools', new ToolNode(tools)) .addEdge(START, 'select_tools') .addEdge('select_tools', 'model') .addConditionalEdges('model', toolsCondition) .addEdge('tools', 'model'); const graph = builder.compile(); // Example usage const input = { messages: [ new HumanMessage( 'How old was the 30th president of the United States when he died?' ), ], }; for await (const c of await graph.stream(input)) { console.log(c); } ================================================ FILE: ch6/py/a-basic-agent.py ================================================ import ast from typing import Annotated, TypedDict from langchain_community.tools import DuckDuckGoSearchRun from langchain_core.messages import HumanMessage from langchain_core.tools import tool from langchain_openai import ChatOpenAI from langgraph.graph import START, StateGraph from langgraph.graph.message import add_messages from langgraph.prebuilt import ToolNode, tools_condition @tool def calculator(query: str) -> str: """A simple calculator tool. Input should be a mathematical expression.""" return ast.literal_eval(query) search = DuckDuckGoSearchRun() tools = [search, calculator] model = ChatOpenAI(temperature=0.1).bind_tools(tools) class State(TypedDict): messages: Annotated[list, add_messages] def model_node(state: State) -> State: res = model.invoke(state["messages"]) return {"messages": res} builder = StateGraph(State) builder.add_node("model", model_node) builder.add_node("tools", ToolNode(tools)) builder.add_edge(START, "model") builder.add_conditional_edges("model", tools_condition) builder.add_edge("tools", "model") graph = builder.compile() # Example usage input = { "messages": [ HumanMessage( "How old was the 30th president of the United States when he died?" ) ] } for c in graph.stream(input): print(c) ================================================ FILE: ch6/py/b-force-first-tool.py ================================================ import ast from typing import Annotated, TypedDict from uuid import uuid4 from langchain_community.tools import DuckDuckGoSearchRun from langchain_core.messages import AIMessage, HumanMessage, ToolCall from langchain_core.tools import tool from langchain_openai import ChatOpenAI from langgraph.graph import START, StateGraph from langgraph.graph.message import add_messages from langgraph.prebuilt import ToolNode, tools_condition @tool def calculator(query: str) -> str: """A simple calculator tool. Input should be a mathematical expression.""" return ast.literal_eval(query) search = DuckDuckGoSearchRun() tools = [search, calculator] model = ChatOpenAI(temperature=0.1).bind_tools(tools) class State(TypedDict): messages: Annotated[list, add_messages] def model_node(state: State) -> State: res = model.invoke(state["messages"]) return {"messages": res} def first_model(state: State) -> State: query = state["messages"][-1].content search_tool_call = ToolCall( name="duckduckgo_search", args={"query": query}, id=uuid4().hex ) return {"messages": AIMessage(content="", tool_calls=[search_tool_call])} builder = StateGraph(State) builder.add_node("first_model", first_model) builder.add_node("model", model_node) builder.add_node("tools", ToolNode(tools)) builder.add_edge(START, "first_model") builder.add_edge("first_model", "tools") builder.add_conditional_edges("model", tools_condition) builder.add_edge("tools", "model") graph = builder.compile() # Example usage input = { "messages": [ HumanMessage( "How old was the 30th president of the United States when he died?" ) ] } for c in graph.stream(input): print(c) ================================================ FILE: ch6/py/c-many-tools.py ================================================ import ast from typing import Annotated, TypedDict from langchain_community.tools import DuckDuckGoSearchRun from langchain_core.documents import Document from langchain_core.messages import HumanMessage from langchain_core.tools import tool from langchain_core.vectorstores.in_memory import InMemoryVectorStore from langchain_openai import ChatOpenAI, OpenAIEmbeddings from langgraph.graph import START, StateGraph from langgraph.graph.message import add_messages from langgraph.prebuilt import ToolNode, tools_condition @tool def calculator(query: str) -> str: """A simple calculator tool. Input should be a mathematical expression.""" return ast.literal_eval(query) search = DuckDuckGoSearchRun() tools = [search, calculator] embeddings = OpenAIEmbeddings() model = ChatOpenAI(temperature=0.1) tools_retriever = InMemoryVectorStore.from_documents( [Document(tool.description, metadata={"name": tool.name}) for tool in tools], embeddings, ).as_retriever() class State(TypedDict): messages: Annotated[list, add_messages] selected_tools: list[str] def model_node(state: State) -> State: selected_tools = [tool for tool in tools if tool.name in state["selected_tools"]] res = model.bind_tools(selected_tools).invoke(state["messages"]) return {"messages": res} def select_tools(state: State) -> State: query = state["messages"][-1].content tool_docs = tools_retriever.invoke(query) return {"selected_tools": [doc.metadata["name"] for doc in tool_docs]} builder = StateGraph(State) builder.add_node("select_tools", select_tools) builder.add_node("model", model_node) builder.add_node("tools", ToolNode(tools)) builder.add_edge(START, "select_tools") builder.add_edge("select_tools", "model") builder.add_conditional_edges("model", tools_condition) builder.add_edge("tools", "model") graph = builder.compile() # Example usage input = { "messages": [ HumanMessage( "How old was the 30th president of the United States when he died?" ) ] } for c in graph.stream(input): print(c) ================================================ FILE: ch7/js/a-reflection.js ================================================ import { AIMessage, SystemMessage, HumanMessage, } from '@langchain/core/messages'; import { ChatOpenAI } from '@langchain/openai'; import { StateGraph, Annotation, messagesStateReducer, START, END, } from '@langchain/langgraph'; const model = new ChatOpenAI(); const annotation = Annotation.Root({ messages: Annotation({ reducer: messagesStateReducer, default: () => [] }), }); const generatePrompt = new SystemMessage( `You are an essay assistant tasked with writing excellent 3-paragraph essays. Generate the best essay possible for the user's request. If the user provides critique, respond with a revised version of your previous attempts.` ); async function generate(state) { const answer = await model.invoke([generatePrompt, ...state.messages]); return { messages: [answer] }; } const reflectionPrompt = new SystemMessage( `You are a teacher grading an essay submission. Generate critique and recommendations for the user's submission. Provide detailed recommendations, including requests for length, depth, style, etc.` ); async function reflect(state) { // Invert the messages to get the LLM to reflect on its own output const clsMap = { ai: HumanMessage, human: AIMessage, }; // First message is the original user request. We hold it the same for all nodes const translated = [ reflectionPrompt, state.messages[0], ...state.messages .slice(1) .map((msg) => new clsMap[msg._getType()](msg.content)), ]; const answer = await model.invoke(translated); // We treat the output of this as human feedback for the generator return { messages: [new HumanMessage({ content: answer.content })] }; } function shouldContinue(state) { if (state.messages.length > 6) { // End after 3 iterations, each with 2 messages return END; } else { return 'reflect'; } } const builder = new StateGraph(annotation) .addNode('generate', generate) .addNode('reflect', reflect) .addEdge(START, 'generate') .addConditionalEdges('generate', shouldContinue) .addEdge('reflect', 'generate'); const graph = builder.compile(); // Example usage const initialState = { messages: [ new HumanMessage( "Write an essay about the relevance of 'The Little Prince' today." ), ], }; for await (const output of await graph.stream(initialState)) { const messageType = output.generate ? 'generate' : 'reflect'; console.log( '\nNew message:', output[messageType].messages[ output[messageType].messages.length - 1 ].content.slice(0, 100), '...' ); } ================================================ FILE: ch7/js/b-subgraph-direct.js ================================================ import { StateGraph, START, Annotation } from '@langchain/langgraph'; const StateAnnotation = Annotation.Root({ foo: Annotation(), // string type }); const SubgraphStateAnnotation = Annotation.Root({ foo: Annotation(), // shared with parent graph state bar: Annotation(), }); // Define subgraph const subgraphNode = async (state) => { // note that this subgraph node can communicate with // the parent graph via the shared "foo" key return { foo: state.foo + 'bar' }; }; const subgraph = new StateGraph(SubgraphStateAnnotation) .addNode('subgraph', subgraphNode) .addEdge(START, 'subgraph') // Additional subgraph setup would go here .compile(); // Define parent graph const parentGraph = new StateGraph(StateAnnotation) .addNode('subgraph', subgraph) .addEdge(START, 'subgraph') // Additional parent graph setup would go here .compile(); // Example usage const initialState = { foo: 'hello' }; const result = await parentGraph.invoke(initialState); console.log(`Result: ${JSON.stringify(result)}`); // Should append "bar" to the foo value ================================================ FILE: ch7/js/c-subgraph-function.js ================================================ import { StateGraph, START, Annotation } from '@langchain/langgraph'; const StateAnnotation = Annotation.Root({ foo: Annotation(), }); const SubgraphStateAnnotation = Annotation.Root({ // note that none of these keys are shared with the parent graph state bar: Annotation(), baz: Annotation(), }); // Define subgraph const subgraphNode = async (state) => { return { bar: state.bar + 'baz' }; }; const subgraph = new StateGraph(SubgraphStateAnnotation) .addNode('subgraph', subgraphNode) .addEdge(START, 'subgraph') // Additional subgraph setup would go here .compile(); // Define parent graph const subgraphWrapperNode = async (state) => { // transform the state to the subgraph state const response = await subgraph.invoke({ bar: state.foo, }); // transform response back to the parent state return { foo: response.bar, }; }; const parentGraph = new StateGraph(StateAnnotation) .addNode('subgraph', subgraphWrapperNode) .addEdge(START, 'subgraph') // Additional parent graph setup would go here .compile(); // Example usage const initialState = { foo: 'hello' }; const result = await parentGraph.invoke(initialState); console.log(`Result: ${JSON.stringify(result)}`); // Should transform foo->bar, append "baz", then transform bar->foo ================================================ FILE: ch7/js/d-supervisor.js ================================================ import { ChatOpenAI } from "langchain-openai"; import { StateGraph, Annotation, MessagesAnnotation, START, END, } from "@langchain/langgraph"; import { z } from "zod"; // Define decision schema const SupervisorDecision = z.object({ next: z.enum(["researcher", "coder", "FINISH"]), }); // Initialize model const model = new ChatOpenAI({ model: "gpt-4", temperature: 0 }); const modelWithStructuredOutput = model.withStructuredOutput(SupervisorDecision); // Define available agents const agents = ["researcher", "coder"]; // Define system prompts const systemPromptPart1 = `You are a supervisor tasked with managing a conversation between the following workers: ${agents.join( ", ", )}. Given the following user request, respond with the worker to act next. Each worker will perform a task and respond with their results and status. When finished, respond with FINISH.`; const systemPromptPart2 = `Given the conversation above, who should act next? Or should we FINISH? Select one of: ${agents.join( ", ", )}, FINISH`; // Define supervisor const supervisor = async (state) => { const messages = [ { role: "system", content: systemPromptPart1 }, ...state.messages, { role: "system", content: systemPromptPart2 }, ]; return await modelWithStructuredOutput.invoke({ messages }); }; // Define state type const StateAnnotation = Annotation.Root({ ...MessagesAnnotation.spec, next: Annotation("researcher" | "coder" | "FINISH"), }); // Define agent functions const researcher = async (state) => { const response = await model.invoke([ { role: "system", content: "You are a research assistant. Analyze the request and provide relevant information.", }, state.messages[0], ]); return { messages: [response] }; }; const coder = async (state) => { const response = await model.invoke([ { role: "system", content: "You are a coding assistant. Implement the requested functionality.", }, state.messages[0], ]); return { messages: [response] }; }; // Build the graph const graph = new StateGraph(StateAnnotation) .addNode("supervisor", supervisor) .addNode("researcher", researcher) .addNode("coder", coder) .addEdge(START, "supervisor") // Route to one of the agents or exit based on the supervisor's decision .addConditionalEdges("supervisor", async (state) => state.next === "FINISH" ? END : state.next, ) .addEdge("researcher", "supervisor") .addEdge("coder", "supervisor") .compile(); // Example usage const initialState = { messages: [ { role: "user", content: "I need help analyzing some data and creating a visualization.", }, ], next: "supervisor", }; for await (const output of graph.stream(initialState)) { console.log(`\nStep decision: ${output.next || "N/A"}`); if (output.messages) { console.log( `Response: ${output.messages[output.messages.length - 1].content.slice( 0, 100, )}...`, ); } } ================================================ FILE: ch7/py/a-reflection.py ================================================ from typing import Annotated, TypedDict from langchain_core.messages import ( AIMessage, BaseMessage, HumanMessage, SystemMessage, ) from langchain_openai import ChatOpenAI from langgraph.graph import END, START, StateGraph from langgraph.graph.message import add_messages # Initialize chat model model = ChatOpenAI() # Define state type class State(TypedDict): messages: Annotated[list[BaseMessage], add_messages] # Define prompts generate_prompt = SystemMessage( "You are an essay assistant tasked with writing excellent 3-paragraph essays." " Generate the best essay possible for the user's request." " If the user provides critique, respond with a revised version of your previous attempts." ) reflection_prompt = SystemMessage( "You are a teacher grading an essay submission. Generate critique and recommendations for the user's submission." " Provide detailed recommendations, including requests for length, depth, style, etc." ) def generate(state: State) -> State: answer = model.invoke([generate_prompt] + state["messages"]) return {"messages": [answer]} def reflect(state: State) -> State: # Invert the messages to get the LLM to reflect on its own output cls_map = {AIMessage: HumanMessage, HumanMessage: AIMessage} # First message is the original user request. We hold it the same for all nodes translated = [reflection_prompt, state["messages"][0]] + [ cls_map[msg.__class__](content=msg.content) for msg in state["messages"][1:] ] answer = model.invoke(translated) # We treat the output of this as human feedback for the generator return {"messages": [HumanMessage(content=answer.content)]} def should_continue(state: State): if len(state["messages"]) > 6: # End after 3 iterations, each with 2 messages return END else: return "reflect" # Build the graph builder = StateGraph(State) builder.add_node("generate", generate) builder.add_node("reflect", reflect) builder.add_edge(START, "generate") builder.add_conditional_edges("generate", should_continue) builder.add_edge("reflect", "generate") graph = builder.compile() # Example usage initial_state = { "messages": [ HumanMessage( content="Write an essay about the relevance of 'The Little Prince' today." ) ] } # Run the graph for output in graph.stream(initial_state): message_type = "generate" if "generate" in output else "reflect" print("\nNew message:", output[message_type] ["messages"][-1].content[:100], "...") ================================================ FILE: ch7/py/b-subgraph-direct.py ================================================ from typing import TypedDict from langgraph.graph import START, StateGraph # Define the state types for parent and subgraph class State(TypedDict): foo: str # this key is shared with the subgraph class SubgraphState(TypedDict): foo: str # this key is shared with the parent graph bar: str # Define subgraph def subgraph_node(state: SubgraphState): # note that this subgraph node can communicate with the parent graph via the shared "foo" key return {"foo": state["foo"] + "bar"} subgraph_builder = StateGraph(SubgraphState) subgraph_builder.add_node("subgraph_node", subgraph_node) # Additional subgraph setup would go here subgraph = subgraph_builder.compile() # Define parent graph builder = StateGraph(State) builder.add_node("subgraph", subgraph) builder.add_edge(START, "subgraph") # Additional parent graph setup would go here graph = builder.compile() # Example usage initial_state = {"foo": "hello"} result = graph.invoke(initial_state) print(f"Result: {result}") # Should append "bar" to the foo value ================================================ FILE: ch7/py/c-subgraph-function.py ================================================ from typing import TypedDict from langgraph.graph import START, StateGraph class State(TypedDict): foo: str class SubgraphState(TypedDict): # none of these keys are shared with the parent graph state bar: str baz: str # Define subgraph def subgraph_node(state: SubgraphState): return {"bar": state["bar"] + "baz"} subgraph_builder = StateGraph(SubgraphState) subgraph_builder.add_node("subgraph_node", subgraph_node) subgraph_builder.add_edge(START, "subgraph_node") # Additional subgraph setup would go here subgraph = subgraph_builder.compile() # Define parent graph node that invokes subgraph def node(state: State): # transform the state to the subgraph state response = subgraph.invoke({"bar": state["foo"]}) # transform response back to the parent state return {"foo": response["bar"]} builder = StateGraph(State) # note that we are using `node` function instead of a compiled subgraph builder.add_node("node", node) builder.add_edge(START, "node") # Additional parent graph setup would go here graph = builder.compile() # Example usage initial_state = {"foo": "hello"} result = graph.invoke(initial_state) print( f"Result: {result}" ) # Should transform foo->bar, append "baz", then transform bar->foo ================================================ FILE: ch7/py/d-supervisor.py ================================================ from typing import Literal from langchain_openai import ChatOpenAI from langgraph.graph import StateGraph, MessagesState, START from pydantic import BaseModel class SupervisorDecision(BaseModel): next: Literal["researcher", "coder", "FINISH"] # Initialize model model = ChatOpenAI(model="gpt-4", temperature=0) model = model.with_structured_output(SupervisorDecision) # Define available agents agents = ["researcher", "coder"] # Define system prompts system_prompt_part_1 = f"""You are a supervisor tasked with managing a conversation between the following workers: {agents}. Given the following user request, respond with the worker to act next. Each worker will perform a task and respond with their results and status. When finished, respond with FINISH.""" system_prompt_part_2 = f"""Given the conversation above, who should act next? Or should we FINISH? Select one of: {", ".join(agents)}, FINISH""" def supervisor(state): messages = [ ("system", system_prompt_part_1), *state["messages"], ("system", system_prompt_part_2), ] return model.invoke(messages) # Define agent state class AgentState(MessagesState): next: Literal["researcher", "coder", "FINISH"] # Define agent functions def researcher(state: AgentState): # In a real implementation, this would do research tasks response = model.invoke( [ { "role": "system", "content": "You are a research assistant. Analyze the request and provide relevant information.", }, {"role": "user", "content": state["messages"][0].content}, ] ) return {"messages": [response]} def coder(state: AgentState): # In a real implementation, this would write code response = model.invoke( [ { "role": "system", "content": "You are a coding assistant. Implement the requested functionality.", }, {"role": "user", "content": state["messages"][0].content}, ] ) return {"messages": [response]} # Build the graph builder = StateGraph(AgentState) builder.add_node("supervisor", supervisor) builder.add_node("researcher", researcher) builder.add_node("coder", coder) builder.add_edge(START, "supervisor") # Route to one of the agents or exit based on the supervisor's decision builder.add_conditional_edges("supervisor", lambda state: state["next"]) builder.add_edge("researcher", "supervisor") builder.add_edge("coder", "supervisor") graph = builder.compile() # Example usage initial_state = { "messages": [ { "role": "user", "content": "I need help analyzing some data and creating a visualization.", } ], "next": "supervisor", } for output in graph.stream(initial_state): print(f"\nStep decision: {output.get('next', 'N/A')}") if output.get("messages"): print(f"Response: {output['messages'][-1].content[:100]}...") ================================================ FILE: ch8/js/a-structured-output.js ================================================ import { z } from "zod"; import { ChatOpenAI } from "@langchain/openai"; const joke = z.object({ setup: z.string().describe("The setup of the joke"), punchline: z.string().describe("The punchline to the joke"), }); let model = new ChatOpenAI({ model: "gpt-3.5-turbo-0125", temperature: 0, }); model = model.withStructuredOutput(joke); const result = await model.invoke("Tell me a joke about cats"); console.log(result); ================================================ FILE: ch8/js/b-streaming-output.js ================================================ import { HumanMessage } from "@langchain/core/messages"; // Assuming graph is already created and configured const graph = new StateGraph().compile(); const input = { messages: [ new HumanMessage( "How old was the 30th president of the United States when he died?", ), ], }; const config = { configurable: { thread_id: "1" } }; // Assuming graph is already created and configured const output = await graph.stream(input, config); for await (const chunk of output) { console.log(chunk); } ================================================ FILE: ch8/js/c-interrupt.js ================================================ import { HumanMessage } from "@langchain/core/messages"; import { MemorySaver } from "@langchain/langgraph"; const controller = new AbortController(); const input = { messages: [ new HumanMessage( "How old was the 30th president of the United States when he died?", ), ], }; const config = { configurable: { thread_id: "1" } }; // Assuming graph is already created and configured const graph = new StateGraph().compile({ checkpointer: new MemorySaver() }); // Simulate interruption after 2 seconds setTimeout(() => { controller.abort(); }, 2000); try { const output = await graph.stream(input, { ...config, signal: controller.signal, }); for await (const chunk of output) { console.log(chunk); // do something with the output } } catch (e) { console.log(e); } ================================================ FILE: ch8/js/d-authorize.js ================================================ import { HumanMessage } from "@langchain/core/messages"; import { MemorySaver } from "@langchain/langgraph"; // Assuming graph is already created and configured const graph = new StateGraph().compile({ checkpointer: new MemorySaver() }); const input = { messages: [ new HumanMessage( "How old was the 30th president of the United States when he died?", ), ], }; const config = { configurable: { thread_id: "1" } }; const output = await graph.stream(input, { ...config, interruptBefore: ["tools"], }); for await (const chunk of output) { console.log(chunk); // do something with the output } ================================================ FILE: ch8/js/e-resume.js ================================================ import { MemorySaver } from "@langchain/langgraph"; // Assuming graph is already created and configured const graph = new StateGraph().compile({ checkpointer: new MemorySaver() }); const config = { configurable: { thread_id: "1" } }; const output = await graph.stream(null, { ...config, interruptBefore: ["tools"], }); for await (const chunk of output) { console.log(chunk); // do something with the output } ================================================ FILE: ch8/js/f-edit-state.js ================================================ import { MemorySaver } from "@langchain/langgraph"; // Assuming graph is already created and configured const graph = new StateGraph().compile({ checkpointer: new MemorySaver() }); const config = { configurable: { thread_id: "1" } }; const state = await graph.getState(config); console.log("Current state:", state); // something you want to add or replace const update = {}; await graph.updateState(config, update); console.log("State updated"); ================================================ FILE: ch8/js/g-fork.js ================================================ import { MemorySaver } from "@langchain/langgraph"; // Assuming graph is already created and configured const graph = new StateGraph().compile({ checkpointer: new MemorySaver() }); const config = { configurable: { thread_id: "1" } }; const history = await Array.fromAsync(graph.getStateHistory(config)); console.log("History states:", history.length); // replay a past state if (history.length >= 3) { const result = await graph.invoke(null, history[2].config); console.log("Replayed state result:", result); } ================================================ FILE: ch8/py/a-structured-output.py ================================================ from pydantic import BaseModel, Field from langchain_openai import ChatOpenAI class Joke(BaseModel): setup: str = Field(description="The setup of the joke") punchline: str = Field(description="The punchline to the joke") model = ChatOpenAI(model="gpt-4o", temperature=0) model = model.with_structured_output(Joke) result = model.invoke("Tell me a joke about cats") print(result) ================================================ FILE: ch8/py/b-streaming-output.py ================================================ from langchain_core.messages import HumanMessage from langgraph.graph import StateGraph def create_simple_graph(): # Create a simple graph for demonstration builder = StateGraph() # Add nodes and edges as needed return builder.compile() graph = create_simple_graph() input = { "messages": [ HumanMessage( "How old was the 30th president of the United States when he died?" ) ] } for c in graph.stream(input, stream_mode="updates"): print(c) ================================================ FILE: ch8/py/c-interrupt.py ================================================ import asyncio from contextlib import aclosing from langchain.schema import HumanMessage from langgraph.graph import StateGraph from langgraph.checkpoint.memory import MemorySaver async def main(): # Create a simple graph builder = StateGraph() # Add nodes and edges as needed graph = builder.compile(checkpointer=MemorySaver()) event = asyncio.Event() input = { "messages": [ HumanMessage( "How old was the 30th president of the United States when he died?" ) ] } config = {"configurable": {"thread_id": "1"}} async with aclosing(graph.astream(input, config)) as stream: async for chunk in stream: if event.is_set(): break else: print(chunk) # do something with the output # Simulate interruption after 2 seconds await asyncio.sleep(2) event.set() if __name__ == "__main__": asyncio.run(main()) ================================================ FILE: ch8/py/d-authorize.py ================================================ from langchain.schema import HumanMessage from langgraph.graph import StateGraph from langgraph.checkpoint.memory import MemorySaver async def main(): # Create a simple graph builder = StateGraph() # Add nodes and edges as needed graph = builder.compile(checkpointer=MemorySaver()) input = { "messages": [ HumanMessage( "How old was the 30th president of the United States when he died?" ) ] } config = {"configurable": {"thread_id": "1"}} output = graph.astream(input, config, interrupt_before=["tools"]) async for c in output: print(c) # do something with the output if __name__ == "__main__": import asyncio asyncio.run(main()) ================================================ FILE: ch8/py/e-resume.py ================================================ from langgraph.graph import StateGraph from langgraph.checkpoint.memory import MemorySaver async def main(): # Create a simple graph builder = StateGraph() # Add nodes and edges as needed graph = builder.compile(checkpointer=MemorySaver()) config = {"configurable": {"thread_id": "1"}} output = graph.astream(None, config, interrupt_before=["tools"]) async for c in output: print(c) # do something with the output if __name__ == "__main__": import asyncio asyncio.run(main()) ================================================ FILE: ch8/py/f-edit-state.py ================================================ from langgraph.graph import StateGraph from langgraph.checkpoint.memory import MemorySaver def main(): # Create a simple graph builder = StateGraph() # Add nodes and edges as needed graph = builder.compile(checkpointer=MemorySaver()) config = {"configurable": {"thread_id": "1"}} state = graph.get_state(config) print("Current state:", state) # something you want to add or replace update = {} graph.update_state(config, update) print("State updated") if __name__ == "__main__": main() ================================================ FILE: ch8/py/g-fork.py ================================================ from langgraph.graph import StateGraph from langgraph.checkpoint.memory import MemorySaver def main(): # Create a simple graph builder = StateGraph() # Add nodes and edges as needed graph = builder.compile(checkpointer=MemorySaver()) config = {"configurable": {"thread_id": "1"}} history = [state for state in graph.get_state_history(config)] print("History states:", len(history)) # replay a past state if len(history) >= 3: result = graph.invoke(None, history[2].config) print("Replayed state result:", result) if __name__ == "__main__": main() ================================================ FILE: ch9/README.md ================================================ # Chapter 9: Deployment - RAG AI Agent Example This directory contains the code for deploying a Retrieval-Augmented Generation (RAG) AI chatbot agent, as discussed in Chapter 9 of "Learning LangChain." This agent is designed to ingest documents and then answer questions based on the content of those documents. ## Overview This example demonstrates how to deploy a LangGraph application that consists of two main components: 1. **Ingestion Graph:** Responsible for loading, embedding and indexing documents. 2. **Retrieval Graph:** Responsible for answering questions based on the indexed documents. Both Python and JavaScript implementations are provided. **Note:** If you'd like to see a full ai app (frontend and backend) that incorporates the concepts discussed in this chapter, check it out [here](https://github.com/mayooear/ai-pdf-chatbot-langchain/tree/main). ## Prerequisites Before running the code, ensure you have: 1. **Environment Variables at the root of the learning-langchain repository:** If you haven't already, set up the required environment variables in a `.env` file at the root of the learning-langchain repository. See `.env.example` for the list of variables. 2. **Supabase account and a Supabase API key:** * To register for a Supabase account, go to [supabase.com](https://supabase.com) and sign up. * Once you have an account, create a new project then navigate to the settings section. * In the settings section, navigate to the API section to see your keys. * Copy the project URL and service_role key and add them to the `.env` file as values for `SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY`. 3. **Docker (optional):** Docker is required to run the Chroma vector database in the js implementation. Follow the instructions in the [README](../../README.md#docker-setup-and-usage) to install and set up Docker. After setting up Docker, run the following command to start the Chroma server: ```bash docker pull chromadb/chroma docker run -p 8000:8000 chromadb/chroma ``` This will start the Chroma server on port 8000. ## Repository Structure This directory contains the following structure: ``` ├── js # JavaScript implementation │ ├── src # Source code │ │ ├── ingestion_graph # Ingestion graph components │ │ ├── retrieval_graph # Retrieval graph components │ │ ├── shared # Shared components │ │ ├── configuration.ts # Configuration files │ │ ├── graph.ts # Graph definition files │ │ ├── state.ts # State definition files │ │ └── utils.ts # Utility functions │ ├── demo.ts # Demo script │ ├── langgraph.json # LangGraph configuration file │ ├── package.json # JavaScript dependencies │ └── tsconfig.json # TypeScript configuration └── py # Python implementation ├── src # Source code │ ├── ingestion_graph # Ingestion graph components │ ├── retrieval_graph # Retrieval graph components │ ├── shared # Shared components │ ├── configuration.py # Configuration files │ ├── graph.py # Graph definition files │ ├── state.py # State definition files │ └── utils.py # Utility functions ├── demo.py # Demo script ├── langgraph.json # LangGraph configuration file └── pyproject.toml # Python dependencies ``` ## Setting up the Environment ### Python 1. **Create a virtual environment:** ```bash python -m venv .venv ``` 2. **Activate the virtual environment:** * macOS/Linux: ```bash source .venv/bin/activate ``` * Windows: ```bash .venv\Scripts\activate ``` 3. **Install dependencies:** ```bash pip install -e . ``` ### JavaScript 1. **Install dependencies:** ```bash npm install ``` ## Running the Application ### Python 1. **Navigate to the `py` directory:** ```bash cd ch9/py ``` 2. **Run the demo script:** ```bash python demo.py ``` ### JavaScript 1. **Navigate to the `js` directory:** ```bash cd ch9/js ``` 2. **Run the demo script:** ```bash node demo.ts ``` ## Local Development Server You can run the local development server for either JavaScript or Python implementations from the root directory of the learning-langchain repository: ##### For JavaScript: ```bash # Using npm script npm run langgraph:dev ``` ##### For Python: You have two options: 1. Using the CLI directly: ```bash langgraph dev -c ch9/py/langgraph.json --verbose ``` 2. Using the installed script command: ```bash langgraph-dev ``` Note: To use the script command, make sure you have installed the package in development mode (`pip install -e .`). This will start the local development server on port 2024 and redirect you to the langsmith UI for debugging and tracing. ## Deploying the Application To deploy your LangGraph agent to a cloud service, you can either use LangGraph's cloud as per this [guide](https://langchain-ai.github.io/langgraph/cloud/quick_start/?h=studio#deploy-to-langgraph-cloud) or self-host it as per this [guide](https://langchain-ai.github.io/langgraph/how-tos/deploy-self-hosted/). ### Using LangGraph CLI 1. **Configure LangGraph:** * Ensure that the `langgraph.json` file is correctly configured to point to the entry points of your graphs. 2. **Deploy the application:** * Run the following command from the root of the repository: ```bash npx @langchain/langgraph-cli deploy -c ch9/js/langgraph.json ``` * Or, for python: ```bash npx @langchain/langgraph-cli deploy -c ch9/py/langgraph.json ``` * Follow the prompts to deploy your application. ## Interacting with the Deployed Application Once deployed, you can interact with the application using the LangGraph SDK. The `demo.ts` and `demo.py` files provide examples of how to create threads and invoke the deployed graphs. ## Troubleshooting * **Dependency Issues:** Ensure all dependencies are installed correctly using `pip install -e .` (Python) or `npm install` (JavaScript). * **Environment Variables:** Verify that all required environment variables are set correctly in the `.env` file in the root of the learning-langchain repository. * **Docker:** Ensure that Docker is running and that the container is set up correctly. * **API URL:** Ensure that the `LANGGRAPH_API_URL` environment variable is set to the correct URL of your LangGraph server. * **File Paths:** Double-check that all file paths in the configuration files are correct. ================================================ FILE: ch9/js/.gitignore ================================================ # LangGraph API .langgraph_api ================================================ FILE: ch9/js/demo.ts ================================================ // demo of the compiled graph running using the sdk import { Client } from '@langchain/langgraph-sdk'; import { graph } from './src/retrieval_graph/graph.js'; import dotenv from 'dotenv'; // Load environment variables from .env file dotenv.config(); // Environment variables needed: // LANGGRAPH_API_URL: The URL where your LangGraph server is running // - For local development: http://localhost:2024 (or your local server port) // - For LangSmith cloud: https://api.smith.langchain.com // const assistant_id = 'retrieval_graph'; async function runDemo() { // Initialize the LangGraph client const client = new Client({ apiUrl: process.env.LANGGRAPH_API_URL || 'http://localhost:2024', }); // Create a new thread for this conversation console.log('Creating new thread...'); const thread = await client.threads.create({ metadata: { demo: 'retrieval-graph', }, }); console.log('Thread created with ID:', thread.thread_id); // Example question const question = 'What is this document about?'; console.log('\n=== Streaming Example ==='); console.log('Question:', question); // Run the graph with streaming try { console.log('\nStarting stream...'); const stream = await client.runs.stream(thread.thread_id, assistant_id, { input: { query: question }, streamMode: ['values', 'messages', 'updates'], // Include all stream types }); // Process the stream chunks console.log('\nWaiting for stream chunks...'); for await (const chunk of stream) { console.log('\nReceived chunk:'); console.log('Event type:', chunk.event); if (chunk.event === 'values') { console.log('Values data:', JSON.stringify(chunk.data, null, 2)); } else if (chunk.event === 'messages/partial') { console.log('Messages data:', JSON.stringify(chunk, null, 2)); } else if (chunk.event === 'updates') { console.log('Update data:', JSON.stringify(chunk.data, null, 2)); } } console.log('\nStream completed.'); } catch (error) { console.error('Error in streaming run:', error); // Log more details about the error if (error instanceof Error) { console.error('Error message:', error.message); console.error('Error stack:', error.stack); } } } // Run the demo runDemo().catch((error) => { console.error('Fatal error:', error); process.exit(1); }); ================================================ FILE: ch9/js/langgraph.json ================================================ { "node_version": "20", "graphs": { "ingestion_graph": "./src/ingestion_graph/graph.ts:graph", "retrieval_graph": "./src/retrieval_graph/graph.ts:graph" }, "env": "../../.env", "dependencies": ["."] } ================================================ FILE: ch9/js/package.json ================================================ { "type": "module", "dependencies": { "@langchain/community": "^0.3.26", "@langchain/core": "^0.3.33", "@langchain/langgraph": "^0.2.41", "@langchain/openai": "^0.3.17", "@supabase/supabase-js": "^2.44.0", "langchain": "^0.3.12", "pdf-parse": "^1.1.1", "chromadb": "^1.10.4" }, "devDependencies": { "@types/node": "^20.0.0", "typescript": "^5.0.0", "@types/pdf-parse": "^1.1.4" } } ================================================ FILE: ch9/js/src/ingestion_graph/configuration.ts ================================================ import { Annotation } from '@langchain/langgraph'; import { RunnableConfig } from '@langchain/core/runnables'; // This path points to the directory containing the documents to index. const DEFAULT_DOCS_PATH = 'src/sample_docs.json'; /** * The configuration for the indexing process. */ export const IndexConfigurationAnnotation = Annotation.Root({ /** * Path to folder containing default documents to index. */ docsPath: Annotation, /** * Name of the openai embedding model to use. Must be a valid embedding model name. */ embeddingModel: Annotation<'text-embedding-3-small'>, /** * The vector store provider to store the embeddings. * Options are 'supabase', 'chroma'. */ retrieverProvider: Annotation<'supabase' | 'chroma'>, /** * Whether to index sample documents specified in the docsPath. */ useSampleDocs: Annotation, }); /** * Create an typeof IndexConfigurationAnnotation.State instance from a RunnableConfig object. * * @param config - The configuration object to use. * @returns An instance of typeof IndexConfigurationAnnotation.State with the specified configuration. */ export function ensureIndexConfiguration( config: RunnableConfig ): typeof IndexConfigurationAnnotation.State { const configurable = (config?.configurable || {}) as Partial< typeof IndexConfigurationAnnotation.State >; return { docsPath: configurable.docsPath || DEFAULT_DOCS_PATH, embeddingModel: configurable.embeddingModel || 'text-embedding-3-small', retrieverProvider: configurable.retrieverProvider || 'supabase', useSampleDocs: configurable.useSampleDocs || false, }; } ================================================ FILE: ch9/js/src/ingestion_graph/graph.ts ================================================ /** * This "graph" simply exposes an endpoint for a user to upload docs to be indexed. */ import path from 'path'; import fs from 'fs/promises'; import { RunnableConfig } from '@langchain/core/runnables'; import { StateGraph, END, START } from '@langchain/langgraph'; import { IndexStateAnnotation } from './state.js'; import { DirectoryLoader } from 'langchain/document_loaders/fs/directory'; import { ensureIndexConfiguration, IndexConfigurationAnnotation, } from './configuration.js'; import { makeRetriever } from '../shared/retrieval.js'; import { reduceDocs } from '../shared/state.js'; async function ingestDocs( state: typeof IndexStateAnnotation.State, config?: RunnableConfig ): Promise { if (!config) { throw new Error('Configuration required to run index_docs.'); } const configuration = ensureIndexConfiguration(config); let docs = state.docs; if (!docs || docs.length === 0) { if (configuration.useSampleDocs) { const fileContent = await fs.readFile(configuration.docsPath, 'utf-8'); const serializedDocs = JSON.parse(fileContent); docs = reduceDocs([], serializedDocs); } else { throw new Error('No sample documents to index.'); } } else { docs = reduceDocs([], docs); } const retriever = await makeRetriever(config); await retriever.addDocuments(docs); return { docs: 'delete' }; } // Define the graph const builder = new StateGraph( IndexStateAnnotation, IndexConfigurationAnnotation ) .addNode('ingestDocs', ingestDocs) .addEdge(START, 'ingestDocs') .addEdge('ingestDocs', END); // Compile into a graph object that you can invoke and deploy. export const graph = builder .compile() .withConfig({ runName: 'IngestionGraph' }); ================================================ FILE: ch9/js/src/ingestion_graph/state.ts ================================================ import { Annotation } from '@langchain/langgraph'; import { Document } from '@langchain/core/documents'; import { reduceDocs } from '../shared/state.js'; /** * Represents the state for document indexing and retrieval. * * This interface defines the structure of the index state, which includes * the documents to be indexed and the retriever used for searching * these documents. */ export const IndexStateAnnotation = Annotation.Root({ /** * A list of documents that the agent can index. */ docs: Annotation< Document[], Document[] | { [key: string]: any }[] | string[] | string | 'delete' >({ default: () => [], reducer: reduceDocs, }), }); export type IndexStateType = typeof IndexStateAnnotation.State; ================================================ FILE: ch9/js/src/retrieval_graph/configuration.ts ================================================ import { Annotation } from '@langchain/langgraph'; import { BaseConfigurationAnnotation, ensureBaseConfiguration, } from '../shared/configuration.js'; import { RunnableConfig } from '@langchain/core/runnables'; export const AgentConfigurationAnnotation = Annotation.Root({ ...BaseConfigurationAnnotation.spec, // models /** * The language model used for processing and refining queries. * Should be in the form: provider/model-name. */ queryModel: Annotation, }); /** * Create a typeof ConfigurationAnnotation.State instance from a RunnableConfig object. * * @param config - The configuration object to use. * @returns An instance of typeof ConfigurationAnnotation.State with the specified configuration. */ export function ensureAgentConfiguration( config: RunnableConfig ): typeof AgentConfigurationAnnotation.State { const configurable = (config?.configurable || {}) as Partial< typeof AgentConfigurationAnnotation.State >; const baseConfig = ensureBaseConfiguration(config); return { ...baseConfig, queryModel: configurable.queryModel || 'openai/gpt-4o', }; } ================================================ FILE: ch9/js/src/retrieval_graph/graph.ts ================================================ import { StateGraph, START, END, MessagesAnnotation, } from '@langchain/langgraph'; import { AgentStateAnnotation } from './state.js'; import { makeRetriever, makeSupabaseRetriever } from '../shared/retrieval.js'; import { ChatOpenAI } from '@langchain/openai'; import { formatDocs } from './utils.js'; import { ChatPromptTemplate } from '@langchain/core/prompts'; import { pull } from 'langchain/hub'; import { AIMessage, BaseMessage, HumanMessage } from '@langchain/core/messages'; import { z } from 'zod'; import { RunnableConfig } from '@langchain/core/runnables'; import { loadChatModel } from '../shared/utils.js'; import { AgentConfigurationAnnotation, ensureAgentConfiguration, } from './configuration.js'; async function checkQueryType( state: typeof AgentStateAnnotation.State, config: RunnableConfig ): Promise<{ route: 'retrieve' | 'direct'; messages?: BaseMessage[]; }> { //schema for routing const schema = z.object({ route: z.enum(['retrieve', 'direct']), directAnswer: z.string().optional(), }); const configuration = ensureAgentConfiguration(config); const model = await loadChatModel(configuration.queryModel); const routingPrompt = ChatPromptTemplate.fromMessages([ [ 'system', "You are a routing assistant. Your job is to determine if a question needs document retrieval or can be answered directly.\n\nRespond with either:\n'retrieve' - if the question requires retrieving documents\n'direct' - if the question can be answered directly AND your direct answer", ], ['human', '{query}'], ]); const formattedPrompt = await routingPrompt.invoke({ query: state.query, }); const response = await model .withStructuredOutput(schema) .invoke(formattedPrompt.toString()); const route = response.route; return { route }; } async function answerQueryDirectly( state: typeof AgentStateAnnotation.State, config: RunnableConfig ): Promise { const configuration = ensureAgentConfiguration(config); const model = await loadChatModel(configuration.queryModel); const userHumanMessage = new HumanMessage(state.query); const response = await model.invoke([userHumanMessage]); return { messages: [userHumanMessage, response] }; } async function routeQuery( state: typeof AgentStateAnnotation.State ): Promise<'retrieveDocuments' | 'directAnswer'> { const route = state.route; if (!route) { throw new Error('Route is not set'); } if (route === 'retrieve') { return 'retrieveDocuments'; } else if (route === 'direct') { return 'directAnswer'; } else { throw new Error('Invalid route'); } } async function retrieveDocuments( state: typeof AgentStateAnnotation.State, config: RunnableConfig ): Promise { const retriever = await makeRetriever(config); const response = await retriever.invoke(state.query, config); return { documents: response }; } async function generateResponse( state: typeof AgentStateAnnotation.State, config: RunnableConfig ): Promise { const context = formatDocs(state.documents); const configuration = ensureAgentConfiguration(config); const model = await loadChatModel(configuration.queryModel); const promptTemplate = await pull('rlm/rag-prompt'); const formattedPrompt = await promptTemplate.invoke({ context: context, question: state.query, }); const userHumanMessage = new HumanMessage(state.query); // Create a human message with the formatted prompt that includes context const formattedPromptMessage = new HumanMessage(formattedPrompt.toString()); const messageHistory = [...state.messages, formattedPromptMessage]; // Let MessagesAnnotation handle the message history const response = await model.invoke(messageHistory); // Return both the current query and the AI response to be handled by MessagesAnnotation's reducer return { messages: [userHumanMessage, response] }; } const builder = new StateGraph( AgentStateAnnotation, AgentConfigurationAnnotation ) .addNode('retrieveDocuments', retrieveDocuments) .addNode('generateResponse', generateResponse) .addNode('checkQueryType', checkQueryType) .addNode('directAnswer', answerQueryDirectly) .addEdge(START, 'checkQueryType') .addConditionalEdges('checkQueryType', routeQuery, [ 'retrieveDocuments', 'directAnswer', ]) .addEdge('retrieveDocuments', 'generateResponse') .addEdge('generateResponse', END) .addEdge('directAnswer', END); export const graph = builder.compile().withConfig({ runName: 'RetrievalGraph', }); ================================================ FILE: ch9/js/src/retrieval_graph/state.ts ================================================ import { Annotation, MessagesAnnotation } from '@langchain/langgraph'; import { reduceDocs } from '../shared/state.js'; import { Document } from '@langchain/core/documents'; /** * Represents the state of the retrieval graph / agent. */ export const AgentStateAnnotation = Annotation.Root({ query: Annotation(), route: Annotation(), ...MessagesAnnotation.spec, /** * Populated by the retriever. This is a list of documents that the agent can reference. * @type {Document[]} */ documents: Annotation< Document[], Document[] | { [key: string]: any }[] | string[] | string | 'delete' >({ default: () => [], // @ts-ignore reducer: reduceDocs, }), // Additional attributes can be added here as needed }); ================================================ FILE: ch9/js/src/retrieval_graph/utils.ts ================================================ import { Document } from '@langchain/core/documents'; export function formatDoc(doc: Document): string { const metadata = doc.metadata || {}; const meta = Object.entries(metadata) .map(([k, v]) => ` ${k}=${v}`) .join(''); const metaStr = meta ? ` ${meta}` : ''; return `\n${doc.pageContent}\n`; } export function formatDocs(docs?: Document[]): string { /**Format a list of documents as XML. */ if (!docs || docs.length === 0) { return ''; } const formatted = docs.map(formatDoc).join('\n'); return `\n${formatted}\n`; } ================================================ FILE: ch9/js/src/shared/configuration.ts ================================================ /** * Define the configurable parameters for the agent. */ import { Annotation } from '@langchain/langgraph'; import { RunnableConfig } from '@langchain/core/runnables'; /** * typeof ConfigurationAnnotation.State class for indexing and retrieval operations. * * @property embeddingModel - The name of the openai embedding model to use. * @property retrieverProvider - The vector store provider to use for retrieval. * @property filter - Optional filter criteria to limit the items retrieved based on the specified filter type. * @property k - The number of results to return from the retriever. */ export const BaseConfigurationAnnotation = Annotation.Root({ /** * Name of the openai embedding model to use. Must be a valid embedding model name. */ embeddingModel: Annotation<'text-embedding-3-small'>, /** * The vector store provider to use for retrieval. * Options are 'supabase', 'chroma'. */ retrieverProvider: Annotation<'supabase' | 'chroma'>, /** * Optional filter criteria to limit the items retrieved. * Can be any metadata object that matches document metadata structure. */ filter: Annotation | undefined>, /** * The number of results to return from the retriever. */ k: Annotation, }); /** * Create an typeof BaseConfigurationAnnotation.State instance from a RunnableConfig object. * * @param config - The configuration object to use. * @returns An instance of typeof BaseConfigurationAnnotation.State with the specified configuration. */ export function ensureBaseConfiguration( config: RunnableConfig ): typeof BaseConfigurationAnnotation.State { const configurable = (config?.configurable || {}) as Partial< typeof BaseConfigurationAnnotation.State >; return { embeddingModel: configurable.embeddingModel || 'text-embedding-3-small', retrieverProvider: configurable.retrieverProvider || 'supabase', filter: configurable.filter, k: configurable.k || 4, }; } ================================================ FILE: ch9/js/src/shared/retrieval.ts ================================================ import { VectorStoreRetriever } from '@langchain/core/vectorstores'; import { OpenAIEmbeddings } from '@langchain/openai'; import { SupabaseVectorStore } from '@langchain/community/vectorstores/supabase'; import { createClient } from '@supabase/supabase-js'; import { RunnableConfig } from '@langchain/core/runnables'; import { Embeddings } from '@langchain/core/embeddings'; import { ensureBaseConfiguration } from './configuration.js'; import { Chroma } from '@langchain/community/vectorstores/chroma'; export async function makeSupabaseRetriever( configuration: ReturnType, embeddingModel: Embeddings ): Promise { if (!process.env.SUPABASE_URL || !process.env.SUPABASE_SERVICE_ROLE_KEY) { throw new Error( 'SUPABASE_URL or SUPABASE_SERVICE_ROLE_KEY environment variables are not defined' ); } const supabaseClient = createClient( process.env.SUPABASE_URL ?? '', process.env.SUPABASE_SERVICE_ROLE_KEY ?? '' ); const vectorStore = new SupabaseVectorStore(embeddingModel, { client: supabaseClient, tableName: 'documents', queryName: 'match_documents', }); return vectorStore.asRetriever({ filter: configuration.filter, k: configuration.k, }); } export async function makeChromaRetriever( configuration: ReturnType, embeddingModel: Embeddings ) { const vectorStore = new Chroma(embeddingModel, { collectionName: 'documents', }); return vectorStore.asRetriever({ filter: configuration.filter, k: configuration.k, }); } export async function makeRetriever( config: RunnableConfig ): Promise { const configuration = ensureBaseConfiguration(config); const embeddingModel = new OpenAIEmbeddings({ model: configuration.embeddingModel, }); switch (configuration.retrieverProvider) { case 'supabase': return makeSupabaseRetriever(configuration, embeddingModel); case 'chroma': return makeChromaRetriever(configuration, embeddingModel); default: throw new Error( `Unrecognized retrieverProvider in configuration: ${configuration.retrieverProvider}` ); } } ================================================ FILE: ch9/js/src/shared/state.ts ================================================ import { Document } from '@langchain/core/documents'; import { v4 as uuidv4 } from 'uuid'; /** * Reduces the document array based on the provided new documents or actions. * * @param existing - The existing array of documents. * @param newDocs - The new documents or actions to apply. * @returns The updated array of documents. */ export function reduceDocs( existing?: Document[], newDocs?: Document[] | { [key: string]: any }[] | string[] | string | 'delete' ): Document[] { if (newDocs === 'delete') { return []; } const existingList = existing || []; const existingIds = new Set(existingList.map((doc) => doc.metadata?.uuid)); if (typeof newDocs === 'string') { const docId = uuidv4(); return [ ...existingList, { pageContent: newDocs, metadata: { uuid: docId } }, ]; } const newList: Document[] = []; if (Array.isArray(newDocs)) { for (const item of newDocs) { if (typeof item === 'string') { const itemId = uuidv4(); newList.push({ pageContent: item, metadata: { uuid: itemId } }); existingIds.add(itemId); } else if (typeof item === 'object') { const metadata = (item as Document).metadata ?? {}; let itemId = metadata.uuid ?? uuidv4(); if (!existingIds.has(itemId)) { if ('pageContent' in item) { // It's a Document-like object newList.push({ ...(item as Document), metadata: { ...metadata, uuid: itemId }, }); } else { // It's a generic object, treat it as metadata newList.push({ pageContent: '', metadata: { ...(item as { [key: string]: any }), uuid: itemId }, }); } existingIds.add(itemId); } } } } return [...existingList, ...newList]; } ================================================ FILE: ch9/js/src/shared/utils.ts ================================================ import { BaseChatModel } from '@langchain/core/language_models/chat_models'; import { initChatModel } from 'langchain/chat_models/universal'; const SUPPORTED_PROVIDERS = [ 'openai', 'anthropic', 'azure_openai', 'cohere', 'google-vertexai', 'google-vertexai-web', 'google-genai', 'ollama', 'together', 'fireworks', 'mistralai', 'groq', 'bedrock', 'cerebras', 'deepseek', 'xai', ] as const; /** * Load a chat model from a fully specified name. * @param fullySpecifiedName - String in the format 'provider/model' or 'provider/account/provider/model'. * @returns A Promise that resolves to a BaseChatModel instance. */ export async function loadChatModel( fullySpecifiedName: string, temperature: number = 0.2 ): Promise { const index = fullySpecifiedName.indexOf('/'); if (index === -1) { // If there's no "/", assume it's just the model if ( !SUPPORTED_PROVIDERS.includes( fullySpecifiedName as (typeof SUPPORTED_PROVIDERS)[number] ) ) { throw new Error(`Unsupported model: ${fullySpecifiedName}`); } return await initChatModel(fullySpecifiedName, { temperature: temperature, }); } else { const provider = fullySpecifiedName.slice(0, index); const model = fullySpecifiedName.slice(index + 1); if ( !SUPPORTED_PROVIDERS.includes( provider as (typeof SUPPORTED_PROVIDERS)[number] ) ) { throw new Error(`Unsupported provider: ${provider}`); } return await initChatModel(model, { modelProvider: provider, temperature: temperature, }); } } ================================================ FILE: ch9/js/tsconfig.json ================================================ { "compilerOptions": { "target": "ES2020", "module": "NodeNext", "outDir": "./dist", "rootDir": "./src", "strict": false, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true }, "include": ["src/**/*"], "exclude": ["node_modules"] } ================================================ FILE: ch9/py/demo.py ================================================ import asyncio from langgraph_sdk import get_client async def invoke_retrieval_assistant(): # Initialize the LangGraph client # Replace with your actual LangGraph deployment URL deployment_url = "http://localhost:2024" client = get_client(url=deployment_url) try: # Create a new thread thread = await client.threads.create( # Optional: Add metadata if needed metadata={ "user_id": "example_user", "session": "retrieval_session" } ) # Prepare the input for the retrieval graph input_data = { # You can add additional state keys if your graph expects them "query": "What is this document about?", } # Invoke the assistant on the created thread # Replace "retrieval_graph" with your actual assistant ID async for event in client.runs.stream( thread_id=thread["thread_id"], assistant_id="retrieval_graph", input=input_data, stream_mode="updates" # Stream updates as they occur ): # Process and print each event print(f"Receiving event of type: {event.event}") print(event.data) print("\n") except Exception as e: print(f"An error occurred: {e}") # If you're running this in a script, you'll need to use asyncio to run the async function asyncio.run(invoke_retrieval_assistant()) ================================================ FILE: ch9/py/langgraph.json ================================================ { "dependencies": ["."], "graphs": { "indexer": "./src/ingestion_graph/graph.py:graph", "retrieval_graph": "./src/retrieval_graph/graph.py:graph" }, "env": "../../.env" } ================================================ FILE: ch9/py/pyproject.toml ================================================ [project] name = "rag-langgraph-template" version = "0.0.1" description = "A RAG agentin LangGraph." authors = [] license = { text = "MIT" } readme = "README.md" requires-python = ">=3.9,<4.0" dependencies = [ "langgraph>=0.2.6", "langchain-openai>=0.1.22", "langchain>=0.2.14", "python-dotenv>=1.0.1", "msgspec>=0.18.6", "langchain-community>=0.3.15", "supabase (>=2.13.0,<3.0.0)", "langchain-chroma>=0.2.0", "langgraph-sdk>=0.1.51" ] [project.optional-dependencies] dev = ["mypy>=1.11.1", "ruff>=0.6.1"] [build-system] requires = ["setuptools>=73.0.0", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools] packages = ["retrieval_graph", "ingestion_graph", "shared"] [tool.setuptools.package-dir] "langgraph.templates.retrieval_graph" = "src/retrieval_graph" "langgraph.templates.ingestion_graph" = "src/ingestion_graph" "retrieval_graph" = "src/retrieval_graph" "ingestion_graph" = "src/ingestion_graph" "shared" = "src/shared" [tool.setuptools.package-data] "*" = ["py.typed"] [tool.ruff] lint.select = [ "E", # pycodestyle "F", # pyflakes "I", # isort "D", # pydocstyle "D401", # First line should be in imperative mood "T201", "UP", ] lint.ignore = [ "UP006", "UP007", # We actually do want to import from typing_extensions "UP035", # Relax the convention by _not_ requiring documentation for every function parameter. "D417", "E501", ] [tool.ruff.lint.per-file-ignores] "tests/*" = ["D", "UP"] [tool.ruff.lint.pydocstyle] convention = "google" [tool.pytest.ini_options] pythonpath = [ "src" ] ================================================ FILE: ch9/py/src/docSplits.json ================================================ [ { "pageContent": "UNITED\tSTATES\nSECURITIES\tAND\tEXCHANGE\tCOMMISSION\nWashington,\tD.C.\t20549\nFORM\t10-K\n(Mark\tOne)\nxANNUAL\tREPORT\tPURSUANT\tTO\tSECTION\t13\tOR\t15(d)\tOF\tTHE\tSECURITIES\tEXCHANGE\tACT\tOF\t1934\nFor\tthe\tfiscal\tyear\tended\tDecember\t31,\t2023\nOR\noTRANSITION\tREPORT\tPURSUANT\tTO\tSECTION\t13\tOR\t15(d)\tOF\tTHE\tSECURITIES\tEXCHANGE\tACT\tOF\t1934\nFor\tthe\ttransition\tperiod\tfrom\t_________\tto\t_________\nCommission\tFile\tNumber:\t001-34756\nTesla,\tInc.\n(Exact\tname\tof\tregistrant\tas\tspecified\tin\tits\tcharter)\nDelaware91-2197729\n(State\tor\tother\tjurisdiction\tof\nincorporation\tor\torganization)\n(I.R.S.\tEmployer\nIdentification\tNo.)\n1\tTesla\tRoad\nAustin,\tTexas78725\n(Address\tof\tprincipal\texecutive\toffices)(Zip\tCode)\n(512)\t516-8177\n(Registrant’s\ttelephone\tnumber,\tincluding\tarea\tcode)\nSecurities\tregistered\tpursuant\tto\tSection\t12(b)\tof\tthe\tAct:\nTitle\tof\teach\tclassTrading\tSymbol(s)Name\tof\teach\texchange\ton\twhich\tregistered\nCommon\tstockTSLAThe\tNasdaq\tGlobal\tSelect\tMarket\nSecurities\tregistered\tpursuant\tto\tSection\t12(g)\tof\tthe\tAct:\nNone\nIndicate\tby\tcheck\tmark\twhether\tthe\tregistrant\tis\ta\twell-known\tseasoned\tissuer,\tas\tdefined\tin\tRule\t405\tof\tthe\tSecurities\tAct.\tYes\tx\tNo\to\nIndicate\tby\tcheck\tmark\tif\tthe\tregistrant\tis\tnot\trequired\tto\tfile\treports\tpursuant\tto\tSection\t13\tor\t15(d)\tof\tthe\tAct.\tYes\to\tNo\tx\nIndicate\tby\tcheck\tmark\twhether\tthe\tregistrant\t(1)\thas\tfiled\tall\treports\trequired\tto\tbe\tfiled\tby\tSection\t13\tor\t15(d)\tof\tthe\tSecurities\tExchange\tAct\tof\t1934\t(“Exchange\tAct”)\nduring\tthe\tpreceding\t12\tmonths\t(or\tfor\tsuch\tshorter\tperiod\tthat\tthe\tregistrant\twas\trequired\tto\tfile\tsuch\treports),\tand\t(2)\thas\tbeen\tsubject\tto\tsuch\tfiling\trequirements\tfor\tthe\tpast\t90\ndays.\tYes\tx\tNo\to\nIndicate\tby\tcheck\tmark\twhether\tthe\tregistrant\thas\tsubmitted\telectronically\tevery\tInteractive\tData\tFile\trequired\tto\tbe\tsubmitted\tpursuant\tto\tRule\t405\tof\tRegulation\tS-T\n(§232.405\tof\tthis\tchapter)\tduring\tthe\tpreceding\t12\tmonths\t(or\tfor\tsuch\tshorter\tperiod\tthat\tthe\tregistrant\twas\trequired\tto\tsubmit\tsuch\tfiles).\tYes\tx\tNo\to", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 1, "lines": { "from": 1, "to": 35 } } } }, { "pageContent": "Indicate\tby\tcheck\tmark\twhether\tthe\tregistrant\tis\ta\tlarge\taccelerated\tfiler,\tan\taccelerated\tfiler,\ta\tnon-accelerated\tfiler,\ta\tsmaller\treporting\tcompany,\tor\tan\temerging\tgrowth\ncompany.\tSee\tthe\tdefinitions\tof\t“large\taccelerated\tfiler,”\t“accelerated\tfiler,”\t“smaller\treporting\tcompany”\tand\t“emerging\tgrowth\tcompany”\tin\tRule\t12b-2\tof\tthe\tExchange\tAct:\nLarge\taccelerated\tfilerx\tAccelerated\tfilero\nNon-accelerated\tfilero\tSmaller\treporting\tcompanyo\nEmerging\tgrowth\tcompanyo", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 1, "lines": { "from": 36, "to": 40 } } } }, { "pageContent": "If\tan\temerging\tgrowth\tcompany,\tindicate\tby\tcheck\tmark\tif\tthe\tregistrant\thas\telected\tnot\tto\tuse\tthe\textended\ttransition\tperiod\tfor\tcomplying\twith\tany\tnew\tor\trevised\tfinancial\naccounting\tstandards\tprovided\tpursuant\tto\tSection\t13(a)\tof\tthe\tExchange\tAct.\to\nIndicate\tby\tcheck\tmark\twhether\tthe\tRegistrant\thas\tfiled\ta\treport\ton\tand\tattestation\tto\tits\tmanagement’s\tassessment\tof\tthe\teffectiveness\tof\tits\tinternal\tcontrol\tover\tfinancial\nreporting\tunder\tSection\t404(b)\tof\tthe\tSarbanes-Oxley\tAct\t(15\tU.S.C.\t7262(b))\tby\tthe\tregistered\tpublic\taccounting\tfirm\tthat\tprepared\tor\tissued\tits\taudit\treport.\tx\nIf\tsecurities\tare\tregistered\tpursuant\tto\tSection\t12(b)\tof\tthe\tAct,\tindicate\tby\tcheck\tmark\twhether\tthe\tfinancial\tstatements\tof\tthe\tregistrant\tincluded\tin\tthe\tfiling\treflect\tthe\ncorrection\tof\tan\terror\tto\tpreviously\tissued\tfinancial\tstatements.\to\nIndicate\tby\tcheck\tmark\twhether\tany\tof\tthose\terror\tcorrections\tare\trestatements\tthat\trequired\ta\trecovery\tanalysis\tof\tincentive-based\tcompensation\treceived\tby\tany\tof\tthe\nregistrant’s\texecutive\tofficers\tduring\tthe\trelevant\trecovery\tperiod\tpursuant\tto\t§240.10D-1(b).\to\nIndicate\tby\tcheck\tmark\twhether\tthe\tregistrant\tis\ta\tshell\tcompany\t(as\tdefined\tin\tRule\t12b-2\tof\tthe\tExchange\tAct).\tYes\to\tNo\tx\nThe\taggregate\tmarket\tvalue\tof\tvoting\tstock\theld\tby\tnon-affiliates\tof\tthe\tregistrant,\tas\tof\tJune\t30,\t2023,\tthe\tlast\tday\tof\tthe\tregistrant’s\tmost\trecently\tcompleted\tsecond\tfiscal\nquarter,\twas\t$722.52\tbillion\t(based\ton\tthe\tclosing\tprice\tfor\tshares\tof\tthe\tregistrant’s\tCommon\tStock\tas\treported\tby\tthe\tNASDAQ\tGlobal\tSelect\tMarket\ton\tJune\t30,\t2023).\tShares\tof\nCommon\tStock\theld\tby\teach\texecutive\tofficer\tand\tdirector\thave\tbeen\texcluded\tin\tthat\tsuch\tpersons\tmay\tbe\tdeemed\tto\tbe\taffiliates.\tThis\tdetermination\tof\taffiliate\tstatus\tis\tnot\nnecessarily\ta\tconclusive\tdetermination\tfor\tother\tpurposes.\nAs\tof\tJanuary\t22,\t2024,\tthere\twere\t3,184,790,415\tshares\tof\tthe\tregistrant’s\tcommon\tstock\toutstanding.\nDOCUMENTS\tINCORPORATED\tBY\tREFERENCE", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 2, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "DOCUMENTS\tINCORPORATED\tBY\tREFERENCE\nPortions\tof\tthe\tregistrant’s\tProxy\tStatement\tfor\tthe\t2024\tAnnual\tMeeting\tof\tStockholders\tare\tincorporated\therein\tby\treference\tin\tPart\tIII\tof\tthis\tAnnual\tReport\ton\tForm\t10-K\tto\nthe\textent\tstated\therein.\tSuch\tproxy\tstatement\twill\tbe\tfiled\twith\tthe\tSecurities\tand\tExchange\tCommission\twithin\t120\tdays\tof\tthe\tregistrant’s\tfiscal\tyear\tended\tDecember\t31,\t2023.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 2, "lines": { "from": 15, "to": 17 } } } }, { "pageContent": "TESLA,\tINC.\nANNUAL\tREPORT\tON\tFORM\t10-K\tFOR\tTHE\tYEAR\tENDED\tDECEMBER\t31,\t2023\nINDEX\n\t\tPage\nPART\tI.\n\t\t\nItem\t1.Business4\nItem\t1A.Risk\tFactors14\nItem\t1B.Unresolved\tStaff\tComments28\nItem\t1C.Cybersecurity29\nItem\t2.Properties30\nItem\t3.Legal\tProceedings30\nItem\t4.Mine\tSafety\tDisclosures30\n\t\nPART\tII.\n\t\nItem\t5.Market\tfor\tRegistrant's\tCommon\tEquity,\tRelated\tStockholder\tMatters\tand\tIssuer\tPurchases\tof\tEquity\tSecurities31\nItem\t6.[Reserved]32\nItem\t7.Management's\tDiscussion\tand\tAnalysis\tof\tFinancial\tCondition\tand\tResults\tof\tOperations33\nItem\t7A.Quantitative\tand\tQualitative\tDisclosures\tabout\tMarket\tRisk45\nItem\t8.Financial\tStatements\tand\tSupplementary\tData46\nItem\t9.Changes\tin\tand\tDisagreements\twith\tAccountants\ton\tAccounting\tand\tFinancial\tDisclosure93\nItem\t9A.Controls\tand\tProcedures93\nItem\t9B.Other\tInformation94\nItem\t9C.Disclosure\tRegarding\tForeign\tJurisdictions\tthat\tPrevent\tInspections94\n\t\nPART\tIII.\n\t\nItem\t10.Directors,\tExecutive\tOfficers\tand\tCorporate\tGovernance95\nItem\t11.Executive\tCompensation95\nItem\t12.Security\tOwnership\tof\tCertain\tBeneficial\tOwners\tand\tManagement\tand\tRelated\tStockholder\tMatters95\nItem\t13.Certain\tRelationships\tand\tRelated\tTransactions,\tand\tDirector\tIndependence95\nItem\t14.Principal\tAccountant\tFees\tand\tServices95\n\t\nPART\tIV.\n\t\nItem\t15.Exhibits\tand\tFinancial\tStatement\tSchedules96\nItem\t16.Summary111\n\t\nSignatures", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 3, "lines": { "from": 1, "to": 40 } } } }, { "pageContent": "Table\tof\tContents\nForward-Looking\tStatements\nThe\tdiscussions\tin\tthis\tAnnual\tReport\ton\tForm\t10-K\tcontain\tforward-looking\tstatements\treflecting\tour\tcurrent\texpectations\tthat\tinvolve\trisks\tand\nuncertainties.\tThese\tforward-looking\tstatements\tinclude,\tbut\tare\tnot\tlimited\tto,\tstatements\tconcerning\tsupply\tchain\tconstraints,\tour\tstrategy,\ncompetition,\tfuture\toperations\tand\tproduction\tcapacity,\tfuture\tfinancial\tposition,\tfuture\trevenues,\tprojected\tcosts,\tprofitability,\texpected\tcost\treductions,\ncapital\tadequacy,\texpectations\tregarding\tdemand\tand\tacceptance\tfor\tour\ttechnologies,\tgrowth\topportunities\tand\ttrends\tin\tthe\tmarkets\tin\twhich\twe\noperate,\tprospects\tand\tplans\tand\tobjectives\tof\tmanagement.\tThe\twords\t“anticipates,”\t“believes,”\t“could,”\t“estimates,”\t“expects,”\t“intends,”\t“may,”\n“plans,”\t“projects,”\t“will,”\t“would”\tand\tsimilar\texpressions\tare\tintended\tto\tidentify\tforward-looking\tstatements,\talthough\tnot\tall\tforward-looking\nstatements\tcontain\tthese\tidentifying\twords.\tWe\tmay\tnot\tactually\tachieve\tthe\tplans,\tintentions\tor\texpectations\tdisclosed\tin\tour\tforward-looking\nstatements\tand\tyou\tshould\tnot\tplace\tundue\treliance\ton\tour\tforward-looking\tstatements.\tActual\tresults\tor\tevents\tcould\tdiffer\tmaterially\tfrom\tthe\tplans,\nintentions\tand\texpectations\tdisclosed\tin\tthe\tforward-looking\tstatements\tthat\twe\tmake.\tThese\tforward-looking\tstatements\tinvolve\trisks\tand\tuncertainties\nthat\tcould\tcause\tour\tactual\tresults\tto\tdiffer\tmaterially\tfrom\tthose\tin\tthe\tforward-looking\tstatements,\tincluding,\twithout\tlimitation,\tthe\trisks\tset\tforth\tin\tPart\nI,\tItem\t1A,\t“Risk\tFactors”\tof\tthe\tAnnual\tReport\ton\tForm\t10-K\tfor\tthe\tfiscal\tyear\tended\tDecember\t31,\t2023\tand\tthat\tare\totherwise\tdescribed\tor\tupdated\nfrom\ttime\tto\ttime\tin\tour\tother\tfilings\twith\tthe\tSecurities\tand\tExchange\tCommission\t(the\t“SEC”).\tThe\tdiscussion\tof\tsuch\trisks\tis\tnot\tan\tindication\tthat\tany\nsuch\trisks\thave\toccurred\tat\tthe\ttime\tof\tthis\tfiling.\tWe\tdo\tnot\tassume\tany\tobligation\tto\tupdate\tany\tforward-looking\tstatements.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 4, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "Table\tof\tContents\nPART\tI\nITEM\t1.\tBUSINESS\nOverview\nWe\tdesign,\tdevelop,\tmanufacture,\tsell\tand\tlease\thigh-performance\tfully\telectric\tvehicles\tand\tenergy\tgeneration\tand\tstorage\tsystems,\tand\toffer\nservices\trelated\tto\tour\tproducts.\tWe\tgenerally\tsell\tour\tproducts\tdirectly\tto\tcustomers,\tand\tcontinue\tto\tgrow\tour\tcustomer-facing\tinfrastructure\tthrough\ta\nglobal\tnetwork\tof\tvehicle\tshowrooms\tand\tservice\tcenters,\tMobile\tService,\tbody\tshops,\tSupercharger\tstations\tand\tDestination\tChargers\tto\taccelerate\tthe\nwidespread\tadoption\tof\tour\tproducts.\tWe\temphasize\tperformance,\tattractive\tstyling\tand\tthe\tsafety\tof\tour\tusers\tand\tworkforce\tin\tthe\tdesign\tand\nmanufacture\tof\tour\tproducts\tand\tare\tcontinuing\tto\tdevelop\tfull\tself-driving\ttechnology\tfor\timproved\tsafety.\tWe\talso\tstrive\tto\tlower\tthe\tcost\tof\townership\nfor\tour\tcustomers\tthrough\tcontinuous\tefforts\tto\treduce\tmanufacturing\tcosts\tand\tby\toffering\tfinancial\tand\tother\tservices\ttailored\tto\tour\tproducts.\nOur\tmission\tis\tto\taccelerate\tthe\tworld’s\ttransition\tto\tsustainable\tenergy.\tWe\tbelieve\tthat\tthis\tmission,\talong\twith\tour\tengineering\texpertise,\nvertically\tintegrated\tbusiness\tmodel\tand\tfocus\ton\tuser\texperience\tdifferentiate\tus\tfrom\tother\tcompanies.\nSegment\tInformation\nWe\toperate\tas\ttwo\treportable\tsegments:\t(i)\tautomotive\tand\t(ii)\tenergy\tgeneration\tand\tstorage.\nThe\tautomotive\tsegment\tincludes\tthe\tdesign,\tdevelopment,\tmanufacturing,\tsales\tand\tleasing\tof\thigh-performance\tfully\telectric\tvehicles\tas\twell\tas\nsales\tof\tautomotive\tregulatory\tcredits.\tAdditionally,\tthe\tautomotive\tsegment\talso\tincludes\tservices\tand\tother,\twhich\tincludes\tsales\tof\tused\tvehicles,\tnon-\nwarranty\tafter-sales\tvehicle\tservices,\tbody\tshop\tand\tparts,\tpaid\tSupercharging,\tvehicle\tinsurance\trevenue\tand\tretail\tmerchandise.\tThe\tenergy\tgeneration\nand\tstorage\tsegment\tincludes\tthe\tdesign,\tmanufacture,\tinstallation,\tsales\tand\tleasing\tof\tsolar\tenergy\tgeneration\tand\tenergy\tstorage\tproducts\tand\trelated\nservices\tand\tsales\tof\tsolar\tenergy\tsystems\tincentives.\nOur\tProducts\tand\tServices\nAutomotive", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 5, "lines": { "from": 1, "to": 21 } } } }, { "pageContent": "Our\tProducts\tand\tServices\nAutomotive\nWe\tcurrently\tmanufacture\tfive\tdifferent\tconsumer\tvehicles\t–\tthe\tModel\t3,\tY,\tS,\tX\tand\tCybertruck.\tModel\t3\tis\ta\tfour-door\tmid-size\tsedan\tthat\twe\ndesigned\tfor\tmanufacturability\twith\ta\tbase\tprice\tfor\tmass-market\tappeal.\tModel\tY\tis\ta\tcompact\tsport\tutility\tvehicle\t(“SUV”)\tbuilt\ton\tthe\tModel\t3\tplatform\nwith\tseating\tfor\tup\tto\tseven\tadults.\tModel\tS\tis\ta\tfour-door\tfull-size\tsedan\tand\tModel\tX\tis\ta\tmid-size\tSUV\twith\tseating\tfor\tup\tto\tseven\tadults.\tModel\tS\tand\nModel\tX\tfeature\tthe\thighest\tperformance\tcharacteristics\tand\tlongest\tranges\tthat\twe\toffer\tin\ta\tsedan\tand\tSUV,\trespectively.\tIn\tNovember\t2023,\twe\nentered\tthe\tconsumer\tpickup\ttruck\tmarket\twith\tfirst\tdeliveries\tof\tthe\tCybertruck,\ta\tfull-size\telectric\tpickup\ttruck\twith\ta\tstainless\tsteel\texterior\tthat\thas\nthe\tutility\tand\tstrength\tof\ta\ttruck\twhile\tfeaturing\tthe\tspeed\tof\ta\tsports\tcar.\nIn\t2022,\twe\talso\tbegan\tearly\tproduction\tand\tdeliveries\tof\ta\tcommercial\telectric\tvehicle,\tthe\tTesla\tSemi.\tWe\thave\tplanned\telectric\tvehicles\tto\naddress\tadditional\tvehicle\tmarkets,\tand\tto\tcontinue\tleveraging\tdevelopments\tin\tour\tproprietary\tFull\tSelf-Driving\t(“FSD”)\tCapability\tfeatures,\tbattery\tcell\nand\tother\ttechnologies.\nEnergy\tGeneration\tand\tStorage\nEnergy\tStorage\tProducts\nPowerwall\tand\tMegapack\tare\tour\tlithium-ion\tbattery\tenergy\tstorage\tproducts.\tPowerwall,\twhich\twe\tsell\tdirectly\tto\tcustomers,\tas\twell\tas\tthrough\nchannel\tpartners,\tis\tdesigned\tto\tstore\tenergy\tat\ta\thome\tor\tsmall\tcommercial\tfacility.\tMegapack\tis\tan\tenergy\tstorage\tsolution\tfor\tcommercial,\tindustrial,\nutility\tand\tenergy\tgeneration\tcustomers,\tmultiple\tof\twhich\tmay\tbe\tgrouped\ttogether\tto\tform\tlarger\tinstallations\tof\tgigawatt\thours\t(“GWh”)\tor\tgreater\ncapacity.\nWe\talso\tcontinue\tto\tdevelop\tsoftware\tcapabilities\tfor\tremotely\tcontrolling\tand\tdispatching\tour\tenergy\tstorage\tsystems\tacross\ta\twide\trange\tof\nmarkets\tand\tapplications,\tincluding\tthrough\tour\treal-time\tenergy\tcontrol\tand\toptimization\tplatforms.\n4", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 5, "lines": { "from": 20, "to": 39 } } } }, { "pageContent": "Table\tof\tContents\nSolar\tEnergy\tOfferings\nWe\tsell\tretrofit\tsolar\tenergy\tsystems\tto\tcustomers\tand\tchannel\tpartners\tand\talso\tmake\tthem\tavailable\tthrough\tpower\tpurchase\tagreement\t(“PPA”)\narrangements.\tWe\tpurchase\tmost\tof\tthe\tcomponents\tfor\tour\tretrofit\tsolar\tenergy\tsystems\tfrom\tmultiple\tsources\tto\tensure\tcompetitive\tpricing\tand\nadequate\tsupply.\tWe\talso\tdesign\tand\tmanufacture\tcertain\tcomponents\tfor\tour\tsolar\tenergy\tproducts.\nWe\tsell\tour\tSolar\tRoof,\twhich\tcombines\tpremium\tglass\troof\ttiles\twith\tenergy\tgeneration,\tdirectly\tto\tcustomers,\tas\twell\tas\tthrough\tchannel\ncustomers.\tWe\tcontinue\tto\timprove\tour\tinstallation\tcapability\tand\tefficiency,\tincluding\tthrough\tcollaboration\twith\treal\testate\tdevelopers\tand\tbuilders\ton\nnew\thomes.\nTechnology\nAutomotive\nBattery\tand\tPowertrain\nOur\tcore\tvehicle\ttechnology\tcompetencies\tinclude\tpowertrain\tengineering\tand\tmanufacturing\tand\tour\tability\tto\tdesign\tvehicles\tthat\tutilize\tthe\nunique\tadvantages\tof\tan\telectric\tpowertrain.\tWe\thave\tdesigned\tour\tproprietary\tpowertrain\tsystems\tto\tbe\tadaptable,\tefficient,\treliable\tand\tcost-effective\nwhile\twithstanding\tthe\trigors\tof\tan\tautomotive\tenvironment.\tWe\toffer\tdual\tmotor\tpowertrain\tvehicles,\twhich\tuse\ttwo\telectric\tmotors\tto\tmaximize\ttraction\nand\tperformance\tin\tan\tall-wheel\tdrive\tconfiguration,\tas\twell\tas\tvehicle\tpowertrain\ttechnology\tfeaturing\tthree\telectric\tmotors\tfor\tfurther\tincreased\nperformance\tin\tcertain\tversions\tof\tModel\tS\tand\tModel\tX,\tCybertruck\tand\tthe\tTesla\tSemi.\nWe\tmaintain\textensive\ttesting\tand\tR&D\tcapabilities\tfor\tbattery\tcells,\tpacks\tand\tsystems,\tand\thave\tbuilt\tan\texpansive\tbody\tof\tknowledge\ton\tlithium-\nion\tcell\tchemistry\ttypes\tand\tperformance\tcharacteristics.\tIn\torder\tto\tenable\ta\tgreater\tsupply\tof\tcells\tfor\tour\tproducts\twith\thigher\tenergy\tdensity\tat\tlower\ncosts,\twe\thave\tdeveloped\ta\tnew\tproprietary\tlithium-ion\tbattery\tcell\tand\timproved\tmanufacturing\tprocesses.\nVehicle\tControl\tand\tInfotainment\tSoftware", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 6, "lines": { "from": 1, "to": 20 } } } }, { "pageContent": "Vehicle\tControl\tand\tInfotainment\tSoftware\nThe\tperformance\tand\tsafety\tsystems\tof\tour\tvehicles\tand\ttheir\tbattery\tpacks\tutilize\tsophisticated\tcontrol\tsoftware.\tControl\tsystems\tin\tour\tvehicles\noptimize\tperformance,\tcustomize\tvehicle\tbehavior,\tmanage\tcharging\tand\tcontrol\tall\tinfotainment\tfunctions.\tWe\tdevelop\talmost\tall\tof\tthis\tsoftware,\nincluding\tmost\tof\tthe\tuser\tinterfaces,\tinternally\tand\tupdate\tour\tvehicles’\tsoftware\tregularly\tthrough\tover-the-air\tupdates.\nSelf-Driving\tDevelopment\tand\tArtificial\tIntelligence\nWe\thave\texpertise\tin\tdeveloping\ttechnologies,\tsystems\tand\tsoftware\tto\tenable\tself-driving\tvehicles\tusing\tprimarily\tvision-based\ttechnologies.\tOur\nFSD\tComputer\truns\tour\tneural\tnetworks\tin\tour\tvehicles,\tand\twe\tare\talso\tdeveloping\tadditional\tcomputer\thardware\tto\tbetter\tenable\tthe\tmassive\tamounts\nof\tfield\tdata\tcaptured\tby\tour\tvehicles\tto\tcontinually\ttrain\tand\timprove\tthese\tneural\tnetworks\tfor\treal-world\tperformance.\nCurrently,\twe\toffer\tin\tour\tvehicles\tcertain\tadvanced\tdriver\tassist\tsystems\tunder\tour\tAutopilot\tand\tFSD\tCapability\toptions.\tAlthough\tat\tpresent\tthe\ndriver\tis\tultimately\tresponsible\tfor\tcontrolling\tthe\tvehicle,\tour\tsystems\tprovide\tsafety\tand\tconvenience\tfunctionality\tthat\trelieves\tdrivers\tof\tthe\tmost\ntedious\tand\tpotentially\tdangerous\taspects\tof\troad\ttravel\tmuch\tlike\tthe\tsystem\tthat\tairplane\tpilots\tuse,\twhen\tconditions\tpermit.\tAs\twith\tother\tvehicle\nsystems,\twe\timprove\tthese\tfunctions\tin\tour\tvehicles\tover\ttime\tthrough\tover-the-air\tupdates.\nWe\tintend\tto\testablish\tin\tthe\tfuture\tan\tautonomous\tTesla\tride-hailing\tnetwork,\twhich\twe\texpect\twould\talso\tallow\tus\tto\taccess\ta\tnew\tcustomer\tbase\neven\tas\tmodes\tof\ttransportation\tevolve.\nWe\tare\talso\tapplying\tour\tartificial\tintelligence\tlearnings\tfrom\tself-driving\ttechnology\tto\tthe\tfield\tof\trobotics,\tsuch\tas\tthrough\tOptimus,\ta\trobotic\nhumanoid\tin\tdevelopment,\twhich\tis\tcontrolled\tby\tthe\tsame\tAI\tsystem.\n5", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 6, "lines": { "from": 20, "to": 36 } } } }, { "pageContent": "Table\tof\tContents\nEnergy\tGeneration\tand\tStorage\nEnergy\tStorage\tProducts\nWe\tleverage\tmany\tof\tthe\tcomponent-level\ttechnologies\tfrom\tour\tvehicles\tin\tour\tenergy\tstorage\tproducts.\tBy\ttaking\ta\tmodular\tapproach\tto\tthe\ndesign\tof\tbattery\tsystems,\twe\tcan\toptimize\tmanufacturing\tcapacity\tof\tour\tenergy\tstorage\tproducts.\tAdditionally,\tour\texpertise\tin\tpower\telectronics\nenables\tour\tbattery\tsystems\tto\tinterconnect\twith\telectricity\tgrids\twhile\tproviding\tfast-acting\tsystems\tfor\tpower\tinjection\tand\tabsorption.\tWe\thave\talso\ndeveloped\tsoftware\tto\tremotely\tcontrol\tand\tdispatch\tour\tenergy\tstorage\tsystems.\nSolar\tEnergy\tSystems\nWe\thave\tengineered\tSolar\tRoof\tover\tnumerous\titerations\tto\tcombine\taesthetic\tappeal\tand\tdurability\twith\tpower\tgeneration.\tThe\tefficiency\tof\tour\nsolar\tenergy\tproducts\tis\taided\tby\tour\town\tsolar\tinverter,\twhich\tincorporates\tour\tpower\telectronics\ttechnologies.\tWe\tdesigned\tboth\tproducts\tto\tintegrate\nwith\tPowerwall.\nDesign\tand\tEngineering\nAutomotive\nWe\thave\testablished\tsignificant\tin-house\tcapabilities\tin\tthe\tdesign\tand\ttest\tengineering\tof\telectric\tvehicles\tand\ttheir\tcomponents\tand\tsystems.\tOur\nteam\thas\tsignificant\texperience\tin\tcomputer-aided\tdesign\tas\twell\tas\tdurability,\tstrength\tand\tcrash\ttest\tsimulations,\twhich\treduces\tthe\tproduct\ndevelopment\ttime\tof\tnew\tmodels.\tWe\thave\talso\tachieved\tcomplex\tengineering\tfeats\tin\tstamping,\tcasting\tand\tthermal\tsystems,\tand\tdeveloped\ta\tmethod\nto\tintegrate\tbatteries\tdirectly\twith\tvehicle\tbody\tstructures\twithout\tseparate\tbattery\tpacks\tto\toptimize\tmanufacturability,\tweight,\trange\tand\tcost\ncharacteristics.\nWe\tare\talso\texpanding\tour\tmanufacturing\toperations\tglobally\twhile\ttaking\taction\tto\tlocalize\tour\tvehicle\tdesigns\tand\tproduction\tfor\tparticular\nmarkets,\tincluding\tcountry-specific\tmarket\tdemands\tand\tfactory\toptimizations\tfor\tlocal\tworkforces.\tAs\twe\tincrease\tour\tcapabilities,\tparticularly\tin\tthe\nareas\tof\tautomation,\tdie-making\tand\tline-building,\twe\tare\talso\tmaking\tstrides\tin\tthe\tsimulations\tmodeling\tthese\tcapabilities\tprior\tto\tconstruction.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 7, "lines": { "from": 1, "to": 21 } } } }, { "pageContent": "Energy\tGeneration\tand\tStorage\nOur\texpertise\tin\telectrical,\tmechanical,\tcivil\tand\tsoftware\tengineering\tallows\tus\tto\tdesign,\tengineer,\tmanufacture\tand\tinstall\tenergy\tgenerating\tand\nstorage\tproducts\tand\tcomponents,\tincluding\tat\tthe\tresidential\tthrough\tutility\tscale.\tFor\texample,\tthe\tmodular\tdesign\tof\tour\tMegapack\tutility-scale\tbattery\nline\tis\tintended\tto\tsignificantly\treduce\tthe\tamount\tof\tassembly\trequired\tin\tthe\tfield.\tWe\talso\tcustomize\tsolutions\tincluding\tour\tenergy\tstorage\tproducts,\nsolar\tenergy\tsystems\tand/or\tSolar\tRoof\tfor\tcustomers\tto\tmeet\ttheir\tspecific\tneeds.\nSales\tand\tMarketing\nHistorically,\twe\thave\tbeen\table\tto\tachieve\tsales\twithout\ttraditional\tadvertising\tand\tat\trelatively\tlow\tmarketing\tcosts.\tWe\tcontinue\tto\tmonitor\tour\npublic\tnarrative\tand\tbrand,\tand\ttailor\tour\tmarketing\tefforts\taccordingly,\tincluding\tthrough\tinvestments\tin\tcustomer\teducation\tand\tadvertising\tas\nnecessary.\nAutomotive\nDirect\tSales\nOur\tvehicle\tsales\tchannels\tcurrently\tinclude\tour\twebsite\tand\tan\tinternational\tnetwork\tof\tcompany-owned\tstores.\tIn\tsome\tjurisdictions,\twe\talso\thave\ngalleries\tto\teducate\tand\tinform\tcustomers\tabout\tour\tproducts,\tbut\tsuch\tlocations\tdo\tnot\ttransact\tin\tthe\tsale\tof\tvehicles.\tWe\tbelieve\tthis\tinfrastructure\nenables\tus\tto\tbetter\tcontrol\tcosts\tof\tinventory,\tmanage\twarranty\tservice\tand\tpricing,\teducate\tconsumers\tabout\telectric\tvehicles,\tmake\tour\tvehicles\tmore\naffordable,\tmaintain\tand\tstrengthen\tthe\tTesla\tbrand\tand\tobtain\trapid\tcustomer\tfeedback.\nWe\treevaluate\tour\tsales\tstrategy\tboth\tglobally\tand\tat\ta\tlocation-by-location\tlevel\tfrom\ttime\tto\ttime\tto\toptimize\tour\tsales\tchannels.\tHowever,\tsales\nof\tvehicles\tin\tthe\tautomobile\tindustry\ttend\tto\tbe\tcyclical\tin\tmany\tmarkets,\twhich\tmay\texpose\tus\tto\tvolatility\tfrom\ttime\tto\ttime.\n6", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 7, "lines": { "from": 22, "to": 39 } } } }, { "pageContent": "Table\tof\tContents\nUsed\tVehicle\tSales\nOur\tused\tvehicle\tbusiness\tsupports\tnew\tvehicle\tsales\tby\tintegrating\tthe\ttrade-in\tof\ta\tcustomer’s\texisting\tTesla\tor\tnon-Tesla\tvehicle\twith\tthe\tsale\tof\na\tnew\tor\tused\tTesla\tvehicle.\tThe\tTesla\tand\tnon-Tesla\tvehicles\twe\tacquire\tas\ttrade-ins\tare\tsubsequently\tremarketed,\teither\tdirectly\tby\tus\tor\tthrough\tthird\nparties.\tWe\talso\tremarket\tused\tTesla\tvehicles\tacquired\tfrom\tother\tsources\tincluding\tlease\treturns.\nPublic\tCharging\nWe\thave\ta\tgrowing\tglobal\tnetwork\tof\tTesla\tSuperchargers,\twhich\tare\tour\tindustrial-grade,\thigh-speed\tvehicle\tchargers.\tWhere\tpossible,\twe\tco-\nlocate\tSuperchargers\twith\tour\tsolar\tand\tenergy\tstorage\tsystems\tto\treduce\tcosts\tand\tpromote\trenewable\tpower.\tSupercharger\tstations\tare\ttypically\nplaced\talong\twell-traveled\troutes\tand\tin\tand\taround\tdense\tcity\tcenters\tto\tallow\tvehicle\towners\tthe\tability\tto\tenjoy\tquick,\treliable\tcharging\talong\tan\nextensive\tnetwork\twith\tconvenient\tstops.\tUse\tof\tthe\tSupercharger\tnetwork\teither\trequires\tpayment\tof\ta\tfee\tor\tis\tfree\tunder\tcertain\tsales\tprograms.\tIn\nNovember\t2021,\twe\tbegan\tto\toffer\tSupercharger\taccess\tto\tnon-Tesla\tvehicles\tin\tcertain\tlocations\tin\tsupport\tof\tour\tmission\tto\taccelerate\tthe\tworld’s\ntransition\tto\tsustainable\tenergy,\tand\tin\tNovember\t2022,\twe\topened\tup\tour\tpreviously\tproprietary\tcharging\tconnector\tas\tthe\tNorth\tAmerican\tCharging\nStandard\t(NACS).\tThis\tenables\tall\telectric\tvehicles\tand\tcharging\tstations\tto\tinteroperate\t—\twhich\tmakes\tcharging\teasier\tand\tmore\tefficient\tfor\teveryone\nand\tadvances\tour\tmission\tto\taccelerate\tthe\tworld’s\ttransition\tto\tsustainable\tenergy.\tFollowing\tthis,\ta\tnumber\tof\tmajor\tautomotive\tcompanies\tannounced\ntheir\tadoption\tof\tNACS,\twith\ttheir\taccess\tto\tthe\tSupercharger\tnetwork\tbeginning\tin\tphases\tin\t2024\tand\ttheir\tproduction\tof\tNACS\tvehicles\tbeginning\tno\nlater\tthan\t2025.\tWe\talso\tengaged\tSAE\tInternational\tto\tgovern\tNACS\tas\tan\tindustry\tstandard,\tnow\tnamed\tJ3400.\tWe\tcontinue\tto\tmonitor\tand\tincrease\tour\nnetwork\tof\tTesla\tSuperchargers\tin\tanticipation\tof\tfuture\tdemand.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 8, "lines": { "from": 1, "to": 17 } } } }, { "pageContent": "We\talso\twork\twith\ta\twide\tvariety\tof\thospitality,\tretail\tand\tpublic\tdestinations,\tas\twell\tas\tbusinesses\twith\tcommuting\temployees,\tto\toffer\tadditional\ncharging\toptions\tfor\tour\tcustomers,\tas\twell\tas\tsingle-family\thomeowners\tand\tmulti-family\tresidential\tentities,\tto\tdeploy\thome\tcharging\tsolutions.\nIn-App\tUpgrades\nAs\tour\tvehicles\tare\tcapable\tof\tbeing\tupdated\tremotely\tover-the-air,\tour\tcustomers\tmay\tpurchase\tadditional\tpaid\toptions\tand\tfeatures\tthrough\tthe\nTesla\tapp\tor\tthrough\tthe\tin-vehicle\tuser\tinterface.\tWe\texpect\tthat\tthis\tfunctionality\twill\talso\tallow\tus\tto\toffer\tcertain\toptions\tand\tfeatures\ton\ta\nsubscription\tbasis\tin\tthe\tfuture.\nEnergy\tGeneration\tand\tStorage\nWe\tmarket\tand\tsell\tour\tsolar\tand\tenergy\tstorage\tproducts\tto\tresidential,\tcommercial\tand\tindustrial\tcustomers\tand\tutilities\tthrough\ta\tvariety\tof\nchannels,\tincluding\tthrough\tour\twebsite,\tstores\tand\tgalleries,\tas\twell\tas\tthrough\tour\tnetwork\tof\tchannel\tpartners,\tand\tin\tthe\tcase\tof\tsome\tcommercial\ncustomers,\tthrough\tPPA\ttransactions.\tWe\temphasize\tsimplicity,\tstandardization\tand\taccessibility\tto\tmake\tit\teasy\tand\tcost-effective\tfor\tcustomers\tto\tadopt\nclean\tenergy,\twhile\treducing\tour\tcustomer\tacquisition\tcosts.\nService\tand\tWarranty\nAutomotive\nService\nWe\tprovide\tservice\tfor\tour\telectric\tvehicles\tat\tour\tcompany-owned\tservice\tlocations\tand\tthrough\tTesla\tMobile\tService\ttechnicians\twho\tperform\twork\nremotely\tat\tcustomers’\thomes\tor\tother\tlocations.\tServicing\tthe\tvehicles\tourselves\tallows\tus\tto\tidentify\tproblems\tand\timplement\tsolutions\tand\nimprovements\tfaster\tthan\ttraditional\tautomobile\tmanufacturers\tand\ttheir\tdealer\tnetworks.\tThe\tconnectivity\tof\tour\tvehicles\talso\tallows\tus\tto\tdiagnose\tand\nremedy\tmany\tproblems\tremotely\tand\tproactively.\nVehicle\tLimited\tWarranties\tand\tExtended\tService\tPlans\nWe\tprovide\ta\tmanufacturer’s\tlimited\twarranty\ton\tall\tnew\tand\tused\tTesla\tvehicles\twe\tsell\tdirectly\tto\tconsumers,\twhich\tmay\tinclude\tlimited", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 8, "lines": { "from": 18, "to": 37 } } } }, { "pageContent": "warranties\ton\tcertain\tcomponents,\tspecific\ttypes\tof\tdamage\tor\tbattery\tcapacity\tretention.\tWe\talso\tcurrently\toffer\toptional\textended\tservice\tplans\tthat\nprovide\tcoverage\tbeyond\tthe\tnew\tvehicle\tlimited\twarranties\tfor\tcertain\tmodels\tin\tspecified\tregions.\n7", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 8, "lines": { "from": 38, "to": 40 } } } }, { "pageContent": "Table\tof\tContents\nEnergy\tGeneration\tand\tStorage\nWe\tprovide\tservice\tand\trepairs\tto\tour\tenergy\tproduct\tcustomers,\tincluding\tunder\twarranty\twhere\tapplicable.\tWe\tgenerally\tprovide\tmanufacturer’s\nlimited\twarranties\twith\tour\tenergy\tstorage\tproducts\tand\toffer\tcertain\textended\tlimited\twarranties\tthat\tare\tavailable\tat\tthe\ttime\tof\tpurchase\tof\tthe\nsystem.\tIf\twe\tinstall\ta\tsystem,\twe\talso\tprovide\tcertain\tlimited\twarranties\ton\tour\tinstallation\tworkmanship.\nFor\tretrofit\tsolar\tenergy\tsystems,\twe\tprovide\tseparate\tlimited\twarranties\tfor\tworkmanship\tand\tagainst\troof\tleaks,\tand\tfor\tSolar\tRoof,\twe\talso\nprovide\tlimited\twarranties\tfor\tdefects\tand\tweatherization.\tFor\tcomponents\tnot\tmanufactured\tby\tus,\twe\tgenerally\tpass-through\tthe\tapplicable\nmanufacturers’\twarranties.\nAs\tpart\tof\tour\tsolar\tenergy\tsystem\tand\tenergy\tstorage\tcontracts,\twe\tmay\tprovide\tthe\tcustomer\twith\tperformance\tguarantees\tthat\tcommit\tthat\tthe\nunderlying\tsystem\twill\tmeet\tor\texceed\tthe\tminimum\tenergy\tgeneration\tor\tperformance\trequirements\tspecified\tin\tthe\tcontract.\nFinancial\tServices\nAutomotive\nPurchase\tFinancing\tand\tLeases\nWe\toffer\tleasing\tand/or\tloan\tfinancing\tarrangements\tfor\tour\tvehicles\tin\tcertain\tjurisdictions\tin\tNorth\tAmerica,\tEurope\tand\tAsia\tourselves\tand\nthrough\tvarious\tfinancial\tinstitutions.\tUnder\tcertain\tof\tsuch\tprograms,\twe\thave\tprovided\tresale\tvalue\tguarantees\tor\tbuyback\tguarantees\tthat\tmay\nobligate\tus\tto\tcover\ta\tresale\tloss\tup\tto\ta\tcertain\tlimit\tor\trepurchase\tthe\tsubject\tvehicles\tat\tpre-determined\tvalues.\nInsurance\nIn\t2021,\twe\tlaunched\tour\tinsurance\tproduct\tusing\treal-time\tdriving\tbehavior\tin\tselect\tstates,\twhich\toffers\trates\tthat\tare\toften\tbetter\tthan\tother\nalternatives\tand\tpromotes\tsafer\tdriving.\tOur\tinsurance\tproducts\tare\tcurrently\tavailable\tin\t12\tstates\tand\twe\tplan\tto\texpand\tthe\tmarkets\tin\twhich\twe\toffer\ninsurance\tproducts,\tas\tpart\tof\tour\tongoing\teffort\tto\tdecrease\tthe\ttotal\tcost\tof\townership\tfor\tour\tcustomers.\nEnergy\tGeneration\tand\tStorage", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 9, "lines": { "from": 1, "to": 21 } } } }, { "pageContent": "Energy\tGeneration\tand\tStorage\nWe\toffer\tcertain\tfinancing\toptions\tto\tour\tsolar\tcustomers,\twhich\tenable\tthe\tcustomer\tto\tpurchase\tand\town\ta\tsolar\tenergy\tsystem,\tSolar\tRoof\tor\nintegrated\tsolar\tand\tPowerwall\tsystem.\tOur\tsolar\tPPAs,\toffered\tprimarily\tto\tcommercial\tcustomers,\tcharge\ta\tfee\tper\tkilowatt-hour\tbased\ton\tthe\tamount\tof\nelectricity\tproduced\tby\tour\tsolar\tenergy\tsystems.\nManufacturing\nWe\tcurrently\thave\tmanufacturing\tfacilities\tin\tthe\tU.S.\tin\tNorthern\tCalifornia,\tin\tBuffalo,\tNew\tYork,\tGigafactory\tNew\tYork;\tin\tAustin,\tTexas,\nGigafactory\tTexas\tand\tnear\tReno,\tNevada,\tGigafactory\tNevada.\tAt\tthese\tfacilities,\twe\tmanufacture\tand\tassemble,\tamong\tother\tthings,\tvehicles,\tcertain\nvehicle\tparts\tand\tcomponents,\tsuch\tas\tour\tbattery\tpacks\tand\tbattery\tcells,\tenergy\tstorage\tcomponents\tand\tsolar\tproducts\tand\tcomponents.\nInternationally,\twe\talso\thave\tmanufacturing\tfacilities\tin\tChina\t(Gigafactory\tShanghai)\tand\tGermany\t(Gigafactory\tBerlin-Brandenburg),\twhich\tallows\nus\tto\tincrease\tthe\taffordability\tof\tour\tvehicles\tfor\tcustomers\tin\tlocal\tmarkets\tby\treducing\ttransportation\tand\tmanufacturing\tcosts\tand\teliminating\tthe\nimpact\tof\tunfavorable\ttariffs.\tIn\tMarch\t2023,\twe\tannounced\tthe\tlocation\tof\tour\tnext\tGigafactory\tin\tMonterrey,\tMexico.\tGenerally,\twe\tcontinue\tto\texpand\nproduction\tcapacity\tat\tour\texisting\tfacilities.\tWe\talso\tintend\tto\tfurther\tincrease\tcost-competitiveness\tin\tour\tsignificant\tmarkets\tby\tstrategically\tadding\nlocal\tmanufacturing.\nSupply\tChain\nOur\tproducts\tuse\tthousands\tof\tparts\tthat\tare\tsourced\tfrom\thundreds\tof\tsuppliers\tacross\tthe\tworld.\tWe\thave\tdeveloped\tclose\trelationships\twith\nvendors\tof\tkey\tparts\tsuch\tas\tbattery\tcells,\telectronics\tand\tcomplex\tvehicle\tassemblies.\tCertain\tcomponents\tpurchased\tfrom\tthese\tsuppliers\tare\tshared\tor\nare\tsimilar\tacross\tmany\tproduct\tlines,\tallowing\tus\tto\ttake\tadvantage\tof\tpricing\tefficiencies\tfrom\teconomies\tof\tscale.\n8", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 9, "lines": { "from": 21, "to": 38 } } } }, { "pageContent": "Table\tof\tContents\nAs\tis\tthe\tcase\tfor\tsome\tautomotive\tcompanies,\tsome\tof\tour\tprocured\tcomponents\tand\tsystems\tare\tsourced\tfrom\tsingle\tsuppliers.\tWhere\tmultiple\nsources\tare\tavailable\tfor\tcertain\tkey\tcomponents,\twe\twork\tto\tqualify\tmultiple\tsuppliers\tfor\tthem\twhere\tit\tis\tsensible\tto\tdo\tso\tin\torder\tto\tminimize\npotential\tproduction\trisks\tdue\tto\tdisruptions\tin\ttheir\tsupply.\tWe\talso\tmitigate\trisk\tby\tmaintaining\tsafety\tstock\tfor\tkey\tparts\tand\tassemblies\tand\tdie\tbanks\nfor\tcomponents\twith\tlengthy\tprocurement\tlead\ttimes.\nOur\tproducts\tuse\tvarious\traw\tmaterials\tincluding\taluminum,\tsteel,\tcobalt,\tlithium,\tnickel\tand\tcopper.\tPricing\tfor\tthese\tmaterials\tis\tgoverned\tby\nmarket\tconditions\tand\tmay\tfluctuate\tdue\tto\tvarious\tfactors\toutside\tof\tour\tcontrol,\tsuch\tas\tsupply\tand\tdemand\tand\tmarket\tspeculation.\tWe\tstrive\tto\nexecute\tlong-term\tsupply\tcontracts\tfor\tsuch\tmaterials\tat\tcompetitive\tpricing\twhen\tfeasible,\tand\twe\tcurrently\tbelieve\tthat\twe\thave\tadequate\taccess\tto\nraw\tmaterials\tsupplies\tto\tmeet\tthe\tneeds\tof\tour\toperations.\nGovernmental\tPrograms,\tIncentives\tand\tRegulations\nGlobally,\tthe\townership\tof\tour\tproducts\tby\tour\tcustomers\tis\timpacted\tby\tvarious\tgovernment\tcredits,\tincentives,\tand\tpolicies.\tOur\tbusiness\tand\nproducts\tare\talso\tsubject\tto\tnumerous\tgovernmental\tregulations\tthat\tvary\tamong\tjurisdictions.\nThe\toperation\tof\tour\tbusiness\tis\talso\timpacted\tby\tvarious\tgovernment\tprograms,\tincentives,\tand\tother\tarrangements.\tSee\tNote\t2,\tSummary\tof\nSignificant\tAccounting\tPolicies,\tto\tthe\tconsolidated\tfinancial\tstatements\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K\tfor\tfurther\tdetails.\nPrograms\tand\tIncentives\nInflation\tReduction\tAct\nOn\tAugust\t16,\t2022,\tthe\tInflation\tReduction\tAct\tof\t2022\t(“IRA”)\twas\tenacted\tinto\tlaw\tand\tis\teffective\tfor\ttaxable\tyears\tbeginning\tafter\tDecember\n31,\t2022,\tand\tremains\tsubject\tto\tfuture\tguidance\treleases.\tThe\tIRA\tincludes\tmultiple\tincentives\tto\tpromote\tclean\tenergy,\telectric\tvehicles,\tbattery\tand", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 10, "lines": { "from": 1, "to": 18 } } } }, { "pageContent": "energy\tstorage\tmanufacture\tor\tpurchase,\tincluding\tthrough\tproviding\ttax\tcredits\tto\tconsumers.\tFor\texample,\tqualifying\tTesla\tcustomers\tmay\treceive\tup\nto\t$7,500\tin\tfederal\ttax\tcredits\tfor\tthe\tpurchase\tof\tqualified\telectric\tvehicles\tin\tthe\tU.S.\tthrough\t2032.\nAutomotive\tRegulatory\tCredits\nWe\tearn\ttradable\tcredits\tin\tthe\toperation\tof\tour\tbusiness\tunder\tvarious\tregulations\trelated\tto\tzero-emission\tvehicles\t(“ZEVs”),\tgreenhouse\tgas,\tfuel\neconomy\tand\tclean\tfuel.\tWe\tsell\tthese\tcredits\tto\tother\tregulated\tentities\twho\tcan\tuse\tthe\tcredits\tto\tcomply\twith\temission\tstandards\tand\tother\tregulatory\nrequirements.\tSales\tof\tthese\tcredits\tare\trecognized\twithin\tautomotive\tregulatory\tcredits\trevenue\tin\tour\tconsolidated\tstatements\tof\toperations\tincluded\nelsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K.\nEnergy\tStorage\tSystem\tIncentives\tand\tPolicies\nWhile\tthe\tregulatory\tregime\tfor\tenergy\tstorage\tprojects\tis\tstill\tunder\tdevelopment,\tthere\tare\tvarious\tpolicies,\tincentives\tand\tfinancial\tmechanisms\nat\tthe\tfederal,\tstate\tand\tlocal\tlevels\tthat\tsupport\tthe\tadoption\tof\tenergy\tstorage.\nFor\texample,\tenergy\tstorage\tsystems\tthat\tare\tcharged\tusing\tsolar\tenergy\tmay\tbe\teligible\tfor\tthe\tsolar\tenergy-related\tU.S.\tfederal\ttax\tcredits\ndescribed\tbelow.\tThe\tFederal\tEnergy\tRegulatory\tCommission\t(“FERC”)\thas\talso\ttaken\tsteps\tto\tenable\tthe\tparticipation\tof\tenergy\tstorage\tin\twholesale\nenergy\tmarkets.\tIn\taddition,\tCalifornia\tand\ta\tnumber\tof\tother\tstates\thave\tadopted\tprocurement\ttargets\tfor\tenergy\tstorage,\tand\tbehind-the-meter\tenergy\nstorage\tsystems\tqualify\tfor\tfunding\tunder\tthe\tCalifornia\tSelf\tGeneration\tIncentive\tProgram.\tOur\tcustomers\tprimarily\tbenefit\tdirectly\tunder\tthese\nprograms.\tIn\tcertain\tinstances\tour\tcustomers\tmay\ttransfer\tsuch\tcredits\tto\tus\tas\tcontract\tconsideration.\tIn\tsuch\ttransactions,\tthey\tare\tincluded\tas\ta\ncomponent\tof\tenergy\tgeneration\tand\tstorage\trevenues\tin\tour\tconsolidated\tstatements\tof\toperations\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\n10-K.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 10, "lines": { "from": 19, "to": 35 } } } }, { "pageContent": "10-K.\nPursuant\tto\tthe\tIRA,\tunder\tSections\t48,\t48E\tand\t25D\tof\tthe\tInternal\tRevenue\tCode\t(”IRC”),\tstandalone\tenergy\tstorage\ttechnology\tis\teligible\tfor\ta\ttax\ncredit\tbetween\t6%\tand\t50%\tof\tqualified\texpenditures,\tregardless\tof\tthe\tsource\tof\tenergy,\twhich\tmay\tbe\tclaimed\tby\tour\tcustomers\tfor\tstorage\tsystems\nthey\tpurchase\tor\tby\tus\tfor\tarrangements\twhere\twe\town\tthe\tsystems.\tThese\ttax\tcredits\tare\tprimarily\tfor\tthe\tbenefit\tof\tour\tcustomers\tand\tare\tcurrently\nscheduled\tto\tphase-out\tstarting\tin\t2032\tor\tlater.\n9", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 10, "lines": { "from": 35, "to": 40 } } } }, { "pageContent": "Table\tof\tContents\nSolar\tEnergy\tSystem\tIncentives\tand\tPolicies\nU.S.\tfederal,\tstate\tand\tlocal\tgovernments\thave\testablished\tvarious\tpolicies,\tincentives\tand\tfinancial\tmechanisms\tto\treduce\tthe\tcost\tof\tsolar\tenergy\nand\tto\taccelerate\tthe\tadoption\tof\tsolar\tenergy.\tThese\tincentives\tinclude\ttax\tcredits,\tcash\tgrants,\ttax\tabatements\tand\trebates.\nIn\tparticular,\tpursuant\tto\tthe\tIRA,\tSections\t48,\t48E\tand\t25D\tof\tthe\tIRC\tprovides\ta\ttax\tcredit\tbetween\t6%\tand\t70%\tof\tqualified\tcommercial\tor\nresidential\texpenditures\tfor\tsolar\tenergy\tsystems,\twhich\tmay\tbe\tclaimed\tby\tour\tcustomers\tfor\tsystems\tthey\tpurchase,\tor\tby\tus\tfor\tarrangements\twhere\nwe\town\tthe\tsystems\tfor\tproperties\tthat\tmeet\tstatutory\trequirements.\tThese\ttax\tcredits\tare\tprimarily\tfor\tthe\tdirect\tbenefit\tof\tour\tcustomers\tand\tare\ncurrently\tscheduled\tto\tphase-out\tstarting\tin\t2032\tor\tlater.\nRegulations\nVehicle\tSafety\tand\tTesting\nIn\tthe\tU.S.,\tour\tvehicles\tare\tsubject\tto\tregulation\tby\tthe\tNational\tHighway\tTraffic\tSafety\tAdministration\t(“NHTSA”),\tincluding\tall\tapplicable\tFederal\nMotor\tVehicle\tSafety\tStandards\t(“FMVSS”)\tand\tthe\tNHTSA\tbumper\tstandard.\tNumerous\tFMVSS\tapply\tto\tour\tvehicles,\tsuch\tas\tcrash-worthiness\tand\noccupant\tprotection\trequirements.\tOur\tcurrent\tvehicles\tfully\tcomply\tand\twe\texpect\tthat\tour\tvehicles\tin\tthe\tfuture\twill\tfully\tcomply\twith\tall\tapplicable\nFMVSS\twith\tlimited\tor\tno\texemptions,\thowever,\tFMVSS\tare\tsubject\tto\tchange\tfrom\ttime\tto\ttime.\tAs\ta\tmanufacturer,\twe\tmust\tself-certify\tthat\tour\tvehicles\nmeet\tall\tapplicable\tFMVSS\tand\tthe\tNHTSA\tbumper\tstandard,\tor\totherwise\tare\texempt,\tbefore\tthe\tvehicles\tmay\tbe\timported\tor\tsold\tin\tthe\tU.S.\nWe\tare\talso\trequired\tto\tcomply\twith\tother\tfederal\tlaws\tadministered\tby\tNHTSA,\tincluding\tthe\tCorporate\tAverage\tFuel\tEconomy\tstandards,\tTheft\nPrevention\tAct\trequirements,\tlabeling\trequirements\tand\tother\tinformation\tprovided\tto\tcustomers\tin\twriting,\tEarly\tWarning\tReporting\trequirements", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 11, "lines": { "from": 1, "to": 17 } } } }, { "pageContent": "regarding\twarranty\tclaims,\tfield\treports,\tdeath\tand\tinjury\treports\tand\tforeign\trecalls,\ta\tStanding\tGeneral\tOrder\trequiring\treports\tregarding\tcrashes\ninvolving\tvehicles\tequipped\twith\tadvanced\tdriver\tassistance\tsystems,\tand\tadditional\trequirements\tfor\tcooperating\twith\tcompliance\tand\tsafety\ninvestigations\tand\trecall\treporting.\tThe\tU.S.\tAutomobile\tInformation\tand\tDisclosure\tAct\talso\trequires\tmanufacturers\tof\tmotor\tvehicles\tto\tdisclose\tcertain\ninformation\tregarding\tthe\tmanufacturer’s\tsuggested\tretail\tprice,\toptional\tequipment\tand\tpricing.\tIn\taddition,\tfederal\tlaw\trequires\tinclusion\tof\tfuel\neconomy\tratings,\tas\tdetermined\tby\tthe\tU.S.\tDepartment\tof\tTransportation\tand\tthe\tEnvironmental\tProtection\tAgency\t(the\t“EPA”),\tand\tNew\tCar\nAssessment\tProgram\tratings\tas\tdetermined\tby\tNHTSA,\tif\tavailable.\nOur\tvehicles\tsold\toutside\tof\tthe\tU.S.\tare\tsubject\tto\tsimilar\tforeign\tcompliance,\tsafety,\tenvironmental\tand\tother\tregulations.\tMany\tof\tthose\nregulations\tare\tdifferent\tfrom\tthose\tapplicable\tin\tthe\tU.S.\tand\tmay\trequire\tredesign\tand/or\tretesting.\tSome\tof\tthose\tregulations\timpact\tor\tprevent\tthe\nrollout\tof\tnew\tvehicle\tfeatures.\nSelf-Driving\tVehicles\nGenerally,\tlaws\tpertaining\tto\tself-driving\tvehicles\tare\tevolving\tglobally,\tand\tin\tsome\tcases\tmay\tcreate\trestrictions\ton\tfeatures\tor\tvehicle\tdesigns\nthat\twe\tdevelop.\tWhile\tthere\tare\tcurrently\tno\tfederal\tU.S.\tregulations\tpertaining\tspecifically\tto\tself-driving\tvehicles\tor\tself-driving\tequipment,\tNHTSA\thas\npublished\trecommended\tguidelines\ton\tself-driving\tvehicles,\tapart\tfrom\tthe\tFMVSS\tand\tmanufacturer\treporting\tobligations,\tand\tretains\tthe\tauthority\tto\ninvestigate\tand/or\ttake\taction\ton\tthe\tsafety\tor\tcompliance\tof\tany\tvehicle,\tequipment\tor\tfeatures\toperating\ton\tpublic\troads.\tCertain\tU.S.\tstates\talso\thave\nlegal\trestrictions\ton\tthe\toperation,\tregistration\tor\tlicensure\tof\tself-driving\tvehicles,\tand\tmany\tother\tstates\tare\tconsidering\tthem.\tThis\tregulatory\npatchwork\tincreases\tthe\tlegal\tcomplexity\twith\trespect\tto\tself-driving\tvehicles\tin\tthe\tU.S.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 11, "lines": { "from": 18, "to": 33 } } } }, { "pageContent": "In\tmarkets\tthat\tfollow\tthe\tregulations\tof\tthe\tUnited\tNations\tEconomic\tCommission\tfor\tEurope\t(“ECE\tmarkets”),\tsome\trequirements\trestrict\tthe\ndesign\tof\tadvanced\tdriver-assistance\tor\tself-driving\tfeatures,\twhich\tcan\tcompromise\tor\tprevent\ttheir\tuse\tentirely.\tOther\tapplicable\tlaws,\tboth\tcurrent\tand\nproposed,\tmay\thinder\tthe\tpath\tand\ttimeline\tto\tintroducing\tself-driving\tvehicles\tfor\tsale\tand\tuse\tin\tthe\tmarkets\twhere\tthey\tapply.\nOther\tkey\tmarkets,\tincluding\tChina,\tcontinue\tto\tconsider\tself-driving\tregulation.\tAny\timplemented\tregulations\tmay\tdiffer\tmaterially\tfrom\tthe\tU.S.\nand\tECE\tmarkets,\twhich\tmay\tfurther\tincrease\tthe\tlegal\tcomplexity\tof\tself-driving\tvehicles\tand\tlimit\tor\tprevent\tcertain\tfeatures.\n10", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 11, "lines": { "from": 34, "to": 39 } } } }, { "pageContent": "Table\tof\tContents\nAutomobile\tManufacturer\tand\tDealer\tRegulation\nIn\tthe\tU.S.,\tstate\tlaws\tregulate\tthe\tmanufacture,\tdistribution,\tsale\tand\tservice\tof\tautomobiles,\tand\tgenerally\trequire\tmotor\tvehicle\tmanufacturers\nand\tdealers\tto\tbe\tlicensed\tin\torder\tto\tsell\tvehicles\tdirectly\tto\tresidents.\tCertain\tstates\thave\tasserted\tthat\tthe\tlaws\tin\tsuch\tstates\tdo\tnot\tpermit\tautomobile\nmanufacturers\tto\tbe\tlicensed\tas\tdealers\tor\tto\tact\tin\tthe\tcapacity\tof\ta\tdealer,\tor\tthat\tthey\totherwise\trestrict\ta\tmanufacturer’s\tability\tto\tdeliver\tor\tperform\nwarranty\trepairs\ton\tvehicles.\tTo\tsell\tvehicles\tto\tresidents\tof\tstates\twhere\twe\tare\tnot\tlicensed\tas\ta\tdealer,\twe\tgenerally\tconduct\tthe\tsale\tout\tof\tthe\tstate.\nIn\tcertain\tsuch\tstates,\twe\thave\topened\t“galleries”\tthat\tserve\tan\teducational\tpurpose\tand\twhere\tsales\tmay\tnot\toccur.\nSome\tautomobile\tdealer\ttrade\tassociations\thave\tboth\tchallenged\tthe\tlegality\tof\tour\toperations\tin\tcourt\tand\tused\tadministrative\tand\tlegislative\nprocesses\tto\tattempt\tto\tprohibit\tor\tlimit\tour\tability\tto\toperate\texisting\tstores\tor\texpand\tto\tnew\tlocations.\tCertain\tdealer\tassociations\thave\talso\tactively\nlobbied\tstate\tlicensing\tagencies\tand\tlegislators\tto\tinterpret\texisting\tlaws\tor\tenact\tnew\tlaws\tin\tways\tnot\tfavorable\tto\tour\townership\tand\toperation\tof\tour\nown\tretail\tand\tservice\tlocations.\tWe\texpect\tsuch\tchallenges\tto\tcontinue,\tand\twe\tintend\tto\tactively\tfight\tany\tsuch\tefforts.\nBattery\tSafety\tand\tTesting\nOur\tbattery\tpacks\tare\tsubject\tto\tvarious\tU.S.\tand\tinternational\tregulations\tthat\tgovern\ttransport\tof\t“dangerous\tgoods,”\tdefined\tto\tinclude\tlithium-\nion\tbatteries,\twhich\tmay\tpresent\ta\trisk\tin\ttransportation.\tWe\tconduct\ttesting\tto\tdemonstrate\tour\tcompliance\twith\tsuch\tregulations.\nWe\tuse\tlithium-ion\tcells\tin\tour\thigh\tvoltage\tbattery\tpacks\tin\tour\tvehicles\tand\tenergy\tstorage\tproducts.\tThe\tuse,\tstorage\tand\tdisposal\tof\tour\tbattery\npacks\tare\tregulated\tunder\texisting\tlaws\tand\tare\tthe\tsubject\tof\tongoing\tregulatory\tchanges\tthat\tmay\tadd\tadditional\trequirements\tin\tthe\tfuture.\tWe\thave", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 12, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "agreements\twith\tthird\tparty\tbattery\trecycling\tcompanies\tto\trecycle\tour\tbattery\tpacks,\tand\twe\tare\talso\tpiloting\tour\town\trecycling\ttechnology.\nSolar\tEnergy—General\nWe\tare\tsubject\tto\tcertain\tstate\tand\tfederal\tregulations\tapplicable\tto\tsolar\tand\tbattery\tstorage\tproviders\tand\tsellers\tof\telectricity.\tTo\toperate\tour\nsystems,\twe\tenter\tinto\tstandard\tinterconnection\tagreements\twith\tapplicable\tutilities.\tSales\tof\telectricity\tand\tnon-sale\tequipment\tleases\tby\tthird\tparties,\nsuch\tas\tour\tleases\tand\tPPAs,\thave\tfaced\tregulatory\tchallenges\tin\tsome\tstates\tand\tjurisdictions.\nSolar\tEnergy—Net\tMetering\nMost\tstates\tin\tthe\tU.S.\tmake\tnet\tenergy\tmetering,\tor\tnet\tmetering,\tavailable\tto\tsolar\tcustomers.\tNet\tmetering\ttypically\tallows\tsolar\tcustomers\tto\ninterconnect\ttheir\tsolar\tenergy\tsystems\tto\tthe\tutility\tgrid\tand\toffset\ttheir\tutility\telectricity\tpurchases\tby\treceiving\ta\tbill\tcredit\tfor\texcess\tenergy\tgenerated\nby\ttheir\tsolar\tenergy\tsystem\tthat\tis\texported\tto\tthe\tgrid.\tIn\tcertain\tjurisdictions,\tregulators\tor\tutilities\thave\treduced\tor\teliminated\tthe\tbenefit\tavailable\nunder\tnet\tmetering\tor\thave\tproposed\tto\tdo\tso.\nCompetition\nAutomotive\nThe\tworldwide\tautomotive\tmarket\tis\thighly\tcompetitive\tand\twe\texpect\tit\twill\tbecome\teven\tmore\tcompetitive\tin\tthe\tfuture\tas\ta\tsignificant\tand\ngrowing\tnumber\tof\testablished\tand\tnew\tautomobile\tmanufacturers,\tas\twell\tas\tother\tcompanies,\thave\tentered,\tor\tare\treported\tto\thave\tplans\tto\tenter\tthe\nelectric\tvehicle\tmarket.\nWe\tbelieve\tthat\tour\tvehicles\tcompete\tin\tthe\tmarket\tbased\ton\tboth\ttheir\ttraditional\tsegment\tclassification\tas\twell\tas\ttheir\tpropulsion\ttechnology.\tFor\nexample,\tCybertruck\tcompetes\twith\tother\tpickup\ttrucks,\tModel\tS\tand\tModel\tX\tcompete\tprimarily\twith\tpremium\tsedans\tand\tpremium\tSUVs\tand\tModel\t3\nand\tModel\tY\tcompete\twith\tsmall\tto\tmedium-sized\tsedans\tand\tcompact\tSUVs,\twhich\tare\textremely\tcompetitive\tmarkets.\tCompeting\tproducts\ttypically", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 12, "lines": { "from": 17, "to": 34 } } } }, { "pageContent": "include\tinternal\tcombustion\tvehicles\tfrom\tmore\testablished\tautomobile\tmanufacturers;\thowever,\tmany\testablished\tand\tnew\tautomobile\tmanufacturers\nhave\tentered\tor\thave\tannounced\tplans\tto\tenter\tthe\tmarket\tfor\telectric\tand\tother\talternative\tfuel\tvehicles.\tOverall,\twe\tbelieve\tthese\tannouncements\tand\nvehicle\tintroductions,\tincluding\tthe\tintroduction\tof\telectric\tvehicles\tinto\trental\tcar\tcompany\tfleets,\tpromote\tthe\tdevelopment\tof\tthe\telectric\tvehicle\nmarket\tby\thighlighting\tthe\tattractiveness\tof\telectric\tvehicles\trelative\tto\tthe\tinternal\tcombustion\tvehicle.\tMany\tmajor\tautomobile\tmanufacturers\thave\nelectric\tvehicles\tavailable\ttoday\tin\tmajor\tmarkets\tincluding\tthe\tU.S.,\tChina\tand\tEurope,\tand\tother\tcurrent\tand\tprospective\tautomobile\tmanufacturers\tare\nalso\tdeveloping\telectric\tvehicles.\tIn\taddition,\tseveral\tmanufacturers\toffer\thybrid\tvehicles,\tincluding\tplug-in\tversions.\n11", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 12, "lines": { "from": 35, "to": 41 } } } }, { "pageContent": "Table\tof\tContents\nWe\tbelieve\tthat\tthere\tis\talso\tincreasing\tcompetition\tfor\tour\tvehicle\tofferings\tas\ta\tplatform\tfor\tdelivering\tself-driving\ttechnologies,\tcharging\tsolutions\nand\tother\tfeatures\tand\tservices,\tand\twe\texpect\tto\tcompete\tin\tthis\tdeveloping\tmarket\tthrough\tcontinued\tprogress\ton\tour\tAutopilot,\tFSD\tand\tneural\nnetwork\tcapabilities,\tSupercharger\tnetwork\tand\tour\tinfotainment\tofferings.\nEnergy\tGeneration\tand\tStorage\nEnergy\tStorage\tSystems\nThe\tmarket\tfor\tenergy\tstorage\tproducts\tis\talso\thighly\tcompetitive,\tand\tboth\testablished\tand\temerging\tcompanies\thave\tintroduced\tproducts\tthat\tare\nsimilar\tto\tour\tproduct\tportfolio\tor\tthat\tare\talternatives\tto\tthe\telements\tof\tour\tsystems.\tWe\tcompete\twith\tthese\tcompanies\tbased\ton\tprice,\tenergy\tdensity\nand\tefficiency.\tWe\tbelieve\tthat\tthe\tspecifications\tand\tfeatures\tof\tour\tproducts,\tour\tstrong\tbrand\tand\tthe\tmodular,\tscalable\tnature\tof\tour\tenergy\tstorage\nproducts\tgive\tus\ta\tcompetitive\tadvantage\tin\tour\tmarkets.\nSolar\tEnergy\tSystems\nThe\tprimary\tcompetitors\tto\tour\tsolar\tenergy\tbusiness\tare\tthe\ttraditional\tlocal\tutility\tcompanies\tthat\tsupply\tenergy\tto\tour\tpotential\tcustomers.\tWe\ncompete\twith\tthese\ttraditional\tutility\tcompanies\tprimarily\tbased\ton\tprice\tand\tthe\tease\tby\twhich\tcustomers\tcan\tswitch\tto\telectricity\tgenerated\tby\tour\nsolar\tenergy\tsystems.\tWe\talso\tcompete\twith\tsolar\tenergy\tcompanies\tthat\tprovide\tproducts\tand\tservices\tsimilar\tto\tours.\tMany\tsolar\tenergy\tcompanies\nonly\tinstall\tsolar\tenergy\tsystems,\twhile\tothers\tonly\tprovide\tfinancing\tfor\tthese\tinstallations.\tWe\tbelieve\twe\thave\ta\tsignificant\texpansion\topportunity\twith\nour\tofferings\tand\tthat\tthe\tregulatory\tenvironment\tis\tincreasingly\tconducive\tto\tthe\tadoption\tof\trenewable\tenergy\tsystems.\nIntellectual\tProperty\nWe\tplace\ta\tstrong\temphasis\ton\tour\tinnovative\tapproach\tand\tproprietary\tdesigns\twhich\tbring\tintrinsic\tvalue\tand\tuniqueness\tto\tour\tproduct\tportfolio.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 13, "lines": { "from": 1, "to": 18 } } } }, { "pageContent": "As\tpart\tof\tour\tbusiness,\twe\tseek\tto\tprotect\tthe\tunderlying\tintellectual\tproperty\trights\tof\tthese\tinnovations\tand\tdesigns\tsuch\tas\twith\trespect\tto\tpatents,\ntrademarks,\tcopyrights,\ttrade\tsecrets,\tconfidential\tinformation\tand\tother\tmeasures,\tincluding\tthrough\temployee\tand\tthird-party\tnondisclosure\nagreements\tand\tother\tcontractual\tarrangements.\tFor\texample,\twe\tplace\ta\thigh\tpriority\ton\tobtaining\tpatents\tto\tprovide\tthe\tbroadest\tand\tstrongest\npossible\tprotection\tto\tenable\tour\tfreedom\tto\toperate\tour\tinnovations\tand\tdesigns\tacross\tall\tof\tour\tproducts\tand\ttechnologies\tas\twell\tas\tto\tprotect\tand\ndefend\tour\tproduct\tportfolio.\tWe\thave\talso\tadopted\ta\tpatent\tpolicy\tin\twhich\twe\tirrevocably\tpledged\tthat\twe\twill\tnot\tinitiate\ta\tlawsuit\tagainst\tany\tparty\tfor\ninfringing\tour\tpatents\tthrough\tactivity\trelating\tto\telectric\tvehicles\tor\trelated\tequipment\tfor\tso\tlong\tas\tsuch\tparty\tis\tacting\tin\tgood\tfaith.\tWe\tmade\tthis\npledge\tin\torder\tto\tencourage\tthe\tadvancement\tof\ta\tcommon,\trapidly-evolving\tplatform\tfor\telectric\tvehicles,\tthereby\tbenefiting\tourselves,\tother\ncompanies\tmaking\telectric\tvehicles\tand\tthe\tworld.\nEnvironmental,\tSocial\tand\tGovernance\t(ESG)\tand\tHuman\tCapital\tResources\nESG\nThe\tvery\tpurpose\tof\tTesla's\texistence\tis\tto\taccelerate\tthe\tworld's\ttransition\tto\tsustainable\tenergy.\tWe\tbelieve\tthe\tworld\tcannot\treduce\tcarbon\nemissions\twithout\taddressing\tboth\tenergy\tgeneration\tand\tconsumption,\tand\twe\tare\tdesigning\tand\tmanufacturing\ta\tcomplete\tenergy\tand\ttransportation\necosystem\tto\tachieve\tthis\tgoal.\tAs\twe\texpand,\twe\tare\tbuilding\teach\tnew\tfactory\tto\tbe\tmore\tefficient\tand\tsustainably\tdesigned\tthan\tthe\tprevious\tone,\nincluding\twith\trespect\tto\tper-unit\twaste\treduction\tand\tresource\tconsumption,\tincluding\twater\tand\tenergy\tusage.\tWe\tare\tfocused\ton\tfurther\tenhancing\nsustainability\tof\toperations\toutside\tof\tour\tdirect\tcontrol,\tincluding\treducing\tthe\tcarbon\tfootprint\tof\tour\tsupply\tchain.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 13, "lines": { "from": 19, "to": 33 } } } }, { "pageContent": "We\tare\tcommitted\tto\tsourcing\tonly\tresponsibly\tproduced\tmaterials,\tand\tour\tsuppliers\tare\trequired\tto\tprovide\tevidence\tof\tmanagement\tsystems\tthat\nensure\tsocial,\tenvironmental\tand\tsustainability\tbest\tpractices\tin\ttheir\town\toperations,\tas\twell\tas\tto\tdemonstrate\ta\tcommitment\tto\tresponsible\tsourcing\ninto\ttheir\tsupply\tchains.\tWe\thave\ta\tzero-tolerance\tpolicy\twhen\tit\tcomes\tto\tchild\tor\tforced\tlabor\tand\thuman\ttrafficking\tby\tour\tsuppliers\tand\twe\tlook\tto\tthe\nOrganization\tfor\tEconomic\tCo-operation\tand\tDevelopment\tDue\tDiligence\tGuidelines\tto\tinform\tour\tprocess\tand\tuse\tfeedback\tfrom\tour\tinternal\tand\nexternal\tstakeholders\tto\tfind\tways\tto\tcontinually\timprove.\tWe\tare\talso\tdriving\tsafety\tin\tour\town\tfactories\tby\tfocusing\ton\tworker\tengagement.\tOur\nincidents\tper\tvehicle\tcontinue\tto\tdrop\teven\tas\tour\tproduction\tvolumes\tincrease.\tWe\talso\tstrive\tto\tbe\tan\temployer\tof\tchoice\tby\toffering\tcompelling,\nimpactful\tjobs\twith\tbest\tin-industry\tbenefits.\n12", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 13, "lines": { "from": 34, "to": 41 } } } }, { "pageContent": "Table\tof\tContents\nWe\tbelieve\tthat\tsound\tcorporate\tgovernance\tis\tcritical\tto\thelping\tus\tachieve\tour\tgoals,\tincluding\twith\trespect\tto\tESG.\tWe\tcontinue\tto\tevolve\ta\ngovernance\tframework\tthat\texercises\tappropriate\toversight\tof\tresponsibilities\tat\tall\tlevels\tthroughout\tthe\tcompany\tand\tmanages\tits\taffairs\tconsistent\nwith\thigh\tprinciples\tof\tbusiness\tethics.\tOur\tESG\tSustainability\tCouncil\tis\tmade\tup\tof\tleaders\tfrom\tacross\tour\tcompany,\tand\tregularly\tpresents\tto\tour\tBoard\nof\tDirectors,\twhich\toversees\tour\tESG\timpacts,\tinitiatives\tand\tpriorities.\nHuman\tCapital\tResources\nA\tcompetitive\tedge\tfor\tTesla\tis\tits\tability\tto\tattract\tand\tretain\thigh\tquality\temployees.\tDuring\tthe\tpast\tyear,\tTesla\tmade\tsubstantial\tinvestments\tin\nits\tworkforce,\tfurther\tstrengthening\tits\tstanding\tas\tone\tof\tthe\tmost\tdesirable\tand\tinnovative\tcompanies\tto\twork\tfor.\tAs\tof\tDecember\t31,\t2023,\tour\nemployee\theadcount\tworldwide\twas\t140,473.\nWe\thave\tcreated\tan\tenvironment\tthat\tfosters\tgrowth\topportunities,\tand\tas\tof\tthis\treport,\tnearly\ttwo-thirds\t(65%)\tof\tour\tmanagers\twere\tpromoted\nfrom\tan\tinternal,\tnon-manager\tposition,\tand\t43%\tof\tour\tmanagement\temployees\thave\tbeen\twith\tTesla\tfor\tmore\tthan\tfive\tyears.\tTesla’s\tgrowth\tof\t35%\nover\tthe\tpast\ttwo\tyears\thas\toffered\tinternal\tcareer\tdevelopment\tto\tour\temployees\tas\twell\tas\tthe\tability\tto\tmake\ta\tmeaningful\tcontribution\tto\ta\nsustainable\tfuture.\nWe\tare\table\tto\tretain\tour\temployees,\tin\tpart,\tnot\tonly\tbecause\temployees\tcan\tenjoy\townership\tin\tTesla\tthrough\tstock\t(of\twhich\t89%\thave\tbeen\ngiven\tthe\topportunity\tto),\tbut\tbecause\twe\talso\tprovide\tthem\twith\texcellent\thealth\tbenefits\tsuch\tas\tfree\tcounseling,\tpaid\tparental\tleave,\tpaid\ttime\toff\tand\nzero-premium\tmedical\tplan\toptions\tthat\tare\tmade\tavailable\ton\tthe\tfirst\tday\tof\temployment.\nWe\trecognize\tthe\tpositive\timpact\tthat\tleaders\tcan\thave\ton\ttheir\tteams\tand\toffer\tfundamental\tskills\ttraining\tand\tcontinuous\tdevelopment\tto\tall\nleaders\tthrough\tvarious\tprograms\tglobally.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 14, "lines": { "from": 1, "to": 18 } } } }, { "pageContent": "leaders\tthrough\tvarious\tprograms\tglobally.\nWe\tdon’t\tstop\tthere.\tTesla\thas\tseveral\tother\tprograms\tstrategically\tdesigned\tto\tincrease\tpaths\tfor\tgreater\tcareer\topportunity\tsuch\tas:\n•Technician\tTrainee\t(Service)\t– The\tTesla\tTechnician\tTrainee\tProgram\tprovides\ton-the-job\tautomotive\tmaintenance\ttraining\tat\tTesla,\nresulting\tin\tan\tindustry\tcertification.\tTargeted\tat\tindividuals\twith\tlimited\texperience,\twhether\tin\tindustry\tor\tvocational\tschools,\tthe\tprogram\nprepares\ttrainees\tfor\temployment\tas\ttechnicians.\tIn\t2023,\twe\thired\tover\t1,900\tTechnician\tTrainees\tacross\tthe\tU.S.,\tGermany\tand\tChina.\n•START\t(Manufacturing\tand\tService)\t–\tTesla\tSTART\tis\tan\tintensive\ttraining\tprogram\tthat\tcomplements\tthe\tTechnician\tTrainee\tprogram\tand\nequips\tindividuals\twith\tthe\tskills\tneeded\tfor\ta\tsuccessful\ttechnician\trole\tat\tTesla.\tWe\thave\tpartnered\twith\tcolleges\tand\ttechnical\tacademies\tto\nlaunch\tTesla\tSTART\tin\tthe\tU.S.,\tUnited\tKingdom\tand\tGermany.\tIn\t2023,\twe\thired\tover\t350\ttrainees\tfor\tmanufacturing\tand\tservice\troles\tthrough\nthis\tprogram,\tproviding\tan\topportunity\tto\ttransition\tinto\tfull-time\temployment.\n•Internships\t–\tAnnually,\tTesla\thires\tover\t6,000\tuniversity\tand\tcollege\tstudents\tfrom\taround\tthe\tworld.\tWe\trecruit\tfrom\tdiverse\tstudent\norganizations\tand\tcampuses,\tseeking\ttop\ttalent\tpassionate\tabout\tour\tmission.\tOur\tinterns\tengage\tin\tmeaningful\twork\tfrom\tday\tone,\tand\twe\noften\toffer\tthem\tfull-time\tpositions\tpost-internship.\n•Military\tFellowship\tand\tTransition\tPrograms\t– The\tMilitary\tFellowship\tand\tTransition\tPrograms\tare\tdesigned\tto\toffer\texiting\tmilitary\tservice\nmembers\tin\tthe\tU.S.\tand\tEurope\twith\tcareer\tguidance\ton\ttransitioning\tinto\tthe\tcivil\tworkforce.\tWe\tpartner\twith\tthe\tcareer\ttransition\tservices\tof\nEuropean\tDefence\tMinistries\tacross\tfive\tcountries,\tas\twell\tas\tthe\tU.S.\tChamber\tof\tCommerce’s\tHire\tour\tHeroes.\tThese\tprograms\taim\tto\tconvert\nhigh-performing\tindividuals\tto\tfull-time\troles\tand\tcreate\ta\tveteran\ttalent\tpipeline.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 14, "lines": { "from": 18, "to": 33 } } } }, { "pageContent": "•Apprenticeships\t–\tTesla\tApprenticeships\tare\toffered\tglobally,\tproviding\tacademic\tand\ton-the-job\ttraining\tto\tprepare\tspecialists\tin\tskilled\ntrades.\tApprentices\twill\tcomplete\tbetween\tone\tto\tfour\tyears\tof\ton-the-job\ttraining.\tApprentice\tprograms\thave\tseen\tskilled\ttrade\thires\tacross\tthe\nU.S.,\tAustralia,\tHong\tKong,\tKorea\tand\tGermany.\n•Manufacturing\tDevelopment\tProgram\t– Tesla's\tmanufacturing\tpathway\tprogram\tis\tdesigned\tto\tprovide\tgraduating\thigh\tschool\tseniors\twith\nthe\tfinancial\tresources,\tcoursework\tand\texperience\tthey\tneed\tto\tstart\ta\tsuccessful\tmanufacturing\tcareer\tat\tTesla.\tWe\thired\t373\tgraduates\nthrough\tthis\tprogram\tin\t2023,\tand\tour\tgoal\tin\t2024\tis\tgrow\tthis\tprogram\tto\tover\t600\tstudents\tannually\tacross\tour\tFremont\tFactory,\tGigafactory\nNevada,\tGigafactory\tTexas\tand\tGigafactory\tNew\tYork.\n13", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 14, "lines": { "from": 34, "to": 41 } } } }, { "pageContent": "Table\tof\tContents\n•Engineering\tDevelopment\tProgram\t– Launched\tin\tJanuary\t2024,\tthis\tprogram\ttargets\trecent\tcollege\tand\tuniversity\tgraduates\tfor\tspecialized\nengineering\tfields.\tIn\tcollaboration\twith\tAustin\tCommunity\tCollege,\tthe\tprogram\teducates\tearly-career\tengineers\tin\tcontrols\tengineering,\nenhancing\ttheir\tknowledge\tof\thigh-demand\ttechnologies\tfor\tU.S.\tmanufacturing.\nWe\twill\tcontinue\tto\texpand\tthe\topportunities\tfor\tour\temployees\tto\tadd\tskills\tand\tdevelop\tprofessionally\twith\ta\tnew\tEmployee\tEducational\tAssistance\nProgram\tlaunching\tin\tthe\tU.S.\tin\tthe\tspring\tof\t2024\tto\thelp\temployees\tpursue\tselect\tcertificates\tor\tdegrees.\tWith\tvirtual,\tself-paced\teducation\toptions\navailable,\temployees\tcan\tpursue\ta\tnew\tpath\tor\texpand\ttheir\tknowledge\twhile\tcontinuing\tto\tgrow\ttheir\tcareer.\nAt\tTesla,\tour\temployees\tshow\tup\tpassionate\tabout\tmaking\ta\tdifference\tin\tthe\tworld\tand\tfor\teach\tother.\tWe\tremain\tunwavering\tin\tour\tdemand\tthat\nour\tfactories,\toffices,\tstores\tand\tservice\tcenters\tare\tplaces\twhere\tour\temployees\tfeel\trespected\tand\tappreciated.\tOur\tpolicies\tare\tdesigned\tto\tpromote\nfairness\tand\trespect\tfor\teveryone.\tWe\thire,\tevaluate\tand\tpromote\temployees\tbased\ton\ttheir\tskills\tand\tperformance.\tEveryone\tis\texpected\tto\tbe\ntrustworthy,\tdemonstrate\texcellence\tin\ttheir\tperformance\tand\tcollaborate\twith\tothers.\tWith\tthis\tin\tmind,\twe\twill\tnot\ttolerate\tcertain\tbehaviors.\tThese\ninclude\tharassment,\tretaliation,\tviolence,\tintimidation\tand\tdiscrimination\tof\tany\tkind\ton\tthe\tbasis\tof\trace,\tcolor,\treligion,\tnational\torigin,\tgender,\tsexual\norientation,\tgender\tidentity,\tgender\texpression,\tage,\tdisability\tor\tveteran\tstatus.\nAnti-harassment\ttraining\tis\tconducted\ton\tday\tone\tof\tnew\thire\torientation\tfor\tall\temployees\tand\treoccurring\tfor\tleaders.\tIn\taddition,\twe\trun\tvarious\nleadership\tdevelopment\tprograms\tthroughout\tthe\tyear\taimed\tat\tenhancing\tleaders’\tskills,\tand\tin\tparticular,\thelping\tthem\tto\tunderstand\thow\tto\nappropriately\trespond\tto\tand\taddress\temployee\tconcerns.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 15, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "Employees\tare\tencouraged\tto\tspeak\tup\tboth\tin\tregard\tto\tmisconduct\tand\tsafety\tconcerns\tand\tcan\tdo\tso\tby\tcontacting\tthe\tintegrity\tline,\tsubmitting\nconcerns\tthrough\tour\tTake\tCharge\tprocess,\tor\tnotifying\ttheir\tHuman\tResource\tPartner\tor\tany\tmember\tof\tmanagement.\tConcerns\tare\treviewed\tin\naccordance\twith\testablished\tprotocols\tby\tinvestigators\twith\texpertise,\twho\talso\treview\tfor\ttrends\tand\toutcomes\tfor\tremediation\tand\tappropriate\tcontrols.\nResponding\tto\tquestions\ttimely\tis\tkey\tso\tHuman\tResource\tPartners\tfor\teach\tfunctional\tarea\tare\tvisible\tthroughout\tfacilities\tand\tare\tactively\tinvolved\tin\ndriving\tculture\tand\tengagement\talongside\tbusiness\tleaders.\nAvailable\tInformation\nWe\tfile\tor\tfurnish\tperiodic\treports\tand\tamendments\tthereto,\tincluding\tour\tAnnual\tReports\ton\tForm\t10-K,\tour\tQuarterly\tReports\ton\tForm\t10-Q\tand\nCurrent\tReports\ton\tForm\t8-K,\tproxy\tstatements\tand\tother\tinformation\twith\tthe\tSEC.\tIn\taddition,\tthe\tSEC\tmaintains\ta\twebsite\t(www.sec.gov)\tthat\tcontains\nreports,\tproxy\tand\tinformation\tstatements,\tand\tother\tinformation\tregarding\tissuers\tthat\tfile\telectronically.\tOur\twebsite\tis\tlocated\tat\twww.tesla.com,\tand\nour\treports,\tamendments\tthereto,\tproxy\tstatements\tand\tother\tinformation\tare\talso\tmade\tavailable,\tfree\tof\tcharge,\ton\tour\tinvestor\trelations\twebsite\tat\nir.tesla.com\tas\tsoon\tas\treasonably\tpracticable\tafter\twe\telectronically\tfile\tor\tfurnish\tsuch\tinformation\twith\tthe\tSEC.\tThe\tinformation\tposted\ton\tour\twebsite\nis\tnot\tincorporated\tby\treference\tinto\tthis\tAnnual\tReport\ton\tForm\t10-K.\nITEM\t1A.\tRISK\tFACTORS\nYou\tshould\tcarefully\tconsider\tthe\trisks\tdescribed\tbelow\ttogether\twith\tthe\tother\tinformation\tset\tforth\tin\tthis\treport,\twhich\tcould\tmaterially\taffect\tour\nbusiness,\tfinancial\tcondition\tand\tfuture\tresults.\tThe\trisks\tdescribed\tbelow\tare\tnot\tthe\tonly\trisks\tfacing\tour\tcompany.\tRisks\tand\tuncertainties\tnot\tcurrently\nknown\tto\tus\tor\tthat\twe\tcurrently\tdeem\tto\tbe\timmaterial\talso\tmay\tmaterially\tadversely\taffect\tour\tbusiness,\tfinancial\tcondition\tand\toperating\tresults.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 15, "lines": { "from": 17, "to": 32 } } } }, { "pageContent": "Risks\tRelated\tto\tOur\tAbility\tto\tGrow\tOur\tBusiness\nWe\tmay\texperience\tdelays\tin\tlaunching\tand\tramping\tthe\tproduction\tof\tour\tproducts\tand\tfeatures,\tor\twe\tmay\tbe\tunable\tto\tcontrol\nour\tmanufacturing\tcosts.\nWe\thave\tpreviously\texperienced\tand\tmay\tin\tthe\tfuture\texperience\tlaunch\tand\tproduction\tramp\tdelays\tfor\tnew\tproducts\tand\tfeatures.\tFor\texample,\nwe\tencountered\tunanticipated\tsupplier\tissues\tthat\tled\tto\tdelays\tduring\tthe\tinitial\tramp\tof\tour\tfirst\tModel\tX\tand\texperienced\tchallenges\twith\ta\tsupplier\tand\nwith\tramping\tfull\tautomation\tfor\tcertain\tof\tour\tinitial\tModel\t3\tmanufacturing\tprocesses.\tIn\taddition,\twe\tmay\tintroduce\tin\tthe\tfuture\tnew\tor\tunique\nmanufacturing\tprocesses\tand\tdesign\tfeatures\tfor\tour\tproducts.\tAs\twe\texpand\tour\tvehicle\tofferings\tand\tglobal\tfootprint,\tthere\tis\tno\tguarantee\tthat\twe\twill\nbe\table\tto\tsuccessfully\tand\ttimely\tintroduce\tand\tscale\tsuch\tprocesses\tor\tfeatures.\n14", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 15, "lines": { "from": 33, "to": 41 } } } }, { "pageContent": "Table\tof\tContents\nIn\tparticular,\tour\tfuture\tbusiness\tdepends\tin\tlarge\tpart\ton\tincreasing\tthe\tproduction\tof\tmass-market\tvehicles.\tIn\torder\tto\tbe\tsuccessful,\twe\twill\tneed\nto\timplement,\tmaintain\tand\tramp\tefficient\tand\tcost-effective\tmanufacturing\tcapabilities,\tprocesses\tand\tsupply\tchains\tand\tachieve\tthe\tdesign\ttolerances,\nhigh\tquality\tand\toutput\trates\twe\thave\tplanned\tat\tour\tmanufacturing\tfacilities\tin\tCalifornia,\tNevada,\tTexas,\tChina,\tGermany\tand\tany\tfuture\tsites\tsuch\tas\nMexico.\tWe\twill\talso\tneed\tto\thire,\ttrain\tand\tcompensate\tskilled\temployees\tto\toperate\tthese\tfacilities.\tBottlenecks\tand\tother\tunexpected\tchallenges\tsuch\nas\tthose\twe\texperienced\tin\tthe\tpast\tmay\tarise\tduring\tour\tproduction\tramps,\tand\twe\tmust\taddress\tthem\tpromptly\twhile\tcontinuing\tto\timprove\nmanufacturing\tprocesses\tand\treducing\tcosts.\tIf\twe\tare\tnot\tsuccessful\tin\tachieving\tthese\tgoals,\twe\tcould\tface\tdelays\tin\testablishing\tand/or\tsustaining\tour\nproduct\tramps\tor\tbe\tunable\tto\tmeet\tour\trelated\tcost\tand\tprofitability\ttargets.\nWe\thave\texperienced,\tand\tmay\talso\texperience\tsimilar\tfuture\tdelays\tin\tlaunching\tand/or\tramping\tproduction\tof\tour\tenergy\tstorage\tproducts\tand\nSolar\tRoof;\tnew\tproduct\tversions\tor\tvariants;\tnew\tvehicles;\tand\tfuture\tfeatures\tand\tservices\tbased\ton\tartificial\tintelligence.\tLikewise,\twe\tmay\tencounter\ndelays\twith\tthe\tdesign,\tconstruction\tand\tregulatory\tor\tother\tapprovals\tnecessary\tto\tbuild\tand\tbring\tonline\tfuture\tmanufacturing\tfacilities\tand\tproducts.\nAny\tdelay\tor\tother\tcomplication\tin\tramping\tthe\tproduction\tof\tour\tcurrent\tproducts\tor\tthe\tdevelopment,\tmanufacture,\tlaunch\tand\tproduction\tramp\tof\nour\tfuture\tproducts,\tfeatures\tand\tservices,\tor\tin\tdoing\tso\tcost-effectively\tand\twith\thigh\tquality,\tmay\tharm\tour\tbrand,\tbusiness,\tprospects,\tfinancial\ncondition\tand\toperating\tresults.\nOur\tsuppliers\tmay\tfail\tto\tdeliver\tcomponents\taccording\tto\tschedules,\tprices,\tquality\tand\tvolumes\tthat\tare\tacceptable\tto\tus,\tor\twe\nmay\tbe\tunable\tto\tmanage\tthese\tcomponents\teffectively.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 16, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "Our\tproducts\tcontain\tthousands\tof\tparts\tpurchased\tglobally\tfrom\thundreds\tof\tsuppliers,\tincluding\tsingle-source\tdirect\tsuppliers,\twhich\texposes\tus\tto\nmultiple\tpotential\tsources\tof\tcomponent\tshortages.\tUnexpected\tchanges\tin\tbusiness\tconditions,\tmaterials\tpricing,\tincluding\tinflation\tof\traw\tmaterial\ncosts,\tlabor\tissues,\twars,\ttrade\tpolicies,\tnatural\tdisasters,\thealth\tepidemics\tsuch\tas\tthe\tglobal\tCOVID-19\tpandemic,\ttrade\tand\tshipping\tdisruptions,\tport\ncongestions,\tcyberattacks\tand\tother\tfactors\tbeyond\tour\tor\tour\tsuppliers’\tcontrol\tcould\talso\taffect\tthese\tsuppliers’\tability\tto\tdeliver\tcomponents\tto\tus\tor\tto\nremain\tsolvent\tand\toperational.\tFor\texample,\ta\tglobal\tshortage\tof\tsemiconductors\tbeginning\tin\tearly\t2021\thas\tcaused\tchallenges\tin\tthe\tmanufacturing\nindustry\tand\timpacted\tour\tsupply\tchain\tand\tproduction.\tAdditionally,\tif\tour\tsuppliers\tdo\tnot\taccurately\tforecast\tand\teffectively\tallocate\tproduction\tor\tif\nthey\tare\tnot\twilling\tto\tallocate\tsufficient\tproduction\tto\tus,\tor\tface\tother\tchallenges\tsuch\tas\tinsolvency,\tit\tmay\treduce\tour\taccess\tto\tcomponents\tand\nrequire\tus\tto\tsearch\tfor\tnew\tsuppliers.\tThe\tunavailability\tof\tany\tcomponent\tor\tsupplier\tcould\tresult\tin\tproduction\tdelays,\tidle\tmanufacturing\tfacilities,\nproduct\tdesign\tchanges\tand\tloss\tof\taccess\tto\timportant\ttechnology\tand\ttools\tfor\tproducing\tand\tsupporting\tour\tproducts,\tas\twell\tas\timpact\tour\tcapacity\nexpansion\tand\tour\tability\tto\tfulfill\tour\tobligations\tunder\tcustomer\tcontracts.\tMoreover,\tsignificant\tincreases\tin\tour\tproduction\tor\tproduct\tdesign\tchanges\nby\tus\thave\trequired\tand\tmay\tin\tthe\tfuture\trequire\tus\tto\tprocure\tadditional\tcomponents\tin\ta\tshort\tamount\tof\ttime.\tWe\thave\tfaced\tin\tthe\tpast,\tand\tmay\nface\tsuppliers\twho\tare\tunwilling\tor\tunable\tto\tsustainably\tmeet\tour\ttimelines\tor\tour\tcost,\tquality\tand\tvolume\tneeds,\twhich\tmay\tincrease\tour\tcosts\tor\nrequire\tus\tto\treplace\tthem\twith\tother\tsources.\tFinally,\tas\twe\tconstruct\tnew\tmanufacturing\tfacilities\tand\tadd\tproduction\tlines\tto\texisting\tfacilities,\twe\tmay", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 16, "lines": { "from": 17, "to": 29 } } } }, { "pageContent": "experience\tissues\tin\tcorrespondingly\tincreasing\tthe\tlevel\tof\tlocalized\tprocurement\tat\tthose\tfacilities.\tWhile\twe\tbelieve\tthat\twe\twill\tbe\table\tto\tsecure\nadditional\tor\talternate\tsources\tor\tdevelop\tour\town\treplacements\tfor\tmost\tof\tour\tcomponents,\tthere\tis\tno\tassurance\tthat\twe\twill\tbe\table\tto\tdo\tso\tquickly\nor\tat\tall.\tAdditionally,\twe\tmay\tbe\tunsuccessful\tin\tour\tcontinuous\tefforts\tto\tnegotiate\twith\texisting\tsuppliers\tto\tobtain\tcost\treductions\tand\tavoid\nunfavorable\tchanges\tto\tterms,\tsource\tless\texpensive\tsuppliers\tfor\tcertain\tparts\tand\tredesign\tcertain\tparts\tto\tmake\tthem\tless\texpensive\tto\tproduce,\nespecially\tin\tthe\tcase\tof\tincreases\tin\tmaterials\tpricing.\tAny\tof\tthese\toccurrences\tmay\tharm\tour\tbusiness,\tprospects,\tfinancial\tcondition\tand\toperating\nresults.\nAs\tthe\tscale\tof\tour\tvehicle\tproduction\tincreases,\twe\twill\talso\tneed\tto\taccurately\tforecast,\tpurchase,\twarehouse\tand\ttransport\tcomponents\tat\thigh\nvolumes\tto\tour\tmanufacturing\tfacilities\tand\tservicing\tlocations\tinternationally.\tIf\twe\tare\tunable\tto\taccurately\tmatch\tthe\ttiming\tand\tquantities\tof\ncomponent\tpurchases\tto\tour\tactual\tneeds\tor\tsuccessfully\timplement\tautomation,\tinventory\tmanagement\tand\tother\tsystems\tto\taccommodate\tthe\nincreased\tcomplexity\tin\tour\tsupply\tchain\tand\tparts\tmanagement,\twe\tmay\tincur\tunexpected\tproduction\tdisruption,\tstorage,\ttransportation\tand\twrite-off\ncosts,\twhich\tmay\tharm\tour\tbusiness\tand\toperating\tresults.\nWe\tmay\tbe\tunable\tto\tmeet\tour\tprojected\tconstruction\ttimelines,\tcosts\tand\tproduction\tramps\tat\tnew\tfactories,\tor\twe\tmay\nexperience\tdifficulties\tin\tgenerating\tand\tmaintaining\tdemand\tfor\tproducts\tmanufactured\tthere.\nOur\tability\tto\tincrease\tproduction\tof\tour\tvehicles\ton\ta\tsustained\tbasis,\tmake\tthem\taffordable\tglobally\tby\taccessing\tlocal\tsupply\tchains\tand\nworkforces\tand\tstreamline\tdelivery\tlogistics\tis\tdependent\ton\tthe\tconstruction\tand\tramp\tof\tour\tcurrent\tand\tfuture\tfactories.\tThe\tconstruction\tof\tand\ncommencement\tand\tramp\tof\tproduction\tat\tthese\tfactories\tare\tsubject\n15", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 16, "lines": { "from": 30, "to": 46 } } } }, { "pageContent": "Table\tof\tContents\nto\ta\tnumber\tof\tuncertainties\tinherent\tin\tall\tnew\tmanufacturing\toperations,\tincluding\tongoing\tcompliance\twith\tregulatory\trequirements,\tprocurement\tand\nmaintenance\tof\tconstruction,\tenvironmental\tand\toperational\tlicenses\tand\tapprovals\tfor\tadditional\texpansion,\tsupply\tchain\tconstraints,\thiring,\ttraining\tand\nretention\tof\tqualified\temployees\tand\tthe\tpace\tof\tbringing\tproduction\tequipment\tand\tprocesses\tonline\twith\tthe\tcapability\tto\tmanufacture\thigh-quality\nunits\tat\tscale.\tMoreover,\twe\twill\thave\tto\testablish\tand\tramp\tproduction\tof\tour\tproprietary\tbattery\tcells\tand\tpacks\tat\tour\tnew\tfactories,\tand\twe\tadditionally\nintend\tto\tincorporate\tsequential\tdesign\tand\tmanufacturing\tchanges\tinto\tvehicles\tmanufactured\tat\teach\tnew\tfactory.\tIf\twe\texperience\tany\tissues\tor\tdelays\nin\tmeeting\tour\tprojected\ttimelines,\tcosts,\tcapital\tefficiency\tand\tproduction\tcapacity\tfor\tour\tnew\tfactories,\texpanding\tand\tmanaging\tteams\tto\timplement\niterative\tdesign\tand\tproduction\tchanges\tthere,\tmaintaining\tand\tcomplying\twith\tthe\tterms\tof\tany\tdebt\tfinancing\tthat\twe\tobtain\tto\tfund\tthem\tor\tgenerating\nand\tmaintaining\tdemand\tfor\tthe\tvehicles\twe\tmanufacture\tthere,\tour\tbusiness,\tprospects,\toperating\tresults\tand\tfinancial\tcondition\tmay\tbe\tharmed.\nWe\tmay\tbe\tunable\tto\tgrow\tour\tglobal\tproduct\tsales,\tdelivery\tand\tinstallation\tcapabilities\tand\tour\tservicing\tand\tvehicle\tcharging\nnetworks,\tor\twe\tmay\tbe\tunable\tto\taccurately\tproject\tand\teffectively\tmanage\tour\tgrowth.\nOur\tsuccess\twill\tdepend\ton\tour\tability\tto\tcontinue\tto\texpand\tour\tsales\tcapabilities.\tWe\tare\ttargeting\ta\tglobal\tmass\tdemographic\twith\ta\tbroad\trange\nof\tpotential\tcustomers,\tin\twhich\twe\thave\trelatively\tlimited\texperience\tprojecting\tdemand\tand\tpricing\tour\tproducts.\tWe\tcurrently\tproduce\tnumerous\ninternational\tvariants\tat\ta\tlimited\tnumber\tof\tfactories,\tand\tif\tour\tspecific\tdemand\texpectations\tfor\tthese\tvariants\tprove\tinaccurate,\twe\tmay\tnot\tbe\table\tto", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 17, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "timely\tgenerate\tdeliveries\tmatched\tto\tthe\tvehicles\tthat\twe\tproduce\tin\tthe\tsame\ttimeframe\tor\tthat\tare\tcommensurate\twith\tthe\tsize\tof\tour\toperations\tin\ta\ngiven\tregion.\tLikewise,\tas\twe\tdevelop\tand\tgrow\tour\tenergy\tproducts\tand\tservices\tworldwide,\tour\tsuccess\twill\tdepend\ton\tour\tability\tto\tcorrectly\tforecast\ndemand\tin\tvarious\tmarkets.\nBecause\twe\tdo\tnot\thave\tindependent\tdealer\tnetworks,\twe\tare\tresponsible\tfor\tdelivering\tall\tof\tour\tvehicles\tto\tour\tcustomers.\tAs\tour\tproduction\nvolumes\tcontinue\tto\tgrow,\twe\thave\tfaced\tin\tthe\tpast,\tand\tmay\tface\tchallenges\twith\tdeliveries\tat\tincreasing\tvolumes,\tparticularly\tin\tinternational\tmarkets\nrequiring\tsignificant\ttransit\ttimes.\tWe\thave\talso\tdeployed\ta\tnumber\tof\tdelivery\tmodels,\tsuch\tas\tdeliveries\tto\tcustomers’\thomes\tand\tworkplaces\tand\ntouchless\tdeliveries,\tbut\tthere\tis\tno\tguarantee\tthat\tsuch\tmodels\twill\tbe\tscalable\tor\tbe\taccepted\tglobally.\tLikewise,\tas\twe\tramp\tour\tenergy\tproducts,\twe\nare\tworking\tto\tsubstantially\tincrease\tour\tproduction\tand\tinstallation\tcapabilities.\tIf\twe\texperience\tproduction\tdelays\tor\tinaccurately\tforecast\tdemand,\tour\nbusiness,\tfinancial\tcondition\tand\toperating\tresults\tmay\tbe\tharmed.\nMoreover,\tbecause\tof\tour\tunique\texpertise\twith\tour\tvehicles,\twe\trecommend\tthat\tour\tvehicles\tbe\tserviced\tby\tus\tor\tby\tcertain\tauthorized\nprofessionals.\tIf\twe\texperience\tdelays\tin\tadding\tservicing\tcapacity\tor\tservicing\tour\tvehicles\tefficiently,\tor\texperience\tunforeseen\tissues\twith\tthe\treliability\nof\tour\tvehicles,\tparticularly\thigher-volume\tadditions\tto\tour\tfleet\tsuch\tas\tModel\t3\tand\tModel\tY,\tit\tcould\toverburden\tour\tservicing\tcapabilities\tand\tparts\ninventory.\tSimilarly,\tthe\tincreasing\tnumber\tof\tTesla\tvehicles\talso\trequires\tus\tto\tcontinue\tto\trapidly\tincrease\tthe\tnumber\tof\tour\tSupercharger\tstations\tand\nconnectors\tthroughout\tthe\tworld.\nThere\tis\tno\tassurance\tthat\twe\twill\tbe\table\tto\tramp\tour\tbusiness\tto\tmeet\tour\tsales,\tdelivery,\tinstallation,\tservicing\tand\tvehicle\tcharging\ttargets", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 17, "lines": { "from": 15, "to": 29 } } } }, { "pageContent": "globally,\tthat\tour\tprojections\ton\twhich\tsuch\ttargets\tare\tbased\twill\tprove\taccurate\tor\tthat\tthe\tpace\tof\tgrowth\tor\tcoverage\tof\tour\tcustomer\tinfrastructure\nnetwork\twill\tmeet\tcustomer\texpectations.\tThese\tplans\trequire\tsignificant\tcash\tinvestments\tand\tmanagement\tresources\tand\tthere\tis\tno\tguarantee\tthat\nthey\twill\tgenerate\tadditional\tsales\tor\tinstallations\tof\tour\tproducts,\tor\tthat\twe\twill\tbe\table\tto\tavoid\tcost\toverruns\tor\tbe\table\tto\thire\tadditional\tpersonnel\tto\nsupport\tthem.\tAs\twe\texpand,\twe\twill\talso\tneed\tto\tensure\tour\tcompliance\twith\tregulatory\trequirements\tin\tvarious\tjurisdictions\tapplicable\tto\tthe\tsale,\ninstallation\tand\tservicing\tof\tour\tproducts,\tthe\tsale\tor\tdispatch\tof\telectricity\trelated\tto\tour\tenergy\tproducts\tand\tthe\toperation\tof\tSuperchargers.\tIf\twe\tfail\tto\nmanage\tour\tgrowth\teffectively,\tit\tmay\tharm\tour\tbrand,\tbusiness,\tprospects,\tfinancial\tcondition\tand\toperating\tresults.\nWe\twill\tneed\tto\tmaintain\tand\tsignificantly\tgrow\tour\taccess\tto\tbattery\tcells,\tincluding\tthrough\tthe\tdevelopment\tand\tmanufacture\tof\nour\town\tcells,\tand\tcontrol\tour\trelated\tcosts.\nWe\tare\tdependent\ton\tthe\tcontinued\tsupply\tof\tlithium-ion\tbattery\tcells\tfor\tour\tvehicles\tand\tenergy\tstorage\tproducts,\tand\twe\twill\trequire\tsubstantially\nmore\tcells\tto\tgrow\tour\tbusiness\taccording\tto\tour\tplans.\tCurrently,\twe\trely\ton\tsuppliers\tsuch\tas\tPanasonic\tand\tContemporary\tAmperex\tTechnology\tCo.\nLimited\t(CATL)\tfor\tthese\tcells.\tWe\thave\tto\tdate\tfully\tqualified\tonly\ta\tvery\tlimited\tnumber\tof\tsuch\tsuppliers\tand\thave\tlimited\tflexibility\tin\tchanging\nsuppliers.\tAny\tdisruption\tin\tthe\tsupply\tof\tbattery\tcells\tfrom\tour\tsuppliers\tcould\tlimit\tproduction\tof\tour\tvehicles\tand\tenergy\tstorage\tproducts.\tIn\tthe\tlong\nterm,\twe\tintend\tto\tsupplement\tcells\tfrom\tour\tsuppliers\twith\tcells\tmanufactured\tby\tus,\twhich\twe\tbelieve\twill\tbe\tmore\tefficient,\tmanufacturable\tat\tgreater\nvolumes\tand\tmore\tcost-effective\tthan\tcurrently\tavailable\tcells.\tHowever,\tour\tefforts\tto\tdevelop\tand\tmanufacture\tsuch\tbattery\tcells\thave\trequired,\tand", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 17, "lines": { "from": 30, "to": 43 } } } }, { "pageContent": "may\tcontinue\tto\trequire,\tsignificant\tinvestments,\tand\tthere\tcan\tbe\tno\tassurance\tthat\twe\twill\tbe\table\tto\tachieve\tthese\ttargets\tin\tthe\ttimeframes\tthat\twe\nhave\tplanned\tor\tat\tall.\tIf\twe\tare\n16", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 17, "lines": { "from": 44, "to": 46 } } } }, { "pageContent": "Table\tof\tContents\nunable\tto\tdo\tso,\twe\tmay\thave\tto\tcurtail\tour\tplanned\tvehicle\tand\tenergy\tstorage\tproduct\tproduction\tor\tprocure\tadditional\tcells\tfrom\tsuppliers\tat\npotentially\tgreater\tcosts,\teither\tof\twhich\tmay\tharm\tour\tbusiness\tand\toperating\tresults.\nIn\taddition,\tthe\tcost\tand\tmass\tproduction\tof\tbattery\tcells,\twhether\tmanufactured\tby\tour\tsuppliers\tor\tby\tus,\tdepends\tin\tpart\tupon\tthe\tprices\tand\navailability\tof\traw\tmaterials\tsuch\tas\tlithium,\tnickel,\tcobalt\tand/or\tother\tmetals.\tThe\tprices\tfor\tthese\tmaterials\tfluctuate\tand\ttheir\tavailable\tsupply\tmay\tbe\nunstable,\tdepending\ton\tmarket\tconditions\tand\tglobal\tdemand\tfor\tthese\tmaterials.\tFor\texample,\tas\ta\tresult\tof\tincreased\tglobal\tproduction\tof\telectric\nvehicles\tand\tenergy\tstorage\tproducts,\tsuppliers\tof\tthese\traw\tmaterials\tmay\tbe\tunable\tto\tmeet\tour\tvolume\tneeds.\tAdditionally,\tour\tsuppliers\tmay\tnot\tbe\nwilling\tor\table\tto\treliably\tmeet\tour\ttimelines\tor\tour\tcost\tand\tquality\tneeds,\twhich\tmay\trequire\tus\tto\treplace\tthem\twith\tother\tsources.\tAny\treduced\navailability\tof\tthese\tmaterials\tmay\timpact\tour\taccess\tto\tcells\tand\tour\tgrowth,\tand\tany\tincreases\tin\ttheir\tprices\tmay\treduce\tour\tprofitability\tif\twe\tcannot\nrecoup\tsuch\tcosts\tthrough\tincreased\tprices.\tMoreover,\tour\tinability\tto\tmeet\tdemand\tand\tany\tproduct\tprice\tincreases\tmay\tharm\tour\tbrand,\tgrowth,\nprospects\tand\toperating\tresults.\nOur\tfuture\tgrowth\tand\tsuccess\tare\tdependent\tupon\tconsumers’\tdemand\tfor\telectric\tvehicles\tand\tspecifically\tour\tvehicles\tin\tan\nautomotive\tindustry\tthat\tis\tgenerally\tcompetitive,\tcyclical\tand\tvolatile.\nThough\twe\tcontinue\tto\tsee\tincreased\tinterest\tand\tadoption\tof\telectric\tvehicles,\tif\tthe\tmarket\tfor\telectric\tvehicles\tin\tgeneral\tand\tTesla\tvehicles\tin\nparticular\tdoes\tnot\tdevelop\tas\twe\texpect,\tdevelops\tmore\tslowly\tthan\twe\texpect,\tor\tif\tdemand\tfor\tour\tvehicles\tdecreases\tin\tour\tmarkets\tor\tour\tvehicles\ncompete\twith\teach\tother,\tour\tbusiness,\tprospects,\tfinancial\tcondition\tand\toperating\tresults\tmay\tbe\tharmed.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 18, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "In\taddition,\telectric\tvehicles\tstill\tconstitute\ta\tsmall\tpercentage\tof\toverall\tvehicle\tsales.\tAs\ta\tresult,\tthe\tmarket\tfor\tour\tvehicles\tcould\tbe\tnegatively\naffected\tby\tnumerous\tfactors,\tsuch\tas:\n•perceptions\tabout\telectric\tvehicle\tfeatures,\tquality,\tsafety,\tperformance\tand\tcost;\n•perceptions\tabout\tthe\tlimited\trange\tover\twhich\telectric\tvehicles\tmay\tbe\tdriven\ton\ta\tsingle\tbattery\tcharge,\tand\taccess\tto\tcharging\tfacilities;\n•competition,\tincluding\tfrom\tother\ttypes\tof\talternative\tfuel\tvehicles,\tplug-in\thybrid\telectric\tvehicles\tand\thigh\tfuel-economy\tinternal\tcombustion\nengine\tvehicles;\n•volatility\tin\tthe\tcost\tof\toil,\tgasoline\tand\tenergy;\n•government\tregulations\tand\teconomic\tincentives\tand\tconditions;\tand\n•concerns\tabout\tour\tfuture\tviability.\nThe\ttarget\tdemographics\tfor\tour\tvehicles\tare\thighly\tcompetitive.\tSales\tof\tvehicles\tin\tthe\tautomotive\tindustry\ttend\tto\tbe\tcyclical\tin\tmany\tmarkets,\nwhich\tmay\texpose\tus\tto\tfurther\tvolatility.\tWe\talso\tcannot\tpredict\tthe\tduration\tor\tdirection\tof\tcurrent\tglobal\ttrends\tor\ttheir\tsustained\timpact\ton\tconsumer\ndemand.\tUltimately,\twe\tcontinue\tto\tmonitor\tmacroeconomic\tconditions\tto\tremain\tflexible\tand\tto\toptimize\tand\tevolve\tour\tbusiness\tas\tappropriate,\tand\nattempt\tto\taccurately\tproject\tdemand\tand\tinfrastructure\trequirements\tglobally\tand\tdeploy\tour\tproduction,\tworkforce\tand\tother\tresources\taccordingly.\nRising\tinterest\trates\tmay\tlead\tto\tconsumers\tto\tincreasingly\tpull\tback\tspending,\tincluding\ton\tour\tproducts,\twhich\tmay\tharm\tour\tdemand,\tbusiness\tand\noperating\tresults.\tIf\twe\texperience\tunfavorable\tglobal\tmarket\tconditions,\tor\tif\twe\tcannot\tor\tdo\tnot\tmaintain\toperations\tat\ta\tscope\tthat\tis\tcommensurate\nwith\tsuch\tconditions\tor\tare\tlater\trequired\tto\tor\tchoose\tto\tsuspend\tsuch\toperations\tagain,\tour\tbusiness,\tprospects,\tfinancial\tcondition\tand\toperating\tresults\nmay\tbe\tharmed.\nWe\tface\tstrong\tcompetition\tfor\tour\tproducts\tand\tservices\tfrom\ta\tgrowing\tlist\tof\testablished\tand\tnew\tcompetitors.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 18, "lines": { "from": 17, "to": 34 } } } }, { "pageContent": "The\tworldwide\tautomotive\tmarket\tis\thighly\tcompetitive\ttoday\tand\twe\texpect\tit\twill\tbecome\teven\tmore\tso\tin\tthe\tfuture.\tA\tsignificant\tand\tgrowing\nnumber\tof\testablished\tand\tnew\tautomobile\tmanufacturers,\tas\twell\tas\tother\tcompanies,\thave\tentered,\tor\tare\treported\tto\thave\tplans\tto\tenter,\tthe\tmarket\nfor\telectric\tand\tother\talternative\tfuel\tvehicles,\tincluding\thybrid,\tplug-in\thybrid\tand\tfully\telectric\tvehicles,\tas\twell\tas\tthe\tmarket\tfor\tself-driving\ttechnology\nand\tother\tvehicle\tapplications\tand\tsoftware\tplatforms.\tIn\tsome\tcases,\tour\tcompetitors\toffer\tor\twill\toffer\telectric\tvehicles\tin\timportant\tmarkets\tsuch\tas\nChina\tand\tEurope,\tand/or\thave\tannounced\tan\tintention\tto\tproduce\telectric\tvehicles\texclusively\tat\tsome\tpoint\tin\tthe\tfuture.\tIn\taddition,\tcertain\ngovernment\tand\teconomic\tincentives\twhich\tprovide\tbenefits\tto\tmanufacturers\twho\tassemble\tdomestically\tor\thave\tlocal\tsuppliers,\tmay\tprovide\ta\tgreater\nbenefit\tto\tour\tcompetitors,\twhich\tcould\tnegatively\timpact\tour\tprofitability.\tMany\tof\tour\tcompetitors\thave\tsignificantly\tmore\tor\tbetter-established\nresources\tthan\twe\tdo\tto\tdevote\tto\tthe\tdesign,\tdevelopment,\tmanufacturing,\tdistribution,\tpromotion,\tsale\tand\tsupport\tof\ttheir\tproducts.\tIncreased\ncompetition\tcould\tresult\tin\tour\tlower\tvehicle\tunit\tsales,\tprice\treductions,\trevenue\tshortfalls,\tloss\tof\tcustomers\tand\tloss\tof\tmarket\tshare,\twhich\tmay\tharm\nour\tbusiness,\tfinancial\tcondition\tand\toperating\tresults.\n17", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 18, "lines": { "from": 35, "to": 45 } } } }, { "pageContent": "Table\tof\tContents\nWe\talso\tface\tcompetition\tin\tour\tenergy\tgeneration\tand\tstorage\tbusiness\tfrom\tother\tmanufacturers,\tdevelopers,\tinstallers\tand\tservice\tproviders\tof\ncompeting\tenergy\ttechnologies,\tas\twell\tas\tfrom\tlarge\tutilities.\tDecreases\tin\tthe\tretail\tor\twholesale\tprices\tof\telectricity\tfrom\tutilities\tor\tother\trenewable\nenergy\tsources\tcould\tmake\tour\tproducts\tless\tattractive\tto\tcustomers\tand\tlead\tto\tan\tincreased\trate\tof\tcustomer\tdefaults.\nRisks\tRelated\tto\tOur\tOperations\nWe\tmay\texperience\tissues\twith\tlithium-ion\tcells\tor\tother\tcomponents\tmanufactured\tat\tour\tGigafactories,\twhich\tmay\tharm\tthe\nproduction\tand\tprofitability\tof\tour\tvehicle\tand\tenergy\tstorage\tproducts.\nOur\tplan\tto\tgrow\tthe\tvolume\tand\tprofitability\tof\tour\tvehicles\tand\tenergy\tstorage\tproducts\tdepends\ton\tsignificant\tlithium-ion\tbattery\tcell\tproduction,\nincluding\tby\tour\tpartner\tPanasonic\tat\tGigafactory\tNevada.\tWe\talso\tproduce\tseveral\tvehicle\tcomponents\tat\tour\tGigafactories,\tsuch\tas\tbattery\tmodules\tand\npacks\tand\tdrive\tunits,\tand\tmanufacture\tenergy\tstorage\tproducts.\tIf\twe\tare\tunable\tto\tor\totherwise\tdo\tnot\tmaintain\tand\tgrow\tour\trespective\toperations,\tor\nif\twe\tare\tunable\tto\tdo\tso\tcost-effectively\tor\thire\tand\tretain\thighly-skilled\tpersonnel\tthere,\tour\tability\tto\tmanufacture\tour\tproducts\tprofitably\twould\tbe\nlimited,\twhich\tmay\tharm\tour\tbusiness\tand\toperating\tresults.\nFinally,\tthe\thigh\tvolumes\tof\tlithium-ion\tcells\tand\tbattery\tmodules\tand\tpacks\tmanufactured\tby\tus\tand\tby\tour\tsuppliers\tare\tstored\tand\trecycled\tat\tour\nvarious\tfacilities.\tAny\tmishandling\tof\tthese\tproducts\tmay\tcause\tdisruption\tto\tthe\toperation\tof\tsuch\tfacilities.\tWhile\twe\thave\timplemented\tsafety\nprocedures\trelated\tto\tthe\thandling\tof\tthe\tcells,\tthere\tcan\tbe\tno\tassurance\tthat\ta\tsafety\tissue\tor\tfire\trelated\tto\tthe\tcells\twould\tnot\tdisrupt\tour\toperations.\nAny\tsuch\tdisruptions\tor\tissues\tmay\tharm\tour\tbrand\tand\tbusiness.\nWe\tface\trisks\tassociated\twith\tmaintaining\tand\texpanding\tour\tinternational\toperations,\tincluding\tunfavorable\tand\tuncertain", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 19, "lines": { "from": 1, "to": 17 } } } }, { "pageContent": "regulatory,\tpolitical,\teconomic,\ttax\tand\tlabor\tconditions.\nWe\tare\tsubject\tto\tlegal\tand\tregulatory\trequirements,\tpolitical\tuncertainty\tand\tsocial,\tenvironmental\tand\teconomic\tconditions\tin\tnumerous\njurisdictions,\tincluding\tmarkets\tin\twhich\twe\tgenerate\tsignificant\tsales,\tover\twhich\twe\thave\tlittle\tcontrol\tand\twhich\tare\tinherently\tunpredictable.\tOur\noperations\tin\tsuch\tjurisdictions,\tparticularly\tas\ta\tcompany\tbased\tin\tthe\tU.S.,\tcreate\trisks\trelating\tto\tconforming\tour\tproducts\tto\tregulatory\tand\tsafety\nrequirements\tand\tcharging\tand\tother\telectric\tinfrastructures;\torganizing\tlocal\toperating\tentities;\testablishing,\tstaffing\tand\tmanaging\tforeign\tbusiness\nlocations;\tattracting\tlocal\tcustomers;\tnavigating\tforeign\tgovernment\ttaxes,\tregulations\tand\tpermit\trequirements;\tenforceability\tof\tour\tcontractual\trights;\ntrade\trestrictions,\tcustoms\tregulations,\ttariffs\tand\tprice\tor\texchange\tcontrols;\tand\tpreferences\tin\tforeign\tnations\tfor\tdomestically\tmanufactured\tproducts.\nFor\texample,\twe\tmonitor\ttax\tlegislation\tchanges\ton\ta\tglobal\tbasis,\tincluding\tchanges\tarising\tas\ta\tresult\tof\tthe\tOrganization\tfor\tEconomic\tCooperation\tand\nDevelopment’s\tmulti-jurisdictional\tplan\tof\taction\tto\taddress\tbase\terosion\tand\tprofit\tshifting.\tSuch\tconditions\tmay\tincrease\tour\tcosts,\timpact\tour\tability\tto\nsell\tour\tproducts\tand\trequire\tsignificant\tmanagement\tattention,\tand\tmay\tharm\tour\tbusiness\tif\twe\tare\tunable\tto\tmanage\tthem\teffectively.\nOur\tbusiness\tmay\tsuffer\tif\tour\tproducts\tor\tfeatures\tcontain\tdefects,\tfail\tto\tperform\tas\texpected\tor\ttake\tlonger\tthan\texpected\tto\nbecome\tfully\tfunctional.\nIf\tour\tproducts\tcontain\tdesign\tor\tmanufacturing\tdefects,\twhether\trelating\tto\tour\tsoftware\tor\thardware,\tthat\tcause\tthem\tnot\tto\tperform\tas\tdesigned\nor\tintended\tor\tthat\trequire\trepair,\tor\tcertain\tfeatures\tof\tour\tvehicles\tsuch\tas\tnew\tAutopilot\tor\tFSD\tCapability\tfeatures\ttake\tlonger\tthan\texpected\tto", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 19, "lines": { "from": 18, "to": 31 } } } }, { "pageContent": "become\tenabled,\tare\tlegally\trestricted\tor\tbecome\tsubject\tto\tonerous\tregulation,\tour\tability\tto\tdevelop,\tmarket\tand\tsell\tour\tproducts\tand\tservices\tmay\tbe\nharmed,\tand\twe\tmay\texperience\tdelivery\tdelays,\tproduct\trecalls,\tallegations\tof\tproduct\tliability,\tbreach\tof\twarranty\tand\trelated\tconsumer\tprotection\nclaims\tand\tsignificant\twarranty\tand\tother\texpenses.\tWhile\twe\tare\tcontinuously\tworking\tto\tdevelop\tand\timprove\tour\tproducts’\tcapability\tand\tperformance,\nthere\tis\tno\tguarantee\tthat\tany\tincremental\tchanges\tin\tthe\tspecific\tsoftware\tor\tequipment\twe\tdeploy\tin\tour\tvehicles\tover\ttime\twill\tnot\tresult\tin\tinitial\nfunctional\tdisparities\tfrom\tprior\titerations\tor\twill\tperform\tas\tforecast\tin\tthe\ttimeframe\twe\tanticipate,\tor\tat\tall.\tAlthough\twe\tattempt\tto\tremedy\tany\tissues\nwe\tobserve\tin\tour\tproducts\tas\teffectively\tand\trapidly\tas\tpossible,\tsuch\tefforts\tmay\tnot\tbe\ttimely,\tmay\thamper\tproduction\tor\tmay\tnot\tcompletely\tsatisfy\nour\tcustomers.\tWe\thave\tperformed,\tand\tcontinue\tto\tperform,\textensive\tinternal\ttesting\ton\tour\tproducts\tand\tfeatures,\tthough,\tlike\tthe\trest\tof\tthe\tindustry,\nwe\tcurrently\thave\ta\tlimited\tframe\tof\treference\tby\twhich\tto\tevaluate\tcertain\taspects\tof\ttheir\tlong-term\tquality,\treliability,\tdurability\tand\tperformance\ncharacteristics,\tincluding\texposure\tto\tor\tconsequence\tof\texternal\tattacks.\tWhile\twe\tattempt\tto\tidentify\tand\taddress\tor\tremedy\tdefects\twe\tidentify\tpre-\nproduction\tand\tsale,\tthere\tmay\tbe\tlatent\tdefects\tthat\twe\tmay\tbe\tunable\tto\tdetect\tor\tcontrol\tfor\tin\tour\tproducts,\tand\tthereby\taddress,\tprior\tto\ttheir\tsale\tto\nor\tinstallation\tfor\tcustomers.\n18", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 19, "lines": { "from": 32, "to": 43 } } } }, { "pageContent": "Table\tof\tContents\nWe\tmay\tbe\trequired\tto\tdefend\tor\tinsure\tagainst\tproduct\tliability\tclaims.\nThe\tautomobile\tindustry\tgenerally\texperiences\tsignificant\tproduct\tliability\tclaims,\tand\tas\tsuch\twe\tface\tthe\trisk\tof\tsuch\tclaims\tin\tthe\tevent\tour\nvehicles\tdo\tnot\tperform\tor\tare\tclaimed\tto\tnot\thave\tperformed\tas\texpected.\tAs\tis\ttrue\tfor\tother\tautomakers,\tour\tvehicles\thave\tbeen\tinvolved\tand\twe\nexpect\tin\tthe\tfuture\twill\tbe\tinvolved\tin\taccidents\tresulting\tin\tdeath\tor\tpersonal\tinjury,\tand\tsuch\taccidents\twhere\tAutopilot,\tEnhanced\tAutopilot\tor\tFSD\nCapability\tfeatures\tare\tengaged\tare\tthe\tsubject\tof\tsignificant\tpublic\tattention,\tespecially\tin\tlight\tof\tNHTSA’s\tStanding\tGeneral\tOrder\trequiring\treports\nregarding\tcrashes\tinvolving\tvehicles\twith\tadvanced\tdriver\tassistance\tsystems.\tWe\thave\texperienced,\tand\twe\texpect\tto\tcontinue\tto\tface,\tclaims\tand\nregulatory\tscrutiny\tarising\tfrom\tor\trelated\tto\tmisuse\tor\tclaimed\tfailures\tor\talleged\tmisrepresentations\tof\tsuch\tnew\ttechnologies\tthat\twe\tare\tpioneering.\tIn\naddition,\tthe\tbattery\tpacks\tthat\twe\tproduce\tmake\tuse\tof\tlithium-ion\tcells.\tOn\trare\toccasions,\tlithium-ion\tcells\tcan\trapidly\trelease\tthe\tenergy\tthey\tcontain\nby\tventing\tsmoke\tand\tflames\tin\ta\tmanner\tthat\tcan\tignite\tnearby\tmaterials\tas\twell\tas\tother\tlithium-ion\tcells.\tWhile\twe\thave\tdesigned\tour\tbattery\tpacks\tto\npassively\tcontain\tany\tsingle\tcell’s\trelease\tof\tenergy\twithout\tspreading\tto\tneighboring\tcells,\tthere\tcan\tbe\tno\tassurance\tthat\ta\tfield\tor\ttesting\tfailure\tof\tour\nvehicles\tor\tother\tbattery\tpacks\tthat\twe\tproduce\twill\tnot\toccur,\tin\tparticular\tdue\tto\ta\thigh-speed\tcrash.\tLikewise,\tas\tour\tsolar\tenergy\tsystems\tand\tenergy\nstorage\tproducts\tgenerate\tand\tstore\telectricity,\tthey\thave\tthe\tpotential\tto\tfail\tor\tcause\tinjury\tto\tpeople\tor\tproperty.\tAny\tproduct\tliability\tclaim\tmay\nsubject\tus\tto\tlawsuits\tand\tsubstantial\tmonetary\tdamages,\tproduct\trecalls\tor\tredesign\tefforts,\tand\teven\ta\tmeritless\tclaim\tmay\trequire\tus\tto\tdefend\tit,\tall\tof", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 20, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "which\tmay\tgenerate\tnegative\tpublicity\tand\tbe\texpensive\tand\ttime-consuming.\tIn\tmost\tjurisdictions,\twe\tgenerally\tself-insure\tagainst\tthe\trisk\tof\tproduct\nliability\tclaims\tfor\tvehicle\texposure,\tmeaning\tthat\tany\tproduct\tliability\tclaims\twill\tlikely\thave\tto\tbe\tpaid\tfrom\tcompany\tfunds\tand\tnot\tby\tinsurance.\nWe\twill\tneed\tto\tmaintain\tpublic\tcredibility\tand\tconfidence\tin\tour\tlong-term\tbusiness\tprospects\tin\torder\tto\tsucceed.\nIn\torder\tto\tmaintain\tand\tgrow\tour\tbusiness,\twe\tmust\tmaintain\tcredibility\tand\tconfidence\tamong\tcustomers,\tsuppliers,\tanalysts,\tinvestors,\tratings\nagencies\tand\tother\tparties\tin\tour\tlong-term\tfinancial\tviability\tand\tbusiness\tprospects.\tMaintaining\tsuch\tconfidence\tmay\tbe\tchallenging\tdue\tto\tour\tlimited\noperating\thistory\trelative\tto\testablished\tcompetitors;\tcustomer\tunfamiliarity\twith\tour\tproducts;\tany\tdelays\twe\tmay\texperience\tin\tscaling\tmanufacturing,\ndelivery\tand\tservice\toperations\tto\tmeet\tdemand;\tcompetition\tand\tuncertainty\tregarding\tthe\tfuture\tof\telectric\tvehicles\tor\tour\tother\tproducts\tand\tservices;\nour\tquarterly\tproduction\tand\tsales\tperformance\tcompared\twith\tmarket\texpectations;\tand\tother\tfactors\tincluding\tthose\tover\twhich\twe\thave\tno\tcontrol.\tIn\nparticular,\tTesla’s\tproducts,\tbusiness,\tresults\tof\toperations,\tand\tstatements\tand\tactions\tof\tTesla\tand\tits\tmanagement\tare\tsubject\tto\tsignificant\tamounts\tof\ncommentary\tby\ta\trange\tof\tthird\tparties.\tSuch\tattention\tcan\tinclude\tcriticism,\twhich\tmay\tbe\texaggerated\tor\tunfounded,\tsuch\tas\tspeculation\tregarding\tthe\nsufficiency\tor\tstability\tof\tour\tmanagement\tteam.\tAny\tsuch\tnegative\tperceptions,\twhether\tcaused\tby\tus\tor\tnot,\tmay\tharm\tour\tbusiness\tand\tmake\tit\tmore\ndifficult\tto\traise\tadditional\tfunds\tif\tneeded.\nWe\tmay\tbe\tunable\tto\teffectively\tgrow,\tor\tmanage\tthe\tcompliance,\tresidual\tvalue,\tfinancing\tand\tcredit\trisks\trelated\tto,\tour\tvarious\nfinancing\tprograms.\nWe\toffer\tfinancing\tarrangements\tfor\tour\tvehicles\tin\tNorth\tAmerica,\tEurope\tand\tAsia\tprimarily\tourselves\tand\tthrough\tvarious\tfinancial\tinstitutions.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 20, "lines": { "from": 15, "to": 29 } } } }, { "pageContent": "We\talso\tcurrently\toffer\tvehicle\tfinancing\tarrangements\tdirectly\tthrough\tour\tlocal\tsubsidiaries\tin\tcertain\tmarkets.\tDepending\ton\tthe\tcountry,\tsuch\narrangements\tare\tavailable\tfor\tspecified\tmodels\tand\tmay\tinclude\toperating\tleases\tdirectly\twith\tus\tunder\twhich\twe\ttypically\treceive\tonly\ta\tvery\tsmall\nportion\tof\tthe\ttotal\tvehicle\tpurchase\tprice\tat\tthe\ttime\tof\tlease,\tfollowed\tby\ta\tstream\tof\tpayments\tover\tthe\tterm\tof\tthe\tlease.\tWe\thave\talso\toffered\tvarious\narrangements\tfor\tcustomers\tof\tour\tsolar\tenergy\tsystems\twhereby\tthey\tpay\tus\ta\tfixed\tpayment\tto\tlease\tor\tfinance\tthe\tpurchase\tof\tsuch\tsystems\tor\npurchase\telectricity\tgenerated\tby\tthem.\tIf\twe\tdo\tnot\tsuccessfully\tmonitor\tand\tcomply\twith\tapplicable\tnational,\tstate\tand/or\tlocal\tfinancial\tregulations\tand\nconsumer\tprotection\tlaws\tgoverning\tthese\ttransactions,\twe\tmay\tbecome\tsubject\tto\tenforcement\tactions\tor\tpenalties.\nThe\tprofitability\tof\tany\tdirectly-leased\tvehicles\treturned\tto\tus\tat\tthe\tend\tof\ttheir\tleases\tdepends\ton\tour\tability\tto\taccurately\tproject\tour\tvehicles’\nresidual\tvalues\tat\tthe\toutset\tof\tthe\tleases,\tand\tsuch\tvalues\tmay\tfluctuate\tprior\tto\tthe\tend\tof\ttheir\tterms\tdepending\ton\tvarious\tfactors\tsuch\tas\tsupply\tand\ndemand\tof\tour\tused\tvehicles,\teconomic\tcycles\tand\tthe\tpricing\tof\tnew\tvehicles.\tWe\thave\tmade\tin\tthe\tpast\tand\tmay\tmake\tin\tthe\tfuture\tcertain\tadjustments\nto\tour\tprices\tfrom\ttime\tto\ttime\tin\tthe\tordinary\tcourse\tof\tbusiness,\twhich\tmay\timpact\tthe\tresidual\tvalues\tof\tour\tvehicles\tand\treduce\tthe\tprofitability\tof\tour\nvehicle\tleasing\tprogram.\tThe\tfunding\tand\tgrowth\tof\tthis\tprogram\talso\trely\ton\tour\tability\tto\tsecure\tadequate\tfinancing\tand/or\tbusiness\tpartners.\tIf\twe\tare\nunable\tto\tadequately\tfund\tour\tleasing\tprogram\tthrough\tinternal\tfunds,\tpartners\tor\tother\tfinancing\tsources,\tand\tcompelling\talternative\tfinancing\tprograms\nare\tnot\tavailable\tfor\tour\tcustomers\twho\tmay\texpect\tor\tneed\tsuch\toptions,\twe\tmay\tbe\tunable\tto\tgrow\tour\tvehicle\tdeliveries.\tFurthermore,\tif\tour\tvehicle", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 20, "lines": { "from": 30, "to": 42 } } } }, { "pageContent": "leasing\tbusiness\tgrows\tsubstantially,\tour\tbusiness\tmay\tsuffer\tif\twe\tcannot\teffectively\tmanage\tthe\tresulting\tgreater\tlevels\tof\tresidual\trisk.\n19", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 20, "lines": { "from": 43, "to": 44 } } } }, { "pageContent": "Table\tof\tContents\nSimilarly,\twe\thave\tprovided\tresale\tvalue\tguarantees\tto\tvehicle\tcustomers\tand\tpartners\tfor\tcertain\tfinancing\tprograms,\tunder\twhich\tsuch\ncounterparties\tmay\tsell\ttheir\tvehicles\tback\tto\tus\tat\tcertain\tpoints\tin\ttime\tat\tpre-determined\tamounts.\tHowever,\tactual\tresale\tvalues\tare\tsubject\tto\nfluctuations\tover\tthe\tterm\tof\tthe\tfinancing\tarrangements,\tsuch\tas\tfrom\tthe\tvehicle\tpricing\tchanges\tdiscussed\tabove.\tIf\tthe\tactual\tresale\tvalues\tof\tany\nvehicles\tresold\tor\treturned\tto\tus\tpursuant\tto\tthese\tprograms\tare\tmaterially\tlower\tthan\tthe\tpre-determined\tamounts\twe\thave\toffered,\tour\tfinancial\ncondition\tand\toperating\tresults\tmay\tbe\tharmed.\nFinally,\tour\tvehicle\tand\tsolar\tenergy\tsystem\tfinancing\tprograms\tand\tour\tenergy\tstorage\tsales\tprograms\talso\texpose\tus\tto\tcustomer\tcredit\trisk.\tIn\nthe\tevent\tof\ta\twidespread\teconomic\tdownturn\tor\tother\tcatastrophic\tevent,\tour\tcustomers\tmay\tbe\tunable\tor\tunwilling\tto\tsatisfy\ttheir\tpayment\tobligations\nto\tus\ton\ta\ttimely\tbasis\tor\tat\tall.\tIf\ta\tsignificant\tnumber\tof\tour\tcustomers\tdefault,\twe\tmay\tincur\tsubstantial\tcredit\tlosses\tand/or\timpairment\tcharges\twith\nrespect\tto\tthe\tunderlying\tassets.\nWe\tmust\tmanage\tongoing\tobligations\tunder\tour\tagreement\twith\tthe\tResearch\tFoundation\tfor\tthe\tState\tUniversity\tof\tNew\tYork\nrelating\tto\tour\tGigafactory\tNew\tYork.\nWe\tare\tparty\tto\tan\toperating\tlease\tand\ta\tresearch\tand\tdevelopment\tagreement\tthrough\tthe\tState\tUniversity\tof\tNew\tYork\t(the\t“SUNY\tFoundation”).\nThese\tagreements\tprovide\tfor\tthe\tconstruction\tand\tuse\tof\tour\tGigafactory\tNew\tYork,\twhich\twe\thave\tprimarily\tused\tfor\tthe\tdevelopment\tand\tproduction\tof\nour\tSolar\tRoof\tand\tother\tsolar\tproducts\tand\tcomponents,\tenergy\tstorage\tcomponents\tand\tSupercharger\tcomponents,\tand\tfor\tother\tlessor-approved\nfunctions.\tUnder\tthis\tagreement,\twe\tare\tobligated\tto,\tamong\tother\tthings,\tmeet\temployment\ttargets\tas\twell\tas\tspecified\tminimum\tnumbers\tof\tpersonnel", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 21, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "in\tthe\tState\tof\tNew\tYork\tand\tin\tBuffalo,\tNew\tYork\tand\tspend\tor\tincur\t$5.00\tbillion\tin\tcombined\tcapital,\toperational\texpenses,\tcosts\tof\tgoods\tsold\tand\nother\tcosts\tin\tthe\tState\tof\tNew\tYork\tduring\ta\tperiod\tthat\twas\tinitially\t10\tyears\tbeginning\tApril\t30,\t2018.\tAs\tof\tDecember\t31,\t2023,\twe\tare\tcurrently\tin\nexcess\tof\tsuch\ttargets\trelating\tto\tinvestments\tand\tpersonnel\tin\tthe\tState\tof\tNew\tYork\tand\tBuffalo.\tWhile\twe\texpect\tto\thave\tand\tgrow\tsignificant\noperations\tat\tGigafactory\tNew\tYork\tand\tthe\tsurrounding\tBuffalo\tarea,\tany\tfailure\tby\tus\tin\tany\tyear\tover\tthe\tcourse\tof\tthe\tterm\tof\tthe\tagreement\tto\tmeet\nall\tapplicable\tfuture\tobligations\tmay\tresult\tin\tour\tobligation\tto\tpay\ta\t“program\tpayment”\tof\t$41\tmillion\tto\tthe\tSUNY\tFoundation\tfor\tsuch\tyear,\tthe\ntermination\tof\tour\tlease\tat\tGigafactory\tNew\tYork\twhich\tmay\trequire\tus\tto\tpay\tadditional\tpenalties,\tand/or\tthe\tneed\tto\tadjust\tcertain\tof\tour\toperations.\nAny\tof\tthe\tforegoing\tevents\tmay\tharm\tour\tbusiness,\tfinancial\tcondition\tand\toperating\tresults.\nIf\twe\tare\tunable\tto\tattract,\thire\tand\tretain\tkey\temployees\tand\tqualified\tpersonnel,\tour\tability\tto\tcompete\tmay\tbe\tharmed.\nThe\tloss\tof\tthe\tservices\tof\tany\tof\tour\tkey\temployees\tor\tany\tsignificant\tportion\tof\tour\tworkforce\tcould\tdisrupt\tour\toperations\tor\tdelay\tthe\ndevelopment,\tintroduction\tand\tramp\tof\tour\tproducts\tand\tservices.\tIn\tparticular,\twe\tare\thighly\tdependent\ton\tthe\tservices\tof\tElon\tMusk,\tTechnoking\tof\nTesla\tand\tour\tChief\tExecutive\tOfficer.\tNone\tof\tour\tkey\temployees\tis\tbound\tby\tan\temployment\tagreement\tfor\tany\tspecific\tterm\tand\twe\tmay\tnot\tbe\table\tto\nsuccessfully\tattract\tand\tretain\tsenior\tleadership\tnecessary\tto\tgrow\tour\tbusiness.\tOur\tfuture\tsuccess\talso\tdepends\tupon\tour\tability\tto\tattract,\thire\tand\nretain\ta\tlarge\tnumber\tof\tengineering,\tmanufacturing,\tmarketing,\tsales\tand\tdelivery,\tservice,\tinstallation,\ttechnology\tand\tsupport\tpersonnel,\tespecially\tto", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 21, "lines": { "from": 17, "to": 29 } } } }, { "pageContent": "support\tour\tplanned\thigh-volume\tproduct\tsales,\tmarket\tand\tgeographical\texpansion\tand\ttechnological\tinnovations.\tIf\twe\tare\tnot\tsuccessful\tin\tmanaging\nthese\trisks,\tour\tbusiness,\tfinancial\tcondition\tand\toperating\tresults\tmay\tbe\tharmed.\nEmployees\tmay\tleave\tTesla\tor\tchoose\tother\temployers\tover\tTesla\tdue\tto\tvarious\tfactors,\tsuch\tas\ta\tvery\tcompetitive\tlabor\tmarket\tfor\ttalented\nindividuals\twith\tautomotive\tor\ttechnology\texperience,\tor\tany\tnegative\tpublicity\trelated\tto\tus.\tIn\tregions\twhere\twe\thave\tor\twill\thave\toperations,\nparticularly\tsignificant\tengineering\tand\tmanufacturing\tcenters,\tthere\tis\tstrong\tcompetition\tfor\tindividuals\twith\tskillsets\tneeded\tfor\tour\tbusiness,\tincluding\nspecialized\tknowledge\tof\telectric\tvehicles,\tengineering\tand\telectrical\tand\tbuilding\tconstruction\texpertise.\tWe\talso\tcompete\twith\tboth\tmature\tand\nprosperous\tcompanies\tthat\thave\tfar\tgreater\tfinancial\tresources\tthan\twe\tdo\tand\tstart-ups\tand\temerging\tcompanies\tthat\tpromise\tshort-term\tgrowth\nopportunities.\nFinally,\tour\tcompensation\tphilosophy\tfor\tall\tof\tour\tpersonnel\treflects\tour\tstartup\torigins,\twith\tan\temphasis\ton\tequity-based\tawards\tand\tbenefits\tin\norder\tto\tclosely\talign\ttheir\tincentives\twith\tthe\tlong-term\tinterests\tof\tour\tstockholders.\tWe\tperiodically\tseek\tand\tobtain\tapproval\tfrom\tour\tstockholders\tfor\nfuture\tincreases\tto\tthe\tnumber\tof\tawards\tavailable\tunder\tour\tequity\tincentive\tand\temployee\tstock\tpurchase\tplans.\tIf\twe\tare\tunable\tto\tobtain\tthe\trequisite\nstockholder\tapprovals\tfor\tsuch\tfuture\tincreases,\twe\tmay\thave\tto\texpend\tadditional\tcash\tto\tcompensate\tour\temployees\tand\tour\tability\tto\tretain\tand\thire\nqualified\tpersonnel\tmay\tbe\tharmed.\n20", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 21, "lines": { "from": 30, "to": 43 } } } }, { "pageContent": "Table\tof\tContents\nWe\tare\thighly\tdependent\ton\tthe\tservices\tof\tElon\tMusk,\tTechnoking\tof\tTesla\tand\tour\tChief\tExecutive\tOfficer.\nWe\tare\thighly\tdependent\ton\tthe\tservices\tof\tElon\tMusk,\tTechnoking\tof\tTesla\tand\tour\tChief\tExecutive\tOfficer.\tAlthough\tMr.\tMusk\tspends\tsignificant\ntime\twith\tTesla\tand\tis\thighly\tactive\tin\tour\tmanagement,\the\tdoes\tnot\tdevote\this\tfull\ttime\tand\tattention\tto\tTesla.\tMr.\tMusk\talso\tcurrently\tserves\tas\tChief\nExecutive\tOfficer\tand\tChief\tTechnical\tOfficer\tof\tSpace\tExploration\tTechnologies\tCorp.,\ta\tdeveloper\tand\tmanufacturer\tof\tspace\tlaunch\tvehicles,\tChairman\nand\tChief\tTechnical\tOfficer\tof\tX\tCorp.,\ta\tsocial\tmedia\tcompany,\tand\tis\tinvolved\tin\tother\temerging\ttechnology\tventures.\nOur\tinformation\ttechnology\tsystems\tor\tdata,\tor\tthose\tof\tour\tservice\tproviders\tor\tcustomers\tor\tusers\tcould\tbe\tsubject\tto\tcyber-\nattacks\tor\tother\tsecurity\tincidents,\twhich\tcould\tresult\tin\tdata\tbreaches,\tintellectual\tproperty\ttheft,\tclaims,\tlitigation,\tregulatory\ninvestigations,\tsignificant\tliability,\treputational\tdamage\tand\tother\tadverse\tconsequences.\nWe\tcontinue\tto\texpand\tour\tinformation\ttechnology\tsystems\tas\tour\toperations\tgrow,\tsuch\tas\tproduct\tdata\tmanagement,\tprocurement,\tinventory\nmanagement,\tproduction\tplanning\tand\texecution,\tsales,\tservice\tand\tlogistics,\tdealer\tmanagement,\tfinancial,\ttax\tand\tregulatory\tcompliance\tsystems.\tThis\nincludes\tthe\timplementation\tof\tnew\tinternally\tdeveloped\tsystems\tand\tthe\tdeployment\tof\tsuch\tsystems\tin\tthe\tU.S.\tand\tabroad.\tWhile,\twe\tmaintain\ninformation\ttechnology\tmeasures\tdesigned\tto\tprotect\tus\tagainst\tintellectual\tproperty\ttheft,\tdata\tbreaches,\tsabotage\tand\tother\texternal\tor\tinternal\tcyber-\nattacks\tor\tmisappropriation,\tour\tsystems\tand\tthose\tof\tour\tservice\tproviders\tare\tpotentially\tvulnerable\tto\tmalware,\transomware,\tviruses,\tdenial-of-service\nattacks,\tphishing\tattacks,\tsocial\tengineering,\tcomputer\thacking,\tunauthorized\taccess,\texploitation\tof\tbugs,\tdefects\tand\tvulnerabilities,\tbreakdowns,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 22, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "damage,\tinterruptions,\tsystem\tmalfunctions,\tpower\toutages,\tterrorism,\tacts\tof\tvandalism,\tsecurity\tbreaches,\tsecurity\tincidents,\tinadvertent\tor\tintentional\nactions\tby\temployees\tor\tother\tthird\tparties,\tand\tother\tcyber-attacks.\nTo\tthe\textent\tany\tsecurity\tincident\tresults\tin\tunauthorized\taccess\tor\tdamage\tto\tor\tacquisition,\tuse,\tcorruption,\tloss,\tdestruction,\talteration\tor\ndissemination\tof\tour\tdata,\tincluding\tintellectual\tproperty\tand\tpersonal\tinformation,\tor\tour\tproducts\tor\tvehicles,\tor\tfor\tit\tto\tbe\tbelieved\tor\treported\tthat\tany\nof\tthese\toccurred,\tit\tcould\tdisrupt\tour\tbusiness,\tharm\tour\treputation,\tcompel\tus\tto\tcomply\twith\tapplicable\tdata\tbreach\tnotification\tlaws,\tsubject\tus\tto\ttime\nconsuming,\tdistracting\tand\texpensive\tlitigation,\tregulatory\tinvestigation\tand\toversight,\tmandatory\tcorrective\taction,\trequire\tus\tto\tverify\tthe\tcorrectness\nof\tdatabase\tcontents,\tor\totherwise\tsubject\tus\tto\tliability\tunder\tlaws,\tregulations\tand\tcontractual\tobligations,\tincluding\tthose\tthat\tprotect\tthe\tprivacy\tand\nsecurity\tof\tpersonal\tinformation.\tThis\tcould\tresult\tin\tincreased\tcosts\tto\tus\tand\tresult\tin\tsignificant\tlegal\tand\tfinancial\texposure\tand/or\treputational\tharm.\nWe\talso\trely\ton\tservice\tproviders,\tand\tsimilar\tincidents\trelating\tto\ttheir\tinformation\ttechnology\tsystems\tcould\talso\thave\ta\tmaterial\tadverse\teffect\ton\nour\tbusiness.\tThere\thave\tbeen\tand\tmay\tcontinue\tto\tbe\tsignificant\tsupply\tchain\tattacks.\tOur\tservice\tproviders,\tincluding\tour\tworkforce\tmanagement\nsoftware\tprovider,\thave\tbeen\tsubject\tto\transomware\tand\tother\tsecurity\tincidents,\tand\twe\tcannot\tguarantee\tthat\tour\tor\tour\tservice\tproviders’\tsystems\nhave\tnot\tbeen\tbreached\tor\tthat\tthey\tdo\tnot\tcontain\texploitable\tdefects,\tbugs,\tor\tvulnerabilities\tthat\tcould\tresult\tin\ta\tsecurity\tincident,\tor\tother\tdisruption\nto,\tour\tor\tour\tservice\tproviders’\tsystems.\tOur\tability\tto\tmonitor\tour\tservice\tproviders’\tsecurity\tmeasures\tis\tlimited,\tand,\tin\tany\tevent,\tmalicious\tthird\nparties\tmay\tbe\table\tto\tcircumvent\tthose\tsecurity\tmeasures.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 22, "lines": { "from": 16, "to": 29 } } } }, { "pageContent": "Further,\tthe\timplementation,\tmaintenance,\tsegregation\tand\timprovement\tof\tthese\tsystems\trequire\tsignificant\tmanagement\ttime,\tsupport\tand\tcost,\nand\tthere\tare\tinherent\trisks\tassociated\twith\tdeveloping,\timproving\tand\texpanding\tour\tcore\tsystems\tas\twell\tas\timplementing\tnew\tsystems\tand\tupdating\ncurrent\tsystems,\tincluding\tdisruptions\tto\tthe\trelated\tareas\tof\tbusiness\toperation.\tThese\trisks\tmay\taffect\tour\tability\tto\tmanage\tour\tdata\tand\tinventory,\nprocure\tparts\tor\tsupplies\tor\tmanufacture,\tsell,\tdeliver\tand\tservice\tproducts,\tadequately\tprotect\tour\tintellectual\tproperty\tor\tachieve\tand\tmaintain\ncompliance\twith,\tor\trealize\tavailable\tbenefits\tunder,\ttax\tlaws\tand\tother\tapplicable\tregulations.\nMoreover,\tif\twe\tdo\tnot\tsuccessfully\timplement,\tmaintain\tor\texpand\tthese\tsystems\tas\tplanned,\tour\toperations\tmay\tbe\tdisrupted,\tour\tability\tto\naccurately\tand/or\ttimely\treport\tour\tfinancial\tresults\tcould\tbe\timpaired\tand\tdeficiencies\tmay\tarise\tin\tour\tinternal\tcontrol\tover\tfinancial\treporting,\twhich\nmay\timpact\tour\tability\tto\tcertify\tour\tfinancial\tresults.\tMoreover,\tour\tproprietary\tinformation,\tincluding\tintellectual\tproperty\tand\tpersonal\tinformation,\ncould\tbe\tcompromised\tor\tmisappropriated\tand\tour\treputation\tmay\tbe\tadversely\taffected.\tIf\tthese\tsystems\tor\ttheir\tfunctionality\tdo\tnot\toperate\tas\twe\nexpect\tthem\tto,\twe\tmay\tbe\trequired\tto\texpend\tsignificant\tresources\tto\tmake\tcorrections\tor\tfind\talternative\tsources\tfor\tperforming\tthese\tfunctions.\n21", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 22, "lines": { "from": 30, "to": 40 } } } }, { "pageContent": "Table\tof\tContents\nAny\tunauthorized\tcontrol\tor\tmanipulation\tof\tour\tproducts’\tsystems\tcould\tresult\tin\tloss\tof\tconfidence\tin\tus\tand\tour\tproducts.\nOur\tproducts\tcontain\tcomplex\tinformation\ttechnology\tsystems.\tFor\texample,\tour\tvehicles\tand\tenergy\tstorage\tproducts\tare\tdesigned\twith\tbuilt-in\ndata\tconnectivity\tto\taccept\tand\tinstall\tperiodic\tremote\tupdates\tfrom\tus\tto\timprove\tor\tupdate\ttheir\tfunctionality.\tWhile\twe\thave\timplemented\tsecurity\nmeasures\tintended\tto\tprevent\tunauthorized\taccess\tto\tour\tinformation\ttechnology\tnetworks,\tour\tproducts\tand\ttheir\tsystems,\tmalicious\tentities\thave\nreportedly\tattempted,\tand\tmay\tattempt\tin\tthe\tfuture,\tto\tgain\tunauthorized\taccess\tto\tmodify,\talter\tand\tuse\tsuch\tnetworks,\tproducts\tand\tsystems\tto\tgain\ncontrol\tof,\tor\tto\tchange,\tour\tproducts’\tfunctionality,\tuser\tinterface\tand\tperformance\tcharacteristics\tor\tto\tgain\taccess\tto\tdata\tstored\tin\tor\tgenerated\tby\tour\nproducts.\tWe\tencourage\treporting\tof\tpotential\tvulnerabilities\tin\tthe\tsecurity\tof\tour\tproducts\tthrough\tour\tsecurity\tvulnerability\treporting\tpolicy,\tand\twe\naim\tto\tremedy\tany\treported\tand\tverified\tvulnerability.\tHowever,\tthere\tcan\tbe\tno\tassurance\tthat\tany\tvulnerabilities\twill\tnot\tbe\texploited\tbefore\tthey\tcan\nbe\tidentified,\tor\tthat\tour\tremediation\tefforts\tare\tor\twill\tbe\tsuccessful.\nAny\tunauthorized\taccess\tto\tor\tcontrol\tof\tour\tproducts\tor\ttheir\tsystems\tor\tany\tloss\tof\tdata\tcould\tresult\tin\tlegal\tclaims\tor\tgovernment\tinvestigations.\nIn\taddition,\tregardless\tof\ttheir\tveracity,\treports\tof\tunauthorized\taccess\tto\tour\tproducts,\ttheir\tsystems\tor\tdata,\tas\twell\tas\tother\tfactors\tthat\tmay\tresult\tin\nthe\tperception\tthat\tour\tproducts,\ttheir\tsystems\tor\tdata\tare\tcapable\tof\tbeing\thacked,\tmay\tharm\tour\tbrand,\tprospects\tand\toperating\tresults.\tWe\thave\tbeen\nthe\tsubject\tof\tsuch\treports\tin\tthe\tpast.\nOur\tbusiness\tmay\tbe\tadversely\taffected\tby\tany\tdisruptions\tcaused\tby\tunion\tactivities.\nIt\tis\tnot\tuncommon\tfor\temployees\tof\tcertain\ttrades\tat\tcompanies\tsuch\tas\tours\tto\tbelong\tto\ta\tunion,\twhich\tcan\tresult\tin\thigher\temployee\tcosts\tand", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 23, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "increased\trisk\tof\twork\tstoppages.\tMoreover,\tregulations\tin\tsome\tjurisdictions\toutside\tof\tthe\tU.S.\tmandate\temployee\tparticipation\tin\tindustrial\tcollective\nbargaining\tagreements\tand\twork\tcouncils\twith\tcertain\tconsultation\trights\twith\trespect\tto\tthe\trelevant\tcompanies’\toperations.\tAlthough\twe\twork\tdiligently\nto\tprovide\tthe\tbest\tpossible\twork\tenvironment\tfor\tour\temployees,\tthey\tmay\tstill\tdecide\tto\tjoin\tor\tseek\trecognition\tto\tform\ta\tlabor\tunion,\tor\twe\tmay\tbe\nrequired\tto\tbecome\ta\tunion\tsignatory.\tFrom\ttime\tto\ttime,\tlabor\tunions\thave\tengaged\tin\tcampaigns\tto\torganize\tcertain\tof\tour\toperations,\tas\tpart\tof\twhich\nsuch\tunions\thave\tfiled\tunfair\tlabor\tpractice\tcharges\tagainst\tus\twith\tthe\tNational\tLabor\tRelations\tBoard\t(the\t“NLRB”),\tand\tthey\tmay\tdo\tso\tin\tthe\tfuture.\nAny\tunfavorable\tultimate\toutcome\tfor\tTesla\tmay\thave\ta\tnegative\timpact\ton\tthe\tperception\tof\tTesla’s\ttreatment\tof\tour\temployees.\tFurthermore,\twe\tare\ndirectly\tor\tindirectly\tdependent\tupon\tcompanies\twith\tunionized\twork\tforces,\tsuch\tas\tsuppliers\tand\ttrucking\tand\tfreight\tcompanies.\tAny\twork\tstoppages\tor\nstrikes\torganized\tby\tsuch\tunions\tcould\tdelay\tthe\tmanufacture\tand\tsale\tof\tour\tproducts\tand\tmay\tharm\tour\tbusiness\tand\toperating\tresults.\nWe\tmay\tchoose\tto\tor\tbe\tcompelled\tto\tundertake\tproduct\trecalls\tor\ttake\tother\tsimilar\tactions.\nAs\ta\tmanufacturing\tcompany,\twe\tmust\tmanage\tthe\trisk\tof\tproduct\trecalls\twith\trespect\tto\tour\tproducts.\tRecalls\tfor\tour\tvehicles\thave\tresulted\tfrom\nvarious\thardware\tand\tsoftware-related\tsafety\tconcerns\tor\tnon-compliance\tdeterminations.\tIn\taddition\tto\trecalls\tinitiated\tby\tus\tfor\tvarious\tcauses,\ttesting\nof\tor\tinvestigations\tinto\tour\tproducts\tby\tgovernment\tregulators\tor\tindustry\tgroups\tmay\tcompel\tus\tto\tinitiate\tproduct\trecalls\tor\tmay\tresult\tin\tnegative\npublic\tperceptions\tabout\tthe\tsafety\tof\tour\tproducts,\teven\tif\twe\tdisagree\twith\tthe\tdefect\tdetermination\tor\thave\tdata\tthat\tcontradicts\tit.\tIn\tthe\tfuture,\twe", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 23, "lines": { "from": 17, "to": 29 } } } }, { "pageContent": "may\tvoluntarily\tor\tinvoluntarily\tinitiate\trecalls\tif\tany\tof\tour\tproducts\tare\tdetermined\tby\tus\tor\ta\tregulator\tto\tcontain\ta\tsafety\tdefect\tor\tbe\tnoncompliant\nwith\tapplicable\tlaws\tand\tregulations,\tsuch\tas\tU.S.\tFederal\tMotor\tVehicle\tSafety\tStandards.\tSuch\trecalls,\twhether\tvoluntary\tor\tinvoluntary\tor\tcaused\tby\nsystems\tor\tcomponents\tengineered\tor\tmanufactured\tby\tus\tor\tour\tsuppliers,\tcould\tresult\tin\tsignificant\texpense,\tsupply\tchain\tcomplications\tand\tservice\nburdens,\tand\tmay\tharm\tour\tbrand,\tbusiness,\tprospects,\tfinancial\tcondition\tand\toperating\tresults.\nOur\tcurrent\tand\tfuture\twarranty\treserves\tmay\tbe\tinsufficient\tto\tcover\tfuture\twarranty\tclaims.\nWe\tprovide\ta\tmanufacturer’s\twarranty\ton\tall\tnew\tand\tused\tTesla\tvehicles\twe\tsell\tdirectly\tto\tcustomers.\tWe\talso\tprovide\tcertain\twarranties\twith\nrespect\tto\tthe\tenergy\tgeneration\tand\tstorage\tsystems\twe\tsell,\tincluding\ton\ttheir\tinstallation\tand\tmaintenance.\tFor\tcomponents\tnot\tmanufactured\tby\tus,\nwe\tgenerally\tpass\tthrough\tto\tour\tcustomers\tthe\tapplicable\tmanufacturers’\twarranties,\tbut\tmay\tretain\tsome\twarranty\tresponsibilities\tfor\tsome\tor\tall\tof\tthe\nlife\tof\tsuch\tcomponents.\tAs\tpart\tof\tour\tenergy\tgeneration\tand\tstorage\tsystem\tcontracts,\twe\tmay\tprovide\tthe\tcustomer\twith\tperformance\tguarantees\tthat\nguarantee\tthat\tthe\tunderlying\tsystem\twill\tmeet\tor\texceed\tthe\tminimum\tenergy\tgeneration\tor\tother\tenergy\tperformance\trequirements\tspecified\tin\tthe\ncontract.\tUnder\tthese\tperformance\tguarantees,\twe\tgenerally\tbear\tthe\trisk\tof\telectricity\tproduction\tor\tother\tperformance\tshortfalls,\tincluding\tin\tsome\ncases\tshortfalls\tcaused\tby\tfailures\tin\tcomponents\tfrom\tthird\tparty\tmanufacturers.\tThese\trisks\tare\texacerbated\tin\tthe\tevent\tsuch\tmanufacturers\tcease\noperations\tor\tfail\tto\thonor\ttheir\twarranties.\n22", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 23, "lines": { "from": 30, "to": 43 } } } }, { "pageContent": "Table\tof\tContents\nIf\tour\twarranty\treserves\tare\tinadequate\tto\tcover\tfuture\twarranty\tclaims\ton\tour\tproducts,\tour\tfinancial\tcondition\tand\toperating\tresults\tmay\tbe\nharmed.\tWarranty\treserves\tinclude\tour\tmanagement’s\tbest\testimates\tof\tthe\tprojected\tcosts\tto\trepair\tor\tto\treplace\titems\tunder\twarranty,\twhich\tare\tbased\non\tactual\tclaims\tincurred\tto\tdate\tand\tan\testimate\tof\tthe\tnature,\tfrequency\tand\tcosts\tof\tfuture\tclaims.\tSuch\testimates\tare\tinherently\tuncertain\tand\nchanges\tto\tour\thistorical\tor\tprojected\texperience,\tespecially\twith\trespect\tto\tproducts\tthat\twe\thave\tintroduced\trelatively\trecently\tand/or\tthat\twe\texpect\tto\nproduce\tat\tsignificantly\tgreater\tvolumes\tthan\tour\tpast\tproducts,\tmay\tcause\tmaterial\tchanges\tto\tour\twarranty\treserves\tin\tthe\tfuture.\nOur\tinsurance\tcoverage\tstrategy\tmay\tnot\tbe\tadequate\tto\tprotect\tus\tfrom\tall\tbusiness\trisks.\nWe\tmay\tbe\tsubject,\tin\tthe\tordinary\tcourse\tof\tbusiness,\tto\tlosses\tresulting\tfrom\tproducts\tliability,\taccidents,\tacts\tof\tGod\tand\tother\tclaims\tagainst\tus,\nfor\twhich\twe\tmay\thave\tno\tinsurance\tcoverage.\tAs\ta\tgeneral\tmatter,\twe\tdo\tnot\tmaintain\tas\tmuch\tinsurance\tcoverage\tas\tmany\tother\tcompanies\tdo,\tand\tin\nsome\tcases,\twe\tdo\tnot\tmaintain\tany\tat\tall.\tAdditionally,\tthe\tpolicies\tthat\twe\tdo\thave\tmay\tinclude\tsignificant\tdeductibles\tor\tself-insured\tretentions,\tpolicy\nlimitations\tand\texclusions,\tand\twe\tcannot\tbe\tcertain\tthat\tour\tinsurance\tcoverage\twill\tbe\tsufficient\tto\tcover\tall\tfuture\tlosses\tor\tclaims\tagainst\tus.\tA\tloss\nthat\tis\tuninsured\tor\twhich\texceeds\tpolicy\tlimits\tmay\trequire\tus\tto\tpay\tsubstantial\tamounts,\twhich\tmay\tharm\tour\tfinancial\tcondition\tand\toperating\tresults.\nOur\tdebt\tagreements\tcontain\tcovenant\trestrictions\tthat\tmay\tlimit\tour\tability\tto\toperate\tour\tbusiness.\nThe\tterms\tof\tcertain\tof\tour\tdebt\tfacilities\tcontain,\tand\tany\tof\tour\tother\tfuture\tdebt\tagreements\tmay\tcontain,\tcovenant\trestrictions\tthat\tmay\tlimit\tour", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 24, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "ability\tto\toperate\tour\tbusiness,\tincluding\trestrictions\ton\tour\tand/or\tour\tsubsidiaries’\tability\tto,\tamong\tother\tthings,\tincur\tadditional\tdebt\tor\tcreate\tliens.\tIn\naddition,\tunder\tcertain\tcircumstances\twe\tare\trequired\tto\tmaintain\ta\tcertain\tamount\tof\tliquidity.\tAs\ta\tresult\tof\tthese\tcovenants,\tour\tability\tto\trespond\tto\nchanges\tin\tbusiness\tand\teconomic\tconditions\tand\tengage\tin\tbeneficial\ttransactions,\tincluding\tto\tobtain\tadditional\tfinancing\tas\tneeded,\tmay\tbe\trestricted.\nFurthermore,\tour\tfailure\tto\tcomply\twith\tour\tdebt\tcovenants\tcould\tresult\tin\ta\tdefault\tunder\tour\tdebt\tagreements,\twhich\tcould\tpermit\tthe\tholders\tto\naccelerate\tour\tobligation\tto\trepay\tthe\tdebt.\tIf\tany\tof\tour\tdebt\tis\taccelerated,\twe\tmay\tnot\thave\tsufficient\tfunds\tavailable\tto\trepay\tit.\nAdditional\tfunds\tmay\tnot\tbe\tavailable\tto\tus\twhen\twe\tneed\tor\twant\tthem.\nOur\tbusiness\tand\tour\tfuture\tplans\tfor\texpansion\tare\tcapital-intensive,\tand\tthe\tspecific\ttiming\tof\tcash\tinflows\tand\toutflows\tmay\tfluctuate\nsubstantially\tfrom\tperiod\tto\tperiod.\tWe\tmay\tneed\tor\twant\tto\traise\tadditional\tfunds\tthrough\tthe\tissuance\tof\tequity,\tequity-related\tor\tdebt\tsecurities\tor\nthrough\tobtaining\tcredit\tfrom\tfinancial\tinstitutions\tto\tfund,\ttogether\twith\tour\tprincipal\tsources\tof\tliquidity,\tthe\tcosts\tof\tdeveloping\tand\tmanufacturing\tour\ncurrent\tor\tfuture\tproducts,\tto\tpay\tany\tsignificant\tunplanned\tor\taccelerated\texpenses\tor\tfor\tnew\tsignificant\tstrategic\tinvestments,\tor\tto\trefinance\tour\nsignificant\tconsolidated\tindebtedness,\teven\tif\tnot\trequired\tto\tdo\tso\tby\tthe\tterms\tof\tsuch\tindebtedness.\tWe\tcannot\tbe\tcertain\tthat\tadditional\tfunds\twill\tbe\navailable\tto\tus\ton\tfavorable\tterms\twhen\trequired,\tor\tat\tall.\tIf\twe\tcannot\traise\tadditional\tfunds\twhen\twe\tneed\tthem,\tour\tfinancial\tcondition,\tresults\tof\noperations,\tbusiness\tand\tprospects\tcould\tbe\tmaterially\tand\tadversely\taffected.\nWe\tmay\tbe\tnegatively\timpacted\tby\tany\tearly\tobsolescence\tof\tour\tmanufacturing\tequipment.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 24, "lines": { "from": 15, "to": 28 } } } }, { "pageContent": "We\tdepreciate\tthe\tcost\tof\tour\tmanufacturing\tequipment\tover\ttheir\texpected\tuseful\tlives.\tHowever,\tproduct\tcycles\tor\tmanufacturing\ttechnology\tmay\nchange\tperiodically,\tand\twe\tmay\tdecide\tto\tupdate\tour\tproducts\tor\tmanufacturing\tprocesses\tmore\tquickly\tthan\texpected.\tMoreover,\timprovements\tin\nengineering\tand\tmanufacturing\texpertise\tand\tefficiency\tmay\tresult\tin\tour\tability\tto\tmanufacture\tour\tproducts\tusing\tless\tof\tour\tcurrently\tinstalled\nequipment.\tAlternatively,\tas\twe\tramp\tand\tmature\tthe\tproduction\tof\tour\tproducts\tto\thigher\tlevels,\twe\tmay\tdiscontinue\tthe\tuse\tof\talready\tinstalled\nequipment\tin\tfavor\tof\tdifferent\tor\tadditional\tequipment.\tThe\tuseful\tlife\tof\tany\tequipment\tthat\twould\tbe\tretired\tearly\tas\ta\tresult\twould\tbe\tshortened,\ncausing\tthe\tdepreciation\ton\tsuch\tequipment\tto\tbe\taccelerated,\tand\tour\tresults\tof\toperations\tmay\tbe\tharmed.\nThere\tis\tno\tguarantee\tthat\twe\twill\thave\tsufficient\tcash\tflow\tfrom\tour\tbusiness\tto\tpay\tour\tindebtedness\tor\tthat\twe\twill\tnot\tincur\nadditional\tindebtedness.\nAs\tof\tDecember\t31,\t2023,\twe\tand\tour\tsubsidiaries\thad\toutstanding\t$4.68\tbillion\tin\taggregate\tprincipal\tamount\tof\tindebtedness\t(see\tNote\t11,\tDebt,\nto\tthe\tconsolidated\tfinancial\tstatements\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K).\tOur\tconsolidated\tindebtedness\tmay\tincrease\tour\nvulnerability\tto\tany\tgenerally\tadverse\teconomic\tand\tindustry\tconditions.\tWe\tand\tour\tsubsidiaries\tmay,\tsubject\tto\tthe\tlimitations\tin\tthe\tterms\tof\tour\nexisting\tand\tfuture\tindebtedness,\tincur\tadditional\tdebt,\tsecure\texisting\tor\tfuture\tdebt\tor\trecapitalize\tour\tdebt.\n23", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 24, "lines": { "from": 29, "to": 41 } } } }, { "pageContent": "Table\tof\tContents\nOur\tability\tto\tmake\tscheduled\tpayments\tof\tthe\tprincipal\tand\tinterest\ton\tour\tindebtedness\twhen\tdue,\tto\tmake\tpayments\tupon\tconversion\tor\nrepurchase\tdemands\twith\trespect\tto\tour\tconvertible\tsenior\tnotes\tor\tto\trefinance\tour\tindebtedness\tas\twe\tmay\tneed\tor\tdesire,\tdepends\ton\tour\tfuture\nperformance,\twhich\tis\tsubject\tto\teconomic,\tfinancial,\tcompetitive\tand\tother\tfactors\tbeyond\tour\tcontrol.\tOur\tbusiness\tmay\tnot\tcontinue\tto\tgenerate\tcash\nflow\tfrom\toperations\tin\tthe\tfuture\tsufficient\tto\tsatisfy\tour\tobligations\tunder\tour\texisting\tindebtedness\tand\tany\tfuture\tindebtedness\twe\tmay\tincur,\tand\tto\nmake\tnecessary\tcapital\texpenditures.\tIf\twe\tare\tunable\tto\tgenerate\tsuch\tcash\tflow,\twe\tmay\tbe\trequired\tto\tadopt\tone\tor\tmore\talternatives,\tsuch\tas\nreducing\tor\tdelaying\tinvestments\tor\tcapital\texpenditures,\tselling\tassets,\trefinancing\tor\tobtaining\tadditional\tequity\tcapital\ton\tterms\tthat\tmay\tbe\tonerous\nor\thighly\tdilutive.\tOur\tability\tto\trefinance\texisting\tor\tfuture\tindebtedness\twill\tdepend\ton\tthe\tcapital\tmarkets\tand\tour\tfinancial\tcondition\tat\tsuch\ttime.\tIn\naddition,\tour\tability\tto\tmake\tpayments\tmay\tbe\tlimited\tby\tlaw,\tby\tregulatory\tauthority\tor\tby\tagreements\tgoverning\tour\tfuture\tindebtedness.\tWe\tmay\tnot\nbe\table\tto\tengage\tin\tthese\tactivities\ton\tdesirable\tterms\tor\tat\tall,\twhich\tmay\tresult\tin\ta\tdefault\ton\tour\texisting\tor\tfuture\tindebtedness\tand\tharm\tour\nfinancial\tcondition\tand\toperating\tresults.\nWe\tare\texposed\tto\tfluctuations\tin\tcurrency\texchange\trates.\nWe\ttransact\tbusiness\tglobally\tin\tmultiple\tcurrencies\tand\thave\tforeign\tcurrency\trisks\trelated\tto\tour\trevenue,\tcosts\tof\trevenue,\toperating\texpenses\nand\tlocalized\tsubsidiary\tdebt\tdenominated\tin\tcurrencies\tother\tthan\tthe\tU.S.\tdollar.\tTo\tthe\textent\twe\thave\tsignificant\trevenues\tdenominated\tin\tsuch\nforeign\tcurrencies,\tany\tstrengthening\tof\tthe\tU.S.\tdollar\twould\ttend\tto\treduce\tour\trevenues\tas\tmeasured\tin\tU.S.\tdollars,\tas\twe\thave\thistorically", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 25, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "experienced,\tand\tare\tcurrently\texperiencing.\tIn\taddition,\ta\tportion\tof\tour\tcosts\tand\texpenses\thave\tbeen,\tand\twe\tanticipate\twill\tcontinue\tto\tbe,\ndenominated\tin\tforeign\tcurrencies.\tIf\twe\tdo\tnot\thave\tfully\toffsetting\trevenues\tin\tthese\tcurrencies\tand\tif\tthe\tvalue\tof\tthe\tU.S.\tdollar\tdepreciates\nsignificantly\tagainst\tthese\tcurrencies,\tour\tcosts\tas\tmeasured\tin\tU.S.\tdollars\tas\ta\tpercent\tof\tour\trevenues\twill\tcorrespondingly\tincrease\tand\tour\tmargins\nwill\tsuffer.\tAs\ta\tresult,\tour\toperating\tresults\tmay\tbe\tharmed.\nWe\tmay\tnot\tbe\table\tto\tadequately\tprotect\tor\tdefend\tourselves\tagainst\tintellectual\tproperty\tinfringement\tclaims,\twhich\tmay\tbe\ntime-consuming\tand\texpensive,\tor\taffect\tthe\tfreedom\tto\toperate\tour\tbusiness.\nOur\tcompetitors\tor\tother\tthird\tparties\tmay\thold\tor\tobtain\tpatents,\tcopyrights,\ttrademarks\tor\tother\tproprietary\trights\tthat\tcould\tprevent,\tlimit\tor\ninterfere\twith\tour\tability\tto\tmake,\tuse,\tdevelop,\tsell\tor\tmarket\tour\tproducts\tand\tservices,\twhich\tcould\tmake\tit\tmore\tdifficult\tfor\tus\tto\toperate\tour\tbusiness.\nFrom\ttime\tto\ttime,\tthe\tholders\tof\tsuch\tintellectual\tproperty\trights\tmay\tassert\ttheir\trights\tand\turge\tus\tto\ttake\tlicenses\tand/or\tmay\tbring\tsuits\talleging\ninfringement\tor\tmisappropriation\tof\tsuch\trights,\twhich\tcould\tresult\tin\tsubstantial\tcosts,\tnegative\tpublicity\tand\tmanagement\tattention,\tregardless\tof\tmerit.\nIn\taddition,\tthe\teffective\tprotection\tfor\tour\tbrands,\ttechnologies,\tand\tproprietary\tinformation\tmay\tbe\tlimited\tor\tunavailable\tin\tcertain\tcountries,\nmaking\tit\tdifficult\tto\tprotect\tour\tintellectual\tproperty\tfrom\tmisappropriation\tor\tinfringement.\tAlthough\twe\tmake\treasonable\tefforts\tto\tmaintain\tthe\nconfidentiality\tof\tour\tproprietary\tinformation,\twe\tcannot\tguarantee\tthat\tthese\tactions\twill\tdeter\tor\tprevent\tmisappropriation\tof\tour\tintellectual\tproperty.\nThe\ttheft\tor\tunauthorized\tuse\tor\tpublication\tof\tour\ttrade\tsecrets\tand\tconfidential\tinformation\tcould\taffect\tour\tcompetitive\tposition.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 25, "lines": { "from": 16, "to": 29 } } } }, { "pageContent": "While\twe\tendeavor\tto\tobtain\tand\tprotect\tthe\tintellectual\tproperty\trights\tthat\twe\texpect\twill\tallow\tus\tto\tretain\tor\tadvance\tour\tstrategic\tinitiatives\tin\nthese\tcircumstances,\tthere\tcan\tbe\tno\tassurance\tthat\twe\twill\tbe\table\tto\tadequately\tidentify\tand\tprotect\tthe\tportions\tof\tintellectual\tproperty\tthat\tare\nstrategic\tto\tour\tbusiness,\tor\tmitigate\tthe\trisk\tof\tpotential\tsuits\tor\tother\tlegal\tdemands\tby\tthird\tparties.\tAccordingly,\twe\tmay\tconsider\tthe\tentering\tinto\nlicensing\tagreements\twith\trespect\tto\tsuch\trights,\talthough\tno\tassurance\tcan\tbe\tgiven\tthat\tsuch\tlicenses\tcan\tbe\tobtained\ton\tacceptable\tterms\tor\tthat\nlitigation\twill\tnot\toccur,\tand\tsuch\tlicenses\tand\tassociated\tlitigation\tcould\tsignificantly\tincrease\tour\toperating\texpenses.\tFurther,\tif\twe\tare\tdetermined\tto\nhave\tor\tbelieve\tthere\tis\ta\thigh\tlikelihood\tthat\twe\thave\tinfringed\tupon\ta\tthird\tparty’s\tintellectual\tproperty\trights,\twe\tmay\tbe\trequired\tto\tcease\tmaking,\nselling\tor\tincorporating\tcertain\tcomponents\tor\tintellectual\tproperty\tinto\tthe\tgoods\tand\tservices\twe\toffer,\tto\tpay\tsubstantial\tdamages\tand/or\tlicense\nroyalties,\tto\tredesign\tour\tproducts\tand\tservices\tand/or\tto\testablish\tand\tmaintain\talternative\tbranding\tfor\tour\tproducts\tand\tservices.\tIn\tthe\tevent\tthat\twe\nare\trequired\tto\ttake\tone\tor\tmore\tsuch\tactions,\tour\tbrand,\tbusiness,\tfinancial\tcondition\tand\toperating\tresults\tmay\tbe\tharmed.\nIncreased\tscrutiny\tand\tchanging\texpectations\tfrom\tstakeholders\twith\trespect\tto\tthe\tCompany’s\tESG\tpractices\tmay\tresult\tin\nadditional\tcosts\tor\trisks.\nCompanies\tacross\tmany\tindustries\tare\tfacing\tincreasing\tscrutiny\trelated\tto\ttheir\tenvironmental,\tsocial\tand\tgovernance\t(ESG)\tpractices.\tInvestor\nadvocacy\tgroups,\tcertain\tinstitutional\tinvestors,\tinvestment\tfunds\tand\tother\tinfluential\tinvestors\tare\talso\tincreasingly\tfocused\ton\tESG\tpractices\tand\tin\nrecent\tyears\thave\tplaced\tincreasing\timportance\ton\tthe\tnon-financial\timpacts\tof\ttheir\tinvestments.\tWhile\tour\tmission\tis\tto\taccelerate\tthe\tworld’s\ttransition", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 25, "lines": { "from": 30, "to": 43 } } } }, { "pageContent": "to\tsustainable\tenergy,\tif\tour\tESG\tpractices\tdo\tnot\tmeet\tinvestor\tor\tother\tindustry\tstakeholder\texpectations,\twhich\tcontinue\tto\tevolve,\twe\tmay\tincur\nadditional\tcosts\tand\tour\tbrand,\tability\tto\tattract\tand\tretain\tqualified\temployees\tand\tbusiness\tmay\tbe\tharmed.\n24", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 25, "lines": { "from": 44, "to": 46 } } } }, { "pageContent": "Table\tof\tContents\nOur\toperations\tcould\tbe\tadversely\taffected\tby\tevents\toutside\tof\tour\tcontrol,\tsuch\tas\tnatural\tdisasters,\twars\tor\thealth\tepidemics.\nWe\tmay\tbe\timpacted\tby\tnatural\tdisasters,\twars,\thealth\tepidemics,\tweather\tconditions,\tthe\tlong-term\teffects\tof\tclimate\tchange,\tpower\toutages\tor\nother\tevents\toutside\tof\tour\tcontrol.\tFor\texample,\tour\tFremont\tFactory\tand\tGigafactory\tNevada\tare\tlocated\tin\tseismically\tactive\tregions\tin\tNorthern\nCalifornia\tand\tNevada,\tand\tour\tGigafactory\tShanghai\tis\tlocated\tin\ta\tflood-prone\tarea.\tMoreover,\tthe\tarea\tin\twhich\tour\tGigafactory\tTexas\tis\tlocated\nexperienced\tsevere\twinter\tstorms\tin\tthe\tfirst\tquarter\tof\t2021\tthat\thad\ta\twidespread\timpact\ton\tutilities\tand\ttransportation.\tIf\tmajor\tdisasters\tsuch\tas\nearthquakes,\tfloods\tor\tother\tclimate-related\tevents\toccur,\tor\tour\tinformation\tsystem\tor\tcommunication\tbreaks\tdown\tor\toperates\timproperly,\tour\nheadquarters\tand\tproduction\tfacilities\tmay\tbe\tseriously\tdamaged,\tor\twe\tmay\thave\tto\tstop\tor\tdelay\tproduction\tand\tshipment\tof\tour\tproducts.\tIn\taddition,\nthe\tglobal\tCOVID-19\tpandemic\thas\timpacted\teconomic\tmarkets,\tmanufacturing\toperations,\tsupply\tchains,\temployment\tand\tconsumer\tbehavior\tin\tnearly\nevery\tgeographic\tregion\tand\tindustry\tacross\tthe\tworld,\tand\twe\thave\tbeen,\tand\tmay\tin\tthe\tfuture\tbe,\tadversely\taffected\tas\ta\tresult.\tAlso,\tthe\tbroader\nconsequences\tin\tthe\tcurrent\tconflict\tbetween\tRussia\tand\tUkraine,\twhich\tmay\tinclude\tfurther\tembargoes,\tregional\tinstability\tand\tgeopolitical\tshifts;\nairspace\tbans\trelating\tto\tcertain\troutes,\tor\tstrategic\tdecisions\tto\talter\tcertain\troutes;\tand\tpotential\tretaliatory\taction\tby\tthe\tRussian\tgovernment\tagainst\ncompanies,\tand\tthe\textent\tof\tthe\tconflict\ton\tour\tbusiness\tand\toperating\tresults\tcannot\tbe\tpredicted.\tWe\tmay\tincur\texpenses\tor\tdelays\trelating\tto\tsuch\nevents\toutside\tof\tour\tcontrol,\twhich\tcould\thave\ta\tmaterial\tadverse\timpact\ton\tour\tbusiness,\toperating\tresults\tand\tfinancial\tcondition.\nRisks\tRelated\tto\tGovernment\tLaws\tand\tRegulations", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 26, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "Risks\tRelated\tto\tGovernment\tLaws\tand\tRegulations\nDemand\tfor\tour\tproducts\tand\tservices\tmay\tbe\timpacted\tby\tthe\tstatus\tof\tgovernment\tand\teconomic\tincentives\tsupporting\tthe\ndevelopment\tand\tadoption\tof\tsuch\tproducts.\nGovernment\tand\teconomic\tincentives\tthat\tsupport\tthe\tdevelopment\tand\tadoption\tof\telectric\tvehicles\tin\tthe\tU.S.\tand\tabroad,\tincluding\tcertain\ttax\nexemptions,\ttax\tcredits\tand\trebates,\tmay\tbe\treduced,\teliminated,\tamended\tor\texhausted\tfrom\ttime\tto\ttime.\tFor\texample,\tpreviously\tavailable\tincentives\nfavoring\telectric\tvehicles\tin\tcertain\tareas\thave\texpired\tor\twere\tcancelled\tor\ttemporarily\tunavailable,\tand\tin\tsome\tcases\twere\tnot\teventually\treplaced\tor\nreinstituted,\twhich\tmay\thave\tnegatively\timpacted\tsales.\tIn\taddition,\tcertain\tgovernment\tand\teconomic\tincentives\tmay\talso\tbe\timplemented\tor\tamended\nto\tprovide\tbenefits\tto\tmanufacturers\twho\tassemble\tdomestically,\thave\tlocal\tsuppliers\tor\thave\tother\tcharacteristics\tthat\tmay\tnot\tapply\tto\tTesla.\tSuch\ndevelopments\tcould\tnegatively\timpact\tdemand\tfor\tour\tvehicles,\tand\twe\tand\tour\tcustomers\tmay\thave\tto\tadjust\tto\tthem,\tincluding\tthrough\tpricing\nmodifications.\nIn\taddition,\tcertain\tgovernmental\trebates,\ttax\tcredits\tand\tother\tfinancial\tincentives\tthat\tare\tcurrently\tavailable\twith\trespect\tto\tour\tsolar\tand\tenergy\nstorage\tproduct\tbusinesses\tallow\tus\tto\tlower\tour\tcosts\tand\tencourage\tcustomers\tto\tbuy\tour\tproducts\tand\tinvestors\tto\tinvest\tin\tour\tsolar\tfinancing\tfunds.\nHowever,\tthese\tincentives\tmay\texpire\twhen\tthe\tallocated\tfunding\tis\texhausted,\treduced\tor\tterminated\tas\trenewable\tenergy\tadoption\trates\tincrease,\nsometimes\twithout\twarning.\tLikewise,\tin\tjurisdictions\twhere\tnet\tmetering\tis\tcurrently\tavailable,\tour\tcustomers\treceive\tbill\tcredits\tfrom\tutilities\tfor\tenergy\nthat\ttheir\tsolar\tenergy\tsystems\tgenerate\tand\texport\tto\tthe\tgrid\tin\texcess\tof\tthe\telectric\tload\tthey\tuse.\tThe\tbenefit\tavailable\tunder\tnet\tmetering\thas\tbeen", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 26, "lines": { "from": 15, "to": 29 } } } }, { "pageContent": "or\thas\tbeen\tproposed\tto\tbe\treduced,\taltered\tor\teliminated\tin\tseveral\tjurisdictions,\tand\thas\talso\tbeen\tcontested\tand\tmay\tcontinue\tto\tbe\tcontested\tbefore\nthe\tFederal\tEnergy\tRegulatory\tCommission.\tAny\treductions\tor\tterminations\tof\tsuch\tincentives\tmay\tharm\tour\tbusiness,\tprospects,\tfinancial\tcondition\tand\noperating\tresults\tby\tmaking\tour\tproducts\tless\tcompetitive\tfor\tcustomers,\tincreasing\tour\tcost\tof\tcapital\tand\tadversely\timpacting\tour\tability\tto\tattract\ninvestment\tpartners\tand\tto\tform\tnew\tfinancing\tfunds\tfor\tour\tsolar\tand\tenergy\tstorage\tassets.\nFinally,\twe\tand\tour\tfund\tinvestors\tclaim\tthese\tU.S.\tfederal\ttax\tcredits\tand\tcertain\tstate\tincentives\tin\tamounts\tbased\ton\tindependently\tappraised\tfair\nmarket\tvalues\tof\tour\tsolar\tand\tenergy\tstorage\tsystems.\tSome\tgovernmental\tauthorities\thave\taudited\tsuch\tvalues\tand\tin\tcertain\tcases\thave\tdetermined\nthat\tthese\tvalues\tshould\tbe\tlower,\tand\tthey\tmay\tdo\tso\tagain\tin\tthe\tfuture.\tSuch\tdeterminations\tmay\tresult\tin\tadverse\ttax\tconsequences\tand/or\tour\nobligation\tto\tmake\tindemnification\tor\tother\tpayments\tto\tour\tfunds\tor\tfund\tinvestors.\nWe\tare\tsubject\tto\tevolving\tlaws\tand\tregulations\tthat\tcould\timpose\tsubstantial\tcosts,\tlegal\tprohibitions\tor\tunfavorable\tchanges\nupon\tour\toperations\tor\tproducts.\nAs\twe\tgrow\tour\tmanufacturing\toperations\tin\tadditional\tregions,\twe\tare\tor\twill\tbe\tsubject\tto\tcomplex\tenvironmental,\tmanufacturing,\thealth\tand\nsafety\tlaws\tand\tregulations\tat\tnumerous\tjurisdictional\tlevels\tin\tthe\tU.S.,\tChina,\tGermany\tand\tother\tlocations\tabroad,\tincluding\tlaws\trelating\tto\tthe\tuse,\nhandling,\tstorage,\trecycling,\tdisposal\tand/or\thuman\texposure\tto\thazardous\tmaterials,\tproduct\tmaterial\tinputs\tand\tpost-consumer\tproducts\tand\twith\nrespect\tto\tconstructing,\texpanding\tand\tmaintaining\tour\tfacilities.\tNew,\tor\tchanges\tin,\tenvironmental\tand\tclimate\tchange\tlaws,\tregulations\tor\trules\tcould\nalso\tlead\tto\tincreased\tcosts\tof\tcompliance,\tincluding\tremediations\tof\tany\tdiscovered\tissues,\tand\tchanges\tto\tour\toperations,\twhich\tmay\tbe\tsignificant,\tand", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 26, "lines": { "from": 30, "to": 44 } } } }, { "pageContent": "any\tfailures\tto\tcomply\tcould\tresult\tin\tsignificant\texpenses,\tdelays\tor\tfines.\tIn\taddition,\tas\twe\thave\n25", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 26, "lines": { "from": 45, "to": 46 } } } }, { "pageContent": "Table\tof\tContents\nincreased\tour\temployee\theadcount\tand\toperations,\twe\tare\tand\tmay\tcontinue\tto\tbe\tsubject\tto\tincreased\tscrutiny,\tincluding\tlitigation\tand\tgovernment\ninvestigations,\tthat\twe\twill\tneed\tto\tdefend\tagainst.\tIf\twe\tare\tunable\tto\tsuccessfully\tdefend\tourselves\tin\tsuch\tlitigation\tor\tgovernment\tinvestigations,\tit\nmay\tharm\tour\tbrand,\tability\tto\tattract\tand\tretain\tqualified\temployees,\tbusiness\tand\tfinancial\tcondition.\tWe\tare\talso\tsubject\tto\tlaws\tand\tregulations\napplicable\tto\tthe\tsupply,\tmanufacture,\timport,\tsale,\tservice\tand\tperformance\tof\tour\tproducts\tboth\tdomestically\tand\tabroad.\tFor\texample,\tin\tcountries\noutside\tof\tthe\tU.S.,\twe\tare\trequired\tto\tmeet\tstandards\trelating\tto\tvehicle\tsafety,\tfuel\teconomy\tand\temissions\tthat\tare\toften\tmaterially\tdifferent\tfrom\nequivalent\trequirements\tin\tthe\tU.S.,\tthus\tresulting\tin\tadditional\tinvestment\tinto\tthe\tvehicles\tand\tsystems\tto\tensure\tregulatory\tcompliance\tin\tall\tcountries.\nThis\tprocess\tmay\tinclude\tofficial\treview\tand\tcertification\tof\tour\tvehicles\tby\tforeign\tregulatory\tagencies\tprior\tto\tmarket\tentry,\tas\twell\tas\tcompliance\twith\nforeign\treporting\tand\trecall\tmanagement\tsystems\trequirements.\nIn\tparticular,\twe\toffer\tin\tour\tvehicles\tin\tcertain\tmarkets\tAutopilot\tand\tFSD\tCapability\tfeatures\tthat\ttoday\tassist\tdrivers\twith\tcertain\ttedious\tand\npotentially\tdangerous\taspects\tof\troad\ttravel,\tbut\twhich\tcurrently\trequire\tdrivers\tto\tremain\tfully\tengaged\tin\tthe\tdriving\toperation.\tWe\tare\tcontinuing\tto\ndevelop\tour\tAutopilot\tand\tFSD\tCapability\ttechnology.\tThere\tare\ta\tvariety\tof\tinternational,\tfederal\tand\tstate\tregulations\tthat\tmay\tapply\tto,\tand\tmay\nadversely\taffect,\tthe\tdesign\tand\tperformance,\tsale,\tmarketing,\tregistration\tand\toperation\tof\tAutopilot\tand\tFSD\tCapability,\tand\tfuture\tcapability,\tincluding\nfull\tself-driving\tvehicles\tthat\tmay\tnot\tbe\toperated\tby\ta\thuman\tdriver.\tThis\tincludes\tmany\texisting\tvehicle\tstandards\tthat\twere\tnot\toriginally\tintended\tto", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 27, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "apply\tto\tvehicles\tthat\tmay\tnot\tbe\toperated\tby\ta\thuman\tdriver.\tSuch\tregulations\tcontinue\tto\trapidly\tchange,\twhich\tincreases\tthe\tlikelihood\tof\ta\tpatchwork\nof\tcomplex\tor\tconflicting\tregulations,\tor\tmay\tdelay,\trestrict\tor\tprohibit\tthe\tavailability\tof\tcertain\tfunctionalities\tand\tvehicle\tdesigns,\twhich\tcould\tadversely\naffect\tour\tbusiness.\nFinally,\tas\ta\tmanufacturer,\tinstaller\tand\tservice\tprovider\twith\trespect\tto\tsolar\tgeneration\tand\tenergy\tstorage\tsystems,\ta\tsupplier\tof\telectricity\ngenerated\tand\tstored\tby\tcertain\tof\tthe\tsolar\tenergy\tand\tenergy\tstorage\tsystems\twe\tinstall\tfor\tcustomers,\tand\ta\tprovider\tof\tgrid\tservices\tthrough\tvirtual\npower\tplant\tmodels,\twe\tare\timpacted\tby\tfederal,\tstate\tand\tlocal\tregulations\tand\tpolicies\tconcerning\tthe\timport\tor\texport\tof\tcomponents,\telectricity\npricing,\tthe\tinterconnection\tof\telectricity\tgeneration\tand\tstorage\tequipment\twith\tthe\telectrical\tgrid\tand\tthe\tsale\tof\telectricity\tgenerated\tby\tthird\tparty-\nowned\tsystems.\tIf\tregulations\tand\tpolicies\tare\tintroduced\tthat\tadversely\timpact\tthe\timport\tor\texport\tof\tcomponents,\tor\tthe\tinterconnection,\tmaintenance\nor\tuse\tof\tour\tsolar\tand\tenergy\tstorage\tsystems,\tthey\tcould\tdeter\tpotential\tcustomers\tfrom\tpurchasing\tour\tsolar\tand\tenergy\tstorage\tproducts\tand\nservices,\tthreaten\tthe\teconomics\tof\tour\texisting\tcontracts\tand\tcause\tus\tto\tcease\tsolar\tand\tenergy\tstorage\tsystem\tsales\tand\tservices\tin\tthe\trelevant\njurisdictions,\twhich\tmay\tharm\tour\tbusiness,\tfinancial\tcondition\tand\toperating\tresults.\nAny\tfailure\tby\tus\tto\tcomply\twith\ta\tvariety\tof\tU.S.\tand\tinternational\tprivacy\tand\tconsumer\tprotection\tlaws\tmay\tharm\tus.\nAny\tfailure\tby\tus\tor\tour\tvendors\tor\tother\tbusiness\tpartners\tto\tcomply\twith\tour\tpublic\tprivacy\tnotice\tor\twith\tfederal,\tstate\tor\tinternational\tprivacy,\ndata\tprotection\tor\tsecurity\tlaws\tor\tregulations\trelating\tto\tthe\tprocessing,\tcollection,\tuse,\tretention,\tsecurity\tand\ttransfer\tof\tpersonally\tidentifiable", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 27, "lines": { "from": 15, "to": 28 } } } }, { "pageContent": "information\tcould\tresult\tin\tregulatory\tor\tlitigation-related\tactions\tagainst\tus,\tlegal\tliability,\tfines,\tdamages,\tongoing\taudit\trequirements\tand\tother\nsignificant\tcosts.\tSubstantial\texpenses\tand\toperational\tchanges\tmay\tbe\trequired\tin\tconnection\twith\tmaintaining\tcompliance\twith\tsuch\tlaws,\tand\teven\tan\nunsuccessful\tchallenge\tby\tcustomers\tor\tregulatory\tauthorities\tof\tour\tactivities\tcould\tresult\tin\tadverse\tpublicity\tand\tcould\trequire\ta\tcostly\tresponse\tfrom\nand\tdefense\tby\tus.\tIn\taddition,\tcertain\tprivacy\tlaws\tare\tstill\tsubject\tto\ta\thigh\tdegree\tof\tuncertainty\tas\tto\ttheir\tinterpretation,\tapplication\tand\timpact,\tand\nmay\trequire\textensive\tsystem\tand\toperational\tchanges,\tbe\tdifficult\tto\timplement,\tincrease\tour\toperating\tcosts,\tadversely\timpact\tthe\tcost\tor\nattractiveness\tof\tthe\tproducts\tor\tservices\twe\toffer,\tor\tresult\tin\tadverse\tpublicity\tand\tharm\tour\treputation.\tFor\texample,\tthe\tGeneral\tData\tProtection\nRegulation\tapplies\tto\tthe\tprocessing\tof\tpersonal\tinformation\tcollected\tfrom\tindividuals\tlocated\tin\tthe\tEuropean\tUnion\trequiring\tcertain\tdata\tprotection\nmeasures\twhen\thandling,\twith\ta\tsignificant\trisk\tof\tfines\tfor\tnoncompliance.\tSimilarly,\tour\tNorth\tAmerican\toperations\tare\tsubject\tto\tcomplex\tand\tchanging\nfederal\tand\tUS\tstate-specific\tdata\tprivacy\tlaws\tand\tregulations,\tsuch\tas\tthe\tCalifornia\tConsumer\tPrivacy\tAct\twhich\timposes\tcertain\tlegal\tobligations\ton\nour\tuse\tand\tprocessing\tof\tpersonal\tinformation\trelated\tto\tCalifornia\tresidents.\tFinally,\tadditional\tprivacy\tand\tcybersecurity\tlaws\thave\tcome\tinto\teffect\tin\nChina.\nThese\tlaws\tcontinue\tto\tdevelop\tand\tmay\tbe\tinconsistent\tfrom\tjurisdiction\tto\tjurisdiction.\tComplying\twith\temerging\tand\tchanging\trequirements\tmay\ncause\tus\tto\tincur\tsubstantial\tcosts\tand\tmake\tenhancements\tto\trelevant\tdata\tpractices.\tNoncompliance\tcould\tresult\tin\tsignificant\tpenalties\tor\tlegal\nliability.\nIn\taddition\tto\tthe\trisks\trelated\tto\tgeneral\tprivacy\tregulation,\twe\tmay\talso\tbe\tsubject\tto\tspecific\tvehicle\tmanufacturer\tobligations\trelating\tto", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 27, "lines": { "from": 29, "to": 43 } } } }, { "pageContent": "cybersecurity,\tdata\tprivacy\tand\tdata\tlocalization\trequirements\twhich\tplace\tadditional\trisks\tto\tour\tinternational\toperations.\tRisks\tand\tpenalties\tcould\ninclude\tongoing\taudit\trequirements,\tdata\tprotection\n26", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 27, "lines": { "from": 44, "to": 46 } } } }, { "pageContent": "Table\tof\tContents\nauthority\tinvestigations,\tlegal\tproceedings\tby\tinternational\tgovernmental\tentities\tor\tothers\tresulting\tin\tmandated\tdisclosure\tof\tsensitive\tdata\tor\tother\ncommercially\tunfavorable\tterms.\tNotwithstanding\tour\tefforts\tto\tprotect\tthe\tsecurity\tand\tintegrity\tof\tour\tcustomers’\tpersonal\tinformation,\twe\tmay\tbe\nrequired\tto\texpend\tsignificant\tresources\tto\tcomply\twith\tdata\tbreach\trequirements\tif,\tfor\texample,\tthird\tparties\timproperly\tobtain\tand\tuse\tthe\tpersonal\ninformation\tof\tour\tcustomers\tor\twe\totherwise\texperience\ta\tdata\tloss\twith\trespect\tto\tthe\tpersonal\tinformation\twe\tprocess\tand\thandle.\tA\tmajor\tbreach\tof\nour\tnetwork\tsecurity\tand\tsystems\tmay\toccur\tdespite\tdefensive\tmeasures,\tand\tmay\tresult\tin\tfines,\tpenalties\tand\tdamages\tand\tharm\tour\tbrand,\tprospects\nand\toperating\tresults.\nWe\tcould\tbe\tsubject\tto\tliability,\tpenalties\tand\tother\trestrictive\tsanctions\tand\tadverse\tconsequences\tarising\tout\tof\tcertain\ngovernmental\tinvestigations\tand\tproceedings.\nWe\tare\tcooperating\twith\tcertain\tgovernment\tinvestigations\tas\tdiscussed\tin\tNote\t15,\tCommitments\tand\tContingencies,\tto\tthe\tconsolidated\tfinancial\nstatements\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K.\tTo\tour\tknowledge,\tno\tgovernment\tagency\tin\tany\tsuch\tongoing\tinvestigation\thas\nconcluded\tthat\tany\twrongdoing\toccurred.\tHowever,\twe\tcannot\tpredict\tthe\toutcome\tor\timpact\tof\tany\tsuch\tongoing\tmatters,\tand\tthere\texists\tthe\tpossibility\nthat\twe\tcould\tbe\tsubject\tto\tliability,\tpenalties\tand\tother\trestrictive\tsanctions\tand\tadverse\tconsequences\tif\tthe\tSEC,\tthe\tU.S.\tDepartment\tof\tJustice\tor\tany\nother\tgovernment\tagency\twere\tto\tpursue\tlegal\taction\tin\tthe\tfuture.\tMoreover,\twe\texpect\tto\tincur\tcosts\tin\tresponding\tto\trelated\trequests\tfor\tinformation\nand\tsubpoenas,\tand\tif\tinstituted,\tin\tdefending\tagainst\tany\tgovernmental\tproceedings.\nWe\tmay\tface\tregulatory\tchallenges\tto\tor\tlimitations\ton\tour\tability\tto\tsell\tvehicles\tdirectly.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 28, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "While\twe\tintend\tto\tcontinue\tto\tleverage\tour\tmost\teffective\tsales\tstrategies,\tincluding\tsales\tthrough\tour\twebsite,\twe\tmay\tnot\tbe\table\tto\tsell\tour\nvehicles\tthrough\tour\town\tstores\tin\tcertain\tstates\tin\tthe\tU.S.\twith\tlaws\tthat\tmay\tbe\tinterpreted\tto\timpose\tlimitations\ton\tthis\tdirect-to-consumer\tsales\nmodel.\tIt\thas\talso\tbeen\tasserted\tthat\tthe\tlaws\tin\tsome\tstates\tlimit\tour\tability\tto\tobtain\tdealer\tlicenses\tfrom\tstate\tmotor\tvehicle\tregulators,\tand\tsuch\nassertions\tpersist.\tIn\tcertain\tlocations,\tdecisions\tby\tregulators\tpermitting\tus\tto\tsell\tvehicles\thave\tbeen,\tand\tmay\tbe,\tchallenged\tby\tdealer\tassociations\nand\tothers\tas\tto\twhether\tsuch\tdecisions\tcomply\twith\tapplicable\tstate\tmotor\tvehicle\tindustry\tlaws.\tWe\thave\tprevailed\tin\tmany\tof\tthese\tlawsuits\tand\tsuch\nresults\thave\treinforced\tour\tcontinuing\tbelief\tthat\tstate\tfranchise\tlaws\twere\tnot\tintended\tto\tapply\tto\ta\tmanufacturer\tthat\tdoes\tnot\thave\tfranchise\tdealers\nanywhere\tin\tthe\tworld.\tIn\tsome\tstates,\tthere\thave\talso\tbeen\tregulatory\tand\tlegislative\tefforts\tby\tdealer\tassociations\tto\tpropose\tlaws\tthat,\tif\tenacted,\nwould\tprevent\tus\tfrom\tobtaining\tdealer\tlicenses\tin\ttheir\tstates\tgiven\tour\tcurrent\tsales\tmodel.\tA\tfew\tstates\thave\tpassed\tlegislation\tthat\tclarifies\tour\tability\nto\toperate,\tbut\tat\tthe\tsame\ttime\tlimits\tthe\tnumber\tof\tdealer\tlicenses\twe\tcan\tobtain\tor\tstores\tthat\twe\tcan\toperate.\tThe\tapplication\tof\tstate\tlaws\tapplicable\nto\tour\toperations\tcontinues\tto\tbe\tdifficult\tto\tpredict.\nInternationally,\tthere\tmay\tbe\tlaws\tin\tjurisdictions\twe\thave\tnot\tyet\tentered\tor\tlaws\twe\tare\tunaware\tof\tin\tjurisdictions\twe\thave\tentered\tthat\tmay\nrestrict\tour\tsales\tor\tother\tbusiness\tpractices.\tEven\tfor\tthose\tjurisdictions\twe\thave\tanalyzed,\tthe\tlaws\tin\tthis\tarea\tcan\tbe\tcomplex,\tdifficult\tto\tinterpret\tand\nmay\tchange\tover\ttime.\tContinued\tregulatory\tlimitations\tand\tother\tobstacles\tinterfering\twith\tour\tability\tto\tsell\tvehicles\tdirectly\tto\tconsumers\tmay\tharm\nour\tfinancial\tcondition\tand\toperating\tresults.\nRisks\tRelated\tto\tthe\tOwnership\tof\tOur\tCommon\tStock", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 28, "lines": { "from": 17, "to": 31 } } } }, { "pageContent": "The\ttrading\tprice\tof\tour\tcommon\tstock\tis\tlikely\tto\tcontinue\tto\tbe\tvolatile.\nThe\ttrading\tprice\tof\tour\tcommon\tstock\thas\tbeen\thighly\tvolatile\tand\tcould\tcontinue\tto\tbe\tsubject\tto\twide\tfluctuations\tin\tresponse\tto\tvarious\tfactors,\nsome\tof\twhich\tare\tbeyond\tour\tcontrol.\tOur\tcommon\tstock\thas\texperienced\tover\tthe\tlast\t52\tweeks\tan\tintra-day\ttrading\thigh\tof\t$299.29\tper\tshare\tand\ta\nlow\tof\t$152.37\tper\tshare.\tThe\tstock\tmarket\tin\tgeneral,\tand\tthe\tmarket\tfor\ttechnology\tcompanies\tin\tparticular,\thas\texperienced\textreme\tprice\tand\tvolume\nfluctuations\tthat\thave\toften\tbeen\tunrelated\tor\tdisproportionate\tto\tthe\toperating\tperformance\tof\tthose\tcompanies.\tIn\tparticular,\ta\tlarge\tproportion\tof\tour\ncommon\tstock\thas\tbeen\thistorically\tand\tmay\tin\tthe\tfuture\tbe\ttraded\tby\tshort\tsellers\twhich\tmay\tput\tpressure\ton\tthe\tsupply\tand\tdemand\tfor\tour\tcommon\nstock,\tfurther\tinfluencing\tvolatility\tin\tits\tmarket\tprice.\tPublic\tperception\tof\tour\tcompany\tor\tmanagement\tand\tother\tfactors\toutside\tof\tour\tcontrol\tmay\nadditionally\timpact\tthe\tstock\tprice\tof\tcompanies\tlike\tus\tthat\tgarner\ta\tdisproportionate\tdegree\tof\tpublic\tattention,\tregardless\tof\tactual\toperating\nperformance.\tIn\taddition,\tin\tthe\tpast,\tfollowing\tperiods\tof\tvolatility\tin\tthe\toverall\tmarket\tor\tthe\tmarket\tprice\tof\tour\tshares,\tsecurities\tclass\taction\tlitigation\nhas\tbeen\tfiled\tagainst\tus.\tWhile\twe\tdefend\tsuch\tactions\tvigorously,\tany\tjudgment\tagainst\tus\tor\tany\tfuture\tstockholder\tlitigation\tcould\tresult\tin\tsubstantial\ncosts\tand\ta\tdiversion\tof\tour\tmanagement’s\tattention\tand\tresources.\n27", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 28, "lines": { "from": 32, "to": 43 } } } }, { "pageContent": "Table\tof\tContents\nOur\tfinancial\tresults\tmay\tvary\tsignificantly\tfrom\tperiod\tto\tperiod\tdue\tto\tfluctuations\tin\tour\toperating\tcosts\tand\tother\tfactors.\nWe\texpect\tour\tperiod-to-period\tfinancial\tresults\tto\tvary\tbased\ton\tour\toperating\tcosts,\twhich\twe\tanticipate\twill\tfluctuate\tas\tthe\tpace\tat\twhich\twe\ncontinue\tto\tdesign,\tdevelop\tand\tmanufacture\tnew\tproducts\tand\tincrease\tproduction\tcapacity\tby\texpanding\tour\tcurrent\tmanufacturing\tfacilities\tand\nadding\tfuture\tfacilities,\tmay\tnot\tbe\tconsistent\tor\tlinear\tbetween\tperiods.\tAdditionally,\tour\trevenues\tfrom\tperiod\tto\tperiod\tmay\tfluctuate\tas\twe\tintroduce\nexisting\tproducts\tto\tnew\tmarkets\tfor\tthe\tfirst\ttime\tand\tas\twe\tdevelop\tand\tintroduce\tnew\tproducts.\tAs\ta\tresult\tof\tthese\tfactors,\twe\tbelieve\tthat\tquarter-to-\nquarter\tcomparisons\tof\tour\tfinancial\tresults,\tespecially\tin\tthe\tshort\tterm,\tare\tnot\tnecessarily\tmeaningful\tand\tthat\tthese\tcomparisons\tcannot\tbe\trelied\nupon\tas\tindicators\tof\tfuture\tperformance.\tMoreover,\tour\tfinancial\tresults\tmay\tnot\tmeet\texpectations\tof\tequity\tresearch\tanalysts,\tratings\tagencies\tor\ninvestors,\twho\tmay\tbe\tfocused\tonly\ton\tshort-term\tquarterly\tfinancial\tresults.\tIf\tany\tof\tthis\toccurs,\tthe\ttrading\tprice\tof\tour\tstock\tcould\tfall\tsubstantially,\neither\tsuddenly\tor\tover\ttime.\nWe\tmay\tfail\tto\tmeet\tour\tpublicly\tannounced\tguidance\tor\tother\texpectations\tabout\tour\tbusiness,\twhich\tcould\tcause\tour\tstock\tprice\nto\tdecline.\nWe\tprovide\tfrom\ttime\tto\ttime\tguidance\tregarding\tour\texpected\tfinancial\tand\tbusiness\tperformance.\tCorrectly\tidentifying\tkey\tfactors\taffecting\nbusiness\tconditions\tand\tpredicting\tfuture\tevents\tis\tinherently\tan\tuncertain\tprocess,\tand\tour\tguidance\tmay\tnot\tultimately\tbe\taccurate\tand\thas\tin\tthe\tpast\nbeen\tinaccurate\tin\tcertain\trespects,\tsuch\tas\tthe\ttiming\tof\tnew\tproduct\tmanufacturing\tramps.\tOur\tguidance\tis\tbased\ton\tcertain\tassumptions\tsuch\tas\tthose\nrelating\tto\tanticipated\tproduction\tand\tsales\tvolumes\t(which\tgenerally\tare\tnot\tlinear\tthroughout\ta\tgiven\tperiod),\taverage\tsales\tprices,\tsupplier\tand", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 29, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "commodity\tcosts\tand\tplanned\tcost\treductions.\tIf\tour\tguidance\tvaries\tfrom\tactual\tresults,\tsuch\tas\tdue\tto\tour\tassumptions\tnot\tbeing\tmet\tor\tthe\timpact\ton\nour\tfinancial\tperformance\tthat\tcould\toccur\tas\ta\tresult\tof\tvarious\trisks\tand\tuncertainties,\tthe\tmarket\tvalue\tof\tour\tcommon\tstock\tcould\tdecline\tsignificantly.\nIf\tElon\tMusk\twere\tforced\tto\tsell\tshares\tof\tour\tcommon\tstock,\teither\tthat\the\thas\tpledged\tto\tsecure\tcertain\tpersonal\tloan\tobligations,\nor\tin\tsatisfaction\tof\tother\tobligations,\tsuch\tsales\tcould\tcause\tour\tstock\tprice\tto\tdecline.\nCertain\tbanking\tinstitutions\thave\tmade\textensions\tof\tcredit\tto\tElon\tMusk,\tour\tChief\tExecutive\tOfficer,\ta\tportion\tof\twhich\twas\tused\tto\tpurchase\nshares\tof\tcommon\tstock\tin\tcertain\tof\tour\tpublic\tofferings\tand\tprivate\tplacements\tat\tthe\tsame\tprices\toffered\tto\tthird-party\tparticipants\tin\tsuch\tofferings\nand\tplacements.\tWe\tare\tnot\ta\tparty\tto\tthese\tloans,\twhich\tare\tpartially\tsecured\tby\tpledges\tof\ta\tportion\tof\tthe\tTesla\tcommon\tstock\tcurrently\towned\tby\tMr.\nMusk.\tIf\tthe\tprice\tof\tour\tcommon\tstock\twere\tto\tdecline\tsubstantially,\tMr.\tMusk\tmay\tbe\tforced\tby\tone\tor\tmore\tof\tthe\tbanking\tinstitutions\tto\tsell\tshares\tof\nTesla\tcommon\tstock\tto\tsatisfy\this\tloan\tobligations\tif\the\tcould\tnot\tdo\tso\tthrough\tother\tmeans.\tAny\tsuch\tsales\tcould\tcause\tthe\tprice\tof\tour\tcommon\tstock\nto\tdecline\tfurther.\tFurther,\tMr.\tMusk\tfrom\ttime\tto\ttime\tmay\tcommit\tto\tinvesting\tin\tsignificant\tbusiness\tor\tother\tventures,\tand\tas\ta\tresult,\tbe\trequired\tto\nsell\tshares\tof\tour\tcommon\tstock\tin\tsatisfaction\tof\tsuch\tcommitments.\nAnti-takeover\tprovisions\tcontained\tin\tour\tgoverning\tdocuments,\tapplicable\tlaws\tand\tour\tconvertible\tsenior\tnotes\tcould\timpair\ta\ntakeover\tattempt.\nOur\tcertificate\tof\tincorporation\tand\tbylaws\tafford\tcertain\trights\tand\tpowers\tto\tour\tboard\tof\tdirectors\tthat\tmay\tfacilitate\tthe\tdelay\tor\tprevention\tof\tan\nacquisition\tthat\tit\tdeems\tundesirable.\tWe\tare\talso\tsubject\tto\tSection\t203\tof\tthe\tDelaware\tGeneral\tCorporation\tLaw\tand\tother\tprovisions\tof\tDelaware\tlaw", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 29, "lines": { "from": 17, "to": 31 } } } }, { "pageContent": "that\tlimit\tthe\tability\tof\tstockholders\tin\tcertain\tsituations\tto\teffect\tcertain\tbusiness\tcombinations.\tIn\taddition,\tthe\tterms\tof\tour\tconvertible\tsenior\tnotes\tmay\nrequire\tus\tto\trepurchase\tsuch\tnotes\tin\tthe\tevent\tof\ta\tfundamental\tchange,\tincluding\ta\ttakeover\tof\tour\tcompany.\tAny\tof\tthe\tforegoing\tprovisions\tand\nterms\tthat\thas\tthe\teffect\tof\tdelaying\tor\tdeterring\ta\tchange\tin\tcontrol\tcould\tlimit\tthe\topportunity\tfor\tour\tstockholders\tto\treceive\ta\tpremium\tfor\ttheir\tshares\nof\tour\tcommon\tstock,\tand\tcould\talso\taffect\tthe\tprice\tthat\tsome\tinvestors\tare\twilling\tto\tpay\tfor\tour\tcommon\tstock.\nITEM\t1B.\tUNRESOLVED\tSTAFF\tCOMMENTS\nNone.\n28", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 29, "lines": { "from": 32, "to": 38 } } } }, { "pageContent": "ITEM\t1C.\tCYBERSECURITY\nCybersecurity\tRisk\tManagement\tand\tStrategy\nWe\trecognize\tthe\timportance\tof\tassessing,\tidentifying,\tand\tmanaging\tmaterial\trisks\tassociated\twith\tcybersecurity\tthreats,\tas\tsuch\tterm\tis\tdefined\tin\nItem\t106(a)\tof\tRegulation\tS-K.\tThese\trisks\tinclude,\tamong\tother\tthings:\toperational\trisks,\tintellectual\tproperty\ttheft,\tfraud,\textortion,\tharm\tto\temployees\nor\tcustomers\tand\tviolation\tof\tdata\tprivacy\tor\tsecurity\tlaws.\nIdentifying\tand\tassessing\tcybersecurity\trisk\tis\tintegrated\tinto\tour\toverall\trisk\tmanagement\tsystems\tand\tprocesses.\tCybersecurity\trisks\trelated\tto\tour\nbusiness,\ttechnical\toperations,\tprivacy\tand\tcompliance\tissues\tare\tidentified\tand\taddressed\tthrough\ta\tmulti-faceted\tapproach\tincluding\tthird\tparty\nassessments,\tinternal\tIT\tAudit,\tIT\tsecurity,\tgovernance,\trisk\tand\tcompliance\treviews.\tTo\tdefend,\tdetect\tand\trespond\tto\tcybersecurity\tincidents,\twe,\namong\tother\tthings:\tconduct\tproactive\tprivacy\tand\tcybersecurity\treviews\tof\tsystems\tand\tapplications,\taudit\tapplicable\tdata\tpolicies,\tperform\tpenetration\ntesting\tusing\texternal\tthird-party\ttools\tand\ttechniques\tto\ttest\tsecurity\tcontrols,\toperate\ta\tbug\tbounty\tprogram\tto\tencourage\tproactive\tvulnerability\nreporting,\tconduct\temployee\ttraining,\tmonitor\temerging\tlaws\tand\tregulations\trelated\tto\tdata\tprotection\tand\tinformation\tsecurity\t(including\tour\tconsumer\nproducts)\tand\timplement\tappropriate\tchanges.\nWe\thave\timplemented\tincident\tresponse\tand\tbreach\tmanagement\tprocesses\twhich\thave\tfour\toverarching\tand\tinterconnected\tstages:\t1)\npreparation\tfor\ta\tcybersecurity\tincident,\t2)\tdetection\tand\tanalysis\tof\ta\tsecurity\tincident,\t3)\tcontainment,\teradication\tand\trecovery,\tand\t4)\tpost-incident\nanalysis.\tSuch\tincident\tresponses\tare\toverseen\tby\tleaders\tfrom\tour\tInformation\tSecurity,\tProduct\tSecurity,\tCompliance\tand\tLegal\tteams\tregarding\nmatters\tof\tcybersecurity.\nSecurity\tevents\tand\tdata\tincidents\tare\tevaluated,\tranked\tby\tseverity\tand\tprioritized\tfor\tresponse\tand\tremediation.\tIncidents\tare\tevaluated\tto", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 30, "lines": { "from": 1, "to": 17 } } } }, { "pageContent": "determine\tmateriality\tas\twell\tas\toperational\tand\tbusiness\timpact,\tand\treviewed\tfor\tprivacy\timpact.\nWe\talso\tconduct\ttabletop\texercises\tto\tsimulate\tresponses\tto\tcybersecurity\tincidents.\tOur\tteam\tof\tcybersecurity\tprofessionals\tthen\tcollaborate\twith\ntechnical\tand\tbusiness\tstakeholders\tacross\tour\tbusiness\tunits\tto\tfurther\tanalyze\tthe\trisk\tto\tthe\tcompany,\tand\tform\tdetection,\tmitigation\tand\tremediation\nstrategies.\nAs\tpart\tof\tthe\tabove\tprocesses,\twe\tregularly\tengage\texternal\tauditors\tand\tconsultants\tto\tassess\tour\tinternal\tcybersecurity\tprograms\tand\ncompliance\twith\tapplicable\tpractices\tand\tstandards.\tAs\tof\t2023,\tour\tInformation\tSecurity\tManagement\tSystem\thas\tbeen\tcertified\tto\tconform\tto\tthe\nrequirements\tof\tISO/IEC\t27001:2013.\nOur\trisk\tmanagement\tprogram\talso\tassesses\tthird\tparty\trisks,\tand\twe\tperform\tthird-party\trisk\tmanagement\tto\tidentify\tand\tmitigate\trisks\tfrom\tthird\nparties\tsuch\tas\tvendors,\tsuppliers,\tand\tother\tbusiness\tpartners\tassociated\twith\tour\tuse\tof\tthird-party\tservice\tproviders.\tCybersecurity\trisks\tare\tevaluated\nwhen\tdetermining\tthe\tselection\tand\toversight\tof\tapplicable\tthird-party\tservice\tproviders\tand\tpotential\tfourth-party\trisks\twhen\thandling\tand/or\tprocessing\nour\temployee,\tbusiness\tor\tcustomer\tdata.\tIn\taddition\tto\tnew\tvendor\tonboarding,\twe\tperform\trisk\tmanagement\tduring\tthird-party\tcybersecurity\ncompromise\tincidents\tto\tidentify\tand\tmitigate\trisks\tto\tus\tfrom\tthird-party\tincidents.\nWe\tdescribe\twhether\tand\thow\trisks\tfrom\tidentified\tcybersecurity\tthreats,\tincluding\tas\ta\tresult\tof\tany\tprevious\tcybersecurity\tincidents,\thave\nmaterially\taffected\tor\tare\treasonably\tlikely\tto\tmaterially\taffect\tus,\tincluding\tour\tbusiness\tstrategy,\tresults\tof\toperations,\tor\tfinancial\tcondition,\tunder\tthe\nheading\t“Our\tinformation\ttechnology\tsystems\tor\tdata,\tor\tthose\tof\tour\tservice\tproviders\tor\tcustomers\tor\tusers\tcould\tbe\tsubject\tto\tcyber-attacks\tor\tother", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 30, "lines": { "from": 18, "to": 32 } } } }, { "pageContent": "security\tincidents,\twhich\tcould\tresult\tin\tdata\tbreaches,\tintellectual\tproperty\ttheft,\tclaims,\tlitigation,\tregulatory\tinvestigations,\tsignificant\tliability,\nreputational\tdamage\tand\tother\tadverse\tconsequences”\tincluded\tas\tpart\tof\tour\trisk\tfactor\tdisclosures\tat\tItem\t1A\tof\tthis\tAnnual\tReport\ton\tForm\t10-K.\nCybersecurity\tGovernance\nCybersecurity\tis\tan\timportant\tpart\tof\tour\trisk\tmanagement\tprocesses\tand\tan\tarea\tof\tfocus\tfor\tour\tBoard\tand\tmanagement.\tOur\tAudit\tCommittee\tis\nresponsible\tfor\tthe\toversight\tof\trisks\tfrom\tcybersecurity\tthreats.\tMembers\tof\tthe\tAudit\tCommittee\treceive\tupdates\ton\ta\tquarterly\tbasis\tfrom\tsenior\nmanagement,\tincluding\tleaders\tfrom\tour\tInformation\tSecurity,\tProduct\tSecurity,\tCompliance\tand\tLegal\tteams\tregarding\tmatters\tof\tcybersecurity.\tThis\nincludes\texisting\tand\tnew\tcybersecurity\trisks,\tstatus\ton\thow\tmanagement\tis\taddressing\tand/or\tmitigating\tthose\trisks,\tcybersecurity\tand\tdata\tprivacy\nincidents\t(if\tany)\tand\tstatus\ton\tkey\tinformation\tsecurity\tinitiatives.\tOur\tBoard\tmembers\talso\tengage\tin\tad\thoc\tconversations\twith\tmanagement\ton\ncybersecurity-related\tnews\tevents\tand\tdiscuss\tany\tupdates\tto\tour\tcybersecurity\trisk\tmanagement\tand\tstrategy\tprograms.\n29", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 30, "lines": { "from": 33, "to": 42 } } } }, { "pageContent": "Our\tcybersecurity\trisk\tmanagement\tand\tstrategy\tprocesses\tare\toverseen\tby\tleaders\tfrom\tour\tInformation\tSecurity,\tProduct\tSecurity,\tCompliance\nand\tLegal\tteams.\tSuch\tindividuals\thave\tan\taverage\tof\tover\t15\tyears\tof\tprior\twork\texperience\tin\tvarious\troles\tinvolving\tinformation\ttechnology,\tincluding\nsecurity,\tauditing,\tcompliance,\tsystems\tand\tprogramming.\tThese\tindividuals\tare\tinformed\tabout,\tand\tmonitor\tthe\tprevention,\tmitigation,\tdetection\tand\nremediation\tof\tcybersecurity\tincidents\tthrough\ttheir\tmanagement\tof,\tand\tparticipation\tin,\tthe\tcybersecurity\trisk\tmanagement\tand\tstrategy\tprocesses\ndescribed\tabove,\tincluding\tthe\toperation\tof\tour\tincident\tresponse\tplan,\tand\treport\tto\tthe\tAudit\tCommittee\ton\tany\tappropriate\titems.\nITEM\t2.\tPROPERTIES\nWe\tare\theadquartered\tin\tAustin,\tTexas.\tOur\tprincipal\tfacilities\tinclude\ta\tlarge\tnumber\tof\tproperties\tin\tNorth\tAmerica,\tEurope\tand\tAsia\tutilized\tfor\nmanufacturing\tand\tassembly,\twarehousing,\tengineering,\tretail\tand\tservice\tlocations,\tSupercharger\tsites\tand\tadministrative\tand\tsales\toffices.\tOur\tfacilities\nare\tused\tto\tsupport\tboth\tof\tour\treporting\tsegments,\tand\tare\tsuitable\tand\tadequate\tfor\tthe\tconduct\tof\tour\tbusiness.\tWe\tgenerally\tlease\tsuch\tfacilities\twith\nthe\tprimary\texception\tof\tsome\tmanufacturing\tfacilities.\tThe\tfollowing\ttable\tsets\tforth\tthe\tlocation\tof\tour\tprimary\towned\tand\tleased\tmanufacturing\nfacilities.\nPrimary\tManufacturing\tFacilitiesLocationOwned\tor\tLeased\nGigafactory\tTexasAustin,\tTexasOwned\nFremont\tFactoryFremont,\tCaliforniaOwned\nGigafactory\tNevadaSparks,\tNevadaOwned\nGigafactory\tBerlin-BrandenburgGrunheide,\tGermanyOwned\nGigafactory\tShanghaiShanghai,\tChina*\nGigafactory\tNew\tYorkBuffalo,\tNew\tYorkLeased\nMegafactoryLathrop,\tCaliforniaLeased\n*We\town\tthe\tbuilding\tand\tthe\tland\tuse\trights\twith\tan\tinitial\tterm\tof\t50\tyears.\tThe\tland\tuse\trights\tare\ttreated\tas\toperating\tlease\tright-of-use\tassets.\nITEM\t3.\tLEGAL\tPROCEEDINGS", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 31, "lines": { "from": 1, "to": 21 } } } }, { "pageContent": "ITEM\t3.\tLEGAL\tPROCEEDINGS\nFor\ta\tdescription\tof\tour\tmaterial\tpending\tlegal\tproceedings,\tplease\tsee\tNote\t15,\tCommitments\tand\tContingencies,\tto\tthe\tconsolidated\tfinancial\nstatements\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K.\nIn\taddition,\teach\tof\tthe\tmatters\tbelow\tis\tbeing\tdisclosed\tpursuant\tto\tItem\t103\tof\tRegulation\tS-K\tbecause\tit\trelates\tto\tenvironmental\tregulations\tand\naggregate\tcivil\tpenalties\tthat\twe\tcurrently\tbelieve\tcould\tpotentially\texceed\t$1\tmillion.\tWe\tbelieve\tthat\tany\tproceeding\tthat\tis\tmaterial\tto\tour\tbusiness\tor\nfinancial\tcondition\tis\tlikely\tto\thave\tpotential\tpenalties\tfar\tin\texcess\tof\tsuch\tamount.\nDistrict\tattorneys\tin\tcertain\tCalifornia\tcounties\tconducted\tan\tinvestigation\tinto\tTesla’s\twaste\tsegregation\tpractices\tpursuant\tto\tCal.\tHealth\t&\tSaf.\nCode\t§\t25100\tet\tseq.\tand\tCal.\tCivil\tCode\t§\t1798.80.\tTesla\thas\timplemented\tvarious\tremedial\tmeasures,\tincluding\tconducting\ttraining\tand\taudits,\tand\nenhancements\tto\tits\tsite\twaste\tmanagement\tprograms,\tand\tsettlement\tdiscussions\tare\tongoing.\tWhile\tthe\toutcome\tof\tthis\tmatter\tcannot\tbe\tdetermined\nat\tthis\ttime,\tit\tis\tnot\tcurrently\texpected\tto\thave\ta\tmaterial\tadverse\timpact\ton\tour\tbusiness.\nITEM\t4.\tMINE\tSAFETY\tDISCLOSURES\nNot\tapplicable.\n30", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 31, "lines": { "from": 21, "to": 33 } } } }, { "pageContent": "PART\tII\nITEM\t5.\tMARKET\tFOR\tREGISTRANT’S\tCOMMON\tEQUITY,\tRELATED\tSTOCKHOLDER\tMATTERS\tAND\tISSUER\tPURCHASES\tOF\tEQUITY\nSECURITIES\nMarket\tInformation\nOur\tcommon\tstock\thas\ttraded\ton\tThe\tNASDAQ\tGlobal\tSelect\tMarket\tunder\tthe\tsymbol\t“TSLA”\tsince\tit\tbegan\ttrading\ton\tJune\t29,\t2010.\tOur\tinitial\npublic\toffering\twas\tpriced\tat\tapproximately\t$1.13\tper\tshare\ton\tJune\t28,\t2010\tas\tadjusted\tto\tgive\teffect\tto\tthe\tthree-for-one\tstock\tsplit\teffected\tin\tthe\nform\tof\ta\tstock\tdividend\tin\tAugust\t2022\t(the\t“2022\tStock\tSplit”)\tand\tthe\tfive-for-one\tstock\tsplit\teffected\tin\tthe\tform\tof\ta\tstock\tdividend\tin\tAugust\t2020\n(the\t“2020\tStock\tSplit”).\nHolders\nAs\tof\tJanuary\t22,\t2024,\tthere\twere\t9,300\tholders\tof\trecord\tof\tour\tcommon\tstock.\tA\tsubstantially\tgreater\tnumber\tof\tholders\tof\tour\tcommon\tstock\tare\n“street\tname”\tor\tbeneficial\tholders,\twhose\tshares\tare\theld\tby\tbanks,\tbrokers\tand\tother\tfinancial\tinstitutions.\nDividend\tPolicy\nWe\thave\tnever\tdeclared\tor\tpaid\tcash\tdividends\ton\tour\tcommon\tstock.\tWe\tcurrently\tdo\tnot\tanticipate\tpaying\tany\tcash\tdividends\tin\tthe\tforeseeable\nfuture.\tAny\tfuture\tdetermination\tto\tdeclare\tcash\tdividends\twill\tbe\tmade\tat\tthe\tdiscretion\tof\tour\tboard\tof\tdirectors,\tsubject\tto\tapplicable\tlaws,\tand\twill\ndepend\ton\tour\tfinancial\tcondition,\tresults\tof\toperations,\tcapital\trequirements,\tgeneral\tbusiness\tconditions\tand\tother\tfactors\tthat\tour\tboard\tof\tdirectors\nmay\tdeem\trelevant.\nStock\tPerformance\tGraph\nThis\tperformance\tgraph\tshall\tnot\tbe\tdeemed\t“filed”\tfor\tpurposes\tof\tSection\t18\tof\tthe\tSecurities\tExchange\tAct\tof\t1934,\tas\tamended\t(the\t“Exchange\nAct”),\tor\tincorporated\tby\treference\tinto\tany\tfiling\tof\tTesla,\tInc.\tunder\tthe\tSecurities\tAct\tof\t1933,\tas\tamended\t(the\t“Securities\tAct”),\tor\tthe\tExchange\tAct,\nexcept\tas\tshall\tbe\texpressly\tset\tforth\tby\tspecific\treference\tin\tsuch\tfiling.\nThe\tfollowing\tgraph\tshows\ta\tcomparison,\tfrom\tJanuary\t1,\t2019\tthrough\tDecember\t31,\t2023,\tof\tthe\tcumulative\ttotal\treturn\ton\tour\tcommon\tstock,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 32, "lines": { "from": 1, "to": 21 } } } }, { "pageContent": "The\tNASDAQ\tComposite\tIndex\tand\ta\tgroup\tof\tall\tpublic\tcompanies\tsharing\tthe\tsame\tSIC\tcode\tas\tus,\twhich\tis\tSIC\tcode\t3711,\t“Motor\tVehicles\tand\nPassenger\tCar\tBodies”\t(Motor\tVehicles\tand\tPassenger\tCar\tBodies\tPublic\tCompany\tGroup).\tSuch\treturns\tare\tbased\ton\thistorical\tresults\tand\tare\tnot\nintended\tto\tsuggest\tfuture\tperformance.\tData\tfor\tThe\tNASDAQ\tComposite\tIndex\tand\tthe\tMotor\tVehicles\tand\tPassenger\tCar\tBodies\tPublic\tCompany\tGroup\nassumes\tan\tinvestment\tof\t$100\ton\tJanuary\t1,\t2019\tand\treinvestment\tof\tdividends.\tWe\thave\tnever\tdeclared\tor\tpaid\tcash\tdividends\ton\tour\tcommon\tstock\nnor\tdo\twe\tanticipate\tpaying\tany\tsuch\tcash\tdividends\tin\tthe\tforeseeable\tfuture.\n31", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 32, "lines": { "from": 22, "to": 27 } } } }, { "pageContent": "Unregistered\tSales\tof\tEquity\tSecurities\tand\tUse\tof\tProceeds\nNone.\nPurchases\tof\tEquity\tSecurities\tby\tthe\tIssuer\tand\tAffiliated\tPurchasers\nNone.\nITEM\t6.\t[RESERVED]\n32", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 33, "lines": { "from": 1, "to": 6 } } } }, { "pageContent": "ITEM\t7.\tMANAGEMENT’S\tDISCUSSION\tAND\tANALYSIS\tOF\tFINANCIAL\tCONDITION\tAND\tRESULTS\tOF\tOPERATIONS\nThe\tfollowing\tdiscussion\tand\tanalysis\tshould\tbe\tread\tin\tconjunction\twith\tthe\tconsolidated\tfinancial\tstatements\tand\tthe\trelated\tnotes\tincluded\nelsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K.\tFor\tfurther\tdiscussion\tof\tour\tproducts\tand\tservices,\ttechnology\tand\tcompetitive\tstrengths,\trefer\tto\tItem\t1-\nBusiness.\tFor\tdiscussion\trelated\tto\tchanges\tin\tfinancial\tcondition\tand\tthe\tresults\tof\toperations\tfor\tfiscal\tyear\t2022-related\titems,\trefer\tto\tPart\tII,\tItem\t7.\nManagement’s\tDiscussion\tand\tAnalysis\tof\tFinancial\tCondition\tand\tResults\tof\tOperations\tin\tour\tAnnual\tReport\ton\tForm\t10-K\tfor\tfiscal\tyear\t2022,\twhich\twas\nfiled\twith\tthe\tSecurities\tand\tExchange\tCommission\ton\tJanuary\t31,\t2023.\nOverview\tand\t2023\tHighlights\nOur\tmission\tis\tto\taccelerate\tthe\tworld’s\ttransition\tto\tsustainable\tenergy.\tWe\tdesign,\tdevelop,\tmanufacture,\tlease\tand\tsell\thigh-performance\tfully\nelectric\tvehicles,\tsolar\tenergy\tgeneration\tsystems\tand\tenergy\tstorage\tproducts.\tWe\talso\toffer\tmaintenance,\tinstallation,\toperation,\tcharging,\tinsurance,\nfinancial\tand\tother\tservices\trelated\tto\tour\tproducts.\tAdditionally,\twe\tare\tincreasingly\tfocused\ton\tproducts\tand\tservices\tbased\ton\tartificial\tintelligence,\nrobotics\tand\tautomation.\nIn\t2023,\twe\tproduced\t1,845,985\tconsumer\tvehicles\tand\tdelivered\t1,808,581\tconsumer\tvehicles.\tWe\tare\tcurrently\tfocused\ton\tincreasing\tvehicle\nproduction,\tcapacity\tand\tdelivery\tcapabilities,\treducing\tcosts,\timproving\tand\tdeveloping\tour\tvehicles\tand\tbattery\ttechnologies,\tvertically\tintegrating\tand\nlocalizing\tour\tsupply\tchain,\timproving\tand\tfurther\tdeploying\tour\tFSD\tcapabilities,\tincreasing\tthe\taffordability\tand\tefficiency\tof\tour\tvehicles,\tbringing\tnew\nproducts\tto\tmarket\tand\texpanding\tour\tglobal\tinfrastructure,\tincluding\tour\tservice\tand\tcharging\tinfrastructure.\nIn\t2023,\twe\tdeployed\t14.72\tGWh\tof\tenergy\tstorage\tproducts\tand\t223\tmegawatts\tof\tsolar\tenergy\tsystems.\tWe\tare\tcurrently\tfocused\ton\tramping", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 34, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "production\tof\tenergy\tstorage\tproducts,\timproving\tour\tSolar\tRoof\tinstallation\tcapability\tand\tefficiency,\tand\tincreasing\tmarket\tshare\tof\tretrofit\tsolar\tenergy\nsystems.\nIn\t2023,\twe\trecognized\ttotal\trevenues\tof\t$96.77\tbillion,\trepresenting\tan\tincrease\tof\t$15.31\tbillion,\tcompared\tto\tthe\tprior\tyear.\tWe\tcontinue\tto\tramp\nproduction,\tbuild\tnew\tmanufacturing\tcapacity\tand\texpand\tour\toperations\tto\tenable\tincreased\tdeliveries\tand\tdeployments\tof\tour\tproducts,\tand\tinvest\tin\nresearch\tand\tdevelopment\tto\taccelerate\tour\tAI,\tsoftware\tand\tfleet-based\tprofits\tfor\tfurther\trevenue\tgrowth.\nIn\t2023,\tour\tnet\tincome\tattributable\tto\tcommon\tstockholders\twas\t$15.00\tbillion,\trepresenting\ta\tfavorable\tchange\tof\t$2.44\tbillion,\tcompared\tto\tthe\nprior\tyear.\tThis\tincluded\ta\tone-time\tnon-cash\ttax\tbenefit\tof\t$5.93\tbillion\tfor\tthe\trelease\tof\tvaluation\tallowance\ton\tcertain\tdeferred\ttax\tassets.\tWe\tcontinue\nto\tfocus\ton\tfurther\tcost\treductions\tand\toperational\tefficiencies\twhile\tmaximizing\tdelivery\tvolumes.\nWe\tended\t2023\twith\t$29.09\tbillion\tin\tcash\tand\tcash\tequivalents\tand\tinvestments,\trepresenting\tan\tincrease\tof\t$6.91\tbillion\tfrom\tthe\tend\tof\t2022.\nOur\tcash\tflows\tprovided\tby\toperating\tactivities\tin\t2023\tand\t2022\twere\t$13.26\tbillion\tand\t$14.72\tbillion,\trespectively,\trepresenting\ta\tdecrease\tof\t$1.47\nbillion.\tCapital\texpenditures\tamounted\tto\t$8.90\tbillion\tin\t2023,\tcompared\tto\t$7.16\tbillion\tin\t2022,\trepresenting\tan\tincrease\tof\t$1.74\tbillion.\tSustained\ngrowth\thas\tallowed\tour\tbusiness\tto\tgenerally\tfund\titself,\tand\twe\twill\tcontinue\tinvesting\tin\ta\tnumber\tof\tcapital-intensive\tprojects\tand\tresearch\tand\ndevelopment\tin\tupcoming\tperiods.\n33", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 34, "lines": { "from": 17, "to": 30 } } } }, { "pageContent": "Management\tOpportunities,\tChallenges\tand\tUncertainties\tand\t2024\tOutlook\nAutomotive—Production\nThe\tfollowing\tis\ta\tsummary\tof\tthe\tstatus\tof\tproduction\tof\teach\tof\tour\tannounced\tvehicle\tmodels\tin\tproduction\tand\tunder\tdevelopment,\tas\tof\tthe\ndate\tof\tthis\tAnnual\tReport\ton\tForm\t10-K:\nProduction\tLocationVehicle\tModel(s)Production\tStatus\nFremont\tFactoryModel\tS\t/\tModel\tXActive\n\tModel\t3\t/\tModel\tYActive\nGigafactory\tShanghaiModel\t3\t/\tModel\tYActive\nGigafactory\tBerlin-BrandenburgModel\tYActive\nGigafactory\tTexasModel\tYActive\n\tCybertruckActive\nGigafactory\tNevadaTesla\tSemiPilot\tproduction\nVariousNext\tGeneration\tPlatformIn\tdevelopment\nTBDTesla\tRoadsterIn\tdevelopment\nWe\tare\tfocused\ton\tgrowing\tour\tmanufacturing\tcapacity,\twhich\tincludes\tcapacity\tfor\tmanufacturing\tnew\tvehicle\tmodels\tsuch\tas\tour\tCybertruck\tand\nnext\tgeneration\tplatform,\tand\tramping\tall\tof\tour\tproduction\tvehicles\tto\ttheir\tinstalled\tproduction\tcapacities\tas\twell\tas\tincreasing\tproduction\trate\tand\nefficiency\tat\tour\tcurrent\tfactories.\tThe\tnext\tphase\tof\tproduction\tgrowth\twill\tdepend\ton\tthe\tcontinued\tramp\tat\tour\tfactories\tand\tthe\tintroduction\tof\tour\nnext\tgeneration\tplatform,\tas\twell\tas\tour\tability\tto\tadd\tto\tour\tavailable\tsources\tof\tbattery\tcell\tsupply\tby\tmanufacturing\tour\town\tcells\tthat\twe\tare\ndeveloping\tto\thave\thigh-volume\toutput,\tlower\tcapital\tand\tproduction\tcosts\tand\tlonger\trange.\tOur\tgoals\tare\tto\timprove\tvehicle\tperformance,\tdecrease\nproduction\tcosts\tand\tincrease\taffordability\tand\tcustomer\tawareness.\nThese\tplans\tare\tsubject\tto\tuncertainties\tinherent\tin\testablishing\tand\tramping\tmanufacturing\toperations,\twhich\tmay\tbe\texacerbated\tby\tnew\tproduct\nand\tmanufacturing\ttechnologies\twe\tintroduce,\tthe\tnumber\tof\tconcurrent\tinternational\tprojects,\tany\tindustry-wide\tcomponent\tconstraints,\tlabor\tshortages\nand\tany\tfuture\timpact\tfrom\tevents\toutside\tof\tour\tcontrol.\tFor\texample,\tduring\tthe\tthird\tquarter\tof\t2023,\twe\texperienced\ta\tsequential\tdecline\tin", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 35, "lines": { "from": 1, "to": 23 } } } }, { "pageContent": "production\tvolumes\tdue\tto\tpre-planned\tshutdowns\tfor\tupgrades\tat\tvarious\tfactories.\tMoreover,\twe\thave\tset\tambitious\ttechnological\ttargets\twith\tour\nplans\tfor\tbattery\tcells\tas\twell\tas\tfor\titerative\tmanufacturing\tand\tdesign\timprovements\tfor\tour\tvehicles\twith\teach\tnew\tfactory.\nAutomotive—Demand,\tSales,\tDeliveries\tand\tInfrastructure\nOur\tcost\treduction\tefforts,\tcost\tinnovation\tstrategies,\tand\tadditional\tlocalized\tprocurement\tand\tmanufacturing\tare\tkey\tto\tour\tvehicles’\taffordability\nand\thave\tallowed\tus\tto\tcompetitively\tprice\tour\tvehicles.\tWe\twill\talso\tcontinue\tto\tgenerate\tdemand\tand\tbrand\tawareness\tby\timproving\tour\tvehicles’\nperformance\tand\tfunctionality,\tincluding\tthrough\tproducts\tbased\ton\tartificial\tintelligence\tsuch\tas\tAutopilot,\tFSD\tCapability,\tand\tother\tsoftware\tfeatures\nand\tdelivering\tnew\tvehicles,\tsuch\tas\tour\tCybertruck.\tMoreover,\twe\texpect\tto\tcontinue\tto\tbenefit\tfrom\tongoing\telectrification\tof\tthe\tautomotive\tsector\tand\nincreasing\tenvironmental\tregulations\tand\tinitiatives.\nHowever,\twe\toperate\tin\ta\tcyclical\tindustry\tthat\tis\tsensitive\tto\tpolitical\tand\tregulatory\tuncertainty,\tincluding\twith\trespect\tto\ttrade\tand\tthe\nenvironment,\tall\tof\twhich\tcan\tbe\tcompounded\tby\tinflationary\tpressures,\trising\tenergy\tprices,\tinterest\trate\tfluctuations\tand\tthe\tliquidity\tof\tenterprise\ncustomers.\tFor\texample,\tinflationary\tpressures\thave\tincreased\tacross\tthe\tmarkets\tin\twhich\twe\toperate.\tIn\tan\teffort\tto\tcurb\tthis\ttrend,\tcentral\tbanks\tin\ndeveloped\tcountries\traised\tinterest\trates\trapidly\tand\tsubstantially,\timpacting\tthe\taffordability\tof\tvehicle\tlease\tand\tfinance\tarrangements.\tFurther,\tsales\tof\nvehicles\tin\tthe\tautomotive\tindustry\talso\ttend\tto\tbe\tcyclical\tin\tmany\tmarkets,\twhich\tmay\texpose\tus\tto\tincreased\tvolatility\tas\twe\texpand\tand\tadjust\tour\noperations.\tMoreover,\tas\tadditional\tcompetitors\tenter\tthe\tmarketplace\tand\thelp\tbring\tthe\tworld\tcloser\tto\tsustainable\ttransportation,\twe\twill\thave\tto", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 35, "lines": { "from": 24, "to": 37 } } } }, { "pageContent": "adjust\tand\tcontinue\tto\texecute\twell\tto\tmaintain\tour\tmomentum.\tAdditionally,\tour\tsuppliers’\tliquidity\tand\tallocation\tplans\tmay\tbe\taffected\tby\tcurrent\nchallenges\tin\tthe\tNorth\tAmerican\tautomotive\tindustry,\twhich\tcould\treduce\tour\taccess\tto\tcomponents\tor\tresult\tin\tunfavorable\tchanges\tto\tcost.\tThese\nmacroeconomic\tand\tindustry\ttrends\thave\thad,\tand\twill\tlikely\tcontinue\tto\thave,\tan\timpact\ton\tthe\tpricing\tof,\tand\torder\trate\tfor\tour\tvehicles,\tand\tin\tturn\tour\noperating\tmargin.\tChanges\tin\tgovernment\tand\teconomic\tincentives\tin\trelation\tto\telectric\tvehicles\tmay\talso\timpact\tour\tsales.\tWe\twill\tcontinue\tto\tadjust\naccordingly\tto\tsuch\tdevelopments,\tand\twe\tbelieve\tour\tongoing\tcost\treduction,\tincluding\timproved\tproduction\tinnovation\tand\tefficiency\tat\tour\tnewest\nfactories\tand\tlower\tlogistics\tcosts,\tand\tfocus\ton\toperating\tleverage\twill\tcontinue\tto\tbenefit\tus\tin\trelation\tto\tour\tcompetitors,\twhile\tour\tnew\tproducts\twill\nhelp\tenable\tfuture\tgrowth.\n34", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 35, "lines": { "from": 38, "to": 45 } } } }, { "pageContent": "As\tour\tproduction\tincreases,\twe\tmust\twork\tconstantly\tto\tsimilarly\tincrease\tvehicle\tdelivery\tcapability\tso\tthat\tit\tdoes\tnot\tbecome\ta\tbottleneck\ton\tour\ntotal\tdeliveries.\tWe\tare\talso\tcommitted\tto\treducing\tthe\tpercentage\tof\tvehicles\tdelivered\tin\tthe\tthird\tmonth\tof\teach\tquarter,\twhich\twill\thelp\tto\treduce\tthe\ncost\tper\tvehicle.\tAs\twe\texpand\tour\tmanufacturing\toperations\tglobally,\twe\twill\talso\thave\tto\tcontinue\tto\tincrease\tand\tstaff\tour\tdelivery,\tservicing\tand\ncharging\tinfrastructure\taccordingly,\tmaintain\tour\tvehicle\treliability\tand\toptimize\tour\tSupercharger\tlocations\tto\tensure\tcost\teffectiveness\tand\tcustomer\nsatisfaction.\tIn\tparticular,\tas\tother\tautomotive\tmanufacturers\thave\tannounced\ttheir\tadoption\tof\tthe\tNorth\tAmerican\tCharging\tStandard\t(“NACS”)\tand\nagreements\twith\tus\tto\tutilize\tour\tSuperchargers,\twe\tmust\tcorrespondingly\texpand\tour\tnetwork\tin\torder\tto\tensure\tadequate\tavailability\tto\tmeet\tcustomer\ndemands.\tWe\talso\tremain\tfocused\ton\tcontinued\tenhancements\tof\tthe\tcapability\tand\tefficiency\tof\tour\tservicing\toperations.\nEnergy\tGeneration\tand\tStorage\tDemand,\tProduction\tand\tDeployment\nThe\tlong-term\tsuccess\tof\tthis\tbusiness\tis\tdependent\tupon\tincreasing\tmargins\tthrough\tgreater\tvolumes.\tWe\tcontinue\tto\tincrease\tthe\tproduction\tof\nour\tenergy\tstorage\tproducts\tto\tmeet\thigh\tlevels\tof\tdemand,\tincluding\tthe\tconstruction\tof\ta\tnew\tMegafactory\tin\tShanghai\tand\tthe\tongoing\tramp\tat\tour\nMegafactory\tin\tLathrop,\tCalifornia.\tFor\tMegapack,\tenergy\tstorage\tdeployments\tcan\tvary\tmeaningfully\tquarter\tto\tquarter\tdepending\ton\tthe\ttiming\tof\nspecific\tproject\tmilestones.\tWe\tremain\tcommitted\tto\tgrowing\tour\tretrofit\tsolar\tenergy\tbusiness\tby\toffering\ta\tlow-cost\tand\tsimplified\tonline\tordering\nexperience.\tIn\taddition,\twe\tcontinue\tto\tseek\tto\timprove\tour\tinstallation\tcapabilities\tand\tprice\tefficiencies\tfor\tSolar\tRoof.\tAs\tthese\tproduct\tlines\tgrow,\twe\nwill\thave\tto\tmaintain\tadequate\tbattery\tcell\tsupply\tfor\tour\tenergy\tstorage\tproducts\tand\tensure\tthe\tavailability\tof\tqualified\tpersonnel,\tparticularly\tskilled", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 36, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "electricians,\tto\tsupport\tthe\tramp\tof\tSolar\tRoof.\nCash\tFlow\tand\tCapital\tExpenditure\tTrends\nOur\tcapital\texpenditures\tare\ttypically\tdifficult\tto\tproject\tbeyond\tthe\tshort-term\tgiven\tthe\tnumber\tand\tbreadth\tof\tour\tcore\tprojects\tat\tany\tgiven\ttime,\nand\tmay\tfurther\tbe\timpacted\tby\tuncertainties\tin\tfuture\tglobal\tmarket\tconditions.\tWe\tare\tsimultaneously\tramping\tnew\tproducts,\tbuilding\tor\tramping\nmanufacturing\tfacilities\ton\tthree\tcontinents,\tpiloting\tthe\tdevelopment\tand\tmanufacture\tof\tnew\tbattery\tcell\ttechnologies,\texpanding\tour\tSupercharger\nnetwork\tand\tinvesting\tin\tautonomy\tand\tother\tartificial\tintelligence\tenabled\ttraining\tand\tproducts,\tand\tthe\tpace\tof\tour\tcapital\tspend\tmay\tvary\tdepending\non\toverall\tpriority\tamong\tprojects,\tthe\tpace\tat\twhich\twe\tmeet\tmilestones,\tproduction\tadjustments\tto\tand\tamong\tour\tvarious\tproducts,\tincreased\tcapital\nefficiencies\tand\tthe\taddition\tof\tnew\tprojects.\tOwing\tand\tsubject\tto\tthe\tforegoing\tas\twell\tas\tthe\tpipeline\tof\tannounced\tprojects\tunder\tdevelopment,\tall\nother\tcontinuing\tinfrastructure\tgrowth\tand\tvarying\tlevels\tof\tinflation,\twe\tcurrently\texpect\tour\tcapital\texpenditures\tto\texceed\t$10.00\tbillion\tin\t2024\tand\tbe\nbetween\t$8.00\tto\t$10.00\tbillion\tin\teach\tof\tthe\tfollowing\ttwo\tfiscal\tyears.\nOur\tbusiness\thas\tbeen\tconsistently\tgenerating\tcash\tflow\tfrom\toperations\tin\texcess\tof\tour\tlevel\tof\tcapital\tspend,\tand\twith\tbetter\tworking\tcapital\nmanagement\tresulting\tin\tshorter\tdays\tsales\toutstanding\tthan\tdays\tpayable\toutstanding,\tour\tsales\tgrowth\tis\talso\tgenerally\tfacilitating\tpositive\tcash\ngeneration.\tWe\thave\tand\twill\tcontinue\tto\tutilize\tsuch\tcash\tflows,\tamong\tother\tthings,\tto\tdo\tmore\tvertical\tintegration,\texpand\tour\tproduct\troadmap\tand\nprovide\tfinancing\toptions\tto\tour\tcustomers.\tAt\tthe\tsame\ttime,\twe\tare\tlikely\tto\tsee\theightened\tlevels\tof\tcapital\texpenditures\tduring\tcertain\tperiods\ndepending\ton\tthe\tspecific\tpace\tof\tour\tcapital-intensive\tprojects\tand\tother\tpotential\tvariables\tsuch\tas\trising\tmaterial\tprices\tand\tincreases\tin\tsupply\tchain", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 36, "lines": { "from": 15, "to": 29 } } } }, { "pageContent": "and\tlabor\texpenses\tresulting\tfrom\tchanges\tin\tglobal\ttrade\tconditions\tand\tlabor\tavailability.\tOverall,\twe\texpect\tour\tability\tto\tbe\tself-funding\tto\tcontinue\tas\nlong\tas\tmacroeconomic\tfactors\tsupport\tcurrent\ttrends\tin\tour\tsales.\nCritical\tAccounting\tPolicies\tand\tEstimates\nThe\tconsolidated\tfinancial\tstatements\tare\tprepared\tin\taccordance\twith\taccounting\tprinciples\tgenerally\taccepted\tin\tthe\tU.S.\t(“GAAP”).\tThe\npreparation\tof\tthe\tconsolidated\tfinancial\tstatements\trequires\tus\tto\tmake\testimates\tand\tassumptions\tthat\taffect\tthe\treported\tamounts\tof\tassets,\tliabilities,\nrevenues,\tcosts\tand\texpenses\tand\trelated\tdisclosures.\tWe\tbase\tour\testimates\ton\thistorical\texperience,\tas\tappropriate,\tand\ton\tvarious\tother\tassumptions\nthat\twe\tbelieve\tto\tbe\treasonable\tunder\tthe\tcircumstances.\tChanges\tin\tthe\taccounting\testimates\tare\treasonably\tlikely\tto\toccur\tfrom\tperiod\tto\tperiod.\nAccordingly,\tactual\tresults\tcould\tdiffer\tsignificantly\tfrom\tthe\testimates\tmade\tby\tour\tmanagement.\tWe\tevaluate\tour\testimates\tand\tassumptions\ton\tan\nongoing\tbasis.\tTo\tthe\textent\tthat\tthere\tare\tmaterial\tdifferences\tbetween\tthese\testimates\tand\tactual\tresults,\tour\tfuture\tfinancial\tstatement\tpresentation,\nfinancial\tcondition,\tresults\tof\toperations\tand\tcash\tflows\tmay\tbe\taffected.\n35", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 36, "lines": { "from": 30, "to": 40 } } } }, { "pageContent": "The\testimates\tused\tfor,\tbut\tnot\tlimited\tto,\tdetermining\tsignificant\teconomic\tincentive\tfor\tresale\tvalue\tguarantee\tarrangements,\tsales\treturn\nreserves,\tthe\tcollectability\tof\taccounts\tand\tfinancing\treceivables,\tinventory\tvaluation,\twarranties,\tfair\tvalue\tof\tlong-lived\tassets,\tgoodwill,\tfair\tvalue\tof\nfinancial\tinstruments,\tfair\tvalue\tand\tresidual\tvalue\tof\toperating\tlease\tvehicles\tand\tsolar\tenergy\tsystems\tsubject\tto\tleases\tcould\tbe\timpacted.\tWe\thave\nassessed\tthe\timpact\tand\tare\tnot\taware\tof\tany\tspecific\tevents\tor\tcircumstances\tthat\trequired\tan\tupdate\tto\tour\testimates\tand\tassumptions\tor\tmaterially\naffected\tthe\tcarrying\tvalue\tof\tour\tassets\tor\tliabilities\tas\tof\tthe\tdate\tof\tissuance\tof\tthis\tAnnual\tReport\ton\tForm\t10-K.\tThese\testimates\tmay\tchange\tas\tnew\nevents\toccur\tand\tadditional\tinformation\tis\tobtained.\tActual\tresults\tcould\tdiffer\tmaterially\tfrom\tthese\testimates\tunder\tdifferent\tassumptions\tor\tconditions.\nRevenue\tRecognition\nAutomotive\tSales\nAutomotive\tsales\trevenue\tincludes\trevenues\trelated\tto\tcash\tand\tfinancing\tdeliveries\tof\tnew\tvehicles,\tand\tspecific\tother\tfeatures\tand\tservices\tthat\nmeet\tthe\tdefinition\tof\ta\tperformance\tobligation\tunder\tAccounting\tStandards\tCodification\t(“ASC”)\t606,\tRevenue\tfrom\tContracts\twith\tCustomers\t(“ASC\n606”),\tincluding\taccess\tto\tour\tFSD\tCapability\tfeatures\tand\ttheir\tongoing\tmaintenance,\tinternet\tconnectivity,\tfree\tSupercharging\tprograms\tand\tover-the-\nair\tsoftware\tupdates.\tWe\trecognize\trevenue\ton\tautomotive\tsales\tupon\tdelivery\tto\tthe\tcustomer,\twhich\tis\twhen\tthe\tcontrol\tof\ta\tvehicle\ttransfers.\nPayments\tare\ttypically\treceived\tat\tthe\tpoint\tcontrol\ttransfers\tor\tin\taccordance\twith\tpayment\tterms\tcustomary\tto\tthe\tbusiness,\texcept\tsales\twe\tfinance\tfor\nwhich\tpayments\tare\tcollected\tover\tthe\tcontractual\tloan\tterm.\tWe\talso\trecognize\ta\tsales\treturn\treserve\tbased\ton\thistorical\texperience\tplus\tconsideration\nfor\texpected\tfuture\tmarket\tvalues,\twhen\twe\toffer\tresale\tvalue\tguarantees\tor\tsimilar\tbuyback\tterms.\tOther\tfeatures\tand\tservices\tsuch\tas\taccess\tto\tour", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 37, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "internet\tconnectivity,\tunlimited\tfree\tSupercharging\tand\tover-the-air\tsoftware\tupdates\tare\tprovisioned\tupon\tcontrol\ttransfer\tof\ta\tvehicle\tand\trecognized\nover\ttime\ton\ta\tstraight-line\tbasis\tas\twe\thave\ta\tstand-ready\tobligation\tto\tdeliver\tsuch\tservices\tto\tthe\tcustomer.\tOther\tlimited\tfree\tSupercharging\nincentives\tare\trecognized\tbased\ton\tactual\tusage\tor\texpiration,\twhichever\tis\tearlier.\tWe\trecognize\trevenue\trelated\tto\tthese\tother\tfeatures\tand\tservices\nover\tthe\tperformance\tperiod,\twhich\tis\tgenerally\tthe\texpected\townership\tlife\tof\tthe\tvehicle.\tRevenue\trelated\tto\tFSD\tCapability\tfeatures\tis\trecognized\twhen\nfunctionality\tis\tdelivered\tto\tthe\tcustomer\tand\ttheir\tongoing\tmaintenance\tis\trecognized\tover\ttime.\tFor\tour\tobligations\trelated\tto\tautomotive\tsales,\twe\nestimate\tstandalone\tselling\tprice\tby\tconsidering\tcosts\tused\tto\tdevelop\tand\tdeliver\tthe\tservice,\tthird-party\tpricing\tof\tsimilar\toptions\tand\tother\tinformation\nthat\tmay\tbe\tavailable.\nInventory\tValuation\nInventories\tare\tstated\tat\tthe\tlower\tof\tcost\tor\tnet\trealizable\tvalue.\tCost\tis\tcomputed\tusing\tstandard\tcost\tfor\tvehicles\tand\tenergy\tproducts,\twhich\napproximates\tactual\tcost\ton\ta\tfirst-in,\tfirst-out\tbasis.\tWe\trecord\tinventory\twrite-downs\tfor\texcess\tor\tobsolete\tinventories\tbased\tupon\tassumptions\tabout\ncurrent\tand\tfuture\tdemand\tforecasts.\tIf\tour\tinventory\ton-hand\tis\tin\texcess\tof\tour\tfuture\tdemand\tforecast,\tthe\texcess\tamounts\tare\twritten-off.\nWe\talso\treview\tour\tinventory\tto\tdetermine\twhether\tits\tcarrying\tvalue\texceeds\tthe\tnet\tamount\trealizable\tupon\tthe\tultimate\tsale\tof\tthe\tinventory.\nThis\trequires\tus\tto\tdetermine\tthe\testimated\tselling\tprice\tof\tour\tvehicles\tless\tthe\testimated\tcost\tto\tconvert\tthe\tinventory\ton-hand\tinto\ta\tfinished\tproduct.\nOnce\tinventory\tis\twritten-down,\ta\tnew,\tlower\tcost\tbasis\tfor\tthat\tinventory\tis\testablished\tand\tsubsequent\tchanges\tin\tfacts\tand\tcircumstances\tdo\tnot\tresult\nin\tthe\trestoration\tor\tincrease\tin\tthat\tnewly\testablished\tcost\tbasis.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 37, "lines": { "from": 16, "to": 30 } } } }, { "pageContent": "Should\tour\testimates\tof\tfuture\tselling\tprices\tor\tproduction\tcosts\tchange,\tadditional\tand\tpotentially\tmaterial\twrite-downs\tmay\tbe\trequired.\tA\tsmall\nchange\tin\tour\testimates\tmay\tresult\tin\ta\tmaterial\tcharge\tto\tour\treported\tfinancial\tresults.\n36", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 37, "lines": { "from": 31, "to": 33 } } } }, { "pageContent": "Warranties\nWe\tprovide\ta\tmanufacturer’s\twarranty\ton\tall\tnew\tand\tused\tvehicles\tand\ta\twarranty\ton\tthe\tinstallation\tand\tcomponents\tof\tthe\tenergy\tgeneration\nand\tstorage\tsystems\twe\tsell\tfor\tperiods\ttypically\tbetween\t10\tto\t25\tyears.\tWe\taccrue\ta\twarranty\treserve\tfor\tthe\tproducts\tsold\tby\tus,\twhich\tincludes\tour\nbest\testimate\tof\tthe\tprojected\tcosts\tto\trepair\tor\treplace\titems\tunder\twarranties\tand\trecalls\tif\tidentified.\tThese\testimates\tare\tbased\ton\tactual\tclaims\nincurred\tto\tdate\tand\tan\testimate\tof\tthe\tnature,\tfrequency\tand\tcosts\tof\tfuture\tclaims.\tThese\testimates\tare\tinherently\tuncertain\tand\tchanges\tto\tour\nhistorical\tor\tprojected\twarranty\texperience\tmay\tcause\tmaterial\tchanges\tto\tthe\twarranty\treserve\tin\tthe\tfuture.\tThe\twarranty\treserve\tdoes\tnot\tinclude\nprojected\twarranty\tcosts\tassociated\twith\tour\tvehicles\tsubject\tto\toperating\tlease\taccounting\tand\tour\tsolar\tenergy\tsystems\tunder\tlease\tcontracts\tor\tPPAs,\nas\tthe\tcosts\tto\trepair\tthese\twarranty\tclaims\tare\texpensed\tas\tincurred.\tThe\tportion\tof\tthe\twarranty\treserve\texpected\tto\tbe\tincurred\twithin\tthe\tnext\t12\nmonths\tis\tincluded\twithin\tAccrued\tliabilities\tand\tother,\twhile\tthe\tremaining\tbalance\tis\tincluded\twithin\tOther\tlong-term\tliabilities\ton\tthe\tconsolidated\nbalance\tsheets.\tFor\tliabilities\tthat\twe\tare\tentitled\tto\treceive\tindemnification\tfrom\tour\tsuppliers,\twe\trecord\treceivables\tfor\tthe\tcontractually\tobligated\namounts\ton\tthe\tconsolidated\tbalance\tsheets\tas\ta\tcomponent\tof\tPrepaid\texpenses\tand\tother\tcurrent\tassets\tfor\tthe\tcurrent\tportion\tand\tas\tOther\tnon-\ncurrent\tassets\tfor\tthe\tlong-term\tportion.\tWarranty\texpense\tis\trecorded\tas\ta\tcomponent\tof\tCost\tof\trevenues\tin\tthe\tconsolidated\tstatements\tof\toperations.\nDue\tto\tthe\tmagnitude\tof\tour\tautomotive\tbusiness,\tour\taccrued\twarranty\tbalance\tis\tprimarily\trelated\tto\tour\tautomotive\tsegment.\nStock-Based\tCompensation\nWe\tuse\tthe\tfair\tvalue\tmethod\tof\taccounting\tfor\tour\tstock\toptions\tand\trestricted\tstock\tunits\t(“RSUs”)\tgranted\tto\temployees\tand\tfor\tour\temployee", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 38, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "stock\tpurchase\tplan\t(the\t“ESPP”)\tto\tmeasure\tthe\tcost\tof\temployee\tservices\treceived\tin\texchange\tfor\tthe\tstock-based\tawards.\tThe\tfair\tvalue\tof\tstock\noption\tawards\twith\tonly\tservice\tand/or\tperformance\tconditions\tis\testimated\ton\tthe\tgrant\tor\toffering\tdate\tusing\tthe\tBlack-Scholes\toption-pricing\tmodel.\nThe\tBlack-Scholes\toption-pricing\tmodel\trequires\tinputs\tsuch\tas\tthe\trisk-free\tinterest\trate,\texpected\tterm\tand\texpected\tvolatility.\tThese\tinputs\tare\nsubjective\tand\tgenerally\trequire\tsignificant\tjudgment.\tThe\tfair\tvalue\tof\tRSUs\tis\tmeasured\ton\tthe\tgrant\tdate\tbased\ton\tthe\tclosing\tfair\tmarket\tvalue\tof\tour\ncommon\tstock.\tThe\tresulting\tcost\tis\trecognized\tover\tthe\tperiod\tduring\twhich\tan\temployee\tis\trequired\tto\tprovide\tservice\tin\texchange\tfor\tthe\tawards,\nusually\tthe\tvesting\tperiod,\twhich\tis\tgenerally\tfour\tyears\tfor\tstock\toptions\tand\tRSUs\tand\tsix\tmonths\tfor\tthe\tESPP.\tStock-based\tcompensation\texpense\tis\nrecognized\ton\ta\tstraight-line\tbasis,\tnet\tof\tactual\tforfeitures\tin\tthe\tperiod.\nFor\tperformance-based\tawards,\tstock-based\tcompensation\texpense\tis\trecognized\tover\tthe\texpected\tperformance\tachievement\tperiod\tof\tindividual\nperformance\tmilestones\twhen\tthe\tachievement\tof\teach\tindividual\tperformance\tmilestone\tbecomes\tprobable.\nAs\twe\taccumulate\tadditional\temployee\tstock-based\tawards\tdata\tover\ttime\tand\tas\twe\tincorporate\tmarket\tdata\trelated\tto\tour\tcommon\tstock,\twe\tmay\ncalculate\tsignificantly\tdifferent\tvolatilities\tand\texpected\tlives,\twhich\tcould\tmaterially\timpact\tthe\tvaluation\tof\tour\tstock-based\tawards\tand\tthe\tstock-based\ncompensation\texpense\tthat\twe\twill\trecognize\tin\tfuture\tperiods.\tStock-based\tcompensation\texpense\tis\trecorded\tin\tCost\tof\trevenues,\tResearch\tand\ndevelopment\texpense\tand\tSelling,\tgeneral\tand\tadministrative\texpense\tin\tthe\tconsolidated\tstatements\tof\toperations.\nIncome\tTaxes\nWe\tare\tsubject\tto\tincome\ttaxes\tin\tthe\tU.S.\tand\tin\tmany\tforeign\tjurisdictions.\tSignificant\tjudgment\tis\trequired\tin\tdetermining\tour\tprovision\tfor", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 38, "lines": { "from": 16, "to": 30 } } } }, { "pageContent": "income\ttaxes,\tour\tdeferred\ttax\tassets\tand\tliabilities\tand\tany\tvaluation\tallowance\trecorded\tagainst\tour\tnet\tdeferred\ttax\tassets\tthat\tare\tnot\tmore\tlikely\nthan\tnot\tto\tbe\trealized.\tWe\tmonitor\tthe\trealizability\tof\tour\tdeferred\ttax\tassets\ttaking\tinto\taccount\tall\trelevant\tfactors\tat\teach\treporting\tperiod.\tIn\ncompleting\tour\tassessment\tof\trealizability\tof\tour\tdeferred\ttax\tassets,\twe\tconsider\tour\thistory\tof\tincome\t(loss)\tmeasured\tat\tpre-tax\tincome\t(loss)\tadjusted\nfor\tpermanent\tbook-tax\tdifferences\ton\ta\tjurisdictional\tbasis,\tvolatility\tin\tactual\tearnings,\texcess\ttax\tbenefits\trelated\tto\tstock-based\tcompensation\tin\nrecent\tprior\tyears,\tand\timpacts\tof\tthe\ttiming\tof\treversal\tof\texisting\ttemporary\tdifferences.\tWe\talso\trely\ton\tour\tassessment\tof\tthe\tCompany’s\tprojected\nfuture\tresults\tof\tbusiness\toperations,\tincluding\tuncertainty\tin\tfuture\toperating\tresults\trelative\tto\thistorical\tresults,\tvolatility\tin\tthe\tmarket\tprice\tof\tour\ncommon\tstock\tand\tits\tperformance\tover\ttime,\tvariable\tmacroeconomic\tconditions\timpacting\tour\tability\tto\tforecast\tfuture\ttaxable\tincome,\tand\tchanges\tin\nbusiness\tthat\tmay\taffect\tthe\texistence\tand\tmagnitude\tof\tfuture\ttaxable\tincome.\tOur\tvaluation\tallowance\tassessment\tis\tbased\ton\tour\tbest\testimate\tof\nfuture\tresults\tconsidering\tall\tavailable\tinformation.\n37", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 38, "lines": { "from": 31, "to": 40 } } } }, { "pageContent": "Furthermore,\tsignificant\tjudgment\tis\trequired\tin\tevaluating\tour\ttax\tpositions.\tIn\tthe\tordinary\tcourse\tof\tbusiness,\tthere\tare\tmany\ttransactions\tand\ncalculations\tfor\twhich\tthe\tultimate\ttax\tsettlement\tis\tuncertain.\tAs\ta\tresult,\twe\trecognize\tthe\teffect\tof\tthis\tuncertainty\ton\tour\ttax\tattributes\tor\ttaxes\npayable\tbased\ton\tour\testimates\tof\tthe\teventual\toutcome.\tThese\teffects\tare\trecognized\twhen,\tdespite\tour\tbelief\tthat\tour\ttax\treturn\tpositions\tare\nsupportable,\twe\tbelieve\tthat\tit\tis\tmore\tlikely\tthan\tnot\tthat\tsome\tof\tthose\tpositions\tmay\tnot\tbe\tfully\tsustained\tupon\treview\tby\ttax\tauthorities.\tWe\tare\nrequired\tto\tfile\tincome\ttax\treturns\tin\tthe\tU.S.\tand\tvarious\tforeign\tjurisdictions,\twhich\trequires\tus\tto\tinterpret\tthe\tapplicable\ttax\tlaws\tand\tregulations\tin\neffect\tin\tsuch\tjurisdictions.\tSuch\treturns\tare\tsubject\tto\taudit\tby\tthe\tvarious\tfederal,\tstate\tand\tforeign\ttaxing\tauthorities,\twho\tmay\tdisagree\twith\trespect\tto\nour\ttax\tpositions.\tWe\tbelieve\tthat\tour\tconsideration\tis\tadequate\tfor\tall\topen\taudit\tyears\tbased\ton\tour\tassessment\tof\tmany\tfactors,\tincluding\tpast\nexperience\tand\tinterpretations\tof\ttax\tlaw.\tWe\treview\tand\tupdate\tour\testimates\tin\tlight\tof\tchanging\tfacts\tand\tcircumstances,\tsuch\tas\tthe\tclosing\tof\ta\ttax\naudit,\tthe\tlapse\tof\ta\tstatute\tof\tlimitations\tor\ta\tchange\tin\testimate.\tTo\tthe\textent\tthat\tthe\tfinal\ttax\toutcome\tof\tthese\tmatters\tdiffers\tfrom\tour\texpectations,\nsuch\tdifferences\tmay\timpact\tincome\ttax\texpense\tin\tthe\tperiod\tin\twhich\tsuch\tdetermination\tis\tmade.\nResults\tof\tOperations\nRevenues\n\tYear\tEnded\tDecember\t31,2023\tvs.\t2022\tChange2022\tvs.\t2021\tChange\n(Dollars\tin\tmillions)202320222021$%$%\nAutomotive\tsales$78,509\t$67,210\t$44,125\t$11,299\t17\t%$23,085\t52\t%\nAutomotive\tregulatory\tcredits1,790\t1,776\t1,465\t14\t1\t%311\t21\t%\nAutomotive\tleasing2,120\t2,476\t1,642\t(356)(14)%834\t51\t%\nTotal\tautomotive\trevenues82,419\t71,462\t47,232\t10,957\t15\t%24,230\t51\t%\nServices\tand\tother8,319\t6,091\t3,802\t2,228\t37\t%2,289\t60\t%\nTotal\tautomotive\t&\tservices\tand\tother\tsegment", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 39, "lines": { "from": 1, "to": 20 } } } }, { "pageContent": "Total\tautomotive\t&\tservices\tand\tother\tsegment\nrevenue90,738\t77,553\t51,034\t13,185\t17\t%26,519\t52\t%\nEnergy\tgeneration\tand\tstorage\tsegment\trevenue6,035\t3,909\t2,789\t2,126\t54\t%1,120\t40\t%\nTotal\trevenues\n$96,773\t$81,462\t$53,823\t$15,311\t\n19\t%\n$27,639\t\n51\t%\nAutomotive\t&\tServices\tand\tOther\tSegment\nAutomotive\tsales\trevenue\tincludes\trevenues\trelated\tto\tcash\tand\tfinancing\tdeliveries\tof\tnew\tModel\tS,\tModel\tX,\tSemi,\tModel\t3,\tModel\tY,\tand\nCybertruck\tvehicles,\tincluding\taccess\tto\tour\tFSD\tCapability\tfeatures\tand\ttheir\tongoing\tmaintenance,\tinternet\tconnectivity,\tfree\tSupercharging\tprograms\nand\tover-the-air\tsoftware\tupdates.\tThese\tdeliveries\tare\tvehicles\tthat\tare\tnot\tsubject\tto\tlease\taccounting.\nAutomotive\tregulatory\tcredits\tincludes\tsales\tof\tregulatory\tcredits\tto\tother\tautomotive\tmanufacturers.\tOur\trevenue\tfrom\tautomotive\tregulatory\ncredits\tis\tdirectly\trelated\tto\tour\tnew\tvehicle\tproduction,\tsales\tand\tpricing\tnegotiated\twith\tour\tcustomers.\tWe\tmonetize\tthem\tproactively\tas\tnew\tvehicles\nare\tsold\tbased\ton\tstanding\tarrangements\twith\tbuyers\tof\tsuch\tcredits,\ttypically\tas\tclose\tas\tpossible\tto\tthe\tproduction\tand\tdelivery\tof\tthe\tvehicle\tor\nchanges\tin\tregulation\timpacting\tthe\tcredits.\nAutomotive\tleasing\trevenue\tincludes\tthe\tamortization\tof\trevenue\tfor\tvehicles\tunder\tdirect\toperating\tlease\tagreements.\tAdditionally,\tautomotive\nleasing\trevenue\tincludes\tdirect\tsales-type\tleasing\tprograms\twhere\twe\trecognize\tall\trevenue\tassociated\twith\tthe\tsales-type\tlease\tupon\tdelivery\tto\tthe\ncustomer.\nServices\tand\tother\trevenue\tconsists\tof\tsales\tof\tused\tvehicles,\tnon-warranty\tafter-sales\tvehicle\tservices,\tbody\tshop\tand\tparts,\tpaid\tSupercharging,\nvehicle\tinsurance\trevenue\tand\tretail\tmerchandise.\n2023\tcompared\tto\t2022\nAutomotive\tsales\trevenue\tincreased\t$11.30\tbillion,\tor\t17%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\tDecember\t31,\n2022,\tprimarily\tdue\tto\tan\tincrease\tof\t473,382\tcombined\tModel\t3\tand\tModel\tY\tcash\tdeliveries\tfrom\tproduction\tramping\tof\tModel\tY\tglobally.\tThe\tincrease", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 39, "lines": { "from": 20, "to": 43 } } } }, { "pageContent": "was\tpartially\toffset\tby\ta\tlower\taverage\tselling\tprice\ton\tour\tvehicles\tdriven\tby\toverall\tprice\treductions\tyear\tover\tyear,\tsales\tmix,\tand\ta\tnegative\timpact\nfrom\tthe\tUnited\tStates\tdollar\tstrengthening\tagainst\tother\tforeign\tcurrencies\tin\tthe\tyear\tended\tDecember\t31,\t2023\tcompared\tto\tthe\tprior\tyear.\nAutomotive\tregulatory\tcredits\trevenue\tincreased\t$14\tmillion,\tor\t1%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\nDecember\t31,\t2022.\n38", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 39, "lines": { "from": 44, "to": 48 } } } }, { "pageContent": "Automotive\tleasing\trevenue\tdecreased\t$356\tmillion,\tor\t14%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\tDecember\t31,\n2022.\tThe\tdecrease\twas\tprimarily\tdue\tto\ta\tdecrease\tin\tdirect\tsales-type\tleasing\trevenue\tdriven\tby\tlower\tdeliveries\tyear\tover\tyear,\tpartially\toffset\tby\tan\nincrease\tfrom\tour\tgrowing\tdirect\toperating\tlease\tportfolio.\nServices\tand\tother\trevenue\tincreased\t$2.23\tbillion,\tor\t37%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\tDecember\t31,\n2022.\tThe\tincrease\twas\tprimarily\tdue\tto\thigher\tused\tvehicle\trevenue\tdriven\tby\tincreases\tin\tvolume,\tbody\tshop\tand\tpart\tsales\trevenue,\tnon-warranty\nmaintenance\tservices\trevenue,\tpaid\tSupercharging\trevenue\tand\tinsurance\tservices\trevenue,\tall\tof\twhich\tare\tprimarily\tattributable\tto\tour\tgrowing\tfleet.\nThe\tincreases\twere\tpartially\toffset\tby\ta\tdecrease\tin\tthe\taverage\tselling\tprice\tof\tused\tvehicles.\nEnergy\tGeneration\tand\tStorage\tSegment\nEnergy\tgeneration\tand\tstorage\trevenue\tincludes\tsales\tand\tleasing\tof\tsolar\tenergy\tgeneration\tand\tenergy\tstorage\tproducts,\tfinancing\tof\tsolar\tenergy\ngeneration\tproducts,\tservices\trelated\tto\tsuch\tproducts\tand\tsales\tof\tsolar\tenergy\tsystems\tincentives.\n2023\tcompared\tto\t2022\nEnergy\tgeneration\tand\tstorage\trevenue\tincreased\t$2.13\tbillion,\tor\t54%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\nDecember\t31,\t2022.\tThe\tincrease\twas\tprimarily\tdue\tto\tan\tincrease\tin\tdeployments\tof\tMegapack.\nCost\tof\tRevenues\tand\tGross\tMargin\nYear\tEnded\tDecember\t31,2023\tvs.\t2022\tChange2022\tvs.\t2021\tChange\n(Dollars\tin\tmillions)202320222021$%$%\nCost\tof\trevenues\nAutomotive\tsales$65,121\t$49,599\t$32,415\t$15,522\t31\t%$17,184\t53\t%\nAutomotive\tleasing1,268\t1,509\t978\t(241)(16)%531\t54\t%\nTotal\tautomotive\tcost\tof\trevenues66,389\t51,108\t33,393\t15,281\t30\t%17,715\t53\t%\nServices\tand\tother7,830\t5,880\t3,906\t1,950\t33\t%1,974\t51\t%\nTotal\tautomotive\t&\tservices\tand\tother\tsegment\ncost\tof\trevenues74,219\t56,988\t37,299\t17,231\t30\t%19,689\t53\t%", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 40, "lines": { "from": 1, "to": 23 } } } }, { "pageContent": "Energy\tgeneration\tand\tstorage\tsegment4,894\t3,621\t2,918\t1,273\t35\t%703\t24\t%\nTotal\tcost\tof\trevenues\n$79,113\t$60,609\t$40,217\t$18,504\t\n31\t%\n$20,392\t\n51\t%\nGross\tprofit\ttotal\tautomotive$16,030\t$20,354\t$13,839\t\nGross\tmargin\ttotal\tautomotive19.4\t%28.5\t%29.3\t%\nGross\tprofit\ttotal\tautomotive\t&\tservices\tand\tother\nsegment$16,519\t$20,565\t$13,735\t\nGross\tmargin\ttotal\tautomotive\t&\tservices\tand\tother\nsegment18.2\t%26.5\t%26.9\t%\nGross\tprofit\tenergy\tgeneration\tand\tstorage\tsegment$1,141\t$288\t$(129)\nGross\tmargin\tenergy\tgeneration\tand\tstorage\tsegment18.9\t%7.4\t%(4.6)%\nTotal\tgross\tprofit$17,660\t$20,853\t$13,606\t\nTotal\tgross\tmargin18.2\t%25.6\t%25.3\t%\n39", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 40, "lines": { "from": 24, "to": 40 } } } }, { "pageContent": "Automotive\t&\tServices\tand\tOther\tSegment\nCost\tof\tautomotive\tsales\trevenue\tincludes\tdirect\tand\tindirect\tmaterials,\tlabor\tcosts,\tmanufacturing\toverhead,\tincluding\tdepreciation\tcosts\tof\ttooling\nand\tmachinery,\tshipping\tand\tlogistic\tcosts,\tvehicle\tconnectivity\tcosts,\tFSD\tongoing\tmaintenance\tcosts,\tallocations\tof\telectricity\tand\tinfrastructure\tcosts\nrelated\tto\tour\tSupercharger\tnetwork\tand\treserves\tfor\testimated\twarranty\texpenses.\tCost\tof\tautomotive\tsales\trevenues\talso\tincludes\tadjustments\tto\nwarranty\texpense\tand\tcharges\tto\twrite\tdown\tthe\tcarrying\tvalue\tof\tour\tinventory\twhen\tit\texceeds\tits\testimated\tnet\trealizable\tvalue\tand\tto\tprovide\tfor\nobsolete\tand\ton-hand\tinventory\tin\texcess\tof\tforecasted\tdemand.\tAdditionally,\tcost\tof\tautomotive\tsales\trevenue\tbenefits\tfrom\tmanufacturing\tcredits\nearned.\nCost\tof\tautomotive\tleasing\trevenue\tincludes\tthe\tdepreciation\tof\toperating\tlease\tvehicles,\tcost\tof\tgoods\tsold\tassociated\twith\tdirect\tsales-type\tleases\nand\twarranty\texpense\trelated\tto\tleased\tvehicles.\nCosts\tof\tservices\tand\tother\trevenue\tincludes\tcost\tof\tused\tvehicles\tincluding\trefurbishment\tcosts,\tcosts\tassociated\twith\tproviding\tnon-warranty\nafter-sales\tservices,\tcosts\tassociated\twith\tour\tbody\tshops\tand\tpart\tsales,\tcosts\tof\tpaid\tSupercharging,\tcosts\tto\tprovide\tvehicle\tinsurance\tand\tcosts\tfor\nretail\tmerchandise.\n2023\tcompared\tto\t2022\nCost\tof\tautomotive\tsales\trevenue\tincreased\t$15.52\tbillion,\tor\t31%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\nDecember\t31,\t2022.\tCost\tof\tautomotive\tsales\trevenue\tincreased\tin\tline\twith\tthe\tchange\tin\tdeliveries\tyear\tover\tyear,\tas\tdiscussed\tabove.\tThe\tincrease\nwas\tpartially\toffset\tby\ta\tdecrease\tin\tthe\taverage\tcombined\tcost\tper\tunit\tof\tour\tvehicles\tprimarily\tdue\tto\tsales\tmix,\tlower\tinbound\tfreight,\ta\tdecrease\tin\nmaterial\tcosts\tand\tlower\tmanufacturing\tcosts\tfrom\tbetter\tfixed\tcost\tabsorption.\tOur\tcosts\tof\trevenue\twere\talso\tpositively\timpacted\tby\tthe\tUnited\tStates", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 41, "lines": { "from": 1, "to": 17 } } } }, { "pageContent": "dollar\tstrengthening\tagainst\tour\tforeign\tcurrencies\tas\tcompared\tto\tthe\tprior\tperiods\tand\tby\tthe\tIRA\tmanufacturing\tcredits\tearned\tduring\tthe\tcurrent\tyear.\nCost\tof\tautomotive\tleasing\trevenue\tdecreased\t$241\tmillion,\tor\t16%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\nDecember\t31,\t2022.\tThe\tdecrease\twas\tprimarily\tdue\tto\ta\tdecrease\tin\tdirect\tsales-type\tleasing\tcost\tof\trevenue\tdriven\tby\tlower\tdeliveries\tyear\tover\tyear.\nCost\tof\tservices\tand\tother\trevenue\tincreased\t$1.95\tbillion,\tor\t33%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\nDecember\t31,\t2022.\tThe\tincrease\twas\tgenerally\tin\tline\twith\tthe\tchanges\tin\tservices\tand\tother\trevenue\tas\tdiscussed\tabove.\nGross\tmargin\tfor\ttotal\tautomotive\tdecreased\tfrom\t28.5%\tto\t19.4%\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\nDecember\t31,\t2022.\tThe\tdecrease\twas\tprimarily\tdue\tto\ta\tlower\taverage\tselling\tprice\ton\tour\tvehicles\tpartially\toffset\tby\tthe\tfavorable\tchange\tin\tour\naverage\tcombined\tcost\tper\tunit\tof\tour\tvehicles\tand\tIRA\tmanufacturing\tcredits\tearned\tas\tdiscussed\tabove.\nGross\tmargin\tfor\ttotal\tautomotive\t&\tservices\tand\tother\tsegment\tdecreased\tfrom\t26.5%\tto\t18.2%\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\ncompared\tto\tthe\tyear\tended\tDecember\t31,\t2022,\tprimarily\tdue\tto\tthe\tautomotive\tgross\tmargin\tdecrease\tdiscussed\tabove.\nEnergy\tGeneration\tand\tStorage\tSegment\nCost\tof\tenergy\tgeneration\tand\tstorage\trevenue\tincludes\tdirect\tand\tindirect\tmaterial\tand\tlabor\tcosts,\twarehouse\trent,\tfreight,\twarranty\texpense,\nother\toverhead\tcosts\tand\tamortization\tof\tcertain\tacquired\tintangible\tassets.\tCost\tof\tenergy\tgeneration\tand\tstorage\trevenue\talso\tincludes\tcharges\tto\twrite\ndown\tthe\tcarrying\tvalue\tof\tour\tinventory\twhen\tit\texceeds\tits\testimated\tnet\trealizable\tvalue\tand\tto\tprovide\tfor\tobsolete\tand\ton-hand\tinventory\tin\texcess\nof\tforecasted\tdemand.\tAdditionally,\tcost\tof\tenergy\tgeneration\tand\tstorage\trevenue\tbenefits\tfrom\tmanufacturing\tcredits\tearned.\tIn\tagreements\tfor\tsolar", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 41, "lines": { "from": 18, "to": 32 } } } }, { "pageContent": "energy\tsystems\tand\tPPAs\twhere\twe\tare\tthe\tlessor,\tthe\tcost\tof\trevenue\tis\tprimarily\tcomprised\tof\tdepreciation\tof\tthe\tcost\tof\tleased\tsolar\tenergy\tsystems,\nmaintenance\tcosts\tassociated\twith\tthose\tsystems\tand\tamortization\tof\tany\tinitial\tdirect\tcosts.\n2023\tcompared\tto\t2022\nCost\tof\tenergy\tgeneration\tand\tstorage\trevenue\tincreased\t$1.27\tbillion,\tor\t35%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\nended\tDecember\t31,\t2022,\tin\tline\twith\tthe\tincrease\tin\tMegapack\tdeployments\tyear\tover\tyear,\tas\tdiscussed\tabove.\tThis\tincrease\twas\tpartially\toffset\tby\tan\nimprovement\tin\tproduction\tramping\tthat\tdrove\tdown\tthe\taverage\tcost\tper\tMWh\tof\tMegapack\tas\twell\tas\tIRA\tmanufacturing\tcredits\tearned\tduring\tthe\ncurrent\tyear.\n40", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 41, "lines": { "from": 33, "to": 40 } } } }, { "pageContent": "Gross\tmargin\tfor\tenergy\tgeneration\tand\tstorage\tincreased\tfrom\t7.4%\tto\t18.9%\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\nended\tDecember\t31,\t2022.\tThe\tincrease\twas\tdriven\tby\tan\timprovement\tin\tour\tMegapack\tgross\tmargin\tfrom\tlower\taverage\tcost\tper\tMWh\tand\ta\thigher\nproportion\tof\tMegapack,\twhich\toperated\tat\ta\thigher\tgross\tmargin,\twithin\tthe\tsegment\tas\tcompared\tto\tthe\tprior\tyear\tperiods.\tAdditionally,\tthere\twas\ta\nmargin\tbenefit\tfrom\tIRA\tmanufacturing\tcredits\tearned.\nResearch\tand\tDevelopment\tExpense\nYear\tEnded\tDecember\t31,2023\tvs.\t2022\tChange2022\tvs.\t2021\tChange\n(Dollars\tin\tmillions)202320222021$%$%\nResearch\tand\tdevelopment\n$3,969\t$3,075\t$2,593\t$894\t29\t%$482\t19\t%\nAs\ta\tpercentage\tof\trevenues4\t%4\t%5\t%\nResearch\tand\tdevelopment\t(“R&D”)\texpenses\tconsist\tprimarily\tof\tpersonnel\tcosts\tfor\tour\tteams\tin\tengineering\tand\tresearch,\tmanufacturing\nengineering\tand\tmanufacturing\ttest\torganizations,\tprototyping\texpense,\tcontract\tand\tprofessional\tservices\tand\tamortized\tequipment\texpense.\nR&D\texpenses\tincreased\t$894\tmillion,\tor\t29%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\tDecember\t31,\t2022.\tThe\noverall\tincrease\twas\tprimarily\tdriven\tby\tadditional\tcosts\tin\tthe\tcurrent\tyear\trelated\tto\tthe\tpre-production\tphase\tfor\tCybertruck,\tAI\tand\tother\tprograms.\nR&D\texpenses\tas\ta\tpercentage\tof\trevenue\tstayed\tconsistent\tat\t4%\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\nDecember\t31,\t2022.\tOur\tR&D\texpenses\thave\tincreased\tproportionately\twith\ttotal\trevenues\tas\twe\tcontinue\tto\texpand\tour\tproduct\troadmap\tand\ntechnologies.\nSelling,\tGeneral\tand\tAdministrative\tExpense\nYear\tEnded\tDecember\t31,2023\tvs.\t2022\tChange2022\tvs.\t2021\tChange\n(Dollars\tin\tmillions)202320222021$%$%\nSelling,\tgeneral\tand\tadministrative\n$4,800\t$3,946\t$4,517\t$854\t22\t%$(571)(13)%\nAs\ta\tpercentage\tof\trevenues5\t%5\t%8\t%\nSelling,\tgeneral\tand\tadministrative\t(“SG&A”)\texpenses\tgenerally\tconsist\tof\tpersonnel\tand\tfacilities\tcosts\trelated\tto\tour\tstores,\tmarketing,\tsales,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 42, "lines": { "from": 1, "to": 24 } } } }, { "pageContent": "executive,\tfinance,\thuman\tresources,\tinformation\ttechnology\tand\tlegal\torganizations,\tas\twell\tas\tfees\tfor\tprofessional\tand\tcontract\tservices\tand\tlitigation\nsettlements.\nSG&A\texpenses\tincreased\t$854\tmillion,\tor\t22%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\tDecember\t31,\t2022.\tThis\twas\ndriven\tby\ta\t$447\tmillion\tincrease\tin\temployee\tand\tlabor\tcosts\tprimarily\tfrom\tincreased\theadcount,\tincluding\tprofessional\tservices\tand\ta\t$363\tmillion\nincrease\tin\tfacilities\trelated\texpenses.\nRestructuring\tand\tOther\nYear\tEnded\tDecember\t31,2023\tvs.\t2022\tChange2022\tvs.\t2021\tChange\n(Dollars\tin\tmillions)202320222021$%$%\nRestructuring\tand\tother\n$—\t$176\t$(27)$(176)(100)%$203\tNot\tmeaningful\nDuring\tthe\tyear\tended\tDecember\t31,\t2022,\twe\trecorded\tan\timpairment\tloss\tof\t$204\tmillion\tas\twell\tas\trealized\tgains\tof\t$64\tmillion\tin\tconnection\nwith\tconverting\tour\tholdings\tof\tdigital\tassets\tinto\tfiat\tcurrency.\tWe\talso\trecorded\tother\texpenses\tof\t$36\tmillion\tduring\tthe\tsecond\tquarter\tof\tthe\tyear\nended\tDecember\t31,\t2022,\trelated\tto\temployee\tterminations.\nInterest\tIncome\nYear\tEnded\tDecember\t31,2023\tvs.\t2022\tChange2022\tvs.\t2021\tChange\n(Dollars\tin\tmillions)202320222021$%$%\nInterest\tincome\n$1,066\t$297\t$56\t$769\t259\t%$241\t430\t%\n41", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 42, "lines": { "from": 25, "to": 43 } } } }, { "pageContent": "Interest\tincome\tincreased\t$769\tmillion,\tor\t259%,\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\tDecember\t31,\t2022.\tThis\nincrease\twas\tprimarily\tdue\tto\thigher\tinterest\tearned\ton\tour\tcash\tand\tcash\tequivalents\tand\tshort-term\tinvestments\tin\tthe\tyear\tended\tDecember\t31,\t2023\nas\tcompared\tto\tthe\tprior\tyear\tdue\tto\trising\tinterest\trates\tand\tour\tincreasing\tportfolio\tbalance.\nOther\tIncome\t(Expense),\tNet\nYear\tEnded\tDecember\t31,2023\tvs.\t2022\tChange2022\tvs.\t2021\tChange\n(Dollars\tin\tmillions)202320222021$%$%\nOther\tincome\t(expense),\tnet$172\t$(43)$135\t$215\tNot\tmeaningful$(178)Not\tmeaningful\nOther\tincome\t(expense),\tnet,\tconsists\tprimarily\tof\tforeign\texchange\tgains\tand\tlosses\trelated\tto\tour\tforeign\tcurrency-denominated\tmonetary\tassets\nand\tliabilities.\tWe\texpect\tour\tforeign\texchange\tgains\tand\tlosses\twill\tvary\tdepending\tupon\tmovements\tin\tthe\tunderlying\texchange\trates.\nOther\tincome,\tnet,\tchanged\tfavorably\tby\t$215\tmillion\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\tDecember\t31,\t2022.\nThe\tfavorable\tchange\twas\tprimarily\tdue\tto\tfluctuations\tin\tforeign\tcurrency\texchange\trates\ton\tour\tintercompany\tbalances.\n(Benefit\tfrom)\tProvision\tfor\tIncome\tTaxes\nYear\tEnded\tDecember\t31,2023\tvs.\t2022\tChange2022\tvs.\t2021\tChange\n(Dollars\tin\tmillions)202320222021$%$%\n(Benefit\tfrom)\tprovision\tfor\tincome\ttaxes\n$(5,001)$1,132\t$699\t$(6,133)Not\tmeaningful$433\t62\t%\nEffective\ttax\trate(50)%8\t%11\t%\nWe\tmonitor\tthe\trealizability\tof\tour\tdeferred\ttax\tassets\ttaking\tinto\taccount\tall\trelevant\tfactors\tat\teach\treporting\tperiod.\tAs\tof\tDecember\t31,\t2023,\nbased\ton\tthe\trelevant\tweight\tof\tpositive\tand\tnegative\tevidence,\tincluding\tthe\tamount\tof\tour\ttaxable\tincome\tin\trecent\tyears\twhich\tis\tobjective\tand\nverifiable,\tand\tconsideration\tof\tour\texpected\tfuture\ttaxable\tearnings,\twe\tconcluded\tthat\tit\tis\tmore\tlikely\tthan\tnot\tthat\tour\tU.S.\tfederal\tand\tcertain\tstate", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 43, "lines": { "from": 1, "to": 20 } } } }, { "pageContent": "deferred\ttax\tassets\tare\trealizable.\tAs\tsuch,\twe\treleased\t$6.54\tbillion\tof\tour\tvaluation\tallowance\tassociated\twith\tthe\tU.S.\tfederal\tand\tstate\tdeferred\ttax\nassets,\twith\tthe\texception\tof\tour\tCalifornia\tdeferred\ttax\tassets.\tApproximately\t$5.93\tbillion\tof\tthe\ttotal\tvaluation\tallowance\trelease\twas\trelated\tto\ndeferred\ttax\tassets\tto\tbe\trealized\tin\tthe\tfuture\tyears\tand\tthe\tremainder\tbenefited\tus\tduring\tthe\tyear\tended\tDecember\t31,\t2023.\tWe\tcontinue\tto\tmaintain\na\tfull\tvaluation\tallowance\tagainst\tour\tCalifornia\tdeferred\ttax\tassets\tas\tof\tDecember\t31,\t2023,\tbecause\twe\tconcluded\tthey\tare\tnot\tmore\tlikely\tthan\tnot\tto\nbe\trealized\tas\twe\texpect\tour\tCalifornia\tdeferred\ttax\tassets\tgeneration\tin\tfuture\tyears\tto\texceed\tour\tability\tto\tuse\tthese\tdeferred\ttax\tassets.\nOur\t(benefit\tfrom)\tprovision\tfor\tincome\ttaxes\tchanged\tby\t$6.13\tbillion\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\nDecember\t31,\t2022,\tprimarily\tdue\tto\tthe\trelease\tof\t$6.54\tbillion\tof\tour\tvaluation\tallowance\tassociated\twith\tthe\tU.S.\tfederal\tand\tcertain\tstate\tdeferred\ttax\nassets.\nOur\teffective\ttax\trate\tchanged\tfrom\tan\texpense\tof\t8%\tto\ta\tbenefit\tof\t50%\tin\tthe\tyear\tended\tDecember\t31,\t2023\tas\tcompared\tto\tthe\tyear\tended\nDecember\t31,\t2022,\tprimarily\tdue\tto\tthe\trelease\tof\tthe\tvaluation\tallowance\tregarding\tour\tU.S.\tfederal\tand\tcertain\tstate\tdeferred\ttax\tassets.\nSee\tNote\t14,\tIncome\tTaxes,\tto\tthe\tconsolidated\tfinancial\tstatements\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K\tfor\tfurther\tdetails.\nLiquidity\tand\tCapital\tResources\nWe\texpect\tto\tcontinue\tto\tgenerate\tnet\tpositive\toperating\tcash\tflow\tas\twe\thave\tdone\tin\tthe\tlast\tfive\tfiscal\tyears.\tThe\tcash\twe\tgenerate\tfrom\tour\tcore\noperations\tenables\tus\tto\tfund\tongoing\toperations\tand\tproduction,\tour\tresearch\tand\tdevelopment\tprojects\tfor\tnew\tproducts\tand\ttechnologies\tincluding\tour\nproprietary\tbattery\tcells,\tadditional\tmanufacturing\tramps\tat\texisting\tmanufacturing\tfacilities,\tthe\tconstruction\tof\tfuture\tfactories,\tand\tthe\tcontinued", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 43, "lines": { "from": 21, "to": 35 } } } }, { "pageContent": "expansion\tof\tour\tretail\tand\tservice\tlocations,\tbody\tshops,\tMobile\tService\tfleet,\tSupercharger,\tincluding\tto\tsupport\tNACS,\tenergy\tproduct\tinstallation\ncapabilities\tand\tautonomy\tand\tother\tartificial\tintelligence\tenabled\tproducts.\n42", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 43, "lines": { "from": 36, "to": 38 } } } }, { "pageContent": "In\taddition,\tbecause\ta\tlarge\tportion\tof\tour\tfuture\texpenditures\twill\tbe\tto\tfund\tour\tgrowth,\twe\texpect\tthat\tif\tneeded\twe\twill\tbe\table\tto\tadjust\tour\ncapital\tand\toperating\texpenditures\tby\toperating\tsegment.\tFor\texample,\tif\tour\tnear-term\tmanufacturing\toperations\tdecrease\tin\tscale\tor\tramp\tmore\tslowly\nthan\texpected,\tincluding\tdue\tto\tglobal\teconomic\tor\tbusiness\tconditions,\twe\tmay\tchoose\tto\tcorrespondingly\tslow\tthe\tpace\tof\tour\tcapital\texpenditures.\nFinally,\twe\tcontinually\tevaluate\tour\tcash\tneeds\tand\tmay\tdecide\tit\tis\tbest\tto\traise\tadditional\tcapital\tor\tseek\talternative\tfinancing\tsources\tto\tfund\tthe\trapid\ngrowth\tof\tour\tbusiness,\tincluding\tthrough\tdrawdowns\ton\texisting\tor\tnew\tdebt\tfacilities\tor\tfinancing\tfunds.\tConversely,\twe\tmay\talso\tfrom\ttime\tto\ttime\ndetermine\tthat\tit\tis\tin\tour\tbest\tinterests\tto\tvoluntarily\trepay\tcertain\tindebtedness\tearly.\nAccordingly,\twe\tbelieve\tthat\tour\tcurrent\tsources\tof\tfunds\twill\tprovide\tus\twith\tadequate\tliquidity\tduring\tthe\t12-month\tperiod\tfollowing\tDecember\t31,\n2023,\tas\twell\tas\tin\tthe\tlong-term.\nSee\tthe\tsections\tbelow\tfor\tmore\tdetails\tregarding\tthe\tmaterial\trequirements\tfor\tcash\tin\tour\tbusiness\tand\tour\tsources\tof\tliquidity\tto\tmeet\tsuch\nneeds.\nMaterial\tCash\tRequirements\nFrom\ttime\tto\ttime\tin\tthe\tordinary\tcourse\tof\tbusiness,\twe\tenter\tinto\tagreements\twith\tvendors\tfor\tthe\tpurchase\tof\tcomponents\tand\traw\tmaterials\tto\nbe\tused\tin\tthe\tmanufacture\tof\tour\tproducts.\tHowever,\tdue\tto\tcontractual\tterms,\tvariability\tin\tthe\tprecise\tgrowth\tcurves\tof\tour\tdevelopment\tand\nproduction\tramps,\tand\topportunities\tto\trenegotiate\tpricing,\twe\tgenerally\tdo\tnot\thave\tbinding\tand\tenforceable\tpurchase\torders\tunder\tsuch\tcontracts\nbeyond\tthe\tshort-term,\tand\tthe\ttiming\tand\tmagnitude\tof\tpurchase\torders\tbeyond\tsuch\tperiod\tis\tdifficult\tto\taccurately\tproject.\nAs\tdiscussed\tin\tand\tsubject\tto\tthe\tconsiderations\treferenced\tin\tPart\tII,\tItem\t7,\tManagement's\tDiscussion\tand\tAnalysis\tof\tFinancial\tCondition\tand", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 44, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "Results\tof\tOperations—Management\tOpportunities,\tChallenges\tand\tUncertainties\tand\t2023\tOutlook—Cash\tFlow\tand\tCapital\tExpenditure\tTrends\tin\tthis\nAnnual\tReport\ton\tForm\t10-K,\twe\tcurrently\texpect\tour\tcapital\texpenditures\tto\tsupport\tour\tprojects\tglobally\tto\texceed\t$10.00\tbillion\tin\t2024\tand\tbe\nbetween\t$8.00\tto\t$10.00\tbillion\tin\teach\tof\tthe\tfollowing\ttwo\tfiscal\tyears.\tIn\tconnection\twith\tour\toperations\tat\tGigafactory\tNew\tYork,\twe\thave\tan\nagreement\tto\tspend\tor\tincur\t$5.00\tbillion\tin\tcombined\tcapital,\toperational\texpenses,\tcosts\tof\tgoods\tsold\tand\tother\tcosts\tin\tthe\tState\tof\tNew\tYork\tthrough\nDecember\t31,\t2029\t(pursuant\tto\ta\tdeferral\tof\tour\trequired\ttimelines\tto\tmeet\tsuch\tobligations\tthat\twas\tgranted\tin\tApril\t2021,\tand\twhich\twas\tmemorialized\nin\tan\tamendment\tto\tour\tagreement\twith\tthe\tSUNY\tFoundation\tin\tAugust\t2021).\tFor\tdetails\tregarding\tthese\tobligations,\trefer\tto\tNote\t15,\tCommitments\nand\tContingencies,\tto\tthe\tconsolidated\tfinancial\tstatements\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K.\nAs\tof\tDecember\t31,\t2023,\twe\tand\tour\tsubsidiaries\thad\toutstanding\t$4.68\tbillion\tin\taggregate\tprincipal\tamount\tof\tindebtedness,\tof\twhich\t$1.98\nbillion\tis\tscheduled\tto\tbecome\tdue\tin\tthe\tsucceeding\t12\tmonths.\tAs\tof\tDecember\t31,\t2023,\tour\ttotal\tminimum\tlease\tpayments\twas\t$5.96\tbillion,\tof\twhich\n$1.31\tbillion\tis\tdue\tin\tthe\tsucceeding\t12\tmonths.\tFor\tdetails\tregarding\tour\tindebtedness\tand\tlease\tobligations,\trefer\tto\tNote\t11,\tDebt,\tand\tNote\t12,\nLeases,\tto\tthe\tconsolidated\tfinancial\tstatements\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K.\nSources\tand\tConditions\tof\tLiquidity\nOur\tsources\tto\tfund\tour\tmaterial\tcash\trequirements\tare\tpredominantly\tfrom\tour\tdeliveries\tand\tservicing\tof\tnew\tand\tused\tvehicles,\tsales\tand\ninstallations\tof\tour\tenergy\tstorage\tproducts\tand\tsolar\tenergy\tsystems,\tproceeds\tfrom\tdebt\tfacilities\tand\tproceeds\tfrom\tequity\tofferings,\twhen\tapplicable.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 44, "lines": { "from": 17, "to": 30 } } } }, { "pageContent": "As\tof\tDecember\t31,\t2023,\twe\thad\t$16.40\tbillion\tand\t$12.70\tbillion\tof\tcash\tand\tcash\tequivalents\tand\tshort-term\tinvestments,\trespectively.\tBalances\nheld\tin\tforeign\tcurrencies\thad\ta\tU.S.\tdollar\tequivalent\tof\t$4.43\tbillion\tand\tconsisted\tprimarily\tof\tChinese\tyuan\tand\teuros.\tWe\thad\t$5.03\tbillion\tof\tunused\ncommitted\tcredit\tamounts\tas\tof\tDecember\t31,\t2023.\tFor\tdetails\tregarding\tour\tindebtedness,\trefer\tto\tNote\t11,\tDebt,\tto\tthe\tconsolidated\tfinancial\nstatements\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K.\nWe\tcontinue\tadapting\tour\tstrategy\tto\tmeet\tour\tliquidity\tand\trisk\tobjectives,\tsuch\tas\tinvesting\tin\tU.S.\tgovernment\tsecurities\tand\tother\tinvestments,\nto\tdo\tmore\tvertical\tintegration,\texpand\tour\tproduct\troadmap\tand\tprovide\tfinancing\toptions\tto\tour\tcustomers.\n43", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 44, "lines": { "from": 31, "to": 37 } } } }, { "pageContent": "Summary\tof\tCash\tFlows\n\tYear\tEnded\tDecember\t31,\n(Dollars\tin\tmillions)202320222021\nNet\tcash\tprovided\tby\toperating\tactivities$13,256\t$14,724\t$11,497\t\nNet\tcash\tused\tin\tinvesting\tactivities$(15,584)$(11,973)$(7,868)\nNet\tcash\tprovided\tby\t(used\tin)\tfinancing\tactivities$2,589\t$(3,527)$(5,203)\nCash\tFlows\tfrom\tOperating\tActivities\nOur\tcash\tflows\tfrom\toperating\tactivities\tare\tsignificantly\taffected\tby\tour\tcash\tinvestments\tto\tsupport\tthe\tgrowth\tof\tour\tbusiness\tin\tareas\tsuch\tas\nresearch\tand\tdevelopment\tand\tselling,\tgeneral\tand\tadministrative\tand\tworking\tcapital.\tOur\toperating\tcash\tinflows\tinclude\tcash\tfrom\tvehicle\tsales\tand\nrelated\tservicing,\tcustomer\tlease\tand\tfinancing\tpayments,\tcustomer\tdeposits,\tcash\tfrom\tsales\tof\tregulatory\tcredits\tand\tenergy\tgeneration\tand\tstorage\nproducts,\tand\tinterest\tincome\ton\tour\tcash\tand\tinvestments\tportfolio.\tThese\tcash\tinflows\tare\toffset\tby\tour\tpayments\tto\tsuppliers\tfor\tproduction\tmaterials\nand\tparts\tused\tin\tour\tmanufacturing\tprocess,\toperating\texpenses,\toperating\tlease\tpayments\tand\tinterest\tpayments\ton\tour\tfinancings.\nNet\tcash\tprovided\tby\toperating\tactivities\tdecreased\tby\t$1.47\tbillion\tto\t$13.26\tbillion\tduring\tthe\tyear\tended\tDecember\t31,\t2023\tfrom\t$14.72\tbillion\nduring\tthe\tyear\tended\tDecember\t31,\t2022.\tThis\tdecrease\twas\tprimarily\tdue\tto\tthe\tdecrease\tin\tnet\tincome\texcluding\tnon-cash\texpenses,\tgains\tand\tlosses\nof\t$2.93\tbillion,\tpartially\toffset\tby\tfavorable\tchanges\tin\tnet\toperating\tassets\tand\tliabilities\tof\t$1.46\tbillion.\nCash\tFlows\tfrom\tInvesting\tActivities\nCash\tflows\tfrom\tinvesting\tactivities\tand\ttheir\tvariability\tacross\teach\tperiod\trelated\tprimarily\tto\tcapital\texpenditures,\twhich\twere\t$8.90\tbillion\tfor\tthe\nyear\tended\tDecember\t31,\t2023\tand\t$7.16\tbillion\tfor\tthe\tyear\tended\tDecember\t31,\t2022,\tmainly\tfor\tglobal\tfactory\texpansion\tand\tmachinery\tand\nequipment\tas\twe\texpand\tour\tproduct\troadmap.\tWe\talso\tpurchased\t$6.62\tbillion\tand\t$5.81\tbillion\tof\tinvestments,\tnet\tof\tproceeds\tfrom\tmaturities\tand", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 45, "lines": { "from": 1, "to": 19 } } } }, { "pageContent": "sales,\tfor\tthe\tyear\tended\tDecember\t31,\t2023\tand\t2022,\trespectively.\tAdditionally,\tproceeds\tfrom\tsales\tof\tdigital\tassets\twas\t$936\tmillion\tin\tthe\tyear\nended\tDecember\t31,\t2022.\nCash\tFlows\tfrom\tFinancing\tActivities\nNet\tcash\tfrom\tfinancing\tactivities\tchanged\tby\t$6.12\tbillion\tto\t$2.59\tbillion\tnet\tcash\tprovided\tby\tfinancing\tactivities\tduring\tthe\tyear\tended\nDecember\t31,\t2023\tfrom\t$3.53\tbillion\tnet\tcash\tused\tin\tfinancing\tactivities\tduring\tthe\tyear\tended\tDecember\t31,\t2022.\tThe\tchange\twas\tprimarily\tdue\tto\ta\n$3.93\tbillion\tincrease\tin\tproceeds\tfrom\tissuances\tof\tdebt\tand\ta\t$2.01\tbillion\tdecrease\tin\trepayments\tof\tdebt.\tSee\tNote\t11,\tDebt,\tto\tthe\tconsolidated\nfinancial\tstatements\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\t10-K\tfor\tfurther\tdetails\tregarding\tour\tdebt\tobligations.\nRecent\tAccounting\tPronouncements\nSee\tNote\t2,\tSummary\tof\tSignificant\tAccounting\tPolicies,\tto\tthe\tconsolidated\tfinancial\tstatements\tincluded\telsewhere\tin\tthis\tAnnual\tReport\ton\tForm\n10-K.\n44", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 45, "lines": { "from": 20, "to": 30 } } } }, { "pageContent": "ITEM\t7A.\tQUANTITATIVE\tAND\tQUALITATIVE\tDISCLOSURES\tABOUT\tMARKET\tRISK\nForeign\tCurrency\tRisk\nWe\ttransact\tbusiness\tglobally\tin\tmultiple\tcurrencies\tand\thence\thave\tforeign\tcurrency\trisks\trelated\tto\tour\trevenue,\tcosts\tof\trevenue\tand\toperating\nexpenses\tdenominated\tin\tcurrencies\tother\tthan\tthe\tU.S.\tdollar\t(primarily\tthe\tChinese\tyuan\tand\teuro\tin\trelation\tto\tour\tcurrent\tyear\toperations).\tIn\tgeneral,\nwe\tare\ta\tnet\treceiver\tof\tcurrencies\tother\tthan\tthe\tU.S.\tdollar\tfor\tour\tforeign\tsubsidiaries.\tAccordingly,\tchanges\tin\texchange\trates\taffect\tour\toperating\nresults\tas\texpressed\tin\tU.S.\tdollars\tas\twe\tdo\tnot\ttypically\thedge\tforeign\tcurrency\trisk.\nWe\thave\talso\texperienced,\tand\twill\tcontinue\tto\texperience,\tfluctuations\tin\tour\tnet\tincome\tas\ta\tresult\tof\tgains\t(losses)\ton\tthe\tsettlement\tand\tthe\tre-\nmeasurement\tof\tmonetary\tassets\tand\tliabilities\tdenominated\tin\tcurrencies\tthat\tare\tnot\tthe\tlocal\tcurrency\t(primarily\tconsisting\tof\tour\tintercompany\tand\ncash\tand\tcash\tequivalents\tbalances).\nWe\tconsidered\tthe\thistorical\ttrends\tin\tforeign\tcurrency\texchange\trates\tand\tdetermined\tthat\tit\tis\treasonably\tpossible\tthat\tadverse\tchanges\tin\tforeign\ncurrency\texchange\trates\tof\t10%\tfor\tall\tcurrencies\tcould\tbe\texperienced\tin\tthe\tnear-term.\tThese\tchanges\twere\tapplied\tto\tour\ttotal\tmonetary\tassets\tand\nliabilities\tdenominated\tin\tcurrencies\tother\tthan\tour\tlocal\tcurrencies\tat\tthe\tbalance\tsheet\tdate\tto\tcompute\tthe\timpact\tthese\tchanges\twould\thave\thad\ton\nour\tnet\tincome\tbefore\tincome\ttaxes.\tThese\tchanges\twould\thave\tresulted\tin\ta\tgain\tor\tloss\tof\t$1.01\tbillion\tat\tDecember\t31,\t2023\tand\t$473\tmillion\tat\nDecember\t31,\t2022,\tassuming\tno\tforeign\tcurrency\thedging.\n45", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 46, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "ITEM\t8.\tFINANCIAL\tSTATEMENTS\tAND\tSUPPLEMENTARY\tDATA\nIndex\tto\tConsolidated\tFinancial\tStatements\nPage\nReport\tof\tIndependent\tRegistered\tPublic\tAccounting\tFirm\t(PCAOB\tID:\t238)47\nConsolidated\tBalance\tSheets49\nConsolidated\tStatements\tof\tOperations50\nConsolidated\tStatements\tof\tComprehensive\tIncome51\nConsolidated\tStatements\tof\tRedeemable\tNoncontrolling\tInterests\tand\tEquity52\nConsolidated\tStatements\tof\tCash\tFlows53\nNotes\tto\tConsolidated\tFinancial\tStatements54\n46", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 47, "lines": { "from": 1, "to": 11 } } } }, { "pageContent": "Report\tof\tIndependent\tRegistered\tPublic\tAccounting\tFirm\nTo\tthe\tBoard\tof\tDirectors\tand\tStockholders\tof\tTesla,\tInc.\nOpinions\ton\tthe\tFinancial\tStatements\tand\tInternal\tControl\tover\tFinancial\tReporting\nWe\thave\taudited\tthe\taccompanying\tconsolidated\tbalance\tsheets\tof\tTesla,\tInc.\tand\tits\tsubsidiaries\t(the\t“Company”)\tas\tof\tDecember\t31,\t2023\tand\t2022,\nand\tthe\trelated\tconsolidated\tstatements\tof\toperations,\tof\tcomprehensive\tincome,\tof\tredeemable\tnoncontrolling\tinterests\tand\tequity\tand\tof\tcash\tflows\tfor\neach\tof\tthe\tthree\tyears\tin\tthe\tperiod\tended\tDecember\t31,\t2023,\tincluding\tthe\trelated\tnotes\t(collectively\treferred\tto\tas\tthe\t“consolidated\tfinancial\nstatements”).\tWe\talso\thave\taudited\tthe\tCompany's\tinternal\tcontrol\tover\tfinancial\treporting\tas\tof\tDecember\t31,\t2023,\tbased\ton\tcriteria\testablished\tin\nInternal\tControl\t-\tIntegrated\tFramework\t(2013)\tissued\tby\tthe\tCommittee\tof\tSponsoring\tOrganizations\tof\tthe\tTreadway\tCommission\t(COSO).\nIn\tour\topinion,\tthe\tconsolidated\tfinancial\tstatements\treferred\tto\tabove\tpresent\tfairly,\tin\tall\tmaterial\trespects,\tthe\tfinancial\tposition\tof\tthe\tCompany\tas\tof\nDecember\t31,\t2023\tand\t2022,\tand\tthe\tresults\tof\tits\toperations\tand\tits\tcash\tflows\tfor\teach\tof\tthe\tthree\tyears\tin\tthe\tperiod\tended\tDecember\t31,\t2023\tin\nconformity\twith\taccounting\tprinciples\tgenerally\taccepted\tin\tthe\tUnited\tStates\tof\tAmerica.\tAlso\tin\tour\topinion,\tthe\tCompany\tmaintained,\tin\tall\tmaterial\nrespects,\teffective\tinternal\tcontrol\tover\tfinancial\treporting\tas\tof\tDecember\t31,\t2023,\tbased\ton\tcriteria\testablished\tin\tInternal\tControl\t-\tIntegrated\nFramework\t(2013)\tissued\tby\tthe\tCOSO.\nChanges\tin\tAccounting\tPrinciples\nAs\tdiscussed\tin\tNote\t2\tto\tthe\tconsolidated\tfinancial\tstatements,\tthe\tCompany\tchanged\tthe\tmanner\tin\twhich\tit\taccounts\tfor\tconvertible\tdebt\tin\t2021.\nBasis\tfor\tOpinions\nThe\tCompany's\tmanagement\tis\tresponsible\tfor\tthese\tconsolidated\tfinancial\tstatements,\tfor\tmaintaining\teffective\tinternal\tcontrol\tover\tfinancial\treporting,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 48, "lines": { "from": 1, "to": 17 } } } }, { "pageContent": "and\tfor\tits\tassessment\tof\tthe\teffectiveness\tof\tinternal\tcontrol\tover\tfinancial\treporting,\tincluded\tin\tManagement’s\tReport\ton\tInternal\tControl\tover\tFinancial\nReporting\tappearing\tunder\tItem\t9A.\tOur\tresponsibility\tis\tto\texpress\topinions\ton\tthe\tCompany’s\tconsolidated\tfinancial\tstatements\tand\ton\tthe\tCompany's\ninternal\tcontrol\tover\tfinancial\treporting\tbased\ton\tour\taudits.\tWe\tare\ta\tpublic\taccounting\tfirm\tregistered\twith\tthe\tPublic\tCompany\tAccounting\tOversight\nBoard\t(United\tStates)\t(PCAOB)\tand\tare\trequired\tto\tbe\tindependent\twith\trespect\tto\tthe\tCompany\tin\taccordance\twith\tthe\tU.S.\tfederal\tsecurities\tlaws\tand\nthe\tapplicable\trules\tand\tregulations\tof\tthe\tSecurities\tand\tExchange\tCommission\tand\tthe\tPCAOB.\nWe\tconducted\tour\taudits\tin\taccordance\twith\tthe\tstandards\tof\tthe\tPCAOB.\tThose\tstandards\trequire\tthat\twe\tplan\tand\tperform\tthe\taudits\tto\tobtain\nreasonable\tassurance\tabout\twhether\tthe\tconsolidated\tfinancial\tstatements\tare\tfree\tof\tmaterial\tmisstatement,\twhether\tdue\tto\terror\tor\tfraud,\tand\twhether\neffective\tinternal\tcontrol\tover\tfinancial\treporting\twas\tmaintained\tin\tall\tmaterial\trespects.\nOur\taudits\tof\tthe\tconsolidated\tfinancial\tstatements\tincluded\tperforming\tprocedures\tto\tassess\tthe\trisks\tof\tmaterial\tmisstatement\tof\tthe\tconsolidated\nfinancial\tstatements,\twhether\tdue\tto\terror\tor\tfraud,\tand\tperforming\tprocedures\tthat\trespond\tto\tthose\trisks.\tSuch\tprocedures\tincluded\texamining,\ton\ta\ntest\tbasis,\tevidence\tregarding\tthe\tamounts\tand\tdisclosures\tin\tthe\tconsolidated\tfinancial\tstatements.\tOur\taudits\talso\tincluded\tevaluating\tthe\taccounting\nprinciples\tused\tand\tsignificant\testimates\tmade\tby\tmanagement,\tas\twell\tas\tevaluating\tthe\toverall\tpresentation\tof\tthe\tconsolidated\tfinancial\tstatements.\nOur\taudit\tof\tinternal\tcontrol\tover\tfinancial\treporting\tincluded\tobtaining\tan\tunderstanding\tof\tinternal\tcontrol\tover\tfinancial\treporting,\tassessing\tthe\trisk\nthat\ta\tmaterial\tweakness\texists,\tand\ttesting\tand\tevaluating\tthe\tdesign\tand\toperating\teffectiveness\tof\tinternal\tcontrol\tbased\ton\tthe\tassessed\trisk.\tOur", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 48, "lines": { "from": 18, "to": 31 } } } }, { "pageContent": "audits\talso\tincluded\tperforming\tsuch\tother\tprocedures\tas\twe\tconsidered\tnecessary\tin\tthe\tcircumstances.\tWe\tbelieve\tthat\tour\taudits\tprovide\ta\treasonable\nbasis\tfor\tour\topinions.\n47", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 48, "lines": { "from": 32, "to": 34 } } } }, { "pageContent": "Definition\tand\tLimitations\tof\tInternal\tControl\tover\tFinancial\tReporting\nA\tcompany’s\tinternal\tcontrol\tover\tfinancial\treporting\tis\ta\tprocess\tdesigned\tto\tprovide\treasonable\tassurance\tregarding\tthe\treliability\tof\tfinancial\treporting\nand\tthe\tpreparation\tof\tfinancial\tstatements\tfor\texternal\tpurposes\tin\taccordance\twith\tgenerally\taccepted\taccounting\tprinciples.\tA\tcompany’s\tinternal\ncontrol\tover\tfinancial\treporting\tincludes\tthose\tpolicies\tand\tprocedures\tthat\t(i)\tpertain\tto\tthe\tmaintenance\tof\trecords\tthat,\tin\treasonable\tdetail,\taccurately\nand\tfairly\treflect\tthe\ttransactions\tand\tdispositions\tof\tthe\tassets\tof\tthe\tcompany;\t(ii)\tprovide\treasonable\tassurance\tthat\ttransactions\tare\trecorded\tas\nnecessary\tto\tpermit\tpreparation\tof\tfinancial\tstatements\tin\taccordance\twith\tgenerally\taccepted\taccounting\tprinciples,\tand\tthat\treceipts\tand\texpenditures\nof\tthe\tcompany\tare\tbeing\tmade\tonly\tin\taccordance\twith\tauthorizations\tof\tmanagement\tand\tdirectors\tof\tthe\tcompany;\tand\t(iii)\tprovide\treasonable\nassurance\tregarding\tprevention\tor\ttimely\tdetection\tof\tunauthorized\tacquisition,\tuse,\tor\tdisposition\tof\tthe\tcompany’s\tassets\tthat\tcould\thave\ta\tmaterial\neffect\ton\tthe\tfinancial\tstatements.\nBecause\tof\tits\tinherent\tlimitations,\tinternal\tcontrol\tover\tfinancial\treporting\tmay\tnot\tprevent\tor\tdetect\tmisstatements.\tAlso,\tprojections\tof\tany\tevaluation\nof\teffectiveness\tto\tfuture\tperiods\tare\tsubject\tto\tthe\trisk\tthat\tcontrols\tmay\tbecome\tinadequate\tbecause\tof\tchanges\tin\tconditions,\tor\tthat\tthe\tdegree\tof\ncompliance\twith\tthe\tpolicies\tor\tprocedures\tmay\tdeteriorate.\nCritical\tAudit\tMatters\nThe\tcritical\taudit\tmatter\tcommunicated\tbelow\tis\ta\tmatter\tarising\tfrom\tthe\tcurrent\tperiod\taudit\tof\tthe\tconsolidated\tfinancial\tstatements\tthat\twas\ncommunicated\tor\trequired\tto\tbe\tcommunicated\tto\tthe\taudit\tcommittee\tand\tthat\t(i)\trelates\tto\taccounts\tor\tdisclosures\tthat\tare\tmaterial\tto\tthe\tconsolidated", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 49, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "financial\tstatements\tand\t(ii)\tinvolved\tour\tespecially\tchallenging,\tsubjective,\tor\tcomplex\tjudgments.\tThe\tcommunication\tof\tcritical\taudit\tmatters\tdoes\tnot\nalter\tin\tany\tway\tour\topinion\ton\tthe\tconsolidated\tfinancial\tstatements,\ttaken\tas\ta\twhole,\tand\twe\tare\tnot,\tby\tcommunicating\tthe\tcritical\taudit\tmatter\tbelow,\nproviding\ta\tseparate\topinion\ton\tthe\tcritical\taudit\tmatter\tor\ton\tthe\taccounts\tor\tdisclosures\tto\twhich\tit\trelates.\nAutomotive\tWarranty\tReserve\nAs\tdescribed\tin\tNote\t2\tto\tthe\tconsolidated\tfinancial\tstatements,\ttotal\taccrued\twarranty,\twhich\tprimarily\trelates\tto\tthe\tautomotive\tsegment,\twas\t$5,152\nmillion\tas\tof\tDecember\t31,\t2023.\tThe\tCompany\tprovides\ta\tmanufacturer’s\twarranty\ton\tall\tnew\tand\tused\tTesla\tvehicles.\tA\twarranty\treserve\tis\taccrued\tfor\nthese\tproducts\tsold,\twhich\tincludes\tmanagement’s\tbest\testimate\tof\tthe\tprojected\tcosts\tto\trepair\tor\treplace\titems\tunder\twarranty\tand\trecalls\tif\tidentified.\nThese\testimates\tare\tbased\ton\tactual\tclaims\tincurred\tto\tdate\tand\tan\testimate\tof\tthe\tnature,\tfrequency\tand\tcosts\tof\tfuture\tclaims.\nThe\tprincipal\tconsiderations\tfor\tour\tdetermination\tthat\tperforming\tprocedures\trelating\tto\tthe\tautomotive\twarranty\treserve\tis\ta\tcritical\taudit\tmatter\tare\nthe\tsignificant\tjudgment\tby\tmanagement\tin\tdetermining\tthe\tautomotive\twarranty\treserve\tfor\tcertain\tTesla\tvehicle\tmodels;\tthis\tin\tturn\tled\tto\tsignificant\nauditor\tjudgment,\tsubjectivity,\tand\teffort\tin\tperforming\tprocedures\tto\tevaluate\tmanagement’s\tsignificant\tassumptions\trelated\tto\tthe\tnature,\tfrequency\nand\tcosts\tof\tfuture\tclaims\tfor\tcertain\tTesla\tvehicle\tmodels,\tand\tthe\taudit\teffort\tinvolved\tthe\tuse\tof\tprofessionals\twith\tspecialized\tskill\tand\tknowledge.\nAddressing\tthe\tmatter\tinvolved\tperforming\tprocedures\tand\tevaluating\taudit\tevidence\tin\tconnection\twith\tforming\tour\toverall\topinion\ton\tthe\tconsolidated\nfinancial\tstatements.\tThese\tprocedures\tincluded\ttesting\tthe\teffectiveness\tof\tcontrols\trelating\tto\tmanagement’s\testimate\tof\tthe\tautomotive\twarranty", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 49, "lines": { "from": 16, "to": 29 } } } }, { "pageContent": "reserve\tfor\tcertain\tTesla\tvehicle\tmodels,\tincluding\tcontrols\tover\tmanagement’s\tsignificant\tassumptions\trelated\tto\tthe\tnature,\tfrequency\tand\tcosts\tof\nfuture\tclaims\tas\twell\tas\tthe\tcompleteness\tand\taccuracy\tof\tactual\tclaims\tincurred\tto\tdate.\tThese\tprocedures\talso\tincluded,\tamong\tothers,\tperforming\tone\nof\tthe\tfollowing:\t(i)\ttesting\tmanagement’s\tprocess\tfor\tdetermining\tthe\tautomotive\twarranty\treserve\tfor\tcertain\tTesla\tvehicle\tmodels\tor\t(ii)\tdeveloping\tan\nindependent\testimate\tof\tthe\tautomotive\twarranty\treserve\tfor\tcertain\tTesla\tvehicle\tmodels\tand\tcomparing\tthe\tindependent\testimate\tto\tmanagement’s\nestimate\tto\tevaluate\tthe\treasonableness\tof\tthe\testimate.\tTesting\tmanagement’s\tprocess\tinvolved\tevaluating\tthe\treasonableness\tof\tsignificant\nassumptions\trelated\tto\tthe\tnature\tand\tfrequency\tof\tfuture\tclaims\tand\tthe\trelated\tcosts\tto\trepair\tor\treplace\titems\tunder\twarranty.\tEvaluating\tthe\nassumptions\trelated\tto\tthe\tnature\tand\tfrequency\tof\tfuture\tclaims\tand\tthe\trelated\tcosts\tto\trepair\tor\treplace\titems\tunder\twarranty\tinvolved\tevaluating\nwhether\tthe\tassumptions\tused\twere\treasonable\tby\tperforming\ta\tlookback\tanalysis\tcomparing\tprior\tperiod\tforecasted\tclaims\tto\tactual\tclaims\tincurred.\nDeveloping\tthe\tindependent\testimate\tinvolved\ttesting\tthe\tcompleteness\tand\taccuracy\tof\thistorical\tvehicle\tclaims\tprocessed\tand\ttesting\tthat\tsuch\tclaims\nwere\tappropriately\tused\tby\tmanagement\tin\tthe\testimation\tof\tfuture\tclaims.\tProfessionals\twith\tspecialized\tskill\tand\tknowledge\twere\tused\tto\tassist\tin\ndeveloping\tan\tindependent\testimate\tof\tthe\tautomotive\twarranty\treserve\tfor\tcertain\tTesla\tvehicle\tmodels\tand\tin\tevaluating\tthe\tappropriateness\tof\tcertain\naspects\tof\tmanagement’s\tsignificant\tassumptions\trelated\tto\tthe\tnature\tand\tfrequency\tof\tfuture\tclaims.\n/s/\tPricewaterhouseCoopers\tLLP\nSan\tJose,\tCalifornia\nJanuary\t26,\t2024\nWe\thave\tserved\tas\tthe\tCompany’s\tauditor\tsince\t2005.\n48", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 49, "lines": { "from": 30, "to": 46 } } } }, { "pageContent": "Tesla,\tInc.\nConsolidated\tBalance\tSheets\n(in\tmillions,\texcept\tper\tshare\tdata)\nDecember\t31,\n2023\nDecember\t31,\n2022\nAssets\nCurrent\tassets\nCash\tand\tcash\tequivalents$16,398\t$16,253\t\nShort-term\tinvestments12,696\t5,932\t\nAccounts\treceivable,\tnet3,508\t2,952\t\nInventory13,626\t12,839\t\nPrepaid\texpenses\tand\tother\tcurrent\tassets3,388\t2,941\t\nTotal\tcurrent\tassets49,616\t40,917\t\nOperating\tlease\tvehicles,\tnet5,989\t5,035\t\nSolar\tenergy\tsystems,\tnet5,229\t5,489\t\nProperty,\tplant\tand\tequipment,\tnet29,725\t23,548\t\nOperating\tlease\tright-of-use\tassets4,180\t2,563\t\nDigital\tassets,\tnet184\t184\t\nIntangible\tassets,\tnet178\t215\t\nGoodwill253\t194\t\nDeferred\ttax\tassets6,733\t328\t\nOther\tnon-current\tassets4,531\t3,865\t\nTotal\tassets\n$106,618\t$82,338\t\nLiabilities\nCurrent\tliabilities\nAccounts\tpayable$14,431\t$15,255\t\nAccrued\tliabilities\tand\tother9,080\t8,205\t\nDeferred\trevenue2,864\t1,747\t\nCurrent\tportion\tof\tdebt\tand\tfinance\tleases2,373\t1,502\t\nTotal\tcurrent\tliabilities28,748\t26,709\t\nDebt\tand\tfinance\tleases,\tnet\tof\tcurrent\tportion2,857\t1,597\t\nDeferred\trevenue,\tnet\tof\tcurrent\tportion3,251\t2,804\t\nOther\tlong-term\tliabilities8,153\t5,330\t\nTotal\tliabilities43,009\t36,440\t\nCommitments\tand\tcontingencies\t(Note\t15)\nRedeemable\tnoncontrolling\tinterests\tin\tsubsidiaries242\t409\t\nEquity\nStockholders’\tequity\nPreferred\tstock;\t$0.001\tpar\tvalue;\t100\tshares\tauthorized;\tno\tshares\tissued\tand\toutstanding—\t—\t\nCommon\tstock;\t$0.001\tpar\tvalue;\t6,000\tshares\tauthorized;\t3,185\tand\t3,164\tshares\tissued\tand\toutstanding\tas\tof\nDecember\t31,\t2023\tand\t2022,\trespectively3\t3\t\nAdditional\tpaid-in\tcapital34,892\t32,177\t\nAccumulated\tother\tcomprehensive\tloss(143)(361)\nRetained\tearnings27,882\t12,885\t\nTotal\tstockholders’\tequity62,634\t44,704\t\nNoncontrolling\tinterests\tin\tsubsidiaries733\t785\t\nTotal\tliabilities\tand\tequity\n$106,618\t$82,338\t\nThe\taccompanying\tnotes\tare\tan\tintegral\tpart\tof\tthese\tconsolidated\tfinancial\tstatements.\n49", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 50, "lines": { "from": 1, "to": 53 } } } }, { "pageContent": "Tesla,\tInc.\nConsolidated\tStatements\tof\tOperations\n(in\tmillions,\texcept\tper\tshare\tdata)\nYear\tEnded\tDecember\t31,\n202320222021\nRevenues\nAutomotive\tsales$78,509\t$67,210\t$44,125\t\nAutomotive\tregulatory\tcredits1,790\t1,776\t1,465\t\nAutomotive\tleasing2,120\t2,476\t1,642\t\nTotal\tautomotive\trevenues\n82,419\t71,462\t47,232\t\nEnergy\tgeneration\tand\tstorage6,035\t3,909\t2,789\t\nServices\tand\tother8,319\t6,091\t3,802\t\nTotal\trevenues\n96,773\t81,462\t53,823\t\nCost\tof\trevenues\nAutomotive\tsales65,121\t49,599\t32,415\t\nAutomotive\tleasing1,268\t1,509\t978\t\nTotal\tautomotive\tcost\tof\trevenues\n66,389\t51,108\t33,393\t\nEnergy\tgeneration\tand\tstorage4,894\t3,621\t2,918\t\nServices\tand\tother7,830\t5,880\t3,906\t\nTotal\tcost\tof\trevenues\n79,113\t60,609\t40,217\t\nGross\tprofit\n17,660\t20,853\t13,606\t\nOperating\texpenses\nResearch\tand\tdevelopment3,969\t3,075\t2,593\t\nSelling,\tgeneral\tand\tadministrative4,800\t3,946\t4,517\t\nRestructuring\tand\tother—\t176\t(27)\nTotal\toperating\texpenses\n8,769\t7,197\t7,083\t\nIncome\tfrom\toperations8,891\t13,656\t6,523\t\nInterest\tincome1,066\t297\t56\t\nInterest\texpense(156)(191)(371)\nOther\tincome\t(expense),\tnet172\t(43)135\t\nIncome\tbefore\tincome\ttaxes9,973\t13,719\t6,343\t\n(Benefit\tfrom)\tprovision\tfor\tincome\ttaxes(5,001)1,132\t699\t\nNet\tincome14,974\t12,587\t5,644\t\nNet\t(loss)\tincome\tattributable\tto\tnoncontrolling\tinterests\tand\tredeemable\tnoncontrolling\tinterests\nin\tsubsidiaries(23)31\t125\t\nNet\tincome\tattributable\tto\tcommon\tstockholders\n$14,997\t$12,556\t$5,519\t\n\t\nNet\tincome\tper\tshare\tof\tcommon\tstock\tattributable\tto\tcommon\tstockholders\nBasic$4.73\t$4.02\t$1.87\t\nDiluted\n$4.30\t$3.62\t$1.63\t\nWeighted\taverage\tshares\tused\tin\tcomputing\tnet\tincome\tper\tshare\tof\tcommon\tstock\nBasic3,1743,1302,959\nDiluted\n3,4853,4753,386\nThe\taccompanying\tnotes\tare\tan\tintegral\tpart\tof\tthese\tconsolidated\tfinancial\tstatements.\n50", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 51, "lines": { "from": 1, "to": 54 } } } }, { "pageContent": "Tesla,\tInc.\nConsolidated\tStatements\tof\tComprehensive\tIncome\n(in\tmillions)\nYear\tEnded\tDecember\t31,\n202320222021\nNet\tincome$14,974\t$12,587\t$5,644\t\nOther\tcomprehensive\tincome\t(loss):\nForeign\tcurrency\ttranslation\tadjustment198\t(392)(308)\nUnrealized\tnet\tgain\t(loss)\ton\tinvestments16\t(23)(1)\nAdjustment\tfor\tnet\tloss\trealized\tand\tincluded\tin\tnet\tincome\t\t\t\t4\t—\t—\t\nComprehensive\tincome15,192\t12,172\t5,335\t\nLess:\tComprehensive\t(loss)\tincome\tattributable\tto\tnoncontrolling\tinterests\tand\nredeemable\tnoncontrolling\tinterests\tin\tsubsidiaries(23)31\t125\t\nComprehensive\tincome\tattributable\tto\tcommon\tstockholders\n$15,215\t$12,141\t$5,210\t\nThe\taccompanying\tnotes\tare\tan\tintegral\tpart\tof\tthese\tconsolidated\tfinancial\tstatements.\n51", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 52, "lines": { "from": 1, "to": 17 } } } }, { "pageContent": "Tesla,\tInc.\nConsolidated\tStatements\tof\tRedeemable\tNoncontrolling\tInterests\tand\tEquity\n(in\tmillions)\nRedeemable\nNoncontrolling\nInterests\nCommon\tStock\nAdditional\nPaid-In\nCapital\nAccumulated\nOther\nComprehensive\nIncome\t(Loss)\n(Accumulated\nDeficit)\nRetained\nEarnings\nTotal\nStockholders’\nEquity\nNoncontrolling\nInterests\tin\nSubsidiaries\nTotal\nEquitySharesAmount\nBalance\tas\tof\tDecember\t31,\t2020\n$604\t2,879$3\t$27,260\t$363\t$(5,401)$22,225\t$850\t$23,075\t\nAdjustments\tfor\tprior\tperiods\tfrom\tadopting\tASU\t2020-06—\t——\t(474)—\t211\t(263)—\t(263)\nExercises\tof\tconversion\tfeature\tof\tconvertible\tsenior\tnotes—\t2—\t6\t—\t—\t6\t—\t6\t\nSettlements\tof\twarrants—\t112—\t—\t—\t—\t—\t—\t—\t\nIssuance\tof\tcommon\tstock\tfor\tequity\tincentive\tawards—\t107—\t707\t—\t—\t707\t—\t707\t\nStock-based\tcompensation—\t——\t2,299\t—\t—\t2,299\t—\t2,299\t\nContributions\tfrom\tnoncontrolling\tinterests2\t——\t—\t—\t—\t—\t—\t—\t\nDistributions\tto\tnoncontrolling\tinterests(66)——\t—\t—\t—\t—\t(106)(106)\nBuy-outs\tof\tnoncontrolling\tinterests(15)——\t5\t—\t—\t5\t—\t5\t\nNet\tincome43\t——\t—\t—\t5,519\t5,519\t82\t5,601\t\nOther\tcomprehensive\tloss—\t——\t—\t(309)—\t(309)—\t(309)\nBalance\tas\tof\tDecember\t31,\t2021\n$568\t3,100$3\t$29,803\t$54\t$329\t$30,189\t$826\t$31,015\t\nSettlements\tof\twarrants—\t37—\t—\t—\t—\t—\t—\t—\t\nIssuance\tof\tcommon\tstock\tfor\tequity\tincentive\tawards—\t27—\t541\t—\t—\t541\t—\t541\t\nStock-based\tcompensation—\t——\t1,806\t—\t—\t1,806\t—\t1,806\t\nDistributions\tto\tnoncontrolling\tinterests(46)——\t—\t—\t—\t—\t(113)(113)\nBuy-outs\tof\tnoncontrolling\tinterests(11)——\t27\t—\t—\t27\t(61)(34)\nNet\t(loss)\tincome(102)——\t—\t—\t12,556\t12,556\t133\t12,689\t\nOther\tcomprehensive\tloss—\t——\t—\t(415)—\t(415)—\t(415)\nBalance\tas\tof\tDecember\t31,\t2022\n$409\t3,164$3\t$32,177\t$(361)$12,885\t$44,704\t$785\t$45,489\t\nIssuance\tof\tcommon\tstock\tfor\tequity\tincentive\tawards—\t21—\t700\t—\t—\t700\t—\t700\t\nStock-based\tcompensation—\t——\t2,013\t—\t—\t2,013\t—\t2,013\t\nDistributions\tto\tnoncontrolling\tinterests(32)——\t—\t—\t—\t—\t(108)(108)\nBuy-outs\tof\tnoncontrolling\tinterests(39)——\t2\t—\t—\t2\t(17)(15)\nNet\t(loss)\tincome(96)——\t—\t—\t14,997\t14,997\t73\t15,070\t\nOther\tcomprehensive\tincome—\t——\t—\t218\t—\t218\t—\t218", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 53, "lines": { "from": 1, "to": 55 } } } }, { "pageContent": "Other\tcomprehensive\tincome—\t——\t—\t218\t—\t218\t—\t218\t\nBalance\tas\tof\tDecember\t31,\t2023\n$242\t3,185$3\t$34,892\t$(143)$27,882\t$62,634\t$733\t$63,367\t\nThe\taccompanying\tnotes\tare\tan\tintegral\tpart\tof\tthese\tconsolidated\tfinancial\tstatements.\n52", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 53, "lines": { "from": 55, "to": 59 } } } }, { "pageContent": "Tesla,\tInc.\nConsolidated\tStatements\tof\tCash\tFlows\n(in\tmillions)\nYear\tEnded\tDecember\t31,\n202320222021\nCash\tFlows\tfrom\tOperating\tActivities\nNet\tincome$14,974\t$12,587\t$5,644\t\nAdjustments\tto\treconcile\tnet\tincome\tto\tnet\tcash\tprovided\tby\toperating\tactivities:\nDepreciation,\tamortization\tand\timpairment4,667\t3,747\t2,911\t\nStock-based\tcompensation1,812\t1,560\t2,121\t\nInventory\tand\tpurchase\tcommitments\twrite-downs463\t177\t140\t\nForeign\tcurrency\ttransaction\tnet\tunrealized\t(gain)\tloss(144)81\t(55)\nDeferred\tincome\ttaxes(6,349)(196)(149)\nNon-cash\tinterest\tand\tother\toperating\tactivities81\t340\t245\t\nDigital\tassets\tloss\t(gain),\tnet—\t140\t(27)\nChanges\tin\toperating\tassets\tand\tliabilities:\nAccounts\treceivable(586)(1,124)(130)\nInventory(1,195)(6,465)(1,709)\nOperating\tlease\tvehicles(1,952)(1,570)(2,114)\nPrepaid\texpenses\tand\tother\tassets(2,652)(3,713)(1,540)\nAccounts\tpayable,\taccrued\tand\tother\tliabilities2,605\t8,029\t5,367\t\nDeferred\trevenue1,532\t1,131\t793\t\nNet\tcash\tprovided\tby\toperating\tactivities\n13,256\t14,724\t11,497\t\nCash\tFlows\tfrom\tInvesting\tActivities\nPurchases\tof\tproperty\tand\tequipment\texcluding\tfinance\tleases,\tnet\tof\tsales(8,898)(7,158)(6,482)\nPurchases\tof\tsolar\tenergy\tsystems,\tnet\tof\tsales(1)(5)(32)\nPurchases\tof\tdigital\tassets—\t—\t(1,500)\nProceeds\tfrom\tsales\tof\tdigital\tassets—\t936\t272\t\nPurchase\tof\tintangible\tassets—\t(9)—\t\nPurchases\tof\tinvestments(19,112)(5,835)(132)\nProceeds\tfrom\tmaturities\tof\tinvestments12,353\t22\t—\t\nProceeds\tfrom\tsales\tof\tinvestments138\t—\t—\t\nReceipt\tof\tgovernment\tgrants—\t76\t6\t\nBusiness\tcombinations,\tnet\tof\tcash\tacquired(64)—\t—\t\nNet\tcash\tused\tin\tinvesting\tactivities\n(15,584)(11,973)(7,868)\nCash\tFlows\tfrom\tFinancing\tActivities\nProceeds\tfrom\tissuances\tof\tdebt3,931\t—\t8,883\t\nRepayments\tof\tdebt(1,351)(3,364)(14,167)\nCollateralized\tlease\trepayments—\t—\t(9)\nProceeds\tfrom\texercises\tof\tstock\toptions\tand\tother\tstock\tissuances700\t541\t707\t\nPrincipal\tpayments\ton\tfinance\tleases(464)(502)(439)\nDebt\tissuance\tcosts(29)—\t(9)", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 54, "lines": { "from": 1, "to": 44 } } } }, { "pageContent": "Debt\tissuance\tcosts(29)—\t(9)\nProceeds\tfrom\tinvestments\tby\tnoncontrolling\tinterests\tin\tsubsidiaries—\t—\t2\t\nDistributions\tpaid\tto\tnoncontrolling\tinterests\tin\tsubsidiaries(144)(157)(161)\nPayments\tfor\tbuy-outs\tof\tnoncontrolling\tinterests\tin\tsubsidiaries(54)(45)(10)\nNet\tcash\tprovided\tby\t(used\tin)\tfinancing\tactivities\n2,589\t(3,527)(5,203)\nEffect\tof\texchange\trate\tchanges\ton\tcash\tand\tcash\tequivalents\tand\trestricted\tcash\n4\t(444)(183)\nNet\tincrease\t(decrease)\tin\tcash\tand\tcash\tequivalents\tand\trestricted\tcash\n265\t(1,220)(1,757)\nCash\tand\tcash\tequivalents\tand\trestricted\tcash,\tbeginning\tof\tperiod16,924\t18,144\t19,901\t\nCash\tand\tcash\tequivalents\tand\trestricted\tcash,\tend\tof\tperiod$17,189\t$16,924\t$18,144\t\nSupplemental\tNon-Cash\tInvesting\tand\tFinancing\tActivities\nAcquisitions\tof\tproperty\tand\tequipment\tincluded\tin\tliabilities$2,272\t$2,148\t$2,251\t\nSupplemental\tDisclosures\nCash\tpaid\tduring\tthe\tperiod\tfor\tinterest,\tnet\tof\tamounts\tcapitalized$126\t$152\t$266\t\nCash\tpaid\tduring\tthe\tperiod\tfor\tincome\ttaxes,\tnet\tof\trefunds$1,119\t$1,203\t$561", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 54, "lines": { "from": 44, "to": 60 } } } }, { "pageContent": "The\taccompanying\tnotes\tare\tan\tintegral\tpart\tof\tthese\tconsolidated\tfinancial\tstatements.\n53", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 55, "lines": { "from": 1, "to": 2 } } } }, { "pageContent": "Tesla,\tInc.\nNotes\tto\tConsolidated\tFinancial\tStatements\nNote\t1\t–\tOverview\nTesla,\tInc.\t(“Tesla”,\tthe\t“Company”,\t“we”,\t“us”\tor\t“our”)\twas\tincorporated\tin\tthe\tState\tof\tDelaware\ton\tJuly\t1,\t2003.\tWe\tdesign,\tdevelop,\nmanufacture,\tsell\tand\tlease\thigh-performance\tfully\telectric\tvehicles\tand\tenergy\tgeneration\tand\tstorage\tsystems,\tand\toffer\tservices\trelated\tto\tour\nproducts.\tOur\tChief\tExecutive\tOfficer,\tas\tthe\tchief\toperating\tdecision\tmaker\t(“CODM”),\torganizes\tour\tcompany,\tmanages\tresource\tallocations\tand\nmeasures\tperformance\tamong\ttwo\toperating\tand\treportable\tsegments:\t(i)\tautomotive\tand\t(ii)\tenergy\tgeneration\tand\tstorage.\nNote\t2\t–\tSummary\tof\tSignificant\tAccounting\tPolicies\nPrinciples\tof\tConsolidation\nThe\taccompanying\tconsolidated\tfinancial\tstatements\thave\tbeen\tprepared\tin\tconformity\twith\tGAAP\tand\treflect\tour\taccounts\tand\toperations\tand\nthose\tof\tour\tsubsidiaries\tin\twhich\twe\thave\ta\tcontrolling\tfinancial\tinterest.\tIn\taccordance\twith\tthe\tprovisions\tof\tASC\t810,\tConsolidation\t(“ASC\t810”),\twe\nconsolidate\tany\tvariable\tinterest\tentity\t(“VIE”)\tof\twhich\twe\tare\tthe\tprimary\tbeneficiary.\tWe\thave\tformed\tVIEs\twith\tfinancing\tfund\tinvestors\tin\tthe\tordinary\ncourse\tof\tbusiness\tin\torder\tto\tfacilitate\tthe\tfunding\tand\tmonetization\tof\tcertain\tattributes\tassociated\twith\tsolar\tenergy\tsystems\tand\tleases\tunder\tour\ndirect\tvehicle\tleasing\tprograms.\tThe\ttypical\tcondition\tfor\ta\tcontrolling\tfinancial\tinterest\townership\tis\tholding\ta\tmajority\tof\tthe\tvoting\tinterests\tof\tan\tentity;\nhowever,\ta\tcontrolling\tfinancial\tinterest\tmay\talso\texist\tin\tentities,\tsuch\tas\tVIEs,\tthrough\tarrangements\tthat\tdo\tnot\tinvolve\tcontrolling\tvoting\tinterests.\tASC\n810\trequires\ta\tvariable\tinterest\tholder\tto\tconsolidate\ta\tVIE\tif\tthat\tparty\thas\tthe\tpower\tto\tdirect\tthe\tactivities\tof\tthe\tVIE\tthat\tmost\tsignificantly\timpact\tthe\nVIE’s\teconomic\tperformance\tand\tthe\tobligation\tto\tabsorb\tlosses\tof\tthe\tVIE\tthat\tcould\tpotentially\tbe\tsignificant\tto\tthe\tVIE\tor\tthe\tright\tto\treceive\tbenefits", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 56, "lines": { "from": 1, "to": 17 } } } }, { "pageContent": "from\tthe\tVIE\tthat\tcould\tpotentially\tbe\tsignificant\tto\tthe\tVIE.\tWe\tdo\tnot\tconsolidate\ta\tVIE\tin\twhich\twe\thave\ta\tmajority\townership\tinterest\twhen\twe\tare\tnot\nconsidered\tthe\tprimary\tbeneficiary.\tWe\thave\tdetermined\tthat\twe\tare\tthe\tprimary\tbeneficiary\tof\tall\tthe\tVIEs\t(see\tNote\t16,\tVariable\tInterest\tEntity\nArrangements).\tWe\tevaluate\tour\trelationships\twith\tall\tthe\tVIEs\ton\tan\tongoing\tbasis\tto\tensure\tthat\twe\tcontinue\tto\tbe\tthe\tprimary\tbeneficiary.\tAll\nintercompany\ttransactions\tand\tbalances\thave\tbeen\teliminated\tupon\tconsolidation.\nUse\tof\tEstimates\nThe\tpreparation\tof\tfinancial\tstatements\tin\tconformity\twith\tGAAP\trequires\tmanagement\tto\tmake\testimates\tand\tassumptions\tthat\taffect\tthe\treported\namounts\tof\tassets,\tliabilities,\trevenues,\tcosts\tand\texpenses\tand\trelated\tdisclosures\tin\tthe\taccompanying\tnotes.\tThe\testimates\tused\tfor,\tbut\tnot\tlimited\tto,\ndetermining\tsignificant\teconomic\tincentive\tfor\tresale\tvalue\tguarantee\tarrangements,\tsales\treturn\treserves,\tincome\ttaxes,\tthe\tcollectability\tof\taccounts\nand\tfinance\treceivables,\tinventory\tvaluation,\twarranties,\tfair\tvalue\tof\tlong-lived\tassets,\tgoodwill,\tfair\tvalue\tof\tfinancial\tinstruments,\tfair\tvalue\tand\tresidual\nvalue\tof\toperating\tlease\tvehicles\tand\tsolar\tenergy\tsystems\tsubject\tto\tleases\tcould\tbe\timpacted.\tWe\thave\tassessed\tthe\timpact\tand\tare\tnot\taware\tof\tany\nspecific\tevents\tor\tcircumstances\tthat\trequired\tan\tupdate\tto\tour\testimates\tand\tassumptions\tor\tmaterially\taffected\tthe\tcarrying\tvalue\tof\tour\tassets\tor\nliabilities\tas\tof\tthe\tdate\tof\tissuance\tof\tthis\tAnnual\tReport\ton\tForm\t10-K.\tThese\testimates\tmay\tchange\tas\tnew\tevents\toccur\tand\tadditional\tinformation\tis\nobtained.\tActual\tresults\tcould\tdiffer\tmaterially\tfrom\tthese\testimates\tunder\tdifferent\tassumptions\tor\tconditions.\nReclassifications\nCertain\tprior\tperiod\tbalances\thave\tbeen\treclassified\tto\tconform\tto\tthe\tcurrent\tperiod\tpresentation\tin\tthe\tconsolidated\tfinancial\tstatements\tand\tthe\naccompanying\tnotes.\n54", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 56, "lines": { "from": 18, "to": 34 } } } }, { "pageContent": "Revenue\tRecognition\nRevenue\tby\tsource\nThe\tfollowing\ttable\tdisaggregates\tour\trevenue\tby\tmajor\tsource\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nAutomotive\tsales\n$78,509\t$67,210\t$44,125\t\nAutomotive\tregulatory\tcredits1,790\t1,776\t1,465\t\nEnergy\tgeneration\tand\tstorage\tsales5,515\t3,376\t2,279\t\nServices\tand\tother8,319\t6,091\t3,802\t\nTotal\trevenues\tfrom\tsales\tand\tservices\n94,133\t78,453\t51,671\t\nAutomotive\tleasing2,120\t2,476\t1,642\t\nEnergy\tgeneration\tand\tstorage\tleasing520\t533\t510\t\nTotal\trevenues\n$96,773\t$81,462\t$53,823\t\nAutomotive\tSegment\nAutomotive\tSales\nAutomotive\tsales\trevenue\tincludes\trevenues\trelated\tto\tcash\tand\tfinancing\tdeliveries\tof\tnew\tvehicles,\tand\tspecific\tother\tfeatures\tand\tservices\tthat\nmeet\tthe\tdefinition\tof\ta\tperformance\tobligation\tunder\tASC\t606,\tincluding\taccess\tto\tour\tFSD\tCapability\tfeatures\tand\ttheir\tongoing\tmaintenance,\tinternet\nconnectivity,\tfree\tSupercharging\tprograms\tand\tover-the-air\tsoftware\tupdates.\tWe\trecognize\trevenue\ton\tautomotive\tsales\tupon\tdelivery\tto\tthe\tcustomer,\nwhich\tis\twhen\tthe\tcontrol\tof\ta\tvehicle\ttransfers.\tPayments\tare\ttypically\treceived\tat\tthe\tpoint\tcontrol\ttransfers\tor\tin\taccordance\twith\tpayment\tterms\ncustomary\tto\tthe\tbusiness,\texcept\tsales\twe\tfinance\tfor\twhich\tpayments\tare\tcollected\tover\tthe\tcontractual\tloan\tterm.\tWe\talso\trecognize\ta\tsales\treturn\nreserve\tbased\ton\thistorical\texperience\tplus\tconsideration\tfor\texpected\tfuture\tmarket\tvalues,\twhen\twe\toffer\tresale\tvalue\tguarantees\tor\tsimilar\tbuyback\nterms.\tOther\tfeatures\tand\tservices\tsuch\tas\taccess\tto\tour\tinternet\tconnectivity,\tunlimited\tfree\tSupercharging\tand\tover-the-air\tsoftware\tupdates\tare\nprovisioned\tupon\tcontrol\ttransfer\tof\ta\tvehicle\tand\trecognized\tover\ttime\ton\ta\tstraight-line\tbasis\tas\twe\thave\ta\tstand-ready\tobligation\tto\tdeliver\tsuch\nservices\tto\tthe\tcustomer.\tOther\tlimited\tfree\tSupercharging\tincentives\tare\trecognized\tbased\ton\tactual\tusage\tor\texpiration,\twhichever\tis\tearlier.\tWe", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 57, "lines": { "from": 1, "to": 27 } } } }, { "pageContent": "recognize\trevenue\trelated\tto\tthese\tother\tfeatures\tand\tservices\tover\tthe\tperformance\tperiod,\twhich\tis\tgenerally\tthe\texpected\townership\tlife\tof\tthe\tvehicle.\nRevenue\trelated\tto\tFSD\tCapability\tfeatures\tis\trecognized\twhen\tfunctionality\tis\tdelivered\tto\tthe\tcustomer\tand\ttheir\tongoing\tmaintenance\tis\trecognized\nover\ttime.\tFor\tour\tobligations\trelated\tto\tautomotive\tsales,\twe\testimate\tstandalone\tselling\tprice\tby\tconsidering\tcosts\tused\tto\tdevelop\tand\tdeliver\tthe\nservice,\tthird-party\tpricing\tof\tsimilar\toptions\tand\tother\tinformation\tthat\tmay\tbe\tavailable.\nAny\tfees\tthat\tare\tpaid\tor\tpayable\tby\tus\tto\ta\tcustomer’s\tlender\twhen\twe\tarrange\tthe\tfinancing\tare\trecognized\tas\tan\toffset\tagainst\tautomotive\tsales\nrevenue.\tCosts\tto\tobtain\ta\tcontract\tmainly\trelate\tto\tcommissions\tpaid\tto\tour\tsales\tpersonnel\tfor\tthe\tsale\tof\tvehicles.\tAs\tour\tcontract\tcosts\trelated\tto\nautomotive\tsales\tare\ttypically\tfulfilled\twithin\tone\tyear,\tthe\tcosts\tto\tobtain\ta\tcontract\tare\texpensed\tas\tincurred.\tAmounts\tbilled\tto\tcustomers\trelated\tto\nshipping\tand\thandling\tare\tclassified\tas\tautomotive\tsales\trevenue,\tand\twe\thave\telected\tto\trecognize\tthe\tcost\tfor\tfreight\tand\tshipping\twhen\tcontrol\tover\nvehicles,\tparts\tor\taccessories\thave\ttransferred\tto\tthe\tcustomer\tas\tan\texpense\tin\tcost\tof\tautomotive\tsales\trevenue.\tOur\tpolicy\tis\tto\texclude\ttaxes\ncollected\tfrom\ta\tcustomer\tfrom\tthe\ttransaction\tprice\tof\tautomotive\tcontracts.\n55", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 57, "lines": { "from": 28, "to": 38 } } } }, { "pageContent": "We\toffer\tresale\tvalue\tguarantees\tto\tour\tcommercial\tbanking\tpartners\tin\tconnection\twith\tcertain\tvehicle\tleasing\tprograms.\tUnder\tthese\tprograms,\nwe\toriginate\tthe\tlease\twith\tour\tend\tcustomer\tand\timmediately\ttransfer\tthe\tlease\tand\tthe\tunderlying\tvehicle\tto\tour\tcommercial\tbanking\tpartner,\twith\tthe\ntransaction\tbeing\taccounted\tfor\tas\ta\tsale\tunder\tASC\t606.\tWe\treceive\tupfront\tpayment\tfor\tthe\tvehicle,\tdo\tnot\tbear\tcasualty\tand\tcredit\trisks\tduring\tthe\nlease\tterm,\tand\twe\tprovide\ta\tguarantee\tcapped\tto\ta\tlimit\tif\tthey\tare\tunable\tto\tsell\tthe\tvehicle\tat\tor\tabove\tthe\tvehicle’s\tcontract\tresidual\tvalue\tat\tthe\tend\nof\tthe\tlease\tterm.\tWe\testimate\ta\tguarantee\tliability\tin\taccordance\twith\tASC\t460,\tGuarantees\tand\trecord\tit\twithin\tother\tliabilities\ton\tour\tconsolidated\nbalance\tsheet.\tOn\ta\tquarterly\tbasis,\twe\tassess\tthe\testimated\tmarket\tvalue\tof\tvehicles\tsold\tunder\tthis\tprogram\tto\tdetermine\twhether\tthere\thave\tbeen\nchanges\tto\tthe\tamount\tof\texpected\tresale\tvalue\tguarantee\tpayments.\tAs\twe\taccumulate\tmore\tdata\trelated\tto\tthe\tresale\tvalues\tof\tour\tvehicles\tor\tas\nmarket\tconditions\tchange,\tthere\tmay\tbe\tmaterial\tchanges\tto\ttheir\testimated\tvalues.\tThe\ttotal\tguarantee\tliability\ton\tvehicles\tsold\tunder\tthis\tprogram\twas\nimmaterial\tas\tof\tDecember\t31,\t2023.\nDeferred\trevenue\trelated\tto\tthe\taccess\tto\tour\tFSD\tCapability\tfeatures\tand\ttheir\tongoing\tmaintenance,\tinternet\tconnectivity,\tfree\tSupercharging\nprograms\tand\tover-the-air\tsoftware\tupdates\tprimarily\ton\tautomotive\tsales\tconsisted\tof\tthe\tfollowing\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n20232022\nDeferred\trevenue—\tbeginning\tof\tperiod\n$2,913\t$2,382\t\nAdditions1,201\t1,178\t\nNet\tchanges\tin\tliability\tfor\tpre-existing\tcontracts17\t(67)\nRevenue\trecognized(595)(580)\nDeferred\trevenue—\tend\tof\tperiod\n$3,536\t$2,913\t\nDeferred\trevenue\tis\tequivalent\tto\tthe\ttotal\ttransaction\tprice\tallocated\tto\tthe\tperformance\tobligations\tthat\tare\tunsatisfied,\tor\tpartially\tunsatisfied,\tas", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 58, "lines": { "from": 1, "to": 21 } } } }, { "pageContent": "of\tthe\tbalance\tsheet\tdate.\tRevenue\trecognized\tfrom\tthe\tdeferred\trevenue\tbalance\tas\tof\tDecember\t31,\t2022\twas\t$469\tmillion\tfor\tthe\tyear\tended\nDecember\t31,\t2023.\tWe\thad\trecognized\trevenue\tof\t$472\tmillion\tfrom\tthe\tdeferred\trevenue\tbalance\tas\tof\tDecember\t31,\t2021,\tfor\tthe\tyear\tended\nDecember\t31,\t2022,\tprimarily\trelated\tto\tthe\tgeneral\tFSD\tCapability\tfeature\trelease\tin\tNorth\tAmerica\tin\tthe\tfourth\tquarter\tof\t2022.\tOf\tthe\ttotal\tdeferred\nrevenue\tbalance\tas\tof\tDecember\t31,\t2023,\twe\texpect\tto\trecognize\t$926\tmillion\tof\trevenue\tin\tthe\tnext\t12\tmonths.\tThe\tremaining\tbalance\twill\tbe\nrecognized\tat\tthe\ttime\tof\ttransfer\tof\tcontrol\tof\tthe\tproduct\tor\tover\tthe\tperformance\tperiod\tas\tdiscussed\tabove\tin\tAutomotive\tSales.\nWe\thave\tbeen\tproviding\tloans\tfor\tfinancing\tour\tautomotive\tdeliveries\tin\tvolume\tsince\tfiscal\tyear\t2022.\tAs\tof\tDecember\t31,\t2023\tand\t2022,\twe\thave\nrecorded\tnet\tfinancing\treceivables\ton\tthe\tconsolidated\tbalance\tsheets,\tof\twhich\t$242\tmillion\tand\t$128\tmillion,\trespectively,\tis\trecorded\twithin\tAccounts\nreceivable,\tnet,\tfor\tthe\tcurrent\tportion\tand\t$1.04\tbillion\tand\t$665\tmillion,\trespectively,\tis\trecorded\twithin\tOther\tnon-current\tassets\tfor\tthe\tlong-term\nportion.\nAutomotive\tRegulatory\tCredits\nWe\tearn\ttradable\tcredits\tin\tthe\toperation\tof\tour\tautomotive\tbusiness\tunder\tvarious\tregulations\trelated\tto\tZEVs,\tgreenhouse\tgas,\tfuel\teconomy\tand\nclean\tfuel.\tWe\tsell\tthese\tcredits\tto\tother\tregulated\tentities\twho\tcan\tuse\tthe\tcredits\tto\tcomply\twith\temission\tstandards\tand\tother\tregulatory\trequirements.\nPayments\tfor\tautomotive\tregulatory\tcredits\tare\ttypically\treceived\tat\tthe\tpoint\tcontrol\ttransfers\tto\tthe\tcustomer,\tor\tin\taccordance\twith\tpayment\nterms\tcustomary\tto\tthe\tbusiness.\tWe\trecognize\trevenue\ton\tthe\tsale\tof\tautomotive\tregulatory\tcredits,\twhich\thave\tnegligible\tincremental\tcosts\tassociated\nwith\tthem,\tat\tthe\ttime\tcontrol\tof\tthe\tregulatory\tcredits\tis\ttransferred\tto\tthe\tpurchasing\tparty.\tDeferred\trevenue\trelated\tto\tsales\tof\tautomotive\tregulatory", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 58, "lines": { "from": 22, "to": 36 } } } }, { "pageContent": "credits\twas\timmaterial\tas\tof\tDecember\t31,\t2023\tand\t2022.\tRevenue\trecognized\tfrom\tthe\tdeferred\trevenue\tbalance\tas\tof\tDecember\t31,\t2022\tand\t2021\nwas\timmaterial\tfor\tthe\tyears\tended\tDecember\t31,\t2023\tand\t2022.\tDuring\tthe\tyear\tended\tDecember\t31,\t2022,\twe\thad\talso\trecognized\t$288\tmillion\tin\nrevenue\tdue\tto\tchanges\tin\tregulation\twhich\tentitled\tus\tto\tadditional\tconsideration\tfor\tcredits\tsold\tpreviously.\n56", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 58, "lines": { "from": 37, "to": 40 } } } }, { "pageContent": "Automotive\tLeasing\tRevenue\nDirect\tVehicle\tOperating\tLeasing\tProgram\nWe\thave\toutstanding\tleases\tunder\tour\tdirect\tvehicle\toperating\tleasing\tprograms\tin\tthe\tU.S.,\tCanada\tand\tin\tcertain\tcountries\tin\tEurope.\tQualifying\ncustomers\tare\tpermitted\tto\tlease\ta\tvehicle\tdirectly\tfrom\tTesla\tfor\tup\tto\t48\tmonths.\tAt\tthe\tend\tof\tthe\tlease\tterm,\tcustomers\tare\tgenerally\trequired\tto\nreturn\tthe\tvehicles\tto\tus.\tWe\taccount\tfor\tthese\tleasing\ttransactions\tas\toperating\tleases.\tWe\trecord\tleasing\trevenues\tto\tautomotive\tleasing\trevenue\ton\ta\nstraight-line\tbasis\tover\tthe\tcontractual\tterm,\tand\twe\trecord\tthe\tdepreciation\tof\tthese\tvehicles\tto\tcost\tof\tautomotive\tleasing\trevenue.\tFor\tthe\tyears\tended\nDecember\t31,\t2023,\t2022\tand\t2021,\twe\trecognized\t$1.86\tbillion,\t$1.75\tbillion\tand\t$1.25\tbillion\tof\tdirect\tvehicle\tleasing\trevenue,\trespectively.\tAs\tof\nDecember\t31,\t2023\tand\t2022,\twe\thad\tdeferred\t$458\tmillion\tand\t$407\tmillion,\trespectively,\tof\tlease-related\tupfront\tpayments,\twhich\twill\tbe\trecognized\non\ta\tstraight-line\tbasis\tover\tthe\tcontractual\tterms\tof\tthe\tindividual\tleases.\nOur\tpolicy\tis\tto\texclude\ttaxes\tcollected\tfrom\ta\tcustomer\tfrom\tthe\ttransaction\tprice\tof\tautomotive\tcontracts.\nDirect\tSales-Type\tLeasing\tProgram\nWe\thave\toutstanding\tdirect\tleases\tand\tvehicles\tfinanced\tby\tus\tunder\tloan\tarrangements\taccounted\tfor\tas\tsales-type\tleases\tunder\tASC\t842,\tLeases\n(“ASC\t842”),\tin\tcertain\tcountries\tin\tAsia\tand\tEurope.\tDepending\ton\tthe\tspecific\tprogram,\tcustomers\tmay\tor\tmay\tnot\thave\ta\tright\tto\treturn\tthe\tvehicle\tto\nus\tduring\tor\tat\tthe\tend\tof\tthe\tlease\tterm.\tIf\tthe\tcustomer\tdoes\tnot\thave\ta\tright\tto\treturn,\tthe\tcustomer\twill\ttake\ttitle\tto\tthe\tvehicle\tat\tthe\tend\tof\tthe\tlease\nterm\tafter\tmaking\tall\tcontractual\tpayments.\tUnder\tthe\tprograms\tfor\twhich\tthere\tis\ta\tright\tto\treturn,\tthe\tpurchase\toption\tis\treasonably\tcertain\tto\tbe\nexercised\tby\tthe\tlessee\tand\twe\ttherefore\texpect\tthe\tcustomer\tto\ttake\ttitle\tto\tthe\tvehicle\tat\tthe\tend\tof\tthe\tlease\tterm\tafter\tmaking\tall\tcontractual", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 59, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "payments.\tOur\tarrangements\tunder\tthese\tprograms\tcan\thave\tterms\tfor\tup\tto\t72\tmonths.\tWe\trecognize\tall\trevenue\tand\tcosts\tassociated\twith\tthe\tsales-\ntype\tlease\tas\tautomotive\tleasing\trevenue\tand\tautomotive\tleasing\tcost\tof\trevenue,\trespectively,\tupon\tdelivery\tof\tthe\tvehicle\tto\tthe\tcustomer.\tInterest\nincome\tbased\ton\tthe\timplicit\trate\tin\tthe\tlease\tis\trecorded\tto\tautomotive\tleasing\trevenue\tover\ttime\tas\tcustomers\tare\tinvoiced\ton\ta\tmonthly\tbasis.\tFor\tthe\nyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021,\twe\trecognized\t$215\tmillion,\t$683\tmillion\tand\t$369\tmillion,\trespectively,\tof\tsales-type\tleasing\trevenue\nand\t$164\tmillion,\t$427\tmillion\tand\t$234\tmillion,\trespectively,\tof\tsales-type\tleasing\tcost\tof\trevenue.\nServices\tand\tOther\tRevenue\nServices\tand\tother\trevenue\tconsists\tof\tsales\tof\tused\tvehicles,\tnon-warranty\tafter-sales\tvehicle\tservices,\tbody\tshop\tand\tparts,\tpaid\tSupercharging,\nvehicle\tinsurance\trevenue\tand\tretail\tmerchandise.\nRevenues\trelated\tto\trepair,\tmaintenance\tand\tvehicle\tinsurance\tservices\tare\trecognized\tover\ttime\tas\tservices\tare\tprovided\tand\textended\tservice\nplans\tare\trecognized\tover\tthe\tperformance\tperiod\tof\tthe\tservice\tcontract\tas\tthe\tobligation\trepresents\ta\tstand-ready\tobligation\tto\tthe\tcustomer.\tWe\tsell\nused\tvehicles,\tservices,\tservice\tplans,\tvehicle\tcomponents\tand\tmerchandise\tseparately\tand\tthus\tuse\tstandalone\tselling\tprices\tas\tthe\tbasis\tfor\trevenue\nallocation\tto\tthe\textent\tthat\tthese\titems\tare\tsold\tin\ttransactions\twith\tother\tperformance\tobligations.\tPayment\tfor\tused\tvehicles,\tservices,\tvehicle\ncomponents,\tand\tmerchandise\tare\ttypically\treceived\tat\tthe\tpoint\twhen\tcontrol\ttransfers\tto\tthe\tcustomer\tor\tin\taccordance\twith\tpayment\tterms\tcustomary\nto\tthe\tbusiness.\tPayments\treceived\tfor\tprepaid\tplans\tare\trefundable\tupon\tcustomer\tcancellation\tof\tthe\trelated\tcontracts\tand\tare\tincluded\twithin\nCustomer\tdeposits\ton\tthe\tconsolidated\tbalance\tsheets.\tWe\trecord\tin\tDeferred\trevenue\tany\tnon-refundable\tprepayment\tamounts\tthat\tare\tcollected\tfrom", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 59, "lines": { "from": 17, "to": 31 } } } }, { "pageContent": "customers\tand\tunearned\tinsurance\tpremiums,\twhich\tis\trecognized\tas\trevenue\tratably\tover\tthe\trespective\tcustomer\tcontract\tterm.\tDeferred\trevenue\nexcluding\tunearned\tinsurance\tpremiums\twas\timmaterial\tas\tof\tDecember\t31,\t2023\tand\t2022.\n57", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 59, "lines": { "from": 32, "to": 34 } } } }, { "pageContent": "Energy\tGeneration\tand\tStorage\tSegment\nEnergy\tGeneration\tand\tStorage\tSales\nEnergy\tgeneration\tand\tstorage\tsales\trevenue\tconsists\tof\tthe\tsale\tof\tsolar\tenergy\tsystems\tand\tenergy\tstorage\tsystems\tto\tresidential,\tsmall\ncommercial,\tlarge\tcommercial\tand\tutility\tgrade\tcustomers.\tSales\tof\tsolar\tenergy\tsystems\tto\tresidential\tand\tsmall\tscale\tcommercial\tcustomers\tconsist\tof\nthe\tengineering,\tdesign\tand\tinstallation\tof\tthe\tsystem.\tResidential\tand\tsmall\tscale\tcommercial\tcustomers\tpay\tthe\tfull\tpurchase\tprice\tof\tthe\tsolar\tenergy\nsystem\tupfront.\tRevenue\tfor\tthe\tdesign\tand\tinstallation\tobligation\tis\trecognized\twhen\tcontrol\ttransfers,\twhich\tis\twhen\twe\tinstall\ta\tsolar\tenergy\tsystem\nand\tthe\tsystem\tpasses\tinspection\tby\tthe\tutility\tor\tthe\tauthority\thaving\tjurisdiction.\tSales\tof\tenergy\tstorage\tsystems\tto\tresidential\tand\tsmall\tscale\ncommercial\tcustomers\tconsist\tof\tthe\tinstallation\tof\tthe\tenergy\tstorage\tsystem\tand\trevenue\tis\trecognized\twhen\tcontrol\ttransfers,\twhich\tis\twhen\tthe\nproduct\thas\tbeen\tdelivered\tor,\tif\twe\tare\tperforming\tinstallation,\twhen\tinstalled\tand\tcommissioned.\tPayment\tfor\tsuch\tstorage\tsystems\tis\tmade\tupon\ninvoice\tor\tin\taccordance\twith\tpayment\tterms\tcustomary\tto\tthe\tbusiness.\nFor\tlarge\tcommercial\tand\tutility\tgrade\tenergy\tstorage\tsystem\tsales\twhich\tconsist\tof\tthe\tengineering,\tdesign\tand\tinstallation\tof\tthe\tsystem,\ncustomers\tmake\tmilestone\tpayments\tthat\tare\tconsistent\twith\tcontract-specific\tphases\tof\ta\tproject.\tRevenue\tfrom\tsuch\tcontracts\tis\trecognized\tover\ttime\nusing\tthe\tpercentage\tof\tcompletion\tmethod\tbased\ton\tcost\tincurred\tas\ta\tpercentage\tof\ttotal\testimated\tcontract\tcosts\tfor\tenergy\tstorage\tsystem\tsales.\nIn\tinstances\twhere\tthere\tare\tmultiple\tperformance\tobligations\tin\ta\tsingle\tcontract,\twe\tallocate\tthe\tconsideration\tto\tthe\tvarious\tobligations\tin\tthe\ncontract\tbased\ton\tthe\trelative\tstandalone\tselling\tprice\tmethod.\tStandalone\tselling\tprices\tare\testimated\tbased\ton\testimated\tcosts\tplus\tmargin\tor\tby\tusing", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 60, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "market\tdata\tfor\tcomparable\tproducts.\tCosts\tto\tobtain\ta\tcontract\trelate\tmainly\tto\tcommissions\tpaid\tto\tour\tsales\tpersonnel\trelated\tto\tthe\tsale\tof\tenergy\nstorage\tsystems.\tAs\tour\tcontract\tcosts\trelated\tto\tenergy\tstorage\tsystem\tsales\tare\ttypically\tfulfilled\twithin\tone\tyear,\tthe\tcosts\tto\tobtain\ta\tcontract\tare\nexpensed\tas\tincurred.\nAs\tpart\tof\tour\tenergy\tstorage\tsystem\tcontracts,\twe\tmay\tprovide\tthe\tcustomer\twith\tperformance\tguarantees\tthat\twarrant\tthat\tthe\tunderlying\tsystem\nwill\tmeet\tor\texceed\tthe\tminimum\tenergy\tperformance\trequirements\tspecified\tin\tthe\tcontract.\tIf\tan\tenergy\tstorage\tsystem\tdoes\tnot\tmeet\tthe\nperformance\tguarantee\trequirements,\twe\tmay\tbe\trequired\tto\tpay\tliquidated\tdamages.\tOther\tforms\tof\tvariable\tconsideration\trelated\tto\tour\tlarge\ncommercial\tand\tutility\tgrade\tenergy\tstorage\tsystem\tcontracts\tinclude\tvariable\tcustomer\tpayments\tthat\twill\tbe\tmade\tbased\ton\tour\tenergy\tmarket\nparticipation\tactivities.\tSuch\tguarantees\tand\tvariable\tcustomer\tpayments\trepresent\ta\tform\tof\tvariable\tconsideration\tand\tare\testimated\tat\tcontract\ninception\tat\ttheir\tmost\tlikely\tamount\tand\tupdated\tat\tthe\tend\tof\teach\treporting\tperiod\tas\tadditional\tperformance\tdata\tbecomes\tavailable.\tSuch\testimates\nare\tincluded\tin\tthe\ttransaction\tprice\tonly\tto\tthe\textent\tthat\tit\tis\tprobable\ta\tsignificant\treversal\tof\trevenue\twill\tnot\toccur.\nWe\trecord\tas\tdeferred\trevenue\tany\tnon-refundable\tamounts\tthat\tare\tcollected\tfrom\tcustomers\trelated\tto\tfees\tcharged\tfor\tprepayments,\twhich\tis\nrecognized\tas\trevenue\tratably\tover\tthe\trespective\tcustomer\tcontract\tterm.\tAs\tof\tDecember\t31,\t2023\tand\t2022,\tdeferred\trevenue\trelated\tto\tsuch\ncustomer\tpayments\tamounted\tto\t$1.60\tbillion\tand\t$863\tmillion,\trespectively,\tmainly\tdue\tto\tcontractual\tpayment\tterms.\tRevenue\trecognized\tfrom\tthe\ndeferred\trevenue\tbalance\tas\tof\tDecember\t31,\t2022\tand\t2021\twas\t$571\tmillion\tand\t$171\tmillion\tfor\tthe\tyears\tended\tDecember\t31,\t2023\tand\t2022,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 60, "lines": { "from": 16, "to": 29 } } } }, { "pageContent": "respectively.\tWe\thave\telected\tthe\tpractical\texpedient\tto\tomit\tdisclosure\tof\tthe\tamount\tof\tthe\ttransaction\tprice\tallocated\tto\tremaining\tperformance\nobligations\tfor\tenergy\tgeneration\tand\tstorage\tsales\twith\tan\toriginal\texpected\tcontract\tlength\tof\tone\tyear\tor\tless\tand\tthe\tamount\tthat\twe\thave\tthe\tright\tto\ninvoice\twhen\tthat\tamount\tcorresponds\tdirectly\twith\tthe\tvalue\tof\tthe\tperformance\tto\tdate.\tAs\tof\tDecember\t31,\t2023,\ttotal\ttransaction\tprice\tallocated\tto\nperformance\tobligations\tthat\twere\tunsatisfied\tor\tpartially\tunsatisfied\tfor\tcontracts\twith\tan\toriginal\texpected\tlength\tof\tmore\tthan\tone\tyear\twas\t$3.43\nbillion.\tOf\tthis\tamount,\twe\texpect\tto\trecognize\t$1.05\tbillion\tin\tthe\tnext\t12\tmonths\tand\tthe\trest\tover\tthe\tremaining\tperformance\tobligation\tperiod.\nWe\thave\tbeen\tproviding\tloans\tfor\tfinancing\tour\tenergy\tgeneration\tproducts\tin\tvolume\tsince\tfiscal\tyear\t2022.\tAs\tof\tDecember\t31,\t2023\tand\t2022,\nwe\thave\trecorded\tnet\tfinancing\treceivables\ton\tthe\tconsolidated\tbalance\tsheets,\tof\twhich\t$31\tmillion\tand\t$24\tmillion,\trespectively,\tis\trecorded\twithin\nAccounts\treceivable,\tnet,\tfor\tthe\tcurrent\tportion\tand\t$578\tmillion\tand\t$387\tmillion,\trespectively,\tis\trecorded\twithin\tOther\tnon-current\tassets\tfor\tthe\tlong-\nterm\tportion.\n58", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 60, "lines": { "from": 30, "to": 39 } } } }, { "pageContent": "Energy\tGeneration\tand\tStorage\tLeasing\nFor\trevenue\tarrangements\twhere\twe\tare\tthe\tlessor\tunder\toperating\tlease\tagreements\tfor\tenergy\tgeneration\tand\tstorage\tproducts,\twe\trecord\tlease\nrevenue\tfrom\tminimum\tlease\tpayments,\tincluding\tupfront\trebates\tand\tincentives\tearned\tfrom\tsuch\tsystems,\ton\ta\tstraight-line\tbasis\tover\tthe\tlife\tof\tthe\nlease\tterm,\tassuming\tall\tother\trevenue\trecognition\tcriteria\thave\tbeen\tmet.\tThe\tdifference\tbetween\tthe\tpayments\treceived\tand\tthe\trevenue\trecognized\tis\nrecorded\tas\tdeferred\trevenue\tor\tdeferred\tasset\ton\tthe\tconsolidated\tbalance\tsheet.\nFor\tsolar\tenergy\tsystems\twhere\tcustomers\tpurchase\telectricity\tfrom\tus\tunder\tPPAs\tprior\tto\tJanuary\t1,\t2019,\twe\thave\tdetermined\tthat\tthese\nagreements\tshould\tbe\taccounted\tfor\tas\toperating\tleases\tpursuant\tto\tASC\t840,\tLeases.\tRevenue\tis\trecognized\tbased\ton\tthe\tamount\tof\telectricity\ndelivered\tat\trates\tspecified\tunder\tthe\tcontracts,\tassuming\tall\tother\trevenue\trecognition\tcriteria\tare\tmet.\nWe\trecord\tas\tdeferred\trevenue\tany\tamounts\tthat\tare\tcollected\tfrom\tcustomers,\tincluding\tlease\tprepayments,\tin\texcess\tof\trevenue\trecognized,\nwhich\tis\trecognized\tas\trevenue\tratably\tover\tthe\trespective\tcustomer\tcontract\tterm.\tAs\tof\tDecember\t31,\t2023\tand\t2022,\tdeferred\trevenue\trelated\tto\tsuch\ncustomer\tpayments\tamounted\tto\t$181\tmillion\tand\t$191\tmillion,\trespectively.\tDeferred\trevenue\talso\tincludes\tthe\tportion\tof\trebates\tand\tincentives\nreceived\tfrom\tutility\tcompanies\tand\tvarious\tlocal\tand\tstate\tgovernment\tagencies,\twhich\tis\trecognized\tas\trevenue\tover\tthe\tlease\tterm.\tAs\tof\nDecember\t31,\t2023\tand\t2022,\tdeferred\trevenue\tfrom\trebates\tand\tincentives\twas\timmaterial.\nWe\tcapitalize\tinitial\tdirect\tcosts\tfrom\tthe\texecution\tof\tagreements\tfor\tsolar\tenergy\tsystems\tand\tPPAs,\twhich\tinclude\tthe\treferral\tfees\tand\tsales\ncommissions,\tas\tan\telement\tof\tsolar\tenergy\tsystems,\tnet,\tand\tsubsequently\tamortize\tthese\tcosts\tover\tthe\tterm\tof\tthe\trelated\tagreements.\nCost\tof\tRevenues\nAutomotive\tSegment\nAutomotive\tSales", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 61, "lines": { "from": 1, "to": 18 } } } }, { "pageContent": "Automotive\tSegment\nAutomotive\tSales\nCost\tof\tautomotive\tsales\trevenue\tincludes\tdirect\tand\tindirect\tmaterials,\tlabor\tcosts,\tmanufacturing\toverhead,\tincluding\tdepreciation\tcosts\tof\ttooling\nand\tmachinery,\tshipping\tand\tlogistic\tcosts,\tvehicle\tconnectivity\tcosts,\tFSD\tCapability\tongoing\tmaintenance\tcosts,\tallocations\tof\telectricity\tand\ninfrastructure\tcosts\trelated\tto\tour\tSupercharger\tnetwork\tand\treserves\tfor\testimated\twarranty\texpenses.\tCost\tof\tautomotive\tsales\trevenues\talso\tincludes\nadjustments\tto\twarranty\texpense\tand\tcharges\tto\twrite\tdown\tthe\tcarrying\tvalue\tof\tour\tinventory\twhen\tit\texceeds\tits\testimated\tnet\trealizable\tvalue\tand\tto\nprovide\tfor\tobsolete\tand\ton-hand\tinventory\tin\texcess\tof\tforecasted\tdemand.\tAdditionally,\tcost\tof\tautomotive\tsales\trevenue\tbenefits\tfrom\tmanufacturing\ncredits\tearned.\nAutomotive\tLeasing\nCost\tof\tautomotive\tleasing\trevenue\tincludes\tthe\tdepreciation\tof\toperating\tlease\tvehicles,\tcost\tof\tgoods\tsold\tassociated\twith\tdirect\tsales-type\tleases\nand\twarranty\texpense\trelated\tto\tleased\tvehicles.\nServices\tand\tOther\nCosts\tof\tservices\tand\tother\trevenue\tincludes\tcost\tof\tused\tvehicles\tincluding\trefurbishment\tcosts,\tcosts\tassociated\twith\tproviding\tnon-warranty\nafter-sales\tservices,\tcosts\tassociated\twith\tour\tbody\tshops\tand\tpart\tsales,\tcosts\tof\tpaid\tSupercharging,\tcosts\tto\tprovide\tvehicle\tinsurance\tand\tcosts\tfor\nretail\tmerchandise.\nEnergy\tGeneration\tand\tStorage\tSegment\nEnergy\tGeneration\tand\tStorage\nCost\tof\tenergy\tgeneration\tand\tstorage\trevenue\tincludes\tdirect\tand\tindirect\tmaterial\tand\tlabor\tcosts,\toverhead\tcosts,\tfreight,\twarranty\texpense,\tand\namortization\tof\tcertain\tacquired\tintangible\tassets.\tCost\tof\tenergy\tgeneration\tand\tstorage\trevenue\talso\tincludes\tcharges\tto\twrite\tdown\tthe\tcarrying\tvalue\nof\tour\tinventory\twhen\tit\texceeds\tits\testimated\tnet\trealizable\tvalue\tand\tto\tprovide\tfor\tobsolete\tand\ton-hand\tinventory\tin\texcess\tof\tforecasted\tdemand.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 61, "lines": { "from": 17, "to": 36 } } } }, { "pageContent": "Additionally,\tcost\tof\tenergy\tgeneration\tand\tstorage\trevenue\tbenefits\tfrom\tmanufacturing\tcredits\tearned.\tIn\tagreements\tfor\tsolar\tenergy\tsystems\tand\nPPAs\twhere\twe\tare\tthe\tlessor,\tthe\tcost\tof\trevenue\tis\tprimarily\tcomprised\tof\tdepreciation\tof\tthe\tcost\tof\tleased\tsolar\tenergy\tsystems,\tmaintenance\tcosts\nassociated\twith\tthose\tsystems\tand\tamortization\tof\tany\tinitial\tdirect\tcosts.\n59", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 61, "lines": { "from": 37, "to": 40 } } } }, { "pageContent": "Research\tand\tDevelopment\tCosts\nResearch\tand\tdevelopment\tcosts\tare\texpensed\tas\tincurred.\nIncome\tTaxes\nWe\tare\tsubject\tto\tincome\ttaxes\tin\tthe\tU.S.\tand\tin\tmany\tforeign\tjurisdictions.\tIncome\ttaxes\tare\tcomputed\tusing\tthe\tasset\tand\tliability\tmethod,\tunder\nwhich\tdeferred\ttax\tassets\tand\tliabilities\tare\tdetermined\tbased\ton\tthe\tdifference\tbetween\tthe\tfinancial\tstatement\tand\ttax\tbases\tof\tassets\tand\tliabilities\nusing\tenacted\ttax\trates\tin\teffect\tfor\tthe\tyear\tin\twhich\tthe\tdifferences\tare\texpected\tto\taffect\ttaxable\tincome.\tValuation\tallowances\tare\testablished\twhen\nnecessary\tto\treduce\tdeferred\ttax\tassets\tto\tthe\tamount\texpected\tto\tbe\trealized.\nWe\tmonitor\tthe\trealizability\tof\tour\tdeferred\ttax\tassets\ttaking\tinto\taccount\tall\trelevant\tfactors\tat\teach\treporting\tperiod.\tSignificant\tjudgment\tis\nrequired\tin\tdetermining\tour\tprovision\tfor\tincome\ttaxes,\tour\tdeferred\ttax\tassets\tand\tliabilities\tand\tany\tvaluation\tallowance\trecorded\tagainst\tour\tnet\ndeferred\ttax\tassets\tthat\tare\tnot\tmore\tlikely\tthan\tnot\tto\tbe\trealized.\tIn\tcompleting\tour\tassessment\tof\trealizability\tof\tour\tdeferred\ttax\tassets,\twe\tconsider\nour\thistory\tof\tincome\t(loss)\tmeasured\tat\tpre-tax\tincome\t(loss)\tadjusted\tfor\tpermanent\tbook-tax\tdifferences\ton\ta\tjurisdictional\tbasis,\tvolatility\tin\tactual\nearnings,\texcess\ttax\tbenefits\trelated\tto\tstock-based\tcompensation\tin\trecent\tprior\tyears,\tand\timpacts\tof\tthe\ttiming\tof\treversal\tof\texisting\ttemporary\ndifferences.\tWe\talso\trely\ton\tour\tassessment\tof\tthe\tCompany’s\tprojected\tfuture\tresults\tof\tbusiness\toperations,\tincluding\tuncertainty\tin\tfuture\toperating\nresults\trelative\tto\thistorical\tresults,\tvolatility\tin\tthe\tmarket\tprice\tof\tour\tcommon\tstock\tand\tits\tperformance\tover\ttime,\tvariable\tmacroeconomic\tconditions\nimpacting\tour\tability\tto\tforecast\tfuture\ttaxable\tincome,\tand\tchanges\tin\tbusiness\tthat\tmay\taffect\tthe\texistence\tand\tmagnitude\tof\tfuture\ttaxable\tincome.\nOur\tvaluation\tallowance\tassessment\tis\tbased\ton\tour\tbest\testimate\tof\tfuture\tresults\tconsidering\tall\tavailable\tinformation.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 62, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "We\trecord\tliabilities\trelated\tto\tuncertain\ttax\tpositions\twhen,\tdespite\tour\tbelief\tthat\tour\ttax\treturn\tpositions\tare\tsupportable,\twe\tbelieve\tthat\tit\tis\nmore\tlikely\tthan\tnot\tthat\tthose\tpositions\tmay\tnot\tbe\tfully\tsustained\tupon\treview\tby\ttax\tauthorities.\tAccrued\tinterest\tand\tpenalties\trelated\tto\nunrecognized\ttax\tbenefits\tare\tclassified\tas\tincome\ttax\texpense.\nThe\tTax\tCuts\tand\tJobs\tAct\tsubjects\ta\tU.S.\tshareholder\tto\ttax\ton\tglobal\tintangible\tlow-taxed\tincome\t(“GILTI”)\tearned\tby\tcertain\tforeign\tsubsidiaries.\nUnder\tGAAP,\twe\tcan\tmake\tan\taccounting\tpolicy\telection\tto\teither\ttreat\ttaxes\tdue\ton\tthe\tGILTI\tinclusion\tas\ta\tcurrent\tperiod\texpense\tor\tfactor\tsuch\namounts\tinto\tour\tmeasurement\tof\tdeferred\ttaxes.\tWe\telected\tthe\tdeferred\tmethod,\tunder\twhich\twe\trecorded\tthe\tcorresponding\tdeferred\ttax\tassets\tand\nliabilities\tin\tour\tconsolidated\tbalance\tsheets.\nComprehensive\tIncome\nComprehensive\tincome\tis\tcomprised\tof\tnet\tincome\tand\tother\tcomprehensive\tincome\t(loss).\tOther\tcomprehensive\tincome\t(loss)\tconsists\tof\tforeign\ncurrency\ttranslation\tadjustments\tand\tunrealized\tnet\tgains\tand\tlosses\ton\tinvestments\tthat\thave\tbeen\texcluded\tfrom\tthe\tdetermination\tof\tnet\tincome.\nStock-Based\tCompensation\nWe\tuse\tthe\tfair\tvalue\tmethod\tof\taccounting\tfor\tour\tstock\toptions\tand\tRSUs\tgranted\tto\temployees\tand\tfor\tour\tESPP\tto\tmeasure\tthe\tcost\tof\temployee\nservices\treceived\tin\texchange\tfor\tthe\tstock-based\tawards.\tThe\tfair\tvalue\tof\tstock\toption\tawards\twith\tonly\tservice\tand/or\tperformance\tconditions\tis\nestimated\ton\tthe\tgrant\tor\toffering\tdate\tusing\tthe\tBlack-Scholes\toption-pricing\tmodel.\tThe\tBlack-Scholes\toption-pricing\tmodel\trequires\tinputs\tsuch\tas\tthe\nrisk-free\tinterest\trate,\texpected\tterm\tand\texpected\tvolatility.\tThese\tinputs\tare\tsubjective\tand\tgenerally\trequire\tsignificant\tjudgment.\tThe\tfair\tvalue\tof\nRSUs\tis\tmeasured\ton\tthe\tgrant\tdate\tbased\ton\tthe\tclosing\tfair\tmarket\tvalue\tof\tour\tcommon\tstock.\tThe\tresulting\tcost\tis\trecognized\tover\tthe\tperiod\tduring", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 62, "lines": { "from": 17, "to": 32 } } } }, { "pageContent": "which\tan\temployee\tis\trequired\tto\tprovide\tservice\tin\texchange\tfor\tthe\tawards,\tusually\tthe\tvesting\tperiod,\twhich\tis\tgenerally\tfour\tyears\tfor\tstock\toptions\nand\tRSUs\tand\tsix\tmonths\tfor\tthe\tESPP.\tStock-based\tcompensation\texpense\tis\trecognized\ton\ta\tstraight-line\tbasis,\tnet\tof\tactual\tforfeitures\tin\tthe\tperiod.\nFor\tperformance-based\tawards,\tstock-based\tcompensation\texpense\tis\trecognized\tover\tthe\texpected\tperformance\tachievement\tperiod\tof\tindividual\nperformance\tmilestones\twhen\tthe\tachievement\tof\teach\tindividual\tperformance\tmilestone\tbecomes\tprobable.\n60", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 62, "lines": { "from": 33, "to": 37 } } } }, { "pageContent": "As\twe\taccumulate\tadditional\temployee\tstock-based\tawards\tdata\tover\ttime\tand\tas\twe\tincorporate\tmarket\tdata\trelated\tto\tour\tcommon\tstock,\twe\tmay\ncalculate\tsignificantly\tdifferent\tvolatilities\tand\texpected\tlives,\twhich\tcould\tmaterially\timpact\tthe\tvaluation\tof\tour\tstock-based\tawards\tand\tthe\tstock-based\ncompensation\texpense\tthat\twe\twill\trecognize\tin\tfuture\tperiods.\tStock-based\tcompensation\texpense\tis\trecorded\tin\tCost\tof\trevenues,\tResearch\tand\ndevelopment\texpense\tand\tSelling,\tgeneral\tand\tadministrative\texpense\tin\tthe\tconsolidated\tstatements\tof\toperations.\nNoncontrolling\tInterests\tand\tRedeemable\tNoncontrolling\tInterests\nNoncontrolling\tinterests\tand\tredeemable\tnoncontrolling\tinterests\trepresent\tthird-party\tinterests\tin\tthe\tnet\tassets\tunder\tcertain\tfunding\narrangements,\tor\tfunds,\tthat\twe\thave\tentered\tinto\tto\tfinance\tthe\tcosts\tof\tsolar\tenergy\tsystems\tand\tvehicles\tunder\toperating\tleases.\tWe\thave\tdetermined\nthat\tthe\tcontractual\tprovisions\tof\tthe\tfunds\trepresent\tsubstantive\tprofit-sharing\tarrangements.\tWe\thave\tfurther\tdetermined\tthat\tthe\tmethodology\tfor\ncalculating\tthe\tnoncontrolling\tinterest\tand\tredeemable\tnoncontrolling\tinterest\tbalances\tthat\treflects\tthe\tsubstantive\tprofit-sharing\tarrangements\tis\ta\nbalance\tsheet\tapproach\tusing\tthe\thypothetical\tliquidation\tat\tbook\tvalue\t(“HLBV”)\tmethod.\tWe,\ttherefore,\tdetermine\tthe\tamount\tof\tthe\tnoncontrolling\ninterests\tand\tredeemable\tnoncontrolling\tinterests\tin\tthe\tnet\tassets\tof\tthe\tfunds\tat\teach\tbalance\tsheet\tdate\tusing\tthe\tHLBV\tmethod,\twhich\tis\tpresented\ton\nthe\tconsolidated\tbalance\tsheet\tas\tnoncontrolling\tinterests\tin\tsubsidiaries\tand\tredeemable\tnoncontrolling\tinterests\tin\tsubsidiaries.\tUnder\tthe\tHLBV\nmethod,\tthe\tamounts\treported\tas\tnoncontrolling\tinterests\tand\tredeemable\tnoncontrolling\tinterests\tin\tthe\tconsolidated\tbalance\tsheet\trepresent\tthe\namounts\tthe\tthird\tparties\twould\thypothetically\treceive\tat\teach\tbalance\tsheet\tdate\tunder\tthe\tliquidation\tprovisions\tof\tthe\tfunds,\tassuming\tthe\tnet\tassets", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 63, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "of\tthe\tfunds\twere\tliquidated\tat\ttheir\trecorded\tamounts\tdetermined\tin\taccordance\twith\tGAAP\tand\twith\ttax\tlaws\teffective\tat\tthe\tbalance\tsheet\tdate\tand\ndistributed\tto\tthe\tthird\tparties.\tThe\tthird\tparties’\tinterests\tin\tthe\tresults\tof\toperations\tof\tthe\tfunds\tare\tdetermined\tas\tthe\tdifference\tin\tthe\tnoncontrolling\ninterest\tand\tredeemable\tnoncontrolling\tinterest\tbalances\tin\tthe\tconsolidated\tbalance\tsheets\tbetween\tthe\tstart\tand\tend\tof\teach\treporting\tperiod,\tafter\ntaking\tinto\taccount\tany\tcapital\ttransactions\tbetween\tthe\tfunds\tand\tthe\tthird\tparties.\tHowever,\tthe\tredeemable\tnoncontrolling\tinterest\tbalance\tis\tat\tleast\nequal\tto\tthe\tredemption\tamount.\tThe\tredeemable\tnoncontrolling\tinterest\tbalance\tis\tpresented\tas\ttemporary\tequity\tin\tthe\tmezzanine\tsection\tof\tthe\nconsolidated\tbalance\tsheet\tsince\tthese\tthird\tparties\thave\tthe\tright\tto\tredeem\ttheir\tinterests\tin\tthe\tfunds\tfor\tcash\tor\tother\tassets.\tFor\tcertain\tfunds,\tthere\nhave\tbeen\tsignificant\tfluctuations\tin\tnet\t(loss)\tincome\tattributable\tto\tnoncontrolling\tinterests\tand\tredeemable\tnoncontrolling\tinterests\tin\tsubsidiaries\tdue\nto\tchanges\tin\tthe\tliquidation\tprovisions\tas\ttime-based\tmilestones\thave\tbeen\treached.\nNet\tIncome\tper\tShare\tof\tCommon\tStock\tAttributable\tto\tCommon\tStockholders\nBasic\tnet\tincome\tper\tshare\tof\tcommon\tstock\tattributable\tto\tcommon\tstockholders\tis\tcalculated\tby\tdividing\tnet\tincome\tattributable\tto\tcommon\nstockholders\tby\tthe\tweighted-average\tshares\tof\tcommon\tstock\toutstanding\tfor\tthe\tperiod.\tPotentially\tdilutive\tshares,\twhich\tare\tbased\ton\tthe\tweighted-\naverage\tshares\tof\tcommon\tstock\tunderlying\toutstanding\tstock-based\tawards,\twarrants\tand\tconvertible\tsenior\tnotes\tusing\tthe\ttreasury\tstock\tmethod\tor\nthe\tif-converted\tmethod,\tas\tapplicable,\tare\tincluded\twhen\tcalculating\tdiluted\tnet\tincome\tper\tshare\tof\tcommon\tstock\tattributable\tto\tcommon\tstockholders\nwhen\ttheir\teffect\tis\tdilutive.\nFurthermore,\tin\tconnection\twith\tthe\tofferings\tof\tour\tconvertible\tsenior\tnotes,\twe\tentered\tinto\tconvertible\tnote\thedges\tand\twarrants\t(see\tNote\t11,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 63, "lines": { "from": 15, "to": 29 } } } }, { "pageContent": "Debt).\tHowever,\tour\tconvertible\tnote\thedges\tare\tnot\tincluded\twhen\tcalculating\tpotentially\tdilutive\tshares\tsince\ttheir\teffect\tis\talways\tanti-dilutive.\tThe\nstrike\tprice\ton\tthe\twarrants\twere\tbelow\tour\taverage\tshare\tprice\tduring\tthe\tperiod\tand\twere\tincluded\tin\tthe\ttables\tbelow.\tWarrants\tare\tincluded\tin\tthe\nweighted-average\tshares\tused\tin\tcomputing\tbasic\tnet\tincome\tper\tshare\tof\tcommon\tstock\tin\tthe\tperiod(s)\tthey\tare\tsettled.\nThe\tfollowing\ttable\tpresents\tthe\treconciliation\tof\tnet\tincome\tattributable\tto\tcommon\tstockholders\tto\tnet\tincome\tused\tin\tcomputing\tbasic\tand\ndiluted\tnet\tincome\tper\tshare\tof\tcommon\tstock\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nNet\tincome\tattributable\tto\tcommon\tstockholders$14,997\t$12,556\t$5,519\t\nLess:\tBuy-out\tof\tnoncontrolling\tinterest(2)(27)(5)\nNet\tincome\tused\tin\tcomputing\tbasic\tnet\tincome\tper\tshare\tof\tcommon\tstock14,999\t12,583\t5,524\t\nLess:\tDilutive\tconvertible\tdebt—\t(1)(9)\nNet\tincome\tused\tin\tcomputing\tdiluted\tnet\tincome\tper\tshare\tof\tcommon\tstock\n$14,999\t$12,584\t$5,533\t\n61", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 63, "lines": { "from": 30, "to": 43 } } } }, { "pageContent": "The\tfollowing\ttable\tpresents\tthe\treconciliation\tof\tbasic\tto\tdiluted\tweighted\taverage\tshares\tused\tin\tcomputing\tnet\tincome\tper\tshare\tof\tcommon\nstock\tattributable\tto\tcommon\tstockholders\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nWeighted\taverage\tshares\tused\tin\tcomputing\tnet\tincome\tper\tshare\tof\tcommon\tstock,\nbasic3,1743,1302,959\nAdd:\nStock-based\tawards298310292\nConvertible\tsenior\tnotes2329\nWarrants1132106\nWeighted\taverage\tshares\tused\tin\tcomputing\tnet\tincome\tper\tshare\tof\tcommon\tstock,\ndiluted\n3,4853,4753,386\nThe\tfollowing\ttable\tpresents\tthe\tpotentially\tdilutive\tshares\tthat\twere\texcluded\tfrom\tthe\tcomputation\tof\tdiluted\tnet\tincome\tper\tshare\tof\tcommon\nstock\tattributable\tto\tcommon\tstockholders,\tbecause\ttheir\teffect\twas\tanti-dilutive\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nStock-based\tawards\n1241\nBusiness\tCombinations\nWe\taccount\tfor\tbusiness\tacquisitions\tunder\tASC\t805,\tBusiness\tCombinations.\tThe\ttotal\tpurchase\tconsideration\tfor\tan\tacquisition\tis\tmeasured\tas\tthe\nfair\tvalue\tof\tthe\tassets\tgiven,\tequity\tinstruments\tissued\tand\tliabilities\tassumed\tat\tthe\tacquisition\tdate.\tCosts\tthat\tare\tdirectly\tattributable\tto\tthe\nacquisition\tare\texpensed\tas\tincurred.\tIdentifiable\tassets\t(including\tintangible\tassets),\tliabilities\tassumed\t(including\tcontingent\tliabilities)\tand\nnoncontrolling\tinterests\tin\tan\tacquisition\tare\tmeasured\tinitially\tat\ttheir\tfair\tvalues\tat\tthe\tacquisition\tdate.\tWe\trecognize\tgoodwill\tif\tthe\tfair\tvalue\tof\tthe\ntotal\tpurchase\tconsideration\tand\tany\tnoncontrolling\tinterests\tis\tin\texcess\tof\tthe\tnet\tfair\tvalue\tof\tthe\tidentifiable\tassets\tacquired\tand\tthe\tliabilities\nassumed.\tWe\trecognize\ta\tbargain\tpurchase\tgain\twithin\tOther\tincome\t(expense),\tnet,\tin\tthe\tconsolidated\tstatement\tof\toperations\tif\tthe\tnet\tfair\tvalue\tof\nthe\tidentifiable\tassets\tacquired\tand\tthe\tliabilities\tassumed\tis\tin\texcess\tof\tthe\tfair\tvalue\tof\tthe\ttotal\tpurchase\tconsideration\tand\tany\tnoncontrolling", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 64, "lines": { "from": 1, "to": 27 } } } }, { "pageContent": "interests.\tWe\tinclude\tthe\tresults\tof\toperations\tof\tthe\tacquired\tbusiness\tin\tthe\tconsolidated\tfinancial\tstatements\tbeginning\ton\tthe\tacquisition\tdate.\nCash\tand\tCash\tEquivalents\nAll\thighly\tliquid\tinvestments\twith\tan\toriginal\tmaturity\tof\tthree\tmonths\tor\tless\tat\tthe\tdate\tof\tpurchase\tare\tconsidered\tcash\tequivalents.\tOur\tcash\nequivalents\tare\tprimarily\tcomprised\tof\tU.S.\tgovernment\tsecurities,\tmoney\tmarket\tfunds\tand\tcommercial\tpaper.\nRestricted\tCash\nWe\tmaintain\tcertain\tcash\tbalances\trestricted\tas\tto\twithdrawal\tor\tuse.\tOur\trestricted\tcash\tis\tcomprised\tprimarily\tof\tcash\theld\tto\tservice\tcertain\npayments\tunder\tvarious\tsecured\tdebt\tfacilities.\tIn\taddition,\trestricted\tcash\tincludes\tcash\theld\tas\tcollateral\tfor\tsales\tto\tlease\tpartners\twith\ta\tresale\tvalue\nguarantee,\tletters\tof\tcredit,\treal\testate\tleases\tand\tdeposits\theld\tfor\tour\tinsurance\tservices.\tWe\trecord\trestricted\tcash\tas\tother\tassets\tin\tthe\tconsolidated\nbalance\tsheets\tand\tdetermine\tcurrent\tor\tnon-current\tclassification\tbased\ton\tthe\texpected\tduration\tof\tthe\trestriction.\n62", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 64, "lines": { "from": 28, "to": 37 } } } }, { "pageContent": "Our\ttotal\tcash\tand\tcash\tequivalents\tand\trestricted\tcash,\tas\tpresented\tin\tthe\tconsolidated\tstatements\tof\tcash\tflows,\twas\tas\tfollows\t(in\tmillions):\nDecember\t31,\n2023\nDecember\t31,\n2022\nDecember\t31,\n2021\nCash\tand\tcash\tequivalents\n$16,398\t$16,253\t$17,576\t\nRestricted\tcash\tincluded\tin\tprepaid\texpenses\tand\tother\tcurrent\tassets543\t294\t345\t\nRestricted\tcash\tincluded\tin\tother\tnon-current\tassets248\t377\t223\t\nTotal\tas\tpresented\tin\tthe\tconsolidated\tstatements\tof\tcash\tflows\n$17,189\t$16,924\t$18,144\t\nInvestments\nInvestments\tmay\tbe\tcomprised\tof\ta\tcombination\tof\tmarketable\tsecurities,\tincluding\tU.S.\tgovernment\tsecurities,\tcorporate\tdebt\tsecurities,\ncommercial\tpaper,\ttime\tdeposits,\tand\tcertain\tcertificates\tof\tdeposit,\twhich\tare\tall\tdesignated\tas\tavailable-for-sale\tand\treported\tat\testimated\tfair\tvalue,\nwith\tunrealized\tgains\tand\tlosses\trecorded\tin\taccumulated\tother\tcomprehensive\tincome\twhich\tis\tincluded\twithin\tstockholders’\tequity.\tAvailable-for-sale\nmarketable\tsecurities\twith\tmaturities\tgreater\tthan\tthree\tmonths\tat\tthe\tdate\tof\tpurchase\tare\tincluded\tin\tshort-term\tinvestments\tin\tour\tconsolidated\nbalance\tsheets.\tInterest,\tdividends,\tamortization\tand\taccretion\tof\tpurchase\tpremiums\tand\tdiscounts\ton\tthese\tinvestments\tare\tincluded\twithin\tInterest\nincome\tin\tour\tconsolidated\tstatements\tof\toperations.\nThe\tcost\tof\tavailable-for-sale\tinvestments\tsold\tis\tbased\ton\tthe\tspecific\tidentification\tmethod.\tRealized\tgains\tand\tlosses\ton\tthe\tsale\tof\tavailable-for-\nsale\tinvestments\tare\trecorded\tin\tOther\tincome\t(expense),\tnet.\nWe\tregularly\treview\tall\tof\tour\tinvestments\tfor\tdeclines\tin\tfair\tvalue.\tThe\treview\tincludes\tbut\tis\tnot\tlimited\tto\t(i)\tthe\tconsideration\tof\tthe\tcause\tof\tthe\ndecline,\t(ii)\tany\tcurrently\trecorded\texpected\tcredit\tlosses\tand\t(iii)\tthe\tcreditworthiness\tof\tthe\trespective\tsecurity\tissuers.\tThe\tamortized\tcost\tbasis\tof\tour\ninvestments\tapproximates\tits\tfair\tvalue.\nAccounts\tReceivable\tand\tAllowance\tfor\tDoubtful\tAccounts", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 65, "lines": { "from": 1, "to": 26 } } } }, { "pageContent": "Accounts\treceivable\tprimarily\tinclude\tamounts\trelated\tto\treceivables\tfrom\tfinancial\tinstitutions\tand\tleasing\tcompanies\toffering\tvarious\tfinancing\nproducts\tto\tour\tcustomers,\tsales\tof\tenergy\tgeneration\tand\tstorage\tproducts,\tsales\tof\tregulatory\tcredits\tto\tother\tautomotive\tmanufacturers\tand\ngovernment\trebates\talready\tpassed\tthrough\tto\tcustomers.\tWe\tprovide\tan\tallowance\tagainst\taccounts\treceivable\tfor\tthe\tamount\twe\texpect\tto\tbe\nuncollectible.\tWe\twrite-off\taccounts\treceivable\tagainst\tthe\tallowance\twhen\tthey\tare\tdeemed\tuncollectible.\nDepending\ton\tthe\tday\tof\tthe\tweek\ton\twhich\tthe\tend\tof\ta\tfiscal\tquarter\tfalls,\tour\taccounts\treceivable\tbalance\tmay\tfluctuate\tas\twe\tare\twaiting\tfor\ncertain\tcustomer\tpayments\tto\tclear\tthrough\tour\tbanking\tinstitutions\tand\treceipts\tof\tpayments\tfrom\tour\tfinancing\tpartners,\twhich\tcan\ttake\tup\tto\napproximately\ttwo\tweeks\tbased\ton\tthe\tcontractual\tpayment\tterms\twith\tsuch\tpartners.\tOur\taccounts\treceivable\tbalances\tassociated\twith\tour\tsales\tof\nregulatory\tcredits\tare\tdependent\ton\tcontractual\tpayment\tterms.\tAdditionally,\tgovernment\trebates\tcan\ttake\tup\tto\ta\tyear\tor\tmore\tto\tbe\tcollected\ndepending\ton\tthe\tcustomary\tprocessing\ttimelines\tof\tthe\tspecific\tjurisdictions\tissuing\tthem.\tThese\tvarious\tfactors\tmay\thave\ta\tsignificant\timpact\ton\tour\naccounts\treceivable\tbalance\tfrom\tperiod\tto\tperiod.\tAs\tof\tDecember\t31,\t2023\tand\t2022,\twe\thad\t$207\tmillion\tand\t$753\tmillion,\trespectively,\tof\tlong-term\ngovernment\trebates\treceivable\tin\tOther\tnon-current\tassets\tin\tour\tconsolidated\tbalance\tsheets.\nFinancing\tReceivables\nWe\tprovide\tfinancing\toptions\tto\tour\tcustomers\tfor\tour\tautomotive\tand\tenergy\tproducts.\tFinancing\treceivables\tare\tcarried\tat\tamortized\tcost,\tnet\tof\nallowance\tfor\tloan\tlosses.\tProvisions\tfor\tloan\tlosses\tare\tcharged\tto\toperations\tin\tamounts\tsufficient\tto\tmaintain\tthe\tallowance\tfor\tloan\tlosses\tat\tlevels\nconsidered\tadequate\tto\tcover\texpected\tcredit\tlosses\ton\tthe\tfinancing\treceivables.\tIn\tdetermining\texpected\tcredit\tlosses,\twe\tconsider\tour\thistorical\tlevel", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 65, "lines": { "from": 27, "to": 41 } } } }, { "pageContent": "of\tcredit\tlosses,\tcurrent\teconomic\ttrends,\tand\treasonable\tand\tsupportable\tforecasts\tthat\taffect\tthe\tcollectability\tof\tthe\tfuture\tcash\tflows.\nWhen\toriginating\tconsumer\treceivables,\twe\treview\tthe\tcredit\tapplication,\tthe\tproposed\tcontract\tterms,\tcredit\tbureau\tinformation\t(e.g.,\tFICO\tscore)\nand\tother\tinformation.\tOur\tevaluation\temphasizes\tthe\tapplicant’s\tability\tto\tpay\tand\tcreditworthiness\tfocusing\ton\tpayment,\taffordability,\tand\tapplicant\ncredit\thistory\tas\tkey\tconsiderations.\tGenerally,\tall\tcustomers\tin\tthis\tportfolio\thave\tstrong\tcreditworthiness\tat\tloan\torigination.\n63", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 65, "lines": { "from": 42, "to": 46 } } } }, { "pageContent": "After\torigination,\twe\treview\tthe\tcredit\tquality\tof\tretail\tfinancing\tbased\ton\tcustomer\tpayment\tactivity\tand\taging\tanalysis.\tFor\tall\tfinancing\nreceivables,\twe\tdefine\t“past\tdue”\tas\tany\tpayment,\tincluding\tprincipal\tand\tinterest,\twhich\tis\tat\tleast\t31\tdays\tpast\tthe\tcontractual\tdue\tdate.\tAs\tof\nDecember\t31,\t2023\tand\t2022,\tthe\tvast\tmajority\tof\tour\tfinancing\treceivables\twere\tat\tcurrent\tstatus\twith\tonly\tan\timmaterial\tbalance\tbeing\tpast\tdue.\tAs\tof\nDecember\t31,\t2023,\tthe\tmajority\tof\tour\tfinancing\treceivables,\texcluding\tMyPower\tnotes\treceivable,\twere\toriginated\tin\t2023\tand\t2022,\tand\tas\tof\nDecember\t31,\t2022,\tthe\tmajority\tof\tour\tfinancing\treceivables,\texcluding\tMyPower\tnotes\treceivable,\twere\toriginated\tin\t2022.\nWe\thave\tcustomer\tnotes\treceivable\tunder\tthe\tlegacy\tMyPower\tloan\tprogram,\twhich\tprovided\tresidential\tcustomers\twith\tthe\toption\tto\tfinance\tthe\npurchase\tof\ta\tsolar\tenergy\tsystem\tthrough\ta\t30-year\tloan\tand\twere\tall\toriginated\tprior\tto\tyear\t2018.\tThe\toutstanding\tbalances,\tnet\tof\tany\tallowance\tfor\nexpected\tcredit\tlosses,\tare\tpresented\ton\tthe\tconsolidated\tbalance\tsheets\tas\ta\tcomponent\tof\tPrepaid\texpenses\tand\tother\tcurrent\tassets\tfor\tthe\tcurrent\nportion\tand\tas\tOther\tnon-current\tassets\tfor\tthe\tlong-term\tportion.\tAs\tof\tDecember\t31,\t2023\tand\t2022,\tthe\ttotal\toutstanding\tbalance\tof\tMyPower\ncustomer\tnotes\treceivable,\tnet\tof\tallowance\tfor\texpected\tcredit\tlosses,\twas\t$266\tmillion\tand\t$280\tmillion,\trespectively,\tof\twhich\t$5\tmillion\tand\t$7\tmillion\nwere\tdue\tin\tthe\tnext\t12\tmonths\tas\tof\tDecember\t31,\t2023\tand\t2022,\trespectively.\tAs\tof\tDecember\t31,\t2023\tand\t2022,\tthe\tallowance\tfor\texpected\tcredit\nlosses\twas\t$36\tmillion\tand\t$37\tmillion,\trespectively.\nConcentration\tof\tRisk\nCredit\tRisk\nFinancial\tinstruments\tthat\tpotentially\tsubject\tus\tto\ta\tconcentration\tof\tcredit\trisk\tconsist\tof\tcash,\tcash\tequivalents,\tinvestments,\trestricted\tcash,\naccounts\treceivable\tand\tother\tfinance\treceivables.\tOur\tcash\tand\tinvestments\tbalances\tare\tprimarily\ton\tdeposit\tat\thigh\tcredit\tquality\tfinancial\tinstitutions", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 66, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "or\tinvested\tin\tmoney\tmarket\tfunds.\tThese\tdeposits\tare\ttypically\tin\texcess\tof\tinsured\tlimits.\tAs\tof\tDecember\t31,\t2023\tand\t2022,\tno\tentity\trepresented\n10%\tor\tmore\tof\tour\ttotal\treceivables\tbalance.\nSupply\tRisk\nWe\tare\tdependent\ton\tour\tsuppliers,\tincluding\tsingle\tsource\tsuppliers,\tand\tthe\tinability\tof\tthese\tsuppliers\tto\tdeliver\tnecessary\tcomponents\tof\tour\nproducts\tin\ta\ttimely\tmanner\tat\tprices,\tquality\tlevels\tand\tvolumes\tacceptable\tto\tus,\tor\tour\tinability\tto\tefficiently\tmanage\tthese\tcomponents\tfrom\tthese\nsuppliers,\tcould\thave\ta\tmaterial\tadverse\teffect\ton\tour\tbusiness,\tprospects,\tfinancial\tcondition\tand\toperating\tresults.\nInventory\tValuation\nInventories\tare\tstated\tat\tthe\tlower\tof\tcost\tor\tnet\trealizable\tvalue.\tCost\tis\tcomputed\tusing\tstandard\tcost\tfor\tvehicles\tand\tenergy\tproducts,\twhich\napproximates\tactual\tcost\ton\ta\tfirst-in,\tfirst-out\tbasis.\tWe\trecord\tinventory\twrite-downs\tfor\texcess\tor\tobsolete\tinventories\tbased\tupon\tassumptions\tabout\ncurrent\tand\tfuture\tdemand\tforecasts.\tIf\tour\tinventory\ton-hand\tis\tin\texcess\tof\tour\tfuture\tdemand\tforecast,\tthe\texcess\tamounts\tare\twritten-off.\nWe\talso\treview\tour\tinventory\tto\tdetermine\twhether\tits\tcarrying\tvalue\texceeds\tthe\tnet\tamount\trealizable\tupon\tthe\tultimate\tsale\tof\tthe\tinventory.\nThis\trequires\tus\tto\tdetermine\tthe\testimated\tselling\tprice\tof\tour\tvehicles\tless\tthe\testimated\tcost\tto\tconvert\tthe\tinventory\ton-hand\tinto\ta\tfinished\tproduct.\nOnce\tinventory\tis\twritten-down,\ta\tnew,\tlower\tcost\tbasis\tfor\tthat\tinventory\tis\testablished\tand\tsubsequent\tchanges\tin\tfacts\tand\tcircumstances\tdo\tnot\tresult\nin\tthe\trestoration\tor\tincrease\tin\tthat\tnewly\testablished\tcost\tbasis.\nShould\tour\testimates\tof\tfuture\tselling\tprices\tor\tproduction\tcosts\tchange,\tadditional\tand\tpotentially\tmaterial\twrite-downs\tmay\tbe\trequired.\tA\tsmall\nchange\tin\tour\testimates\tmay\tresult\tin\ta\tmaterial\tcharge\tto\tour\treported\tfinancial\tresults.\nOperating\tLease\tVehicles", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 66, "lines": { "from": 17, "to": 33 } } } }, { "pageContent": "Operating\tLease\tVehicles\nVehicles\tthat\tare\tleased\tas\tpart\tof\tour\tdirect\tvehicle\tleasing\tprogram\tare\tclassified\tas\toperating\tlease\tvehicles\tat\tcost\tless\taccumulated\ndepreciation.\tWe\tgenerally\tdepreciate\ttheir\tcost,\tless\tresidual\tvalue,\tusing\tthe\tstraight-line-method\tto\tcost\tof\tautomotive\tleasing\trevenue\tover\tthe\ncontractual\tperiod.\tThe\tgross\tcost\tof\toperating\tlease\tvehicles\tas\tof\tDecember\t31,\t2023\tand\t2022\twas\t$7.36\tbillion\tand\t$6.08\tbillion,\trespectively.\nOperating\tlease\tvehicles\ton\tthe\tconsolidated\tbalance\tsheets\tare\tpresented\tnet\tof\taccumulated\tdepreciation\tof\t$1.38\tbillion\tand\t$1.04\tbillion\tas\tof\nDecember\t31,\t2023\tand\t2022,\trespectively.\n64", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 66, "lines": { "from": 33, "to": 39 } } } }, { "pageContent": "Digital\tAssets,\tNet\nWe\tcurrently\taccount\tfor\tall\tdigital\tassets\theld\tas\tindefinite-lived\tintangible\tassets\tin\taccordance\twith\tASC\t350,\tIntangibles—Goodwill\tand\tOther.\tWe\nhave\townership\tof\tand\tcontrol\tover\tour\tdigital\tassets\tand\twe\tmay\tuse\tthird-party\tcustodial\tservices\tto\tsecure\tit.\tThe\tdigital\tassets\tare\tinitially\trecorded\tat\ncost\tand\tare\tsubsequently\tremeasured\ton\tthe\tconsolidated\tbalance\tsheet\tat\tcost,\tnet\tof\tany\timpairment\tlosses\tincurred\tsince\tacquisition.\nWe\tdetermine\tthe\tfair\tvalue\tof\tour\tdigital\tassets\ton\ta\tnonrecurring\tbasis\tin\taccordance\twith\tASC\t820,\tFair\tValue\tMeasurement\t(“ASC\t820”),\tbased\non\tquoted\tprices\ton\tthe\tactive\texchange(s)\tthat\twe\thave\tdetermined\tis\tthe\tprincipal\tmarket\tfor\tsuch\tassets\t(Level\tI\tinputs).\tWe\tperform\tan\tanalysis\teach\nquarter\tto\tidentify\twhether\tevents\tor\tchanges\tin\tcircumstances,\tprincipally\tdecreases\tin\tthe\tquoted\tprices\ton\tactive\texchanges,\tindicate\tthat\tit\tis\tmore\nlikely\tthan\tnot\tthat\tour\tdigital\tassets\tare\timpaired.\tIn\tdetermining\tif\tan\timpairment\thas\toccurred,\twe\tconsider\tthe\tlowest\tmarket\tprice\tof\tone\tunit\tof\ndigital\tasset\tquoted\ton\tthe\tactive\texchange\tsince\tacquiring\tthe\tdigital\tasset.\tWhen\tthe\tthen\tcurrent\tcarrying\tvalue\tof\ta\tdigital\tasset\texceeds\tthe\tfair\nvalue\tdetermined\teach\tquarter,\tan\timpairment\tloss\thas\toccurred\twith\trespect\tto\tthose\tdigital\tassets\tin\tthe\tamount\tequal\tto\tthe\tdifference\tbetween\ttheir\ncarrying\tvalues\tand\tthe\tprices\tdetermined.\nImpairment\tlosses\tare\trecognized\twithin\tRestructuring\tand\tother\tin\tthe\tconsolidated\tstatements\tof\toperations\tin\tthe\tperiod\tin\twhich\tthe\timpairment\nis\tidentified.\tGains\tare\tnot\trecorded\tuntil\trealized\tupon\tsale(s),\tat\twhich\tpoint\tthey\tare\tpresented\tnet\tof\tany\timpairment\tlosses\tfor\tthe\tsame\tdigital\tassets\nheld\twithin\tRestructuring\tand\tother.\tIn\tdetermining\tthe\tgain\tto\tbe\trecognized\tupon\tsale,\twe\tcalculate\tthe\tdifference\tbetween\tthe\tsales\tprice\tand\tcarrying\nvalue\tof\tthe\tdigital\tassets\tsold\timmediately\tprior\tto\tsale.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 67, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "See\tNote\t3,\tDigital\tAssets,\tNet,\tfor\tfurther\tinformation\tregarding\tdigital\tassets.\nSolar\tEnergy\tSystems,\tNet\nWe\tare\tthe\tlessor\tof\tsolar\tenergy\tsystems.\tSolar\tenergy\tsystems\tare\tstated\tat\tcost\tless\taccumulated\tdepreciation.\nDepreciation\tand\tamortization\tis\tcalculated\tusing\tthe\tstraight-line\tmethod\tover\tthe\testimated\tuseful\tlives\tof\tthe\trespective\tassets,\tas\tfollows:\nSolar\tenergy\tsystems\tin\tservice30\tto\t35\tyears\nInitial\tdirect\tcosts\trelated\tto\tcustomer\tsolar\tenergy\tsystem\tlease\tacquisition\tcostsLease\tterm\t(up\tto\t25\tyears)\nSolar\tenergy\tsystems\tpending\tinterconnection\twill\tbe\tdepreciated\tas\tsolar\tenergy\tsystems\tin\tservice\twhen\tthey\thave\tbeen\tinterconnected\tand\nplaced\tin-service.\tSolar\tenergy\tsystems\tunder\tconstruction\trepresents\tsystems\tthat\tare\tunder\tinstallation,\twhich\twill\tbe\tdepreciated\tas\tsolar\tenergy\nsystems\tin\tservice\twhen\tthey\tare\tcompleted,\tinterconnected\tand\tplaced\tin\tservice.\tInitial\tdirect\tcosts\trelated\tto\tcustomer\tsolar\tenergy\tsystem\tagreement\nacquisition\tcosts\tare\tcapitalized\tand\tamortized\tover\tthe\tterm\tof\tthe\trelated\tcustomer\tagreements.\nProperty,\tPlant\tand\tEquipment,\tNet\nProperty,\tplant\tand\tequipment,\tnet,\tincluding\tleasehold\timprovements,\tare\trecognized\tat\tcost\tless\taccumulated\tdepreciation.\tDepreciation\tis\ngenerally\tcomputed\tusing\tthe\tstraight-line\tmethod\tover\tthe\testimated\tuseful\tlives\tof\tthe\trespective\tassets,\tas\tfollows:\nMachinery,\tequipment,\tvehicles\tand\toffice\tfurniture3\tto\t15\tyears\nTooling4\tto\t7\tyears\nBuilding\tand\tbuilding\timprovements15\tto\t30\tyears\nComputer\tequipment\tand\tsoftware3\tto\t10\tyears\nLeasehold\timprovements\tare\tdepreciated\ton\ta\tstraight-line\tbasis\tover\tthe\tshorter\tof\ttheir\testimated\tuseful\tlives\tor\tthe\tterms\tof\tthe\trelated\tleases.\nUpon\tthe\tretirement\tor\tsale\tof\tour\tproperty,\tplant\tand\tequipment,\tthe\tcost\tand\tassociated\taccumulated\tdepreciation\tare\tremoved\tfrom\tthe\nconsolidated\tbalance\tsheet,\tand\tthe\tresulting\tgain\tor\tloss\tis\treflected\ton\tthe\tconsolidated\tstatement\tof\toperations.\tMaintenance\tand\trepair\texpenditures", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 67, "lines": { "from": 16, "to": 35 } } } }, { "pageContent": "are\texpensed\tas\tincurred\twhile\tmajor\timprovements\tthat\tincrease\tthe\tfunctionality,\toutput\tor\texpected\tlife\tof\tan\tasset\tare\tcapitalized\tand\tdepreciated\nratably\tover\tthe\tidentified\tuseful\tlife.\n65", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 67, "lines": { "from": 36, "to": 38 } } } }, { "pageContent": "Interest\texpense\ton\toutstanding\tdebt\tis\tcapitalized\tduring\tthe\tperiod\tof\tsignificant\tcapital\tasset\tconstruction.\tCapitalized\tinterest\ton\tconstruction\tin\nprogress\tis\tincluded\twithin\tProperty,\tplant\tand\tequipment,\tnet\tand\tis\tamortized\tover\tthe\tlife\tof\tthe\trelated\tassets.\nLong-Lived\tAssets\tIncluding\tAcquired\tIntangible\tAssets\nWe\treview\tour\tproperty,\tplant\tand\tequipment,\tsolar\tenergy\tsystems,\tlong-term\tprepayments\tand\tintangible\tassets\tfor\timpairment\twhenever\tevents\nor\tchanges\tin\tcircumstances\tindicate\tthat\tthe\tcarrying\tamount\tof\tan\tasset\t(or\tasset\tgroup)\tmay\tnot\tbe\trecoverable.\tWe\tmeasure\trecoverability\tby\ncomparing\tthe\tcarrying\tamount\tto\tthe\tfuture\tundiscounted\tcash\tflows\tthat\tthe\tasset\tis\texpected\tto\tgenerate.\tIf\tthe\tasset\tis\tnot\trecoverable,\tits\tcarrying\namount\twould\tbe\tadjusted\tdown\tto\tits\tfair\tvalue.\tFor\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021,\twe\thave\trecognized\tno\tmaterial\timpairments\nof\tour\tlong-lived\tassets.\nIntangible\tassets\twith\tdefinite\tlives\tare\tamortized\ton\ta\tstraight-line\tbasis\tover\ttheir\testimated\tuseful\tlives,\twhich\trange\tfrom\tseven\tto\tthirty\tyears.\nGoodwill\nWe\tassess\tgoodwill\tfor\timpairment\tannually\tin\tthe\tfourth\tquarter,\tor\tmore\tfrequently\tif\tevents\tor\tchanges\tin\tcircumstances\tindicate\tthat\tit\tmight\tbe\nimpaired,\tby\tcomparing\tits\tcarrying\tvalue\tto\tthe\treporting\tunit’s\tfair\tvalue.\tFor\tthe\tyears\tended\tDecember\t31,\t2023,\t2022,\tand\t2021,\twe\tdid\tnot\nrecognize\tany\timpairment\tof\tgoodwill.\nCapitalization\tof\tSoftware\tCosts\nWe\tcapitalize\tcosts\tincurred\tin\tthe\tdevelopment\tof\tinternal\tuse\tsoftware,\tduring\tthe\tapplication\tdevelopment\tstage\tto\tProperty,\tplant\tand\nequipment,\tnet\ton\tthe\tconsolidated\tbalance\tsheets.\tCosts\trelated\tto\tpreliminary\tproject\tactivities\tand\tpost-implementation\tactivities\tare\texpensed\tas\nincurred.\tSuch\tcosts\tare\tamortized\ton\ta\tstraight-line\tbasis\tover\ttheir\testimated\tuseful\tlife\tof\tthree\tto\tfive\tyears.\nSoftware\tdevelopment\tcosts\tincurred\tin\tdevelopment\tof\tsoftware\tto\tbe\tsold,\tleased,\tor\totherwise\tmarketed,\tincurred\tsubsequent\tto\tthe", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 68, "lines": { "from": 1, "to": 18 } } } }, { "pageContent": "establishment\tof\ttechnological\tfeasibility\tand\tprior\tto\tthe\tgeneral\tavailability\tof\tthe\tsoftware\tare\tcapitalized\twhen\tthey\tare\texpected\tto\tbecome\nsignificant.\tSuch\tcosts\tare\tamortized\tover\tthe\testimated\tuseful\tlife\tof\tthe\tapplicable\tsoftware\tonce\tit\tis\tmade\tgenerally\tavailable\tto\tour\tcustomers.\nWe\tevaluate\tthe\tuseful\tlives\tof\tthese\tassets\ton\tan\tannual\tbasis,\tand\twe\ttest\tfor\timpairment\twhenever\tevents\tor\tchanges\tin\tcircumstances\toccur\nthat\tcould\timpact\tthe\trecoverability\tof\tthese\tassets.\tFor\tthe\tyears\tended\tDecember\t31,\t2023,\t2022,\tand\t2021,\twe\thave\trecognized\tno\timpairments\tof\ncapitalized\tsoftware\tcosts.\nForeign\tCurrency\nWe\tdetermine\tthe\tfunctional\tand\treporting\tcurrency\tof\teach\tof\tour\tinternational\tsubsidiaries\tand\ttheir\toperating\tdivisions\tbased\ton\tthe\tprimary\ncurrency\tin\twhich\tthey\toperate.\tIn\tcases\twhere\tthe\tfunctional\tcurrency\tis\tnot\tthe\tU.S.\tdollar,\twe\trecognize\ta\tcumulative\ttranslation\tadjustment\tcreated\tby\nthe\tdifferent\trates\twe\tapply\tto\tcurrent\tperiod\tincome\tor\tloss\tand\tthe\tbalance\tsheet.\tFor\teach\tsubsidiary,\twe\tapply\tthe\tmonthly\taverage\tfunctional\nexchange\trate\tto\tits\tmonthly\tincome\tor\tloss\tand\tthe\tmonth-end\tfunctional\tcurrency\trate\tto\ttranslate\tthe\tbalance\tsheet.\nForeign\tcurrency\ttransaction\tgains\tand\tlosses\tare\ta\tresult\tof\tthe\teffect\tof\texchange\trate\tchanges\ton\ttransactions\tdenominated\tin\tcurrencies\tother\nthan\tthe\tfunctional\tcurrency\tof\tthe\trespective\tsubsidiary.\tTransaction\tgains\tand\tlosses\tare\trecognized\tin\tOther\tincome\t(expense),\tnet,\tin\tthe\tconsolidated\nstatements\tof\toperations.\tFor\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021,\twe\trecorded\ta\tnet\tforeign\tcurrency\ttransaction\tgain\tof\t$122\tmillion,\nloss\tof\t$89\tmillion\tand\tgain\tof\t$97\tmillion,\trespectively.\n66", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 68, "lines": { "from": 19, "to": 33 } } } }, { "pageContent": "Warranties\nWe\tprovide\ta\tmanufacturer’s\twarranty\ton\tall\tnew\tand\tused\tvehicles\tand\ta\twarranty\ton\tthe\tinstallation\tand\tcomponents\tof\tthe\tenergy\tgeneration\nand\tstorage\tsystems\twe\tsell\tfor\tperiods\ttypically\tbetween\t10\tto\t25\tyears.\tWe\taccrue\ta\twarranty\treserve\tfor\tthe\tproducts\tsold\tby\tus,\twhich\tincludes\tour\nbest\testimate\tof\tthe\tprojected\tcosts\tto\trepair\tor\treplace\titems\tunder\twarranties\tand\trecalls\tif\tidentified.\tThese\testimates\tare\tbased\ton\tactual\tclaims\nincurred\tto\tdate\tand\tan\testimate\tof\tthe\tnature,\tfrequency\tand\tcosts\tof\tfuture\tclaims.\tThese\testimates\tare\tinherently\tuncertain\tand\tchanges\tto\tour\nhistorical\tor\tprojected\twarranty\texperience\tmay\tcause\tmaterial\tchanges\tto\tthe\twarranty\treserve\tin\tthe\tfuture.\tThe\twarranty\treserve\tdoes\tnot\tinclude\nprojected\twarranty\tcosts\tassociated\twith\tour\tvehicles\tsubject\tto\toperating\tlease\taccounting\tand\tour\tsolar\tenergy\tsystems\tunder\tlease\tcontracts\tor\tPPAs,\nas\tthe\tcosts\tto\trepair\tthese\twarranty\tclaims\tare\texpensed\tas\tincurred.\tThe\tportion\tof\tthe\twarranty\treserve\texpected\tto\tbe\tincurred\twithin\tthe\tnext\t12\nmonths\tis\tincluded\twithin\tAccrued\tliabilities\tand\tother,\twhile\tthe\tremaining\tbalance\tis\tincluded\twithin\tOther\tlong-term\tliabilities\ton\tthe\tconsolidated\nbalance\tsheets.\tFor\tliabilities\tthat\twe\tare\tentitled\tto\treceive\tindemnification\tfrom\tour\tsuppliers,\twe\trecord\treceivables\tfor\tthe\tcontractually\tobligated\namounts\ton\tthe\tconsolidated\tbalance\tsheets\tas\ta\tcomponent\tof\tPrepaid\texpenses\tand\tother\tcurrent\tassets\tfor\tthe\tcurrent\tportion\tand\tas\tOther\tnon-\ncurrent\tassets\tfor\tthe\tlong-term\tportion.\tWarranty\texpense\tis\trecorded\tas\ta\tcomponent\tof\tCost\tof\trevenues\tin\tthe\tconsolidated\tstatements\tof\toperations.\nDue\tto\tthe\tmagnitude\tof\tour\tautomotive\tbusiness,\tour\taccrued\twarranty\tbalance\tis\tprimarily\trelated\tto\tour\tautomotive\tsegment.\tAccrued\twarranty\nactivity\tconsisted\tof\tthe\tfollowing\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nAccrued\twarranty—beginning\tof\tperiod\n$3,505\t$2,101\t$1,468\t\nWarranty\tcosts\tincurred(1,225)(803)(525)", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 69, "lines": { "from": 1, "to": 19 } } } }, { "pageContent": "Warranty\tcosts\tincurred(1,225)(803)(525)\nNet\tchanges\tin\tliability\tfor\tpre-existing\twarranties,\tincluding\texpirations\tand\tforeign\nexchange\timpact539\t522\t102\t\nProvision\tfor\twarranty2,333\t1,685\t1,056\t\nAccrued\twarranty—end\tof\tperiod\n$5,152\t$3,505\t$2,101\t\nCustomer\tDeposits\nCustomer\tdeposits\tprimarily\tconsist\tof\trefundable\tcash\tpayments\tfrom\tcustomers\tat\tthe\ttime\tthey\tplace\tan\torder\tor\treservation\tfor\ta\tvehicle\tor\tan\nenergy\tproduct\tand\tany\tadditional\tpayments\tup\tto\tthe\tpoint\tof\tdelivery\tor\tthe\tcompletion\tof\tinstallation.\tCustomer\tdeposits\talso\tinclude\tprepayments\ton\ncontracts\tthat\tcan\tbe\tcancelled\twithout\tsignificant\tpenalties,\tsuch\tas\tvehicle\tmaintenance\tplans.\tCustomer\tdeposits\tare\tincluded\tin\tAccrued\tliabilities\tand\nother\ton\tthe\tconsolidated\tbalance\tsheets\tuntil\trefunded,\tforfeited\tor\tapplied\ttowards\tthe\tcustomer’s\tpurchase\tbalance.\nGovernment\tAssistance\tPrograms\tand\tIncentives\nGlobally,\tthe\toperation\tof\tour\tbusiness\tis\timpacted\tby\tvarious\tgovernment\tprograms,\tincentives,\tand\tother\tarrangements.\tGovernment\tincentives\nare\trecorded\tin\tour\tconsolidated\tfinancial\tstatements\tin\taccordance\twith\ttheir\tpurpose\tas\ta\treduction\tof\texpense,\tor\tan\toffset\tto\tthe\trelated\tcapital\tasset.\nThe\tbenefit\tis\tgenerally\trecorded\twhen\tall\tconditions\tattached\tto\tthe\tincentive\thave\tbeen\tmet\tor\tare\texpected\tto\tbe\tmet\tand\tthere\tis\treasonable\nassurance\tof\ttheir\treceipt.\nThe\tIRA\tIncentives\nOn\tAugust\t16,\t2022,\tthe\tIRA\twas\tenacted\tinto\tlaw\tand\tis\teffective\tfor\ttaxable\tyears\tbeginning\tafter\tDecember\t31,\t2022.\tThe\tIRA\tincludes\tmultiple\nincentives\tto\tpromote\tclean\tenergy,\telectric\tvehicles,\tbattery\tand\tenergy\tstorage\tmanufacture\tor\tpurchase,\tin\taddition\tto\ta\tnew\tcorporate\talternative\nminimum\ttax\tof\t15%\ton\tadjusted\tfinancial\tstatement\tincome\tof\tcorporations\twith\tprofits\tgreater\tthan\t$1\tbillion.\tSome\tof\tthese\tmeasures\tare\texpected\tto\nmaterially\taffect\tour\tconsolidated\tfinancial\tstatements.\tFor\tthe\tyear\tended\tDecember\t31,\t2023,\tthe\timpact\tfrom\tour\tIRA\tincentive\twas\tprimarily\ta", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 69, "lines": { "from": 19, "to": 39 } } } }, { "pageContent": "reduction\tof\tour\tmaterial\tcosts\tin\tour\tconsolidated\tstatement\tof\toperations.\tWe\twill\tcontinue\tto\tevaluate\tthe\teffects\tof\tthe\tIRA\tas\tmore\tguidance\tis\tissued\nand\tthe\trelevant\timplications\tto\tour\tconsolidated\tfinancial\tstatements.\n67", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 69, "lines": { "from": 40, "to": 42 } } } }, { "pageContent": "Gigafactory\tNew\tYork—New\tYork\tState\tInvestment\tand\tLease\nWe\thave\ta\tlease\tthrough\tthe\tResearch\tFoundation\tfor\tthe\tSUNY\tFoundation\twith\trespect\tto\tGigafactory\tNew\tYork.\tUnder\tthe\tlease\tand\ta\trelated\nresearch\tand\tdevelopment\tagreement,\twe\tare\tcontinuing\tto\tdesignate\tfurther\tbuildouts\tat\tthe\tfacility.\tWe\tare\trequired\tto\tcomply\twith\tcertain\tcovenants,\nincluding\thiring\tand\tcumulative\tinvestment\ttargets.\tUnder\tthe\tterms\tof\tthe\tarrangement,\tthe\tSUNY\tFoundation\tpaid\tfor\ta\tmajority\tof\tthe\tconstruction\ncosts\trelated\tto\tthe\tmanufacturing\tfacility\tand\tthe\tacquisition\tand\tcommissioning\tof\tcertain\tmanufacturing\tequipment;\tand\twe\tare\tresponsible\tfor\tany\nconstruction\tor\tequipment\tcosts\tin\texcess\tof\tsuch\tamount\t(refer\tto\tNote\t15,\tCommitments\tand\tContingencies).\tThis\tincentive\treduces\tthe\trelated\tlease\ncosts\tof\tthe\tfacility\twithin\tthe\tEnergy\tgeneration\tand\tstorage\tcost\tof\trevenues\tand\toperating\texpense\tline\titems\tin\tour\tconsolidated\tstatements\tof\noperations.\nGigafactory\tShanghai—Land\tUse\tRights\tand\tEconomic\tBenefits\nWe\thave\tan\tagreement\twith\tthe\tlocal\tgovernment\tof\tShanghai\tfor\tland\tuse\trights\tat\tGigafactory\tShanghai.\tUnder\tthe\tterms\tof\tthe\tarrangement,\twe\nare\trequired\tto\tmeet\ta\tcumulative\tcapital\texpenditure\ttarget\tand\tan\tannual\ttax\trevenue\ttarget\tstarting\tat\tthe\tend\tof\t2023.\tIn\taddition,\tthe\tShanghai\ngovernment\thas\tgranted\tto\tour\tGigafactory\tShanghai\tsubsidiary\tcertain\tincentives\tto\tbe\tused\tin\tconnection\twith\teligible\tcapital\tinvestments\tat\nGigafactory\tShanghai\t(refer\tto\tNote\t15,\tCommitments\tand\tContingencies).\tFor\tthe\tyear\tended\tDecember\t31,\t2022,\twe\treceived\tgrant\tfunding\tof\t$76\nmillion.\tThese\tincentives\toffset\tthe\trelated\tcosts\tof\tour\tfacilities\tand\tare\trecorded\tas\ta\treduction\tof\tthe\tcost\tof\tthe\tcapital\tinvestment\twithin\tthe\tProperty,\nplant\tand\tequipment,\tnet\tline\titem\tin\tour\tconsolidated\tbalance\tsheets.\tThe\tincentive\ttherefore\treduces\tthe\tdepreciation\texpense\tover\tthe\tuseful\tlives\tof\nthe\trelated\tequipment.\nNevada\tTax\tIncentives", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 70, "lines": { "from": 1, "to": 17 } } } }, { "pageContent": "the\trelated\tequipment.\nNevada\tTax\tIncentives\nIn\tconnection\twith\tthe\tconstruction\tof\tGigafactory\tNevada,\twe\tentered\tinto\tagreements\twith\tthe\tState\tof\tNevada\tand\tStorey\tCounty\tin\tNevada\tthat\nprovide\tabatements\tfor\tspecified\ttaxes,\tdiscounts\tto\tthe\tbase\ttariff\tenergy\trates\tand\ttransferable\ttax\tcredits\tof\tup\tto\t$195\tmillion\tin\tconsideration\tof\ncapital\tinvestment\tand\thiring\ttargets\tthat\twere\tmet\tat\tGigafactory\tNevada.\nGigafactory\tTexas\tTax\tIncentives\nIn\tconnection\twith\tthe\tconstruction\tof\tGigafactory\tTexas,\twe\tentered\tinto\ta\t20-year\tagreement\twith\tTravis\tCounty\tin\tTexas\tpursuant\tto\twhich\twe\nwould\treceive\tgrant\tfunding\tequal\tto\t70-80%\tof\tproperty\ttaxes\tpaid\tby\tus\tto\tTravis\tCounty\tand\ta\tseparate\t10-year\tagreement\twith\tthe\tDel\tValle\nIndependent\tSchool\tDistrict\tin\tTexas\tpursuant\tto\twhich\ta\tportion\tof\tthe\ttaxable\tvalue\tof\tour\tproperty\twould\tbe\tcapped\tat\ta\tspecified\tamount,\tin\teach\tcase\nsubject\tto\tour\tmeeting\tcertain\tminimum\teconomic\tdevelopment\tmetrics\tthrough\tour\tconstruction\tand\toperations\tat\tGigafactory\tTexas.\tThis\tincentive\tis\nrecorded\tas\ta\treduction\tof\tthe\trelated\texpenses\twithin\tthe\tCost\tof\tautomotive\trevenues\tand\toperating\texpense\tline\titems\tof\tour\tconsolidated\tstatements\nof\toperations.\tAs\tof\tDecember\t31,\t2023,\tthe\tgrant\tfunding\trelated\tto\tproperty\ttaxes\tpaid\twere\timmaterial.\nDefined\tContribution\tPlan\nWe\thave\ta\t401(k)\tsavings\tplan\tin\tthe\tU.S.\tthat\tis\tintended\tto\tqualify\tas\ta\tdeferred\tsalary\tarrangement\tunder\tSection\t401(k)\tof\tthe\tInternal\tRevenue\nCode\tand\ta\tnumber\tof\tsavings\tplans\tinternationally.\tUnder\tthe\t401(k)\tsavings\tplan,\tparticipating\temployees\tmay\telect\tto\tcontribute\tup\tto\t90%\tof\ttheir\neligible\tcompensation,\tsubject\tto\tcertain\tlimitations.\tBeginning\tin\tJanuary\t2022,\twe\tbegan\tto\tmatch\t50%\tof\teach\temployee’s\tcontributions\tup\tto\ta\nmaximum\tof\t6%\t(capped\tat\t$3,000)\tof\tthe\temployee’s\teligible\tcompensation,\tvested\tupon\tone\tyear\tof\tservice.\tDuring\tthe\tyears\tended\tDecember\t31,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 70, "lines": { "from": 16, "to": 32 } } } }, { "pageContent": "2023\tand\t2022,\twe\trecognized\t$99\tmillion\tand\t$91\tmillion,\trespectively,\tof\texpenses\trelated\tto\temployer\tcontributions\tfor\tthe\t401(k)\tsavings\tplan.\n68", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 70, "lines": { "from": 33, "to": 34 } } } }, { "pageContent": "Recent\tAccounting\tPronouncements\nRecently\tissued\taccounting\tpronouncements\tnot\tyet\tadopted\nIn\tNovember\t2023,\tthe\tFinancial\tAccounting\tStandards\tBoard\t(“FASB”)\tissued\tASU\tNo.\t2023-07,\tImprovements\tto\tReportable\tSegment\tDisclosures\n(Topic\t280).\tThis\tASU\tupdates\treportable\tsegment\tdisclosure\trequirements\tby\trequiring\tdisclosures\tof\tsignificant\treportable\tsegment\texpenses\tthat\tare\nregularly\tprovided\tto\tthe\tChief\tOperating\tDecision\tMaker\t(“CODM”)\tand\tincluded\twithin\teach\treported\tmeasure\tof\ta\tsegment's\tprofit\tor\tloss.\tThis\tASU\talso\nrequires\tdisclosure\tof\tthe\ttitle\tand\tposition\tof\tthe\tindividual\tidentified\tas\tthe\tCODM\tand\tan\texplanation\tof\thow\tthe\tCODM\tuses\tthe\treported\tmeasures\tof\ta\nsegment’s\tprofit\tor\tloss\tin\tassessing\tsegment\tperformance\tand\tdeciding\thow\tto\tallocate\tresources.\tThe\tASU\tis\teffective\tfor\tannual\tperiods\tbeginning\tafter\nDecember\t15,\t2023,\tand\tinterim\tperiods\twithin\tfiscal\tyears\tbeginning\tafter\tDecember\t15,\t2024.\tAdoption\tof\tthe\tASU\tshould\tbe\tapplied\tretrospectively\tto\nall\tprior\tperiods\tpresented\tin\tthe\tfinancial\tstatements.\tEarly\tadoption\tis\talso\tpermitted.\tThis\tASU\twill\tlikely\tresult\tin\tus\tincluding\tthe\tadditional\trequired\ndisclosures\twhen\tadopted.\tWe\tare\tcurrently\tevaluating\tthe\tprovisions\tof\tthis\tASU\tand\texpect\tto\tadopt\tthem\tfor\tthe\tyear\tending\tDecember\t31,\t2024.\nIn\tDecember\t2023,\tthe\tFASB\tissued\tASU\tNo.\t2023-08,\tAccounting\tfor\tand\tDisclosure\tof\tCrypto\tAssets\t(Subtopic\t350-60).\tThis\tASU\trequires\tcertain\ncrypto\tassets\tto\tbe\tmeasured\tat\tfair\tvalue\tseparately\tin\tthe\tbalance\tsheet\tand\tincome\tstatement\teach\treporting\tperiod.\tThis\tASU\talso\tenhances\tthe\tother\nintangible\tasset\tdisclosure\trequirements\tby\trequiring\tthe\tname,\tcost\tbasis,\tfair\tvalue,\tand\tnumber\tof\tunits\tfor\teach\tsignificant\tcrypto\tholding.\tThe\tASU\tis\neffective\tfor\tannual\tperiods\tbeginning\tafter\tDecember\t15,\t2024,\tincluding\tinterim\tperiods\twithin\tthose\tfiscal\tyears.\tAdoption\tof\tthe\tASU\trequires\ta", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 71, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "cumulative-effect\tadjustment\tto\tthe\topening\tbalance\tof\tretained\tearnings\tas\tof\tthe\tbeginning\tof\tthe\tannual\treporting\tperiod\tin\twhich\tan\tentity\tadopts\tthe\namendments.\tEarly\tadoption\tis\talso\tpermitted,\tincluding\tadoption\tin\tan\tinterim\tperiod.\tHowever,\tif\tthe\tASU\tis\tearly\tadopted\tin\tan\tinterim\tperiod,\tan\tentity\nmust\tadopt\tthe\tASU\tas\tof\tthe\tbeginning\tof\tthe\tfiscal\tyear\tthat\tincludes\tthe\tinterim\tperiod.\tThis\tASU\twill\tresult\tin\tgains\tand\tlosses\trecorded\tin\tthe\nconsolidated\tfinancial\tstatements\tof\toperations\tand\tadditional\tdisclosures\twhen\tadopted.\tWe\tare\tcurrently\tevaluating\tthe\tadoption\tof\tthis\tASU\tand\tit\twill\naffect\tthe\tcarrying\tvalue\tof\tour\tcrypto\tassets\theld\tand\tthe\tgains\tand\tlosses\trelating\tthereto,\tonce\tadopted.\nIn\tDecember\t2023,\tthe\tFASB\tissued\tASU\tNo.\t2023-09,\tImprovements\tto\tIncome\tTax\tDisclosures\t(Topic\t740).\tThe\tASU\trequires\tdisaggregated\ninformation\tabout\ta\treporting\tentity’s\teffective\ttax\trate\treconciliation\tas\twell\tas\tadditional\tinformation\ton\tincome\ttaxes\tpaid.\tThe\tASU\tis\teffective\ton\ta\nprospective\tbasis\tfor\tannual\tperiods\tbeginning\tafter\tDecember\t15,\t2024.\tEarly\tadoption\tis\talso\tpermitted\tfor\tannual\tfinancial\tstatements\tthat\thave\tnot\nyet\tbeen\tissued\tor\tmade\tavailable\tfor\tissuance.\tThis\tASU\twill\tresult\tin\tthe\trequired\tadditional\tdisclosures\tbeing\tincluded\tin\tour\tconsolidated\tfinancial\nstatements,\tonce\tadopted.\nRecently\tadopted\taccounting\tpronouncements\nIn\tOctober\t2021,\tthe\tFASB\tissued\tASU\tNo.\t2021-08,\tAccounting\tfor\tContract\tAssets\tand\tContract\tLiabilities\tfrom\tContracts\twith\tCustomers\t(Topic\n805).\tThis\tASU\trequires\tan\tacquirer\tin\ta\tbusiness\tcombination\tto\trecognize\tand\tmeasure\tcontract\tassets\tand\tcontract\tliabilities\t(deferred\trevenue)\tfrom\nacquired\tcontracts\tusing\tthe\trevenue\trecognition\tguidance\tin\tTopic\t606.\tAt\tthe\tacquisition\tdate,\tthe\tacquirer\tapplies\tthe\trevenue\tmodel\tas\tif\tit\thad\noriginated\tthe\tacquired\tcontracts.\tThe\tASU\tis\teffective\tfor\tannual\tperiods\tbeginning\tafter\tDecember\t15,\t2022,\tincluding\tinterim\tperiods\twithin\tthose\tfiscal", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 71, "lines": { "from": 15, "to": 29 } } } }, { "pageContent": "years.\tWe\tadopted\tthis\tASU\tprospectively\ton\tJanuary\t1,\t2023.\tThis\tASU\thas\tnot\tand\tis\tcurrently\tnot\texpected\tto\thave\ta\tmaterial\timpact\ton\tour\nconsolidated\tfinancial\tstatements.\nIn\tMarch\t2022,\tthe\tFASB\tissued\tASU\t2022-02,\tTroubled\tDebt\tRestructurings\tand\tVintage\tDisclosures.\tThis\tASU\teliminates\tthe\taccounting\tguidance\nfor\ttroubled\tdebt\trestructurings\tby\tcreditors\tthat\thave\tadopted\tASU\t2016-13,\tMeasurement\tof\tCredit\tLosses\ton\tFinancial\tInstruments,\twhich\twe\tadopted\non\tJanuary\t1,\t2020.\tThis\tASU\talso\tenhances\tthe\tdisclosure\trequirements\tfor\tcertain\tloan\trefinancing\tand\trestructurings\tby\tcreditors\twhen\ta\tborrower\tis\nexperiencing\tfinancial\tdifficulty.\tIn\taddition,\tthe\tASU\tamends\tthe\tguidance\ton\tvintage\tdisclosures\tto\trequire\tentities\tto\tdisclose\tcurrent\tperiod\tgross\twrite-\noffs\tby\tyear\tof\torigination\tfor\tfinancing\treceivables\tand\tnet\tinvestments\tin\tleases\twithin\tthe\tscope\tof\tASC\t326-20.\tThe\tASU\tis\teffective\tfor\tannual\tperiods\nbeginning\tafter\tDecember\t15,\t2022,\tincluding\tinterim\tperiods\twithin\tthose\tfiscal\tyears.\tWe\tadopted\tthe\tASU\tprospectively\ton\tJanuary\t1,\t2023.\tThis\tASU\nhas\tnot\tand\tis\tcurrently\tnot\texpected\tto\thave\ta\tmaterial\timpact\ton\tour\tconsolidated\tfinancial\tstatements.\n69", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 71, "lines": { "from": 30, "to": 39 } } } }, { "pageContent": "ASU\t2020-06\nIn\tAugust\t2020,\tthe\tFASB\tissued\tASU\t2020-06,\tAccounting\tfor\tConvertible\tInstruments\tand\tContracts\tin\tan\tEntity’s\tOwn\tEquity.\tThe\tASU\tsimplifies\nthe\taccounting\tfor\tconvertible\tinstruments\tby\tremoving\tcertain\tseparation\tmodels\tin\tASC\t470-20,\tDebt—Debt\twith\tConversion\tand\tOther\tOptions,\tfor\nconvertible\tinstruments.\tThe\tASU\tupdates\tthe\tguidance\ton\tcertain\tembedded\tconversion\tfeatures\tthat\tare\tnot\trequired\tto\tbe\taccounted\tfor\tas\tderivatives\nunder\tTopic\t815,\tDerivatives\tand\tHedging,\tor\tthat\tdo\tnot\tresult\tin\tsubstantial\tpremiums\taccounted\tfor\tas\tpaid-in\tcapital,\tsuch\tthat\tthose\tfeatures\tare\tno\nlonger\trequired\tto\tbe\tseparated\tfrom\tthe\thost\tcontract.\tThe\tconvertible\tdebt\tinstruments\twill\tbe\taccounted\tfor\tas\ta\tsingle\tliability\tmeasured\tat\tamortized\ncost.\tThis\twill\talso\tresult\tin\tthe\tinterest\texpense\trecognized\tfor\tconvertible\tdebt\tinstruments\tto\tbe\ttypically\tcloser\tto\tthe\tcoupon\tinterest\trate\twhen\napplying\tthe\tguidance\tin\tTopic\t835,\tInterest.\tFurther,\tthe\tASU\tmade\tamendments\tto\tthe\tEPS\tguidance\tin\tTopic\t260\tfor\tconvertible\tdebt\tinstruments,\tthe\nmost\tsignificant\timpact\tof\twhich\tis\trequiring\tthe\tuse\tof\tthe\tif-converted\tmethod\tfor\tdiluted\tEPS\tcalculation,\tand\tno\tlonger\tallowing\tthe\tnet\tshare\nsettlement\tmethod.\tThe\tASU\talso\tmade\trevisions\tto\tTopic\t815-40,\twhich\tprovides\tguidance\ton\thow\tan\tentity\tmust\tdetermine\twhether\ta\tcontract\tqualifies\nfor\ta\tscope\texception\tfrom\tderivative\taccounting.\tThe\tamendments\tto\tTopic\t815-40\tchange\tthe\tscope\tof\tcontracts\tthat\tare\trecognized\tas\tassets\tor\nliabilities.\nOn\tJanuary\t1,\t2021,\twe\tadopted\tthe\tASU\tusing\tthe\tmodified\tretrospective\tmethod.\tWe\trecognized\ta\tfavorable\t$211\tmillion\tcumulative\teffect\tof\ninitially\tapplying\tthe\tASU\tas\tan\tadjustment\tto\tthe\tJanuary\t1,\t2021\topening\tbalance\tof\taccumulated\tdeficit.\tDue\tto\tthe\trecombination\tof\tthe\tequity\nconversion\tcomponent\tof\tour\tconvertible\tdebt\tremaining\toutstanding,\tadditional\tpaid\tin\tcapital\twas\treduced\tby\t$474\tmillion\tand\tconvertible\tsenior\tnotes", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 72, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "(mezzanine\tequity)\twas\treduced\tby\t$51\tmillion.\tThe\tremoval\tof\tthe\tremaining\tdebt\tdiscounts\trecorded\tfor\tthis\tprevious\tseparation\thad\tthe\teffect\tof\nincreasing\tour\tnet\tdebt\tbalance\tby\t$269\tmillion\tand\twe\treduced\tproperty,\tplant\tand\tequipment\tby\t$45\tmillion\trelated\tto\tpreviously\tcapitalized\tinterest.\nThe\tprior\tperiod\tconsolidated\tfinancial\tstatements\thave\tnot\tbeen\tretrospectively\tadjusted\tand\tcontinue\tto\tbe\treported\tunder\tthe\taccounting\tstandards\tin\neffect\tfor\tthose\tperiods.\nNote\t3\t–\tDigital\tAssets,\tNet\nDuring\tthe\tyears\tended\tDecember\t31,\t2023\tand\t2022,\twe\tpurchased\tand/or\treceived\timmaterial\tamounts\tof\tdigital\tassets.\tDuring\tthe\tyear\tended\nDecember\t31,\t2023,\twe\trecorded\tan\timmaterial\tamount\tof\timpairment\tlosses\ton\tdigital\tassets.\tDuring\tthe\tyear\tended\tDecember\t31,\t2022,\twe\trecorded\n$204\tmillion\tof\timpairment\tlosses\ton\tdigital\tassets\tand\trealized\tgains\tof\t$64\tmillion\tin\tconnection\twith\tconverting\tour\tholdings\tof\tdigital\tassets\tinto\tfiat\ncurrency.\tThe\tgains\tare\tpresented\tnet\tof\timpairment\tlosses\tin\tRestructuring\tand\tother\tin\tthe\tconsolidated\tstatements\tof\toperations.\tAs\tof\tDecember\t31,\n2023\tand\t2022,\tthe\tcarrying\tvalue\tof\tour\tdigital\tassets\theld\treflects\tcumulative\timpairment\tof\t$204\tmillion.\nNote\t4\t–\tGoodwill\tand\tIntangible\tAssets\nGoodwill\tincreased\t$59\tmillion\twithin\tthe\tautomotive\tsegment\tfrom\t$194\tmillion\tas\tof\tDecember\t31,\t2022\tto\t$253\tmillion\tas\tof\tDecember\t31,\t2023\nprimarily\tfrom\ta\tbusiness\tcombination,\tnet\tof\tthe\timpact\tof\ta\tdivestiture.\tThere\twere\tno\taccumulated\timpairment\tlosses\tas\tof\tDecember\t31,\t2023\tand\n2022.\nThe\tnet\tcarrying\tvalue\tof\tour\tintangible\tassets\tdecreased\tfrom\t$215\tmillion\tas\tof\tDecember\t31,\t2022\tto\t$178\tmillion\tas\tof\tDecember\t31,\t2023\nmainly\tfrom\tamortization.\nNote\t5\t–\tFair\tValue\tof\tFinancial\tInstruments\nASC\t820,\tFair\tValue\tMeasurements\t(“ASC\t820”)\tstates\tthat\tfair\tvalue\tis\tan\texit\tprice,\trepresenting\tthe\tamount\tthat\twould\tbe\treceived\tto\tsell\tan", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 72, "lines": { "from": 16, "to": 33 } } } }, { "pageContent": "asset\tor\tpaid\tto\ttransfer\ta\tliability\tin\tan\torderly\ttransaction\tbetween\tmarket\tparticipants.\tAs\tsuch,\tfair\tvalue\tis\ta\tmarket-based\tmeasurement\tthat\tshould\nbe\tdetermined\tbased\ton\tassumptions\tthat\tmarket\tparticipants\twould\tuse\tin\tpricing\tan\tasset\tor\ta\tliability.\tThe\tthree-tiered\tfair\tvalue\thierarchy,\twhich\nprioritizes\twhich\tinputs\tshould\tbe\tused\tin\tmeasuring\tfair\tvalue,\tis\tcomprised\tof:\t(Level\tI)\tobservable\tinputs\tsuch\tas\tquoted\tprices\tin\tactive\tmarkets;\t(Level\nII)\tinputs\tother\tthan\tquoted\tprices\tin\tactive\tmarkets\tthat\tare\tobservable\teither\tdirectly\tor\tindirectly\tand\t(Level\tIII)\tunobservable\tinputs\tfor\twhich\tthere\tis\nlittle\tor\tno\tmarket\tdata.\tThe\tfair\tvalue\thierarchy\trequires\tthe\tuse\tof\tobservable\tmarket\tdata\twhen\tavailable\tin\tdetermining\tfair\tvalue.\tOur\tassets\tand\nliabilities\tthat\twere\tmeasured\tat\tfair\tvalue\ton\ta\trecurring\tbasis\twere\tas\tfollows\t(in\tmillions):\n70", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 72, "lines": { "from": 34, "to": 40 } } } }, { "pageContent": "December\t31,\t2023December\t31,\t2022\n\tFair\tValueLevel\tILevel\tIILevel\tIIIFair\tValueLevel\tILevel\tIILevel\tIII\nMoney\tmarket\tfunds$109\t$109\t$—\t$—\t$2,188\t$2,188\t$—\t$—\t\nU.S.\tgovernment\tsecurities5,136\t—\t5,136\t—\t894\t—\t894\t—\t\nCorporate\tdebt\tsecurities480\t—\t480\t—\t885\t—\t885\t—\t\nCertificates\tof\tdeposit\tand\ttime\ndeposits6,996\t—\t6,996\t—\t4,253\t—\t4,253\t—\t\nCommercial\tpaper470\t—\t470\t—\t—\t—\t—\t—\t\nTotal\n$13,191\t$109\t$13,082\t$—\t$8,220\t$2,188\t$6,032\t$—\t\nAll\tof\tour\tmoney\tmarket\tfunds\twere\tclassified\twithin\tLevel\tI\tof\tthe\tfair\tvalue\thierarchy\tbecause\tthey\twere\tvalued\tusing\tquoted\tprices\tin\tactive\nmarkets.\tOur\tU.S.\tgovernment\tsecurities,\tcertificates\tof\tdeposit,\tcommercial\tpaper,\ttime\tdeposits\tand\tcorporate\tdebt\tsecurities\tare\tclassified\twithin\tLevel\nII\tof\tthe\tfair\tvalue\thierarchy\tand\tthe\tmarket\tapproach\twas\tused\tto\tdetermine\tfair\tvalue\tof\tthese\tinvestments.\nOur\tcash,\tcash\tequivalents\tand\tinvestments\tclassified\tby\tsecurity\ttype\tas\tof\tDecember\t31,\t2023\tand\t2022\tconsisted\tof\tthe\tfollowing\t(in\tmillions):\n\tDecember\t31,\t2023\n\tAdjusted\tCost\nGross\nUnrealized\nGains\nGross\nUnrealized\nLossesFair\tValue\nCash\tand\tCash\nEquivalents\nShort-Term\nInvestments\nCash$15,903\t$—\t$—\t$15,903\t$15,903\t$—\t\nMoney\tmarket\tfunds109\t—\t—\t109\t109\t—\t\nU.S.\tgovernment\tsecurities5,136\t1\t(1)5,136\t277\t4,859\t\nCorporate\tdebt\tsecurities485\t1\t(6)480\t—\t480\t\nCertificates\tof\tdeposit\tand\ttime\tdeposits6,995\t1\t—\t6,996\t—\t6,996\t\nCommercial\tpaper470\t—\t—\t470\t109\t361\t\nTotal\tcash,\tcash\tequivalents\tand\tshort-term\ninvestments\n$29,098\t$3\t$(7)$29,094\t$16,398\t$12,696\t\n\tDecember\t31,\t2022\n\tAdjusted\tCost\nGross\nUnrealized\nGains\nGross\nUnrealized\nLossesFair\tValue\nCash\tand\tCash\nEquivalents\nShort-Term\nInvestments\nCash$13,965\t$—\t$—\t$13,965\t$13,965\t$—\t\nMoney\tmarket\tfunds2,188\t—\t—\t2,188\t2,188\t—\t\nU.S.\tgovernment\tsecurities897\t—\t(3)894\t—\t894\t\nCorporate\tdebt\tsecurities907\t—\t(22)885\t—\t885\t\nCertificates\tof\tdeposit\tand\ttime\tdeposits4,252\t1\t—\t4,253\t100\t4,153\t\nTotal\tcash,\tcash\tequivalents\tand\tshort-term\ninvestments\n$22,209\t$1\t$(25)$22,185\t$16,253\t$5,932", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 73, "lines": { "from": 1, "to": 55 } } } }, { "pageContent": "$22,209\t$1\t$(25)$22,185\t$16,253\t$5,932\t\nWe\trecord\tgross\trealized\tgains,\tlosses\tand\tcredit\tlosses\tas\ta\tcomponent\tof\tOther\tincome\t(expense),\tnet\tin\tthe\tconsolidated\tstatements\tof\noperations.\tFor\tthe\tyears\tended\tDecember\t31,\t2023\tand\t2022,\twe\tdid\tnot\trecognize\tany\tmaterial\tgross\trealized\tgains,\tlosses\tor\tcredit\tlosses.\tThe\tending\nallowance\tbalances\tfor\tcredit\tlosses\twere\timmaterial\tas\tof\tDecember\t31,\t2023\tand\t2022.\tWe\thave\tdetermined\tthat\tthe\tgross\tunrealized\tlosses\ton\tour\ninvestments\tas\tof\tDecember\t31,\t2023\tand\t2022\twere\ttemporary\tin\tnature.\n71", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 73, "lines": { "from": 55, "to": 60 } } } }, { "pageContent": "The\tfollowing\ttable\tsummarizes\tthe\tfair\tvalue\tof\tour\tinvestments\tby\tstated\tcontractual\tmaturities\tas\tof\tDecember\t31,\t2023\t(in\tmillions):\nDue\tin\t1\tyear\tor\tless$12,374\t\nDue\tin\t1\tyear\tthrough\t5\tyears297\t\nDue\tin\t5\tyears\tthrough\t10\tyears25\t\nTotal\n$12,696\t\nDisclosure\tof\tFair\tValues\nOur\tfinancial\tinstruments\tthat\tare\tnot\tre-measured\tat\tfair\tvalue\tinclude\taccounts\treceivable,\tfinancing\treceivables,\tother\treceivables,\tdigital\tassets,\naccounts\tpayable,\taccrued\tliabilities,\tcustomer\tdeposits\tand\tdebt.\tThe\tcarrying\tvalues\tof\tthese\tfinancial\tinstruments\tmaterially\tapproximate\ttheir\tfair\nvalues,\tother\tthan\tour\t2.00%\tConvertible\tSenior\tNotes\tdue\tin\t2024\t(“2024\tNotes”)\tand\tdigital\tassets.\nWe\testimate\tthe\tfair\tvalue\tof\tthe\t2024\tNotes\tusing\tcommonly\taccepted\tvaluation\tmethodologies\tand\tmarket-based\trisk\tmeasurements\tthat\tare\nindirectly\tobservable,\tsuch\tas\tcredit\trisk\t(Level\tII).\tIn\taddition,\twe\testimate\tthe\tfair\tvalues\tof\tour\tdigital\tassets\tbased\ton\tquoted\tprices\tin\tactive\tmarkets\n(Level\tI).\tThe\tfollowing\ttable\tpresents\tthe\testimated\tfair\tvalues\tand\tthe\tcarrying\tvalues\t(in\tmillions):\n\tDecember\t31,\t2023December\t31,\t2022\n\tCarrying\tValueFair\tValueCarrying\tValueFair\tValue\n2024\tNotes$37\t$443\t$37\t$223\t\nDigital\tassets,\tnet$184\t$487\t$184\t$191\t\nNote\t6\t–\tInventory\nOur\tinventory\tconsisted\tof\tthe\tfollowing\t(in\tmillions):\n\t\nDecember\t31,\n2023\nDecember\t31,\n2022\nRaw\tmaterials$5,390\t$6,137\t\nWork\tin\tprocess2,016\t2,385\t\nFinished\tgoods\t(1)5,049\t3,475\t\nService\tparts1,171\t842\t\nTotal\n$13,626\t$12,839\t\n(1)Finished\tgoods\tinventory\tincludes\tproducts\tin\ttransit\tto\tfulfill\tcustomer\torders,\tnew\tvehicles\tavailable\tfor\tsale,\tused\tvehicles\tand\tenergy\tproducts\navailable\tfor\tsale.\nWe\twrite-down\tinventory\tfor\tany\texcess\tor\tobsolete\tinventories\tor\twhen\twe\tbelieve\tthat\tthe\tnet\trealizable\tvalue\tof\tinventories\tis\tless\tthan\tthe\ncarrying\tvalue.\tDuring\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021\twe\trecorded\twrite-downs\tof\t$233\tmillion,\t$144\tmillion\tand\t$106\tmillion,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 74, "lines": { "from": 1, "to": 34 } } } }, { "pageContent": "respectively,\tin\tCost\tof\trevenues\tin\tthe\tconsolidated\tstatements\tof\toperations.\n72", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 74, "lines": { "from": 35, "to": 36 } } } }, { "pageContent": "Note\t7\t–\tSolar\tEnergy\tSystems,\tNet\nOur\tsolar\tenergy\tsystems,\tnet,\tconsisted\tof\tthe\tfollowing\t(in\tmillions):\nDecember\t31,\n2023\nDecember\t31,\n2022\nSolar\tenergy\tsystems\tin\tservice\n$6,755\t$6,785\t\nInitial\tdirect\tcosts\trelated\tto\tcustomer\tsolar\tenergy\tsystem\tlease\tacquisition\tcosts104\t104\t\n6,859\t6,889\t\nLess:\taccumulated\tdepreciation\tand\tamortization\t(1)(1,643)(1,418)\n5,216\t5,471\t\nSolar\tenergy\tsystems\tunder\tconstruction1\t2\t\nSolar\tenergy\tsystems\tpending\tinterconnection12\t16\t\nSolar\tenergy\tsystems,\tnet\t(2)\n$5,229\t$5,489\t\n(1)Depreciation\tand\tamortization\texpense\tduring\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021\twas\t$235\tmillion,\t$235\tmillion\tand\t$236\nmillion,\trespectively.\n(2)As\tof\tDecember\t31,\t2023\tand\t2022,\tthere\twere\t$740\tmillion\tand\t$802\tmillion,\trespectively,\tof\tgross\tsolar\tenergy\tsystems\tunder\tlease\tpass-through\nfund\tarrangements\twith\taccumulated\tdepreciation\tof\t$157\tmillion\tand\t$148\tmillion,\trespectively.\nNote\t8\t–\tProperty,\tPlant\tand\tEquipment,\tNet\nOur\tproperty,\tplant\tand\tequipment,\tnet,\tconsisted\tof\tthe\tfollowing\t(in\tmillions):\nDecember\t31,\n2023\nDecember\t31,\n2022\nMachinery,\tequipment,\tvehicles\tand\toffice\tfurniture$16,372\t$13,558\t\nTooling3,147\t2,579\t\nLeasehold\timprovements3,168\t2,366\t\nLand\tand\tbuildings9,505\t7,751\t\nComputer\tequipment,\thardware\tand\tsoftware3,799\t2,072\t\nConstruction\tin\tprogress5,791\t4,263\t\n\t41,782\t32,589\t\nLess:\tAccumulated\tdepreciation(12,057)(9,041)\nTotal\n$29,725\t$23,548\t\nConstruction\tin\tprogress\tis\tprimarily\tcomprised\tof\tongoing\tconstruction\tand\texpansion\tof\tour\tfacilities,\tand\tequipment\tand\ttooling\trelated\tto\tthe\nmanufacturing\tof\tour\tproducts.\tCompleted\tassets\tare\ttransferred\tto\ttheir\trespective\tasset\tclasses\tand\tdepreciation\tbegins\twhen\tan\tasset\tis\tready\tfor\tits\nintended\tuse.\nDepreciation\texpense\tduring\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021\twas\t$3.33\tbillion,\t$2.42\tbillion\tand\t$1.91\tbillion,\trespectively.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 75, "lines": { "from": 1, "to": 40 } } } }, { "pageContent": "Panasonic\thas\tpartnered\twith\tus\ton\tGigafactory\tNevada\twith\tinvestments\tin\tthe\tproduction\tequipment\tthat\tit\tuses\tto\tmanufacture\tand\tsupply\tus\nwith\tbattery\tcells.\tUnder\tour\tarrangement\twith\tPanasonic,\twe\tplan\tto\tpurchase\tthe\tfull\toutput\tfrom\ttheir\tproduction\tequipment\tat\tnegotiated\tprices.\tAs\nthe\tterms\tof\tthe\tarrangement\tconvey\ta\tfinance\tlease\tunder\tASC\t842,\twe\taccount\tfor\ttheir\tproduction\tequipment\tas\tleased\tassets\twhen\tproduction\ncommences.\tWe\taccount\tfor\teach\tlease\tand\tany\tnon-lease\tcomponents\tassociated\twith\tthat\tlease\tas\ta\tsingle\tlease\tcomponent\tfor\tall\tasset\tclasses,\nexcept\tproduction\tequipment\tclasses\tembedded\tin\tsupply\tagreements.\tThis\tresults\tin\tus\trecording\tthe\tcost\tof\ttheir\tproduction\tequipment\twithin\tProperty,\nplant\tand\tequipment,\tnet,\ton\tthe\tconsolidated\tbalance\tsheets\twith\ta\tcorresponding\tliability\trecorded\tto\tdebt\tand\tfinance\tleases.\tDepreciation\ton\nPanasonic\tproduction\tequipment\tis\tcomputed\tusing\tthe\tunits-of-production\tmethod\twhereby\tcapitalized\tcosts\tare\tamortized\tover\tthe\ttotal\testimated\nproductive\tlife\tof\tthe\trespective\tassets.\tAs\tof\tDecember\t31,\t2023\tand\t2022,\twe\thad\tcumulatively\tcapitalized\tgross\tcosts\tof\t$2.02\tbillion\tand\t$2.01\tbillion,\nrespectively,\ton\tthe\tconsolidated\tbalance\tsheets\tin\trelation\tto\tthe\tproduction\tequipment\tunder\tour\tPanasonic\tarrangement.\n73", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 75, "lines": { "from": 41, "to": 50 } } } }, { "pageContent": "Note\t9\t–\tAccrued\tLiabilities\tand\tOther\nOur\taccrued\tliabilities\tand\tother\tcurrent\tliabilities\tconsisted\tof\tthe\tfollowing\t(in\tmillions):\nDecember\t31,\n2023\nDecember\t31,\n2022\nAccrued\tpurchases\t(1)$2,721\t$2,747\t\nAccrued\twarranty\treserve,\tcurrent\tportion1,546\t1,025\t\nPayroll\tand\trelated\tcosts1,325\t1,026\t\nTaxes\tpayable\t(2)1,204\t1,235\t\nCustomer\tdeposits876\t1,063\t\nOperating\tlease\tliabilities,\tcurrent\tportion672\t485\t\nSales\treturn\treserve,\tcurrent\tportion219\t270\t\nOther\tcurrent\tliabilities517\t354\t\nTotal\n$9,080\t$8,205\t\n(1)Accrued\tpurchases\tprimarily\treflects\treceipts\tof\tgoods\tand\tservices\tfor\twhich\twe\thad\tnot\tyet\tbeen\tinvoiced.\tAs\twe\tare\tinvoiced\tfor\tthese\tgoods\tand\nservices,\tthis\tbalance\twill\treduce\tand\taccounts\tpayable\twill\tincrease.\n(2)Taxes\tpayable\tincludes\tvalue\tadded\ttax,\tincome\ttax,\tsales\ttax,\tproperty\ttax\tand\tuse\ttax\tpayables.\nNote\t10\t–\tOther\tLong-Term\tLiabilities\nOur\tother\tlong-term\tliabilities\tconsisted\tof\tthe\tfollowing\t(in\tmillions):\nDecember\t31,\n2023\nDecember\t31,\n2022\nOperating\tlease\tliabilities$3,671\t$2,164\t\nAccrued\twarranty\treserve3,606\t2,480\t\nOther\tnon-current\tliabilities876\t686\t\nTotal\tother\tlong-term\tliabilities\n$8,153\t$5,330\t\nNote\t11\t–\tDebt\nThe\tfollowing\tis\ta\tsummary\tof\tour\tdebt\tand\tfinance\tleases\tas\tof\tDecember\t31,\t2023\t(in\tmillions):\n\tNet\tCarrying\tValueUnpaid\nPrincipal\nBalance\nUnused\nCommitted\nAmount\t(1)\nContractual\nInterest\tRates\nContractual\nMaturity\tDate\tCurrentLong-Term\nRecourse\tdebt:\t\t\t\n2024\tNotes$37\t$—\t$37\t$—\t2.00\t%May\t2024\nRCF\tCredit\tAgreement—\t—\t—\t5,000\tNot\tapplicableJanuary\t2028\nSolar\tBonds—\t7\t7\t—\t4.70-5.75%March\t2025\t-\tJanuary\t2031\nOther—\t—\t—\t28\tNot\tapplicableDecember\t2026\nTotal\trecourse\tdebt37\t7\t44\t5,028\t\nNon-recourse\tdebt:\nAutomotive\tAsset-backed\tNotes1,906\t2,337\t4,259\t—\t0.60-6.57%July\t2024-May\t2031\nSolar\tAsset-backed\tNotes4\t8\t13\t—\t4.80\t%December\t2026\nCash\tEquity\tDebt28\t330\t367\t—\t5.25-5.81%July\t2033-January\t2035\nTotal\tnon-recourse\tdebt1,938\t2,675\t4,639\t—\t\nTotal\tdebt1,975\t2,682\t\n$4,683\t$5,028\t\nFinance\tleases398\t175\t\nTotal\tdebt\tand\tfinance\tleases", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 76, "lines": { "from": 1, "to": 57 } } } }, { "pageContent": "Total\tdebt\tand\tfinance\tleases\n$2,373\t$2,857\t\n74", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 76, "lines": { "from": 57, "to": 59 } } } }, { "pageContent": "The\tfollowing\tis\ta\tsummary\tof\tour\tdebt\tand\tfinance\tleases\tas\tof\tDecember\t31,\t2022\t(in\tmillions):\nNet\tCarrying\tValueUnpaid\nPrincipal\nBalance\nUnused\nCommitted\nAmount\t(2)\nContractual\nInterest\tRates\nContractual\nMaturity\tDateCurrentLong-Term\nRecourse\tdebt:\t\t\t\n2024\tNotes$—\t$37\t$37\t$—\t2.00\t%May\t2024\nCredit\tAgreement—\t—\t—\t2,266\tNot\tapplicableJuly\t2023\nSolar\tBonds—\t7\t7\t—\t4.70-5.75%March\t2025\t-\tJanuary\t2031\nTotal\trecourse\tdebt—\t44\t44\t2,266\t\nNon-recourse\tdebt:\nAutomotive\tAsset-backed\tNotes984\t613\t1,603\t—\t0.36-4.64%December\t2023-September\t2025\nSolar\tAsset-backed\tNotes4\t13\t17\t—\t4.80\t%December\t2026\nCash\tEquity\tDebt28\t359\t397\t—\t5.25-5.81%July\t2033-January\t2035\nAutomotive\tLease-backed\tCredit\tFacilities—\t—\t—\t151\tNot\tapplicableSeptember\t2024\nTotal\tnon-recourse\tdebt1,016\t985\t2,017\t151\t\nTotal\tdebt1,016\t1,029\t\n$2,061\t$2,417\t\nFinance\tleases486\t568\t\nTotal\tdebt\tand\tfinance\tleases\n$1,502\t$1,597\t\n(1)There\tare\tno\trestrictions\ton\tdraw-down\tor\tuse\tfor\tgeneral\tcorporate\tpurposes\twith\trespect\tto\tany\tavailable\tcommitted\tfunds\tunder\tour\tRCF\tCredit\nAgreement,\texcept\tcertain\tspecified\tconditions\tprior\tto\tdraw-down.\tRefer\tto\tthe\tsection\tbelow\tfor\tthe\tterms\tof\tthe\tfacility.\n(2)There\twere\tno\trestrictions\ton\tdraw-down\tor\tuse\tfor\tgeneral\tcorporate\tpurposes\twith\trespect\tto\tany\tavailable\tcommitted\tfunds\tunder\tour\tcredit\nfacilities,\texcept\tcertain\tspecified\tconditions\tprior\tto\tdraw-down,\tincluding\tpledging\tto\tour\tlenders\tsufficient\tamounts\tof\tqualified\treceivables,\ninventories,\tleased\tvehicles\tand\tour\tinterests\tin\tthose\tleases\tor\tvarious\tother\tassets\tas\tdescribed\tbelow.\nRecourse\tdebt\trefers\tto\tdebt\tthat\tis\trecourse\tto\tour\tgeneral\tassets.\tNon-recourse\tdebt\trefers\tto\tdebt\tthat\tis\trecourse\tto\tonly\tassets\tof\tour\nsubsidiaries.\tThe\tdifferences\tbetween\tthe\tunpaid\tprincipal\tbalances\tand\tthe\tnet\tcarrying\tvalues\tare\tdue\tto\tdebt\tdiscounts\tor\tdeferred\tissuance\tcosts.\tAs\nof\tDecember\t31,\t2023,\twe\twere\tin\tmaterial\tcompliance\twith\tall\tfinancial\tdebt\tcovenants.\n2024\tNotes", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 77, "lines": { "from": 1, "to": 36 } } } }, { "pageContent": "2024\tNotes\nThe\tclosing\tprice\tof\tour\tcommon\tstock\tcontinued\tto\texceed\t130%\tof\tthe\tapplicable\tconversion\tprice\tof\tour\t2024\tNotes\ton\tat\tleast\t20\tof\tthe\tlast\t30\nconsecutive\ttrading\tdays\tof\teach\tquarter\tin\t2023,\tcausing\tthe\t2024\tNotes\tto\tbe\tconvertible\tby\ttheir\tholders\tin\tthe\tsubsequent\tquarter.\tAs\tof\tDecember\n31,\t2023,\tthe\tif-converted\tvalue\tof\tthe\tnotes\texceeds\tthe\toutstanding\tprincipal\tamount\tby\t$406\tmillion.\tUpon\tconversion,\tthe\t2024\tNotes\twill\tbe\tsettled\nin\tcash,\tshares\tof\tour\tcommon\tstock\tor\ta\tcombination\tthereof,\tat\tour\telection.\nCredit\tAgreement\nIn\tJune\t2015,\twe\tentered\tinto\ta\tsenior\tasset-based\trevolving\tcredit\tagreement\t(as\tamended\tfrom\ttime\tto\ttime,\tthe\t“Credit\tAgreement”)\twith\ta\nsyndicate\tof\tbanks.\tBorrowed\tfunds\tbear\tinterest,\tat\tour\toption,\tat\tan\tannual\trate\tof\t(a)\t1%\tplus\tLIBOR\tor\t(b)\tthe\thighest\tof\t(i)\tthe\tfederal\tfunds\trate\tplus\n0.50%,\t(ii)\tthe\tlenders’\t“prime\trate”\tor\t(iii)\t1%\tplus\tLIBOR.\tThe\tfee\tfor\tundrawn\tamounts\tis\t0.25%\tper\tannum.\tThe\tCredit\tAgreement\tis\tsecured\tby\tcertain\nof\tour\taccounts\treceivable,\tinventory\tand\tequipment.\tAvailability\tunder\tthe\tCredit\tAgreement\tis\tbased\ton\tthe\tvalue\tof\tsuch\tassets,\tas\treduced\tby\tcertain\nreserves.\nIn\tJanuary\t2023,\twe\tentered\tinto\ta\t5-year\tsenior\tunsecured\trevolving\tcredit\tfacility\t(the\t“RCF\tCredit\tAgreement”)\twith\ta\tsyndicate\tof\tbanks\tto\nreplace\tthe\texisting\tCredit\tAgreement,\twhich\twas\tterminated.\tThe\tRCF\tCredit\tAgreement\tcontains\ttwo\toptional\tone-year\textensions\tand\thas\ta\ttotal\ncommitment\tof\tup\tto\t$5.00\tbillion,\twhich\tcould\tbe\tincreased\tup\tto\t$7.00\tbillion\tunder\tcertain\tcircumstances.\tThe\tunderlying\tborrowings\tmay\tbe\tused\tfor\ngeneral\tcorporate\tpurposes.\tBorrowed\tfunds\taccrue\tinterest\tat\ta\tvariable\trate\tequal\tto:\t(i)\tfor\tdollar-denominated\tloans,\tat\tour\telection,\t(a)\tTerm\tSOFR\n(the\tforward-looking\tsecured\tovernight\tfinancing\trate)\tplus\t0.10%,\tor\t(b)\tan\talternate\tbase\trate;\t(ii)\tfor\tloans\tdenominated\tin\tpounds\tsterling,\tSONIA\t(the", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 77, "lines": { "from": 36, "to": 51 } } } }, { "pageContent": "sterling\tovernight\tindex\taverage\treference\trate);\tor\t(iii)\tfor\tloans\tdenominated\tin\teuros,\tan\tadjusted\tEURIBOR\t(euro\tinterbank\toffered\trate);\tin\teach\tcase,\nplus\tan\tapplicable\tmargin.\tThe\tapplicable\tmargin\twill\tbe\tbased\ton\tthe\trating\tassigned\tto\tour\tsenior,\tunsecured\tlong-term\tindebtedness\t(the\t“Credit\nRating”)\tfrom\ttime\tto\ttime.\tThe\tfee\tfor\tundrawn\tamounts\tis\tvariable\tbased\ton\tthe\tCredit\tRating\tand\tis\tcurrently\t0.125%\tper\tannum.\n75", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 77, "lines": { "from": 52, "to": 55 } } } }, { "pageContent": "Automotive\tAsset-backed\tNotes\nFrom\ttime\tto\ttime,\twe\ttransfer\treceivables\tand/or\tbeneficial\tinterests\trelated\tto\tcertain\tvehicles\t(either\tleased\tor\tfinanced)\tinto\tspecial\tpurpose\nentities\t(“SPEs”)\tand\tissue\tAutomotive\tAsset-backed\tNotes,\tbacked\tby\tthese\tautomotive\tassets\tto\tinvestors.\tThe\tSPEs\tare\tconsolidated\tin\tthe\tfinancial\nstatements.\tThe\tcash\tflows\tgenerated\tby\tthese\tautomotive\tassets\tare\tused\tto\tservice\tthe\tprincipal\tand\tinterest\tpayments\ton\tthe\tAutomotive\tAsset-\nbacked\tNotes\tand\tsatisfy\tthe\tSPEs’\texpenses,\tand\tany\tremaining\tcash\tis\tdistributed\tto\tthe\towners\tof\tthe\tSPEs.\tWe\trecognize\trevenue\tearned\tfrom\tthe\nassociated\tcustomer\tlease\tor\tfinancing\tcontracts\tin\taccordance\twith\tour\trevenue\trecognition\tpolicy.\tThe\tSPEs’\tassets\tand\tcash\tflows\tare\tnot\tavailable\tto\nour\tother\tcreditors,\tand\tthe\tcreditors\tof\tthe\tSPEs,\tincluding\tthe\tAutomotive\tAsset-backed\tNote\tholders,\thave\tno\trecourse\tto\tour\tother\tassets.\nIn\t2023,\twe\ttransferred\tbeneficial\tinterests\trelated\tto\tcertain\tleased\tvehicles\tand\tfinancing\treceivables\tinto\tSPEs\tand\tissued\t$3.93\tbillion\tin\naggregate\tprincipal\tamount\tof\tAutomotive\tAsset-backed\tNotes,\twith\tterms\tsimilar\tto\tour\tother\tpreviously\tissued\tAutomotive\tAsset-backed\tNotes.\tThe\nproceeds\tfrom\tthe\tissuance,\tnet\tof\tdebt\tissuance\tcosts,\twere\t$3.92\tbillion.\nCash\tEquity\tDebt\nIn\tconnection\twith\tthe\tcash\tequity\tfinancing\tdeals\tclosed\tin\t2016,\tour\tsubsidiaries\tissued\t$502\tmillion\tin\taggregate\tprincipal\tamount\tof\tdebt\tthat\nbears\tinterest\tat\tfixed\trates.\tThis\tdebt\tis\tsecured\tby,\tamong\tother\tthings,\tour\tinterests\tin\tcertain\tfinancing\tfunds\tand\tis\tnon-recourse\tto\tour\tother\tassets.\nAutomotive\tLease-backed\tCredit\tFacilities\nIn\tthe\tthird\tquarter\tof\t2023,\twe\tterminated\tour\tAutomotive\tLease-backed\tCredit\tFacilities\tand\tthe\tpreviously\tcommitted\tfunds\tare\tno\tlonger\navailable\tfor\tfuture\tborrowings.\nPledged\tAssets\nAs\tof\tDecember\t31,\t2023\tand\t2022,\twe\thad\tpledged\tor\trestricted\t$4.64\tbillion\tand\t$2.02\tbillion\tof\tour\tassets\t(consisting\tprincipally\tof\toperating", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 78, "lines": { "from": 1, "to": 18 } } } }, { "pageContent": "lease\tvehicles,\tfinancing\treceivables,\trestricted\tcash,\tand\tequity\tinterests\tin\tcertain\tSPEs)\tas\tcollateral\tfor\tour\toutstanding\tdebt.\nSchedule\tof\tPrincipal\tMaturities\tof\tDebt\nThe\tfuture\tscheduled\tprincipal\tmaturities\tof\tdebt\tas\tof\tDecember\t31,\t2023\twere\tas\tfollows\t(in\tmillions):\nRecourse\tdebtNon-recourse\tdebtTotal\n2024\n$37\t$1,941\t$1,978\t\n20254\t1,663\t1,667\t\n2026—\t494\t494\t\n2027—\t276\t276\t\n2028—\t44\t44\t\nThereafter3\t221\t224\t\nTotal\n$44\t$4,639\t$4,683\t\nNote\t12\t–\tLeases\nWe\thave\tentered\tinto\tvarious\toperating\tand\tfinance\tlease\tagreements\tfor\tcertain\tof\tour\toffices,\tmanufacturing\tand\twarehouse\tfacilities,\tretail\tand\nservice\tlocations,\tdata\tcenters,\tequipment,\tvehicles,\tand\tsolar\tenergy\tsystems,\tworldwide.\tWe\tdetermine\tif\tan\tarrangement\tis\ta\tlease,\tor\tcontains\ta\nlease,\tat\tinception\tand\trecord\tthe\tleases\tin\tour\tfinancial\tstatements\tupon\tlease\tcommencement,\twhich\tis\tthe\tdate\twhen\tthe\tunderlying\tasset\tis\tmade\navailable\tfor\tuse\tby\tthe\tlessor.\nWe\thave\tlease\tagreements\twith\tlease\tand\tnon-lease\tcomponents,\tand\thave\telected\tto\tutilize\tthe\tpractical\texpedient\tto\taccount\tfor\tlease\tand\tnon-\nlease\tcomponents\ttogether\tas\ta\tsingle\tcombined\tlease\tcomponent,\tfrom\tboth\ta\tlessee\tand\tlessor\tperspective\twith\tthe\texception\tof\tdirect\tsales-type\nleases\tand\tproduction\tequipment\tclasses\tembedded\tin\tsupply\tagreements.\tFrom\ta\tlessor\tperspective,\tthe\ttiming\tand\tpattern\tof\ttransfer\tare\tthe\tsame\tfor\nthe\tnon-lease\tcomponents\tand\tassociated\tlease\tcomponent\tand,\tthe\tlease\tcomponent,\tif\taccounted\tfor\tseparately,\twould\tbe\tclassified\tas\tan\toperating\nlease.\n76", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 78, "lines": { "from": 19, "to": 42 } } } }, { "pageContent": "We\thave\telected\tnot\tto\tpresent\tshort-term\tleases\ton\tthe\tconsolidated\tbalance\tsheet\tas\tthese\tleases\thave\ta\tlease\tterm\tof\t12\tmonths\tor\tless\tat\tlease\ninception\tand\tdo\tnot\tcontain\tpurchase\toptions\tor\trenewal\tterms\tthat\twe\tare\treasonably\tcertain\tto\texercise.\tAll\tother\tlease\tassets\tand\tlease\tliabilities\tare\nrecognized\tbased\ton\tthe\tpresent\tvalue\tof\tlease\tpayments\tover\tthe\tlease\tterm\tat\tcommencement\tdate.\tBecause\tmost\tof\tour\tleases\tdo\tnot\tprovide\tan\nimplicit\trate\tof\treturn,\twe\tused\tour\tincremental\tborrowing\trate\tbased\ton\tthe\tinformation\tavailable\tat\tlease\tcommencement\tdate\tin\tdetermining\tthe\npresent\tvalue\tof\tlease\tpayments.\nOur\tleases,\twhere\twe\tare\tthe\tlessee,\toften\tinclude\toptions\tto\textend\tthe\tlease\tterm\tfor\tup\tto\t10\tyears.\tSome\tof\tour\tleases\talso\tinclude\toptions\tto\nterminate\tthe\tlease\tprior\tto\tthe\tend\tof\tthe\tagreed\tupon\tlease\tterm.\tFor\tpurposes\tof\tcalculating\tlease\tliabilities,\tlease\tterms\tinclude\toptions\tto\textend\tor\nterminate\tthe\tlease\twhen\tit\tis\treasonably\tcertain\tthat\twe\twill\texercise\tsuch\toptions.\nLease\texpense\tfor\toperating\tleases\tis\trecognized\ton\ta\tstraight-line\tbasis\tover\tthe\tlease\tterm\tas\tcost\tof\trevenues\tor\toperating\texpenses\tdepending\non\tthe\tnature\tof\tthe\tleased\tasset.\tCertain\toperating\tleases\tprovide\tfor\tannual\tincreases\tto\tlease\tpayments\tbased\ton\tan\tindex\tor\trate.\tWe\tcalculate\tthe\npresent\tvalue\tof\tfuture\tlease\tpayments\tbased\ton\tthe\tindex\tor\trate\tat\tthe\tlease\tcommencement\tdate\tfor\tnew\tleases.\tDifferences\tbetween\tthe\tcalculated\nlease\tpayment\tand\tactual\tpayment\tare\texpensed\tas\tincurred.\tAmortization\tof\tfinance\tlease\tassets\tis\trecognized\tover\tthe\tlease\tterm\tas\tcost\tof\trevenues\nor\toperating\texpenses\tdepending\ton\tthe\tnature\tof\tthe\tleased\tasset.\tInterest\texpense\ton\tfinance\tlease\tliabilities\tis\trecognized\tover\tthe\tlease\tterm\twithin\nInterest\texpense\tin\tthe\tconsolidated\tstatements\tof\toperations.\nThe\tbalances\tfor\tthe\toperating\tand\tfinance\tleases\twhere\twe\tare\tthe\tlessee\tare\tpresented\tas\tfollows\t(in\tmillions)\twithin\tour\tconsolidated\tbalance\nsheets:", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 79, "lines": { "from": 1, "to": 16 } } } }, { "pageContent": "sheets:\nDecember\t31,\t2023December\t31,\t2022\nOperating\tleases:\n\t\t\nOperating\tlease\tright-of-use\tassets$4,180\t$2,563\t\n\t\nAccrued\tliabilities\tand\tother$672\t$485\t\nOther\tlong-term\tliabilities3,671\t2,164\t\nTotal\toperating\tlease\tliabilities\n$4,343\t$2,649\t\n\t\nFinance\tleases:\t\t\nSolar\tenergy\tsystems,\tnet$23\t$25\t\nProperty,\tplant\tand\tequipment,\tnet601\t1,094\t\nTotal\tfinance\tlease\tassets\n$624\t$1,119\t\n\t\nCurrent\tportion\tof\tlong-term\tdebt\tand\tfinance\tleases$398\t$486\t\nLong-term\tdebt\tand\tfinance\tleases,\tnet\tof\tcurrent\tportion175\t568\t\nTotal\tfinance\tlease\tliabilities\n$573\t$1,054\t\n77", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 79, "lines": { "from": 16, "to": 37 } } } }, { "pageContent": "The\tcomponents\tof\tlease\texpense\tare\tas\tfollows\t(in\tmillions)\twithin\tour\tconsolidated\tstatements\tof\toperations:\nYear\tEnded\tDecember\t31,\n202320222021\nOperating\tlease\texpense:\t\t\t\nOperating\tlease\texpense\t(1)$1,153\t$798\t$627\t\n\t\nFinance\tlease\texpense:\nAmortization\tof\tleased\tassets$506\t$493\t$415\t\nInterest\ton\tlease\tliabilities45\t72\t89\t\nTotal\tfinance\tlease\texpense$551\t$565\t$504\t\n\t\nTotal\tlease\texpense\n$1,704\t$1,363\t$1,131\t\n(1)Includes\tshort-term\tleases\tand\tvariable\tlease\tcosts,\twhich\tare\timmaterial.\nOther\tinformation\trelated\tto\tleases\twhere\twe\tare\tthe\tlessee\tis\tas\tfollows:\nDecember\t31,\t2023December\t31,\t2022\nWeighted-average\tremaining\tlease\tterm:\nOperating\tleases7.4\tyears6.4\tyears\nFinance\tleases2.3\tyears3.1\tyears\n\t\nWeighted-average\tdiscount\trate:\nOperating\tleases5.6\t%5.3\t%\nFinance\tleases5.5\t%5.7\t%\nSupplemental\tcash\tflow\tinformation\trelated\tto\tleases\twhere\twe\tare\tthe\tlessee\tis\tas\tfollows\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nCash\tpaid\tfor\tamounts\tincluded\tin\tthe\tmeasurement\tof\tlease\tliabilities:\nOperating\tcash\toutflows\tfrom\toperating\tleases$1,084\t$754\t$616\t\nOperating\tcash\toutflows\tfrom\tfinance\tleases\t(interest\tpayments)$47\t$75\t$89\t\nLeased\tassets\tobtained\tin\texchange\tfor\tfinance\tlease\tliabilities$10\t$58\t$486\t\nLeased\tassets\tobtained\tin\texchange\tfor\toperating\tlease\tliabilities$2,170\t$1,059\t$818\t\n78", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 80, "lines": { "from": 1, "to": 32 } } } }, { "pageContent": "As\tof\tDecember\t31,\t2023,\tthe\tmaturities\tof\tour\toperating\tand\tfinance\tlease\tliabilities\t(excluding\tshort-term\tleases)\tare\tas\tfollows\t(in\tmillions):\n\t\nOperating\nLeases\nFinance\nLeases\n2024\n$892\t$418\t\n2025831\t81\t\n2026706\t57\t\n2027603\t38\t\n2028508\t2\t\nThereafter1,820\t4\t\nTotal\tminimum\tlease\tpayments\n5,360\t600\t\nLess:\tInterest1,017\t27\t\nPresent\tvalue\tof\tlease\tobligations\n4,343\t573\t\nLess:\tCurrent\tportion672\t398\t\nLong-term\tportion\tof\tlease\tobligations\n$3,671\t$175\t\nAs\tof\tDecember\t31,\t2023,\twe\thave\texcluded\tfrom\tthe\ttable\tabove\tadditional\toperating\tleases\tthat\thave\tnot\tyet\tcommenced\twith\taggregate\trent\npayments\tof\t$1.53\tbillion.\tThese\toperating\tleases\twill\tcommence\tbetween\tfiscal\tyear\t2024\tand\t2025\twith\tlease\tterms\tof\t2\tyears\tto\t20\tyears.\nOperating\tLease\tand\tSales-type\tLease\tReceivables\nWe\tare\tthe\tlessor\tof\tcertain\tvehicle\tand\tsolar\tenergy\tsystem\tarrangements\tas\tdescribed\tin\tNote\t2,\tSummary\tof\tSignificant\tAccounting\tPolicies.\tAs\tof\nDecember\t31,\t2023,\tmaturities\tof\tour\toperating\tlease\tand\tsales-type\tlease\treceivables\tfrom\tcustomers\tfor\teach\tof\tthe\tnext\tfive\tyears\tand\tthereafter\twere\nas\tfollows\t(in\tmillions):\nOperating\nLeases\nSales-type\nLeases\n2024\n$1,405\t$227\t\n2025960\t214\t\n2026461\t210\t\n2027227\t102\t\n2028197\t25\t\nThereafter1,492\t2\t\nGross\tlease\treceivables\n$4,742\t$780\t\nThe\tabove\ttable\tdoes\tnot\tinclude\tvehicle\tsales\tto\tcustomers\tor\tleasing\tpartners\twith\ta\tresale\tvalue\tguarantee\tas\tthe\tcash\tpayments\twere\treceived\nupfront.\tFor\tour\tsolar\tPPA\tarrangements,\tcustomers\tare\tcharged\tsolely\tbased\ton\tactual\tpower\tproduced\tby\tthe\tinstalled\tsolar\tenergy\tsystem\tat\ta\npredefined\trate\tper\tkilowatt-hour\tof\tpower\tproduced.\tThe\tfuture\tpayments\tfrom\tsuch\tarrangements\tare\tnot\tincluded\tin\tthe\tabove\ttable\tas\tthey\tare\ta\nfunction\tof\tthe\tpower\tgenerated\tby\tthe\trelated\tsolar\tenergy\tsystems\tin\tthe\tfuture.\n79", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 81, "lines": { "from": 1, "to": 45 } } } }, { "pageContent": "Net\tInvestment\tin\tSales-type\tLeases\nNet\tinvestment\tin\tsales-type\tleases,\twhich\tis\tthe\tsum\tof\tthe\tpresent\tvalue\tof\tthe\tfuture\tcontractual\tlease\tpayments,\tis\tpresented\ton\tthe\nconsolidated\tbalance\tsheets\tas\ta\tcomponent\tof\tPrepaid\texpenses\tand\tother\tcurrent\tassets\tfor\tthe\tcurrent\tportion\tand\tas\tOther\tnon-current\tassets\tfor\tthe\nlong-term\tportion.\tLease\treceivables\trelating\tto\tsales-type\tleases\tare\tpresented\ton\tthe\tconsolidated\tbalance\tsheets\tas\tfollows\t(in\tmillions):\nDecember\t31,\t2023December\t31,\t2022\nGross\tlease\treceivables\n$780\t$837\t\nUnearned\tinterest\tincome(78)(95)\nAllowance\tfor\texpected\tcredit\tlosses(6)(4)\nNet\tinvestment\tin\tsales-type\tleases\n$696\t$738\t\n\t\nReported\tas:\nPrepaid\texpenses\tand\tother\tcurrent\tassets$189\t$164\t\nOther\tnon-current\tassets507\t574\t\nNet\tinvestment\tin\tsales-type\tleases\n$696\t$738\t\nLease\tPass-Through\tFinancing\tObligation\nAs\tof\tDecember\t31,\t2023,\twe\thave\tfive\ttransactions\treferred\tto\tas\t“lease\tpass-through\tfund\tarrangements.”\tUnder\tthese\tarrangements,\tour\twholly\nowned\tsubsidiaries\tfinance\tthe\tcost\tof\tsolar\tenergy\tsystems\twith\tinvestors\tthrough\tarrangements\tcontractually\tstructured\tas\tmaster\tleases\tfor\tan\tinitial\nterm\tranging\tbetween\t10\tand\t25\tyears.\tThese\tsolar\tenergy\tsystems\tare\tsubject\tto\tlease\tor\tPPAs\twith\tcustomers\twith\tan\tinitial\tterm\tnot\texceeding\t25\nyears.\nUnder\ta\tlease\tpass-through\tfund\tarrangement,\tthe\tinvestor\tmakes\ta\tlarge\tupfront\tpayment\tto\tthe\tlessor,\twhich\tis\tone\tof\tour\tsubsidiaries,\tand\tin\nsome\tcases,\tsubsequent\tperiodic\tpayments.\tAs\tof\tDecember\t31,\t2023,\tthe\tfuture\tminimum\tmaster\tlease\tpayments\tto\tbe\treceived\tfrom\tinvestors,\tfor\neach\tof\tthe\tnext\tfive\tyears\tand\tthereafter,\twere\tas\tfollows\t(in\tmillions):\n2024$18\t\n202527\t\n202628\t\n202729\t\n202829\t\nThereafter337\t\nTotal\n$468\t\nNote\t13\t–\tEquity\tIncentive\tPlans\nIn\tJune\t2019,\twe\tadopted\tthe\t2019\tEquity\tIncentive\tPlan\t(the\t“2019\tPlan”).\tThe\t2019\tPlan\tprovides\tfor\tthe\tgrant\tof\tstock\toptions,\trestricted\tstock,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 82, "lines": { "from": 1, "to": 35 } } } }, { "pageContent": "RSUs,\tstock\tappreciation\trights,\tperformance\tunits\tand\tperformance\tshares\tto\tour\temployees,\tdirectors\tand\tconsultants.\tStock\toptions\tgranted\tunder\tthe\n2019\tPlan\tmay\tbe\teither\tincentive\tstock\toptions\tor\tnonstatutory\tstock\toptions.\tIncentive\tstock\toptions\tmay\tonly\tbe\tgranted\tto\tour\temployees.\nNonstatutory\tstock\toptions\tmay\tbe\tgranted\tto\tour\temployees,\tdirectors\tand\tconsultants.\tGenerally,\tour\tstock\toptions\tand\tRSUs\tvest\tover\tfour\tyears\tand\nour\tstock\toptions\tare\texercisable\tover\ta\tmaximum\tperiod\tof\t10\tyears\tfrom\ttheir\tgrant\tdates.\tVesting\ttypically\tterminates\twhen\tthe\temployment\tor\nconsulting\trelationship\tends.\nAs\tof\tDecember\t31,\t2023,\t131.1\tmillion\tshares\twere\treserved\tand\tavailable\tfor\tissuance\tunder\tthe\t2019\tPlan.\n80", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 82, "lines": { "from": 36, "to": 42 } } } }, { "pageContent": "The\tfollowing\ttable\tsummarizes\tour\tstock\toption\tand\tRSU\tactivity\tfor\tthe\tyear\tended\tDecember\t31,\t2023:\nStock\tOptionsRSUs\nNumber\tof\nOptions\n(in\tthousands)\nWeighted-\nAverage\nExercise\nPrice\nWeighted-\nAverage\nRemaining\nContractual\nLife\t(years)\nAggregate\nIntrinsic\nValue\n(in\tbillions)\nNumber\nof\tRSUs\n(in\tthousands)\nWeighted-\nAverage\nGrant\nDate\tFair\nValue\nBeginning\tof\tperiod\n343,564$30.65\t21,333$162.32\t\nGranted9,521$226.50\t11,743$228.33\t\nExercised\tor\treleased(7,626)$43.07\t(11,085)$116.47\t\nCancelled(1,438)$194.23\t(2,903)$192.22\t\nEnd\tof\tperiod\n344,021\n$35.11\t4.31$73.57\t\n19,088\n$225.01\t\nVested\tand\texpected\tto\tvest,\tDecember\t31,\t2023\n340,884$33.38\t4.27$73.45\t18,446$225.76\t\nExercisable\tand\tvested,\tDecember\t31,\t2023329,124$27.07\t4.11$72.90\t\nThe\tweighted-average\tgrant\tdate\tfair\tvalue\tof\tRSUs\tgranted\tin\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021\twas\t$228.33,\t$239.85\tand\n$261.33,\trespectively.\tThe\taggregate\trelease\tdate\tfair\tvalue\tof\tRSUs\tin\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021\twas\t$2.50\tbillion,\t$4.32\nbillion\tand\t$5.70\tbillion,\trespectively.\nThe\taggregate\tintrinsic\tvalue\tof\toptions\texercised\tin\tthe\tyears\tended\tDecember\t31,\t2023,\t2022,\tand\t2021\twas\t$1.33\tbillion,\t$1.90\tbillion\tand\n$26.88\tbillion,\trespectively.\tDuring\tthe\tyear\tended\tDecember\t31,\t2021,\tour\tCEO\texercised\tall\tof\tthe\tremaining\tvested\toptions\tfrom\tthe\t2012\tCEO\nPerformance\tAward,\twhich\tamounted\tto\tan\tintrinsic\tvalue\tof\t$23.45\tbillion.\nESPP\nOur\temployees\tare\teligible\tto\tpurchase\tour\tcommon\tstock\tthrough\tpayroll\tdeductions\tof\tup\tto\t15%\tof\ttheir\teligible\tcompensation,\tsubject\tto\tany\nplan\tlimitations.\tThe\tpurchase\tprice\twould\tbe\t85%\tof\tthe\tlower\tof\tthe\tfair\tmarket\tvalue\ton\tthe\tfirst\tand\tlast\ttrading\tdays\tof\teach\tsix-month\toffering\nperiod.\tDuring\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021,\tunder\tthe\tESPP\twe\tissued\t2.1\tmillion,\t1.4\tmillion\tand\t1.5\tmillion\tshares,\trespectively.\nAs\tof\tDecember\t31,\t2023,\tthere\twere\t97.8\tmillion\tshares\tavailable\tfor\tissuance\tunder\tthe\tESPP.\nFair\tValue\tAssumptions", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 83, "lines": { "from": 1, "to": 51 } } } }, { "pageContent": "Fair\tValue\tAssumptions\nWe\tuse\tthe\tfair\tvalue\tmethod\tin\trecognizing\tstock-based\tcompensation\texpense.\tUnder\tthe\tfair\tvalue\tmethod,\twe\testimate\tthe\tfair\tvalue\tof\teach\nstock\toption\taward\twith\tservice\tor\tservice\tand\tperformance\tconditions\tand\tthe\tESPP\ton\tthe\tgrant\tdate\tgenerally\tusing\tthe\tBlack-Scholes\toption\tpricing\nmodel.\tThe\tweighted-average\tassumptions\tused\tin\tthe\tBlack-Scholes\tmodel\tfor\tstock\toptions\tare\tas\tfollows:\nYear\tEnded\tDecember\t31,\n202320222021\nRisk-free\tinterest\trate\n3.90\t%3.11\t%0.66\t%\nExpected\tterm\t(in\tyears)4.54.14.3\nExpected\tvolatility63\t%63\t%59\t%\nDividend\tyield0.0\t%0.0\t%0.0\t%\nGrant\tdate\tfair\tvalue\tper\tshare$121.62\t$114.51\t$128.02\t\nThe\tfair\tvalue\tof\tRSUs\twith\tservice\tor\tservice\tand\tperformance\tconditions\tis\tmeasured\ton\tthe\tgrant\tdate\tbased\ton\tthe\tclosing\tfair\tmarket\tvalue\tof\nour\tcommon\tstock.\tThe\trisk-free\tinterest\trate\tis\tbased\ton\tthe\tU.S.\tTreasury\tyield\tfor\tzero-coupon\tU.S.\tTreasury\tnotes\twith\tmaturities\tapproximating\teach\ngrant’s\texpected\tlife.\tWe\tuse\tour\thistorical\tdata\tin\testimating\tthe\texpected\tterm\tof\tour\temployee\tgrants.\tThe\texpected\tvolatility\tis\tbased\ton\tthe\taverage\nof\tthe\timplied\tvolatility\tof\tpublicly\ttraded\toptions\tfor\tour\tcommon\tstock\tand\tthe\thistorical\tvolatility\tof\tour\tcommon\tstock.\n81", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 83, "lines": { "from": 51, "to": 67 } } } }, { "pageContent": "2018\tCEO\tPerformance\tAward\nIn\tMarch\t2018,\tour\tstockholders\tapproved\tthe\tBoard\tof\tDirectors’\tgrant\tof\t304.0\tmillion\tstock\toption\tawards,\tas\tadjusted\tto\tgive\teffect\tto\tthe\t2020\nStock\tSplit\tand\tthe\t2022\tStock\tSplit,\tto\tour\tCEO\t(the\t“2018\tCEO\tPerformance\tAward”).\tThe\t2018\tCEO\tPerformance\tAward\tconsisted\tof\t12\tvesting\ntranches\twith\ta\tvesting\tschedule\tbased\tentirely\ton\tthe\tattainment\tof\tboth\toperational\tmilestones\t(performance\tconditions)\tand\tmarket\tconditions,\nassuming\tcontinued\temployment\teither\tas\tthe\tCEO\tor\tas\tboth\tExecutive\tChairman\tand\tChief\tProduct\tOfficer\tand\tservice\tthrough\teach\tvesting\tdate.\tEach\nof\tthe\t12\tvesting\ttranches\tof\tthe\t2018\tCEO\tPerformance\tAward\tvested\tupon\tcertification\tby\tthe\tBoard\tof\tDirectors\tthat\tboth\t(i)\tthe\tmarket\tcapitalization\nmilestone\tfor\tsuch\ttranche,\twhich\tbegan\tat\t$100.0\tbillion\tfor\tthe\tfirst\ttranche\tand\tincreases\tby\tincrements\tof\t$50.0\tbillion\tthereafter\t(based\ton\tboth\ta\tsix\ncalendar\tmonth\ttrailing\taverage\tand\ta\t30\tcalendar\tday\ttrailing\taverage,\tcounting\tonly\ttrading\tdays),\thad\tbeen\tachieved,\tand\t(ii)\tany\tone\tof\tthe\tfollowing\neight\toperational\tmilestones\tfocused\ton\ttotal\trevenue\tor\tany\tone\tof\tthe\teight\toperational\tmilestones\tfocused\ton\tAdjusted\tEBITDA\thad\tbeen\tachieved\tfor\nthe\tfour\tconsecutive\tfiscal\tquarters\ton\tan\tannualized\tbasis\tand\tsubsequently\treported\tby\tus\tin\tour\tconsolidated\tfinancial\tstatements\tfiled\twith\tour\tForms\n10-Q\tand/or\t10-K.\tAdjusted\tEBITDA\twas\tdefined\tas\tnet\tincome\t(loss)\tattributable\tto\tcommon\tstockholders\tbefore\tinterest\texpense,\tprovision\t(benefit)\tfor\nincome\ttaxes,\tdepreciation\tand\tamortization\tand\tstock-based\tcompensation.\tUpon\tvesting\tand\texercise,\tincluding\tthe\tpayment\tof\tthe\texercise\tprice\tof\n$23.34\tper\tshare\tas\tadjusted\tto\tgive\teffect\tto\tthe\t2020\tStock\tSplit\tand\tthe\t2022\tStock\tSplit,\tour\tCEO\tmust\thold\tshares\tthat\the\tacquires\tfor\tfive\tyears\npost-exercise,\tother\tthan\ta\tcashless\texercise\twhere\tshares\tare\tsimultaneously\tsold\tto\tpay\tfor\tthe\texercise\tprice\tand\tany\trequired\ttax\twithholding.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 84, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "The\tachievement\tstatus\tof\tthe\toperational\tmilestones\tas\tof\tDecember\t31,\t2023\tis\tprovided\tbelow.\nTotal\tAnnualized\tRevenueAnnualized\tAdjusted\tEBITDA\nMilestone\n(in\tbillions)Achievement\tStatus\nMilestone\n(in\tbillions)Achievement\tStatus\n$20.0\tAchieved$1.5\tAchieved\n$35.0\tAchieved$3.0\tAchieved\n$55.0\tAchieved$4.5\tAchieved\n$75.0\tAchieved$6.0\tAchieved\n$100.0\t-$8.0\tAchieved\n$125.0\t-$10.0\tAchieved\n$150.0\t-$12.0\tAchieved\n$175.0\t-$14.0\tAchieved\nStock-based\tcompensation\tunder\tthe\t2018\tCEO\tPerformance\tAward\trepresented\ta\tnon-cash\texpense\tand\twas\trecorded\tas\ta\tSelling,\tgeneral,\tand\nadministrative\toperating\texpense\tin\tour\tconsolidated\tstatements\tof\toperations.\tIn\teach\tquarter\tsince\tthe\tgrant\tof\tthe\t2018\tCEO\tPerformance\tAward,\twe\nhad\trecognized\texpense,\tgenerally\ton\ta\tpro-rated\tbasis,\tfor\tonly\tthe\tnumber\tof\ttranches\t(up\tto\tthe\tmaximum\tof\t12\ttranches)\tthat\tcorresponded\tto\tthe\nnumber\tof\toperational\tmilestones\tthat\thad\tbeen\tachieved\tor\thad\tbeen\tdetermined\tprobable\tof\tbeing\tachieved\tin\tthe\tfuture,\tin\taccordance\twith\tthe\nfollowing\tprinciples.\nOn\tthe\tgrant\tdate,\ta\tMonte\tCarlo\tsimulation\twas\tused\tto\tdetermine\tfor\teach\ttranche\t(i)\ta\tfixed\tamount\tof\texpense\tfor\tsuch\ttranche\tand\t(ii)\tthe\nfuture\ttime\twhen\tthe\tmarket\tcapitalization\tmilestone\tfor\tsuch\ttranche\twas\texpected\tto\tbe\tachieved,\tor\tits\t“expected\tmarket\tcapitalization\tmilestone\nachievement\ttime.”\tSeparately,\tbased\ton\ta\tsubjective\tassessment\tof\tour\tfuture\tfinancial\tperformance\teach\tquarter,\twe\tdetermined\twhether\tit\twas\nprobable\tthat\twe\twould\tachieve\teach\toperational\tmilestone\tthat\thad\tnot\tpreviously\tbeen\tachieved\tor\tdeemed\tprobable\tof\tachievement\tand\tif\tso,\tthe\nfuture\ttime\twhen\twe\texpected\tto\tachieve\tthat\toperational\tmilestone,\tor\tits\t“expected\toperational\tmilestone\tachievement\ttime.”\nAs\tof\tDecember\t31,\t2022,\tall\tremaining\tunrecognized\tstock-based\tcompensation\texpense\tunder\tthe\t2018\tCEO\tPerformance\tAward\thad\tbeen", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 84, "lines": { "from": 15, "to": 39 } } } }, { "pageContent": "recognized.\tFor\tthe\tyears\tended\tDecember\t31,\t2022\tand\t2021,\twe\trecorded\tstock-based\tcompensation\texpense\tof\t$66\tmillion\tand\t$910\tmillion,\nrespectively,\trelated\tto\tthe\t2018\tCEO\tPerformance\tAward.\n82", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 84, "lines": { "from": 40, "to": 42 } } } }, { "pageContent": "Other\tPerformance-Based\tGrants\nFrom\ttime\tto\ttime,\tthe\tCompensation\tCommittee\tof\tour\tBoard\tof\tDirectors\tgrants\tcertain\temployees\tperformance-based\tRSUs\tand\tstock\toptions.\nAs\tof\tDecember\t31,\t2023,\twe\thad\tunrecognized\tstock-based\tcompensation\texpense\tof\t$655\tmillion\tunder\tthese\tgrants\tto\tpurchase\tor\treceive\tan\naggregate\t5.3\tmillion\tshares\tof\tour\tcommon\tstock.\tFor\tawards\tprobable\tof\tachievement,\twe\testimate\tthe\tunrecognized\tstock-based\tcompensation\nexpense\tof\t$110\tmillion\twill\tbe\trecognized\tover\ta\tweighted-average\tperiod\tof\t4.0\tyears.\nFor\tthe\tyears\tended\tDecember\t31,\t2023\tand\t2022,\twe\trecorded\t$57\tmillion\tand\t$159\tmillion,\trespectively,\tof\tstock-based\tcompensation\texpense\nrelated\tto\tthese\tgrants,\tnet\tof\tforfeitures.\nSummary\tStock-Based\tCompensation\tInformation\nThe\tfollowing\ttable\tsummarizes\tour\tstock-based\tcompensation\texpense\tby\tline\titem\tin\tthe\tconsolidated\tstatements\tof\toperations\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nCost\tof\trevenues\n$741\t$594\t$421\t\nResearch\tand\tdevelopment689\t536\t448\t\nSelling,\tgeneral\tand\tadministrative382\t430\t1,252\t\nTotal\n$1,812\t$1,560\t$2,121\t\nOur\tincome\ttax\tbenefits\trecognized\tfrom\tstock-based\tcompensation\tarrangements\twere\timmaterial\twhile\twe\twere\tunder\tfull\tvaluation\tallowances\non\tour\tU.S.\tdeferred\ttax\tassets\tduring\tthe\tyears\tended\tDecember\t31,\t2022\tand\t2021.\tWith\tthe\trelease\tof\tthe\tvaluation\tallowance\tassociated\twith\tour\nfederal\tand\tcertain\tstate\tdeferred\ttax\tassets\tin\t2023,\tincome\ttax\tbenefits\trecognized\tfrom\tstock-based\tcompensation\texpense\twere\t$326\tmillion\tduring\nthe\tyear\tended\tDecember\t31,\t2023.\tDuring\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021,\tstock-based\tcompensation\texpense\tcapitalized\tto\tour\nconsolidated\tbalance\tsheets\twas\t$199\tmillion,\t$245\tmillion\tand\t$182\tmillion,\trespectively.\tAs\tof\tDecember\t31,\t2023,\twe\thad\t$4.82\tbillion\tof\ttotal\nunrecognized\tstock-based\tcompensation\texpense\trelated\tto\tnon-performance\tawards,\twhich\twill\tbe\trecognized\tover\ta\tweighted-average\tperiod\tof\t2.8\nyears.\nNote\t14\t–\tIncome\tTaxes", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 85, "lines": { "from": 1, "to": 25 } } } }, { "pageContent": "years.\nNote\t14\t–\tIncome\tTaxes\nOur\tincome\tbefore\t(benefit\tfrom)\tprovision\tfor\tincome\ttaxes\tfor\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021\twas\tas\tfollows\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nDomestic\n$3,196\t$5,524\t$(130)\nNoncontrolling\tinterest\tand\tredeemable\tnoncontrolling\tinterest(23)31\t125\t\nForeign6,800\t8,164\t6,348\t\nIncome\tbefore\tincome\ttaxes\n$9,973\t$13,719\t$6,343\t\n83", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 85, "lines": { "from": 24, "to": 35 } } } }, { "pageContent": "A\t(benefit\tfrom)\tprovision\tfor\tincome\ttaxes\tof\t$(5.00)\tbillion,\t$1.13\tbillion\tand\t$699\tmillion\thas\tbeen\trecognized\tfor\tthe\tyears\tended\tDecember\t31,\n2023,\t2022\tand\t2021,\trespectively.\tThe\tcomponents\tof\tthe\t(benefit\tfrom)\tprovision\tfor\tincome\ttaxes\tfor\tthe\tyears\tended\tDecember\t31,\t2023,\t2022\tand\n2021\tconsisted\tof\tthe\tfollowing\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nCurrent:\nFederal$48\t$—\t$—\t\nState57\t62\t9\t\nForeign1,243\t1,266\t839\t\nTotal\tcurrent\n1,348\t1,328\t848\t\nDeferred:\nFederal(5,246)26\t—\t\nState(653)1\t—\t\nForeign(450)(223)(149)\nTotal\tdeferred\n(6,349)(196)(149)\nTotal\t(Benefit\tfrom)\tprovision\tfor\tincome\ttaxes\n$(5,001)$1,132\t$699\t\nThe\treconciliation\tof\ttaxes\tat\tthe\tfederal\tstatutory\trate\tto\tour\t(benefit\tfrom)\tprovision\tfor\tincome\ttaxes\tfor\tthe\tyears\tended\tDecember\t31,\t2023,\n2022\tand\t2021\twas\tas\tfollows\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nTax\tat\tstatutory\tfederal\trate\n$2,094\t$2,881\t$1,332\t\nState\ttax,\tnet\tof\tfederal\tbenefit(372)51\t6\t\nNondeductible\texecutive\tcompensation23\t14\t201\t\nExcess\ttax\tbenefits\trelated\tto\tstock-based\tcompensation(288)(745)(7,123)\nNontaxable\tmanufacturing\tcredit(101)—\t—\t\nForeign\tincome\trate\tdifferential(816)(923)(668)\nU.S.\ttax\tcredits(593)(276)(328)\nGILTI\tinclusion670\t1,279\t1,008\t\nUnrecognized\ttax\tbenefits183\t252\t28\t\nChange\tin\tvaluation\tallowance(5,962)(1,532)6,165\t\nOther161\t131\t78\t\n(Benefit\tfrom)\tprovision\tfor\tincome\ttaxes\n$(5,001)$1,132\t$699\t\nWe\tmonitor\tthe\trealizability\tof\tour\tdeferred\ttax\tassets\ttaking\tinto\taccount\tall\trelevant\tfactors\tat\teach\treporting\tperiod.\tAs\tof\tDecember\t31,\t2023,\nbased\ton\tthe\trelevant\tweight\tof\tpositive\tand\tnegative\tevidence,\tincluding\tthe\tamount\tof\tour\ttaxable\tincome\tin\trecent\tyears\twhich\tis\tobjective\tand\nverifiable,\tand\tconsideration\tof\tour\texpected\tfuture\ttaxable\tearnings,\twe\tconcluded\tthat\tit\tis\tmore\tlikely\tthan\tnot\tthat\tour\tU.S.\tfederal\tand\tcertain\tstate", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 86, "lines": { "from": 1, "to": 40 } } } }, { "pageContent": "deferred\ttax\tassets\tare\trealizable.\tAs\tsuch,\twe\treleased\t$6.54\tbillion\tof\tour\tvaluation\tallowance\tassociated\twith\tthe\tU.S.\tfederal\tand\tstate\tdeferred\ttax\nassets,\twith\tthe\texception\tof\tour\tCalifornia\tdeferred\ttax\tassets.\tWe\tcontinue\tto\tmaintain\ta\tfull\tvaluation\tallowance\tagainst\tour\tCalifornia\tdeferred\ttax\nassets\tas\tof\tDecember\t31,\t2023,\tbecause\twe\tconcluded\tthey\tare\tnot\tmore\tlikely\tthan\tnot\tto\tbe\trealized\tas\twe\texpect\tour\tCalifornia\tdeferred\ttax\tassets\ngeneration\tin\tfuture\tyears\tto\texceed\tour\tability\tto\tuse\tthese\tdeferred\ttax\tassets.\n84", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 86, "lines": { "from": 41, "to": 45 } } } }, { "pageContent": "Deferred\ttax\tassets\t(liabilities)\tas\tof\tDecember\t31,\t2023\tand\t2022\tconsisted\tof\tthe\tfollowing\t(in\tmillions):\nDecember\t31,\n2023\nDecember\t31,\n2022\nDeferred\ttax\tassets:\nNet\toperating\tloss\tcarry-forwards$2,826\t$4,486\t\nResearch\tand\tdevelopment\tcredits1,358\t1,184\t\nOther\ttax\tcredits\tand\tattributes827\t217\t\nDeferred\trevenue1,035\t751\t\nInventory\tand\twarranty\treserves1,258\t819\t\nStock-based\tcompensation230\t185\t\nOperating\tlease\tright-of-use\tliabilities930\t554\t\nCapitalized\tresearch\tand\tdevelopment\tcosts1,344\t693\t\nDeferred\tGILTI\ttax\tassets760\t466\t\nAccruals\tand\tothers206\t178\t\nTotal\tdeferred\ttax\tassets\n10,774\t9,533\t\nValuation\tallowance(892)(7,349)\nDeferred\ttax\tassets,\tnet\tof\tvaluation\tallowance\n9,882\t2,184\t\nDeferred\ttax\tliabilities:\nDepreciation\tand\tamortization(2,122)(1,178)\nInvestment\tin\tcertain\tfinancing\tfunds(133)(238)\nOperating\tlease\tright-of-use\tassets(859)(506)\nOther(116)(15)\nTotal\tdeferred\ttax\tliabilities\n(3,230)(1,937)\nDeferred\ttax\tassets\t(liabilities),\tnet\tof\tvaluation\tallowance\n$6,652\t$247\t\nAs\tof\tDecember\t31,\t2023,\twe\tmaintained\tvaluation\tallowances\tof\t$892\tmillion\tfor\tdeferred\ttax\tassets\tthat\tare\tnot\tmore\tlikely\tthan\tnot\tto\tbe\nrealized,\twhich\tprimarily\tincluded\tdeferred\ttax\tassets\tin\tthe\tstate\tof\tCalifornia\tand\tcertain\tforeign\toperating\tlosses.\tThe\tvaluation\tallowance\ton\tour\tnet\ndeferred\ttax\tassets\tdecreased\tby\t$6.46\tbillion\tand\t$1.73\tbillion\tduring\tthe\tyears\tended\tDecember\t31,\t2023\tand\t2022,\trespectively,\tand\tincreased\tby\n$6.14\tbillion\tduring\tthe\tyear\tended\tDecember\t31,\t2021.\tThe\tvaluation\tallowance\tdecrease\tduring\tthe\tyear\tended\tDecember\t31,\t2023\twas\tprimarily\tdue\nto\tthe\trelease\tof\tour\tvaluation\tallowance\twith\trespect\tto\tour\tU.S.\tfederal\tand\tcertain\tstate\tdeferred\ttax\tassets.\tThe\tchanges\tin\tvaluation\tallowances\nduring\tthe\tyears\tended\tDecember\t31,\t2022\tand\t2021\twere\tprimarily\tdue\tto\tchanges\tin\tour\tU.S.\tdeferred\ttax\tassets\tand\tliabilities\tin\tthe\trespective\tyear.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 87, "lines": { "from": 1, "to": 36 } } } }, { "pageContent": "Among\tour\tdeferred\ttax\tassets\tin\tforeign\tjurisdictions,\twe\trecorded\ta\tvaluation\tallowance\ton\tcertain\tforeign\tnet\toperating\tlosses\tthat\tare\tnot\tmore\tlikely\nthan\tnot\tto\tbe\trealized.\tThe\tremainder\tof\tour\tforeign\tdeferred\ttax\tassets\tare\tmore\tlikely\tthan\tnot\tto\tbe\trealized\tgiven\tthe\texpectation\tof\tfuture\tearnings\nin\tthese\tjurisdictions.\nAs\tof\tDecember\t31,\t2023,\twe\thad\t$10.31\tbillion\tof\tfederal\tand\t$10.36\tbillion\tof\tstate\tnet\toperating\tloss\tcarry-forwards\tavailable\tto\toffset\tfuture\ntaxable\tincome,\tsome\tof\twhich,\tif\tnot\tutilized,\twill\tbegin\tto\texpire\tin\t2024\tfor\tfederal\tand\tstate\tpurposes.\tFederal\tand\tstate\tlaws\tcan\timpose\tsubstantial\nrestrictions\ton\tthe\tutilization\tof\tnet\toperating\tloss\tand\ttax\tcredit\tcarry-forwards\tin\tthe\tevent\tof\tan\t“ownership\tchange,”\tas\tdefined\tin\tSection\t382\tof\tthe\nInternal\tRevenue\tCode.\tWe\thave\tdetermined\tthat\tno\tsignificant\tlimitation\twould\tbe\tplaced\ton\tthe\tutilization\tof\tour\tnet\toperating\tloss\tand\ttax\tcredit\tcarry-\nforwards\tdue\tto\tprior\townership\tchanges\tor\texpirations.\nAs\tof\tDecember\t31,\t2023,\twe\thad\tfederal\tresearch\tand\tdevelopment\ttax\tcredits\tof\t$1.10\tbillion,\tfederal\trenewable\tenergy\ttax\tcredits\tof\n$605\tmillion,\tand\tstate\tresearch\tand\tdevelopment\ttax\tcredits\tof\t$923\tmillion.\tMost\tof\tour\tstate\tresearch\tand\tdevelopment\ttax\tcredits\twere\tin\tthe\tstate\tof\nCalifornia.\tIf\tnot\tutilized,\tsome\tof\tthe\tfederal\ttax\tcredits\tmay\texpire\tin\tvarious\tamounts\tbeginning\tin\t2036.\tHowever,\tCalifornia\tresearch\tand\tdevelopment\ntax\tcredits\tcan\tbe\tcarried\tforward\tindefinitely.\n85", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 87, "lines": { "from": 37, "to": 49 } } } }, { "pageContent": "The\tlocal\tgovernment\tof\tShanghai\tgranted\ta\tbeneficial\tcorporate\tincome\ttax\trate\tof\t15%\tto\tcertain\teligible\tenterprises,\tcompared\tto\tthe\t25%\nstatutory\tcorporate\tincome\ttax\trate\tin\tChina.\tOur\tGigafactory\tShanghai\tsubsidiary\twas\tgranted\tthis\tbeneficial\tincome\ttax\trate\tof\t15%\tfor\t2019\tthrough\n2023.\tStarting\tin\t2024,\tGigafactory\tShanghai\tis\tsubject\tto\t25%\tstatutory\tcorporate\tincome\ttax\trate\tin\tChina.\nAs\tof\tDecember\t31,\t2023,\twe\tintend\tto\tindefinitely\treinvest\tour\tforeign\tearnings\tand\tcash\tunless\tsuch\trepatriation\tresults\tin\tno\tor\tminimal\ttax\tcosts.\nWe\thave\trecorded\tthe\ttaxes\tassociated\twith\tthe\tforeign\tearnings\twe\tintend\tto\trepatriate\tin\tthe\tfuture.\tFor\tthe\tearnings\twe\tintend\tto\tindefinitely\treinvest,\nno\tdeferred\ttax\tliabilities\tfor\tforeign\twithholding\tor\tother\ttaxes\thave\tbeen\trecorded.\tThe\testimated\tamount\tof\tsuch\tunrecognized\twithholding\ttax\tliability\nassociated\twith\tthe\tindefinitely\treinvested\tearnings\tis\tapproximately\t$245\tmillion.\nUncertain\tTax\tPositions\nThe\tchanges\tto\tour\tgross\tunrecognized\ttax\tbenefits\twere\tas\tfollows\t(in\tmillions):\nDecember\t31,\t2020$380\t\nIncreases\tin\tbalances\trelated\tto\tprior\tyear\ttax\tpositions117\t\nDecreases\tin\tbalances\trelated\tto\tprior\tyear\ttax\tpositions(90)\nIncreases\tin\tbalances\trelated\tto\tcurrent\tyear\ttax\tpositions124\t\nDecember\t31,\t2021\n531\t\nIncreases\tin\tbalances\trelated\tto\tprior\tyear\ttax\tpositions136\t\nDecreases\tin\tbalances\trelated\tto\tprior\tyear\ttax\tpositions(12)\nIncreases\tin\tbalances\trelated\tto\tcurrent\tyear\ttax\tpositions222\t\nDecreases\tin\tbalances\trelated\tto\texpiration\tof\tthe\tstatute\tof\tlimitations(7)\nDecember\t31,\t2022\n870\t\nIncreases\tin\tbalances\trelated\tto\tprior\tyear\ttax\tpositions59\t\nDecreases\trelated\tto\tsettlement\twith\ttax\tauthorities(6)\nIncreases\tin\tbalances\trelated\tto\tcurrent\tyear\ttax\tpositions255\t\nDecreases\tin\tbalances\trelated\tto\texpiration\tof\tthe\tstatute\tof\tlimitations(4)\nDecember\t31,\t2023\n$1,174", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 88, "lines": { "from": 1, "to": 27 } } } }, { "pageContent": "December\t31,\t2023\n$1,174\t\nWe\tinclude\tinterest\tand\tpenalties\trelated\tto\tunrecognized\ttax\tbenefits\tin\tincome\ttax\texpense.\tWe\trecognized\tnet\tinterest\tand\tpenalties\trelated\tto\nunrecognized\ttax\tbenefits\tin\tprovision\tfor\tincome\ttaxes\tline\tof\tour\tconsolidated\tstatements\tof\toperations\tof\t$17\tmillion,\t$27\tmillion\tand\t$4\tmillion\tfor\tthe\nyears\tended\tDecember\t31,\t2023,\t2022\tand\t2021,\trespectively.\tAs\tof\tDecember\t31,\t2023,\tand\t2022,\twe\thave\taccrued\t$47\tmillion\tand\t$31\tmillion,\nrespectively,\trelated\tto\tinterest\tand\tpenalties\ton\tour\tunrecognized\ttax\tbenefits.\tUnrecognized\ttax\tbenefits\tof\t$901\tmillion,\tif\trecognized,\twould\taffect\tour\neffective\ttax\trate.\nWe\tfile\tincome\ttax\treturns\tin\tthe\tU.S.\tand\tvarious\tstate\tand\tforeign\tjurisdictions.\tWe\tare\tcurrently\tunder\texamination\tby\tthe\tInternal\tRevenue\nService\t(“IRS”)\tfor\tthe\tyears\t2015\tto\t2018.\tAdditional\ttax\tyears\twithin\tthe\tperiods\t2004\tto\t2014\tand\t2019\tto\t2022\tremain\tsubject\tto\texamination\tfor\nfederal\tincome\ttax\tpurposes.\tAll\tnet\toperating\tlosses\tand\ttax\tcredits\tgenerated\tto\tdate\tare\tsubject\tto\tadjustment\tfor\tU.S.\tfederal\tand\tstate\tincome\ttax\npurposes.\tOur\treturns\tfor\t2004\tand\tsubsequent\ttax\tyears\tremain\tsubject\tto\texamination\tin\tU.S.\tstate\tand\tforeign\tjurisdictions.\nGiven\tthe\tuncertainty\tin\ttiming\tand\toutcome\tof\tour\ttax\texaminations,\tan\testimate\tof\tthe\trange\tof\tthe\treasonably\tpossible\tchange\tin\tgross\nunrecognized\ttax\tbenefits\twithin\ttwelve\tmonths\tcannot\tbe\tmade\tat\tthis\ttime.\nNote\t15\t–\tCommitments\tand\tContingencies\nOperating\tLease\tArrangement\tin\tBuffalo,\tNew\tYork\nWe\thave\tan\toperating\tlease\tarrangement\tthrough\tthe\tResearch\tFoundation\tfor\tthe\tSUNY\tFoundation\twith\trespect\tto\tGigafactory\tNew\tYork.\tUnder\nthe\tlease\tand\ta\trelated\tresearch\tand\tdevelopment\tagreement,\twe\tare\tcontinuing\tto\tfurther\tdevelop\tthe\tfacility.\n86", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 88, "lines": { "from": 26, "to": 43 } } } }, { "pageContent": "Under\tthis\tagreement,\twe\tare\tobligated\tto,\tamong\tother\tthings,\tmeet\temployment\ttargets\tas\twell\tas\tspecified\tminimum\tnumbers\tof\tpersonnel\tin\nthe\tState\tof\tNew\tYork\tand\tin\tBuffalo,\tNew\tYork\tand\tspend\tor\tincur\t$5.00\tbillion\tin\tcombined\tcapital,\toperational\texpenses,\tcosts\tof\tgoods\tsold\tand\tother\ncosts\tin\tthe\tState\tof\tNew\tYork\tduring\tthe\t10-year\tperiod\tbeginning\tApril\t30,\t2018.\tOn\tan\tannual\tbasis\tduring\tthe\tinitial\tlease\tterm,\tas\tmeasured\ton\teach\nanniversary\tof\tsuch\tdate,\tif\twe\tfail\tto\tmeet\tthese\tspecified\tinvestment\tand\tjob\tcreation\trequirements,\tthen\twe\twould\tbe\tobligated\tto\tpay\ta\t$41\tmillion\n“program\tpayment”\tto\tthe\tSUNY\tFoundation\tfor\teach\tyear\tthat\twe\tfail\tto\tmeet\tthese\trequirements.\tFurthermore,\tif\tthe\tarrangement\tis\tterminated\tdue\tto\na\tmaterial\tbreach\tby\tus,\tthen\tadditional\tamounts\tmay\tbecome\tpayable\tby\tus.\nIn\t2021,\tan\tamendment\twas\texecuted\tto\textend\tour\toverall\tagreement\tto\tspend\tor\tincur\t$5.00\tbillion\tin\tcombined\tcapital,\toperational\texpenses,\ncosts\tof\tgoods\tsold\tand\tother\tcosts\tin\tthe\tState\tof\tNew\tYork\tthrough\tDecember\t31,\t2029.\tOn\tFebruary\t1,\t2022,\twe\treported\tto\tthe\tState\tof\tNew\tYork\tthat\nwe\thad\tmet\tand\texceeded\tour\tannual\trequirements\tfor\tjobs\tand\tinvestment\tin\tBuffalo\tand\tNew\tYork\tState.\tAs\tof\tDecember\t31,\t2023,\twe\thave\tmet\tand\nexpect\tto\tmeet\tthe\trequirements\tunder\tthis\tarrangement\tbased\ton\tour\tcurrent\tand\tanticipated\tlevel\tof\toperations.\tHowever,\tif\tour\texpectations\tas\tto\tthe\ncosts\tand\ttimelines\tof\tour\tinvestment\tand\toperations\tat\tBuffalo\tprove\tincorrect,\twe\tmay\tincur\tadditional\texpenses\tor\tbe\trequired\tto\tmake\tsubstantial\npayments\tto\tthe\tSUNY\tFoundation.\nOperating\tLease\tArrangement\tin\tShanghai,\tChina\nWe\thave\tan\toperating\tlease\tarrangement\tfor\tan\tinitial\tterm\tof\t50\tyears\twith\tthe\tlocal\tgovernment\tof\tShanghai\tfor\tland\tuse\trights\twhere\twe\thave\nbeen\tconstructing\tGigafactory\tShanghai.\tUnder\tthe\tterms\tof\tthe\tarrangement,\twe\tare\trequired\tto\tspend\tRMB\t14.08\tbillion\tin\tcapital\texpenditures\tby\tthe", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 89, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "end\tof\t2023,\twhich\thas\tbeen\tachieved\tin\t2023,\tand\tto\tgenerate\tRMB\t2.23\tbillion\tof\tannual\ttax\trevenues\tstarting\tat\tthe\tend\tof\t2023.\tAs\tof\tDecember\t31,\n2023,\twe\thave\tmet\tand\texpect\tto\tmeet\tthe\ttax\trevenue\trequirements\tbased\ton\tour\tcurrent\tlevel\tof\tspend\tand\tsales.\nLegal\tProceedings\nLitigation\tRelating\tto\t2018\tCEO\tPerformance\tAward\nOn\tJune\t4,\t2018,\ta\tpurported\tTesla\tstockholder\tfiled\ta\tputative\tclass\tand\tderivative\taction\tin\tthe\tDelaware\tCourt\tof\tChancery\tagainst\tElon\tMusk\tand\nthe\tmembers\tof\tTesla’s\tboard\tof\tdirectors\tas\tthen\tconstituted,\talleging\tcorporate\twaste,\tunjust\tenrichment\tand\tthat\tsuch\tboard\tmembers\tbreached\ttheir\nfiduciary\tduties\tby\tapproving\tthe\tstock-based\tcompensation\tplan\tawarded\tto\tElon\tMusk\tin\t2018.\tTrial\twas\theld\tNovember\t14-18,\t2022.\tPost-trial\tbriefing\nand\targument\tare\tnow\tcomplete.\nLitigation\tRelated\tto\tDirectors’\tCompensation\nOn\tJune\t17,\t2020,\ta\tpurported\tTesla\tstockholder\tfiled\ta\tderivative\taction\tin\tthe\tDelaware\tCourt\tof\tChancery,\tpurportedly\ton\tbehalf\tof\tTesla,\tagainst\ncertain\tof\tTesla’s\tcurrent\tand\tformer\tdirectors\tregarding\tcompensation\tawards\tgranted\tto\tTesla’s\tdirectors,\tother\tthan\tElon\tMusk,\tbetween\t2017\tand\n2020.\tThe\tsuit\tasserts\tclaims\tfor\tbreach\tof\tfiduciary\tduty\tand\tunjust\tenrichment\tand\tseeks\tdeclaratory\tand\tinjunctive\trelief,\tunspecified\tdamages\tand\nother\trelief.\tDefendants\tfiled\ttheir\tanswer\ton\tSeptember\t17,\t2020.\nOn\tJuly\t14,\t2023,\tthe\tparties\tfiled\ta\tStipulation\tand\tAgreement\tof\tCompromise\tand\tSettlement,\twhich\tdoes\tnot\tinvolve\tan\tadmission\tof\tany\nwrongdoing\tby\tany\tparty.\tIf\tthe\tsettlement\tis\tapproved\tby\tthe\tCourt,\tthis\taction\twill\tbe\tfully\tsettled\tand\tdismissed\twith\tprejudice.\tPursuant\tto\tthe\tterms\tof\nthe\tagreement,\tTesla\tprovided\tnotice\tof\tthe\tproposed\tsettlement\tto\tstockholders\tof\trecord\tas\tof\tJuly\t14,\t2023.\tThe\tCourt\theld\ta\thearing\tregarding\tthe\nsettlement\ton\tOctober\t13,\t2023,\tafter\twhich\tit\ttook\tthe\tsettlement\tand\tplaintiff\tcounsels’\tfee\trequest\tunder\tadvisement.\tThe\tsettlement\tis\tnot\texpected", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 89, "lines": { "from": 16, "to": 32 } } } }, { "pageContent": "to\thave\tan\tadverse\timpact\ton\tour\tresults\tof\toperations,\tcash\tflows\tor\tfinancial\tposition.\nLitigation\tRelating\tto\tPotential\tGoing\tPrivate\tTransaction\nBetween\tAugust\t10,\t2018\tand\tSeptember\t6,\t2018,\tnine\tpurported\tstockholder\tclass\tactions\twere\tfiled\tagainst\tTesla\tand\tElon\tMusk\tin\tconnection\nwith\tMr.\tMusk’s\tAugust\t7,\t2018\tTwitter\tpost\tthat\the\twas\tconsidering\ttaking\tTesla\tprivate.\tOn\tJanuary\t16,\t2019,\tPlaintiffs\tfiled\ttheir\tconsolidated\tcomplaint\nin\tthe\tUnited\tStates\tDistrict\tCourt\tfor\tthe\tNorthern\tDistrict\tof\tCalifornia\tand\tadded\tas\tdefendants\tthe\tmembers\tof\tTesla’s\tboard\tof\tdirectors.\tThe\nconsolidated\tcomplaint\tasserts\tclaims\tfor\tviolations\tof\tthe\tfederal\tsecurities\tlaws\tand\tseeks\tunspecified\tdamages\tand\tother\trelief.\tThe\tparties\tstipulated\nto\tcertification\tof\ta\tclass\tof\tstockholders,\twhich\tthe\tcourt\tgranted\ton\tNovember\t25,\t2020.\tTrial\tstarted\ton\tJanuary\t17,\t2023,\tand\ton\tFebruary\t3,\t2023,\ta\njury\trendered\ta\tverdict\tin\tfavor\tof\tthe\tdefendants\ton\tall\tcounts.\tAfter\ttrial,\tplaintiffs\tfiled\ta\tmotion\tfor\tjudgment\tas\ta\tmatter\tof\tlaw\tand\ta\tmotion\tfor\tnew\ntrial,\twhich\tthe\tCourt\tdenied\tand\tjudgement\twas\tentered\tin\tfavor\tof\tdefendants\ton\tJuly\t11,\t2023.\tOn\tJuly\t14,\t2023,\tplaintiffs\tfiled\ta\tnotice\tof\tappeal.\n87", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 89, "lines": { "from": 33, "to": 42 } } } }, { "pageContent": "Between\tOctober\t17,\t2018\tand\tMarch\t8,\t2021,\tseven\tderivative\tlawsuits\twere\tfiled\tin\tthe\tDelaware\tCourt\tof\tChancery,\tpurportedly\ton\tbehalf\tof\nTesla,\tagainst\tMr.\tMusk\tand\tthe\tmembers\tof\tTesla’s\tboard\tof\tdirectors,\tas\tconstituted\tat\trelevant\ttimes,\tin\trelation\tto\tstatements\tmade\tand\tactions\nconnected\tto\ta\tpotential\tgoing\tprivate\ttransaction,\twith\tcertain\tof\tthe\tlawsuits\tchallenging\tadditional\tTwitter\tposts\tby\tMr.\tMusk,\tamong\tother\tthings.\tFive\nof\tthose\tactions\twere\tconsolidated,\tand\tall\tseven\tactions\thave\tbeen\tstayed\tpending\tresolution\tof\tthe\tappeal\tin\tthe\tabove-referenced\tconsolidated\npurported\tstockholder\tclass\taction.\tIn\taddition\tto\tthese\tcases,\ttwo\tderivative\tlawsuits\twere\tfiled\ton\tOctober\t25,\t2018\tand\tFebruary\t11,\t2019\tin\tthe\tU.S.\nDistrict\tCourt\tfor\tthe\tDistrict\tof\tDelaware,\tpurportedly\ton\tbehalf\tof\tTesla,\tagainst\tMr.\tMusk\tand\tthe\tmembers\tof\tthe\tTesla\tboard\tof\tdirectors\tas\tthen\nconstituted.\tThose\tcases\thave\talso\tbeen\tconsolidated\tand\tstayed\tpending\tresolution\tof\tthe\tappeal\tin\tthe\tabove-referenced\tconsolidated\tpurported\nstockholder\tclass\taction.\nOn\tOctober\t21,\t2022,\ta\tlawsuit\twas\tfiled\tin\tthe\tDelaware\tCourt\tof\tChancery\tby\ta\tpurported\tshareholder\tof\tTesla\talleging,\tamong\tother\tthings,\tthat\nboard\tmembers\tbreached\ttheir\tfiduciary\tduties\tin\tconnection\twith\ttheir\toversight\tof\tthe\tCompany’s\t2018\tsettlement\twith\tthe\tSEC,\tas\tamended.\tAmong\nother\tthings,\tthe\tplaintiff\tseeks\treforms\tto\tthe\tCompany’s\tcorporate\tgovernance\tand\tinternal\tprocedures,\tunspecified\tdamages,\tand\tattorneys’\tfees.\tThe\nparties\treached\tan\tagreement\tto\tstay\tthe\tcase\tuntil\tMarch\t5,\t2024.\nOn\tNovember\t15,\t2021,\tJPMorgan\tChase\tBank\t(“JP\tMorgan”)\tfiled\ta\tlawsuit\tagainst\tTesla\tin\tthe\tSouthern\tDistrict\tof\tNew\tYork\talleging\tbreach\tof\ta\nstock\twarrant\tagreement\tthat\twas\tentered\tinto\tas\tpart\tof\ta\tconvertible\tnotes\toffering\tin\t2014.\tIn\t2018,\tJP\tMorgan\tinformed\tTesla\tthat\tit\thad\tadjusted\tthe", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 90, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "strike\tprice\tbased\tupon\tMr.\tMusk’s\tAugust\t7,\t2018\tTwitter\tpost\tthat\the\twas\tconsidering\ttaking\tTesla\tprivate.\tTesla\tdisputed\tJP\tMorgan’s\tadjustment\tas\ta\nviolation\tof\tthe\tparties’\tagreement.\tIn\t2021,\tTesla\tdelivered\tshares\tto\tJP\tMorgan\tper\tthe\tagreement,\twhich\tthey\tduly\taccepted.\tJP\tMorgan\tnow\talleges\nthat\tit\tis\towed\tapproximately\t$162\tmillion\tas\tthe\tvalue\tof\tadditional\tshares\tthat\tit\tclaims\tshould\thave\tbeen\tdelivered\tas\ta\tresult\tof\tthe\tadjustment\tto\tthe\nstrike\tprice\tin\t2018.\tOn\tJanuary\t24,\t2022,\tTesla\tfiled\tmultiple\tcounterclaims\tas\tpart\tof\tits\tanswer\tto\tthe\tunderlying\tlawsuit,\tasserting\tamong\tother\tpoints\nthat\tJP\tMorgan\tshould\thave\tterminated\tthe\tstock\twarrant\tagreement\tin\t2018\trather\tthan\tmake\tan\tadjustment\tto\tthe\tstrike\tprice\tthat\tit\tshould\thave\nknown\twould\tlead\tto\ta\tcommercially\tunreasonable\tresult.\tTesla\tbelieves\tthat\tthe\tadjustments\tmade\tby\tJP\tMorgan\twere\tneither\tproper\tnor\tcommercially\nreasonable,\tas\trequired\tunder\tthe\tstock\twarrant\tagreements.\tJP\tMorgan\tfiled\ta\tmotion\tfor\tjudgment\ton\tthe\tpleadings,\twhich\tTesla\topposed,\tand\tthat\nmotion\tis\tcurrently\tpending\tbefore\tthe\tCourt.\nLitigation\tand\tInvestigations\tRelating\tto\tAlleged\tDiscrimination\tand\tHarassment\nOn\tOctober\t4,\t2021,\tin\ta\tcase\tcaptioned\tDiaz\tv.\tTesla,\ta\tjury\tin\tthe\tNorthern\tDistrict\tof\tCalifornia\treturned\ta\tverdict\tagainst\tTesla\ton\tclaims\tby\ta\nformer\tcontingent\tworker\tthat\the\twas\tsubjected\tto\trace\tdiscrimination\twhile\tassigned\tto\twork\tat\tTesla’s\tFremont\tFactory\tfrom\t2015-2016.\tA\tretrial\twas\nheld\tstarting\ton\tMarch\t27,\t2023,\tafter\twhich\ta\tjury\treturned\ta\tverdict\tof\t$3,175,000.\tAs\ta\tresult,\tthe\tdamages\tawarded\tagainst\tTesla\twere\treduced\tfrom\nan\tinitial\t$136.9\tmillion\t(October\t4,\t2021)\tdown\tto\t$15\tmillion\t(April\t13,\t2022),\tand\tthen\tfurther\tdown\tto\t$3.175\tmillion\t(April\t3,\t2023).\tOn\tNovember\t2,\n2023,\tthe\tplaintiff\tfiled\ta\tnotice\tof\tappeal,\tand\ton\tNovember\t16,\t2023,\tTesla\tfiled\ta\tnotice\tof\tcross\tappeal.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 90, "lines": { "from": 15, "to": 28 } } } }, { "pageContent": "On\tFebruary\t9,\t2022,\tshortly\tafter\tthe\tfirst\tDiaz\tjury\tverdict,\tthe\tCalifornia\tCivil\tRights\tDepartment\t(“CRD,”\tformerly\t“DFEH”)\tfiled\ta\tcivil\tcomplaint\nagainst\tTesla\tin\tAlameda\tCounty,\tCalifornia\tSuperior\tCourt,\talleging\tsystemic\trace\tdiscrimination,\thostile\twork\tenvironment\tand\tpay\tequity\tclaims,\tamong\nothers.\tCRD’s\tamended\tcomplaint\tseeks\tmonetary\tdamages\tand\tinjunctive\trelief.\tOn\tSeptember\t22,\t2022,\tTesla\tfiled\ta\tcross\tcomplaint\tagainst\tCRD,\nalleging\tthat\tit\tviolated\tthe\tAdministrative\tProcedures\tAct\tby\tfailing\tto\tfollow\tstatutory\tpre-requisites\tprior\tto\tfiling\tsuit\tand\tthat\tcross\tcomplaint\twas\nsubject\tto\ta\tsustained\tdemurrer,\twhich\tTesla\tlater\tamended\tand\trefiled.\tThe\tcase\tis\tcurrently\tin\tdiscovery.\nAdditionally,\ton\tJune\t1,\t2022\tthe\tEqual\tEmployment\tOpportunity\tCommission\t(“EEOC”)\tissued\ta\tcause\tfinding\tagainst\tTesla\tthat\tclosely\tparallels\tthe\nCRD’s\tallegations.\tOn\tSeptember\t28,\t2023,\tthe\tEEOC\tfiled\ta\tcivil\tcomplaint\tagainst\tTesla\tin\tthe\tUnited\tStates\tDistrict\tCourt\tfor\tthe\tNorthern\tDistrict\tof\nCalifornia\tasserting\tclaims\tfor\trace\tharassment\tand\tretaliation\tand\tseeking,\tamong\tother\tthings,\tmonetary\tand\tinjunctive\trelief.\tOn\tDecember\t18,\t2023,\nTesla\tfiled\ta\tmotion\tto\tstay\tthe\tcase.\tSeparately,\ton\tDecember\t26,\t2023,\tTesla\tfiled\ta\tmotion\tto\tdismiss\tthe\tcase.\nOn\tJune\t16,\t2022,\ttwo\tTesla\tstockholders\tfiled\tseparate\tderivative\tactions\tin\tthe\tU.S.\tDistrict\tCourt\tfor\tthe\tWestern\tDistrict\tof\tTexas,\tpurportedly\ton\nbehalf\tof\tTesla,\tagainst\tcertain\tof\tTesla’s\tcurrent\tand\tformer\tdirectors.\tBoth\tsuits\tassert\tclaims\tfor\tbreach\tof\tfiduciary\tduty,\tunjust\tenrichment,\tand\nviolation\tof\tthe\tfederal\tsecurities\tlaws\tin\tconnection\twith\talleged\trace\tand\tgender\tdiscrimination\tand\tsexual\tharassment.\tAmong\tother\tthings,\tplaintiffs\nseek\tdeclaratory\tand\tinjunctive\trelief,\tunspecified\tdamages\tpayable\tto\tTesla,\tand\tattorneys’\tfees.\tOn\tJuly\t22,\t2022,\tthe\tCourt\tconsolidated\tthe\ttwo\tcases", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 90, "lines": { "from": 29, "to": 41 } } } }, { "pageContent": "and\ton\tSeptember\t6,\t2022,\tplaintiffs\tfiled\ta\tconsolidated\tcomplaint.\tOn\tNovember\t7,\t2022,\tthe\tdefendants\tfiled\ta\tmotion\tto\tdismiss\tthe\tcase\tand\ton\nSeptember\t15,\t2023,\tthe\tCourt\tdismissed\tthe\taction\tbut\tgranted\tplaintiffs\tleave\tto\tfile\tan\tamended\tcomplaint.\tOn\tNovember\t2,\t2023,\tplaintiff\tfiled\tan\namended\tcomplaint\tpurportedly\ton\tbehalf\tof\tTesla,\tagainst\tElon\tMusk.\tOn\tDecember\t19,\t2023,\tthe\tdefendants\tmoved\tto\tdismiss\tthe\tamended\tcomplaint.\n88", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 90, "lines": { "from": 42, "to": 45 } } } }, { "pageContent": "Other\tLitigation\tRelated\tto\tOur\tProducts\tand\tServices\nWe\tare\talso\tsubject\tto\tvarious\tlawsuits\tthat\tseek\tmonetary\tand\tother\tinjunctive\trelief.\tThese\tlawsuits\tinclude\tproposed\tclass\tactions\tand\tother\nconsumer\tclaims\tthat\tallege,\tamong\tother\tthings,\tpurported\tdefects\tand\tmisrepresentations\trelated\tto\tour\tproducts\tand\tservices.\tFor\texample,\ton\nSeptember\t14,\t2022,\ta\tproposed\tclass\taction\twas\tfiled\tagainst\tTesla,\tInc.\tand\trelated\tentities\tin\tthe\tU.S.\tDistrict\tCourt\tfor\tthe\tNorthern\tDistrict\tof\nCalifornia,\talleging\tvarious\tclaims\tabout\tthe\tCompany’s\tdriver\tassistance\ttechnology\tsystems\tunder\tstate\tand\tfederal\tlaw.\tThis\tcase\twas\tlater\nconsolidated\twith\tseveral\tother\tproposed\tclass\tactions,\tand\ta\tConsolidated\tAmended\tComplaint\twas\tfiled\ton\tOctober\t28,\t2022,\twhich\tseeks\tdamages\tand\nother\trelief\ton\tbehalf\tof\tall\tpersons\twho\tpurchased\tor\tleased\tfrom\tTesla\tbetween\tJanuary\t1,\t2016\tto\tthe\tpresent.\tOn\tOctober\t5,\t2022\ta\tproposed\tclass\naction\tcomplaint\twas\tfiled\tin\tthe\tU.S.\tDistrict\tCourt\tfor\tthe\tEastern\tDistrict\tof\tNew\tYork\tasserting\tsimilar\tstate\tand\tfederal\tlaw\tclaims\tagainst\tthe\tsame\ndefendants.\tOn\tSeptember\t30,\t2023,\tthe\tCourt\tdismissed\tthis\taction\twith\tleave\tto\tamend\tthe\tcomplaint.\tOn\tNovember\t20,\t2023,\tthe\tplaintiff\tmoved\tto\namend\tthe\tcomplaint,\twhich\tTesla\topposed.\tOn\tMarch\t22,\t2023,\tthe\tplaintiffs\tin\tthe\tNorthern\tDistrict\tof\tCalifornia\tconsolidated\taction\tfiled\ta\tmotion\tfor\ta\npreliminary\tinjunction\tto\torder\tTesla\tto\t(1)\tcease\tusing\tthe\tterm\t“Full\tSelf-Driving\tCapability”\t(FSD\tCapability),\t(2)\tcease\tthe\tsale\tand\tactivation\tof\tFSD\nCapability\tand\tdeactivate\tFSD\tCapability\ton\tTesla\tvehicles,\tand\t(3)\tprovide\tcertain\tnotices\tto\tconsumers\tabout\tproposed\tcourt-findings\tabout\tthe\naccuracy\tof\tthe\tuse\tof\tthe\tterms\tAutopilot\tand\tFSD\tCapability.\tTesla\topposed\tthe\tmotion.\tOn\tSeptember\t30,\t2023,\tthe\tCourt\tdenied\tthe\trequest\tfor\ta\npreliminary\tinjunction,\tcompelled\tfour\tof\tfive\tplaintiffs\tto\tarbitration,\tand\tdismissed\tthe\tclaims\tof\tthe\tfifth\tplaintiff\twith\tleave\tto\tamend\tthe\tcomplaint.\tOn", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 91, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "October\t31,\t2023,\tthe\tremaining\tplaintiff\tin\tthe\tNorthern\tDistrict\tof\tCalifornia\taction\tfiled\tan\tamended\tcomplaint,\twhich\tTesla\thas\tmoved\tto\tdismiss.\tOn\nOctober\t2,\t2023,\ta\tsimilar\tproposed\tclass\taction\twas\tfiled\tin\tSan\tDiego\tCounty\tSuperior\tCourt\tin\tCalifornia.\tTesla\tsubsequently\tremoved\tthe\tSan\tDiego\nCounty\tcase\tto\tfederal\tcourt\tand\ton\tJanuary\t8,\t2024,\tthe\tfederal\tcourt\tgranted\tTesla’s\tmotion\tto\ttransfer\tthe\tcase\tto\tthe\tU.S.\tDistrict\tCourt\tfor\tthe\nNorthern\tDistrict\tof\tCalifornia.\nOn\tFebruary\t27,\t2023,\ta\tproposed\tclass\taction\twas\tfiled\tin\tthe\tU.S.\tDistrict\tCourt\tfor\tthe\tNorthern\tDistrict\tof\tCalifornia\tagainst\tTesla,\tInc.,\tElon\tMusk\nand\tcertain\tcurrent\tand\tformer\tCompany\texecutives.\tThe\tcomplaint\talleges\tthat\tthe\tdefendants\tmade\tmaterial\tmisrepresentations\tand\tomissions\tabout\nthe\tCompany’s\tAutopilot\tand\tFSD\tCapability\ttechnologies\tand\tseeks\tmoney\tdamages\tand\tother\trelief\ton\tbehalf\tof\tpersons\twho\tpurchased\tTesla\tstock\nbetween\tFebruary\t19,\t2019\tand\tFebruary\t17,\t2023.\tAn\tamended\tcomplaint\twas\tfiled\ton\tSeptember\t5,\t2023,\tnaming\tonly\tTesla,\tInc.\tand\tElon\tMusk\tas\ndefendants.\tOn\tNovember\t6,\t2023,\tTesla\tmoved\tto\tdismiss\tthe\tamended\tcomplaint.\nOn\tMarch\t14,\t2023,\ta\tproposed\tclass\taction\twas\tfiled\tagainst\tTesla,\tInc.\tin\tthe\tU.S.\tDistrict\tCourt\tfor\tthe\tNorthern\tDistrict\tof\tCalifornia.\tSeveral\nsimilar\tcomplaints\thave\talso\tbeen\tfiled\tin\tthe\tsame\tcourt\tand\tthese\tcases\thave\tnow\tall\tbeen\tconsolidated.\tThese\tcomplaints\tallege\tthat\tTesla\tviolates\nfederal\tantitrust\tand\twarranty\tlaws\tthrough\tits\trepair,\tservice,\tand\tmaintenance\tpractices\tand\tseeks,\tamong\tother\trelief,\tdamages\tfor\tpersons\twho\tpaid\nTesla\tfor\trepairs\tservices\tor\tTesla\tcompatible\treplacement\tparts\tfrom\tMarch\t2019\tto\tMarch\t2023.\tOn\tJuly\t17,\t2023,\tthese\tplaintiffs\tfiled\ta\tconsolidated\namended\tcomplaint.\tOn\tSeptember\t27,\t2023,\tthe\tcourt\tgranted\tTesla’s\tmotion\tto\tcompel\tarbitration\tas\tto\tthree\tof\tthe\tplaintiffs,\tand\ton\tNovember\t17,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 91, "lines": { "from": 15, "to": 28 } } } }, { "pageContent": "2023,\tthe\tcourt\tgranted\tTesla’s\tmotion\tto\tdismiss\twithout\tprejudice.\tThe\tplaintiffs\tfiled\ta\tConsolidated\tSecond\tAmended\tComplaint\ton\tDecember\t12,\n2023,\twhich\tTesla\thas\tmoved\tto\tdismiss.\tPlaintiffs\thave\talso\tappealed\tthe\tcourt’s\tarbitration\torder.\tTrial\tis\tcurrently\tset\tfor\tJuly\t7,\t2025.\nThe\tCompany\tintends\tto\tvigorously\tdefend\titself\tin\tthese\tmatters;\thowever,\twe\tcannot\tpredict\tthe\toutcome\tor\timpact.\tWe\tare\tunable\tto\treasonably\nestimate\tthe\tpossible\tloss\tor\trange\tof\tloss,\tif\tany,\tassociated\twith\tthese\tclaims,\tunless\tnoted.\nCertain\tInvestigations\tand\tOther\tMatters\nWe\tregularly\treceive\trequests\tfor\tinformation,\tincluding\tsubpoenas,\tfrom\tregulators\tand\tgovernmental\tauthorities\tsuch\tas\tthe\tNational\tHighway\nTraffic\tSafety\tAdministration,\tthe\tNational\tTransportation\tSafety\tBoard,\tthe\tSecurities\tand\tExchange\tCommission\t(“SEC”),\tthe\tDepartment\tof\tJustice\n(“DOJ”),\tand\tvarious\tlocal,\tstate,\tfederal,\tand\tinternational\tagencies.\tThe\tongoing\trequests\tfor\tinformation\tinclude\ttopics\tsuch\tas\toperations,\ttechnology\n(e.g.,\tvehicle\tfunctionality,\tAutopilot\tand\tFSD\tCapability),\tcompliance,\tfinance,\tdata\tprivacy,\tand\tother\tmatters\trelated\tto\tTesla’s\tbusiness,\tits\tpersonnel,\nand\trelated\tparties.\tWe\troutinely\tcooperate\twith\tsuch\tformal\tand\tinformal\trequests\tfor\tinformation,\tinvestigations,\tand\tother\tinquiries.\tTo\tour\tknowledge\nno\tgovernment\tagency\tin\tany\tongoing\tinvestigation\thas\tconcluded\tthat\tany\twrongdoing\toccurred.\tWe\tcannot\tpredict\tthe\toutcome\tor\timpact\tof\tany\nongoing\tmatters.\tShould\tthe\tgovernment\tdecide\tto\tpursue\tan\tenforcement\taction,\tthere\texists\tthe\tpossibility\tof\ta\tmaterial\tadverse\timpact\ton\tour\nbusiness,\tresults\tof\toperation,\tprospects,\tcash\tflows,\tfinancial\tposition\tor\tbrand.\n89", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 91, "lines": { "from": 29, "to": 42 } } } }, { "pageContent": "We\tare\talso\tsubject\tto\tvarious\tother\tlegal\tproceedings,\trisks\tand\tclaims\tthat\tarise\tfrom\tthe\tnormal\tcourse\tof\tbusiness\tactivities.\tFor\texample,\tduring\nthe\tsecond\tquarter\tof\t2023,\ta\tforeign\tnews\toutlet\treported\tthat\tit\tobtained\tcertain\tmisappropriated\tdata\tincluding,\tpurportedly\tnon-public\tTesla\tbusiness\nand\tpersonal\tinformation.\tTesla\thas\tmade\tnotifications\tto\tpotentially\taffected\tindividuals\t(current\tand\tformer\temployees)\tand\tregulatory\tauthorities\tand\nwe\tare\tworking\twith\tcertain\tlaw\tenforcement\tand\tother\tauthorities.\tOn\tAugust\t5,\t2023,\ta\tputative\tclass\taction\twas\tfiled\tin\tthe\tUnited\tStates\tDistrict\tCourt\nfor\tthe\tNorthern\tDistrict\tof\tCalifornia,\tpurportedly\ton\tbehalf\tof\tall\tU.S.\tindividuals\timpacted\tby\tthe\tdata\tincident,\tfollowed\tby\tseveral\tadditional\tlawsuits,\nthat\teach\tassert\tclaims\tunder\tvarious\tstate\tlaws\tand\tseeks\tmonetary\tdamages\tand\tother\trelief.\tIf\tan\tunfavorable\truling\tor\tdevelopment\twere\tto\toccur\tin\nthese\tor\tother\tpossible\tlegal\tproceedings,\trisks\tand\tclaims,\tthere\texists\tthe\tpossibility\tof\ta\tmaterial\tadverse\timpact\ton\tour\tbusiness,\tresults\tof\toperations,\nprospects,\tcash\tflows,\tfinancial\tposition\tor\tbrand.\nLetters\tof\tCredit\nAs\tof\tDecember\t31,\t2023,\twe\thad\t$525\tmillion\tof\tunused\tletters\tof\tcredit\toutstanding.\nNote\t16\t–\tVariable\tInterest\tEntity\tArrangements\nWe\thave\tentered\tinto\tvarious\tarrangements\twith\tinvestors\tto\tfacilitate\tthe\tfunding\tand\tmonetization\tof\tour\tsolar\tenergy\tsystems\tand\tvehicles.\tIn\nparticular,\tour\twholly\towned\tsubsidiaries\tand\tfund\tinvestors\thave\tformed\tand\tcontributed\tcash\tand\tassets\tinto\tvarious\tfinancing\tfunds\tand\tentered\tinto\nrelated\tagreements.\tWe\thave\tdetermined\tthat\tthe\tfunds\tare\tVIEs\tand\twe\tare\tthe\tprimary\tbeneficiary\tof\tthese\tVIEs\tby\treference\tto\tthe\tpower\tand\tbenefits\ncriterion\tunder\tASC\t810.\tWe\thave\tconsidered\tthe\tprovisions\twithin\tthe\tagreements,\twhich\tgrant\tus\tthe\tpower\tto\tmanage\tand\tmake\tdecisions\tthat\taffect", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 92, "lines": { "from": 1, "to": 15 } } } }, { "pageContent": "the\toperation\tof\tthese\tVIEs,\tincluding\tdetermining\tthe\tsolar\tenergy\tsystems\tand\tthe\tassociated\tcustomer\tcontracts\tto\tbe\tsold\tor\tcontributed\tto\tthese\nVIEs,\tredeploying\tsolar\tenergy\tsystems\tand\tmanaging\tcustomer\treceivables.\tWe\tconsider\tthat\tthe\trights\tgranted\tto\tthe\tfund\tinvestors\tunder\tthe\nagreements\tare\tmore\tprotective\tin\tnature\trather\tthan\tparticipating.\nAs\tthe\tprimary\tbeneficiary\tof\tthese\tVIEs,\twe\tconsolidate\tin\tthe\tfinancial\tstatements\tthe\tfinancial\tposition,\tresults\tof\toperations\tand\tcash\tflows\tof\nthese\tVIEs,\tand\tall\tintercompany\tbalances\tand\ttransactions\tbetween\tus\tand\tthese\tVIEs\tare\teliminated\tin\tthe\tconsolidated\tfinancial\tstatements.\tCash\ndistributions\tof\tincome\tand\tother\treceipts\tby\ta\tfund,\tnet\tof\tagreed\tupon\texpenses,\testimated\texpenses,\ttax\tbenefits\tand\tdetriments\tof\tincome\tand\tloss\nand\ttax\tcredits,\tare\tallocated\tto\tthe\tfund\tinvestor\tand\tour\tsubsidiary\tas\tspecified\tin\tthe\tagreements.\nGenerally,\tour\tsubsidiary\thas\tthe\toption\tto\tacquire\tthe\tfund\tinvestor’s\tinterest\tin\tthe\tfund\tfor\tan\tamount\tbased\ton\tthe\tmarket\tvalue\tof\tthe\tfund\tor\nthe\tformula\tspecified\tin\tthe\tagreements.\nUpon\tthe\tsale\tor\tliquidation\tof\ta\tfund,\tdistributions\twould\toccur\tin\tthe\torder\tand\tpriority\tspecified\tin\tthe\tagreements.\nPursuant\tto\tmanagement\tservices,\tmaintenance\tand\twarranty\tarrangements,\twe\thave\tbeen\tcontracted\tto\tprovide\tservices\tto\tthe\tfunds,\tsuch\tas\noperations\tand\tmaintenance\tsupport,\taccounting,\tlease\tservicing\tand\tperformance\treporting.\tIn\tsome\tinstances,\twe\thave\tguaranteed\tpayments\tto\tthe\nfund\tinvestors\tas\tspecified\tin\tthe\tagreements.\tA\tfund’s\tcreditors\thave\tno\trecourse\tto\tour\tgeneral\tcredit\tor\tto\tthat\tof\tother\tfunds.\tCertain\tassets\tof\tthe\nfunds\thave\tbeen\tpledged\tas\tcollateral\tfor\ttheir\tobligations.\n90", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 92, "lines": { "from": 16, "to": 30 } } } }, { "pageContent": "The\taggregate\tcarrying\tvalues\tof\tthe\tVIEs’\tassets\tand\tliabilities,\tafter\telimination\tof\tany\tintercompany\ttransactions\tand\tbalances,\tin\tthe\nconsolidated\tbalance\tsheets\twere\tas\tfollows\t(in\tmillions):\nDecember\t31,\n2023\nDecember\t31,\n2022\nAssets\t\t\nCurrent\tassets\t\t\nCash\tand\tcash\tequivalents$66\t$68\t\nAccounts\treceivable,\tnet13\t22\t\nPrepaid\texpenses\tand\tother\tcurrent\tassets361\t274\t\nTotal\tcurrent\tassets440\t364\t\nSolar\tenergy\tsystems,\tnet3,278\t4,060\t\nOther\tnon-current\tassets369\t404\t\nTotal\tassets\n$4,087\t$4,828\t\nLiabilities\t\t\nCurrent\tliabilities\t\t\nAccrued\tliabilities\tand\tother$67\t$69\t\nDeferred\trevenue6\t10\t\nCurrent\tportion\tof\tdebt\tand\tfinance\tleases1,564\t1,013\t\nTotal\tcurrent\tliabilities1,637\t1,092\t\nDeferred\trevenue,\tnet\tof\tcurrent\tportion99\t149\t\nDebt\tand\tfinance\tleases,\tnet\tof\tcurrent\tportion2,041\t971\t\nOther\tlong-term\tliabilities—\t3\t\nTotal\tliabilities\n$3,777\t$2,215\t\nNote\t17\t–\tRelated\tParty\tTransactions\nIn\trelation\tto\tour\tCEO’s\texercise\tof\tstock\toptions\tand\tsale\tof\tcommon\tstock\tfrom\tthe\t2012\tCEO\tPerformance\tAward,\tTesla\twithheld\tthe\tappropriate\namount\tof\ttaxes.\tHowever,\tgiven\tthe\tsignificant\tamounts\tinvolved,\tour\tCEO\tentered\tinto\tan\tindemnification\tagreement\twith\tus\tin\tNovember\t2021\tfor\nadditional\ttaxes\towed,\tif\tany.\nTesla\tperiodically\tdoes\tbusiness\twith\tcertain\tentities\twith\twhich\tits\tCEO\tand\tdirectors\tare\taffiliated,\tsuch\tas\tSpaceX\tand\tX\tCorp.,\tin\taccordance\twith\nour\tRelated\tPerson\tTransactions\tPolicy.\tSuch\ttransactions\thave\tnot\thad\tto\tdate,\tand\tare\tnot\tcurrently\texpected\tto\thave,\ta\tmaterial\timpact\ton\tour\nconsolidated\tfinancial\tstatements.\n91", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 93, "lines": { "from": 1, "to": 35 } } } }, { "pageContent": "Note\t18\t–\tSegment\tReporting\tand\tInformation\tabout\tGeographic\tAreas\nWe\thave\ttwo\toperating\tand\treportable\tsegments:\t(i)\tautomotive\tand\t(ii)\tenergy\tgeneration\tand\tstorage.\tThe\tautomotive\tsegment\tincludes\tthe\ndesign,\tdevelopment,\tmanufacturing,\tsales\tand\tleasing\tof\telectric\tvehicles\tas\twell\tas\tsales\tof\tautomotive\tregulatory\tcredits.\tAdditionally,\tthe\tautomotive\nsegment\tis\talso\tcomprised\tof\tservices\tand\tother,\twhich\tincludes\tsales\tof\tused\tvehicles,\tnon-warranty\tafter-sales\tvehicle\tservices,\tbody\tshop\tand\tparts,\npaid\tSupercharging,\tvehicle\tinsurance\trevenue\tand\tretail\tmerchandise.\tThe\tenergy\tgeneration\tand\tstorage\tsegment\tincludes\tthe\tdesign,\tmanufacture,\ninstallation,\tsales\tand\tleasing\tof\tsolar\tenergy\tgeneration\tand\tenergy\tstorage\tproducts\tand\trelated\tservices\tand\tsales\tof\tsolar\tenergy\tsystems\tincentives.\nOur\tCODM\tdoes\tnot\tevaluate\toperating\tsegments\tusing\tasset\tor\tliability\tinformation.\tThe\tfollowing\ttable\tpresents\trevenues\tand\tgross\tprofit\tby\treportable\nsegment\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nAutomotive\tsegment\t\t\nRevenues$90,738\t$77,553\t$51,034\t\nGross\tprofit$16,519\t$20,565\t$13,735\t\nEnergy\tgeneration\tand\tstorage\tsegment\t\t\nRevenues$6,035\t$3,909\t$2,789\t\nGross\tprofit$1,141\t$288\t$(129)\nThe\tfollowing\ttable\tpresents\trevenues\tby\tgeographic\tarea\tbased\ton\tthe\tsales\tlocation\tof\tour\tproducts\t(in\tmillions):\nYear\tEnded\tDecember\t31,\n202320222021\nUnited\tStates$45,235\t$40,553\t$23,973\t\nChina21,745\t18,145\t13,844\t\nOther\tinternational29,793\t22,764\t16,006\t\nTotal\n$96,773\t$81,462\t$53,823\t\nThe\tfollowing\ttable\tpresents\tlong-lived\tassets\tby\tgeographic\tarea\t(in\tmillions):\nDecember\t31,\n2023\nDecember\t31,\n2022\nUnited\tStates$26,629\t$21,667\t\nGermany4,258\t3,547\t\nChina2,820\t2,978\t\nOther\tinternational1,247\t845\t\nTotal\n$34,954\t$29,037\t\nThe\tfollowing\ttable\tpresents\tinventory\tby\treportable\tsegment\t(in\tmillions):\nDecember\t31,\n2023\nDecember\t31,\n2022\nAutomotive$11,139\t$10,996\t\nEnergy\tgeneration\tand\tstorage2,487\t1,843\t\nTotal\n$13,626\t$12,839\t\nNote\t19\t–\tRestructuring\tand\tOther", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 94, "lines": { "from": 1, "to": 45 } } } }, { "pageContent": "Note\t19\t–\tRestructuring\tand\tOther\nDuring\tthe\tyears\tended\tDecember\t31,\t2022\tand\t2021,\twe\trecorded\t$204\tmillion\tand\t$101\tmillion,\trespectively,\tof\timpairment\tlosses\ton\tdigital\nassets.\tDuring\tthe\tyears\tended\tDecember\t31,\t2022\tand\t2021\twe\talso\trealized\tgains\tof\t$64\tmillion\tand\t$128\tmillion,\trespectively,\tin\tconnection\twith\nconverting\tour\tholdings\tof\tdigital\tassets\tinto\tfiat\tcurrency.\tWe\talso\trecorded\tother\texpenses\tof\t$36\tmillion\tduring\tthe\tsecond\tquarter\tof\tthe\tyear\tended\nDecember\t31,\t2022,\trelated\tto\temployee\tterminations.\n92", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 94, "lines": { "from": 45, "to": 50 } } } }, { "pageContent": "ITEM\t9.\tCHANGES\tIN\tAND\tDISAGREEMENTS\tWITH\tACCOUNTANTS\tON\tACCOUNTING\tAND\tFINANCIAL\tDISCLOSURE\nNone.\nITEM\t9A.\tCONTROLS\tAND\tPROCEDURES\nEvaluation\tof\tDisclosure\tControls\tand\tProcedures\nOur\tmanagement,\twith\tthe\tparticipation\tof\tour\tChief\tExecutive\tOfficer\tand\tour\tChief\tFinancial\tOfficer,\tevaluated\tthe\teffectiveness\tof\tour\tdisclosure\ncontrols\tand\tprocedures\tpursuant\tto\tRule\t13a-15\tunder\tthe\tSecurities\tExchange\tAct\tof\t1934,\tas\tamended\t(the\t“Exchange\tAct”).\tIn\tdesigning\tand\nevaluating\tthe\tdisclosure\tcontrols\tand\tprocedures,\tour\tmanagement\trecognizes\tthat\tany\tcontrols\tand\tprocedures,\tno\tmatter\thow\twell\tdesigned\tand\noperated,\tcan\tprovide\tonly\treasonable\tassurance\tof\tachieving\tthe\tdesired\tcontrol\tobjectives.\tIn\taddition,\tthe\tdesign\tof\tdisclosure\tcontrols\tand\tprocedures\nmust\treflect\tthe\tfact\tthat\tthere\tare\tresource\tconstraints\tand\tthat\tour\tmanagement\tis\trequired\tto\tapply\tits\tjudgment\tin\tevaluating\tthe\tbenefits\tof\tpossible\ncontrols\tand\tprocedures\trelative\tto\ttheir\tcosts.\nBased\ton\tthis\tevaluation,\tour\tChief\tExecutive\tOfficer\tand\tour\tChief\tFinancial\tOfficer\tconcluded\tthat,\tas\tof\tDecember\t31,\t2023,\tour\tdisclosure\ncontrols\tand\tprocedures\twere\tdesigned\tat\ta\treasonable\tassurance\tlevel\tand\twere\teffective\tto\tprovide\treasonable\tassurance\tthat\tthe\tinformation\twe\tare\nrequired\tto\tdisclose\tin\treports\tthat\twe\tfile\tor\tsubmit\tunder\tthe\tExchange\tAct\tis\trecorded,\tprocessed,\tsummarized\tand\treported\twithin\tthe\ttime\tperiods\nspecified\tin\tthe\tSEC\trules\tand\tforms,\tand\tthat\tsuch\tinformation\tis\taccumulated\tand\tcommunicated\tto\tour\tmanagement,\tincluding\tour\tChief\tExecutive\nOfficer\tand\tour\tChief\tFinancial\tOfficer,\tas\tappropriate,\tto\tallow\ttimely\tdecisions\tregarding\trequired\tdisclosures.\nManagement’s\tReport\ton\tInternal\tControl\tover\tFinancial\tReporting\nOur\tmanagement\tis\tresponsible\tfor\testablishing\tand\tmaintaining\tadequate\tinternal\tcontrol\tover\tfinancial\treporting.\tInternal\tcontrol\tover\tfinancial", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 95, "lines": { "from": 1, "to": 17 } } } }, { "pageContent": "reporting\tis\ta\tprocess\tdesigned\tby,\tor\tunder\tthe\tsupervision\tof,\tour\tChief\tExecutive\tOfficer\tand\tChief\tFinancial\tOfficer\tto\tprovide\treasonable\tassurance\nregarding\tthe\treliability\tof\tfinancial\treporting\tand\tthe\tpreparation\tof\tfinancial\tstatements\tfor\texternal\tpurposes\tin\taccordance\twith\tgenerally\taccepted\naccounting\tprinciples\tand\tincludes\tthose\tpolicies\tand\tprocedures\tthat\t(1)\tpertain\tto\tthe\tmaintenance\tof\trecords\tthat\tin\treasonable\tdetail\taccurately\tand\nfairly\treflect\tthe\ttransactions\tand\tdispositions\tof\tour\tassets;\t(2)\tprovide\treasonable\tassurance\tthat\ttransactions\tare\trecorded\tas\tnecessary\tto\tpermit\npreparation\tof\tfinancial\tstatements\tin\taccordance\twith\tgenerally\taccepted\taccounting\tprinciples,\tand\tthat\tour\treceipts\tand\texpenditures\tare\tbeing\tmade\nonly\tin\taccordance\twith\tauthorizations\tof\tour\tmanagement\tand\tdirectors\tand\t(3)\tprovide\treasonable\tassurance\tregarding\tprevention\tor\ttimely\tdetection\nof\tunauthorized\tacquisition,\tuse\tor\tdisposition\tof\tour\tassets\tthat\tcould\thave\ta\tmaterial\teffect\ton\tthe\tfinancial\tstatements.\nUnder\tthe\tsupervision\tand\twith\tthe\tparticipation\tof\tour\tmanagement,\tincluding\tour\tChief\tExecutive\tOfficer\tand\tChief\tFinancial\tOfficer,\twe\tconducted\nan\tevaluation\tof\tthe\teffectiveness\tof\tour\tinternal\tcontrol\tover\tfinancial\treporting\tbased\ton\tcriteria\testablished\tin\tInternal\tControl\t–\tIntegrated\tFramework\n(2013)\tissued\tby\tthe\tCommittee\tof\tSponsoring\tOrganizations\tof\tthe\tTreadway\tCommission\t(“COSO”).\tOur\tmanagement\tconcluded\tthat\tour\tinternal\ncontrol\tover\tfinancial\treporting\twas\teffective\tas\tof\tDecember\t31,\t2023.\nOur\tindependent\tregistered\tpublic\taccounting\tfirm,\tPricewaterhouseCoopers\tLLP,\thas\taudited\tthe\teffectiveness\tof\tour\tinternal\tcontrol\tover\tfinancial\nreporting\tas\tof\tDecember\t31,\t2023,\tas\tstated\tin\ttheir\treport\twhich\tis\tincluded\therein.\nLimitations\ton\tthe\tEffectiveness\tof\tControls\nBecause\tof\tinherent\tlimitations,\tinternal\tcontrol\tover\tfinancial\treporting\tmay\tnot\tprevent\tor\tdetect\tmisstatements\tand\tprojections\tof\tany\tevaluation", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 95, "lines": { "from": 18, "to": 32 } } } }, { "pageContent": "of\teffectiveness\tto\tfuture\tperiods\tare\tsubject\tto\tthe\trisk\tthat\tcontrols\tmay\tbecome\tinadequate\tbecause\tof\tchanges\tin\tconditions,\tor\tthat\tthe\tdegree\tof\ncompliance\twith\tthe\tpolicies\tor\tprocedures\tmay\tdeteriorate.\nChanges\tin\tInternal\tControl\tover\tFinancial\tReporting\nThere\twas\tno\tchange\tin\tour\tinternal\tcontrol\tover\tfinancial\treporting\tthat\toccurred\tduring\tthe\tquarter\tended\tDecember\t31,\t2023,\twhich\thas\nmaterially\taffected,\tor\tis\treasonably\tlikely\tto\tmaterially\taffect,\tour\tinternal\tcontrol\tover\tfinancial\treporting.\n93", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 95, "lines": { "from": 33, "to": 38 } } } }, { "pageContent": "ITEM\t9B.\tOTHER\tINFORMATION\nNone\tof\tthe\tCompany’s\tdirectors\tor\tofficers\tadopted,\tmodified\tor\tterminated\ta\tRule\t10b5-1\ttrading\tarrangement\tor\ta\tnon-Rule\t10b5-1\ttrading\narrangement\tduring\tthe\tCompany’s\tfiscal\tquarter\tended\tDecember\t31,\t2023,\tas\tsuch\tterms\tare\tdefined\tunder\tItem\t408(a)\tof\tRegulation\tS-K,\texcept\tas\nfollows:\nOn\tOctober\t23,\t2023,\tRobyn\tDenholm,\tone\tof\tour\tdirectors,\tadopted\ta\tRule\t10b5-1\ttrading\tarrangement\tfor\tthe\tpotential\tsale\tof\tup\tto\t281,116\nshares\tof\tour\tcommon\tstock,\tsubject\tto\tcertain\tconditions.\tThe\ttrading\tarrangement\tcovers\tstock\toptions\tthat\texpire\tin\tAugust\t2024.\tThe\tarrangement's\nexpiration\tdate\tis\tAugust\t16,\t2024.\nOn\tNovember\t13,\t2023,\tAndrew\tBaglino,\tSenior\tVice\tPresident,\tPowertrain\tand\tEnergy\tEngineering,\tadopted\ta\tRule\t10b5-1\ttrading\tarrangement\tfor\nthe\tpotential\tsale\tof\tup\tto\t115,500\tshares\tof\tour\tcommon\tstock,\tsubject\tto\tcertain\tconditions.\tThe\tarrangement's\texpiration\tdate\tis\tDecember\t31,\t2024.\nITEM\t9C.\tDISCLOSURE\tREGARDING\tFOREIGN\tJURISDICTIONS\tTHAT\tPREVENT\tINSPECTIONS\nNot\tapplicable.\n94", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 96, "lines": { "from": 1, "to": 12 } } } }, { "pageContent": "PART\tIII\nITEM\t10.\tDIRECTORS,\tEXECUTIVE\tOFFICERS\tAND\tCORPORATE\tGOVERNANCE\nThe\tinformation\trequired\tby\tthis\tItem\t10\tof\tForm\t10-K\twill\tbe\tincluded\tin\tour\t2024\tProxy\tStatement\tto\tbe\tfiled\twith\tthe\tSecurities\tand\tExchange\nCommission\tin\tconnection\twith\tthe\tsolicitation\tof\tproxies\tfor\tour\t2024\tAnnual\tMeeting\tof\tStockholders\tand\tis\tincorporated\therein\tby\treference.\tThe\t2024\nProxy\tStatement\twill\tbe\tfiled\twith\tthe\tSecurities\tand\tExchange\tCommission\twithin\t120\tdays\tafter\tthe\tend\tof\tthe\tfiscal\tyear\tto\twhich\tthis\treport\trelates.\nITEM\t11.\tEXECUTIVE\tCOMPENSATION\nThe\tinformation\trequired\tby\tthis\tItem\t11\tof\tForm\t10-K\twill\tbe\tincluded\tin\tour\t2024\tProxy\tStatement\tand\tis\tincorporated\therein\tby\treference.\nITEM\t12.\tSECURITY\tOWNERSHIP\tOF\tCERTAIN\tBENEFICIAL\tOWNERS\tAND\tMANAGEMENT\tAND\tRELATED\tSTOCKHOLDER\tMATTERS\nThe\tinformation\trequired\tby\tthis\tItem\t12\tof\tForm\t10-K\twill\tbe\tincluded\tin\tour\t2024\tProxy\tStatement\tand\tis\tincorporated\therein\tby\treference.\nITEM\t13.\tCERTAIN\tRELATIONSHIPS\tAND\tRELATED\tTRANSACTIONS\tAND\tDIRECTOR\tINDEPENDENCE\nThe\tinformation\trequired\tby\tthis\tItem\t13\tof\tForm\t10-K\twill\tbe\tincluded\tin\tour\t2024\tProxy\tStatement\tand\tis\tincorporated\therein\tby\treference.\nITEM\t14.\tPRINCIPAL\tACCOUNTANT\tFEES\tAND\tSERVICES\nThe\tinformation\trequired\tby\tthis\tItem\t14\tof\tForm\t10-K\twill\tbe\tincluded\tin\tour\t2024\tProxy\tStatement\tand\tis\tincorporated\therein\tby\treference.\n95", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 97, "lines": { "from": 1, "to": 14 } } } }, { "pageContent": "PART\tIV\nITEM\t15.\tEXHIBITS\tAND\tFINANCIAL\tSTATEMENT\tSCHEDULES\n1.Financial\tstatements\t(see\tIndex\tto\tConsolidated\tFinancial\tStatements\tin\tPart\tII,\tItem\t8\tof\tthis\treport)\n2.All\tfinancial\tstatement\tschedules\thave\tbeen\tomitted\tsince\tthe\trequired\tinformation\twas\tnot\tapplicable\tor\twas\tnot\tpresent\tin\tamounts\tsufficient\tto\nrequire\tsubmission\tof\tthe\tschedules,\tor\tbecause\tthe\tinformation\trequired\tis\tincluded\tin\tthe\tconsolidated\tfinancial\tstatements\tor\tthe\taccompanying\nnotes\n3.The\texhibits\tlisted\tin\tthe\tfollowing\tIndex\tto\tExhibits\tare\tfiled\tor\tincorporated\tby\treference\tas\tpart\tof\tthis\treport\nINDEX\tTO\tEXHIBITS\nExhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n3.1Amended\tand\tRestated\tCertificate\tof\nIncorporation\tof\tthe\tRegistrant.\n10-K001-347563.1March\t1,\t2017\n3.2Certificate\tof\tAmendment\tto\tthe\tAmended\tand\nRestated\tCertificate\tof\tIncorporation\tof\tthe\nRegistrant.\n10-K001-347563.2March\t1,\t2017\n3.3Amended\tand\tRestated\tBylaws\tof\tthe\tRegistrant.8-K001-347563.1April\t5,\t2023\n4.1Specimen\tcommon\tstock\tcertificate\tof\tthe\nRegistrant.\n10-K001-347564.1March\t1,\t2017\n4.2Fifth\tAmended\tand\tRestated\tInvestors’\tRights\nAgreement,\tdated\tas\tof\tAugust\t31,\t2009,\tbetween\nRegistrant\tand\tcertain\tholders\tof\tthe\tRegistrant’s\ncapital\tstock\tnamed\ttherein.\nS-1333-1645934.2January\t29,\t2010\n4.3Amendment\tto\tFifth\tAmended\tand\tRestated\nInvestors’\tRights\tAgreement,\tdated\tas\tof\tMay\t20,\n2010,\tbetween\tRegistrant\tand\tcertain\tholders\tof\nthe\tRegistrant’s\tcapital\tstock\tnamed\ttherein.\nS-1/A333-1645934.2AMay\t27,\t2010\n4.4Amendment\tto\tFifth\tAmended\tand\tRestated\nInvestors’\tRights\tAgreement\tbetween\tRegistrant,\nToyota\tMotor\tCorporation\tand\tcertain\tholders\tof\nthe\tRegistrant’s\tcapital\tstock\tnamed\ttherein.\nS-1/A333-1645934.2BMay\t27,\t2010\n4.5Amendment\tto\tFifth\tAmended\tand\tRestated\nInvestor’s\tRights\tAgreement,\tdated\tas\tof\tJune\t14,\n2010,\tbetween\tRegistrant\tand\tcertain\tholders\tof\nthe\tRegistrant’s\tcapital\tstock\tnamed\ttherein.\nS-1/A333-1645934.2CJune\t15,\t2010", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 98, "lines": { "from": 1, "to": 44 } } } }, { "pageContent": "S-1/A333-1645934.2CJune\t15,\t2010\n4.6Amendment\tto\tFifth\tAmended\tand\tRestated\nInvestor’s\tRights\tAgreement,\tdated\tas\tof\nNovember\t2,\t2010,\tbetween\tRegistrant\tand\ncertain\tholders\tof\tthe\tRegistrant’s\tcapital\tstock\nnamed\ttherein.\n8-K001-347564.1November\t4,\t2010\n96", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 98, "lines": { "from": 44, "to": 51 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n4.7Waiver\tto\tFifth\tAmended\tand\tRestated\tInvestor’s\nRights\tAgreement,\tdated\tas\tof\tMay\t22,\t2011,\nbetween\tRegistrant\tand\tcertain\tholders\tof\tthe\nRegistrant’s\tcapital\tstock\tnamed\ttherein.\nS-1/A333-1744664.2EJune\t2,\t2011\n4.8Amendment\tto\tFifth\tAmended\tand\tRestated\nInvestor’s\tRights\tAgreement,\tdated\tas\tof\tMay\t30,\n2011,\tbetween\tRegistrant\tand\tcertain\tholders\tof\nthe\tRegistrant’s\tcapital\tstock\tnamed\ttherein.\n8-K001-347564.1June\t1,\t2011\n4.9Sixth\tAmendment\tto\tFifth\tAmended\tand\tRestated\nInvestors’\tRights\tAgreement,\tdated\tas\tof\tMay\t15,\n2013\tamong\tthe\tRegistrant,\tthe\tElon\tMusk\nRevocable\tTrust\tdated\tJuly\t22,\t2003\tand\tcertain\nother\tholders\tof\tthe\tcapital\tstock\tof\tthe\tRegistrant\nnamed\ttherein.\n8-K001-347564.1May\t20,\t2013\n4.10Waiver\tto\tFifth\tAmended\tand\tRestated\tInvestor’s\nRights\tAgreement,\tdated\tas\tof\tMay\t14,\t2013,\nbetween\tthe\tRegistrant\tand\tcertain\tholders\tof\tthe\ncapital\tstock\tof\tthe\tRegistrant\tnamed\ttherein.\n8-K001-347564.2May\t20,\t2013\n4.11Waiver\tto\tFifth\tAmended\tand\tRestated\tInvestor’s\nRights\tAgreement,\tdated\tas\tof\tAugust\t13,\t2015,\nbetween\tthe\tRegistrant\tand\tcertain\tholders\tof\tthe\ncapital\tstock\tof\tthe\tRegistrant\tnamed\ttherein.\n8-K001-347564.1August\t19,\t2015\n4.12Waiver\tto\tFifth\tAmended\tand\tRestated\tInvestors’\nRights\tAgreement,\tdated\tas\tof\tMay\t18,\t2016,\nbetween\tthe\tRegistrant\tand\tcertain\tholders\tof\tthe\ncapital\tstock\tof\tthe\tRegistrant\tnamed\ttherein.\n8-K001-347564.1May\t24,\t2016\n4.13Waiver\tto\tFifth\tAmended\tand\tRestated\tInvestors’\nRights\tAgreement,\tdated\tas\tof\tMarch\t15,\t2017,\nbetween\tthe\tRegistrant\tand\tcertain\tholders\tof\tthe\ncapital\tstock\tof\tthe\tRegistrant\tnamed\ttherein.\n8-K001-347564.1March\t17,\t2017\n4.14Waiver\tto\tFifth\tAmended\tand\tRestated\tInvestors’\nRights\tAgreement,\tdated\tas\tof\tMay\t1,\t2019,\nbetween\tthe\tRegistrant\tand\tcertain\tholders\tof\tthe\ncapital\tstock\tof\tthe\tRegistrant\tnamed\ttherein.\n8-K001-347564.1May\t3,\t2019\n4.15Indenture,\tdated\tas\tof\tMay\t22,\t2013,\tby\tand", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 99, "lines": { "from": 1, "to": 48 } } } }, { "pageContent": "4.15Indenture,\tdated\tas\tof\tMay\t22,\t2013,\tby\tand\nbetween\tthe\tRegistrant\tand\tU.S.\tBank\tNational\nAssociation.\n8-K001-347564.1May\t22,\t2013\n97", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 99, "lines": { "from": 48, "to": 52 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n4.16Fifth\tSupplemental\tIndenture,\tdated\tas\tof\tMay\t7,\n2019,\tby\tand\tbetween\tRegistrant\tand\tU.S.\tBank\nNational\tAssociation,\trelated\tto\t2.00%\tConvertible\nSenior\tNotes\tdue\tMay\t15,\t2024.\n8-K001-347564.2May\t8,\t2019\n4.17Form\tof\t2.00%\tConvertible\tSenior\tNotes\tdue\tMay\n15,\t2024\t(included\tin\tExhibit\t4.16).\n8-K001-347564.2May\t8,\t2019\n4.18Indenture,\tdated\tas\tof\tOctober\t15,\t2014,\tbetween\nSolarCity\tand\tU.S.\tBank\tNational\tAssociation,\tas\ntrustee.\nS-3ASR(1)333-1993214.1October\t15,\t2014\n4.19Tenth\tSupplemental\tIndenture,\tdated\tas\tof\tMarch\n9,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.00%\tSolar\tBonds,\nSeries\t2015/6-10.\n8-K(1)001-357584.3March\t9,\t2015\n4.20Eleventh\tSupplemental\tIndenture,\tdated\tas\tof\nMarch\t9,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.75%\tSolar\tBonds,\nSeries\t2015/7-15.\n8-K(1)001-357584.4March\t9,\t2015\n4.21Fifteenth\tSupplemental\tIndenture,\tdated\tas\tof\nMarch\t19,\t2015,\tby\tand\tbetween\tSolarCity\tand\nthe\tTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\nBonds,\tSeries\t2015/C4-10.\n8-K(1)001-357584.5March\t19,\t2015\n4.22Sixteenth\tSupplemental\tIndenture,\tdated\tas\tof\nMarch\t19,\t2015,\tby\tand\tbetween\tSolarCity\tand\nthe\tTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\nBonds,\tSeries\t2015/C5-15.\n8-K(1)001-357584.6March\t19,\t2015\n4.23Twentieth\tSupplemental\tIndenture,\tdated\tas\tof\nMarch\t26,\t2015,\tby\tand\tbetween\tSolarCity\tand\nthe\tTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\nBonds,\tSeries\t2015/C9-10.\n8-K(1)001-357584.5March\t26,\t2015\n4.24Twenty-First\tSupplemental\tIndenture,\tdated\tas\tof\nMarch\t26,\t2015,\tby\tand\tbetween\tSolarCity\tand\nthe\tTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\nBonds,\tSeries\t2015/C10-15.\n8-K(1)001-357584.6March\t26,\t2015\n4.25Twenty-Sixth\tSupplemental\tIndenture,\tdated\tas\tof\nApril\t2,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C14-10.\n8-K(1)001-357584.5April\t2,\t2015", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 100, "lines": { "from": 1, "to": 52 } } } }, { "pageContent": "8-K(1)001-357584.5April\t2,\t2015\n4.26Thirtieth\tSupplemental\tIndenture,\tdated\tas\tof\nApril\t9,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C19-10.\n8-K(1)001-357584.5April\t9,\t2015\n98", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 100, "lines": { "from": 52, "to": 58 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n4.27Thirty-First\tSupplemental\tIndenture,\tdated\tas\tof\nApril\t9,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C20-15.\n8-K(1)001-357584.6April\t9,\t2015\n4.28Thirty-Fifth\tSupplemental\tIndenture,\tdated\tas\tof\nApril\t14,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C24-10.\n8-K(1)001-357584.5April\t14,\t2015\n4.29Thirty-Sixth\tSupplemental\tIndenture,\tdated\tas\tof\nApril\t14,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C25-15.\n8-K(1)001-357584.6April\t14,\t2015\n4.30Thirty-Eighth\tSupplemental\tIndenture,\tdated\tas\tof\nApril\t21,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C27-10.\n8-K(1)001-357584.3April\t21,\t2015\n4.31Thirty-Ninth\tSupplemental\tIndenture,\tdated\tas\tof\nApril\t21,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C28-15.\n8-K(1)001-357584.4April\t21,\t2015\n4.32Forty-Third\tSupplemental\tIndenture,\tdated\tas\tof\nApril\t27,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C32-10.\n8-K(1)001-357584.5April\t27,\t2015\n4.33Forty-Fourth\tSupplemental\tIndenture,\tdated\tas\tof\nApril\t27,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C33-15.\n8-K(1)001-357584.6April\t27,\t2015\n4.34Forty-Eighth\tSupplemental\tIndenture,\tdated\tas\tof\nMay\t1,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.00%\tSolar\tBonds,\nSeries\t2015/12-10.\n8-K(1)001-357584.5May\t1,\t2015\n4.35Forty-Ninth\tSupplemental\tIndenture,\tdated\tas\tof\nMay\t1,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.75%\tSolar\tBonds,\nSeries\t2015/13-15.\n8-K(1)001-357584.6May\t1,\t2015\n4.36Fifty-Second\tSupplemental\tIndenture,\tdated\tas\tof", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 101, "lines": { "from": 1, "to": 51 } } } }, { "pageContent": "May\t11,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C36-10.\n8-K(1)001-357584.4May\t11,\t2015\n99", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 101, "lines": { "from": 52, "to": 56 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n4.37Fifty-Third\tSupplemental\tIndenture,\tdated\tas\tof\nMay\t11,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C37-15.\n8-K(1)001-357584.5May\t11,\t2015\n4.38Fifty-Seventh\tSupplemental\tIndenture,\tdated\tas\tof\nMay\t18,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C40-10.\n8-K(1)001-357584.4May\t18,\t2015\n4.39Fifty-Eighth\tSupplemental\tIndenture,\tdated\tas\tof\nMay\t18,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C41-15.\n8-K(1)001-357584.5May\t18,\t2015\n4.40Sixty-First\tSupplemental\tIndenture,\tdated\tas\tof\nMay\t26,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C44-10.\n8-K(1)001-357584.4May\t26,\t2015\n4.41Sixty-Second\tSupplemental\tIndenture,\tdated\tas\tof\nMay\t26,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C45-15.\n8-K(1)001-357584.5May\t26,\t2015\n4.42Seventieth\tSupplemental\tIndenture,\tdated\tas\tof\nJune\t16,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C52-10.\n8-K(1)001-357584.4June\t16,\t2015\n4.43Seventy-First\tSupplemental\tIndenture,\tdated\tas\tof\nJune\t16,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C53-15.\n8-K(1)001-357584.5June\t16,\t2015\n4.44Seventy-Fourth\tSupplemental\tIndenture,\tdated\tas\nof\tJune\t22,\t2015,\tby\tand\tbetween\tSolarCity\tand\nthe\tTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\nBonds,\tSeries\t2015/C56-10.\n8-K(1)001-357584.4June\t23,\t2015\n4.45Seventy-Fifth\tSupplemental\tIndenture,\tdated\tas\tof\nJune\t22,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C57-15.\n8-K(1)001-357584.5June\t23,\t2015\n4.46Eightieth\tSupplemental\tIndenture,\tdated\tas\tof", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 102, "lines": { "from": 1, "to": 51 } } } }, { "pageContent": "4.46Eightieth\tSupplemental\tIndenture,\tdated\tas\tof\nJune\t29,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C61-10.\n8-K(1)001-357584.5June\t29,\t2015\n100", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 102, "lines": { "from": 51, "to": 56 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n4.47Eighty-First\tSupplemental\tIndenture,\tdated\tas\tof\nJune\t29,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C62-15.\n8-K(1)001-357584.6June\t29,\t2015\n4.48Ninetieth\tSupplemental\tIndenture,\tdated\tas\tof\tJuly\n20,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t4.70%\tSolar\tBonds,\nSeries\t2015/C71-10.\n8-K(1)001-357584.5July\t21,\t2015\n4.49Ninety-First\tSupplemental\tIndenture,\tdated\tas\tof\nJuly\t20,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.45%\tSolar\tBonds,\nSeries\t2015/C72-15.\n8-K(1)001-357584.6July\t21,\t2015\n4.50Ninety-Fifth\tSupplemental\tIndenture,\tdated\tas\tof\nJuly\t31,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.00%\tSolar\tBonds,\nSeries\t2015/20-10.\n8-K(1)001-357584.5July\t31,\t2015\n4.51Ninety-Sixth\tSupplemental\tIndenture,\tdated\tas\tof\nJuly\t31,\t2015,\tby\tand\tbetween\tSolarCity\tand\tthe\nTrustee,\trelated\tto\tSolarCity’s\t5.75%\tSolar\tBonds,\nSeries\t2015/21-15.\n8-K(1)001-357584.6July\t31,\t2015\n4.52One\tHundred-and-Fifth\tSupplemental\tIndenture,\ndated\tas\tof\tAugust\t10,\t2015,\tby\tand\tbetween\nSolarCity\tand\tthe\tTrustee,\trelated\tto\tSolarCity’s\n4.70%\tSolar\tBonds,\tSeries\t2015/C81-10.\n8-K(1)001-357584.5August\t10,\t2015\n4.53One\tHundred-and-Eleventh\tSupplemental\nIndenture,\tdated\tas\tof\tAugust\t17,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.45%\tSolar\tBonds,\tSeries\t2015/C87-\n15.\n8-K(1)001-357584.6August\t17,\t2015\n4.54One\tHundred-and-Sixteenth\tSupplemental\nIndenture,\tdated\tas\tof\tAugust\t24,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.45%\tSolar\tBonds,\tSeries\t2015/C92-\n15.\n8-K(1)001-357584.6August\t24,\t2015\n4.55One\tHundred-and-Twenty-First\tSupplemental\nIndenture,\tdated\tas\tof\tAugust\t31,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.45%\tSolar\tBonds,\tSeries\t2015/C97-\n15.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 103, "lines": { "from": 1, "to": 52 } } } }, { "pageContent": "15.\n8-K(1)001-357584.6August\t31,\t2015\n4.56One\tHundred-and-Twenty-Eighth\tSupplemental\nIndenture,\tdated\tas\tof\tSeptember\t14,\t2015,\tby\nand\tbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t4.70%\tSolar\tBonds,\tSeries\t2015/C101-\n10.\n8-K(1)001-357584.5September\t15,\t2015\n101", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 103, "lines": { "from": 52, "to": 60 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n4.57One\tHundred-and-Twenty-Ninth\tSupplemental\nIndenture,\tdated\tas\tof\tSeptember\t14,\t2015,\tby\nand\tbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.45%\tSolar\tBonds,\tSeries\t2015/C102-\n15.\n8-K(1)001-357584.6September\t15,\t2015\n4.58One\tHundred-and-Thirty-Third\tSupplemental\nIndenture,\tdated\tas\tof\tSeptember\t28,\t2015,\tby\nand\tbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t4.70%\tSolar\tBonds,\tSeries\t2015/C106-\n10.\n8-K(1)001-357584.5September\t29,\t2015\n4.59One\tHundred-and-Thirty-Fourth\tSupplemental\nIndenture,\tdated\tas\tof\tSeptember\t28,\t2015,\tby\nand\tbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.45%\tSolar\tBonds,\tSeries\t2015/C107-\n15.\n8-K(1)001-357584.6September\t29,\t2015\n4.60One\tHundred-and-Thirty-Eighth\tSupplemental\nIndenture,\tdated\tas\tof\tOctober\t13,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t4.70%\tSolar\tBonds,\tSeries\t2015/C111-\n10.\n8-K(1)001-357584.5October\t13,\t2015\n4.61One\tHundred-and-Forty-Third\tSupplemental\nIndenture,\tdated\tas\tof\tOctober\t30,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.00%\tSolar\tBonds,\tSeries\t2015/25-10.\n8-K(1)001-357584.5October\t30,\t2015\n4.62One\tHundred-and-Forty-Fourth\tSupplemental\nIndenture,\tdated\tas\tof\tOctober\t30,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.75%\tSolar\tBonds,\tSeries\t2015/26-15.\n8-K(1)001-357584.6October\t30,\t2015\n4.63One\tHundred-and-Forty-Eighth\tSupplemental\nIndenture,\tdated\tas\tof\tNovember\t4,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t4.70%\tSolar\tBonds,\tSeries\t2015/C116-\n10.\n8-K(1)001-357584.5November\t4,\t2015\n4.64One\tHundred-and-Fifty-Third\tSupplemental\nIndenture,\tdated\tas\tof\tNovember\t16,\t2015,\tby\nand\tbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t4.70%\tSolar\tBonds,\tSeries\t2015/C121-\n10.\n8-K(1)001-357584.5November\t17,\t2015\n4.65One\tHundred-and-Fifty-Fourth\tSupplemental", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 104, "lines": { "from": 1, "to": 52 } } } }, { "pageContent": "4.65One\tHundred-and-Fifty-Fourth\tSupplemental\nIndenture,\tdated\tas\tof\tNovember\t16,\t2015,\tby\nand\tbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.45%\tSolar\tBonds,\tSeries\t2015/C122-\n15.\n8-K(1)001-357584.6November\t17,\t2015\n102", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 104, "lines": { "from": 52, "to": 58 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n4.66One\tHundred-and-Fifty-Eighth\tSupplemental\nIndenture,\tdated\tas\tof\tNovember\t30,\t2015,\tby\nand\tbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t4.70%\tSolar\tBonds,\tSeries\t2015/C126-\n10.\n8-K(1)001-357584.5November\t30,\t2015\n4.67One\tHundred-and-Fifty-Ninth\tSupplemental\nIndenture,\tdated\tas\tof\tNovember\t30,\t2015,\tby\nand\tbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.45%\tSolar\tBonds,\tSeries\t2015/C127-\n15.\n8-K(1)001-357584.6November\t30,\t2015\n4.68One\tHundred-and-Sixty-Third\tSupplemental\nIndenture,\tdated\tas\tof\tDecember\t14,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t4.70%\tSolar\tBonds,\tSeries\t2015/C131-\n10.\n8-K(1)001-357584.5December\t14,\t2015\n4.69One\tHundred-and-Sixty-Fourth\tSupplemental\nIndenture,\tdated\tas\tof\tDecember\t14,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.45%\tSolar\tBonds,\tSeries\t2015/C132-\n15.\n8-K(1)001-357584.6December\t14,\t2015\n4.70One\tHundred-and-Sixty-Eighth\tSupplemental\nIndenture,\tdated\tas\tof\tDecember\t28,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t4.70%\tSolar\tBonds,\tSeries\t2015/C136-\n10.\n8-K(1)001-357584.5December\t28,\t2015\n4.71One\tHundred-and-Sixty-Ninth\tSupplemental\nIndenture,\tdated\tas\tof\tDecember\t28,\t2015,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.45%\tSolar\tBonds,\tSeries\t2015/C137-\n15.\n8-K(1)001-357584.6December\t28,\t2015\n4.72One\tHundred-and-Seventy-Third\tSupplemental\nIndenture,\tdated\tas\tof\tJanuary\t29,\t2016,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.00%\tSolar\tBonds,\tSeries\t2016/4-10.\n8-K(1)001-357584.5January\t29,\t2016\n4.73One\tHundred-and-Seventy-Fourth\tSupplemental\nIndenture,\tdated\tas\tof\tJanuary\t29,\t2016,\tby\tand\nbetween\tSolarCity\tand\tthe\tTrustee,\trelated\tto\nSolarCity’s\t5.75%\tSolar\tBonds,\tSeries\t2016/5-15.\n8-K(1)001-357584.6January\t29,\t2016", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 105, "lines": { "from": 1, "to": 51 } } } }, { "pageContent": "8-K(1)001-357584.6January\t29,\t2016\n4.74Description\tof\tRegistrant’s\tSecurities10-K001-347564.119February\t13,\t2020\n10.1**Form\tof\tIndemnification\tAgreement\tbetween\tthe\nRegistrant\tand\tits\tdirectors\tand\tofficers.\nS-1/A333-16459310.1June\t15,\t2010\n10.2**2003\tEquity\tIncentive\tPlan.S-1/A333-16459310.2May\t27,\t2010\n103", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 105, "lines": { "from": 51, "to": 57 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n10.3**Form\tof\tStock\tOption\tAgreement\tunder\t2003\nEquity\tIncentive\tPlan.\nS-1333-16459310.3January\t29,\t2010\n10.4**Amended\tand\tRestated\t2010\tEquity\tIncentive\nPlan.\n10-K001-3475610.4February\t23,\t2018\n10.5**Form\tof\tStock\tOption\tAgreement\tunder\t2010\nEquity\tIncentive\tPlan.\n10-K001-3475610.6March\t1,\t2017\n10.6**Form\tof\tRestricted\tStock\tUnit\tAward\tAgreement\nunder\t2010\tEquity\tIncentive\tPlan.\n10-K001-3475610.7March\t1,\t2017\n10.7**Amended\tand\tRestated\t2010\tEmployee\tStock\nPurchase\tPlan,\teffective\tas\tof\tFebruary\t1,\t2017.\n10-K001-3475610.8March\t1,\t2017\n10.8**2019\tEquity\tIncentive\tPlan.S-8333-2320794.2June\t12,\t2019\n10.9**Form\tof\tStock\tOption\tAgreement\tunder\t2019\nEquity\tIncentive\tPlan.\nS-8333-2320794.3June\t12,\t2019\n10.10**Form\tof\tRestricted\tStock\tUnit\tAward\tAgreement\nunder\t2019\tEquity\tIncentive\tPlan.\nS-8333-2320794.4June\t12,\t2019\n10.11**Employee\tStock\tPurchase\tPlan,\teffective\tas\tof\nJune\t12,\t2019.\nS-8333-2320794.5June\t12,\t2019\n10.12**2007\tSolarCity\tStock\tPlan\tand\tform\tof\tagreements\nused\tthereunder.\nS-1(1)333-18431710.2October\t5,\t2012\n10.13**2012\tSolarCity\tEquity\tIncentive\tPlan\tand\tform\tof\nagreements\tused\tthereunder.\nS-1(1)333-18431710.3October\t5,\t2012\n10.14**2010\tZep\tSolar,\tInc.\tEquity\tIncentive\tPlan\tand\nform\tof\tagreements\tused\tthereunder.\nS-8(1)333-1929964.5December\t20,\t2013\n10.15**Offer\tLetter\tbetween\tthe\tRegistrant\tand\tElon\nMusk\tdated\tOctober\t13,\t2008.\nS-1333-16459310.9January\t29,\t2010\n10.16**Performance\tStock\tOption\tAgreement\tbetween\nthe\tRegistrant\tand\tElon\tMusk\tdated\tJanuary\t21,\n2018.\nDEF\t14A001-34756Appendix\tAFebruary\t8,\t2018\n10.17**Maxwell\tTechnologies,\tInc.\t2005\tOmnibus\tEquity\nIncentive\tPlan,\tas\tamended\tthrough\tMay\t6,\t2010\n8-K(2)001-1547710.1May\t10,\t2010\n10.18**Maxwell\tTechnologies,\tInc.\t2013\tOmnibus\tEquity\nIncentive\tPlan\nDEF\t14A(2)001-15477Appendix\tAJune\t2,\t2017\n10.19Indemnification\tAgreement,\teffective\tas\tof\tJune\n23,\t2020,\tbetween\tRegistrant\tand\tElon\tR.\tMusk.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 106, "lines": { "from": 1, "to": 54 } } } }, { "pageContent": "23,\t2020,\tbetween\tRegistrant\tand\tElon\tR.\tMusk.\n10-Q001-3475610.4July\t28,\t2020\n104", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 106, "lines": { "from": 54, "to": 56 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n10.20Indemnification\tAgreement,\tdated\tas\tof\tFebruary\n27,\t2014,\tby\tand\tbetween\tthe\tRegistrant\tand\tJ.P.\nMorgan\tSecurities\tLLC.\n8-K001-3475610.1March\t5,\t2014\n10.21Form\tof\tCall\tOption\tConfirmation\trelating\tto\n1.25%\tConvertible\tSenior\tNotes\tDue\tMarch\t1,\n2021.\n8-K001-3475610.3March\t5,\t2014\n10.22Form\tof\tWarrant\tConfirmation\trelating\tto\t1.25%\nConvertible\tSenior\tNotes\tDue\tMarch\t1,\t2021.\n8-K001-3475610.5March\t5,\t2014\n10.23Form\tof\tCall\tOption\tConfirmation\trelating\tto\n2.00%\tConvertible\tSenior\tNotes\tdue\tMay\t15,\n2024.\n8-K001-3475610.1May\t3,\t2019\n10.24Form\tof\tWarrant\tConfirmation\trelating\tto\t2.00%\nConvertible\tSenior\tNotes\tdue\tMay\t15,\t2024.\n8-K001-3475610.2May\t3,\t2019\n10.25†Supply\tAgreement\tbetween\tPanasonic\nCorporation\tand\tthe\tRegistrant\tdated\tOctober\t5,\n2011.\n10-K001-3475610.50February\t27,\t2012\n10.26†Amendment\tNo.\t1\tto\tSupply\tAgreement\tbetween\nPanasonic\tCorporation\tand\tthe\tRegistrant\tdated\nOctober\t29,\t2013.\n10-K001-3475610.35AFebruary\t26,\t2014\n10.27Agreement\tbetween\tPanasonic\tCorporation\tand\nthe\tRegistrant\tdated\tJuly\t31,\t2014.\n10-Q001-3475610.1November\t7,\t2014\n10.28†General\tTerms\tand\tConditions\tbetween\tPanasonic\nCorporation\tand\tthe\tRegistrant\tdated\tOctober\t1,\n2014.\n8-K001-3475610.2October\t11,\t2016\n10.29Letter\tAgreement,\tdated\tas\tof\tFebruary\t24,\t2015,\nregarding\taddition\tof\tco-party\tto\tGeneral\tTerms\nand\tConditions,\tProduction\tPricing\tAgreement\tand\nInvestment\tLetter\tAgreement\tbetween\tPanasonic\nCorporation\tand\tthe\tRegistrant.\n10-K001-3475610.25AFebruary\t24,\t2016\n10.30†Amendment\tto\tGigafactory\tGeneral\tTerms,\tdated\nMarch\t1,\t2016,\tby\tand\tamong\tthe\tRegistrant,\nPanasonic\tCorporation\tand\tPanasonic\tEnergy\nCorporation\tof\tNorth\tAmerica.\n8-K001-3475610.1October\t11,\t2016\n10.31††Amended\tand\tRestated\tGeneral\tTerms\tand\nConditions\tfor\tGigafactory,\tentered\tinto\ton\tJune\n10,\t2020,\tby\tand\tamong\tRegistrant,\tTesla\tMotors\nNetherlands\tB.V.,\tPanasonic\tCorporation\tand", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 107, "lines": { "from": 1, "to": 53 } } } }, { "pageContent": "Netherlands\tB.V.,\tPanasonic\tCorporation\tand\nPanasonic\tCorporation\tof\tNorth\tAmerica.\n10-Q001-3475610.2July\t28,\t2020\n10.32†Production\tPricing\tAgreement\tbetween\tPanasonic\nCorporation\tand\tthe\tRegistrant\tdated\tOctober\t1,\n2014.\n10-Q001-3475610.3November\t7,\t2014\n105", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 107, "lines": { "from": 53, "to": 60 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n10.33†Investment\tLetter\tAgreement\tbetween\tPanasonic\nCorporation\tand\tthe\tRegistrant\tdated\tOctober\t1,\n2014.\n10-Q001-3475610.4November\t7,\t2014\n10.34Amendment\tto\tGigafactory\tDocuments,\tdated\nApril\t5,\t2016,\tby\tand\tamong\tthe\tRegistrant,\nPanasonic\tCorporation,\tPanasonic\tCorporation\tof\nNorth\tAmerica\tand\tPanasonic\tEnergy\tCorporation\nof\tNorth\tAmerica.\n10-Q001-3475610.2May\t10,\t2016\n10.35††2019\tPricing\tAgreement\t(Japan\tCells)\twith\trespect\nto\t2011\tSupply\tAgreement,\texecuted\tSeptember\n20,\t2019,\tby\tand\tamong\tthe\tRegistrant,\tTesla\nMotors\tNetherlands\tB.V.,\tPanasonic\tCorporation\nand\tSANYO\tElectric\tCo.,\tLtd.\n10-Q001-3475610.6October\t29,\t2019\n10.36††2020\tPricing\tAgreement\t(Gigafactory\t2170\tCells),\nentered\tinto\ton\tJune\t9,\t2020,\tby\tand\tamong\nRegistrant,\tTesla\tMotors\tNetherlands\tB.V.,\nPanasonic\tCorporation\tand\tPanasonic\tCorporation\nof\tNorth\tAmerica.\n10-Q001-3475610.3July\t28,\t2020\n10.37††2021\tPricing\tAgreement\t(Japan\tCells)\twith\trespect\nto\t2011\tSupply\tAgreement,\texecuted\tDecember\n29,\t2020,\tby\tand\tamong\tthe\tRegistrant,\tTesla\nMotors\tNetherlands\tB.V.,\tPanasonic\tCorporation\tof\nNorth\tAmerica\tand\tSANYO\tElectric\tCo.,\tLtd.\n10-K001-3475610.39February\t8,\t2021\n10.38††Amended\tand\tRestated\tFactory\tLease,\texecuted\nas\tof\tMarch\t26,\t2019,\tby\tand\tbetween\tthe\nRegistrant\tand\tPanasonic\tEnergy\tNorth\tAmerica,\ta\ndivision\tof\tPanasonic\tCorporation\tof\tNorth\nAmerica,\tas\ttenant.\n10-Q001-3475610.3July\t29,\t2019\n10.39††Lease\tAmendment,\texecuted\tSeptember\t20,\n2019,\tby\tand\tamong\tthe\tRegistrant,\tPanasonic\nCorporation\tof\tNorth\tAmerica,\ton\tbehalf\tof\tits\ndivision\tPanasonic\tEnergy\tof\tNorth\tAmerica,\twith\nrespect\tto\tthe\tAmended\tand\tRestated\tFactory\nLease,\texecuted\tas\tof\tMarch\t26,\t2019.\n10-Q001-3475610.7October\t29,\t2019\n10.40††Second\tLease\tAmendment,\tentered\tinto\ton\tJune\n9,\t2020,\tby\tand\tbetween\tthe\tRegistrant\tand\nPanasonic\tEnergy\tof\tNorth\tAmerica,\ta\tdivision\tof\nPanasonic\tCorporation\tof\tNorth\tAmerica,\twith", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 108, "lines": { "from": 1, "to": 50 } } } }, { "pageContent": "Panasonic\tCorporation\tof\tNorth\tAmerica,\twith\nrespect\tto\tthe\tAmended\tand\tRestated\tFactory\nLease\tdated\tJanuary\t1,\t2017.\n10-Q001-3475610.1July\t28,\t2020\n106", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 108, "lines": { "from": 50, "to": 54 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n10.41Amendment\tand\tRestatement\tin\trespect\tof\tABL\nCredit\tAgreement,\tdated\tas\tof\tMarch\t6,\t2019,\tby\nand\tamong\tcertain\tof\tthe\tRegistrant’s\tand\tTesla\nMotors\tNetherlands\tB.V.’s\tdirect\tor\tindirect\nsubsidiaries\tfrom\ttime\tto\ttime\tparty\tthereto,\tas\nborrowers,\tWells\tFargo\tBank,\tNational\nAssociation,\tas\tdocumentation\tagent,\tJPMorgan\nChase\tBank,\tN.A.,\tGoldman\tSachs\tBank\tUSA,\nMorgan\tStanley\tSenior\tFunding\tInc.\tand\tBank\tof\nAmerica,\tN.A.,\tas\tsyndication\tagents,\tthe\tlenders\nfrom\ttime\tto\ttime\tparty\tthereto,\tand\tDeutsche\nBank\tAG\tNew\tYork\tBranch,\tas\tadministrative\nagent\tand\tcollateral\tagent.\nS-4/A333-22974910.68April\t3,\t2019\n10.42First\tAmendment\tto\tAmended\tand\tRestated\tABL\nCredit\tAgreement,\tdated\tas\tof\tDecember\t23,\n2020,\tin\trespect\tof\tthe\tAmended\tand\tRestated\nABL\tCredit\tAgreement,\tdated\tas\tof\tMarch\t6,\t2019,\nby\tand\tamong\tcertain\tof\tthe\tRegistrant’s\tand\nTesla\tMotors\tNetherlands\tB.V.’s\tdirect\tor\tindirect\nsubsidiaries\tfrom\ttime\tto\ttime\tparty\tthereto,\tas\nborrowers,\tWells\tFargo\tBank,\tNational\nAssociation,\tas\tdocumentation\tagent,\tJPMorgan\nChase\tBank,\tN.A.,\tGoldman\tSachs\tBank\tUSA,\nMorgan\tStanley\tSenior\tFunding\tInc.\tand\tBank\tof\nAmerica,\tN.A.,\tas\tsyndication\tagents,\tthe\tlenders\nfrom\ttime\tto\ttime\tparty\tthereto,\tand\tDeutsche\nBank\tAG\tNew\tYork\tBranch,\tas\tadministrative\nagent\tand\tcollateral\tagent.\n10-K001-3475610.44February\t8,\t2021\n10.43†Agreement\tfor\tTax\tAbatement\tand\tIncentives,\ndated\tas\tof\tMay\t7,\t2015,\tby\tand\tbetween\tTesla\nMotors,\tInc.\tand\tthe\tState\tof\tNevada,\tacting\tby\nand\tthrough\tthe\tNevada\tGovernor’s\tOffice\tof\nEconomic\tDevelopment.\n10-Q001-3475610.1August\t7,\t2015\n10.44Purchase\tAgreement,\tdated\tas\tof\tAugust\t11,\n2017,\tby\tand\tamong\tthe\tRegistrant,\tSolarCity\tand\nGoldman\tSachs\t&\tCo.\tLLC\tand\tMorgan\tStanley\t&\nCo.\tLLC\tas\trepresentatives\tof\tthe\tseveral\tinitial\npurchasers\tnamed\ttherein.\n8-K001-3475610.1August\t23,\t2017\n10.45Amended\tand\tRestated\tAgreement\tFor\tResearch", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 109, "lines": { "from": 1, "to": 48 } } } }, { "pageContent": "10.45Amended\tand\tRestated\tAgreement\tFor\tResearch\n&\tDevelopment\tAlliance\ton\tTriex\tModule\nTechnology,\teffective\tas\tof\tSeptember\t2,\t2014,\tby\nand\tbetween\tThe\tResearch\tFoundation\tFor\tThe\nState\tUniversity\tof\tNew\tYork,\ton\tbehalf\tof\tthe\nCollege\tof\tNanoscale\tScience\tand\tEngineering\tof\nthe\tState\tUniversity\tof\tNew\tYork,\tand\tSilevo,\tInc.\n10-Q(1)001-3575810.16November\t6,\t2014\n107", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 109, "lines": { "from": 48, "to": 56 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n10.46First\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tFor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\nOctober\t31,\t2014,\tby\tand\tbetween\tThe\tResearch\nFoundation\tFor\tThe\tState\tUniversity\tof\tNew\tYork,\non\tbehalf\tof\tthe\tCollege\tof\tNanoscale\tScience\tand\nEngineering\tof\tthe\tState\tUniversity\tof\tNew\tYork,\nand\tSilevo,\tInc.\n10-K(1)001-3575810.16aFebruary\t24,\t2015\n10.47Second\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tFor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\nDecember\t15,\t2014,\tby\tand\tbetween\tThe\nResearch\tFoundation\tFor\tThe\tState\tUniversity\tof\nNew\tYork,\ton\tbehalf\tof\tthe\tCollege\tof\tNanoscale\nScience\tand\tEngineering\tof\tthe\tState\tUniversity\tof\nNew\tYork,\tand\tSilevo,\tInc.\n10-K(1)001-3575810.16bFebruary\t24,\t2015\n10.48Third\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tFor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\nFebruary\t12,\t2015,\tby\tand\tbetween\tThe\tResearch\nFoundation\tFor\tThe\tState\tUniversity\tof\tNew\tYork,\non\tbehalf\tof\tthe\tCollege\tof\tNanoscale\tScience\tand\nEngineering\tof\tthe\tState\tUniversity\tof\tNew\tYork,\nand\tSilevo,\tInc.\n10-Q(1)001-3575810.16cMay\t6,\t2015\n10.49Fourth\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tFor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\tMarch\n30,\t2015,\tby\tand\tbetween\tThe\tResearch\nFoundation\tFor\tThe\tState\tUniversity\tof\tNew\tYork,\non\tbehalf\tof\tthe\tCollege\tof\tNanoscale\tScience\tand\nEngineering\tof\tthe\tState\tUniversity\tof\tNew\tYork,\nand\tSilevo,\tInc.\n10-Q(1)001-3575810.16dMay\t6,\t2015\n10.50Fifth\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tFor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\tJune\n30,\t2015,\tby\tand\tbetween\tThe\tResearch\nFoundation\tFor\tThe\tState\tUniversity\tof\tNew\tYork,\non\tbehalf\tof\tthe\tCollege\tof\tNanoscale\tScience\tand\nEngineering\tof\tthe\tState\tUniversity\tof\tNew\tYork,\nand\tSilevo,\tLLC.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 110, "lines": { "from": 1, "to": 49 } } } }, { "pageContent": "and\tSilevo,\tLLC.\n10-Q(1)001-3575810.16eJuly\t30,\t2015\n10.51Sixth\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tFor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\nSeptember\t1,\t2015,\tby\tand\tbetween\tThe\nResearch\tFoundation\tFor\tThe\tState\tUniversity\tof\nNew\tYork,\ton\tbehalf\tof\tthe\tCollege\tof\tNanoscale\nScience\tand\tEngineering\tof\tthe\tState\tUniversity\tof\nNew\tYork,\tand\tSilevo,\tLLC.\n10-Q(1)001-3575810.16fOctober\t30,\t2015\n108", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 110, "lines": { "from": 49, "to": 60 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n10.52Seventh\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tFor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\nOctober\t9,\t2015,\tby\tand\tbetween\tThe\tResearch\nFoundation\tFor\tThe\tState\tUniversity\tof\tNew\tYork,\non\tbehalf\tof\tthe\tCollege\tof\tNanoscale\tScience\tand\nEngineering\tof\tthe\tState\tUniversity\tof\tNew\tYork,\nand\tSilevo,\tLLC.\n10-Q(1)001-3575810.16gOctober\t30,\t2015\n10.53Eighth\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tFor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\nOctober\t26,\t2015,\tby\tand\tbetween\tThe\tResearch\nFoundation\tFor\tThe\tState\tUniversity\tof\tNew\tYork,\non\tbehalf\tof\tthe\tCollege\tof\tNanoscale\tScience\tand\nEngineering\tof\tthe\tState\tUniversity\tof\tNew\tYork,\nand\tSilevo,\tLLC.\n10-Q(1)001-3575810.16hOctober\t30,\t2015\n10.54Ninth\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tFor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\nDecember\t9,\t2015,\tby\tand\tbetween\tThe\tResearch\nFoundation\tFor\tThe\tState\tUniversity\tof\tNew\tYork,\non\tbehalf\tof\tthe\tCollege\tof\tNanoscale\tScience\tand\nEngineering\tof\tthe\tState\tUniversity\tof\tNew\tYork,\nand\tSilevo,\tLLC.\n10-K(1)001-3575810.16iFebruary\t10,\t2016\n10.55Tenth\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tFor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\tMarch\n31,\t2017,\tby\tand\tbetween\tThe\tResearch\nFoundation\tFor\tThe\tState\tUniversity\tof\tNew\tYork,\non\tbehalf\tof\tthe\tColleges\tof\tNanoscale\tScience\nand\tEngineering\tof\tthe\tState\tUniversity\tof\tNew\nYork,\tand\tSilevo,\tLLC.\n10-Q001-3475610.8May\t10,\t2017\n10.56Eleventh\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tfor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\tJuly\n22,\t2020,\tamong\tthe\tResearch\tFoundation\tfor\tthe\nState\tUniversity\tof\tNew\tYork,\tSilevo,\tLLC\tand\nTesla\tEnergy\tOperations,\tInc.\n10-Q001-3475610.6July\t28,\t2020\n10.57Twelfth\tAmendment\tto\tAmended\tand\tRestated", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 111, "lines": { "from": 1, "to": 49 } } } }, { "pageContent": "10.57Twelfth\tAmendment\tto\tAmended\tand\tRestated\nAgreement\tfor\tResearch\t&\tDevelopment\tAlliance\non\tTriex\tModule\tTechnology,\teffective\tas\tof\tMay\n1,\t2021,\tamong\tthe\tResearch\tFoundation\tfor\tthe\nState\tUniversity\tof\tNew\tYork,\tSilevo,\tLLC\tand\nTesla\tEnergy\tOperations,\tInc.\n10-Q001-3475610.1October\t25,\t2021\n109", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 111, "lines": { "from": 49, "to": 56 } } } }, { "pageContent": "Exhibit\nNumber\nIncorporated\tby\tReference\nFiled\nHerewithExhibit\tDescriptionFormFile\tNo.ExhibitFiling\tDate\n10.58††Grant\tContract\tfor\tState-Owned\tConstruction\tLand\nUse\tRight,\tdated\tas\tof\tOctober\t17,\t2018,\tby\tand\nbetween\tShanghai\tPlanning\tand\tLand\tResource\nAdministration\tBureau,\tas\tgrantor,\tand\tTesla\n(Shanghai)\tCo.,\tLtd.,\tas\tgrantee\t(English\ntranslation).\n10-Q001-3475610.2July\t29,\t2019\n10.59Credit\tAgreement,\tdated\tas\tof\tJanuary\t20,\t2023,\namong\tTesla,\tInc.,\tthe\tLenders\tand\tIssuing\tBanks\nfrom\ttime\tto\ttime\tparty\tthereto,\tCitibank,\tN.A.,\tas\nAdministrative\tAgent\tand\tDeutsche\tBank\nSecurities,\tInc.,\tas\tSyndication\tAgent\n10-K001-3475610.59January\t31,\t2023\n21.1List\tof\tSubsidiaries\tof\tthe\tRegistrant————X\n23.1Consent\tof\tPricewaterhouseCoopers\tLLP,\nIndependent\tRegistered\tPublic\tAccounting\tFirm\n————X\n31.1Rule\t13a-14(a)\t/\t15(d)-14(a)\tCertification\tof\nPrincipal\tExecutive\tOfficer\n————X\n31.2Rule\t13a-14(a)\t/\t15(d)-14(a)\tCertification\tof\nPrincipal\tFinancial\tOfficer\n————X\n32.1*Section\t1350\tCertifications————X\n97Tesla,\tInc.\tClawback\tPolicy————X\n101.INSInline\tXBRL\tInstance\tDocument————X\n101.SCHInline\tXBRL\tTaxonomy\tExtension\tSchema\nDocument\n————X\n101.CALInline\tXBRL\tTaxonomy\tExtension\tCalculation\nLinkbase\tDocument.\n————X\n101.DEFInline\tXBRL\tTaxonomy\tExtension\tDefinition\nLinkbase\tDocument\n————X\n101.LABInline\tXBRL\tTaxonomy\tExtension\tLabel\tLinkbase\nDocument\n————X\n101.PREInline\tXBRL\tTaxonomy\tExtension\tPresentation\nLinkbase\tDocument\n————X\n104Cover\tPage\tInteractive\tData\tFile\t(formatted\tas\ninline\tXBRL\twith\tapplicable\ttaxonomy\textension\ninformation\tcontained\tin\tExhibits\t101)\n*Furnished\therewith\n**Indicates\ta\tmanagement\tcontract\tor\tcompensatory\tplan\tor\tarrangement\n†Confidential\ttreatment\thas\tbeen\trequested\tfor\tportions\tof\tthis\texhibit\n††Portions\tof\tthis\texhibit\thave\tbeen\tredacted\tin\tcompliance\twith\tRegulation\tS-K\tItem\t601(b)(10).\n110", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 112, "lines": { "from": 1, "to": 54 } } } }, { "pageContent": "(1)Indicates\ta\tfiling\tof\tSolarCity\n(2)Indicates\ta\tfiling\tof\tMaxwell\tTechnologies,\tInc.\nITEM\t16.\tSUMMARY\nNone.\n111", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 113, "lines": { "from": 1, "to": 5 } } } }, { "pageContent": "SIGNATURES\nPursuant\tto\tthe\trequirements\tof\tSection\t13\tor\t15(d)\tthe\tSecurities\tExchange\tAct\tof\t1934,\tthe\tregistrant\thas\tduly\tcaused\tthis\treport\tto\tbe\tsigned\ton\nits\tbehalf\tby\tthe\tundersigned,\tthereunto\tduly\tauthorized.\nTesla,\tInc.\n\t\nDate:\tJanuary\t26,\t2024/s/\tElon\tMusk\nElon\tMusk\nChief\tExecutive\tOfficer\n(Principal\tExecutive\tOfficer)\nPursuant\tto\tthe\trequirements\tof\tthe\tSecurities\tExchange\tAct\tof\t1934,\tthis\treport\thas\tbeen\tsigned\tbelow\tby\tthe\tfollowing\tpersons\ton\tbehalf\tof\tthe\nregistrant\tand\tin\tthe\tcapacities\tand\ton\tthe\tdates\tindicated.\nSignatureTitleDate\n\t\t\t\n/s/\tElon\tMuskChief\tExecutive\tOfficer\tand\tDirector\t(Principal\tExecutive\tOfficer)January\t26,\t2024\nElon\tMusk\n\t\n/s/\tVaibhav\tTaneja\nChief\tFinancial\tOfficer\t(Principal\tFinancial\tOfficer\tand\tPrincipal\nAccounting\tOfficer\t)January\t26,\t2024\nVaibhav\tTaneja\t\t\n\t\t\t\n/s/\tRobyn\tDenholmDirectorJanuary\t26,\t2024\nRobyn\tDenholm\t\t\n\t\t\t\n/s/\tIra\tEhrenpreisDirectorJanuary\t26,\t2024\nIra\tEhrenpreis\t\t\n\t\t\t\n/s/\tJoseph\tGebbiaDirectorJanuary\t26,\t2024\nJoseph\tGebbia\t\t\n\t\t\t\n/s/\tJames\tMurdochDirectorJanuary\t26,\t2024\nJames\tMurdoch\n/s/\tKimbal\tMuskDirectorJanuary\t26,\t2024\nKimbal\tMusk\n\t\t\t\n/s/\tJB\tStraubelDirectorJanuary\t26,\t2024\nJB\tStraubel\t\t\n\t\t\t\n/s/\tKathleen\tWilson-ThompsonDirectorJanuary\t26,\t2024\nKathleen\tWilson-Thompson\t\t\nExhibit\t21.1\nSUBSIDIARIES\tOF\tTESLA,\tINC.\n112", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 114, "lines": { "from": 1, "to": 43 } } } }, { "pageContent": "Name\tof\tSubsidiary\nJurisdiction\tof\nIncorporation\tor\tOrganization\nAlabama\tService\tLLCDelaware\nAll\tEV\tHoldings,\tLLCDelaware\nAllegheny\tSolar\t1,\tLLCDelaware\nAllegheny\tSolar\tManager\t1,\tLLCDelaware\nAlset\tTransport\tGmbHGermany\nAlset\tWarehouse\tGmbHGermany\nAncon\tHoldings\tII,\tLLCDelaware\nAncon\tHoldings\tIII,\tLLCDelaware\nAncon\tHoldings,\tLLCDelaware\nAncon\tSolar\tCorporationDelaware\nAncon\tSolar\tI,\tLLCDelaware\nAncon\tSolar\tII\tLessee\tManager,\tLLCDelaware\nAncon\tSolar\tII\tLessee,\tLLCDelaware\nAncon\tSolar\tII\tLessor,\tLLCDelaware\nAncon\tSolar\tIII\tLessee\tManager,\tLLCDelaware\nAncon\tSolar\tIII\tLessee,\tLLCDelaware\nAncon\tSolar\tIII\tLessor,\tLLCDelaware\nAncon\tSolar\tManaging\tMember\tI,\tLLCDelaware\nArpad\tSolar\tBorrower,\tLLCDelaware\nArpad\tSolar\tI,\tLLCDelaware\nArpad\tSolar\tManager\tI,\tLLCDelaware\nAU\tSolar\t1,\tLLCDelaware\nAU\tSolar\t2,\tLLCDelaware\nBanyan\tSolarCity\tManager\t2010,\tLLCDelaware\nBanyan\tSolarCity\tOwner\t2010,\tLLCDelaware\nBasking\tSolar\tI,\tLLCDelaware\nBasking\tSolar\tII,\tLLCDelaware\nBasking\tSolar\tManager\tII,\tLLCDelaware\nBeatrix\tSolar\tI,\tLLCDelaware\nBernese\tSolar\tManager\tI,\tLLCDelaware\nBlue\tSkies\tSolar\tI,\tLLCDelaware\nBlue\tSkies\tSolar\tII,\tLLCDelaware\nBT\tConnolly\tStorage,\tLLCTexas\nCaballero\tSolar\tManaging\tMember\tI,\tLLCDelaware\nCaballero\tSolar\tManaging\tMember\tII,\tLLCDelaware\nCaballero\tSolar\tManaging\tMember\tIII,\tLLCDelaware\nCardinal\tBlue\tSolar,\tLLCDelaware\nCastello\tSolar\tI,\tLLCDelaware\nCastello\tSolar\tII,\tLLCDelaware\nCastello\tSolar\tIII,\tLLCDelaware\nChaparral\tSREC\tBorrower,\tLLCDelaware\nChaparral\tSREC\tHoldings,\tLLCDelaware\nChompie\tSolar\tI,\tLLCDelaware\nChompie\tSolar\tII,\tLLCDelaware\nChompie\tSolar\tManager\tI,\tLLCDelaware\nChompie\tSolar\tManager\tII,\tLLCDelaware", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 115, "lines": { "from": 1, "to": 49 } } } }, { "pageContent": "Clydesdale\tSC\tSolar\tI,\tLLCDelaware\nColorado\tRiver\tProject,\tLLCDelaware\nCommunity\tSolar\tPartners,\tLLCDelaware\nConnecticut\tAuto\tRepair\tand\tService\tLLCDelaware\nCompass\tAutomation\tIncorporatedIllinois\nDom\tSolar\tGeneral\tPartner\tI,\tLLCDelaware\nDom\tSolar\tLessor\tI,\tLPCayman\tIslands\nDomino\tSolar\tLtd.Cayman\tIslands\nDom\tSolar\tLimited\tPartner\tI,\tLLCDelaware\nEl\tRey\tEV,\tLLCDelaware\nFalconer\tSolar\tManager\tI,\tLLCDelaware\nFirehorn\tSolar\tI,\tLLCCayman\tIslands\nFirehorn\tSolar\tManager\tI,\tLLCDelaware\nFocalPoint\tSolar\tBorrower,\tLLCDelaware\nFocalPoint\tSolar\tI,\tLLCDelaware\nFocalPoint\tSolar\tManager\tI,\tLLCDelaware\nFontane\tSolar\tI,\tLLCDelaware\nFotovoltaica\tGI\t4,\tS.\tde\tR.L.\tde\tC.V.Mexico\nFotovoltaica\tGI\t5,\tS.\tde\tR.L.\tde\tC.V.Mexico\nFP\tSystem\tOwner,\tLLCDelaware\nGiga\tInsurance\tTexas,\tInc.Texas\nGiga\tTexas\tEnergy,\tLLCDelaware\nGrohmann\tEngineering\tTrading\t(Shanghai)\tCo.\tLtd.China\nGrohmann\tUSA,\tInc.Delaware\nGuilder\tSolar,\tLLCDelaware\nHamilton\tSolar,\tLLCDelaware\nHarborfields\tLLCDelaware\nHangzhou\tSilevo\tElectric\tPower\tCo.,\tLtd.China\nHarpoon\tSolar\tI,\tLLCDelaware\nHarpoon\tSolar\tManager\tI,\tLLCDelaware\nHaymarket\tHoldings,\tLLCDelaware\nHaymarket\tManager\t1,\tLLCDelaware\nHaymarket\tSolar\t1,\tLLCDelaware\nHibar\tSystems\tEurope\tGmbHGermany\nHive\tBattery\tInc.Delaware\nIkehu\tManager\tI,\tLLCDelaware\nIL\tBuono\tSolar\tI,\tLLCDelaware\nIliosson,\tS.A.\tde\tC.V.Mexico\nIndustrial\tMaintenance\tTechnologies,\tInc.California\nKansas\tRepair\tLLCDelaware\nKlamath\tFalls\tSolar\t1,\tLLCDelaware\nKnight\tSolar\tManaging\tMember\tI,\tLLCDelaware\nKnight\tSolar\tManaging\tMember\tII,\tLLCDelaware\nKnight\tSolar\tManaging\tMember\tIII,\tLLCDelaware\nLandlord\t2008-A,\tLLCDelaware\nLincoln\tAuto\tRepair\tand\tService\tLLCDelaware\nLouis\tSolar\tII,\tLLCDelaware\nLouis\tSolar\tIII,\tLLCDelaware\nLouis\tSolar\tManager\tII,\tLLCDelaware\nLouis\tSolar\tManager\tIII,\tLLCDelaware", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 116, "lines": { "from": 1, "to": 50 } } } }, { "pageContent": "Louis\tSolar\tMaster\tTenant\tI,\tLLCDelaware\nLouis\tSolar\tMT\tManager\tI,\tLLCDelaware\nLouis\tSolar\tOwner\tI,\tLLCDelaware\nLouis\tSolar\tOwner\tManager\tI,\tLLCDelaware\nMaster\tTenant\t2008-A,\tLLCDelaware\nMatterhorn\tSolar\tI,\tLLCDelaware\nMaxwell\tTechnologies,\tInc.Delaware\nMegalodon\tSolar,\tLLCDelaware\nMonte\tRosa\tSolar\tI,\tLLCDelaware\nMound\tSolar\tManager\tV,\tLLCDelaware\nMound\tSolar\tManager\tVI,\tLLCDelaware\nMound\tSolar\tManager\tX,\tLLCDelaware\nMound\tSolar\tManager\tXI,\tLLCDelaware\nMound\tSolar\tManager\tXII,\tLLCDelaware\nMound\tSolar\tMaster\tTenant\tIX,\tLLCDelaware\nMound\tSolar\tMaster\tTenant\tV,\tLLCCalifornia\nMound\tSolar\tMaster\tTenant\tVI,\tLLCDelaware\nMound\tSolar\tMaster\tTenant\tVII,\tLLCDelaware\nMound\tSolar\tMaster\tTenant\tVIII,\tLLCDelaware\nMound\tSolar\tMT\tManager\tIX,\tLLCDelaware\nMound\tSolar\tMT\tManager\tVII,\tLLCDelaware\nMound\tSolar\tMT\tManager\tVIII,\tLLCDelaware\nMound\tSolar\tOwner\tIX,\tLLCDelaware\nMound\tSolar\tOwner\tManager\tIX,\tLLCDelaware\nMound\tSolar\tOwner\tManager\tVII,\tLLCDelaware\nMound\tSolar\tOwner\tManager\tVIII,\tLLCDelaware\nMound\tSolar\tOwner\tV,\tLLCCalifornia\nMound\tSolar\tOwner\tVI,\tLLCDelaware\nMound\tSolar\tOwner\tVII,\tLLCDelaware\nMound\tSolar\tOwner\tVIII,\tLLCDelaware\nMound\tSolar\tPartnership\tX,\tLLCDelaware\nMound\tSolar\tPartnership\tXI,\tLLCDelaware\nMound\tSolar\tPartnership\tXII,\tLLCDelaware\nMS\tSolarCity\t2008,\tLLCDelaware\nMS\tSolarCity\tCommercial\t2008,\tLLCDelaware\nMS\tSolarCity\tResidential\t2008,\tLLCDelaware\nNew\tMexico\tSales\tand\tVehicle\tService\tLLCDelaware\nNBA\tSolarCity\tAFB,\tLLCCalifornia\nNBA\tSolarCity\tCommercial\tI,\tLLCCalifornia\nNBA\tSolarCity\tSolar\tPhoenix,\tLLCCalifornia\nNorthern\tNevada\tResearch\tCo.,\tLLCNevada\nOranje\tSolar\tI,\tLLCDelaware\nOranje\tSolar\tManager\tI,\tLLCDelaware\nPalmetto\tAuto\tRepair\tand\tService\tLLCDelaware\nParamount\tEnergy\tFund\tI\tLessee,\tLLCDelaware\nParamount\tEnergy\tFund\tI\tLessor,\tLLCDelaware\nPEF\tI\tMM,\tLLCDelaware\nPerbix\tMachine\tCompany,\tInc.Minnesota\nPresidio\tSolar\tI,\tLLCDelaware\nPresidio\tSolar\tII,\tLLCDelaware", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 117, "lines": { "from": 1, "to": 50 } } } }, { "pageContent": "Presidio\tSolar\tIII,\tLLCDelaware\nPukana\tLa\tSolar\tI,\tLLCDelaware\nR9\tSolar\t1,\tLLCDelaware\nRoadster\tAutomobile\tSales\tand\tService\t(Beijing)\tCo.,\tLtd.China\nRoadster\tFinland\tOyFinland\nSA\tVPP\tHolding\tTrustAustralia\nSA\tVPP\tProject\tTrustAustralia\nSequoia\tPacific\tHoldings,\tLLCDelaware\nSequoia\tPacific\tManager\tI,\tLLCDelaware\nSequoia\tPacific\tSolar\tI,\tLLCDelaware\nSequoia\tSolarCity\tOwner\tI,\tLLCDelaware\nSierra\tSolar\tPower\t(Hong\tKong)\tLimitedHong\tKong\nSiiLion,\tInc.Delaware\nSilevo,\tLLCDelaware\nSolar\tAquarium\tHoldings,\tLLCDelaware\nSolar\tEnergy\tof\tAmerica\t1,\tLLCDelaware\nSolar\tEnergy\tof\tAmerica\tManager\t1,\tLLCDelaware\nSolar\tExplorer,\tLLCDelaware\nSolar\tGezellig\tHoldings,\tLLCDelaware\nSolar\tHouse\tI,\tLLCDelaware\nSolar\tHouse\tII,\tLLCDelaware\nSolar\tHouse\tIII,\tLLCDelaware\nSolar\tHouse\tIV,\tLLCDelaware\nSolar\tIntegrated\tFund\tI,\tLLCDelaware\nSolar\tIntegrated\tFund\tII,\tLLCDelaware\nSolar\tIntegrated\tFund\tIII,\tLLCDelaware\nSolar\tIntegrated\tFund\tIV-A,\tLLCDelaware\nSolar\tIntegrated\tFund\tV,\tLLCDelaware\nSolar\tIntegrated\tFund\tVI,\tLLCDelaware\nSolar\tIntegrated\tManager\tI,\tLLCDelaware\nSolar\tIntegrated\tManager\tII,\tLLCDelaware\nSolar\tIntegrated\tManager\tIII,\tLLCDelaware\nSolar\tIntegrated\tManager\tIV-A,\tLLCDelaware\nSolar\tIntegrated\tManager\tV,\tLLCDelaware\nSolar\tIntegrated\tManager\tVI,\tLLCDelaware\nSolar\tServices\tCompany,\tLLCDelaware\nSolar\tUlysses\tManager\tI,\tLLCDelaware\nSolar\tUlysses\tManager\tII,\tLLCDelaware\nSolar\tVoyager,\tLLCDelaware\nSolar\tWarehouse\tManager\tI,\tLLCDelaware\nSolar\tWarehouse\tManager\tII,\tLLCDelaware\nSolar\tWarehouse\tManager\tIII,\tLLCDelaware\nSolar\tWarehouse\tManager\tIV,\tLLCDelaware\nSolarCity\tAlpine\tHoldings,\tLLCDelaware\nSolarCity\tAmphitheatre\tHoldings,\tLLCDelaware\nSolarCity\tArbor\tHoldings,\tLLCDelaware\nSolarCity\tArches\tHoldings,\tLLCDelaware\nSolarCity\tAU\tHoldings,\tLLCDelaware\nSolarCity\tCruyff\tHoldings,\tLLCDelaware\nSolarCity\tElectrical,\tLLCDelaware", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 118, "lines": { "from": 1, "to": 50 } } } }, { "pageContent": "SolarCity\tElectrical\tNew\tYork\tCorporationDelaware\nSolarCity\tFinance\tCompany,\tLLCDelaware\nSolarCity\tFinance\tHoldings,\tLLCDelaware\nSolarCity\tFoxborough\tHoldings,\tLLCDelaware\nSolarCity\tFTE\tSeries\t1,\tLLCDelaware\nSolarCity\tFTE\tSeries\t2,\tLLCDelaware\nSolarCity\tFund\tHoldings,\tLLCDelaware\nSolarCity\tGrand\tCanyon\tHoldings,\tLLCDelaware\nSolarCity\tHoldings\t2008,\tLLCDelaware\nSolarCity\tInternational,\tInc.Delaware\nSolarCity\tLeviathan\tHoldings,\tLLCDelaware\nSolarCity\tLMC\tSeries\tI,\tLLCDelaware\nSolarCity\tLMC\tSeries\tII,\tLLCDelaware\nSolarCity\tLMC\tSeries\tIII,\tLLCDelaware\nSolarCity\tLMC\tSeries\tIV,\tLLCDelaware\nSolarCity\tLMC\tSeries\tV,\tLLCDelaware\nSolarCity\tMid-Atlantic\tHoldings,\tLLCDelaware\nSolarCity\tNitro\tHoldings,\tLLCDelaware\nSolarCity\tOrange\tHoldings,\tLLCDelaware\nSolarCity\tSeries\tHoldings\tI,\tLLCDelaware\nSolarCity\tSeries\tHoldings\tII,\tLLCDelaware\nSolarCity\tSeries\tHoldings\tIV,\tLLCDelaware\nSolarCity\tSteep\tHoldings,\tLLCDelaware\nSolarCity\tUlu\tHoldings,\tLLCDelaware\nSolarCity\tVillage\tHoldings,\tLLCDelaware\nSolarRock,\tLLCDelaware\nSolarStrong,\tLLCDelaware\nSparrowhawk\tSolar\tI,\tLLCDelaware\nSREC\tHoldings,\tLLCDelaware\nTALT\tHoldings,\tLLCDelaware\nTALT\tTBM\tHoldings,\tLLCDelaware\nTBM\tPartnership\tII,\tLLCDelaware\nTEO\tEngineering,\tInc.California\nTES\t2017-1,\tLLCDelaware\nTES\t2017-2,\tLLCDelaware\nTES\tHoldings\t2017-1,\tLLCDelaware\nTesla\t2014\tWarehouse\tSPV\tLLCDelaware\nTesla\tAuto\tLease\tTrust\t2021-ADelaware\nTesla\tAuto\tLease\tTrust\t2021-BDelaware\nTesla\tAuto\tLease\tTrust\t2022-ADelaware\nTesla\tAuto\tLease\tTrust\t2023-ADelaware\nTesla\tAuto\tLease\tTrust\t2023-BDelaware\nTesla\tElectric\tVehicle\tTrust\t2023-1Delaware\nTesla\tAutobidder\tInternational\tB.V.Netherlands\nTesla\tAutomation\tGmbHGermany\nTesla\tAutomobile\tInformation\tService\t(Dalian)\tCo.,\tLtd.China\nTesla\tAutomobile\tManagement\tand\tService\t(Haikou)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Beijing)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Changchun)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Changsha)\tCo.,\tLtd.China", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 119, "lines": { "from": 1, "to": 50 } } } }, { "pageContent": "Tesla\tAutomobile\tSales\tand\tService\t(Chengdu)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Chongqing)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Dalian)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Fuzhou)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Guangzhou)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Guiyang)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Haerbin)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Hangzhou)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Hefei)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Hohhot)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Jinan)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Kunming)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Lanzhou)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Nanchang)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Nanjing)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Nanning)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Ningbo)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Qingdao)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Shanghai)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Shenyang)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Shijiazhuang)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Suzhou)\tCo.\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Taiyuan)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Tianjin)\tCo.\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Urumqi)\tCo.\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Wenzhou)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Wuhan)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Wuxi)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Xi'an)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Xiamen)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Xining)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Yinchuan)\tCo.,\tLtd.China\nTesla\tAutomobile\tSales\tand\tService\t(Zhengzhou)\tCo.\tLtd.China", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 120, "lines": { "from": 1, "to": 33 } } } }, { "pageContent": "Tesla\tAutomobiles\tSales\tand\tService\tMexico,\tS.\tde\tR.L.\tde\tC.V.Mexico\nTesla\t(Beijing)\tNew\tEnergy\tR&D\tCo.,\tLtd.China\nTesla\tBelgium\tBVBelgium\nTesla\tCanada\tFinance\tULCCanada\nTesla\tCanada\tGP\tInc.Canada\nTesla\tCanada\tLPCanada\nTesla\tCharging,\tLLCDelaware\nTesla\tChile\tSpAChile\nTesla\tConstruction\t(Shanghai)\tCo.,\tLtd.China\nTesla\tCzech\tRepublic\ts.r.o.Czech\tRepublic\nTesla\tEnergia\tMacau\tLimitadaMacau\nTesla\tEngineering\tGermany\tGmbHGermany\nTesla\tEnergy\td.o.o.Slovenia\nTesla\tEnergy\tManagement\tLLCDelaware\nTesla\tEnergy\tOperations,\tInc.Delaware\nTesla\tEnergy\tVentures\tAustralia\tPty\tLtdAustralia\nTesla\tEnergy\tVentures\tLimitedUnited\tKingdom", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 120, "lines": { "from": 34, "to": 50 } } } }, { "pageContent": "Tesla\tEnergy\tVentures\tHoldings\tB.V.Netherlands\nTesla\tFinance\tLLCDelaware\nTesla\tFinancial\tLeasing\t(China)\tCo.,\tLtd.China\nTesla\tFinancial\tServices\tGmbHGermany\nTesla\tFinancial\tServices\tHoldings\tB.V.Netherlands\nTesla\tFinancial\tServices\tLimitedUnited\tKingdom\nTesla\tFrance\tS.à\tr.l.France\nTesla\tGermany\tGmbHGermany\nTesla\tGeneral\tInsurance,\tInc.Arizona\nTesla\tGreece\tSingle\tMember\tP.C.Greece\nTesla\tHrvatska\td.o.o.Croatia\nTesla\tHungary\tKft.Hungary\nTesla\tIndia\tMotors\tand\tEnergy\tPrivate\tLimitedIndia\nTesla\tInsurance\tBrokers\tCo.,\tLtd.China\nTesla\tInsurance\tHoldings,\tLLCDelaware\nTesla\tInsurance,\tInc.Delaware\nTesla\tInsurance\tLtd.Malta\nTesla\tInsurance\tCompanyCalifornia\nTesla\tInsurance\tServices,\tInc.California\nTesla\tInsurance\tServices\tof\tTexas,\tInc.Texas\nTesla\tInternational\tB.V.Netherlands\nTesla\tInvestments\tLLCDelaware\nTesla\tItaly\tS.r.l.Italy\nTesla\tJordan\tCar\tTrading\tLLCJordan\nTesla\tKorea\tLimitedRepublic\tof\tKorea\nTesla\tLease\tTrustDelaware\nTesla\tLLCDelaware\nTesla\tManufacturing\tBrandenburg\tSEGermany\nTesla\tManufacturing\tMexico,\tS.\tde\tR.L.\tde\tC.V.Mexico\nTesla\tManufacturing\tMexico\tHolding,\tS.\tde\tR.L.\tde\tC.V.Mexico\nTesla\tMichigan,\tInc.Michigan\nTesla\tMississippi\tLLCDelaware\nTesla\tMotors\tAustralia,\tPty\tLtdAustralia\nTesla\tMotors\tAustria\tGmbHAustria\nTesla\tMotors\t(Beijing)\tCo.,\tLtd.China\nTesla\tMotors\tCanada\tULCCanada\nTesla\tMotors\tColombia\tS.A.SColombia\nTesla\tMotors\tHolding\tB.V.Netherlands\nTesla\tMotors\tDenmark\tApSDenmark\nTesla\tMotors\tFL,\tInc.Florida\nTesla\tMotors\tHK\tLimitedHong\tKong\nTesla\tMotors\tIceland\tehf.Iceland\nTesla\tMotors\tIreland\tLimitedIreland\nTesla\tMotors\tIsrael\tLtd.Israel\nTesla\tMotors\tJapan\tGKJapan\nTesla\tMotors\tLimitedUnited\tKingdom\nTesla\tMotors\tLuxembourg\tS.à\tr.l.Luxembourg\nTesla\tMotors\tMA,\tInc.Massachusetts\nTesla\tMotors\tNetherlands\tB.V.Netherlands\nTesla\tMotors\tNew\tYork\tLLCNew\tYork", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 121, "lines": { "from": 1, "to": 50 } } } }, { "pageContent": "Tesla\tMotors\tNL\tLLCDelaware\nTesla\tMotors\tNV,\tInc.Nevada\nTesla\tMotors\tPA,\tInc.Pennsylvania\nTesla\tMotors\tRomania\tS.R.L.Romania\nTesla\tMotors\tSales\tand\tService\tLLCTurkey\nTesla\tMotors\tSingapore\tHoldings\tPte.\tLtd.Singapore\nTesla\tMotors\tSingapore\tPrivate\tLimitedSingapore\nTesla\tMotors\tStichtingNetherlands\nTesla\tMotors\tTaiwan\tLimitedTaiwan\nTesla\tMotors\tTN,\tInc.Tennessee\nTesla\tMotors\tTX,\tInc.Texas\nTesla\tMotors\tUT,\tInc.Utah\nTesla\tNambe\tLLCDelaware\nTesla\tNew\tZealand\tULCNew\tZealand\nTesla\tNorway\tASNorway\nTesla\tPoland\tsp.\tz\to.o.Poland\nTesla\tProperty\t&Casualty,\tInc.California\nTesla\tPortugal,\tSociedade\tUnipessoal\tLDAPortugal\nTesla\tPuerto\tRico\tLLCPuerto\tRico\nTesla\tQatar\tLLCQatar\nTesla\tSales,\tInc.Delaware\nTesla\tSdn.\tBhd.Malaysia\nTesla\tShanghai\tCo.,\tLtdChina\nTesla\t(Shanghai)\tNew\tEnergy\tCo.,\tLTD.China\nTesla\tSpain,\tS.L.\tUnipersonalSpain\nTesla\tSwitzerland\tGmbHSwitzerland\nTesla\t(Thailand)\tLtd.Thailand\nTesla\tTH1\tLLCDelaware\nTesla\tTH2\tLLCDelaware\nTelsa\tToronto\tAutomation\tULCCanada\nTesla\tToronto\tInternational\tHoldings\tULCCanada\nTesla\tTransport\tB.V.Netherlands\nThe\tBig\tGreen\tSolar\tI,\tLLCDelaware\nThe\tBig\tGreen\tSolar\tManager\tI,\tLLCDelaware\nThree\tRivers\tSolar\t1,\tLLCDelaware\nThree\tRivers\tSolar\t2,\tLLCDelaware\nThree\tRivers\tSolar\t3,\tLLCDelaware\nThree\tRivers\tSolar\tManager\t1,\tLLCDelaware\nThree\tRivers\tSolar\tManager\t2,\tLLCDelaware\nThree\tRivers\tSolar\tManager\t3,\tLLCDelaware\nTM\tInternational\tC.V.Netherlands\nTM\tSweden\tABSweden\nUSB\tSolarCity\tManager\tIV,\tLLCDelaware\nUSB\tSolarCity\tMaster\tTenant\tIV,\tLLCCalifornia\nUSB\tSolarCity\tOwner\tIV,\tLLCCalifornia\nVisigoth\tSolar\t1,\tLLCDelaware\nVisigoth\tSolar\tHoldings,\tLLCDelaware\nVisigoth\tSolar\tManaging\tMember\t1,\tLLCDelaware\nVPP\tProject\t1\t(SA)\tPty\tLtd.Australia\nWeisshorn\tSolar\tI,\tLLCCayman\tIslands", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 122, "lines": { "from": 1, "to": 50 } } } }, { "pageContent": "Weisshorn\tSolar\tManager\tI,\tLLCDelaware\nZep\tSolar\tLLCCalifornia\nExhibit\t23.1\nCONSENT\tOF\tINDEPENDENT\tREGISTERED\tPUBLIC\tACCOUNTING\tFIRM\nWe\thereby\tconsent\tto\tthe\tincorporation\tby\treference\tin\tthe\tRegistration\tStatements\ton\tForm\tS-8\t(Nos.\t333-232079,\t333-223169,\t333-216376,\t333-\n209696,\t333-198002,\t333-187113,\t333-183033,\tand\t333-167874)\tof\tTesla,\tInc.\tof\tour\treport\tdated\tJanuary\t26,\t2024\trelating\tto\tthe\tfinancial\tstatements\nand\tthe\teffectiveness\tof\tinternal\tcontrol\tover\tfinancial\treporting,\twhich\tappears\tin\tthis\tForm\t10-K.\n/s/\tPricewaterhouseCoopers\tLLP\nSan\tJose,\tCalifornia\nJanuary\t26,\t2024\nExhibit\t31.1\nCERTIFICATIONS\nI,\tElon\tMusk,\tcertify\tthat:\n1.I\thave\treviewed\tthis\tAnnual\tReport\ton\tForm\t10-K\tof\tTesla,\tInc.;\n2.Based\ton\tmy\tknowledge,\tthis\treport\tdoes\tnot\tcontain\tany\tuntrue\tstatement\tof\ta\tmaterial\tfact\tor\tomit\tto\tstate\ta\tmaterial\tfact\tnecessary\tto\tmake\tthe\nstatements\tmade,\tin\tlight\tof\tthe\tcircumstances\tunder\twhich\tsuch\tstatements\twere\tmade,\tnot\tmisleading\twith\trespect\tto\tthe\tperiod\tcovered\tby\tthis\nreport;\n3.Based\ton\tmy\tknowledge,\tthe\tfinancial\tstatements,\tand\tother\tfinancial\tinformation\tincluded\tin\tthis\treport,\tfairly\tpresent\tin\tall\tmaterial\trespects\tthe\nfinancial\tcondition,\tresults\tof\toperations\tand\tcash\tflows\tof\tthe\tregistrant\tas\tof,\tand\tfor,\tthe\tperiods\tpresented\tin\tthis\treport;\n4.The\tregistrant’s\tother\tcertifying\tofficer\tand\tI\tare\tresponsible\tfor\testablishing\tand\tmaintaining\tdisclosure\tcontrols\tand\tprocedures\t(as\tdefined\tin\nExchange\tAct\tRules\t13a-15(e)\tand\t15d-15(e))\tand\tinternal\tcontrol\tover\tfinancial\treporting\t(as\tdefined\tin\tExchange\tAct\tRules\t13a-15(f)\tand\t15d-\n15(f))\tfor\tthe\tregistrant\tand\thave:\n(a)Designed\tsuch\tdisclosure\tcontrols\tand\tprocedures,\tor\tcaused\tsuch\tdisclosure\tcontrols\tand\tprocedures\tto\tbe\tdesigned\tunder\tour\nsupervision,\tto\tensure\tthat\tmaterial\tinformation\trelating\tto\tthe\tregistrant,\tincluding\tits\tconsolidated\tsubsidiaries,\tis\tmade\tknown\tto\tus\nby\tothers\twithin\tthose\tentities,\tparticularly\tduring\tthe\tperiod\tin\twhich\tthis\treport\tis\tbeing\tprepared;", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 123, "lines": { "from": 1, "to": 25 } } } }, { "pageContent": "(b)Designed\tsuch\tinternal\tcontrol\tover\tfinancial\treporting,\tor\tcaused\tsuch\tinternal\tcontrol\tover\tfinancial\treporting\tto\tbe\tdesigned\tunder\nour\tsupervision,\tto\tprovide\treasonable\tassurance\tregarding\tthe\treliability\tof\tfinancial\treporting\tand\tthe\tpreparation\tof\tfinancial\nstatements\tfor\texternal\tpurposes\tin\taccordance\twith\tgenerally\taccepted\taccounting\tprinciples;\n(c)Evaluated\tthe\teffectiveness\tof\tthe\tregistrant’s\tdisclosure\tcontrols\tand\tprocedures\tand\tpresented\tin\tthis\treport\tour\tconclusions\tabout\nthe\teffectiveness\tof\tthe\tdisclosure\tcontrols\tand\tprocedures,\tas\tof\tthe\tend\tof\tthe\tperiod\tcovered\tby\tthis\treport\tbased\ton\tsuch\tevaluation;\nand\n(d)Disclosed\tin\tthis\treport\tany\tchange\tin\tthe\tregistrant’s\tinternal\tcontrol\tover\tfinancial\treporting\tthat\toccurred\tduring\tthe\tregistrant’s\nmost\trecent\tfiscal\tquarter\t(the\tregistrant’s\tfourth\tfiscal\tquarter\tin\tthe\tcase\tof\tan\tannual\treport)\tthat\thas\tmaterially\taffected,\tor\tis\nreasonably\tlikely\tto\tmaterially\taffect,\tthe\tregistrant’s\tinternal\tcontrol\tover\tfinancial\treporting;\tand\n5.The\tregistrant’s\tother\tcertifying\tofficer\tand\tI\thave\tdisclosed,\tbased\ton\tour\tmost\trecent\tevaluation\tof\tinternal\tcontrol\tover\tfinancial\treporting,\tto\tthe\nregistrant’s\tauditors\tand\tthe\taudit\tcommittee\tof\tthe\tregistrant’s\tBoard\tof\tDirectors\t(or\tpersons\tperforming\tthe\tequivalent\tfunctions):\n(a)All\tsignificant\tdeficiencies\tand\tmaterial\tweaknesses\tin\tthe\tdesign\tor\toperation\tof\tinternal\tcontrol\tover\tfinancial\treporting\twhich\tare\nreasonably\tlikely\tto\tadversely\taffect\tthe\tregistrant’s\tability\tto\trecord,\tprocess,\tsummarize\tand\treport\tfinancial\tinformation;\tand\n(b)Any\tfraud,\twhether\tor\tnot\tmaterial,\tthat\tinvolves\tmanagement\tor\tother\temployees\twho\thave\ta\tsignificant\trole\tin\tthe\tregistrant’s", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 123, "lines": { "from": 26, "to": 39 } } } }, { "pageContent": "internal\tcontrol\tover\tfinancial\treporting.\nDate:\tJanuary\t26,\t2024/s/\tElon\tMusk\n\t\nElon\tMusk\n\tChief\tExecutive\tOfficer\n\t(Principal\tExecutive\tOfficer)\nExhibit\t31.2\nCERTIFICATIONS\nI,\tVaibhav\tTaneja,\tcertify\tthat:\n1.I\thave\treviewed\tthis\tAnnual\tReport\ton\tForm\t10-K\tof\tTesla,\tInc.;\n2.Based\ton\tmy\tknowledge,\tthis\treport\tdoes\tnot\tcontain\tany\tuntrue\tstatement\tof\ta\tmaterial\tfact\tor\tomit\tto\tstate\ta\tmaterial\tfact\tnecessary\tto\tmake\tthe\nstatements\tmade,\tin\tlight\tof\tthe\tcircumstances\tunder\twhich\tsuch\tstatements\twere\tmade,\tnot\tmisleading\twith\trespect\tto\tthe\tperiod\tcovered\tby\tthis\nreport;\n3.Based\ton\tmy\tknowledge,\tthe\tfinancial\tstatements,\tand\tother\tfinancial\tinformation\tincluded\tin\tthis\treport,\tfairly\tpresent\tin\tall\tmaterial\trespects\tthe\nfinancial\tcondition,\tresults\tof\toperations\tand\tcash\tflows\tof\tthe\tregistrant\tas\tof,\tand\tfor,\tthe\tperiods\tpresented\tin\tthis\treport;\n4.The\tregistrant’s\tother\tcertifying\tofficer\tand\tI\tare\tresponsible\tfor\testablishing\tand\tmaintaining\tdisclosure\tcontrols\tand\tprocedures\t(as\tdefined\tin\nExchange\tAct\tRules\t13a-15(e)\tand\t15d-15(e))\tand\tinternal\tcontrol\tover\tfinancial\treporting\t(as\tdefined\tin\tExchange\tAct\tRules\t13a-15(f)\tand\t15d-\n15(f))\tfor\tthe\tregistrant\tand\thave:\n(a)Designed\tsuch\tdisclosure\tcontrols\tand\tprocedures,\tor\tcaused\tsuch\tdisclosure\tcontrols\tand\tprocedures\tto\tbe\tdesigned\tunder\tour\nsupervision,\tto\tensure\tthat\tmaterial\tinformation\trelating\tto\tthe\tregistrant,\tincluding\tits\tconsolidated\tsubsidiaries,\tis\tmade\tknown\tto\tus\nby\tothers\twithin\tthose\tentities,\tparticularly\tduring\tthe\tperiod\tin\twhich\tthis\treport\tis\tbeing\tprepared;\n(b)Designed\tsuch\tinternal\tcontrol\tover\tfinancial\treporting,\tor\tcaused\tsuch\tinternal\tcontrol\tover\tfinancial\treporting\tto\tbe\tdesigned\tunder\nour\tsupervision,\tto\tprovide\treasonable\tassurance\tregarding\tthe\treliability\tof\tfinancial\treporting\tand\tthe\tpreparation\tof\tfinancial\nstatements\tfor\texternal\tpurposes\tin\taccordance\twith\tgenerally\taccepted\taccounting\tprinciples;", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 124, "lines": { "from": 1, "to": 24 } } } }, { "pageContent": "(c)Evaluated\tthe\teffectiveness\tof\tthe\tregistrant’s\tdisclosure\tcontrols\tand\tprocedures\tand\tpresented\tin\tthis\treport\tour\tconclusions\tabout\nthe\teffectiveness\tof\tthe\tdisclosure\tcontrols\tand\tprocedures,\tas\tof\tthe\tend\tof\tthe\tperiod\tcovered\tby\tthis\treport\tbased\ton\tsuch\tevaluation;\nand\n(d)Disclosed\tin\tthis\treport\tany\tchange\tin\tthe\tregistrant’s\tinternal\tcontrol\tover\tfinancial\treporting\tthat\toccurred\tduring\tthe\tregistrant’s\nmost\trecent\tfiscal\tquarter\t(the\tregistrant’s\tfourth\tfiscal\tquarter\tin\tthe\tcase\tof\tan\tannual\treport)\tthat\thas\tmaterially\taffected,\tor\tis\nreasonably\tlikely\tto\tmaterially\taffect,\tthe\tregistrant’s\tinternal\tcontrol\tover\tfinancial\treporting;\tand\n5.The\tregistrant’s\tother\tcertifying\tofficer\tand\tI\thave\tdisclosed,\tbased\ton\tour\tmost\trecent\tevaluation\tof\tinternal\tcontrol\tover\tfinancial\treporting,\tto\tthe\nregistrant’s\tauditors\tand\tthe\taudit\tcommittee\tof\tthe\tregistrant’s\tBoard\tof\tDirectors\t(or\tpersons\tperforming\tthe\tequivalent\tfunctions):\n(a)All\tsignificant\tdeficiencies\tand\tmaterial\tweaknesses\tin\tthe\tdesign\tor\toperation\tof\tinternal\tcontrol\tover\tfinancial\treporting\twhich\tare\nreasonably\tlikely\tto\tadversely\taffect\tthe\tregistrant’s\tability\tto\trecord,\tprocess,\tsummarize\tand\treport\tfinancial\tinformation;\tand\n(b)Any\tfraud,\twhether\tor\tnot\tmaterial,\tthat\tinvolves\tmanagement\tor\tother\temployees\twho\thave\ta\tsignificant\trole\tin\tthe\tregistrant’s\ninternal\tcontrol\tover\tfinancial\treporting.\nDate:\tJanuary\t26,\t2024/s/\tVaibhav\tTaneja\n\t\nVaibhav\tTaneja\n\tChief\tFinancial\tOfficer\n\t(Principal\tFinancial\tOfficer\tand\t\nPrincipal\tAccounting\tOfficer)\nExhibit\t32.1\nSECTION\t1350\tCERTIFICATIONS\nI,\tElon\tMusk,\tcertify,\tpursuant\tto\t18\tU.S.C.\tSection\t1350,\tthat,\tto\tmy\tknowledge,\tthe\tAnnual\tReport\tof\tTesla,\tInc.\ton\tForm\t10-K\tfor\tthe\tannual\tperiod\tended\nDecember\t31,\t2023,\t(i)\tfully\tcomplies\twith\tthe\trequirements\tof\tSection\t13(a)\tor\t15(d)\tof\tthe\tSecurities\tExchange\tAct\tof\t1934\tand\t(ii)\tthat\tthe\tinformation", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 124, "lines": { "from": 25, "to": 46 } } } }, { "pageContent": "contained\tin\tsuch\tForm\t10-K\tfairly\tpresents,\tin\tall\tmaterial\trespects,\tthe\tfinancial\tcondition\tand\tresults\tof\toperations\tof\tTesla,\tInc.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 124, "lines": { "from": 47, "to": 47 } } } }, { "pageContent": "Date:\tJanuary\t26,\t2024/s/\tElon\tMusk\n\t\nElon\tMusk\n\tChief\tExecutive\tOfficer\n\t(Principal\tExecutive\tOfficer)\nI,\tVaibhav\tTaneja,\tcertify,\tpursuant\tto\t18\tU.S.C.\tSection\t1350,\tthat,\tto\tmy\tknowledge,\tthe\tAnnual\tReport\tof\tTesla,\tInc.\ton\tForm\t10-K\tfor\tthe\tannual\tperiod\nended\tDecember\t31,\t2023,\t(i)\tfully\tcomplies\twith\tthe\trequirements\tof\tSection\t13(a)\tor\t15(d)\tof\tthe\tSecurities\tExchange\tAct\tof\t1934\tand\t(ii)\tthat\tthe\ninformation\tcontained\tin\tsuch\tForm\t10-K\tfairly\tpresents,\tin\tall\tmaterial\trespects,\tthe\tfinancial\tcondition\tand\tresults\tof\toperations\tof\tTesla,\tInc.\nDate:\tJanuary\t26,\t2024/s/\tVaibhav\tTaneja\n\t\nVaibhav\tTaneja\n\tChief\tFinancial\tOfficer\n\t(Principal\tFinancial\tOfficer\tand\n\tPrincipal\tAccounting\tOfficer)\nExhibit\t97\nTesla,\tInc.\nCLAWBACK\tPOLICY\nThe\tCompensation\tCommittee\t(the\t“Committee”)\tof\tthe\tBoard\tof\tDirectors\t(the\t“Board”)\tof\tTesla,\tInc.\t(the\t“Company”)\nbelieves\tthat\tit\tis\tappropriate\tfor\tthe\tCompany\tto\tadopt\tthis\tClawback\tPolicy\t(this\t“Policy”)\tto\tbe\tapplied\tto\tthe\tcertain\nexecutive\tofficers\tof\tthe\tCompany\tand\tadopts\tthis\tPolicy\tto\tbe\teffective\tas\tof\tthe\tEffective\tDate.\n1.Definitions\nFor\tpurposes\tof\tthis\tPolicy,\tthe\tfollowing\tdefinitions\tshall\tapply:\na)“Company\tGroup”\tmeans\tthe\tCompany\tand\teach\tof\tits\tSubsidiaries,\tas\tapplicable.\nb)“Covered\tCompensation”\tmeans\tany\tIncentive-Based\tCompensation\tReceived\tby\ta\tperson\twho\tserved\tas\tan\nExecutive\tOfficer\tat\tany\ttime\tduring\tthe\tperformance\tperiod\tfor\tsuch\tIncentive-Based\tCompensation\tand\tthat\twas\nReceived\t(i)\ton\tor\tafter\tOctober\t2,\t2023\tand\t(ii)\tafter\tthe\tperson\tbecame\tan\tExecutive\tOfficer.\nc)“Effective\tDate”\tmeans\tNovember\t15,\t2023.\nd)“Erroneously\tAwarded\tCompensation”\tmeans\tthe\tamount\tof\tCovered\tCompensation\tReceived\tby\ta\tperson\tduring\nthe\tfiscal\tperiod\twhen\tthe\tapplicable\tFinancial\tReporting\tMeasure\trelating\tto\tsuch\tCovered\tCompensation\twas\nattained\tthat\texceeds\tthe\tamount\tof\tCovered\tCompensation\tthat\totherwise\twould\thave\tbeen\tReceived\tby\tsuch", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 125, "lines": { "from": 1, "to": 30 } } } }, { "pageContent": "person\thad\tsuch\tamount\tbeen\tdetermined\tbased\ton\tthe\tapplicable\tRestatement,\tcomputed\twithout\tregard\tto\tany\ntaxes\tpaid\t(i.e.,\ton\ta\tpre-tax\tbasis).\tFor\tCovered\tCompensation\tbased\ton\tstock\tprice\tor\ttotal\tshareholder\treturn,\nwhere\tthe\tamount\tof\tErroneously\tAwarded\tCompensation\tis\tnot\tsubject\tto\tmathematical\trecalculation\tdirectly\nfrom\tthe\tinformation\tin\ta\tRestatement,\tthe\tCommittee\twill\tdetermine\tthe\tamount\tof\tsuch\tCovered\tCompensation\nthat\tconstitutes\tErroneously\tAwarded\tCompensation,\tif\tany,\tbased\ton\ta\treasonable\testimate\tof\tthe\teffect\tof\tthe\nRestatement\ton\tthe\tstock\tprice\tor\ttotal\tshareholder\treturn\tupon\twhich\tthe\tCovered\tCompensation\twas\tgranted,\nvested\tor\tpaid\tand\tthe\tCommittee\tshall\tmaintain\tdocumentation\tof\tsuch\tdetermination\tand\tprovide\tsuch\ndocumentation\tto\tNasdaq.\ne)“Exchange\tAct”\tmeans\tthe\tU.S.\tSecurities\tExchange\tAct\tof\t1934,\tas\tamended.\nf)“Executive\tOfficer”\tmeans\teach\t“executive\tofficer”\tof\tthe\tCompany\t(as\tdefined\tin\tRule\t10D-1(d)\tunder\tthe\nExchange\tAct),\twhich\tshall\tbe\tdeemed\tto\tinclude\tany\tindividuals\tidentified\tby\tthe\tCompany\tas\texecutive\tofficers\npursuant\tto\tItem\t401(b)\tof\tRegulation\tS-K\tunder\tthe\tExchange\tAct.\tBoth\tcurrent\tand\tformer\tExecutive\tOfficers\nare\tsubject\tto\tthe\tPolicy\tin\taccordance\twith\tits\tterms.\n1", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 125, "lines": { "from": 31, "to": 44 } } } }, { "pageContent": "g)“Financial\tReporting\tMeasure”\tmeans\t(i)\tany\tmeasure\tthat\tis\tdetermined\tand\tpresented\tin\taccordance\twith\tthe\naccounting\tprinciples\tused\tin\tpreparing\tthe\tCompany’s\tfinancial\tstatements,\tand\tany\tmeasures\tderived\twholly\tor\nin\tpart\tfrom\tsuch\tmeasures\tand\tmay\tconsist\tof\tGAAP\tor\tnon-GAAP\tfinancial\tmeasures\t(as\tdefined\tunder\nRegulation\tG\tof\tthe\tExchange\tAct\tand\tItem\t10\tof\tRegulation\tS-K\tunder\tthe\tExchange\tAct),\t(ii)\tstock\tprice\tor\t(iii)\ntotal\tshareholder\treturn.\tFinancial\tReporting\tMeasures\tmay\tor\tmay\tnot\tbe\tfiled\twith\tthe\tSEC\tand\tmay\tbe\npresented\toutside\tthe\tCompany’s\tfinancial\tstatements,\tsuch\tas\tin\tManagements’\tDiscussion\tand\tAnalysis\tof\nFinancial\tConditions\tand\tResult\tof\tOperations\tor\tin\tthe\tperformance\tgraph\trequired\tunder\tItem\t201(e)\tof\nRegulation\tS-K\tunder\tthe\tExchange\tAct.\nh)“Incentive-Based\tCompensation”\tmeans\tany\tcompensation\tthat\tis\tgranted,\tearned\tor\tvested\tbased\twholly\tor\tin\npart\tupon\tthe\tattainment\tof\ta\tFinancial\tReporting\tMeasure.\ni)“Lookback\tPeriod”\tmeans\tthe\tthree\tcompleted\tfiscal\tyears\t(plus\tany\ttransition\tperiod\tof\tless\tthan\tnine\tmonths\nthat\tis\twithin\tor\timmediately\tfollowing\tthe\tthree\tcompleted\tfiscal\tyears\tand\tthat\tresults\tfrom\ta\tchange\tin\tthe\nCompany’s\tfiscal\tyear)\timmediately\tpreceding\tthe\tdate\ton\twhich\tthe\tCompany\tis\trequired\tto\tprepare\ta\nRestatement\tfor\ta\tgiven\treporting\tperiod,\twith\tsuch\tdate\tbeing\tthe\tearlier\tof:\t(i)\tthe\tdate\tthe\tBoard,\ta\tcommittee\nof\tthe\tBoard,\tor\tthe\tofficer\tor\tofficers\tof\tthe\tCompany\tauthorized\tto\ttake\tsuch\taction\tif\tBoard\taction\tis\tnot\nrequired,\tconcludes,\tor\treasonably\tshould\thave\tconcluded,\tthat\tthe\tCompany\tis\trequired\tto\tprepare\ta\nRestatement,\tor\t(ii)\tthe\tdate\ta\tcourt,\tregulator\tor\tother\tlegally\tauthorized\tbody\tdirects\tthe\tCompany\tto\tprepare\ta\nRestatement.\tRecovery\tof\tany\tErroneously\tAwarded\tCompensation\tunder\tthe\tPolicy\tis\tnot\tdependent\ton\tif\tor\nwhen\tthe\tRestatement\tis\tactually\tfiled.\nj)“Nasdaq”\tmeans\tthe\tNasdaq\tStock\tMarket.", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 126, "lines": { "from": 1, "to": 20 } } } }, { "pageContent": "j)“Nasdaq”\tmeans\tthe\tNasdaq\tStock\tMarket.\nk)“Received”:\tIncentive-Based\tCompensation\tis\tdeemed\t“Received”\tin\tthe\tCompany’s\tfiscal\tperiod\tduring\twhich\nthe\tFinancial\tReporting\tMeasure\tspecified\tin\tor\totherwise\trelating\tto\tthe\tIncentive-Based\tCompensation\taward\tis\nattained,\teven\tif\tthe\tgrant,\tcertification\tof\tachievement,\tvesting\tor\tpayment\tof\tthe\tIncentive-Based\tCompensation\noccurs\tafter\tthe\tend\tof\tthat\tperiod.\nl)“Restatement”\tmeans\tan\taccounting\trestatement\trequired\tdue\tto\tthe\tmaterial\tnoncompliance\tby\tthe\tCompany\nwith\tany\tfinancial\treporting\trequirement\tunder\tthe\tsecurities\tlaws,\tincluding\t(i)\tto\tcorrect\tan\terror\tin\tpreviously\nissued\tfinancial\tstatements\tthat\tis\tmaterial\tto\tthe\tpreviously\tissued\tfinancial\tstatements\t(commonly\treferred\tto\nas\ta\t“Big\tR”\trestatement)\tor\t(ii)\tto\tcorrect\tan\terror\tin\tpreviously\tissued\tfinancial\tstatements\tthat\tis\tnot\tmaterial\nto\tthe\tpreviously\tissued\tfinancial\tstatements\tbut\tthat\twould\tresult\tin\ta\tmaterial\tmisstatement\tif\tthe\terror\twere\ncorrected\tin\tthe\tcurrent\tperiod\tor\tleft\tuncorrected\tin\tthe\tcurrent\tperiod\t(commonly\treferred\tto\tas\ta\t“little\tr”\nrestatement).\tChanges\tto\tthe\tCompany’s\tfinancial\tstatements\tthat\tdo\tnot\trepresent\terror\tcorrections\tunder\tthe\nthen-current\trelevant\taccounting\tstandards\twill\tnot\tconstitute\tRestatements.\n2", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 126, "lines": { "from": 20, "to": 33 } } } }, { "pageContent": "m)“SEC”\tmeans\tthe\tU.S.\tSecurities\tand\tExchange\tCommission.\nn)“Subsidiary”\tmeans\tany\tdomestic\tor\tforeign\tcorporation,\tpartnership,\tassociation,\tjoint\tstock\tcompany,\tjoint\nventure,\ttrust\tor\tunincorporated\torganization\t“affiliated”\twith\tthe\tCompany,\tthat\tis,\tdirectly\tor\tindirectly,\tthrough\none\tor\tmore\tintermediaries,\t“controlling”,\t“controlled\tby”\tor\t“under\tcommon\tcontrol\twith”,\tthe\tCompany.\n“Control”\tfor\tthis\tpurpose\tmeans\tthe\tpossession,\tdirect\tor\tindirect,\tof\tthe\tpower\tto\tdirect\tor\tcause\tthe\tdirection\tof\nthe\tmanagement\tand\tpolicies\tof\tsuch\tperson,\twhether\tthrough\tthe\townership\tof\tvoting\tsecurities,\tcontract\tor\notherwise.\n2.Recoupment\tof\tErroneously\tAwarded\tCompensation\nIn\tthe\tevent\tof\ta\tRestatement,\tany\tErroneously\tAwarded\tCompensation\tReceived\tduring\tthe\tLookback\tPeriod\tthat\t(a)\tis\nthen-outstanding\tbut\thas\tnot\tyet\tbeen\tpaid\tshall\tbe\tautomatically\tand\timmediately\tforfeited\tor\t(b)\thas\tbeen\tpaid\tto\tany\nperson\tshall\tbe\tsubject\tto\treasonably\tprompt\trepayment\tto\tthe\tCompany\tGroup\tin\taccordance\twith\tSection\t3\tof\tthis\tPolicy.\nThe\tCommittee\tmust\tpursue\t(and\tshall\tnot\thave\tthe\tdiscretion\tto\twaive)\tthe\tforfeiture\tand/or\trepayment\tof\tsuch\nErroneously\tAwarded\tCompensation\tin\taccordance\twith\tSection\t3\tof\tthis\tPolicy,\texcept\tas\tprovided\tbelow.\tRecovery\tof\tany\nErroneously\tAwarded\tCompensation\tunder\tthe\tPolicy\tis\tnot\tdependent\ton\tfraud\tor\tmisconduct\tby\tany\tperson\tin\tconnection\nwith\tthe\tRestatement.\nNotwithstanding\tthe\tforegoing,\tthe\tCommittee\t(or,\tif\tthe\tCommittee\tis\tnot\ta\tcommittee\tof\tthe\tBoard\tresponsible\tfor\tthe\nCompany’s\texecutive\tcompensation\tdecisions\tand\tcomposed\tentirely\tof\tindependent\tdirectors,\ta\tmajority\tof\tthe\nindependent\tdirectors\tserving\ton\tthe\tBoard)\tmay\tdetermine\tnot\tto\tpursue\tthe\tforfeiture\tand/or\trecovery\tof\tErroneously\nAwarded\tCompensation\tfrom\tany\tperson\tif\tthe\tCommittee\tdetermines\tthat\tsuch\tforfeiture\tand/or\trecovery\twould\tbe\nimpracticable\tdue\tto\tany\tof\tthe\tfollowing\tcircumstances:\t(i)\tthe\tdirect\texpense\tpaid\tto\ta\tthird\tparty\t(for\texample,", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 127, "lines": { "from": 1, "to": 20 } } } }, { "pageContent": "reasonable\tlegal\texpenses\tand\tconsulting\tfees)\tto\tassist\tin\tenforcing\tthe\tPolicy\twould\texceed\tthe\tamount\tto\tbe\trecovered\n(following\treasonable\tattempts\tby\tthe\tCompany\tGroup\tto\trecover\tsuch\tErroneously\tAwarded\tCompensation,\tthe\ndocumentation\tof\tsuch\tattempts,\tand\tthe\tprovision\tof\tsuch\tdocumentation\tto\tthe\tNasdaq)\tor\t(ii)\trecovery\twould\tlikely\ncause\tany\totherwise\ttax-qualified\tretirement\tplan,\tunder\twhich\tbenefits\tare\tbroadly\tavailable\tto\temployees\tof\tCompany\nGroup,\tto\tfail\tto\tmeet\tthe\trequirements\tof\t26\tU.S.C.\n401(a)(13)\tor\t26\tU.S.C.\t411(a)\tand\tregulations\tthereunder.\n3.Means\tof\tRepayment\nIn\tthe\tevent\tthat\tthe\tCommittee\tdetermines\tthat\tany\tperson\tshall\trepay\tany\tErroneously\tAwarded\tCompensation,\tthe\nCommittee\tshall\tprovide\twritten\tnotice\tto\tsuch\tperson\tby\temail\tor\tcertified\tmail\tto\tthe\tphysical\taddress\ton\tfile\twith\tthe\nCompany\tGroup\tfor\tsuch\tperson,\tand\tthe\tperson\tshall\tsatisfy\tsuch\trepayment\tin\ta\tmanner\tand\ton\tsuch\tterms\tas\trequired\nby\tthe\tCommittee,\tand\tthe\tCompany\tGroup\tshall\tbe\tentitled\tto\tset\toff\tthe\trepayment\tamount\tagainst\tany\tamount\towed\tto\nthe\tperson\tby\tthe\tCompany\tGroup,\tto\trequire\tthe\tforfeiture\tof\tany\taward\tgranted\tby\tthe\tCompany\tGroup\tto\tthe\tperson,\tor\nto\ttake\tany\tand\tall\tnecessary\tactions\tto\treasonably\tpromptly\trecoup\tthe\trepayment\tamount\tfrom\tthe\tperson,\tin\teach\tcase,\nto\tthe\tfullest\textent\tpermitted\tunder\tapplicable\tlaw,\tincluding\twithout\tlimitation,\tSection\t409A\tof\tthe\tU.S.\n3", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 127, "lines": { "from": 21, "to": 35 } } } }, { "pageContent": "Internal\tRevenue\tCode\tand\tthe\tregulations\tand\tguidance\tthereunder.\tIf\tthe\tCommittee\tdoes\tnot\tspecify\ta\trepayment\ntiming\tin\tthe\twritten\tnotice\tdescribed\tabove,\tthe\tapplicable\tperson\tshall\tbe\trequired\tto\trepay\tthe\tErroneously\tAwarded\nCompensation\tto\tthe\tCompany\tGroup\tby\twire,\tcash\tor\tcashier’s\tcheck\tno\tlater\tthan\tthirty\t(30)\tdays\tafter\treceipt\tof\tsuch\nnotice.\n4.No\tIndemnification\nNo\tperson\tshall\tbe\tindemnified,\tinsured\tor\treimbursed\tby\tthe\tCompany\tGroup\tin\trespect\tof\tany\tloss\tof\tcompensation\tby\nsuch\tperson\tin\taccordance\twith\tthis\tPolicy,\tnor\tshall\tany\tperson\treceive\tany\tadvancement\tof\texpenses\tfor\tdisputes\trelated\nto\tany\tloss\tof\tcompensation\tby\tsuch\tperson\tin\taccordance\twith\tthis\tPolicy,\tand\tno\tperson\tshall\tbe\tpaid\tor\treimbursed\tby\nthe\tCompany\tGroup\tfor\tany\tpremiums\tpaid\tby\tsuch\tperson\tfor\tany\tthird-party\tinsurance\tpolicy\tcovering\tpotential\trecovery\nobligations\tunder\tthis\tPolicy.\n5.Miscellaneous\nThis\tPolicy\tgenerally\twill\tbe\tadministered\tand\tinterpreted\tby\tthe\tCommittee,\tprovided\tthat\tthe\tBoard\tmay,\tfrom\ttime\tto\ntime,\texercise\tdiscretion\tto\tadminister\tand\tinterpret\tthis\tPolicy,\tin\twhich\tcase,\tall\treferences\therein\tto\t“Committee”\tshall\tbe\ndeemed\tto\trefer\tto\tthe\tBoard.\tAny\tdetermination\tby\tthe\tCommittee\twith\trespect\tto\tthis\tPolicy\tshall\tbe\tfinal,\tconclusive\tand\nbinding\ton\tall\tinterested\tparties.\tAny\tdiscretionary\tdeterminations\tof\tthe\tCommittee\tunder\tthis\tPolicy,\tif\tany,\tneed\tnot\tbe\nuniform\twith\trespect\tto\tall\tpersons,\tand\tmay\tbe\tmade\tselectively\tamongst\tpersons,\twhether\tor\tnot\tsuch\tpersons\tare\nsimilarly\tsituated.\nThis\tPolicy\tis\tintended\tto\tsatisfy\tthe\trequirements\tof\tSection\t954\tof\tthe\tDodd-Frank\tWall\tStreet\tReform\tand\tConsumer\nProtection\tAct,\tas\tit\tmay\tbe\tamended\tfrom\ttime\tto\ttime,\tRule\t10D-\t1\tunder\tthe\tExchange\tAct,\tand\tany\trelated\trules\tor\nregulations\tpromulgated\tby\tthe\tSEC\tor\tthe\tNasdaq,\tincluding\tany\tadditional\tor\tnew\trequirements\tthat\tbecome\teffective", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 128, "lines": { "from": 1, "to": 20 } } } }, { "pageContent": "after\tthe\tEffective\tDate\twhich\tupon\teffectiveness\tshall\tbe\tdeemed\tto\tautomatically\tamend\tthis\tPolicy\tto\tthe\textent\nnecessary\tto\tcomply\twith\tsuch\tadditional\tor\tnew\trequirements.\nThe\tprovisions\tin\tthis\tPolicy\tare\tintended\tto\tbe\tapplied\tto\tthe\tfullest\textent\tof\tthe\tlaw.\tTo\tthe\textent\tthat\tany\tprovision\nof\tthis\tPolicy\tis\tfound\tto\tbe\tunenforceable\tor\tinvalid\tunder\tany\tapplicable\tlaw,\tsuch\tprovision\twill\tbe\tapplied\tto\tthe\nmaximum\textent\tpermitted\tand\tshall\tautomatically\tbe\tdeemed\tamended\tin\ta\tmanner\tconsistent\twith\tits\tobjectives\tto\tthe\nextent\tnecessary\tto\tconform\tto\tapplicable\tlaw.\tThe\tinvalidity\tor\tunenforceability\tof\tany\tprovision\tof\tthis\tPolicy\tshall\tnot\naffect\tthe\tvalidity\tor\tenforceability\tof\tany\tother\tprovision\tof\tthis\tPolicy.\tRecoupment\tof\tErroneously\tAwarded\tCompensation\nunder\tthis\tPolicy\tis\tnot\tdependent\tupon\tthe\tCompany\tGroup\tsatisfying\tany\tconditions\tin\tthis\tPolicy,\tincluding\tany\nrequirements\tto\tprovide\tapplicable\tdocumentation\tto\tthe\tNasdaq.\nThe\trights\tof\tthe\tCompany\tGroup\tunder\tthis\tPolicy\tto\tseek\tforfeiture\tor\treimbursement\tare\tin\taddition\tto,\tand\tnot\tin\nlieu\tof,\tany\trights\tof\trecoupment,\tor\tremedies\tor\trights\tother\tthan\trecoupment,\tthat\tmay\tbe\tavailable\tto\tthe\tCompany\nGroup\tpursuant\tto\tthe\tterms\tof\tany\tlaw,\tgovernment\tregulation\tor\tstock\texchange\tlisting\trequirement\tor\tany\tother\tpolicy,\ncode\tof\n4", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 128, "lines": { "from": 21, "to": 34 } } } }, { "pageContent": "conduct,\temployee\thandbook,\temployment\tagreement,\tequity\taward\tagreement,\tor\tother\tplan\tor\tagreement\tof\tthe\nCompany\tGroup.\n6.Amendment\tand\tTermination\nTo\tthe\textent\tpermitted\tby,\tand\tin\ta\tmanner\tconsistent\twith\tapplicable\tlaw,\tincluding\tSEC\tand\tNasdaq\trules,\tthe\nCommittee\tmay\tterminate,\tsuspend\tor\tamend\tthis\tPolicy\tat\tany\ttime\tin\tits\tdiscretion.\n7.Successors\nThis\tPolicy\tshall\tbe\tbinding\tand\tenforceable\tagainst\tall\tpersons\tand\ttheir\trespective\tbeneficiaries,\theirs,\texecutors,\nadministrators\tor\tother\tlegal\trepresentatives\twith\trespect\tto\tany\tCovered\tCompensation\tgranted,\tvested\tor\tpaid\tto\tor\nadministered\tby\tsuch\tpersons\tor\tentities.\n8.Agreement\tto\tArbitrate;\tGoverning\tLaw;\tVenue\nThis\tPolicy\tand\tall\trights\tand\tobligations\thereunder\twill\tbe\tgoverned\tby\tand\tinterpreted\tin\taccordance\twith\tTexas\tlaw.\t\nAny\tdispute\tarising\tfrom\tor\trelating\tto\tthis\tPolicy\tshall\tbe\tsubject\tto\tbinding\tarbitration\tin\taccordance\twith\tthe\tthen-current\nStreamlined\tArbitration\tRules\tof\tthe\tJudicial\tArbitration\tand\tMediation\tServices\t(“JAMS”).\t\tThe\texistence,\tcontent\tand\tresult\nof\tthe\tarbitration\tshall\tbe\theld\tin\tconfidence\tby\tthe\tparties,\ttheir\trepresentatives,\tany\tother\tparticipants\tand\tthe\tarbitrator.\t\nThe\tarbitration\twill\tbe\tconducted\tby\ta\tsingle\tarbitrator\tselected\tby\tagreement\tof\tthe\tparties\tor,\tfailing\tsuch\tagreement,\nappointed\tin\taccordance\twith\tthe\tJAMS\trules.\t\tThe\tarbitration\tshall\tbe\tconducted\tin\tEnglish\tand\tin\tAustin,\tTexas.\t\tEach\nparty\twill\tbear\tits\town\texpenses\tin\tthe\tarbitration\tand\twill\tshare\tequally\tthe\tcosts\tof\tthe\tarbitration;\tprovided,\thowever,\nthat\tthe\tarbitrator\tmay,\tin\tits\tdiscretion,\taward\treasonable\tcosts\tand\tfees\tto\tthe\tprevailing\tparty.\t\tJudgment\tupon\tthe\naward\trendered\tin\tthe\tarbitration\tmay\tbe\tentered\tin\tany\tcourt\tof\tcompetent\tjurisdiction.\t\tIf\tany\tdispute\tin\tarbitration\tunder\nthis\tPolicy\tis\tsubstantially\tthe\tsame\tor\tinvolves\tcommon\tissues\tof\tlaw\tor\tfact,\teither\tparty\tshall\tbe\tentitled\tto\trequire\tthat", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 129, "lines": { "from": 1, "to": 20 } } } }, { "pageContent": "any\tsuch\tdispute\tbe\tconsolidated\twith\tthe\trelevant\tarbitration\tpursuant\thereto,\tand\tthe\tother\tparty\tshall\tpermit,\tand\tco-\noperate\tin,\tsuch\tconsolidation.\t\t\n5", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 129, "lines": { "from": 21, "to": 23 } } } }, { "pageContent": "Tesla,\tInc.\nCLAWBACK\tPOLICY\nACKNOWLEDGMENT,\tCONSENT\tAND\tAGREEMENT\nI\tacknowledge\tthat\tI\thave\treceived\tand\treviewed\ta\tcopy\tof\tthe\tTesla,\tInc.\tClawback\tPolicy\t(as\tmay\tbe\tamended\tfrom\ntime\tto\ttime,\tthe\t“Policy”)\tand\tI\thave\tbeen\tgiven\tan\topportunity\tto\task\tquestions\tabout\tthe\tPolicy\tand\treview\tit\twith\tmy\ncounsel.\tI\tknowingly,\tvoluntarily\tand\tirrevocably\tconsent\tto\tand\tagree\tto\tbe\tbound\tby\tand\tsubject\tto\tthe\tPolicy’s\tterms\tand\nconditions,\tincluding\tthat\tI\twill\treturn\tany\tErroneously\tAwarded\tCompensation\tthat\tis\trequired\tto\tbe\trepaid\tin\taccordance\nwith\tthe\tPolicy.\tI\tfurther\tacknowledge,\tunderstand\tand\tagree\tthat\t(i)\tthe\tcompensation\tthat\tI\treceive,\thave\treceived\tor\tmay\nbecome\tentitled\tto\treceive\tfrom\tthe\tCompany\tGroup\tis\tsubject\tto\tthe\tPolicy,\tand\tthe\tPolicy\tmay\taffect\tsuch\tcompensation\nand\t(ii)\tI\thave\tno\tright\tto\tindemnification,\tinsurance\tpayments\tor\tother\treimbursement\tby\tor\tfrom\tthe\tCompany\tGroup\tfor\nany\tcompensation\tthat\tis\tsubject\tto\trecoupment\tand/or\tforfeiture\tunder\tthe\tPolicy.\nCapitalized\tterms\tused\tbut\tnot\tdefined\therein\thave\tthe\tmeanings\tset\tforth\tin\tthe\tPolicy.\nSigned:\nPrint\tName:\nDate:", "metadata": { "source": "./test_docs/test-tsla-10k-2023.pdf", "pdf": { "version": "1.10.100", "info": { "PDFFormatVersion": "1.4", "IsAcroFormPresent": false, "IsXFAPresent": false, "Title": "", "Creator": "wkhtmltopdf 0.12.6", "Producer": "Qt 5.15.2", "CreationDate": "D:20240129111114Z" }, "metadata": null, "totalPages": 130 }, "loc": { "pageNumber": 130, "lines": { "from": 1, "to": 15 } } } } ] ================================================ FILE: ch9/py/src/ingestion_graph/__init__.py ================================================ ================================================ FILE: ch9/py/src/ingestion_graph/configuration.py ================================================ """Define the configurable parameters for the index graph.""" from __future__ import annotations from dataclasses import dataclass, field, fields from typing import Annotated, Literal, Optional, Type, TypeVar, Any from langchain_core.runnables import RunnableConfig, ensure_config DEFAULT_DOCS_FILE = "src/docSplits.json" @dataclass(kw_only=True) class IndexConfiguration: """Configuration class for indexing and retrieval operations. This class defines the parameters needed for configuring the indexing and retrieval processes, including embedding model selection, retriever provider choice, and search parameters. """ docs_file: str = field( default=DEFAULT_DOCS_FILE, metadata={ "description": "Path to a JSON file containing default documents to index." }, ) embedding_model: Annotated[ str, {"__template_metadata__": {"kind": "embeddings"}}, ] = field( default="openai/text-embedding-3-small", metadata={ "description": "Name of the embedding model to use. Must be a valid embedding model name." }, ) retriever_provider: Annotated[ Literal["supabase", "chroma"], {"__template_metadata__": {"kind": "retriever"}}, ] = field( default="chroma", metadata={ "description": "The vector store provider to use for retrieval. Options are 'supabase', or 'chroma'." }, ) search_kwargs: dict[str, Any] = field( default_factory=dict, metadata={ "description": "Additional keyword arguments to pass to the search function of the retriever." }, ) @classmethod def from_runnable_config( cls: Type[T], config: Optional[RunnableConfig] = None ) -> T: """Create an IndexConfiguration instance from a RunnableConfig object. Args: cls (Type[T]): The class itself. config (Optional[RunnableConfig]): The configuration object to use. Returns: T: An instance of IndexConfiguration with the specified configuration. """ config = ensure_config(config) configurable = config.get("configurable") or {} _fields = {f.name for f in fields(cls) if f.init} return cls(**{k: v for k, v in configurable.items() if k in _fields}) T = TypeVar("T", bound=IndexConfiguration) ================================================ FILE: ch9/py/src/ingestion_graph/graph.py ================================================ import json from typing import Optional from langchain_core.runnables import RunnableConfig from langgraph.graph import StateGraph, START, END from ingestion_graph.configuration import IndexConfiguration from ingestion_graph.state import IndexState, reduce_docs from shared.retrieval import make_retriever async def ingest_docs(state: IndexState, config: Optional[RunnableConfig] = None) -> dict[str, str]: if not config: raise ValueError("Configuration required to run index_docs.") configuration = IndexConfiguration.from_runnable_config(config) docs = state["docs"] if not docs: with open(configuration.docs_file, encoding="utf-8") as file_content: serialized_docs = json.loads(file_content.read()) docs = reduce_docs([], serialized_docs) else: docs = reduce_docs([], docs) with make_retriever(configuration) as retriever: await retriever.aadd_documents(docs) return {"docs": "delete"} # Define the graph builder = StateGraph(IndexState, config_schema=IndexConfiguration) builder.add_node(ingest_docs) builder.add_edge(START, "ingest_docs") builder.add_edge("ingest_docs", END) # Compile into a graph object that you can invoke and deploy. graph = builder.compile() graph.name = "IngestionGraph" ================================================ FILE: ch9/py/src/ingestion_graph/state.py ================================================ """State management for the index graph.""" from dataclasses import dataclass, field from typing import Annotated from langchain_core.documents import Document from shared.state import reduce_docs # The index state defines the simple IO for the single-node index graph @dataclass(kw_only=True) class IndexState: """Represents the state for document indexing and retrieval. This class defines the structure of the index state, which includes the documents to be indexed and the retriever used for searching these documents. """ docs: Annotated[list[Document], reduce_docs] = field( default_factory=list, metadata={ "description": "A list of documents that the agent can index." }, ) ================================================ FILE: ch9/py/src/retrieval_graph/__init__.py ================================================ ================================================ FILE: ch9/py/src/retrieval_graph/configuration.py ================================================ """Define the configurable parameters for the agent.""" from __future__ import annotations from dataclasses import dataclass, field, fields from typing import Annotated, Any, Literal, Optional, Type, TypeVar from langchain_core.runnables import RunnableConfig, ensure_config from shared.configuration import BaseConfiguration @dataclass(kw_only=True) class Configuration(BaseConfiguration): """The configuration for the agent.""" query_model: Annotated[str, {"__template_metadata__": {"kind": "llm"}}] = field( default="openai/gpt-4o", metadata={ "description": "The language model used for processing and refining queries. Should be in the form: provider/model-name." }, ) ================================================ FILE: ch9/py/src/retrieval_graph/graph.py ================================================ from typing import Literal from langchain.hub import pull from langchain_core.prompts import ChatPromptTemplate from langchain_core.messages import HumanMessage from langchain_openai import ChatOpenAI from langgraph.graph import END, START, StateGraph from pydantic import BaseModel from retrieval_graph.utils import format_docs, load_chat_model from retrieval_graph.configuration import Configuration from shared.retrieval import make_retriever from langchain_core.runnables import RunnableConfig from retrieval_graph.state import AgentState class Schema(BaseModel): route: str = Literal['retrieve', 'direct'] direct_answer: str async def check_query_type(state: AgentState, *, config: RunnableConfig): configuration = Configuration.from_runnable_config(config) structured_llm = load_chat_model( configuration.query_model).with_structured_output(Schema) routing_prompt = ChatPromptTemplate.from_messages([ ("system", "You are a routing assistant. Your job is to determine if a question needs document retrieval or can be answered directly.\n\nRespond with either:\n'retrieve' - if the question requires retrieving documents\n'direct' - if the question can be answered directly AND your direct answer"), ("human", "{query}") ]) formatted_prompt = routing_prompt.invoke({"query": state["query"]}) response = structured_llm.invoke(formatted_prompt) route = response.route if route == "retrieve": return {"route": "retrieve_documents"} else: direct_answer = response.direct_answer return {"route": END, "messages": [HumanMessage(content=direct_answer)]} async def route_query(state: AgentState, *, config: RunnableConfig): route = state["route"] if not route: raise ValueError("Route is not set") if route == "retrieve_documents": return "retrieve_documents" else: return END async def retrieve_documents(state: AgentState, *, config: RunnableConfig): configuration = Configuration.from_runnable_config(config) retriever = make_retriever(configuration) response = retriever.invoke(state["query"]) return {"documents": response} async def generate_response(state: AgentState, *, config: RunnableConfig): configuration = Configuration.from_runnable_config(config) context = format_docs(state["documents"]) prompt_template = pull("rlm/rag-prompt") formatted_prompt = prompt_template.invoke( {"context": context, "question": state["query"]}) messages = formatted_prompt.messages + state["messages"] response = load_chat_model(configuration.query_model).invoke(messages) return {"messages": response} builder = StateGraph(AgentState, config_schema=Configuration) builder.add_node("check_query_type", check_query_type) builder.add_node("retrieve_documents", retrieve_documents) builder.add_node("generate_response", generate_response) builder.add_edge(START, "check_query_type") builder.add_conditional_edges("check_query_type", route_query) builder.add_edge("retrieve_documents", "generate_response") builder.add_edge("generate_response", END) # Compile into a graph object that you can invoke and deploy. graph = builder.compile() graph.name = "RetrievalGraph" ================================================ FILE: ch9/py/src/retrieval_graph/state.py ================================================ from typing import Annotated from langgraph.graph import MessagesState from langchain_core.documents import Document from shared.state import reduce_docs class AgentState(MessagesState): query: str route: str documents: Annotated[list[Document], reduce_docs] ================================================ FILE: ch9/py/src/retrieval_graph/utils.py ================================================ from typing import Optional from langchain_core.documents import Document from langchain_core.language_models import BaseChatModel from langchain.chat_models import init_chat_model def _format_doc(doc: Document) -> str: """Format a single document as XML. Args: doc (Document): The document to format. Returns: str: The formatted document as an XML string. """ metadata = doc.metadata or {} meta = "".join(f" {k}={v!r}" for k, v in metadata.items()) if meta: meta = f" {meta}" return f"\n{doc.page_content}\n" def format_docs(docs: Optional[list[Document]]) -> str: """Format a list of documents as XML. This function takes a list of Document objects and formats them into a single XML string. Args: docs (Optional[list[Document]]): A list of Document objects to format, or None. Returns: str: A string containing the formatted documents in XML format. Examples: >>> docs = [Document(page_content="Hello"), Document(page_content="World")] >>> print(format_docs(docs)) Hello World >>> print(format_docs(None)) """ if not docs: return "" formatted = "\n".join(_format_doc(doc) for doc in docs) return f""" {formatted} """ def load_chat_model(fully_specified_name: str) -> BaseChatModel: """Load a chat model from a fully specified name. Args: fully_specified_name (str): String in the format 'provider/model'. """ if "/" in fully_specified_name: provider, model = fully_specified_name.split("/", maxsplit=1) else: provider = "" model = fully_specified_name return init_chat_model(model, model_provider=provider) ================================================ FILE: ch9/py/src/shared/__init__.py ================================================ ================================================ FILE: ch9/py/src/shared/configuration.py ================================================ """Define the configurable parameters for the agent.""" from __future__ import annotations from dataclasses import dataclass, field, fields from typing import Annotated, Any, Literal, Optional, Type, TypeVar from langchain_core.runnables import RunnableConfig, ensure_config @dataclass(kw_only=True) class BaseConfiguration: """Configuration class for indexing and retrieval operations. This class defines the parameters needed for configuring the indexing and retrieval processes, including user identification, embedding model selection, retriever provider choice, and search parameters. """ embedding_model: Annotated[ str, {"__template_metadata__": {"kind": "embeddings"}}, ] = field( default="openai/text-embedding-3-small", metadata={ "description": "Name of the embedding model to use. Must be a valid embedding model name." }, ) retriever_provider: Annotated[ Literal["supabase", "chroma"], {"__template_metadata__": {"kind": "retriever"}}, ] = field( default="chroma", metadata={ "description": "The vector store provider to use for retrieval. Options are 'supabase' or 'chroma'." }, ) search_kwargs: dict[str, Any] = field( default_factory=dict, metadata={ "description": "Additional keyword arguments to pass to the search function of the retriever." }, ) @classmethod def from_runnable_config( cls: Type[T], config: Optional[RunnableConfig] = None ) -> T: """Create an BaseConfiguration instance from a RunnableConfig object. Args: cls (Type[T]): The class itself. config (Optional[RunnableConfig]): The configuration object to use. Returns: T: An instance of BaseConfiguration with the specified configuration. """ config = ensure_config(config) configurable = config.get("configurable") or {} _fields = {f.name for f in fields(cls) if f.init} return cls(**{k: v for k, v in configurable.items() if k in _fields}) T = TypeVar("T", bound=BaseConfiguration) ================================================ FILE: ch9/py/src/shared/retrieval.py ================================================ from contextlib import contextmanager import os from langchain_chroma import Chroma from langchain_core.embeddings import Embeddings from langchain_core.runnables import RunnableConfig from langchain_openai import OpenAIEmbeddings from langchain_community.vectorstores import SupabaseVectorStore from langchain_chroma import Chroma from supabase import create_client import chromadb from ingestion_graph.configuration import IndexConfiguration def make_text_encoder(model: str) -> Embeddings: """Connect to the configured text encoder.""" provider, model = model.split("/", maxsplit=1) if provider == "openai": from langchain_openai import OpenAIEmbeddings return OpenAIEmbeddings(model=model) else: raise ValueError(f"Unsupported embedding provider: {provider}") @contextmanager def make_supabase_retriever(configuration: RunnableConfig, embedding_model: Embeddings): supabase_url = os.environ.get("SUPABASE_URL") supabase_key = os.environ.get("SUPABASE_SERVICE_ROLE_KEY") if not supabase_url or not supabase_key: raise ValueError( "Please set SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY env variables") client = create_client(supabase_url, supabase_key) vectorstore = SupabaseVectorStore( client=client, embedding=embedding_model, table_name="documents", query_name="match_documents") search_kwargs = configuration.search_kwargs yield vectorstore.as_retriever(search_kwargs=search_kwargs) @contextmanager def make_chroma_retriever(configuration: IndexConfiguration, embedding_model: Embeddings): client = chromadb.HttpClient(host='localhost', port=8000) vectorstore = Chroma( collection_name="documents", embedding_function=embedding_model, client=client ) search_kwargs = configuration.search_kwargs search_filter = search_kwargs.setdefault("filter", {}) yield vectorstore.as_retriever(search_kwargs=search_kwargs) @contextmanager def make_retriever( config: RunnableConfig, ): """Create a retriever for the agent, based on the current configuration.""" configuration = IndexConfiguration.from_runnable_config(config) embedding_model = make_text_encoder(configuration.embedding_model) if configuration.retriever_provider == "supabase": with make_supabase_retriever(configuration, embedding_model) as retriever: yield retriever elif configuration.retriever_provider == "chroma": with make_chroma_retriever(configuration, embedding_model) as retriever: yield retriever else: raise ValueError( "Unrecognized retriever_provider in configuration. " f"Expected one of: {', '.join(Configuration.__annotations__['retriever_provider'].__args__)}\n" f"Got: {configuration.retriever_provider}" ) ================================================ FILE: ch9/py/src/shared/state.py ================================================ """Shared functions for state management.""" import hashlib import uuid from typing import Any, Literal, Optional, Union from langchain_core.documents import Document from typing import Any, Literal, Optional def _generate_uuid(page_content: str) -> str: """Generate a UUID for a document based on page content.""" md5_hash = hashlib.md5(page_content.encode()).hexdigest() return str(uuid.UUID(md5_hash)) def reduce_docs( existing: Optional[list[Document]], new: Union[ list[Document], list[dict[str, Any]], list[str], str, Literal["delete"], ], ) -> list[Document]: """Reduce and process documents based on the input type. This function handles various input types and converts them into a sequence of Document objects. It can delete existing documents, create new ones from strings or dictionaries, or return the existing documents. It also combines existing documents with the new one based on the document ID. Args: existing (Optional[Sequence[Document]]): The existing docs in the state, if any. new (Union[Sequence[Document], Sequence[dict[str, Any]], Sequence[str], str, Literal["delete"]]): The new input to process. Can be a sequence of Documents, dictionaries, strings, a single string, or the literal "delete". """ if new == "delete": return [] existing_list = list(existing) if existing else [] if isinstance(new, str): return existing_list + [ Document(page_content=new, metadata={"uuid": _generate_uuid(new)}) ] new_list = [] if isinstance(new, list): existing_ids = set(doc.metadata.get("uuid") for doc in existing_list) for item in new: if isinstance(item, str): item_id = _generate_uuid(item) new_list.append(Document(page_content=item, metadata={"uuid": item_id})) existing_ids.add(item_id) elif isinstance(item, dict): metadata = item.get("metadata", {}) item_id = metadata.get("uuid") or _generate_uuid( item.get("page_content", "") ) if item_id not in existing_ids: new_list.append( Document(**{**item, "metadata": {**metadata, "uuid": item_id}}) ) existing_ids.add(item_id) elif isinstance(item, Document): item_id = item.metadata.get("uuid", "") if not item_id: item_id = _generate_uuid(item.page_content) new_item = item.copy(deep=True) new_item.metadata["uuid"] = item_id else: new_item = item if item_id not in existing_ids: new_list.append(new_item) existing_ids.add(item_id) return existing_list + new_list ================================================ FILE: package.json ================================================ { "name": "learning-langchain-repo", "description": "Learning LangChain O'Reilly book code examples", "type": "module", "author": "Nuno Campos and Mayo Oshin", "scripts": { "langgraph:dev": "npx @langchain/langgraph-cli dev -c ch9/js/langgraph.json --verbose" }, "dependencies": { "@langchain/community": "^0.3.26", "@langchain/core": "^0.3.33", "@langchain/langgraph": "^0.2.41", "@langchain/langgraph-cli": "^0.0.1", "@langchain/langgraph-sdk": "^0.0.36", "@langchain/openai": "^0.3.17", "@supabase/supabase-js": "^2.44.0", "duck-duck-scrape": "^2.2.7", "expr-eval": "^2.0.2", "langchain": "^0.3.15", "pdf-parse": "^1.1.1", "pg": "^8.13.1", "sqlite3": "^5.1.7", "typeorm": "^0.3.20" }, "devDependencies": { "@types/pdf-parse": "^1.1.4" } } ================================================ FILE: pyproject.toml ================================================ [project] name = "learning-langchain" version = "0.0.1" description = "Code blocks for the book Learning LangChain." authors = [] license = { text = "MIT" } readme = "README.md" requires-python = ">=3.9" dependencies = [ "langgraph>=0.2.6", "langchain-openai>=0.1.22", "langchain>=0.2.14", "python-dotenv>=1.0.1", "langchain-community>=0.3.15", "langchain-postgres>=0.0.12", "langchain-chroma>=0.2.0", "beautifulsoup4>=4.12.2", "pypdf>=5.1.0", "psycopg[binary]>=3.2.4", # Updated to include [binary] extra "setuptools>=75.8.0", "langsmith>=0.3.2", "langgraph-checkpoint-sqlite>=2.0.3", "duckduckgo-search>=7.3.0", "langgraph-cli>=0.1.73" ] [build-system] requires = ["setuptools>=73.0.0", "wheel"] build-backend = "setuptools.build_meta" [tool.setuptools] packages = [] [tool.setuptools.package-data] "*" = ["py.typed"] [project.scripts] langgraph-dev = "langgraph.cli:dev_command --config ch9/py/langgraph.json --verbose" ================================================ FILE: test.txt ================================================ Chapter 1: Life in Ancient Greece Life in ancient Greece was a tapestry woven with rich cultural, social, and political threads that have left an enduring legacy on Western civilization. Centered around the polis, or city-state, ancient Greek society fostered a unique blend of communal living, intellectual pursuit, and artistic innovation. This chapter delves into the multifaceted aspects of daily life in ancient Greece, exploring the social structure, education, religion, economy, and contributions to art and architecture that defined this remarkable civilization. The Polis: Heart of Greek Society At the core of ancient Greek life was the polis, a city-state that served as the primary political and social unit. Each polis was an independent entity with its own government, laws, and customs, fostering a strong sense of community and civic responsibility among its citizens. The most famous of these city-states—Athens, Sparta, Corinth, and Thebes—each had distinct characteristics and governance structures, contributing to a diverse and dynamic Greek landscape. Athens: Cradle of Democracy Athens is renowned as the birthplace of democracy, where citizens participated directly in decision-making processes. Assemblies were held regularly, allowing male citizens to voice their opinions and vote on legislation, military actions, and other crucial matters. This participatory governance encouraged active civic engagement and laid the foundation for modern democratic systems. Sparta: Military Prowess and Discipline In contrast, Sparta was a militaristic society focused on discipline, strength, and obedience. Governed by a dual monarchy and a council of elders, Sparta's social structure emphasized rigorous training and military service. From a young age, Spartan males underwent the agoge, a state-sponsored education and training regimen designed to produce elite soldiers loyal to the state. Daily Life and Social Structure Citizens and Their Roles Greek society was highly stratified, with clear distinctions between citizens, metics (resident foreigners), and slaves. Citizens were typically free-born males who had completed their military training and participated in the political life of the polis. Metics contributed to the economy through trade and craftsmanship but lacked political rights. Slaves performed various labor roles, from domestic service to skilled craftsmanship, under the ownership of private individuals or the state. Gender Roles and Family Life While male citizens engaged in public life, women primarily managed household affairs and took care of children. However, the roles and freedoms of women varied significantly between city-states. In Athens, women's public presence was limited, whereas in Sparta, women enjoyed greater autonomy and could own property, reflecting the militaristic and pragmatic nature of Spartan society. Education and Intellectual Pursuits Education was a cornerstone of Greek society, especially in Athens, where citizens were encouraged to pursue knowledge and develop critical thinking skills. Young boys attended schools to study subjects such as reading, writing, mathematics, music, and physical education. The gymnasium played a central role, serving not only as a place for athletic training but also as a hub for intellectual discussions and philosophical debates. The Gymnasium: A Nexus of Body and Mind The gymnasium epitomized the Greek ideal of a balanced development of body and mind. Athletes trained rigorously, preparing for competitions like the Olympic Games, while philosophers and scholars engaged in discourse on topics ranging from ethics to natural sciences. This integration of physical and intellectual pursuits fostered a well-rounded citizenry capable of contributing to various facets of society. Religion and Mythology Religion was deeply ingrained in everyday life, influencing social practices, politics, and personal behavior. The Greeks practiced a polytheistic belief system, worshipping a pantheon of gods and goddesses who embodied various aspects of nature and human experience. Temples and Worship Majestic temples dedicated to deities like Zeus, Athena, and Apollo dotted the landscape of Greek cities. These structures showcased architectural prowess with their impressive columns and intricate sculptures. Religious festivals and ceremonies were central to community life, featuring processions, sacrifices, athletic competitions, and theatrical performances that honored the gods and reinforced social cohesion. Sacred Rituals and Oracles Priests and priestesses served as intermediaries between the divine and the mortal realms, conducting rituals and offering guidance through oracles. The Oracle of Delphi was one of the most renowned, providing prophetic insights that influenced political decisions and personal endeavors alike. Economy and Trade Ancient Greece's economy was vibrant and diverse, driven by agriculture, craftsmanship, and extensive trade networks. The fertile plains supported the cultivation of olives, grapes, and grains, which were staples of the Greek diet and essential for trade. The Agora: Marketplace and Social Hub The agora was the bustling marketplace and central meeting place in each polis. Here, merchants sold goods ranging from fresh produce and seafood to handcrafted pottery and textiles. The agora was not only a center for economic activity but also a venue for social interaction, political discussion, and the exchange of ideas. Maritime Trade and Colonization Greece's geographical location fostered a strong maritime tradition, with numerous islands and a rugged coastline facilitating trade across the Mediterranean and Black Seas. Greek traders established colonies in regions such as Sicily, Asia Minor, and North Africa, spreading Greek culture and goods while benefiting from the exchange of resources and ideas. Art, Architecture, and Engineering The Greeks were exceptional innovators, leaving an indelible mark on art, architecture, and engineering. Their contributions continue to influence modern aesthetics and structural design. Sculpture and Pottery Greek sculptors excelled in creating lifelike statues that captured the human form with remarkable realism and beauty. Works such as the Venus de Milo and the Discobolus exemplify the Greek pursuit of idealized proportions and expressive detail. Pottery was another significant art form, featuring intricate designs and scenes from mythology and everyday life that provide valuable insights into Greek culture. Architectural Marvels Greek architecture is celebrated for its grandeur and precision. The use of the three classical orders—Doric, Ionic, and Corinthian—defined the aesthetic of temples and public buildings. The Parthenon in Athens, dedicated to the goddess Athena, stands as a testament to Greek architectural ingenuity, with its harmonious proportions and elaborate sculptures. Engineering Feats Greek engineers developed advanced infrastructure to support urban living. Aqueducts and public fountains were engineered to manage water resources efficiently, improving sanitation and public health. The construction of roads, bridges, and ports facilitated trade and communication, contributing to the prosperity of the polis. Legacy of Ancient Greece The legacy of ancient Greece is profound, laying the groundwork for numerous aspects of modern society. Democratic governance, philosophical inquiry, artistic expression, and architectural principles all trace their origins to this remarkable civilization. By examining the daily life, social structures, and cultural achievements of ancient Greeks, we gain a deeper appreciation for the foundations upon which contemporary Western society is built. --- This chapter provides a comprehensive overview of life in ancient Greece, setting the stage for a detailed exploration of its enduring contributions to the world. Through understanding the intricate dynamics of the polis, the pursuit of education and intellectual growth, the depth of religious practices, and the brilliance in art and engineering, we can better appreciate the sophistication and resilience of ancient Greek civilization. Chapter 2: Politics and Governance in Ancient Greece The political landscape of ancient Greece was as diverse as its geography, with each city-state, or polis, developing its own unique system of governance. From the birthplace of democracy in Athens to the oligarchic and militaristic structures of Sparta, Greek political systems have profoundly influenced modern governance. This chapter explores the various forms of government, the roles of citizens, political institutions, and the interplay between different city-states in shaping the political dynamics of ancient Greece. Forms of Government Democracy in Athens Athens is celebrated as the cradle of democracy, introducing a system where citizens actively participated in decision-making. This direct democracy allowed male citizens to: Attend the Assembly (Ekklesia): The principal legislative body where laws were proposed, debated, and voted upon. Serve in Public Offices: Positions such as strategos (military generals) and archons (magistrates) were filled by lot, ensuring broad participation. Participate in the Council of 500 (Boule): A representative body responsible for setting the agenda for the Assembly. This inclusive approach fostered a sense of civic duty and accountability, laying the groundwork for democratic principles that endure to this day. Oligarchy in Sparta Contrasting sharply with Athenian democracy, Sparta operated under an oligarchic system characterized by a rigid military hierarchy and limited political participation. Key features included: Dual Kingship: Sparta was ruled by two kings from separate royal families, ensuring a balance of power. Gerousia (Council of Elders): Comprising 28 elders over the age of 60 and the two kings, this council held significant legislative and judicial authority. Ephors: Five elected officials who oversaw daily governance, enforced laws, and acted as a check on the kings’ power. Limited Citizenship: Political rights were restricted to a small group of full citizens, known as Spartiates, who were professional soldiers committed to the state. Spartan governance emphasized stability, discipline, and military excellence, reflecting the society’s martial values. Tyranny and Other Forms Beyond Athens and Sparta, other city-states experienced different forms of governance, including tyranny, where a single ruler seized power, often with popular support to address social inequalities or external threats. Additionally, some poleis practiced monarchies or variations of constitutional government, each adapting to their unique social and political contexts. Political Institutions and Processes The Assembly (Ekklesia) In democratic Athens, the Ekklesia was the central institution where citizens gathered to: Propose and Debate Laws: Legislators and citizens could introduce new laws or amendments. Decide on Military Campaigns: Strategic decisions regarding warfare and alliances were made collectively. Elect Officials: Key positions were filled through direct voting. Regular meetings of the Assembly ensured that citizens remained engaged in the governance process, promoting transparency and collective responsibility. The Council of 500 (Boule) The Boule played a crucial role in preparing legislative agendas and managing day-to-day affairs. Members were selected by lot, ensuring a diverse representation from across the populace. The council coordinated various government departments and supervised public projects, acting as a bridge between the populace and the broader legislative body. The Areopagus The Areopagus was a prestigious council composed of former archons, serving as guardians of the constitution and overseeing moral and legal matters. Although its power waned over time, it remained an influential body in maintaining political stability and addressing serious crimes. Citizenship and Political Participation Criteria for Citizenship Citizenship in ancient Greece was a coveted status, primarily restricted to free-born males who met specific criteria: Birthright: Typically, citizens had both parents from the same polis. Exemplary Conduct: Participation in military service and public affairs was expected. Property Ownership: In some city-states, owning property was a prerequisite for full citizenship. Roles and Responsibilities Citizens were expected to: Engage in Civic Duties: Attend assemblies, vote on laws, and serve in public offices. Military Service: Especially in Athens, where the citizenry was responsible for defending the polis. Contribute to Public Finances: Through taxes and participation in economic activities. This active participation reinforced the democratic ethos in places like Athens and the militaristic discipline in Sparta. Interactions Between City-States Confederations and Alliances Ancient Greece was not a unified nation but a collection of independent city-states that often formed alliances for mutual protection and economic benefit. Notable alliances included: The Delian League: Led by Athens, this alliance aimed to defend against Persian aggression and eventually became the basis for Athenian imperial power. The Peloponnesian League: Dominated by Sparta, this coalition served as a counterbalance to Athenian influence, leading to the protracted Peloponnesian War. Conflicts and Wars Rivalries and competition for resources, influence, and power frequently led to conflicts such as: The Persian Wars: A series of conflicts where Greek city-states united against the invading Persian Empire. The Peloponnesian War: A devastating conflict between Athens and Sparta that reshaped the Greek political landscape. Local Skirmishes: Smaller-scale wars and disputes often erupted between neighboring poleis over territory and alliances. These conflicts underscored the fragile balance of power and the constant struggle for supremacy among the Greek city-states. Political Philosophy and Thought Foundations of Political Theory Ancient Greece was not only a cradle of political practice but also of political thought. Thinkers like Plato, Aristotle, and Socrates explored ideas about governance, justice, and the ideal state. Plato's "Republic": Proposed a philosopher-king ruling an ideal state based on justice and rationality. Aristotle's "Politics": Analyzed various forms of government, advocating for a constitutional polity as the most stable and just system. Influence on Modern Governance Greek political philosophy has had a lasting impact on modern political systems, particularly in the development of democratic ideals, republicanism, and the separation of powers. Concepts such as civic participation, rule of law, and checks and balances trace their origins to ancient Greek political thought. Conclusion The politics and governance of ancient Greece were multifaceted and dynamic, reflecting the diversity and complexity of its city-states. From the democratic experiments of Athens to the disciplined oligarchy of Sparta, Greek political systems offered a range of models that have shaped the evolution of governance throughout history. Understanding these ancient political structures provides valuable insights into the foundations of modern political institutions and the enduring legacy of Greek political innovation. --- Chapter 3: Military and Warfare in Ancient Greece Warfare was a central aspect of life in ancient Greece, influencing political power, societal structures, and cultural values. The frequent conflicts between city-states and against external threats necessitated highly organized military systems and innovative strategies. This chapter examines the structure of Greek armies, the role of prominent military leaders, key battles and wars, military tactics and technologies, as well as the societal impact of warfare on ancient Greek civilization. Military Structure and Organization The Hoplite and Phalanx Formation The backbone of Greek armies was the hoplite, a heavily armored infantry soldier equipped with spear and shield. Hoplites fought in tight, rectangular formations known as phalanxes, which were highly effective against enemy forces. Armor and Weapons: Hoplites wore bronze helmets, breastplates, greaves, and carried large round shields (aspis) and spears (doru). Phalanx Tactics: The phalanx emphasized unity and discipline, with soldiers overlapping their shields to create an impenetrable front and advancing in unison to maximize offensive and defensive capabilities. The Spartan Military Sparta was renowned for its exceptional military system, which was the foundation of its society. Key aspects included: Agoge: A rigorous state-sponsored education and training program for male citizens, instilling discipline, endurance, and martial prowess from a young age. Spartiates: The elite warrior class, full citizens of Sparta, who dedicated their lives to military service. Dual Kingship: Sparta’s two kings often led military campaigns, ensuring strategic leadership and continuity in wartime. Naval Forces While land battles were predominant, naval power was also crucial, particularly for city-states like Athens. Triremes: Fast, agile warships with three rows of oarsmen, equipped with a bronze ram for attacking enemy vessels. Athenian Navy: Athens developed a powerful navy that played a pivotal role in conflicts such as the Persian Wars and the Peloponnesian War, enabling the projection of power across the Aegean Sea. Prominent Military Leaders Leonidas I of Sparta King Leonidas I is celebrated for his leadership during the Battle of Thermopylae in 480 BCE, where he led a small Spartan force against the vast Persian army, exemplifying courage and sacrifice. Themistocles of Athens Themistocles was instrumental in developing the Athenian navy, securing Greek victories against the Persians, notably at the Battle of Salamis, and advancing Athens' maritime dominance. Epaminondas of Thebes Epaminondas revolutionized Greek warfare with his innovative tactics, most notably at the Battle of Leuctra in 371 BCE, where he defeated Sparta and shifted the balance of power in Greece. Key Battles and Wars The Persian Wars (499-449 BCE) A series of conflicts between Greek city-states and the Persian Empire, including: Battle of Marathon (490 BCE): A decisive Greek victory that halted Persian expansion into mainland Greece. Battle of Thermopylae (480 BCE): Despite a heroic stand by Leonidas and his Spartans, the Persians eventually overcame Greek forces. Battle of Salamis (480 BCE): A naval triumph for Athens, crippling the Persian fleet and securing Greek independence. The Peloponnesian War (431-404 BCE) A protracted and destructive conflict between Athens and its empire against the Peloponnesian League led by Sparta, resulting in: Athenian Plague: Devastated Athens, weakening its military and morale. Sicilian Expedition: A failed Athenian military campaign that further strained resources. Spartan Victory: Ultimately, Sparta's resilience and support from Persia led to the downfall of Athenian power. The Corinthian War (395-387 BCE) Fought between Sparta and an alliance of Athens, Thebes, Corinth, and Persia, this war highlighted shifting alliances and the complexities of Greek politics following the Peloponnesian War. The Battle of Leuctra (371 BCE) A watershed moment where Theban forces under Epaminondas defeated Sparta decisively, leading to the decline of Spartan dominance and the rise of Thebes as a major power. Military Tactics and Technologies Phalanx Formation The phalanx remained the dominant infantry tactic throughout much of Greek warfare, emphasizing cohesion and brute strength. Innovations included: Depth and Flexibility: Adjusting the number of ranks to respond to different threats. Combined Arms: Integrating infantry with cavalry and archers for versatile combat strategies. Naval Innovations Greek naval warfare saw advancements in ship design and tactics, such as: Ramming Techniques: Utilizing the bronze ram to breach enemy ships. Boarding Maneuvers: Engaging enemy crews directly through close combat. Siege Warfare City-states developed techniques for besieging fortified cities, including: Siege Engines: Construction of battering rams, towers, and other devices to breach walls. Blockades: Cutting off supplies to weaken and starve out besieged populations. Societal Impact of Warfare Military Service and Citizenship In many Greek city-states, military service was closely tied to citizenship and social status. For instance: Sparta: Full citizenship was reserved for those who completed the agoge and served in the army. Athens: Military service was part of the duties of citizenship, fostering civic responsibility. Economic Consequences Prolonged warfare strained the economies of Greek city-states, leading to: Resource Allocation: Significant portions of resources were directed towards military expenditures. Slavery and Labor: Increased reliance on slave labor to maintain agricultural and urban productivity during wartime. Cultural Reflections Warfare permeated Greek culture, inspiring: Literature and Drama: Epic tales like those of Achilles and heroic plays celebrating military valor. Art and Monuments: Sculptures and monuments commemorating victorious battles and fallen heroes. The Legacy of Greek Warfare Ancient Greek military strategies and innovations have left a lasting legacy on the art of war. Concepts such as the phalanx formation influenced military tactics for centuries, while the emphasis on discipline and training set standards for military professionalism. Additionally, the political and philosophical reflections on warfare by Greek thinkers have contributed to enduring discussions on the ethics and purposes of war. Conclusion Military prowess and warfare were integral to the fabric of ancient Greek society, shaping its political landscape, economic structures, and cultural expressions. The strategic innovations, heroic narratives, and enduring legacies of Greek military endeavors continue to inform modern military thought and commemorate the valor of those who served. Understanding the complexities of ancient Greek warfare provides a deeper appreciation for the resilience and ingenuity that characterized one of history’s most influential civilizations. --- Chapter 4: Arts and Culture in Ancient Greece The arts and culture of ancient Greece represent a pinnacle of human creativity and intellectual achievement. From sculpture and pottery to theater and music, Greek artistic endeavors have left an indelible mark on Western civilization. This chapter explores the various forms of Greek art, the societal role of artists, the development of literature and drama, architectural advancements, and the enduring influence of Greek culture on subsequent generations. Visual Arts Sculpture Greek sculpture is renowned for its realism, idealism, and expression of human emotion. Key developments include: Archaic Period (700-480 BCE): Characterized by rigid and formalized figures, exemplified by the kouros and kore statues. Classical Period (480-323 BCE): Transition to naturalism and dynamic poses, as seen in works by sculptors like Phidias, Polykleitos, and Myron. Phidias: Creator of the statue of Zeus at Olympia and the Parthenon sculptures. Polykleitos: Developed the Canon, a set of proportions for the ideal male body. Myron: Best known for the Discobolus (Discus Thrower), capturing motion and athleticism. Pottery Greek pottery serves both functional and artistic purposes, often decorated with intricate designs and narrative scenes. Types of Pottery: Includes amphorae (storage vessels), kraters (mixing wine and water), and kylixes (drinking cups). Decorative Styles: Geometric Style (900-700 BCE): Features abstract patterns and motifs. Black-Figure Technique (700-500 BCE): Figures are painted in black silhouette against the natural red clay. Red-Figure Technique (530-300 BCE): The reverse of black-figure, allowing for greater detail and expression. Painting While few examples survive, Greek painting was highly esteemed, with influences seen in vase paintings and frescoes. Techniques: Included fresco, encaustic, and tempera. Themes: Mythological narratives, daily life, and natural landscapes. Architecture Greek architecture is celebrated for its harmony, proportion, and grandeur, with enduring influences on Western architectural styles. The Three Orders: Doric, Ionic, and Corinthian, each with distinct column designs and decorative elements. Doric Order: Simple, sturdy columns with plain capitals. Ionic Order: Slender columns with scroll-like capitals. Corinthian Order: Elaborate capitals adorned with acanthus leaves. Notable Structures The Parthenon: A masterpiece of Doric architecture, dedicated to the goddess Athena, featuring intricate sculptures and a harmonious facade. The Temple of Artemis at Ephesus: Exemplifies the grandeur of Greek temple design. The Theater of Epidaurus: Renowned for its exceptional acoustics and elegant design. Literature and Drama Greek literature laid the foundation for Western literary traditions, encompassing epic poetry, lyric poetry, history, and drama. Epic and Lyric Poetry Homer's "Iliad" and "Odyssey": Epic poems that recount heroic tales of the Trojan War and the adventures of Odysseus. Hesiod's "Theogony" and "Works and Days": Explores the origins of the gods and provides agricultural and moral guidance. Lyric Poets: Composers like Sappho and Pindar created expressive and personal poetry, often performed with musical accompaniment. Drama Greek theater was a significant cultural institution, featuring tragedies and comedies that explored complex themes. Tragedy: Focused on human suffering and moral dilemmas, with playwrights like Aeschylus, Sophocles, and Euripides. Sophocles: Authored masterpieces such as "Oedipus Rex" and "Antigone." Comedy: Addressed social and political satire, with playwrights like Aristophanes. Aristophanes: Known for plays like "Lysistrata" and "The Birds," blending humor with social commentary. Literary Themes Heroism and Fate: Explored the struggles of individuals against destiny and the gods. Ethics and Morality: Delved into questions of justice, virtue, and the human condition. Political Critique: Used satire and drama to comment on societal norms and governance. Music and Dance Music and dance were integral to Greek cultural and religious life, performed in various contexts from religious ceremonies to public festivals. Instruments: Included the lyre, aulos (reed instrument), and various percussion instruments. Dance Styles: Varied from solemn processional dances to lively, communal performances. Role in Society: Accompanied storytelling, worship, and were integral to theatrical performances. Philosophy and Intellectual Life Greek philosophy represents a cornerstone of Western intellectual tradition, emphasizing reason, inquiry, and the pursuit of knowledge. Pre-Socratic Philosophers: Focused on natural phenomena and the origins of the cosmos, including Thales, Anaximander, and Heraclitus. Socratic Philosophy: Centered on ethical inquiries and the Socratic method of dialogue, pioneered by Socrates. Platonic and Aristotelian Thought: Plato founded the Academy, exploring ideal forms and political philosophy, while Aristotle established the Lyceum, contributing to logic, biology, ethics, and aesthetics. The Role of Artists and Intellectuals Artists and intellectuals held esteemed positions in Greek society, often patronized by wealthy elites and city-states. Patronage: Wealthy citizens and temples funded artistic and intellectual endeavors, fostering an environment of creativity and innovation. Public Commissions: Artists were commissioned to create works for public spaces, religious institutions, and civic celebrations. Intellectual Societies: Philosophers and scholars engaged in debates and taught students, contributing to the collective knowledge and cultural advancements. Legacy of Greek Arts and Culture The influence of Greek arts and culture extends far beyond antiquity, shaping subsequent artistic movements and intellectual developments. Renaissance Revival: Greek artistic principles inspired the Renaissance’s emphasis on classical beauty and harmony. Neoclassical Architecture: Revived Greek architectural styles in modern public buildings and monuments. Literary Influence: Greek literature and drama have been continuously studied, adapted, and emulated in Western literary traditions. Philosophical Foundations: Greek philosophical concepts underpin many modern ethical, political, and scientific frameworks. Conclusion The arts and culture of ancient Greece represent a vibrant and dynamic facet of its civilization, showcasing unparalleled creativity and intellectual rigor. From the timeless sculptures that capture the human form and spirit to the profound philosophical inquiries into existence and morality, Greek cultural achievements continue to inspire and inform contemporary society. Understanding the depth and breadth of Greek artistic and cultural contributions provides valuable insights into the enduring legacy of one of history’s most influential civilizations. --- Chapter 5: Philosophy and Science in Ancient Greece Ancient Greece was a fertile ground for philosophical thought and scientific inquiry, laying the foundational principles that have shaped Western intellectual traditions. Greek philosophers and scientists pursued knowledge across diverse fields, seeking to understand the nature of reality, ethics, politics, and the natural world. This chapter delves into the major philosophical schools, key scientific advancements, influential thinkers, and the enduring impact of Greek intellectual pursuits on subsequent generations. Philosophical Schools and Movements Pre-Socratic Philosophers Before Socrates, Greek philosophers known as Pre-Socratics focused primarily on cosmology, metaphysics, and the nature of the universe. Thales of Miletus: Proposed that water was the fundamental substance (arche) underlying all matter. Anaximander: Introduced the concept of the apeiron (infinite) as the origin of all things. Heraclitus: Emphasized constant change, famously asserting that "you cannot step into the same river twice." Parmenides: Argued for the concept of Being as unchanging and eternal, challenging notions of change and plurality. Socratic Philosophy Socrates shifted Greek philosophy towards ethical and epistemological inquiries, focusing on human behavior, morality, and the pursuit of virtue. Socratic Method: A form of cooperative argumentative dialogue that stimulates critical thinking and illuminates ideas. Ethical Focus: Examined the nature of justice, courage, and other virtues, asserting that knowledge and virtue are interconnected. Influence: Socrates’ ideas were recorded by his students, notably Plato, as Socrates himself left no written records. Platonic Philosophy Plato, a student of Socrates, founded the Academy and developed a comprehensive philosophical system. Theory of Forms: Proposed that non-material abstract forms represent the most accurate reality, with the physical world being a shadow of these perfect forms. Political Philosophy: In "The Republic," outlined an ideal state governed by philosopher-kings. Dialectic Method: Engaged in dialogues that explored philosophical concepts through reasoned argumentation. Aristotelian Philosophy Aristotle, a student of Plato, established the Lyceum and made significant contributions across multiple disciplines. Empirical Observation: Emphasized the importance of observation and experience in acquiring knowledge. Logic and Syllogism: Developed formal logic systems, including the syllogism, a foundational tool in deductive reasoning. Ethics: In "Nicomachean Ethics," introduced the concept of the Golden Mean, advocating for moderation and balance in moral behavior. Natural Philosophy: Studied biology, physics, and metaphysics, laying the groundwork for scientific inquiry. Hellenistic Philosophies Following Aristotle, several philosophical schools emerged during the Hellenistic period, addressing issues of human existence and the cosmos. Stoicism: Founded by Zeno of Citium, emphasized rationality, self-control, and acceptance of fate, advocating for living in harmony with nature. Epicureanism: Founded by Epicurus, taught that the pursuit of pleasure and avoidance of pain were the highest goods, with an emphasis on simple living and friendship. Skepticism: Advocated by Pyrrho and others, promoted the suspension of judgment and the recognition of the limits of human knowledge. Scientific Advancements Mathematics Greek mathematicians made groundbreaking contributions that remain fundamental to modern mathematics. Euclid: Authored "Elements," a comprehensive compilation of the knowledge of geometry of his time, establishing axiomatic methods still in use. Archimedes: Made significant discoveries in geometry, calculus, and mechanics, including the principle of buoyancy and the Archimedean screw. Pythagoras: Best known for the Pythagorean theorem, contributed to number theory and the understanding of mathematical relationships. Astronomy Greek astronomers developed sophisticated models to explain celestial phenomena. Thales and Anaximander: Proposed early models of the solar system and celestial mechanics. Eudoxus and Aristarchus: Developed geocentric and heliocentric models, respectively, anticipating later astronomical theories. Hipparchus: Created detailed celestial maps and developed the first known star catalog, contributing to the study of trigonometry in astronomy. Medicine Greek advancements in medicine laid the foundations for modern medical practices. Hippocrates: Often called the "Father of Medicine," emphasized empirical observation, diagnosis, and the ethical practice of medicine, encapsulated in the Hippocratic Oath. Galen: Expanded medical knowledge through anatomical studies and outlined theories of physiology and pathology that influenced medicine for centuries. Physics and Engineering Greek scientists explored the principles of physics and developed innovative engineering solutions. Archimedes: Investigated principles of leverage, buoyancy, and the properties of materials, applying them to practical inventions like war machines and mechanical devices. Hero of Alexandria: Developed early steam engines (aeolipile) and automated mechanical devices, contributing to the field of pneumatics. Influential Thinkers Socrates Though primarily known for his ethical inquiries, Socrates laid the groundwork for critical philosophical inquiry through his emphasis on questioning and dialogue. Plato Plato's extensive body of work spans numerous philosophical topics, including metaphysics, ethics, politics, and epistemology, providing a comprehensive framework for understanding the world and human society. Aristotle Aristotle's contributions are vast, covering logic, metaphysics, ethics, politics, biology, and more. His systematic approach to knowledge and emphasis on empirical observation have had a lasting impact on various fields of study. Epicurus Epicurus' teachings on pleasure, happiness, and the nature of the universe influenced subsequent philosophical thought, promoting a life of moderation and intellectual inquiry. Zeno of Citium As the founder of Stoicism, Zeno introduced ideas about rationality, emotional resilience, and living in accordance with nature, shaping ethical discussions for centuries. The Legacy of Greek Philosophy and Science Foundation of Western Philosophy Greek philosophical concepts form the bedrock of Western philosophical traditions, influencing thinkers from the Roman era through the Renaissance to contemporary philosophy. Scientific Inquiry The empirical and systematic approaches developed by Greek scientists pioneered the scientific method, emphasizing observation, hypothesis, and logical reasoning as tools for understanding the natural world. Educational Institutions The establishment of institutions like Plato’s Academy and Aristotle’s Lyceum set models for higher education and scholarly research, promoting lifelong learning and intellectual exploration. Ethical and Political Thought Greek ideas about ethics, governance, and the role of individuals in society continue to inform modern ethical theories, political systems, and educational curricula. Conclusion The philosophical and scientific endeavors of ancient Greece represent a monumental chapter in human intellectual history. Greek philosophers and scientists laid the essential groundwork for diverse fields of study, promoting a culture of inquiry, reason, and intellectual rigor. Their contributions not only advanced contemporary understanding but also provided enduring frameworks that continue to influence modern thought and practice. By exploring the rich legacy of Greek philosophy and science, we gain insight into the enduring quest for knowledge and the pursuit of wisdom that characterizes human civilization. --- Chapter 6: Economy and Trade in Ancient Greece The economy of ancient Greece was a complex system intricately linked to its social structures, political institutions, and geographic landscape. Featuring diverse economic activities such as agriculture, craftsmanship, maritime trade, and the use of slave labor, the Greek economy facilitated prosperity and cultural exchange across the Mediterranean. This chapter examines the foundational sectors of the Greek economy, the mechanisms of trade and commerce, the role of currency and markets, labor systems, and the economic interactions that contributed to the vibrancy of ancient Greek civilization. Agricultural Foundations Farming Practices Agriculture was the cornerstone of the Greek economy, providing sustenance and raw materials. Staple Crops: Included wheat, barley, olives, grapes, and various fruits and vegetables. Olive Cultivation: Olive oil was a vital commodity used for cooking, lighting, religious offerings, and as a trade good. Viticulture: Grape cultivation for wine production was widespread, with regions like Attica and the Peloponnese renowned for their vineyards. Land Ownership and Use Smallholdings: Many farmers owned small plots of land, farming primarily for subsistence. Large Estates (Latifundia): Owned by wealthy elites, often worked by tenant farmers or slaves, focusing on cash crops for trade. Crop Rotation and Irrigation: Techniques to maintain soil fertility and improve yields, though limited by the region's predominantly Mediterranean climate. Craftsmanship and Industry Pottery and Ceramics Greek pottery was both a functional and artistic industry, vital for daily life and trade. Production Centers: Cities like Athens, Corinth, and Sparta were renowned for their distinctive pottery styles. Exports: Pottery was a significant export product, valued both for its utility and its aesthetic appeal. Metalworking Skilled metalworkers produced tools, weapons, and luxury items. Bronze and Iron: Used extensively for creating household goods, military equipment, and decorative objects. Jewelry and Ornamental Metalwork: Crafted from gold, silver, and bronze, often adorned with intricate designs and gemstone inlays. Textiles and Clothing The production of textiles, particularly wool and linen, was a key industry. Weaving Techniques: Advanced skills in loom operation and dyeing techniques allowed for the creation of complex patterns and durable fabrics. Garments: Produced for both daily use and ceremonial purposes, reflecting social status and cultural identity. Maritime Trade and Commerce The Athenian Empire Athens leveraged its powerful navy to establish and maintain a vast trade network. Delian League: Originally formed as an alliance against Persia, it evolved into an Athenian empire that controlled trade routes and secured economic dominance. Exports and Imports: Athens exported pottery, textiles, and metal goods while importing grain, timber, and other essential resources. Trade Routes and Navigation Greek merchants navigated the Mediterranean and Black Seas, establishing trade links with diverse regions. Phoenicia, Egypt, and Carthage: Key trading partners providing goods such as glassware, papyrus, and purple dye. Black Sea Colonies: Facilitated the export of grain and other resources to support Greek cities. Commercial Centers The Agora: Served as the bustling marketplace in each polis, where merchants conducted trade, negotiations, and transactions. Port Cities: Harbors in cities like Piraeus (Athens) and Corinth were vital hubs for shipping, trade, and economic activity. Currency and Economic Systems Standardized Currency The introduction of standardized coins revolutionized Greek trade and economy. Minting Practices: Each city-state minted its own coins, often bearing symbols or deities significant to their identity. Facilitating Trade: Coins provided a reliable medium of exchange, reducing the limitations of barter systems and enabling more extensive trade networks. Banking and Credit Moneylenders: Operated as early forms of banks, offering loans secured by collateral, often land or slaves. Metics: Resident foreigners played a significant role in commerce and banking, contributing to economic diversity and expertise. Labor Systems Slavery in the Greek Economy Slaves were integral to various economic sectors, performing labor-intensive tasks and skilled work. Sources of Slaves: Acquired through war, piracy, trade, and as debts. Roles: Included domestic service, agricultural labor, craftsmanship, mining, and public works. Economic Dependence: The reliance on slave labor allowed Greek citizens to engage in politics, commerce, and intellectual pursuits. Free Labor and Citizenship Citizen Labor: Free male citizens often engaged in farming, artisanal trades, and commerce, contributing to the economic self-sufficiency of the polis. Public Works: Citizens participated in constructing temples, theaters, and infrastructure projects, enhancing the urban landscape and economic capacity. Economic Interactions and Expansion Colonization and Trade Zones Establishing Colonies: Greek city-states founded colonies across the Mediterranean and Black Seas to access resources, reduce population pressure, and expand trade networks. Economic Zones: Colonies served as trade outposts, facilitating the exchange of goods, culture, and ideas between Greeks and indigenous populations. Piracy and Privateering Pirate Threats: Throughout the Mediterranean, piracy posed significant challenges to trade routes, prompting city-states to invest in naval protection. Privateering: Some maritime expeditions blurred the lines between commerce and piracy, seizing valuable goods for profit. Economic Challenges and Solutions Resource Scarcity Lack of Arable Land: Particularly in regions like Greece proper, limited fertile land necessitated efficient agricultural practices and reliance on imports. Maritime Dependence: The economy's reliance on sea trade made it vulnerable to naval blockades and maritime conflicts. Economic Inequality Wealth Concentration: The prosperity derived from trade and industry led to significant wealth disparities between elites and common citizens. Social Tensions: Economic inequality sometimes fueled political conflicts and social unrest within city-states. Adaptations and Innovations Technological Advances: Innovations in shipbuilding, agriculture, and craftsmanship improved productivity and trade efficiency. Economic Policies: City-states implemented various economic policies, such as tariffs, trade regulations, and public investments, to manage growth and address challenges. The Economic Legacy of Ancient Greece Influence on Modern Economies Greek economic principles, such as the use of standardized currency, banking practices, and trade conventions, have influenced modern economic systems and international trade practices. Cultural Exchange and Economic Growth The extensive trade networks of ancient Greece facilitated cultural exchanges, technological innovations, and economic prosperity, contributing to the flourishing of Greek civilization and its lasting legacy. Lessons for Contemporary Economies The economic strategies and challenges of ancient Greece offer valuable lessons on resource management, the impact of trade on societal development, and the complexities of economic inequality. Conclusion The economy of ancient Greece was a dynamic and multifaceted system that underpinned the prosperity and cultural achievements of its city-states. Through agriculture, craftsmanship, maritime trade, and the strategic use of labor, the Greeks built a robust economy that sustained their civilization and enabled extensive cultural and intellectual advancements. The economic interactions and innovations of ancient Greece not only fostered internal growth but also facilitated connections with distant regions, spreading Greek culture and ideas across the Mediterranean. Understanding the economic foundations and complexities of ancient Greece provides essential insights into the factors that contributed to its enduring legacy and offers timeless lessons for economic development and sustainability. CHAPTER I. EARLY GREEK THOUGHT pages 1-52 I. Strength and universality of the Greek intellect, 1—Specialisation of individual genius, 2—Pervading sense of harmony and union, 3—Circumstances by which the intellectual character of the Greeks was determined, 3—Philosophy a natural product of the Greek mind, 4—Speculation at first limited to the external world, 4—Important results achieved by the early Greek thinkers, 5—Their conception of a cosmos first made science possible, 6—The alleged influence of Oriental ideas disproved, 6. II. Thales was the first to offer a purely physical explanation of the world, 7—Why he fixed on water as the origin of all things, 8—Great advance made by Anaximander, 9—His conception of the Infinite, 9-Anaximenes mediates between the theories of his two predecessors, 10—The Pythagoreans: their love of antithesis and the importance attributed to number in their system, 11—Connexion between their ethical teaching and the general religious movement of the age, 13—Analogy with the mediaeval spirit, 13. III. Xenophanes: his attacks on the popular religion, 14—Absence of intolerance among the Greeks, 15—Primitive character of the monotheism taught by Xenophanes, 16—Elimination of the religious element from philosophy by Parmenides, 16—His speculative innovations, 17—He discovers the indestructibility of matter, 17—but confuses matter with existence in general, 18—and more particularly with extension, 19—In what sense he can be called a materialist, 19—New arguments brought forward by Zeno in defence of the Eleatic system, 20—The analytical or mediatorial moment of Greek thought, 21—Influence of Parmenides on subsequent systems of philosophy, 22—Diametrically opposite method pursued by Heracleitus, 22—His contempt for the mass of mankind, 22—Doctrine of universal relativity, 23—Fire as the primordial element, 24—The idea of Law first introduced by Heracleitus, 25—Extremes to which his principles were afterwards carried, 25—Polarisation of Greek thought, 26. IV. Historical order of the systems which succeeded and mediated between Parmenides and Heracleitus, 26—Empedocles: poetic and religious character of his philosophy, 27—His inferiority to previous thinkers, 28—Eclectic tendency of his system, 29—In what respects it marks an advance on that of Parmenides, 29—His alleged anticipation of the Darwinian theory, 30—The fixity of species a doctrine held by every ancient philosopher except Anaximander, 31—The theory of knowledge put forward by Empedocles: its objective and materialistic character, 32—How it suggested the Atomic theory, 33—The possibility of a vacuum denied by Parmenides and asserted by Leucippus, 34—The Atomic theory developed and applied by Democritus: encyclopaedic range of his studies, 35—His complete rejection of the supernatural, 36. V. Anaxagoras at Athens, 36—He is accused of impiety and compelled to fly, 37—Analysis of his system, 38—Its mechanical and materialistic tendency, 39—Separation of Nous from the rest of Nature, 40—In denying the divinity of the heavenly bodies, Anaxagoras opposed himself to the universal faith of antiquity, 40—The exceptional intolerance of the Athenians and its explanation, 42—Transition from physical to dialectical and ethical philosophy, 43. VI. Early Greek thought as manifested in literature and art, 45—The genealogical method of Hesiod and Herodotus, 47—The search for first causes in Pindar and Aeschylus, 48—Analogous tendencies of sculpture and architecture, 49—Combination of geographical with genealogical studies, 50—The evolution of order from chaos suggested by the negative or antithetical moment of Greek thought, 50—Verifiable and fruitful character of early Greek thought, 52. CHAPTER II. THE GREEK HUMANISTS: NATURE AND LAW pages 53-107 I. The reaction of speculation on life, 53—Moral superiority of the Greeks to the Hebrews and Romans, 54—Illustrations of humanity from the Greek poets, 55—Temporary corruption of moral sentiment and its explanation, 56—Subsequent reformation effected by philosophy, 57—The Greek worship of beauty not incompatible with a high moral standard, 58—Preference of the solid to the showy virtues shown by public opinion in Greece, 59—Opinion of Plato, 60. II. Virtues inculcated in the aphorisms of the Seven Sages, 62—Sôphrosynê as a combination of moderation and self-knowledge, 62—Illustrations from Homer, 62—Transition from self-regarding to other-regarding virtue, 63—How morality acquired a religious sanction (i.) by the use of oaths, 64—(ii.) by the ascription of a divine origin to law, 65—(iii.) by the practice of consulting oracles on questions of right and wrong, 65—Difference between the Olympian and Chthonian religions, 66—The latter was closely connected with the ideas of law and of retribution after death, 67—Beneficent results due to the interaction of the two religions, 68. III. The religious standpoint of Aeschylus, 69—Incipient dissociation of religion from morality in Sophocles, 70—Their complete separation in Euripides, 71—Contrast between the Eteocles of Aeschylus and the Eteocles of Euripides, 72—Analogous difference between Herodotus and Thucydides, 73—Evidence of moral deterioration supplied by Aristophanes and Plato, 74—Probability of an association between intellectual growth and moral decline, 75. IV. The Sophists, 76—Prodicus and Hippias, 77—Their theory of Nature as a moral guide, 79—Illustration from Euripides, 80—Probable connexion of the Cynic school with Prodicus, 81—Antithesis between Nature and Law, 81—Opposition to slavery, 82—The versatility of Hippias connected with his advocacy of Nature, 83—The right of the stronger as a law of Nature, 84. V. Rise of idealism and accompanying tendency to set convention above Nature, 85—Agnosticism of Protagoras, 87—In what sense he made man the measure of all things, 88—His defence of civilisation, 89—Similar views expressed by Thucydides, 90—Contrast between the naturalism of Aeschylus and the humanism of Sophocles, 91—The flexible character of Nomos favourable to education, 92—Greek youths and modern women, 93—The teaching of rhetoric, 93—It is subsequently developed into eristicism, 94. VI. The nihilism of Gorgias, 95—His arguments really directed against the worship of Nature, 96—The power of rhetoric in ancient Athens and modern England, 97—The doctrines of Protagoras as developed by the Cyrenaic school, 99—and by the Megaric school, 100—Subsequent history of the antithesis between Nature and Law, 100. VII. Variety of tendencies represented by the Sophists, 102—Their position in Greek society, 103—The different views taken of their profession in ancient and modern times, 104—Their place in the development of Greek philosophy, 107. CHAPTER III. THE PLACE OF SOCRATES IN GREEK PHILOSOPHY pages 108-170 I. Universal celebrity of Socrates, 108—Our intimate knowledge of his appearance and character, 109—Conflicting views of his philosophy, 110—Untrustworthiness of the Platonic _Apologia_, 111—Plato’s account contradicted by Xenophon, 113—Consistency of the _Apologia_ with the general standpoint of Plato’s Dialogues, 114—The Platonic idea of science, 115-— How Plato can help us to understand Socrates, 116. II. Zeller’s theory of the Socratic philosophy, 117—Socrates did not offer any definition of knowledge, 119—Nor did he correct the deficiencies of Greek physical speculation, 120—His attitude towards physics resembled that of Protagoras, 121—Positive theories of morality and religion which he entertained, 123. III. True meaning and originality of the Socratic teaching, 125—Circumstances by which the Athenian character was formed, 126—Its prosaic, rationalistic, and utilitarian tendencies, 127—Effect produced by the possession of empire, 128—The study of mind in art and philosophy, 128—How the Athenian character was represented by Socrates, 129—His sympathy with its practical and religious side, 130—His relation to the Humanists, 131—His identification of virtue with knowledge, 132—The search for a unifying principle in ethics, 133—Importance of knowledge as a factor in conduct and civilisation, 133—Fundamental identity of all the mental processes, 136. IV. Harmony of theory and practice in the life of Socrates, 137—Mind as a principle (i.) of self-control, (ii.) of co-operation, and (iii.) of spontaneous energy, 137—Derivation and function of the cross-examining elenchus, 138—How it illustrates the negative moment of Greek thought, 139—Conversations with Glauco and Euthydemus, 139—The erotetic method as an aid to self-discipline, 141—Survival of contradictory debate in the speeches of Thucydides, 142. V. Why Socrates insisted on the necessity of defining abstract terms, 142—Subsequent influence of his method on the development of Roman law, 144—Substitution of arrangement by resemblance and difference for arrangement by contiguity, 145—The One in the Many, and the Many in the One: conversation with Charmides, 146—Illustration of ideas by their contradictory opposites, 147—The Socratic induction, (i.) an interpretation of the unknown by the known, 148—Misapplication of this method in the theory of final causes, 149—(ii.) A process of comparison and abstraction, 150—Appropriateness of this method to the study of mental phenomena, 151—Why it is inapplicable to the physical sciences, 151—Wide range of studies included in a complete philosophy of mind, 151—The dialectical elimination of inconsistency, 152. VI. Consistency the great principle represented by Socrates, 152—Parallelism of ethics and logic, 154—The ethical dialectic of Socrates and Homer, 154—Personal and historical verifications of the Socratic method, 155—Its influence on the development of art and literature, 156—and on the relations between men and women, 158—Meaning of the Daemonium, 160. VII. Accusation and trial of Socrates, 161—Futility of the charges brought against him, 162—Misconceptions of modern critics, 164—His defence and condemnation, 165—Worthlessness of Grote’s apology for the Dicastery, 166—Refusal of Socrates to save himself by flight, 168—Comparison with Giordano Bruno and Spinoza, 169—The monuments raised to Socrates by Plato and Xenophon, 169. CHAPTER IV. PLATO; HIS TEACHERS AND HIS TIMES pages 171-213 I. New meaning given to systems of philosophy by the method of evolution, 171—Extravagances of which Plato’s philosophy seems to be made up, 172—The high reputation which it, nevertheless, continues to enjoy, 174—Distinction between speculative tendencies and the systematic form under which they are transmitted, 174—Genuineness of the Platonic Dialogues, 175—Their chronological order, 177—They embody the substance of Plato’s philosophical teaching, 177. II. Wider application given to the dialectic method by Plato, 179—He goes back to the initial doubt of Socrates, 180—To what extent he shared in the religious reaction of his time, 181—He places demonstrative reasoning above divine inspiration, 182—His criticism of the Socratic ethics, 183—Exceptional character of the _Crito_ accounted for, 184—Traces of Sophistic influence, 185—General relation of Plato to the Sophists, 186—Egoistic hedonism of the _Protagoras_, 188. III. Plato as an individual: his high descent, personal beauty, and artistic endowment, 189—His style is neither poetry nor eloquence nor conversation, but the expression of spontaneous thought, 190—The Platonic Socrates, 191—Plato carries the spirit of the Athenian aristocracy into philosophy, 192—Severity with which great reformers habitually view their own age, 192—Plato’s scornful opinion of the many, 194—His loss of faith in his own order, 195—Horror of despotism inspired by his intercourse with Dionysius, 195—His dissatisfaction with the constitution of Sparta, 196—His theory of political degeneration verified by the history of the Roman republic, 196—His exclusively Hellenic and aristocratic sympathies, 197—Invectives against the corrupting influence of the multitude and of their flatterers, 198—Denunciation of the popular law-courts, 199—Character of the successful pleader, 200—Importance to which he had risen in Plato’s time, 200—The professional teacher of rhetoric, 201. IV. Value and comprehensiveness of Plato’s philosophy, 202—Combination of Sicilian and Italiote with Attic modes of thought, 203—Transition from the _Protagoras_ to the _Theaetêtus_, 205—‘Man is the measure of all things’: opinion and sensation, 206—Extension of the dialectic method to all existence, 207—The Heracleitean system true of phenomena, 208—Heracleitus and Parmenides in the _Cratylus_, 209—Tendency to fix on Identity and Difference as the ultimate elements of knowledge, 210—Combination of the mathematical method with the dialectic of Socrates, 210—Doctrine of _à priori_ cognition, 211—The idea of Sameness derived from introspection, 212—Tendency towards monism, 213. CHAPTER V. PLATO AS A REFORMER pages 214-274 I. Recapitulation, 214—Plato’s identification of the human with the divine, 215—The Athanasian creed of philosophy, 216—Attempts to mediate between appearance and reality, 216—Meaning of Platonic love, 217—Its subsequent development in the philosophy of Aristotle, 218—And in the poetry of Dante, 219—Connexion between religious mysticism and the passion of love, 219—Successive stages of Greek thought represented in the _Symposium_, 220—Analysis of Plato’s dialectical method, 221—Exaggerated importance attributed to classification, 222—Plato’s influence on modern philosophy, 223. II. Mediatoral character of Plato’s psychology, 223—Empirical knowledge as a link between demonstration and sense perception, 224—Pride as a link between reason and appetite, 224—Transition from metaphysics to ethics: knowledge and pleasure, 225—Anti-hedonistic arguments of the _Philébus_, 226—Attempt to base ethics on the distinction between soul and body, 227—What is meant by the Idea of Good? 228—It is probably the abstract notion of Identity, 229. III. How the practical teaching of Plato differed from that of Socrates, 229—Identification of justice with self-interest, 230—Confusion of social with individual happiness, 231—Resolution of the soul into a multitude of conflicting impulses, 232—Impossibility of arguing men into goodness, 233. IV. Union of religion with morality, 234—Cautious handling of the popular theology, 234—The immortality of the soul, 235—The Pythagorean reformation arrested by the progress of physical philosophy, 237—Immortality denied by some of the Pythagoreans themselves, 237—Scepticism as a transition from materialism to spiritualism, 238—The arguments of Plato, 239—Pantheism the natural outcome of his system, 240. V. Plato’s condemnation of art, 241—Exception in favour of religious hymns and edifying fiction, 241—Mathematics to be made the basis of education, 242—Application of science to the improvement of the race, 242—Inconsistency of Plato’s belief in heredity with the doctrine of metempsychosis, 243—Scheme for the reorganisation of society, 244—Practical dialectic of the _Republic_, 245. VI. Hegel’s theory of the _Republic_, 246—Several distinct tendencies confounded under the name of subjectivity, 247—Greek philosophy not an element of political disintegration, 250—Plato borrowed more from Egypt than from Sparta, 253. VII. The consequences of a radical revolution, 254—Plato constructed his new republic out of the elementary and subordinate forms of social union, 254—Inconsistencies into which he was led by this method, 254—The position which he assigns to women, 256—The Platonic State half school-board and half marriage-board, 258—Partial realisation of Plato’s polity in the Middle Ages, 259—Contrast between Plato and the modern Communists, 259—His real affinities are with Comte and Herbert Spencer, 261. VIII. Reaction of Plato’s social studies on his metaphysics, 262—The ideas resolved into different aspects of the relation between soul and body, 263—Dialectic dissolution of the four fundamental contrasts between reality and appearance, 263—Mind as an intermediary between the Ideas and the external world, 265—Cosmogony of the _Timaeus_, 265—Philosophy and theology, 267. IX. Plato’s hopes from a beneficent despotism, 268—The _Laws_, 269—Concessions to current modes of thought, 270—Religious intolerance, 271—Recapitulation of Plato’s achievements, 272—Fertility of his method, 273. CHAPTER VI. CHARACTERISTICS OF ARISTOTLE pages 275-329 I. Recent Aristotelian literature, 275—Reaction in favour of Aristotle’s philosophy, 277—and accompanying misinterpretation of its meaning, 278—Zeller’s partiality for Aristotle, 280. II. Life of Aristotle, 280—His relation to Plato, 281-Aristotle and Hermeias; 284—Aristotle and Alexander, 285—Aristotle’s residence in Athens, flight, and death, 288—His choice of a successor, 288—Provisions of his will, 289—Personal appearance, 289—Anecdotes illustrating his character, 290—Want of self-reliance and originality, 291. III. Prevalent misconception of the difference between Aristotle and Plato, 291—Plato a practical, Aristotle a theoretical genius, 293—Contrast offered by their views of theology, ethics, and politics, 294—Aristotle’s ideal of a State, 296—His want of political insight and prevision, 297—Worthlessness of his theories at the present day, 298. IV. Strength and weakness of Aristotle’s _Rhetoric_, 299—Erroneous theory of aesthetic enjoyment put forward in his _Poetics_, 300—The true nature of tragic emotion, 303—Importance of female characters in tragedy, 303—Necessity of poetic injustice, 305—Theory of the Catharsis, 306—Aristotle’s rules for reasoning compiled from Plato, 307—The _Organon_ in Ceylon, 307. V. Aristotle’s unequalled intellectual enthusiasm, 308—Illustrations from his writings, 309—His total failure in every physical science except zoology and anatomy, 311—His repeated rejection of the just views put forward by other philosophers, 312—Complete antithesis between his theory of Nature and ours, 316. VI. Supreme mastery shown by Aristotle in dealing with the surface of things, 318—His inability to go below the surface, 319—In what points he was inferior to his predecessors, 320—His standpoint necessarily determined by the development of Greek thought, 321—Analogous development of the Attic drama, 323. VII. Periodical return to the Aristotelian method, 325—The systematising power of Aristotle exemplified in all his writings, 326—but chiefly in those relating to the descriptive sciences, 327—His biological generalisations, 328—How they are explained and corrected by the theory of evolution, 329. CHAPTER VII. THE SYSTEMATIC PHILOSOPHY OF ARISTOTLE pages 330-402 I. Homogeneity of Aristotle’s writings, 330—The _Metaphysics_, 331—What are the causes and principles of things? 331—Objections to the Ionian materialism, 332—Aristotle’s teleology a study of functions, 332—Illegitimate generalisation to the inorganic world, 333—Aristotle’s Four Causes, 334—Derivation of his substantial Forms from the Platonic Ideas, 335—His criticism of the Ideal theory, 336—Its applicability to every kind of transcendental realism, 338—Survival of the Platonic theory in Aristotle’s system, 338. II. Specific forms assumed by the fundamental dualism of Greek thought, 339—Stress laid by Aristotle on the antithesis between Being and not Being, 339—Its formulation in the highest laws of logic, 340—Intermediate character ascribed to accidents, 340—Distinction between truth and real existence, 341—The Categories: their import and derivation, 341—Analysis of the idea of Substance, 343—Analysis of individuality, 345—Substitution of Possibility and Actuality for Matter and Form, 346—Purely verbal significance of this doctrine, 347—Motion as the transformation of Power into Act, 347. III. Aristotle’s theology founded on a dynamical misconception, 348—Necessity of a Prime Mover, 349—Aristotle not a pantheist but a theist, 350—Mistaken interpretation of Sir A. Grant, 351—Inconsistency of Aristotle’s metaphysics with Catholic theology, 352—and with the modern arguments for the existence of a God, 353—as well as with the conclusions of modern science, 353—Self-contradictory character of his system, 354—Motives by which it may be explained, 354—The Greek star-worship and the Christian heaven, 356—Higher position given to the earth by Copernicus, 356—Aristotle’s glorification of the heavens, 357—How his astronomy illustrates the Greek ideas of circumscription and mediation, 358. IV. Aristotle’s general principle of systematisation, 359—Deduction of the Four Elements, 360—Connexion of the Peripatetic physics with astrology and alchemy, 361—Revolution effected by modern science, 361—Systematisation of biology, 362—Aristotle on the Generation of Animals, 363—His success in comparative anatomy, 364. V. Antithetical framework of Aristotle’s psychology, 365—His theory of sensation contrasted with that of the Atomists, 365—His successful treatment of imagination and memory, 366—How general ideas are formed, 366—The active Nous is a self-conscious idea, 367—The train of thought which led to this theory, 368—Meaning of the passage in the _Generation of Animals_, 369—Supposed refutation of materialism, 370—Aristotle not an adherent of Ferrier, 371—Form and matter not distinguished as subject and object, 373—Aristotle rejects the doctrine of personal immortality, 374. VI. Aristotle’s logic, 375—Subordination of judgments to concepts, 376—Science as a process of definition and classification, 377—Aristotle’s theory of propositions, 378—His conceptual analysis of the syllogism, 379—Influence of Aristotle’s metaphysics on his logic, 380—Disjunction the primordial form of all reasoning, 381—How it gives rise to hypothetical and categorical reasoning, 382. VII. Theory of applied reasoning: distinction between demonstration and dialectic, 383—Aristotle places abstractions above reasoned truth, 384—Neglect of axioms in comparison with definitions, 384—‘Laws of nature’ not recognised by Aristotle, 385—He failed to perceive the value of deductive reasoning, 387—Derivation of generals from particulars: Aristotle and Mill, 387—In what sense Aristotle was an empiricist, 390—Examination of Zeller’s view, 391—Induction as the analysis of the middle term into the extremes, 393—Theory of experimental reasoning contained in the _Topics_, 394. VIII. Systematic treatment of the antithesis between Reason and Passion, 395—Relation between the _Rhetoric_ and the _Ethics_, 395—Artificial treatment of the virtues, 396—Fallacious opposition of Wisdom to Temperance, 397—Central idea of the _Politics_: the distinction between the intellectual state and the material state, 398—Consistency of the _Poetics_ with Aristotle’s system as a whole, 399. IX. Aristotle’s philosophy a valuable corrective to the modern glorification of material industry, 399—Leisure a necessary condition of intellectual progress, 400—How Aristotle would view the results of modern civilisation, 401. FOOTNOTES: [1] _Die Philosophie der Griechen_, III., a, pp. 5 f. [2] If I remember rightly, Polybius makes the same observation, but I cannot recall the exact reference. [3] _Sophist_, 243, A. [4] See especially the interesting note on the subject in his recent work, _Die wirkliche und die scheinbare Welt_, Vorrede, pp x. ff. ADDITIONAL REFERENCES. Transcriber’s Note: These have been marked up as footnotes in the text, using alphabetic coding. This identifies the page and line number rather than any precise text. [A] Page 9, line 18. Plutarch (_ut fertur_), _Plac. Phil._, I., iii., 4. [B] Page 15, line 26. Xenophanes, _Fragm._ 19 and 21, ed. Mullach. [C] Page 41, line 25. Diogenes Laert., IX., 34. The words ‘in the Eastern countries where he had travelled,’ are a conjectural addition, but they seem justified by the context. [D] Page 43, line 11. Plutarch, _Pericles_, iv. [E] Page 65. For the story of Glaucus, see Herodotus VI., lxxxvi. [F] Page 77, line 21. Plato, _Protag._, 315, D. [G] Page 78, line 1. _Ibid._, 341, A. [H] Page 103. For the opinion of Socrates respecting the Sophists, see Xenophon, _Mem._, I., vi., 11 ff. [I] Page 114, line 4. Xenophon, _Mem._, I., iv., 1. [J] Page 194, line 28. _Repub._, 493, A; _ibid._, line 33. Gorgias, 521, E. [K] Page 195, line 23. _Theaetêt._, 175, A and 174, E. Jowett’s Transl., IV., p. 325. [L] Page 233, last line. _Sophist._, 246, D. [M] Page 294, line 7. For Plato’s preference of practice to contemplation, see _Repub._, 496, E. THE GREEK PHILOSOPHERS. CHAPTER I. EARLY GREEK THOUGHT. I. During the two centuries that ended with the close of the Peloponnesian war, a single race, weak numerically, and weakened still further by political disunion, simultaneously developed all the highest human faculties to an extent possibly rivalled but certainly not surpassed by the collective efforts of that vastly greater population which now wields the accumulated resources of modern Europe. This race, while maintaining a precarious foothold on the shores of the Mediterranean by repeated prodigies of courage and genius, contributed a new element to civilisation which has been the mainspring of all subsequent progress, but which, as it expanded into wider circles and encountered an increasing resistance from without, unavoidably lost some of the enormous elasticity that characterised its earliest and most concentrated reaction. It was the just boast of the Greek that to Asiatic refinement and Thracian valour he joined a disinterested thirst for knowledge unshared by his neighbours on either side.[5] And if a contemporary of Pericles could have foreseen all that would be thought, and said, and done during the next twenty-three centuries of this world’s existence, at no period during that long lapse of ages, not even among the kindred Italian race, could he have found a competitor to contest with Hellas the olive crown of a nobler Olympia, the guerdon due to a unique combination of supreme excellence in every variety of intellectual exercise, in strategy, diplomacy, statesmanship; in mathematical science, architecture, plastic art, and poetry; in the severe fidelity of the historian whose paramount object is to relate facts as they have occurred, and the dexterous windings of the advocate whose interest leads him to evade or to disguise them; in the far-reaching meditations of the lonely thinker grappling with the enigmas of his own soul, and the fervid eloquence by which a multitude on whose decision hang great issues is inspired, directed, or controlled. He would not, it is true, have found any single Greek to pit against the athletes of the Renaissance; there were none who displayed that universal genius so characteristic of the greatest Tuscan artists such as Lionardo and Michael Angelo; nor, to take a much narrower range, did a single Greek writer whose compositions have come down to us excel, or even attempt to excel, in poetry and prose alike. But our imaginary prophet might have observed that such versatility better befitted a sophist like Hippias or an adventurer like Critias than an earnest master of the Pheidian type. He might have quoted Pindar’s sarcasm about highly educated persons who have an infinity of tastes and bring none of them to perfection;[6] holding, as Plato did in the next generation, that one man can only do one thing well, he might have added that the heroes of modern art would have done much nobler work had they concentrated their powers on a single task instead of attempting half a dozen and leaving most of them incomplete. This careful restriction of individual effort to a single province involved no dispersion or incoherence in the results achieved. The highest workers were all animated by a common spirit. Each represented some one aspect of the glory and greatness participated in by all. Nor was the collective consciousness, the uniting sympathy, limited to a single sphere. It rose, by a graduated series, from the city community, through the Dorian or Ionian stock with which they claimed more immediate kinship, to the Panhellenic race, the whole of humanity, and the divine fatherhood of Zeus, until it rested in that all-embracing nature which Pindar knew as the one mother of gods and men.[7] We may, perhaps, find some suggestion of this combined distinctness and comprehensiveness in the aspect and configuration of Greece itself; in its manifold varieties of soil, and climate, and scenery, and productions; in the exquisite clearness with which the features of its landscape are defined; and the admirable development of coast-line by which all parts of its territory, while preserving their political independence, were brought into safe and speedy communication with one another. The industrial and commercial habits of the people, necessitating a well-marked division of labour and a regulated distribution of commodities, gave a further impulse in the same direction. But what afforded the most valuable education in this sense was their system of free government, involving, as it did, the supremacy of an impersonal law, the subdivision of public authority among a number of magistrates, and the assignment to each of certain carefully defined functions which he was forbidden to exceed; together with the living interest felt by each citizen in the welfare of the whole state, and that conception of it as a whole composed of various parts, which is impossible where all the public powers are collected in a single hand. A people so endowed were the natural creators of philosophy. There came a time when the harmonious universality of the Hellenic genius sought for its counterpart and completion in a theory of the external world. And there came a time, also, when the decay of political interests left a large fund of intellectual energy, accustomed to work under certain conditions, with the desire to realise those conditions in an ideal sphere. Such is the most general significance we can attach to that memorable series of speculations on the nature of things which, beginning in Ionia, was carried by the Greek colonists to Italy and Sicily, whence, after receiving important additions and modifications, the stream of thought flowed back into the old country, where it was directed into an entirely new channel by the practical genius of Athens. Thales and his successors down to Democritus were not exactly what we should call philosophers, in any sense of the word that would include a Locke or a Hume, and exclude a Boyle or a Black; for their speculations never went beyond the confines of the material universe; they did not even suspect the existence of those ethical and dialectical problems which long constituted the sole object of philosophical discussion, and have continued since the time when they were first mooted to be regarded as its most peculiar province. Nor yet can we look on them altogether or chiefly as men of science, for their paramount purpose was to gather up the whole of knowledge under a single principle; and they sought to realise this purpose, not by observation and experiment, but by the power of thought alone. It would, perhaps, be truest to say that from their point of view philosophy and science were still undifferentiated, and that knowledge as a universal synthesis was not yet divorced from special investigations into particular orders of phenomena. Here, as elsewhere, advancing reason tends to reunite studies which have been provisionally separated, and we must look to our own contemporaries—to our Tyndalls and Thomsons, our Helmholtzes and Zöllners—as furnishing the fittest parallel to Anaximander and Empedocles, Leucippus and Diogenes of Apollonia. It has been the fashion in certain quarters to look down on these early thinkers—to depreciate the value of their speculations because they were thinkers, because, as we have already noticed, they reached their most important conclusions by thinking, the means of truly scientific observation not being within their reach. Nevertheless, they performed services to humanity comparable for value with the legislation of Solon and Cleisthenes, or the victories of Marathon and Salamis; while their creative imagination was not inferior to that of the great lyric and dramatic poets, the great architects and sculptors, whose contemporaries they were. They first taught men to distinguish between the realities of nature and the illusions of sense; they discovered or divined the indestructibility of matter and its atomic constitution; they taught that space is infinite, a conception so far from being self-evident that it transcended the capacity of Aristotle to grasp; they held that the seemingly eternal universe was brought into its present form by the operation of mechanical forces which will also effect its dissolution; confronted by the seeming permanence and solidity of our planet, with the innumerable varieties of life to be found on its surface, they declared that all things had arisen by differentiation[8] from a homogeneous attenuated vapour; while one of them went so far as to surmise that man is descended from an aquatic animal. But higher still than these fragmentary glimpses and anticipations of a theory which still awaits confirmation from experience, we must place their central doctrine, that the universe is a cosmos, an ordered whole governed by number and law, not a blind conflict of semi-conscious agents, or a theatre for the arbitrary interference of partial, jealous, and vindictive gods; that its changes are determined, if at all, by an immanent unchanging reason; and that those celestial luminaries which had drawn to themselves in every age the unquestioning worship of all mankind were, in truth, nothing more than fiery masses of inanimate matter. Thus, even if the early Greek thinkers were not scientific, they first made science possible by substituting for a theory of the universe which is its direct negation, one that methodised observation has increasingly tended to confirm. The garland of poetic praise woven by Lucretius for his adored master should have been dedicated to them, and to them alone. His noble enthusiasm was really inspired by their lessons, not by the wearisome trifling of a moralist who knew little and cared less about those studies in which the whole soul of his Roman disciple was absorbed. When the power and value of these primitive speculations can no longer be denied, their originality is sometimes questioned by the systematic detractors of everything Hellenic. Thales and the rest, we are told, simply borrowed their theories without acknowledgment from a storehouse of Oriental wisdom on which the Greeks are supposed to have drawn as freely as Coleridge drew on German philosophy. Sometimes each system is affiliated to one of the great Asiatic religions; sometimes they are all traced back to the schools of Hindostan. It is natural that no two critics should agree, when the rival explanations are based on nothing stronger than superficial analogies and accidental coincidences. Dr. Zeller in his wonderfully learned, clear, and sagacious work on Greek philosophy, has carefully sifted some of the hypotheses referred to, and shown how destitute they are of internal or external evidence, and how utterly they fail to account for the facts. The oldest and best authorities, Plato and Aristotle, knew nothing about such a derivation of Greek thought from Eastern sources. Isocrates does, indeed, mention that Pythagoras borrowed his philosophy from Egypt, but Isocrates did not even pretend to be a truthful narrator. No Greek of the early period except those regularly domiciled in Susa seems to have been acquainted with any language but his own. Few travelled very far into Asia, and of those few, only one or two were philosophers. Democritus, who visited more foreign countries than any man of his time, speaks only of having discussed mathematical problems with the wise men whom he encountered; and even in mathematics he was at least their equal.[9] It was precisely at the greatest distance from Asia, in Italy and Sicily, that the systems arose which seem to have most analogy with Asiatic modes of thought. Can we suppose that the traders of those times were in any way qualified to transport the speculations of Confucius and the Vedas to such a distance from their native homes? With far better reason might one expect a German merchant to carry a knowledge of Kant’s philosophy from Königsberg to Canton. But a more convincing argument than any is to show that Greek philosophy in its historical evolution exhibits a perfectly natural and spontaneous progress from simpler to more complex forms, and that system grew out of system by a strictly logical process of extension, analysis, and combination. This is what, chiefly under the guidance of Zeller, we shall now attempt to do. II. Thales, of Miletus, an Ionian geometrician and astronomer, about whose age considerable uncertainty prevails, but who seems to have flourished towards the close of the seventh century before our era, is by general consent regarded as the father of Greek physical philosophy. Others before him had attempted to account for the world’s origin, but none like him had traced it back to a purely natural beginning. According to Thales all things have come from water. That the earth is entirely enclosed by water above and below as well as all round was perhaps a common notion among the Western Asiatics. It was certainly believed by the Hebrews, as we learn from the accounts of the creation and the flood contained in Genesis. The Milesian thinker showed his originality by generalising still further and declaring that not only did water surround all things, but that all things were derived from it as their first cause and substance, that water was, so to speak, the material absolute. Never have more pregnant words been spoken; they acted like a ferment on the Greek mind; they were the grain whence grew a tree that has overshadowed the whole earth. At one stroke they substituted a comparatively scientific, because a verifiable principle for the confused fancies of mythologising poets. Not that Thales was an atheist, or an agnostic, or anything of that sort. On the contrary, he is reported to have said that all things were full of gods; and the report sounds credible enough. Most probably the saying was a protest against the popular limitation of divine agencies to certain special occasions and favoured localities. A true thinker seeks above all for consistency and continuity. He will more readily accept a perpetual stream of creative energy than a series of arbitrary and isolated interferences with the course of Nature. For the rest, Thales made no attempt to explain how water came to be transformed into other substances, nor is it likely that the necessity of such an explanation had ever occurred to him. We may suspect that he and others after him were not capable of distinguishing very clearly between such notions as space, time, cause, substance, and limit. It is almost as difficult for us to enter into the thoughts of these primitive philosophers as it would have been for them to comprehend processes of reasoning already familiar to Plato and Aristotle. Possibly the forms under which we arrange our conceptions may become equally obsolete at a more advanced stage of intellectual evolution, and our sharp distinctions may prove to be not less artificial than the confused identifications which they have superseded. The next great forward step in speculation was taken by Anaximander, another Milesian, also of distinguished attainments in mathematics and astronomy. We have seen that to Thales water, the all-embracing element, became, as such, the first cause of all things, the absolute principle of existence. His successor adopted the same general point of view, but looked out from it with a more penetrating gaze. Beyond water lay something else which he called the Infinite. He did not mean the empty abstraction which has stalked about in modern times under that ill-omened name, nor yet did he mean infinite space, but something richer and more concrete than either; a storehouse of materials whence the waste of existence could be perpetually made good. The growth and decay of individual forms involve a ceaseless drain on Nature, and the deficiency must be supplied by a corresponding influx from without.[A] For, be it observed that, although the Greek thinkers were at this period well aware that nothing can come from nothing, they had not yet grasped the complementary truth inalienably wedded to it by Lucretius in one immortal couplet, that nothing can return to nothing; and Kant is quite mistaken when he treats the two as historically inseparable. Common experience forces the one on our attention much sooner than the other. Our incomings are very strictly measured out and accounted for without difficulty, while it is hard to tell what becomes of all our expenditure, physical and economical. Yet, although the indestructibility of matter was a conception which had not yet dawned on Anaximander, he seems to have been feeling his way towards the recognition of a circulatory movement pervading all Nature. Everything, he says, must at last be reabsorbed in the Infinite as a punishment for the sin of its separate existence.[10] Some may find in this sentiment a note of Oriental mysticism. Rather does its very sadness illustrate the healthy vitality of Greek feeling, to which absorption seemed like the punishment of a crime against the absolute, and not, as to so many Asiatics, the crown and consummation of spiritual perfection. Be this as it may, a doctrine which identified the death of the whole world with its reabsorption into a higher reality would soon suggest the idea that its component parts vanish only to reappear in new combinations. Anaximander’s system was succeeded by a number of others which cannot be arranged according to any order of linear progression. Such arrangements are, indeed, false in principle. Intellectual life, like every other life, is a product of manifold conditions, and their varied combinations are certain to issue in a corresponding multiplicity of effects. Anaximenes, a fellow-townsman of Anaximander, followed most closely in the footsteps of the master. Attempting, as it would appear, to mediate between his two predecessors, he chose air for a primal element. Air is more omnipresent than water, which, as well as earth, is enclosed within its plastic sphere. On the other hand, it is more tangible and concrete than the Infinite, or may even be substituted for that conception by supposing it to extend as far as thought can reach. As before, cosmogony grows out of cosmography; the enclosing element is the parent of those embraced within it. Speculation now leaves its Asiatic cradle and travels with the Greek colonists to new homes in Italy and Sicily, where new modes of thought were fostered by a new environment. A name, round which mythical accretions have gathered so thickly that the original nucleus of fact almost defies definition, first claims our attention. Aristotle, as is well known, avoids mentioning Pythagoras, and always speaks of the Pythagoreans when he is discussing the opinions held by a certain Italian school. Their doctrine, whoever originated it, was that all things are made out of number. Brandis regards Pythagoreanism as an entirely original effort of speculation, standing apart from the main current of Hellenic thought, and to be studied without reference to Ionian philosophy. Zeller, with more plausibility, treats it as an outgrowth of Anaximander’s system. In that system the finite and the infinite remained opposed to one another as unreconciled moments of thought. Number, according to the Greek arithmeticians, was a synthesis of the two, and therefore superior to either. To a Pythagorean the finite and the infinite were only one among several antithetical couples, such as odd and even, light and darkness, male and female, and, above all, the one and the many whence every number after unity is formed. The tendency to search for antitheses everywhere, and to manufacture them where they do not exist, became ere long an actual disease of the Greek mind. A Thucydides could no more have dispensed with this cumbrous mechanism than a rope-dancer could get on without his balancing pole; and many a schoolboy has been sorely puzzled by the fantastic contortions which Italiote reflection imposed for a time on Athenian oratory. Returning to our more immediate subject, we must observe that the Pythagoreans did not maintain, in anticipation of modern quantitative science, that all things are determined by number, but that all things are numbers, or are made out of numbers, two propositions not easily distinguished by unpractised thinkers. Numbers, in a word, were to them precisely what water had been to Thales, what air was to Anaximenes, the absolute principle of existence; only with them the idea of a limit, the leading inspiration of Greek thought, had reached a higher degree of abstraction. Number was, as it were, the exterior limit of the finite, and the interior limit of the infinite. Add to this that mathematical studies, cultivated in Egypt and Phoenicia for their practical utility alone, were being pursued in Hellas with ever-increasing ardour for the sake of their own delightfulness, for the intellectual discipline that they supplied—a discipline even more valuable then than now, and for the insight which they bestowed, or were believed to bestow, into the secret constitution of Nature; and that the more complicated arithmetical operations were habitually conducted with the aid of geometrical diagrams, thus suggesting the possibility of applying a similar treatment to every order of relations. Consider the lively emotions excited among an intelligent people at a time when multiplication and division, squaring and cubing, the rule of three, the construction and equivalence of figures, with all their manifold applications to industry, commerce, fine art, and tactics, were just as strange and wonderful as electrical phenomena are to us; consider also the magical influence still commonly attributed to particular numbers, and the intense eagerness to obtain exact numerical statements, even when they are of no practical value, exhibited by all who are thrown back on primitive ways of living, as, for example, in Alpine travelling, or on board an Atlantic steamer, and we shall cease to wonder that a mere form of thought, a lifeless abstraction, should once have been regarded as the solution of every problem, the cause of all existence; or that these speculations were more than once revived in after ages, and perished only with Greek philosophy itself. We have not here to examine the scientific achievements of Pythagoras and his school; they belong to the history of science, not to that of pure thought, and therefore lie outside the present discussion. Something, however, must be said of Pythagoreanism as a scheme of moral, religious, and social reform. Alone among the pre-Socratic systems, it undertook to furnish a rule of conduct as well as a theory of being. Yet, as Zeller has pointed out,[11] it was only an apparent anomaly, for the ethical teaching of the Pythagoreans was not based on their physical theories, except in so far as a deep reverence for law and order was common to both. Perhaps, also, the separation of soul and body, with the ascription of a higher dignity to the former, which was a distinctive tenet of the school, may be paralleled with the position given to number as a kind of spiritual power creating and controlling the world of sense. So also political power was to be entrusted to an aristocracy trained in every noble accomplishment, and fitted for exercising authority over others by self-discipline, by mutual fidelity, and by habitual obedience to a rule of right. Nevertheless, we must look, with Zeller, for the true source of Pythagoreanism as a moral movement in that great wave of religious enthusiasm which swept over Hellas during the sixth century before Christ, intimately associated with the importation of Apollo-worship from Lycia, with the concentration of spiritual authority in the oracular shrine of Delphi, and the political predominance of the Dorian race, those Normans of the ancient world. Legend has thrown this connexion into a poetical form by making Pythagoras the son of Apollo; and the Samian sage, although himself an Ionian, chose the Dorian cities of Southern Italy as a favourable field for his new teaching, just as Calvinism found a readier acceptance in the advanced posts of the Teutonic race than among the people whence its founder sprang. Perhaps the nearest parallel, although on a far more extensive scale, for the religious movement of which we are speaking, is the spectacle offered by mediaeval Europe during the twelfth and thirteenth centuries of our era, when a series of great Popes had concentrated all spiritual power in their own hands, and were sending forth army after army of Crusaders to the East; when all Western Europe had awakened to the consciousness of its common Christianity, and each individual was thrilled by a sense of the tremendous alternatives committed to his choice; when the Dominican and Franciscan orders were founded; when Gothic architecture and Florentine painting arose; when the Troubadours and Minnesängers were pouring out their notes of scornful or tender passion, and the love of the sexes had become a sentiment as lofty and enduring as the devotion of friend to friend had been in Greece of old. The bloom of Greek religious enthusiasm was more exquisite and evanescent than that of feudal Catholicism; inferior in pure spirituality and of more restricted significance as a factor in the evolution of humanity, it at least remained free from the ecclesiastical tyranny, the murderous fanaticism, and the unlovely superstitions of mediaeval faith. But polytheism under any form was fatally incapable of coping with the new spirit of enquiry awakened by philosophy, and the old myths, with their naturalistic crudities, could not long satisfy the reason and conscience of thinkers who had learned in another school to seek everywhere for a central unity of control, and to bow their imaginations before the passionless perfection of eternal law. III. Such a thinker was Xenophanes, of Colophon. Driven, like Pythagoras, from his native city by civil discords, he spent the greater part of an unusually protracted life wandering through the Greek colonies of Sicily and Southern Italy, and reciting his own verses, not always, as it would appear, to a very attentive audience. Elea, an Italiote city, seems to have been his favourite resort, and the school of philosophy which he founded there has immortalised the name of this otherwise obscure Phocaean settlement. Enough remains of his verses to show with what terrible strength of sarcasm he assailed the popular religion of Hellas. ‘Homer and Hesiod,’ he exclaims, ‘have attributed to the gods everything that is a shame and reproach among men—theft, adultery, and mutual deception.’[12] Nor is Xenophanes content with attacking these unedifying stories, he strikes at the anthropomorphic conceptions which lay at their root. ‘Mortals think that the gods have senses, and a voice and a body like their own. The negroes fancy that their deities are black-skinned and snub-nosed, the Thracians give theirs fair hair and blue eyes; if horses or lions had hands and could paint, they too would make gods in their own image.’[13] It was, he declared, as impious to believe in the birth of a god as to believe in the possibility of his death. The current polytheism was equally false. ‘There is one Supreme God among gods and men, unlike mortals both in mind and body.’[14] There can be only one God, for God is Omnipotent, so that there must be none to dispute his will. He must also be perfectly homogeneous, shaped like a sphere, seeing, hearing, and thinking with every part alike, never moving from place to place, but governing all things by an effortless exercise of thought. Had such daring heresies been promulgated in democratic Athens, their author would probably have soon found himself and his works handed over to the tender mercies of the Eleven. Happily at Elea, and in most other Greek states, the gods were left to take care of themselves. Xenophanes does not seem to have been ever molested on account of his religious opinions. He complains bitterly enough that people preferred fiction to philosophy, that uneducated athletes engrossed far too much popular admiration, that he, Xenophanes, was not sufficiently appreciated;[B] but of theological intolerance, so far as our information goes, he says not one single word. It will easily be conceived that the rapid progress of Greek speculation was singularly favoured by such unbounded freedom of thought and speech. The views just set forth have often been regarded as a step towards spiritualistic monotheism, and so, considered in the light of subsequent developments, they unquestionably were. Still, looking at the matter from another aspect, we may say that Xenophanes, when he shattered the idols of popular religion, was returning to the past rather than anticipating the future; feeling his way back to the deeper, more primordial faith of the old Aryan race, or even of that still older stock whence Aryan and Turanian alike diverged. He turns from the brilliant, passionate, fickle Dyaus, to Zên, or Ten, the ever-present, all-seeing, all-embracing, immovable vault of heaven. Aristotle, with a sympathetic insight unfortunately too rare in his criticisms on earlier systems, observes that Xenophanes did not make it clear whether the absolute unity he taught was material or ideal, but simply looked up at the whole heaven and declared that the One was God.[15] Aristotle was himself the real creator of philosophic monotheism, just because the idea of living, self-conscious personality had a greater value, a profounder meaning for him than for any other thinker of antiquity, one may almost say than for any other thinker whatever. It is, therefore, a noteworthy circumstance that, while warmly acknowledging the anticipations of Anaxagoras, he nowhere speaks of Xenophanes as a predecessor in the same line of enquiry. The latter might be called a pantheist were it not that pantheism belongs to a much later stage of speculation, one, in fact, not reached by the Greek mind at any period of its development. His leading conception was obscured by a confusion of mythological with purely physical ideas, and could only bear full fruit when the religious element had been entirely eliminated from its composition. This elimination was accomplished by a far greater thinker, one who combined poetic inspiration with philosophic depth; who was penetrating enough to discern the logical consequences involved in a fundamental principle of thought, and bold enough to push them to their legitimate conclusions without caring for the shock to sense and common opinion that his merciless dialectic might inflict. Parmenides, of Elea, flourished towards the beginning of the fifth century B.C. We know very little about his personal history. According to Plato, he visited Athens late in life, and there made the acquaintance of Socrates, at that time a very young man. But an unsupported statement of Plato’s must always be received with extreme caution; and this particular story is probably not less fictitious than the dialogue which it serves to introduce. Parmenides embodied his theory of the world in a poem, the most important passages of which have been preserved. They show that, while continuing the physical studies of his predecessors, he proceeded on an entirely different method. Their object was to deduce every variety of natural phenomena from a fundamental unity of substance. He declared that all variety and change were a delusion, and that nothing existed but one indivisible, unalterable, absolute reality; just as Descartes’ antithesis of thought and extension disappeared in the infinite substance of Spinoza, or as the Kantian dualism of object and subject was eliminated in Hegel’s absolute idealism. Again, Parmenides does not dogmatise to the same extent as his predecessors; he attempts to demonstrate his theory by the inevitable necessities of being and thought. Existence, he tells us over and over again, _is_, and non-existence is not, cannot even be imagined or thought of as existing, for thought is the same as being. This is not an anticipation of Hegel’s identification of being with thought; it only amounts to the very innocent proposition that a thought is something and about something—enters, therefore, into the general undiscriminated mass of being. He next proceeds to prove that what is can neither come into being nor pass out of it again. It cannot come out of the non-existent, for that is inconceivable; nor out of the existent, for nothing exists but being itself; and the same argument proves that it cannot cease to exist. Here we find the indestructibility of matter, a truth which Anaximander had not yet grasped, virtually affirmed for the first time in history. We find also that our philosopher is carried away by the enthusiasm of a new discovery, and covers more ground than he can defend in maintaining the permanence of all existence whatever. The reason is that to him, as to every other thinker of the pre-Socratic period, all existence was material, or, rather, all reality was confounded under one vague conception, of which visible resisting extension supplied the most familiar type. To proceed: Being cannot be divided from being, nor is it capable of condensation or expansion (as the Ionians had taught); there is nothing by which it can be separated or held apart; nor is it ever more or less existent, but all is full of being. Parmenides goes on in his grand style:— ‘Therefore the whole extends continuously, Being by Being set; immovable, Subject to the constraint of mighty laws; Both increate and indestructible, Since birth and death have wandered far away By true conviction into exile driven; The same, in self-same place, and by itself Abiding, doth abide most firmly fixed, And bounded round by strong Necessity. Wherefore a holy law forbids that Being Should be without an end, else want were there, And want of that would be a want of all.’[16] Thus does the everlasting Greek love of order, definition, limitation, reassert its supremacy over the intelligence of this noble thinker, just as his almost mystical enthusiasm has reached its highest pitch of exaltation, giving him back a world which thought can measure, circumscribe, and control. Being, then, is finite in extent, and, as a consequence of its absolute homogeneity, spherical in form. There is good reason for believing that the earth’s true figure was first discovered in the fifth century B.C., but whether it was suggested by the _à priori_ theories of Parmenides, or was generalised by him into a law of the whole universe, or whether there was more than an accidental connexion between the two hypotheses, we cannot tell. Aristotle, at any rate, was probably as much indebted to the Eleatic system as to contemporary astronomy for his theory of a finite spherical universe. It will easily be observed that the distinction between space and matter, so obvious to us, and even to Greek thinkers of a later date, had not yet dawned upon Parmenides. As applied to the former conception, most of his affirmations are perfectly correct, but his belief in the finiteness of Being can only be justified on the supposition that Being is identified with matter. For it must be clearly understood (and Zeller has the great merit of having proved this fact by incontrovertible arguments)[17] that the Eleatic Being was not a transcendental conception, nor an abstract unity, as Aristotle erroneously supposed, nor a Kantian noumenon, nor a spiritual essence of any kind, but a phenomenal reality of the most concrete description. We can only not call Parmenides a materialist, because materialism implies a negation of spiritualism, which in his time had not yet come into existence. He tells us plainly that a man’s thoughts result from the conformation of his body, and are determined by the preponderating element in its composition. Not much, however, can be made of this rudimentary essay in psychology, connected as it seems to be with an appendix to the teaching of our philosopher, in which he accepts the popular dualism, although still convinced of its falsity, and uses it, under protest, as an explanation of that very genesis which he had rejected as impossible. As might be expected, the Parmenidean paradoxes provoked a considerable amount of contradiction and ridicule. The Reids and Beatties of that time drew sundry absurd consequences from the new doctrine, and offered them as a sufficient refutation of its truth. Zeno, a young friend and favourite of Parmenides, took up arms in his master’s defence, and sought to prove with brilliant dialectical ability that consequences still more absurd might be deduced from the opposite belief. He originated a series of famous puzzles respecting the infinite divisibility of matter and the possibility of motion, subsequently employed as a disproof of all certainty by the Sophists and Sceptics, and occasionally made to serve as arguments on behalf of agnosticism by writers of our own time. Stated generally, they may be reduced to two. A whole composed of parts and divisible _ad infinitum_ must be either infinitely great or infinitely little; infinitely great if its parts have magnitude, infinitely little if they have not. A moving body can never come to the end of a given line, for it must first traverse half the line, then half the remainder, and so on for ever. Aristotle thought that the difficulty about motion could be solved by taking the infinite divisibility of time into account; and Coleridge, according to his custom, repeated the explanation without acknowledgment. But Zeno would have refused to admit that any infinite series could come to an end, whether it was composed of successive or of co-existent parts. So long as the abstractions of our understanding are treated as separate entities, these and similar puzzles will continue to exercise the ingenuity of metaphysicians. Our present business, however, is not to solve Zeno’s difficulties, but to show how they illustrate a leading characteristic of Greek thought, its tendency to perpetual analysis, a tendency not limited to the philosophy of the Greeks, but pervading the whole of their literature and even of their art. Homer carefully distinguishes the successive steps of every action, and leads up to every catastrophe by a series of finely graduated transitions. Like Zeno, again, he pursues a system of dichotomy, passing rapidly over the first half of his subject, and relaxes the speed of his narrative by going into ever-closer detail until the consummation is reached. Such a poem as the ‘Achilleis’ of modern critics would have been perfectly intolerable to a Greek, from the too rapid and uniform march of its action. Herodotus proceeds after a precisely similar fashion, advancing from a broad and free treatment of history to elaborate minuteness of detail. So, too, a Greek temple divides itself into parts so distinct, yet so closely connected, that the eye, after separating, as easily recombines them into a whole. The evolution of Greek music tells the same tale of progressive subdivision, which is also illustrated by the passage from long speeches to single lines, and from these again to half lines in the dialogue of a Greek drama. No other people could have created mathematical demonstration, for no other would have had skill and patience enough to discover the successive identities interposed between and connecting the sides of an equation. The dialectic of Socrates and Plato, the somewhat wearisome distinctions of Aristotle, and, last of all, the fine-spun series of triads inserted by Proclus between the superessential One and the fleeting world of sense,—were all products of the same fundamental tendency, alternately most fruitful and most barren in its results. It may be objected that Zeno, so far from obeying this tendency, followed a diametrically opposite principle, that of absolutely unbroken continuity. True; but the ‘Eleatic Palamedes’ fought his adversaries with a weapon wrested out of their own hands; rejecting analysis as a law of real existence, he continued to employ it as a logical artifice with greater subtlety than had ever yet been displayed in pure speculation.[18] Besides Zeno, Parmenides seems to have had only one disciple of note, Melissus, the Samian statesman and general; but under various modifications and combined with other elements, the Eleatic absolute entered as a permanent factor into Greek speculation. From it were lineally descended the Sphairos of Empedocles, the eternal atoms of Leucippus, the Nous of Anaxagoras, the Megaric Good, the supreme solar idea of Plato, the self-thinking thought of Aristotle, the imperturbable tranquillity attributed to their model sage by Stoics and Epicureans alike, the sovereign indifference of the Sceptics, and finally, the Neo-platonic One. Modern philosophers have sought for their supreme ideal in power, movement, activity, life, rather than in any stationary substance; yet even among them we find Herbart partially reviving the Eleatic theory, and confronting Hegel’s fluent categories with his own inflexible monads. We have now to study an analogous, though far less complicated, antagonism in ancient Greece, and to show how her most brilliant period of physical philosophy arose from the combination of two seemingly irreconcilable systems. Parmenides, in an address supposed to be delivered by Wisdom to her disciple, warns us against the method pursued by ‘ignorant mortals, the blind, deaf, stupid, confused tribes, who hold that to be and not to be are the same, and that all things move round by an inverted path.’[19] What Parmenides denounced as arrant nonsense was deliberately proclaimed to be the highest truth by his illustrious contemporary, Heracleitus, of Ephesus. This wonderful thinker is popularly known as the weeping philosopher, because, according to a very silly tradition, he never went abroad without shedding tears over the follies of mankind. No such mawkish sentimentality, but bitter scorn and indignation, marked the attitude of Heracleitus towards his fellows. A self-taught sage, he had no respect for the accredited instructors of Hellas. ‘Much learning,’ he says, ‘does not teach reason, else it would have taught Hesiod and Pythagoras, Xenophanes and Hecataeus.’[20] Homer, he declares, ought to be flogged out of the public assemblages, and Archilochus likewise. When the highest reputations met with so little mercy, it will readily be imagined what contempt he poured on the vulgar herd. The feelings of a high-born aristocrat combine with those of a lofty genius to point and wing his words. ‘The many are bad and few are the good. The best choose one thing instead of all, a perpetual well-spring of fame, while the many glut their appetites like beasts. One man is equal to ten thousand if he is the best.’ This contempt was still further intensified by the very excusable incapacity of the public to understand profound thought conveyed in a style proverbial for its obscurity. ‘Men cannot comprehend the eternal law; when I have explained the order of Nature they are no wiser than before.’ What, then, was this eternal law, a knowledge of which Heracleitus found so difficult to popularise? Let us look back for a moment at the earlier Ionian systems. They had taught that the universe arose either by differentiation or by condensation and expansion from a single primordial substance, into which, as Anaximander, at least, held, everything, at last returned. Now, Heracleitus taught that this transformation is a universal, never-ending, never-resting process; that all things are moving; that Nature is like a stream in which no man can bathe twice; that rest and stability are the law, not of life, but of death. Again, the Pythagorean school, as we have seen, divided all things into a series of sharply distinguished antithetical pairs. Heracleitus either directly identified the terms of every opposition, or regarded them as necessarily combined, or as continually passing into one another. Perhaps we shall express his meaning most thoroughly by saying that he would have looked on all three propositions as equivalent statements of a single fact. In accordance with this principle he calls war the father and king and lord of all, and denounces Homer’s prayer for the abolition of strife as an unconscious blasphemy against the universe itself. Yet, even his powerful intellect could not grasp the conception of a shifting relativity as the law and life of things without embodying it in a particular material substratum. Following the Ionian tradition, he sought for a world-element, and found it in that cosmic fire which enveloped the terrestrial atmosphere, and of which the heavenly luminaries were supposed to be formed. ‘Fire,’ says the Ephesian philosopher, no doubt adapting his language to the comprehension of a great commercial community, ‘is the general medium of exchange, as gold is given for everything, and everything for gold.’ ‘The world was not created by any god or any man, but always was, and is, and shall be, an ever-living fire, periodically kindled and quenched.‘ By cooling and condensation, water is formed from fire, and earth from water; then, by a converse process called the way up as the other was the way down, earth again passes into water and water into fire. At the end of certain stated periods the whole world is to be reconverted into fire, but only to enter on a new cycle in the series of its endless revolutions—a conception, so far, remarkably confirmed by modern science. The whole theory, including a future world conflagration, was afterwards adopted by the Stoics, and probably exercised a considerable influence on the eschatology of the early Christian Church. Imagination is obliged to work under forms which thought has already superseded; and Heracleitus as a philosopher had forestalled the dazzling consummation to which as a prophet he might look forward in wonder and hope. For, his elemental fire was only a picturesque presentation indispensable to him, but not to us, of the sovereign law wherein all things live and move and have their being. To have introduced such an idea into speculation was his distinctive and inestimable achievement, although it may have been suggested by the εἱμαρμένη or destiny of the theological poets, a term occasionally employed in his writings. It had a moral as well as a physical meaning, or rather it hovers ambiguously between the two. ‘The sun shall not transgress his bounds, or the Erinyes who help justice will find him out.’ It is the source of human laws, the common reason which binds men together, therefore they should hold by it even more firmly than by the laws of the State. It is not only all-wise but all-good, even where it seems to be the reverse; for our distinctions between good and evil, just and unjust, vanish in the divine harmony of Nature, the concurrent energies and identifying transformations of her universal life. According to Aristotle, the Heracleitean flux was inconsistent with the highest law of thought, and made all predication impossible. It has been shown that the master himself recognised a fixed recurring order of change which could be affirmed if nothing else could. But the principle of change, once admitted, seemed to act like a corrosive solvent, too powerful for any vessel to contain. Disciples were soon found who pushed it to extreme consequences with the effect of abolishing all certainty whatever. In Plato’s time it was impossible to argue with a Heracleitean; he could never be tied down to a definite statement. Every proposition became false as soon as it was uttered, or rather before it was out of the speaker’s mouth. At last, a distinguished teacher of the school declined to commit himself by using words, and disputed exclusively in dumb show. A dangerous speculative crisis had set in. At either extremity of the Hellenic world the path of scientific inquiry was barred; on the one hand by a theory eliminating non-existence from thought, and on the other hand by a theory identifying it with existence. The luminous beam of reflection had been polarised into two divergent rays, each light where the other was dark and dark where the other was light, each denying what the other asserted and asserting what the other denied. For a century physical speculation had taught that the universe was formed by the modification of a single eternal substance, whatever that substance might be. By the end of that period, all becoming was absorbed into being at Elea, and all being into becoming at Ephesus. Each view contained a portion of the truth, and one which perhaps would never have been clearly perceived if it had not been brought into exclusive prominence. But further progress was impossible until the two half-truths had been recombined. We may compare Parmenides and Heracleitus to two lofty and precipitous peaks on either side of an Alpine pass. Each commands a wide prospect, interrupted only on the side of its opposite neighbour. And the fertilising stream of European thought originates with neither of them singly, but has its source midway between. IV. We now enter on the last period of purely objective philosophy, an age of mediating and reconciling, but still profoundly original speculation. Its principal representatives, with whom alone we have to deal, are Empedocles, the Atomists, Leucippus and Democritus, and Anaxagoras. There is considerable doubt and difficulty respecting the order in which they should be placed. Anaxagoras was unquestionably the oldest and Democritus the youngest of the four, the difference between their ages being forty years. It is also nearly certain that the Atomists came after Empedocles. But if we take a celebrated expression of Aristotle’s[21] literally (as there is no reason why it should not be taken), Anaxagoras, although born before Empedocles, published his views at a later period. Was he also anticipated by Leucippus? We cannot tell with certainty, but it seems likely from a comparison of their doctrines that he was; and in all cases the man who naturalised philosophy in Athens, and who by his theory of a creative reason furnishes a transition to the age of subjective speculation, will be most conveniently placed at the close of the pre-Socratic period. A splendid tribute has been paid to the fame of Empedocles by Lucretius, the greatest didactic poet of all time, and by a great didactic poet of our own time, Mr. Matthew Arnold. But the still more rapturous panegyric pronounced by the Roman enthusiast on Epicurus makes his testimony a little suspicious, and the lofty chant of our own contemporary must be taken rather as an expression of his own youthful opinions respecting man’s place in Nature, than as a faithful exposition of the Sicilian thinker’s creed. Many another name from the history of philosophy might with better reason have been prefixed to that confession of resigned and scornful scepticism entitled _Empedocles on Etna_. The real doctrines of an essentially religious teacher would hardly have been so cordially endorsed by Mr. Swinburne. But perhaps no other character could have excited the deep sympathy felt by one poetic genius for another, when with both of them thought is habitually steeped in emotion. Empedocles was the last Greek of any note who threw his philosophy into a metrical form. Neither Xenophanes nor Parmenides had done this with so much success. No less a critic than Aristotle extols the Homeric splendour of his verses, and Lucretius, in this respect an authority, speaks of them as almost divine. But, judging from the fragments still extant, their speculative content exhibits a distinct decline from the height reached by his immediate predecessors. Empedocles betrays a distrust in man’s power of discovering truth, almost, although not quite, unknown to them. Too much certainty would be impious. He calls on the ‘much-wooed white-armed virgin muse’ to— ‘Guide from the seat of Reverence thy bright car, And bring to us the creatures of a day, What without sin we may aspire to know.’[22] We also miss in him their single-minded devotion to philosophy and their rigorous unity of doctrine. The Acragantine sage was a party leader (in which capacity, to his great credit, he victoriously upheld the popular cause), a rhetorician, an engineer, a physician, and a thaumaturgist. The well-known legend relating to his death may be taken as a not undeserved satire on the colossal self-conceit of the man who claimed divine honours during his lifetime. Half-mystic and half-rationalist, he made no attempt to reconcile the two inconsistent sides of his intellectual character. It may be compared to one of those grotesque combinations in which, according to his morphology, the heads and bodies of widely different animals were united during the beginnings of life before they had learned to fall into their proper places. He believed in metempsychosis, and professed to remember the somewhat miscellaneous series of forms through which his own personality had already run. He had been a boy, a girl, a bush, a bird, and a fish. Nevertheless, as we shall presently see, his theory of Nature altogether excluded such a notion as the soul’s separate existence. We have now to consider what that theory actually was. It will be remembered that Parmenides had affirmed the perpetuity and eternal self-identity of being, but that he had deprived this profound divination of all practical value by interpreting it in a sense which excluded diversity and change. Empedocles also declares creation and destruction to be impossible, but explains that the appearances so denominated arise from the union and separation of four everlasting substances—earth, air, fire, and water. This is the famous doctrine of the four elements, which, adopted by Plato and Aristotle, was long regarded as the last word of chemistry, and still survives in popular phraseology. Its author may have been guided by an unconscious reflection on the character of his own philosophical method, for was not he, too, constructing a new system out of the elements supplied by his predecessors? They had successively fixed on water, air, and fire as the primordial form of existence; he added a fourth, earth, and effected a sort of reconciliation by placing them all on an equal footing. Curiously enough, the earlier monistic system had a relative justification which his crude eclecticism lacked. All matter may exist either in a solid, a liquid, or a gaseous form; and all solid matter has reached its present condition after passing through the two other degrees of consistency. That the three modifications should be found coexisting in our own experience is a mere accident of the present régime, and to enumerate them is to substitute a description for an explanation, the usual fault of eclectic systems. Empedocles, however, besides his happy improvement on Parmenides, made a real contribution to thought when, as Aristotle puts it, he sought for a moving as well as for a material cause; in other words, when he asked not only of what elements the world is composed, but also by what forces were they brought together. He tells us of two such causes, Love and Strife, the one a combining, the other a dissociating power. If for these half-mythological names we read attractive and repulsive forces, the result will not be very different from our own current cosmologies. Such terms, when so used as to assume the existence of occult qualities in matter, driving its parts asunder or drawing them close together, are, in truth, as completely mythological as any figments of Hellenic fancy. Unlike their modern antitypes, the Empedoclean goddesses did not reign together, but succeeded one another in alternate dominion during protracted periods of time. The victory of Love was complete when all things had been drawn into a perfect sphere, evidently the absolute Eleatic Being subjected to a Heracleitean law of vicissitude and contradiction. For Strife lays hold on the consolidated orb, and by her disintegrating action gradually reduces it to a formless chaos, till, at the close of another world-period, the work of creation begins again. Yet growth and decay are so inextricably intertwined that Empedocles failed to keep up this ideal separation, and was compelled to admit the simultaneous activity of both powers in our everyday experience, so that Nature turns out to be composed of six elements instead of four, the mind which perceives it being constituted in a precisely similar manner. But Love, although on the whole victorious, can only gradually get the better of her retreating enemy, and Nature, as we know it, is the result of their continued conflict. Empedocles described the process of evolution, as he conceived it, in somewhat minute detail. Two points only are of much interest to us, his alleged anticipation of the Darwinian theory and his psychology. The former, such as it was, has occasionally been attributed to Lucretius, but the Roman poet most probably copied Epicurus, although the very brief summary of that philosopher’s physical system preserved by Diogenes Laertius contains no allusion to such a topic. We know, however, that in Aristotle’s time a theory identical with that of Lucretius was held by those who rejected teleological explanations of the world in general and of living organisms in particular. All sorts of animals were produced by spontaneous generation; only those survived which were accidentally furnished with appliances for procuring nourishment and for propagating their kind. The notion itself originated with Empedocles, whose fanciful suppositions have already been mentioned in a different connexion. Most assuredly he did not offer it as a solution of problems which in his time had not yet been mooted, but as an illustration of the confusion which prevailed when Love had only advanced a little way in her ordering, harmonising, unifying task. Prantl, writing a few years before the appearance of Mr. Darwin’s book on the Origin of Species, and therefore without any prejudice on the subject, observes with truth that this theory of Empedocles was deeply rooted in the mythological conceptions of the time.[23] Perhaps he was seeking for a rationalistic explanation of the centaurs, minotaurs, hundred-handed giants, and so forth, in whose existence he had not, like Lucretius, learned completely to disbelieve. His strange supposition was afterwards freed from its worst extravagances; but even as stated in the _De Rerum Naturâ_, it has no claim whatever to rank as a serious hypothesis. Anything more unlike the Darwinian doctrine, according to which all existing species have been evolved from less highly-organized ancestors by the gradual accumulation of minute differences, it would be difficult to conceive. Every thinker of antiquity, with one exception, believed in the immutability of natural species. They had existed unchanged from all eternity, or had sprung up by spontaneous generation from the earth’s bosom in their present form. The solitary dissentient was Anaximander, who conjectured that man was descended from an aquatic animal.[24] Strange to say, this lucky guess has not yet been quoted as an argument against the Ascidian pedigree. It is chiefly the enemies of Darwinism who are eager to find it anticipated in Empedocles or Lucretius. By a curious inversion of traditionalism, it is fancied that a modern discovery can be upset by showing that somebody said something of the kind more than two thousand years ago. Unfortunately authority has not the negative value of disproving the principles which it supports. We must be content to accept the truths brought to light by observation and reasoning, even at the risk of finding ourselves in humiliating agreement with a philosopher of antiquity.[25] Passing from life to mind, we find Empedocles teaching an even more pronounced materialism than Parmenides, inasmuch as it is stated in language of superior precision. Our souls are, according to him, made up of elements like those which constitute the external world, each of these being perceived by a corresponding portion of the same substances within ourselves—fire by fire, water by water, and so on with the rest. It is a mistake to suppose that speculation begins from a subjective standpoint, that men start with a clear consciousness of their own personality, and proceed to construct an objective universe after the same pattern. Doubtless they are too prone to personify the blind forces of Nature, and Empedocles himself has just supplied us with an example of this tendency, but they err still more by reading outward experience into their own souls, by materialising the processes of consciousness, and resolving human personality into a loose confederacy of inorganic units. Even Plato, who did more than anyone else towards distinguishing between mind and body, ended by laying down his psychology on the lines of an astronomical system. Meanwhile, to have separated the perception of an object from the object itself, in ever so slight a degree, was an important gain to thought. We must not omit to notice a hypothesis by which Empedocles sought to elucidate the mechanism of sensation, and which was subsequently adopted by the atomic school; indeed, as will presently be shown, we have reason to believe that the whole atomic theory was developed out of it. He held that emanations were being continually thrown off from the surfaces of bodies, and that they penetrated into the organs of sense through fine passages or pores. This may seem a crude guess, but it is at any rate much more scientific than Aristotle’s explanation. According to the latter, possibilities of feeling are converted into actualities by the presence of an object. In other words, we feel when and because we do; a safe assertion, but hardly an addition to our positive knowledge of the subject. We have seen how Greek thought had arrived at a perfectly just conception of the process by which all physical transformations are effected. The whole extended universe is an aggregate of bodies, while each single body is formed by a combination of everlasting elements, and is destroyed by their separation. But if Empedocles was right, if these primary substances were no other than the fire, air, water, and earth of everyday experience, what became of the Heracleitean law, confirmed by common observation, that, so far from remaining unaltered, they were continually passing into one another? To this question the atomic theory gave an answer so conclusive, that, although ignored or contemned by later schools, it was revived with the great revival of science in the sixteenth century, was successfully employed in the explanation of every order of phenomena, and still remains the basis of all physical enquiry. The undulatory theory of light, the law of universal gravitation, and the laws of chemical combination can only be expressed in terms implying the existence of atoms; the laws of gaseous diffusion, and of thermodynamics generally, can only be understood with their help; and the latest developments of chemistry have tended still further to establish their reality, as well as to elucidate their remarkable properties. In the absence of sufficient information, it is difficult to determine by what steps this admirable hypothesis was evolved. Yet, even without external evidence, we may fairly conjecture that, sooner or later, some philosopher, possessed of a high generalising faculty, would infer that if bodies are continually throwing off a flux of infinitesimal particles from their surfaces, they must be similarly subdivided all through; and that if the organs of sense are honeycombed with imperceptible pores, such may also be the universal constitution of matter.[26] Now, according to Aristotle, Leucippus, the founder of atomism, did actually use the second of these arguments, and employed it in particular to prove the existence of indivisible solids.[27] Other considerations equally obvious suggested themselves from another quarter. If all change was expressible in terms of matter and motion, then gradual change implied interstitial motion, which again involved the necessity of fine pores to serve as channels for the incoming and outgoing molecular streams. Nor, as was supposed, could motion of any kind be conceived without a vacuum, the second great postulate of the atomic theory. Here its advocates directly joined issue with Parmenides. The chief of the Eleatic school had, as we have seen, presented being under the form of a homogeneous sphere, absolutely continuous but limited in extent. Space dissociated from matter was to him, as afterwards to Aristotle, non-existent and impossible. It was, he exclaimed, inconceivable, nonsensical. Unhappily inconceivability is about the worst negative criterion of truth ever yet invented. His challenge was now taken up by the Atomists, who boldly affirmed that if non-being meant empty space, it was just as conceivable and just as necessary as being. A further stimulus may have been received from the Pythagorean school, whose doctrines had, just at this time, been systematised and committed to writing by Philolaus, its most eminent disciple. The hard saying that all things were made out of number might be explained and confirmed if the integers were interpreted as material atoms. It will have been observed that, so far, the merit of originating atomism has been attributed to Leucippus, instead of to the more celebrated Democritus, with whose name it is usually associated. The two were fast friends, and seem always to have worked together in perfect harmony. But Leucippus, although next to nothing is known of his life, was apparently the older man, and from him, so far as we can make out, emanated the great idea, which his brilliant coadjutor carried into every department of enquiry, and set forth in works which are a loss to literature as well as to science, for the poetic splendour of their style was not less remarkable than the encyclopaedic range of their contents. Democritus was born at Abdêra, a Thracian city, 470 B.C., a year before Socrates, and lived to a very advanced age—more than a hundred, according to some accounts. However this may be, he was probably, like most of his great countrymen, possessed of immense vitality. His early manhood was spent in Eastern travel, and he was not a little proud of the numerous countries which he had visited, and the learned men with whom he had conversed. His time was mostly occupied in observing Nature, and in studying mathematics; the sages of Asia and Egypt may have acquainted him with many useful scientific facts, but we have seen that his philosophy was derived from purely Hellenic sources. A few fragments of his numerous writings still survive—the relics of an intellectual Ozymandias. In them are briefly shadowed forth the conceptions which Lucretius, or at least his modern English interpreters, have made familiar to all educated men and women. Everything is the result of mechanical causation. Infinite worlds are formed by the collision of infinite atoms falling for ever downward through infinite space. No place is left for supernatural agency; nor are the unaided operations of Nature disguised under Olympian appellations. Democritus goes even further than Epicurus in his rejection of the popular mythology. His system provides no interstellar refuge for abdicated gods. He attributed a kind of objective existence to the apparitions seen in sleep, and even a considerable influence for good or for evil, but denied that they were immortal. The old belief in a Divine Power had arisen from their activity and from meteorological phenomena of an alarming kind, but was destitute of any stronger foundation. For his own part, he looked on the fiery spherical atoms as a universal reason or soul of the world, without, however, assigning to them the distinct and commanding position occupied by a somewhat analogous principle in the system which we now proceed to examine, and with which our survey of early Greek thought will most fitly terminate. V. Reasons have already been suggested for placing Anaxagoras last in order among the physical philosophers, notwithstanding his priority in point of age to more than one of them. He was born, according to the most credible accounts, 500 B.C., at Clazomenae, an Ionian city, and settled in Athens when twenty years of age. There he spent much the greater part of a long life, illustrating the type of character which Euripides—expressly referring, as is supposed, to the Ionian sage—has described in the following choric lines: ‘Happy is he who has learned To search out the secret of things, Not to the townsmen’s bane, Neither for aught that brings An unrighteous gain. But the ageless order he sees Of nature that cannot die, And the causes whence it springs, And the how and the why. Never have thoughts like these To a deed of dishonour been turned.’[28] The dishonour was for the townsmen who, in an outbreak of insane fanaticism, drove the blameless truthseeker from his adopted home. Anaxagoras was the intimate companion of Pericles, and Pericles had made many enemies by his domestic as well as by his foreign policy. A coalition of harassed interests and offended prejudices was formed against him. A cry arose that religion and the constitution were in danger. The Athenians had too much good sense to dismiss their great democratic Minister, but they permitted the illustrious statesman’s political opponents to strike at him through his friends.[29] Aspasia was saved only by the tears of her lover. Pheidias, the grandest, most spiritual-minded artist of all time, was arrested on a charge of impiety, and died in a prison of the city whose temples were adorned with the imperishable monuments of his religious inspiration. A decree against ‘astronomers and atheists’ was so evidently aimed at Anaxagoras that the philosopher retired to Lampsacus, where he died at the age of seventy-two, universally admired and revered. Altars dedicated to Reason and Truth were erected in his honour, and for centuries his memory continued to be celebrated by an annual feast.[30] His whole existence had been devoted to science. When asked what made life worth living, he answered, ‘The contemplation of the heavens and of the universal cosmic order.’ The reply was like a title-page to his works. We can see that specialisation was beginning, that the positive sciences were separating themselves from general theories about Nature, and could be cultivated independently of them. A single individual might, indeed, combine philosophy of the most comprehensive kind with a detailed enquiry into some particular order of phenomena, but he could do this without bringing the two studies into any immediate connexion with each other. Such seems to have been the case with Anaxagoras. He was a professional astronomer and also the author of a modified atomic hypothesis. This, from its greater complexity, seems more likely to have been suggested by the purely quantitative conception of Leucippus than to have preceded it in the order of evolution. Democritus, and probably his teacher also, drew a very sharp distinction between what were afterwards called the primary and secondary qualities of matter. Extension and resistance alone had a real existence in Nature, while the attributes corresponding to our special sensations, such as temperature, taste, and colour, were only subjectively, or, as he expressed it, conventionally true. Anaxagoras affirmed no less strongly than his younger contemporaries that the sum of being can neither be increased nor diminished, that all things arise and perish by combination and division, and that bodies are formed out of indestructible elements; like the Atomists, again, he regarded these elementary substances as infinite in number and inconceivably minute; only he considered them as qualitatively distinct, and as resembling on an infinitesimal scale the highest compounds that they build up. Not only were gold, iron, and the other metals formed of homogeneous particles, but such substances as flesh, bone, and blood were, according to him, equally simple, equally decomposable, into molecules of like nature with themselves. Thus, as Aristotle well observes, he reversed the method of Empedocles, and taught that earth, air, fire, and water were really the most complex of all bodies, since they supplied nourishment to the living tissues, and therefore must contain within themselves the multitudinous variety of units by whose aggregation individualised organic substance is made up.[31] Furthermore, our philosopher held that originally this intermixture had been still more thoroughgoing, all possible qualities being simultaneously present in the smallest particles of matter. The resulting state of chaotic confusion lasted until Nous, or Reason, came and segregated the heterogeneous elements by a process of continuous differentiation leading up to the present arrangement of things. Both Plato and Aristotle have commended Anaxagoras for introducing into speculation the conception of Reason as a cosmic world-ordering power; both have censured him for making so little use of his own great thought, for attributing almost everything to secondary, material, mechanical causes; for not everywhere applying the teleological method; in fact, for not anticipating the Bridgewater Treatises and proving that the world is constructed on a plan of perfect wisdom and goodness. Less fortunate than the Athenians, we cannot purchase the work of Anaxagoras on Nature at an orchestral book-stall for the moderate price of a drachma; but we know enough about its contents to correct the somewhat petulant and superficial criticism of a school perhaps less in sympathy than we are with its author’s method of research. Evidently the Clazomenian philosopher did not mean by Reason an ethical force, a power which makes for human happiness or virtue, nor yet a reflecting intelligence, a designer adapting means to ends. To all appearances the Nous was not a spirit in the sense which we attach, or which Aristotle attached to the term. It was, according to Anaxagoras, the subtlest and purest of all things, totally unmixed with other substances, and therefore able to control and bring them into order. This is not how men speak of an immaterial inextended consciousness. The truth is that no amount of physical science could create, although it might lead towards a spiritualistic philosophy. Spiritualism first arose from the sophistic negation of an external world, from the exclusive study of man, from the Socratic search after general definitions. Yet, if Nous originally meant intelligence, how could it lose this primary signification and become identified with a mere mode of matter? The answer is, that Anaxagoras, whose whole life was spent in tracing out the order of Nature, would instinctively think of his own intelligence as a discriminating, identifying faculty; would, consequently, conceive its objective counterpart under the form of a differentiating and integrating power. All preceding thinkers had represented their supreme being under material conditions, either as one element singly or as a sum total where elemental differences were merged. Anaxagoras differed from them chiefly by the very sharp distinction drawn between his informing principle and the rest of Nature. The absolute intermixture of qualities which he presupposes bears a very strong resemblance both to the Sphairos of Empedocles and to the fiery consummation of Heracleitus, it may even have been suggested by them. Only, what with them was the highest form of existence becomes with him the lowest; thought is asserting itself more and more, and interpreting the law of evolution in accordance with its own imperious demands. A world where ordering reason was not only raised to supreme power, but also jealously secluded from all communion with lower forms of existence, meant to popular imagination a world from which divinity had been withdrawn. The astronomical teaching of Anaxagoras was well calculated to increase a not unfounded alarm. Underlying the local tribal mythology of Athens and of Greece generally, was an older, deeper Nature-worship, chiefly directed towards those heavenly luminaries which shone so graciously on all men, and to which all men yielded, or were supposed to yield, grateful homage in return. _Securus judicat orbis terrarum._ Every Athenian citizen from Nicias to Strepsiades would feel his own belief strengthened by such a universal concurrence of authority. Two generations later, Plato held fast to the same conviction, severely denouncing its impugners, whom he would, if possible, have silenced with the heaviest penalties. To Aristotle, also, the heavenly bodies were something far more precious and perfect than anything in our sublunary sphere, something to be spoken of only in language of enthusiastic and passionate love. At a far later period Marcus Aurelius could refer to them as visible gods;[32] and just before the final extinction of Paganism highly-educated men still offered up their orisons in silence and secresy to the moon.[33] Judge, then, with what horror an orthodox public received Anaxagoras’s announcement that the moon shone only by reflected light, that she was an earthy body, and that her surface was intersected with mountains and ravines, besides being partially built over. The bright Selênê, the Queen of Heaven, the most interesting and sympathetic of goddesses, whose phases so vividly recalled the course of human life, who was firmly believed to bring fine weather at her return and to take it away at her departure, was degraded into a cold, dark, senseless clod.[34] Democritus observed that all this had been known a long time in the Eastern countries where he had travelled.[C] Possibly; but fathers of families could not have been more disturbed if it had been a brand-new discovery. The sun, too, they were told, was a red-hot stone larger than Peloponnesus—a somewhat unwieldy size even for a Homeric god. Socrates, little as he cared about physical investigations generally, took this theory very seriously to heart, and attempted to show by a series of distinctions that sun-heat and fire-heat were essentially different from each other. A duller people than the Athenians would probably have shown far less suspicion of scientific innovations. Men who were accustomed to anticipate the arguments of an orator before they were half out of his mouth, with whom the extraction of reluctant admissions by cross-examination was habitually used as a weapon of attack and defence in the public law courts and practised as a game in private circles—who were perpetually on their guard against insidious attacks from foreign and domestic foes—had minds ready trained to the work of an inquisitorial priesthood. An Athenian, moreover, had mythology at his fingers’ ends; he was accustomed to see its leading incidents placed before him on the stage not only with intense realism, but with a systematic adaptation to the demands of common experience and a careful concatenation of cause and effect, which gave his belief in them all the force of a rational conviction while retaining all the charm of a supernatural creed. Then, again, the constitution of Athens, less than that of any other Greek State, could be worked without the devoted, self-denying co-operation of her citizens, and in their minds sense of duty was inseparably associated with religious belief, based in its turn on mythological traditions. A great poet has said, and said truly, that Athens was ‘on the will of man as on a mount of diamond set,’ but the crystallising force which gave that collective human will such clearness and keenness and tenacity was faith in the protecting presence of a diviner Will at whose withdrawal it would have crumbled into dust. Lastly, the Athenians had no genius for natural science; none of them were ever distinguished as savants. They looked on the new knowledge much as Swift looked on it two thousand years afterwards. It was, they thought, a miserable trifling waste of time, not productive of any practical good, breeding conceit in young men, and quite unworthy of receiving any attention from orators, soldiers, and statesmen. Pericles, indeed, thought differently, but Pericles was as much beyond his age when he talked about Nature with Anaxagoras as when he charged Aspasia with the government of his household and the entertainment of his guests. These reflections are offered, not in excuse but in explanation of Athenian intolerance, a phenomenon for the rest unparalleled in ancient Greece. We cannot say that men were then, or ever have been, logically obliged to choose between atheism and superstition. If instead of using Nous as a half-contemptuous nickname for the Clazomenian stranger,[D] his contemporaries had taken the trouble to understand what Nous really meant, they might have found in it the possibility of a deep religious significance; they might have identified it with all that was best and purest in their own guardian goddess Athênê; have recognised it as the very foundation of their own most characteristic excellences. But vast spiritual revolutions are not so easily accomplished; and when, before the lapse of many years, Nous was again presented to the Athenian people, this time actually personified as an Athenian citizen, it was again misunderstood, again rejected, and became the occasion for a display of the same persecuting spirit, unhappily pushed to a more fatal extreme. Under such unfavourable auspices did philosophy find a home in Athens. The great maritime capital had drawn to itself every other species of intellectual eminence, and this could not fail to follow with the rest. But philosophy, although hitherto identified with mathematical and physical science, held unexhausted possibilities of development in reserve. According to a well-known legend, Thales once fell into a tank while absorbed in gazing at the stars. An old woman advised him to look at the tank in future, for there he would see the water and the stars as well. Others after him had got into similar difficulties, and might seek to evade them by a similar artifice. While busied with the study of cosmic evolution, they had stumbled unawares on some perplexing mental problems. Why do the senses suggest beliefs so much at variance with those arrived at by abstract reasoning? Why should reason be more trustworthy than sense? Why are the foremost Hellenic thinkers so hopelessly disagreed? What is the criterion of truth? Of what use are conclusions which cannot command universal assent? Or, granting that truth is discoverable, how can it be communicated to others? Such were some of the questions now beginning urgently to press for a solution. ‘I sought for myself,’ said Heracleitus in his oracular style. His successors had to do even more—to seek not only for themselves but for others; to study the beliefs, habits, and aptitudes of their hearers with profound sagacity, in order to win admission for the lessons they were striving to impart. And when a systematic investigation of human nature had once begun, it could not stop short with a mere analysis of the intellectual faculties; what a man did was after all so very much more important than what he knew, was, in truth, that which alone gave his knowledge any practical value whatever. Moral distinctions, too, were beginning to grow uncertain. When every other traditional belief had been shaken to its foundations, when men were taught to doubt the evidence of their own senses, it was not to be expected that the conventional laws of conduct, at no time very exact or consistent, would continue to be accepted on the authority of ancient usage. Thus, every kind of determining influences, internal and external, conspired to divert philosophy from the path which it had hitherto pursued, and to change it from an objective, theoretical study into an introspective, dialectic, practical discipline. VI. And now, looking back at the whole course of early Greek thought, presenting as it does a gradual development and an organic unity which prove it to be truly a native growth, a spontaneous product of the Greek mind, let us take one step further and enquire whether before the birth of pure speculation, or parallel with but apart from its rudimentary efforts, there were not certain tendencies displayed in the other great departments of intellectual activity, fixed forms as it were in which the Hellenic genius was compelled to work, which reproduce themselves in philosophy and determine its distinguishing characteristics. Although the materials for a complete Greek ethology are no longer extant, it can be shown that such tendencies did actually exist. It is a familiar fact, first brought to light by Lessing, and generalised by him into a law of all good literary composition, that Homer always throws his descriptions into a narrative form. We are not told what a hero wore, but how he put on his armour; when attention is drawn to a particular object we are made acquainted with its origin and past history; even the reliefs on a shield are invested with life and movement. Homer was not impelled to adopt this method either by conscious reflection or by a profound poetic instinct. At a certain stage of intellectual development, every Greek would find it far easier to arrange the data of experience in successive than in contemporaneous order; the one is fixed, the other admits of indefinite variation. Pictorial and plastic art also begin with serial presentations, and only arrive at the construction of large centralised groups much later on. We have next to observe that, while Greek reflection at first followed the order of time, it turned by preference not to present or future, but to past time. Nothing in Hellenic literature reminds us of Hebrew prophecy. To a Greek all distinct prevision was merged in the gloom of coming death or the glory of anticipated fame. Of course, at every great crisis of the national fortunes much curiosity prevailed among the vulgar as to what course events would take; but it was sedulously discouraged by the noblest minds. Herodotus and Sophocles look on even divine predictions as purposely ambiguous and misleading. Pindar often dwells on the hopeless uncertainty of life.[35] Thucydides treats all vaticination as utterly delusive. So, when a belief in the soul’s separate existence first obtained acceptance among the Greeks, it interested them far less as a pledge of never-ending life and progress hereafter, than as involving a possible revelation of past history, of the wondrous adventures which each individual had passed through before assuming his present form. Hence the peculiar force of Pindar’s congratulation to the partaker in the Eleusinian mysteries; after death he knows not only ‘the end of life,’ but also ‘its god-given beginning.’[36] Even the present was not intelligible until it had been projected back into the past, or interpreted by the light of some ancient tale. Sappho, in her famous ode to Aphroditê, recalls the incidents of a former passion precisely similar to the unrequited love which now agitates her heart, and describes at length how the goddess then came to her relief as she is now implored to come again. Modern critics have spoken of this curious literary artifice as a sign of delicacy and reserve. We may be sure that Sappho was an utter stranger to such feelings; she ran her thoughts into a predetermined mould just as a bee builds its wax into hexagonal cells. Curtius, the German historian, has surmised with much plausibility that the entire legend of Troy owes its origin to this habit of throwing back contemporary events into a distant past. According to his view, the characters and scenes recorded by Homer, although unhistorical as they now stand, had really a place in the Achaean colonisation of Asia Minor.[37] But, apart from any disguised allusions, old stories had an inexhaustible charm for the Greek imagination. Even during the stirring events of the Peloponnesian war, elderly Athenian citizens in their hours of relaxation talked of nothing but mythology.[38] When a knowledge of reading became universally diffused, and books could be had at a moderate price, ancient legends seem to have been the favourite literature of the lower classes, just as among ourselves in Caxton’s time. Still more must the same taste have prevailed a century earlier. A student who opens Pindar’s epinician odes for the first time is surprised to find so little about the victorious combatants and the struggles in which they took part, so much about mythical adventures seemingly unconnected with the ostensible subject of the poem. Furthermore, we find that genealogies were the framework by which these distant recollections were held together. Most noble families traced their descent back to a god or to a god-like hero. The entire interval separating the historical period from the heroic age was filled up with more or less fictitious pedigrees. A man’s ancestry was much the most important part of his biography. It is likely that Herodotus had just as enthusiastic an admiration as we can have for Leonidas. Yet one fancies that a historian of later date would have shown his appreciation of the Spartan king in a rather different fashion. We should have been told something about the hero’s personal appearance, and perhaps some characteristic incidents from his earlier career would have been related. Not so with Herodotus. He pauses in the story of Thermopylae to give us the genealogy of Leonidas up to Heraclês; no more and no less. That was the highest compliment he could pay, and it is repeated for Pausanias, the victor of Plataea.[39] The genealogical method was capable of wide extension, and could be applied to other than human or animal relationships. Hesiod’s Theogony is a genealogy of heaven and earth, and all that in them is. According to Aeschylus, gain is bred from gain, slaughter from slaughter, woe from woe. Insolence bears a child like unto herself, and this in turn gives birth to a still more fatal progeny.[40] The same poet terminates his enumeration of the flaming signals that sped the message of victory from Troy to Argos, by describing the last beacon as ‘not ungrandsired by the Idaean fire.’[41] Now, when the Greek genius had begun to move in any direction, it rushed forward without pausing until arrested by an impassable limit, and then turned back to retraverse at leisure the whole interval separating that limit from its point of departure. Thus, the ascending lines of ancestry were followed up until they led to a common father of all; every series of outrages was traced through successive reprisals back to an initial crime; and more generally every event was affiliated to a preceding event, until the whole chain had been attached to an ultimate self-existing cause. Hence the records of origination, invention, spontaneity were long sought after with an eagerness which threw almost every other interest into the shade. ‘Glory be to the inventor,’ sings Pindar, in his address to victorious Corinth; ‘whence came the graces of the dithyrambic hymn, who first set the double eagle on the temples of the gods?’[42] The _Prometheus_ of Aeschylus tells how civilisation began, and the trilogy to which it belongs was probably intended to show how the supremacy of Zeus was first established and secured. A great part of the _Agamemnon_ deals with events long anterior to the opening of the drama, but connected as ultimate causes with the terrible catastrophe which it represents. In the _Eumenides_ we see how the family, as it now exists, was first constituted by the substitution of paternal for maternal headship, and also how the worship of the Avenging Goddesses was first introduced into Athens, as well as how the Areopagite tribunal was founded. It is very probable that Sophocles’s earliest work, the _Triptolemus_, represented the origin of agriculture under a dramatic form; and if the same poet’s later pieces, as well as all those of Euripides, stand on quite different ground, occupied as they are with subjects of contemporaneous, or rather of eternal interest, we must regard this as a proof that the whole current of Greek thought had taken a new direction, corresponding to that simultaneously impressed on philosophy by Socrates and the Sophists. We may note further that the Aeginetan sculptures, executed soon after Salamis, though evidently intended to commemorate that victory, represent a conflict waged long before by the tutelary heroes of Aegina against an Asiatic foe. We may also see in our own British Museum how the birth of Athênê was recorded in a marble group on one pediment of the Parthenon, and the foundation of her chosen city on the other. The very temple which these majestic sculptures once adorned was a petrified memorial of antiquity, and, by the mere form of its architecture, must have carried back men’s thoughts to the earliest Hellenic habitation, the simple structure in which a gabled roof was supported by cross-beams on a row of upright wooden posts. Turning back once more from art and literature to philosophy, is it not abundantly clear that if the Greeks speculated at all, they must at first have speculated according to some such method as that which history proves them to have actually followed? They must have begun by fixing their thoughts, as Thales and his successors did, on the world’s remotest past; they must have sought for a first cause of things, and conceived it, not as any spiritual power, but as a kind of natural ancestor homogeneous with the forms which issued from it, although greater and more comprehensive than they were; in short, as an elemental body—water, air, fire, or, more vaguely, as an infinite substance. Did not the steady concatenation of cause and effect resemble the unrolling of a heroic genealogy? And did not the reabsorption of every individual existence in a larger whole translate into more general terms that subordination of personal to family and civic glory which is the diapason of Pindar’s music? Nor was this all. Before philosophising, the Greeks did not think only in the order of time; they learned at a very early period to think also in the order of space, their favourite idea of a limit being made especially prominent here. Homer’s geographical notions, however erroneous, are, for his age, singularly well defined. Aeschylus has a wide knowledge of the earth’s surface, and exhibits it with perhaps unnecessary readiness. Pindar delights to follow his mythological heroes about on their travels. The same tendency found still freer scope when prose literature began. Hecataeus, one of the earliest prose-writers, was great both as a genealogist and as a geographer; and in this respect also Herodotus carried out on a great scale the enquiries most habitually pursued by his countrymen. Now, it will be remembered that we have had occasion to characterise early Ionian speculation as being, to a great extent, cosmography. The element from which it deduced all things was, in fact, that which was supposed to lie outside and embrace the rest. The geographical limit was conceived as a genealogical ancestor. Thus, the studies which men like Hecataeus carried on separately, were combined, or rather confused, in a single bold generalisation by Anaximenes and Heracleitus. Yet, however much may be accounted for by these considerations, they still leave something unexplained. Why should one thinker after another so unhesitatingly assume that the order of Nature as we know it has issued not merely from a different but from an exactly opposite condition, from universal confusion and chaos? Their experience was far too limited to tell them anything about those vast cosmic changes which we know by incontrovertible evidence to have already occurred, and to be again in course of preparation. We can only answer this question by bringing into view what may be called the negative moment of Greek thought. The science of contraries is one, says Aristotle, and it certainly was so to his countrymen. Not only did they delight to bring together the extremes of weal and woe, of pride and abasement, of security and disaster, but whatever they most loved and clung to in reality seemed to interest their imagination most powerfully by its removal, its reversal, or its overthrow. The Athenians were peculiarly intolerant of regal government and of feminine interference in politics. In Athenian tragedy the principal actors are kings and royal ladies. The Athenian matrons occupied a position of exceptional dignity and seclusion. They are brought upon the comic stage to be covered with the coarsest ridicule, and also to interfere decisively in the conduct of public affairs. Aristophanes was profoundly religious himself, and wrote for a people whose religion, as we have seen, was pushed to the extreme of bigotry. Yet he shows as little respect for the gods as for the wives and sisters of his audience. To take a more general example still, the whole Greek tragic drama is based on the idea of family kinship, and that institution was made most interesting to Greek spectators by the violation of its eternal sanctities, by unnatural hatred, and still more unnatural love; or by a fatal misconception which causes the hands of innocent persons, more especially of tender women, to be armed against their nearest and dearest relatives in utter unconsciousness of the awful guilt about to be incurred. By an extension of the same psychological law to abstract speculation we are enabled to understand how an early Greek philosopher who had come to look on Nature as a cosmos, an orderly whole, consisting of diverse but connected and interdependent parts, could not properly grasp such a conception until he had substituted for it one of a precisely opposite character, out of which he reconstructed it by a process of gradual evolution. And if it is asked how in the first place did he come by the idea of a cosmos, our answer must be that he found it in Greek life, in societies distinguished by a many-sided but harmonious development of concurrent functions, and by voluntary obedience to an impersonal law. Thus, then, the circle is complete; we have returned to our point of departure, and again recognise in Greek philosophy a systematised expression of the Greek national genius. We must now bring this long and complicated, but it is hoped not uninteresting, study to a close. We have accompanied philosophy to a point where it enters on a new field, and embraces themes sufficiently important to form the subject of a separate chapter. The contributions made by its first cultivators to our positive knowledge have already been summarised. It remains to mention that there was nothing of a truly transcendental character about their speculations. Whatever extension we may give to that terrible bugbear, the Unknowable, they did not trespass on its domain. Heracleitus and his compeers, while penetrating far beyond the horizon of their age and country, kept very nearly within the limits of a possible experience. They confused some conceptions which we have learned to distinguish, and separated others which we have learned to combine; but they were the lineal progenitors of our highest scientific thought; and they first broke ground on a path where we must continue to advance, if the cosmos which they won for us is not to be let lapse into chaos and darkness again. FOOTNOTES: [5] Plato, _Rep._ IV., 435, E; Aristotle, _Pol._ VII., 1327, b., 29. [6] _Nem._ III. 40-42. (Donaldson.) [7] _Nem._ VI. _sub in._ [8] The word differentiation (ἑτεροίωσις) seems to have been first used by Diogenes Apolloniates. Simpl. _Phys._ fol. 326 ff., quoted by Ritter and Preller, _Hist. Phil._, p. 126 (6th ed.) [9] Ritter and Preller, p. 112. [10] Ritter and Preller p. 8. [11] _Die Philosophie der Griechen_, I. p. 401 (3rd ed.) [12] Ritter and Preller, p. 54. [13] Ritter and Preller, p. 54. [14] _Ib._ [15] _Metaph._ I. v. [16] Ritter and Preller, p. 63. [17] _Op. cit._ p. 475. [18] The tendency which it has been attempted to characterise as a fundamental moment of Greek thought can only be called analytical in default of a better word. It is a process by which two related terms are at once parted and joined together by the insertion of one or more intermediary links; as, for instance, when a capital is inserted between column and architrave, or when a proposition is demonstrated by the interposition of a middle term between its subject and predicate. The German words Vermitteln and Vermittelung express what is meant with sufficient exactitude. They play a great part in Hegel’s philosophy, and it will be remembered that Hegel was the most Hellenic of modern thinkers. So understood, there will cease to be any contradiction between the Eleates and Greek thought generally, at least from one point of view, as their object was to fill up the vacant spaces supposed to separate one mode of existence from another. [19] Ritter and Preller, p. 62. [20] For the originals of this and the succeeding quotations from Heracleitus, see Ritter and Preller, pp. 14-23. [21] Τῇ μὲν ἡλικίᾳ πρότερος ὢν, τοῖς δ’ ἔργοις ὕστερος. _Metaph._ I. iii. [22] Ritter and Preller, p. 90. [23] Prantl, _Aristoteles’ Physik_, p. 484. [24] Ritter and Preller, p. 11. [25] Since the above remarks were first published, Mr. Wallace, in his work on Epicureanism, has stated that, according to Epicurus, ‘the very animals which are found upon the earth have been made what they are by slow processes of selection and adaptation through the experience of life;’ and he proceeds to call the theory in question, ‘ultra-Darwinian’ (_Epicureanism_, p. 114). Lucretius—the authority quoted—says nothing about ‘slow processes of adaptation,’ nor yet does he say that the animals were ‘made what they are’ by ‘selection,’ but by the procreative power of the earth herself. Picking out a ready-made pair of boots from among a number which do not fit is a very different process from manufacturing the same pair by measure, or wearing it into shape. To call the Empedoclean theory ultra-Darwinian, is like calling the Democritean or Epicurean theory of gravitation ultra-Newtonian. And Mr. Wallace seems to admit as much, when he proceeds to say on the very same page, ‘Of course in this there is no implication of the peculiarly Darwinian doctrine of descent or development of kind from kind with structure modified and complicated to meet changing circumstances.’ (By the way, this is _not_ a peculiarly Darwinian doctrine, for it originated with Lamarck, spontaneous variation and selection being the additions made by the English naturalists). But what becomes then of the ‘slow processes of adaptation’ and the ‘ultra-Darwinian theory’ spoken of just before? [26] By a curious coincidence, the atomic constitution of matter still finds its strongest proof in optical phenomena. Light is propagated by transverse waves, and such waves are only possible in a discontinuous medium. But if the luminiferous ether is composed of discrete particles, so also must be the matter which it penetrates in all directions. [27] Ar. _De Gen. et Corr._, I., viii., 325, b, 5. [28] Eurip. _Frag. Incert. Fab._, CXXXVI. Didot, p. 850. [I am indebted for this version to Miss A. M. F. Robinson, the translator of the _Crowned Hippolytus_.] [29] Curtius, _Griechische Geschichte_, 342-5 (3rd ed.). [30] Zeller, _op. cit._, p. 791. [31] Ar. _De Coelo_, III., iii., 302, a, 28. [32] M. Antoninus, XII., 28. [33] Zeller, _Ph. d. Gr._, III., b, p. 669. [34] Even regulating the calendar by the sun instead of by the moon seems to have been regarded as a dangerous and impious innovation by the more conservative Athenians—at least judging from the half-serious pleasantry of Aristophanes, _Nub._, 608-26. (Dindorf.) [35] σύμβολον δ’ οὔ πώ τις ἐπιχθονίων πιστὸν ἀμφὶ πράξιος ἐσσομένας εὗρεν θεόθεν.—_Ol._, XII., 8-9. [36] _Frag._, 102. [37] _Griechische Geschichte_, ii., 112-3 (3rd ed.). [38] Aristophanes, _Vesp._, 1176. [39] Herod., VII., 204; IX., 64. [40] _Agam._, 750-71. [41] _Ib._, 311. [42] _Ol._, XIII., 17 (Donaldson). CHAPTER II. THE GREEK HUMANISTS: NATURE AND LAW. I. In the preceding chapter we traced the rise and progress of physical philosophy among the ancient Greeks. We showed how a few great thinkers, borne on by an unparalleled development of intellectual activity, worked out ideas respecting the order of nature and the constitution of matter which, after more than two thousand years, still remain as fresh and fruitful as ever; and we found that, in achieving these results, Greek thought was itself determined by ascertainable laws. Whether controlling artistic imagination or penetrating to the objective truth of things, it remained always essentially homogeneous, and worked under the same forms of circumscription, analysis, and opposition. It began with external nature, and with a far distant past; nor could it begin otherwise, for only so could the subjects of its later meditations be reached. Only after less sacred beliefs have been shaken can ethical dogmas be questioned. Only when discrepancies of opinion obtrude themselves on man’s notice is the need of an organising logic experienced. And the mind’s eye, originally focussed for distant objects alone, has to be gradually restricted in its range by the pressure of accumulated experience before it can turn from past to present, from successive to contemporaneous phenomena. We have now to undertake the not less interesting task of showing how the new culture, the new conceptions, the new power to think obtained through those earliest speculations, reacted on the life from which they sprang, transforming the moral, religious, and political creeds of Hellas, and preparing, as nothing else could prepare, the vaster revolution which has given a new dignity to existence, and substituted, in however imperfect a form, for the adoration of animalisms which lie below man, the adoration of an ideal which rises above him, but only personifies the best elements of his own nature, and therefore is possible for a perfected humanity to realise. While most educated persons will admit that the Greeks are our masters in science and literature, in politics and art, some even among those who are free from theological prejudices will not be prepared to grant that the principles which claim to guide our conduct are only a wider extension or a more specific application of Greek ethical teaching. Hebraism has been opposed to Hellenism as the educating power whence our love of righteousness is derived, and which alone prevents the foul orgies of a primitive nature-worship from being still celebrated in the midst of our modern civilisation. And many look on old Roman religion as embodying a sense of duty higher than any bequeathed to us by Greece. The Greeks have, indeed, suffered seriously from their own sincerity. Their literature is a perfect image of their life, reflecting every blot and every flaw, unveiled, uncoloured, undisguised. It was, most fortunately, never subjected to the revision of a jealous priesthood, bent on removing every symptom inconsistent with the hypothesis of a domination exercised by themselves through all the past. Nor yet has their history been systematically falsified to prove that they never wrongfully attacked a neighbour, and were invariably obliged to conquer in self-defence. Still, even taking the records as they stand, it is to Greek rather than to Hebrew or Roman annals that we must look for examples of true virtue; and in Greek literature, earlier than in any other, occur precepts like those which are now held to be most distinctively characteristic of Christian ethics. Let us never forget that only by Stoical teaching was the narrow and cruel formalism of ancient Roman law elevated into the ‘written reason’ of the imperial jurists; only after receiving successive infiltrations of Greek thought was the ethnic monotheism of Judaea expanded into a cosmopolitan religion. Our popular theologians are ready enough to admit that Hellenism was providentially the means of giving Christianity a world-wide diffusion; they ignore the fact that it gave the new faith not only wings to fly, but also eyes to see and a soul to love. From very early times there was an intuition of humanity in Hellas which only needed dialectical development to become an all-sufficient law of life. Homer sympathises ardently with his own countrymen, but he never vilifies their enemies. He did not, nor did any Greek, invent impure legends to account for the origin of hostile tribes whose kinship could not be disowned; unlike Samuel, he regards the sacrifice of prisoners with unmixed abhorrence. What would he, whose Odysseus will not allow a shout of triumph to be raised over the fallen, have said to Deborah’s exultation at the murder of a suppliant fugitive? Courage was, indeed, with him the highest virtue, and Greek literature abounds in martial spirit-stirring tones, but it is nearly always by the necessities of self-defence that this enthusiasm is invoked; with Pindar and Simonides, with Aeschylus and Sophocles, it is resistance to an invader that we find so proudly commemorated; and the victories which make Greek history so glorious were won in fighting to repel an unjust aggression perpetrated either by the barbarians or by a tyrant state among the Greeks themselves. There was, as will be shown hereafter, an unhappy period when right was either denied, or, what comes to the same thing, identified with might; but this offensive paradox only served to waken true morality into a more vivid self-consciousness, and into the felt need of discovering for itself a stronger foundation than usage and tradition, a loftier sanction than mere worldly success could afford. The most universal principle of justice, to treat others as we should wish to be treated ourselves, seems before the Rabbi Hillel’s time to have become almost a common-place of Greek ethics;[43] difficulties left unsolved by the Book of Job were raised to a higher level by Greek philosophy; and long before St. Paul, a Plato reasoned of righteousness, temperance, and judgment to come. No one will deny that the life of the Greeks was stained with foul vices, and that their theory sometimes fell to the level of their practice. No one who believes that moral truth, like all truth, has been gradually discovered, will wonder at this phenomenon. If moral conduct is a function of social life, then, like other functions, it will be subject, not only to growth, but also to disease and decay. An intense and rapid intellectual development may have for its condition a totally abnormal state of society, where certain vices, unknown to ruder ages, spring up and flourish with rank luxuriance. When men have to take women along with them on every new path of enquiry, progress will be considerably retarded, although its benefits will ultimately be shared among a greater number, and will be better insured against the danger of a violent reaction. But the work that Hellas was commissioned to perform could not wait; it had to be accomplished in a few generations, or not at all. The barbarians were forcing their way in on every side, not merely with the weight of invading armies, but with the deadlier pressure of a benumbing superstition, with the brute-worship of Egypt and the devil-worship of Phoenicia, with their delirious orgies, their mutilations, their crucifixions, and their gladiatorial contests. Already in the later dramas of Euripides and in the Rhodian school of sculpture, we see the awful shadow coming nearer, and feel the poisonous breath of Asia on our faces. Reason, the reason by which these terrors have been for ever exorcised, could only arrive at maturity under the influence of free and uninterrupted discussion carried on by men among themselves in the gymnasium, the agora, the ecclêsia, and the dicastery. The resulting and inevitable separation of the sexes bred frightful disorders, which through all changes of creed have clung like a moral pestilence to the shores of the Aegean, and have helped to complicate political problems by joining to religious hatred the fiercer animosity of physical disgust. But whatever were the corruptions of Greek sentiment, Greek philosophy had the power to purge them away. ‘Follow nature’ became the watchword of one school after another; and a precept which at first may have meant only that man should not fall below the brutes, was finally so interpreted as to imply an absolute control of sense by reason. No loftier standard of sexual purity has ever been inculcated than that fixed by Plato in his latest work, the _Laws_. Isocrates bids husbands set an example of conjugal fidelity to their wives. Socrates had already declared that virtue was the same for both sexes. Xenophon interests himself in the education of women. Plato would give them the same training, and everywhere associate them in the same functions with men. Equally decisive evidence of a theoretical opposition to slavery is not forthcoming, and we know that it was unfortunately sanctioned by Plato and Aristotle, in this respect no better inspired than the early Christians; nevertheless, the germ of such an opposition existed, and will hereafter be pointed out. It has been said that the Greeks only worshipped beauty; that they cultivated morality from the aesthetic side; that virtue was with them a question, not of duty, but of taste. Some very strong texts might be quoted in support of this judgment. For example, we find Isocrates saying, in his encomium on Helen, that ‘Beauty is the first of all things in majesty, and honour, and divineness. It is easy to see its power: there are many things which have no share of courage, or wisdom, or justice, which yet will be found honoured above things which have each of these, but nothing which is devoid of beauty is prized; all things are scorned which have not been given their part of that attribute; the admiration for virtue itself comes to this, that of all manifestations of life virtue is the most _beautiful_.’[44] And Aristotle distinguishes the highest courage as willingness to die for the καλόν. So also Plato describes philosophy as a love ‘that leads one from fair forms to fair practices, and from fair practices to fair notions, until from fair notions he arrives at the notion of absolute beauty, and at last knows what the essence of beauty is. And this is that life beyond all others which man should live in the contemplation of beauty absolute.’[45] Now, first of all, we must observe that, while loveliness has been worshipped by many others, none have conceived it under a form so worthy of worship as the Greeks. Beauty with them was neither little, nor fragile, nor voluptuous; the soul’s energies were not relaxed but exalted by its contemplation; there was in it an element of austere and commanding dignity. The Argive Hêrê, though revealed to us only through a softened Italian copy, has more divinity in her countenance than any Madonna of them all; and the Melian Aphroditê is distinguished by majesty of form not less than by purity and sweetness of expression. This beauty was the unreserved information of matter by mind, the visible rendering of absolute power, wisdom, and goodness. Therefore, what a Greek worshipped was the perpetual and ever-present energising of mind; but he forgot that beauty can only exist as a combination of spirit with sense; and, after detaching the higher element, he continued to call it by names and clothe it in attributes proper to its earthly manifestations alone. Yet such an extension of the aesthetic sentiment involved no weakening of the moral fibre. A service comprehending all idealisms in one demanded the self-effacement of a laborious preparation and the self-restraint of a gradual achievement. They who pitched the goal of their aspiration so high, knew that the paths leading up to it were rough, and steep, and long; they felt that perfect workmanship and perfect taste, being supremely precious, must be supremely difficult as well; χαλεπὰ τὰ καλά they said, the beautiful is hard—hard to judge, hard to win, and hard to keep. He who has passed through that stern discipline need tremble at no other task; nor has duty anything to fear from a companionship whose ultimate requirements are coincident with her own, and the abandonment of which for a joyless asceticism can only lead to the reappearance as an invading army of forces that should have been cherished as indispensable allies. It may be urged that beauty, however difficult of attainment or severe in form, is, after all, essentially superficial; and that a morality elaborated on the same principles will be equally superficial—will, in fact, be little more than the art of keeping up appearances, of displaying fine sentiments, of avoiding those actions the consequences of which are immediately felt to be disagreeable, and, above all, of not needlessly wounding anyone’s sensibilities. Such an imitation of morality—which it would be a mistake to call hypocrisy—has no doubt been common enough among all civilised nations; but there is no reason to believe that it was in any way favoured by the circumstances of Greek life. There is even evidence of a contrary tendency, as, indeed, might be expected among a people whose most important states were saved from the corrupting influences of a court. Where the sympathetic admiration of shallow and excitable spectators is the effect chiefly sought after, the showy virtues will be preferred to the solid, and the appearance to the reality of all virtue; while brilliant and popular qualities will be allowed to atone for the most atrocious crimes. But, among the Greeks of the best period, courage and generosity rank distinctly lower than temperance and justice; their poets and moralists alike inculcate the preference of substance to show; and in no single instance, so far as we can judge, did they, as modern nations often do, for the sake of great achievements condone great wrongs. It was said of a Greek and by a Greek that he did not wish to seem but to be just.[46] We follow the judgment of the Greeks themselves in preferring Leonidas to Pausanias, Aristeides to Themistocles, and Socrates to Alcibiades. And we need only compare Epameinondas with David or Pericles with Solomon as national heroes, to perceive at once how much nearer the two Greeks come to our own standard of perfection, and how futile are the charges sometimes brought against those from whose traditions we have inherited their august and stainless fame. Moreover, we have not here to consider what was the average level of sentiment and practice among the Greeks; we have to study what alone was of importance for the races which came under their tuition, and that is the highest moral judgment to which they rose. Now, the deliberate verdict of their philosophy on the relation between beauty and virtue is contained in the following passage from Plato’s _Laws_:— ‘When anyone prefers beauty to virtue, what is this but the real and utter dishonour of the soul? For such a preference implies that the body is more honourable than the soul; and this is false, for there is nothing of earthly birth which is more honourable than the heavenly, and he who thinks otherwise of the soul has no idea how greatly he undervalues this wonderful possession.’[47] II. Thus much for the current prejudices which seemed likely to interfere with a favourable consideration of our subject. We have next to study the conditions by which the form of Greek ethical philosophy was originally determined. Foremost among these must be placed the moral conceptions already current long before systematic reflection could begin. What they were may be partly gathered from some wise saws attributed by the Greeks themselves to their Seven Sages, but probably current at a much earlier period. The pith of these maxims, taken collectively, is to recommend the qualities attributed by our own philosophic poet to his perfect woman:— ‘The reason firm, the temperate will, Endurance, foresight, strength, and skill.’ We may say almost as briefly that they inculcate complete independence both of our own passions and of external circumstances, with a corresponding respect for the independence of others, to be shown by using persuasion instead of force. Their tone will perhaps be best understood by contrast with that collection of Hebrew proverbs which has come down to us under the name of Solomon, but which Biblical critics now attribute to a later period and a divided authorship. While these regularly put forward material prosperity as the chief motive to good conduct, Hellenic wisdom teaches indifference to the variations of fortune. To a Greek, ‘the power that makes for righteousness,’ so far from being, ‘not ourselves,’ was our own truest self, the far-seeing reason which should guard us from elation and from depression, from passion and from surprise. Instead of being offered old age as a reward, we are told to be equally prepared for a long and for a short life. Two precepts stand out before all others, which, trivial as they may seem, are uttered from the very soul of Greek experience, ‘Be moderate,’ and, ‘Know thyself.’ Their joint observance constitutes the characteristic virtue of Sôphrosynê, which means all that we understand by temperance, and a great deal more besides; so much, in fact, that very clever Greeks were hard set to define it, and very wise Greeks could pray for it as the fairest gift of the gods.[48] Let us suppose that each individual has a sphere of activity marked out for him by his own nature and his special environment; then to discern clearly the limits of that sphere and to keep within them would be Sôphrosynê, while the discernment, taken alone, would be wisdom. The same self-restraint operating as a check on interference with other spheres would be justice; while the expansive force by which a man fills up his entire sphere and guards it against aggressions may be called courage. Thus we are enabled to comprehend the many-sided significance of Sôphrosynê, to see how it could stand both for a particular virtue and for all virtuousness whatever. We need only glance at Homer’s poems, and in particular at the _Iliad_—a much deeper as well as a more brilliant work than the _Odyssey_—to perceive how very early this demand for moderation combined with self-knowledge had embodied itself in Greek thought. Agamemnon violates the rights of Achilles under the influence of immoderate passion, and through ignorance of how little we can accomplish without the hero’s assistance. Achilles, again, carries his vindictiveness too far, and suffers in consequence. But his self-knowledge is absolutely perfect; conscious that he is first in the field while others are better in council, he never undertakes a task to which his powers are not fully adequate; nor does he enter on his final work of vengeance without a clear consciousness of the speedy death which its completion will entail on himself. Hector, too, notwithstanding ominous forebodings, knows his duty and does it, but with much less just an estimate of his own powers, leading him to pursue his success too far, and then, when the tide has turned, not permitting him to make a timely retreat within the walls of Troy. So with the secondary characters. Patroclus also oversteps the limits of moderation, and pays the penalty with his life. Diomed silently bears the unmerited rebuke of Agamemnon, but afterwards recalls it at a most effective moment, when rising to oppose the craven counsels of the great king. This the Greeks called observing opportunity, and opportunism was with them, as with French politicians, a form of moderation.[49] Down at the very bottom of the scale Thersites and Dolon are signal examples of men who do not know their sphere and suffer for their folly. In the _Odyssey_, Odysseus is a nearly perfect type of wisdom joined with self-control, erring, if we remember rightly, only once, when he insults Polyphemus before the ship is out of danger; while his comrades perish from want of these same gifts. So far, virtue was with the Greeks what it must inevitably be with all men at first, chiefly self-regarding, a refined form of prudence. Moreover, other-regarding virtues gave less scope for reflection, being originally comprehended under obedience to the law. But there were two circumstances which could not long escape their notice; first, that fraud and violence are often, at least apparently, profitable to those who perpetrate them, a fact bitterly remarked by Hesiod;[50] and secondly, that society cannot hold together without justice. It was long before Governments grew up willing and able to protect their subjects from mutual aggressions, nor does positive law create morality, but implies it, and could not be worked without it. Nor could international obligations be enforced by a superior tribunal; hence they have remained down to the present day a fertile theme for ethical discussion. It is at this point that morality forms a junction with religion, the history of which is highly interesting, but which can here be only briefly traced. The Olympian divinities, as placed before us by Homer, are anything but moral. Their conduct towards each other is that of a dissolute nobility; towards men it is that of unscrupulous partisans and patrons. A loyal adherence to friends and gratitude for sacrificial offerings are their most respectable characteristics, raising them already a little above the nature-powers whence they were derived. Now, mark how they first become moralised. It is by being made witnesses to an oath. Any one who is called in to testify to a promise feels aggrieved if it is broken, looking on the breach as an insult to his own dignity. As the Third Commandment well puts it, his name has been taken in vain. Thus it happened that the same gods who left every other crime unpunished, visited perjury with severe and speedy retribution, continued even after the offender’s death.[51] Respect for a contract is the primary form of moral obligation, and still seems to possess a peculiar hold over uneducated minds. We see every day how many persons will abstain from actions which they know to be immoral because they have given their word to that effect, not because the actions themselves are wrong. And for that reason law courts would be more willing to enforce contracts than to redress injuries. If, then, one person inflicted damage on another, he might afterwards, in order to escape retaliation from the injured party, or from his family, engage to give satisfaction, and the court would compel him to redeem his promise.[52] Thus contract, by procuring redress for every species of wrong, would gradually extend its own obligatory character to abstinence from injury in general, and the divine sanctions primarily invoked on behalf of oaths would be extended, with them, over the whole domain of moral conduct. Nor was this all. Laws and justice once established would require to have their origin accounted for, and, according to the usual genealogical method of the early Greeks, would be described as children of the gods, who would thus be interested in their welfare, and would avenge their violation—a stage of reflection already reached in the _Works and Days_ of Hesiod. Again, when oracles like that at Delphi had obtained wide-spread renown and authority, they would be consulted, not only on ceremonial questions and matters of policy, but also on debateable points of morality. The divine responses, being unbiassed by personal interest, would necessarily be given in accordance with received rules of rectitude, and would be backed by all the terrors of a supernatural sanction. It might even be dangerous to assume that the god could possibly give his support to wrong-doing. A story told by Herodotus proves that such actually was the case.[E] There lived once at Sparta a certain man named Glaucus, who had acquired so great a reputation for probity that, during the troublous times of the Persian conquest, a wealthy Milesian thought it advisable to deposit a large sum of money with him for safe keeping. After a considerable time the money was claimed by his children, but the honesty of Glaucus was not proof against temptation. He pretended to have forgotten the whole affair, and required a delay of three months before making up his mind with regard to the validity of their demand. During that interval he consulted the Delphic oracle to know whether he might possess himself of the money by a false oath. The answer was that it would be for his immediate advantage to do so; all must die, the faithful and the perjured alike; but Horcus (oath) had a nameless son swift to pursue without feet, strong to grasp without hands, who would destroy the whole race of the sinner. Glaucus craved forgiveness, but was informed that to tempt the god was equivalent to committing the crime. He went home and restored the deposit, but his whole family perished utterly from the land before three generations had passed by. Yet another step remained to take. Punishment must be transferred from a man’s innocent children to the man himself in a future life. But the Olympian theology was, originally at least, powerless to effect this revolution. Its gods, being personifications of celestial phenomena, had nothing to do with the dark underworld whither men descended after death. There existed, however, side by side with the brilliant religion of courts and camps which Greek poetry has made so familiar to us, another religion more popular with simple country-folk,[53] to whom war meant ruin, courts of justice a means invented by kings for exacting bribes, sea-voyages a senseless imprudence, chariot-racing a sinful waste of money, and beautiful women drones in the human hive, demons of extravagance invented by Zeus for the purpose of venting his spite against mankind. What interest could these poor people take in the resplendent guardians of their hereditary oppressors, in Hêrê and Athênê, Apollo and Poseidôn, Artemis and Aphroditê? But they had other gods peculiar to themselves, whose worship was wrapped in mystery, partly that its objects need not be lured away by the attraction of richer offerings elsewhere, partly because the activity of these Chthonian deities, as they were called, was naturally associated with darkness and secresy. Presiding over birth and death, over seed-time and harvest and vintage, they personified the frost-bound sleep of vegetation in winter and its return from a dark underworld in spring. Out of their worship grew stories which told how Persephonê, the fair daughter of Dêmêtêr, or Mother Earth, was carried away by Pluto to reign with him over the shades below, but after long searching was restored to her mother for eight months in every year; and how Dionysus, the wine-god, was twice born, first from the earth burned up and fainting under the intolerable fire of a summer sky, respectively personified as Semelê and her lover Zeus, then from the protecting mist wrapped round him by his divine father, of whom it formed a part. Dionysus, too, was subject to alternations of depression and triumph, from the recital of which Attic drama was developed, and gained a footing in the infernal regions, whither we accompany him in the _Frogs_ of Aristophanes. Another country god was Hermês, who seems to have been associated with planting and possession as well as with the demarcation and exchange of property, and who was also a conductor of souls to Hades. Finally, there were the Erinyes, children of night and dwellers in subterranean darkness; they could breed pestilence and discord, but could also avert them; they could blast the produce of the soil or increase its luxuriance and fertility; when blood was spilt on the ground, they made it blossom up again in a harvest of retributive hatred; they pursued the guilty during life, and did not relax their grasp after death; all law, whether physical or moral, was under their protection; the same Erinyes who, in the _Odyssey_, avenge on Oedipus the suicide of his mother, in the _Iliad_ will not allow the miraculous speaking of a horse to continue; and we have seen in the last chapter how, according to Heracleitus, it is they who also prevent the sun from transgressing his appointed limits.[54] Dêmêtêr and Persephonê, too, seem to have been law-giving goddesses, as their great festival, celebrated by women alone, was called the Thesmophoria, while eternal happiness was promised to those who had been initiated into their mysteries at Eleusis; and we also find that moral maxims were graven on the marble busts of Hermês placed along every thoroughfare in Athens. We can thus understand why the mutilation of these Hermae caused such rage and terror, accompanied, as it was rumoured to be, by a profanation of the Eleusinian mysteries; for any attack on the deities in question would seem to prefigure an attack on the settled order of things, the popular rights which they both symbolised and protected. Here, then, we find, chiefly among the rustic population, a religion intimately associated with morality, and including the doctrine of retribution after death. But this simple faith, though well adapted to the few wants of its original votaries, could not be raised to the utmost expansion and purity of which it was susceptible without being brought into vivifying contact with that other Olympian religion which, as we have seen, belonged more peculiarly to the ruling aristocracy. The poor may be more moral than the rich, and the country than the town; nevertheless it is from dwellers in cities, and from the higher classes, including as they do a large percentage of educated, open-minded individuals, that the impulses to moral progress always proceed. If the narrowness and hardness of primitive social arrangements were overcome; if justice was disengaged from the ties of blood-relationship, and tempered with consideration for inevitable error; if deadly feuds were terminated by a habitual appeal to arbitration; if the worship of one supreme ideal was substituted for a blind sympathy with the ebb and flow of life on earth; if the numerical strength of states was increased by giving shelter to fugitives; if a Hellenic nation was created and held together by a common literature and a common civilisation, by oracles accessible to all, and by periodical games in which every free-born Greek could take part; and, lastly, if a brighter abode than the slumberous garden of Persephonê was assigned after death to the godlike heroes who had come forth from a thrice repeated ordeal with souls unstained by sin;[55]—all this was due to the military rather than to the industrial classes, to the spirit that breathes through Homer rather than to the tamer inspiration of Hesiod’s muse. But if justice was raised to an Olympian throne; if righteous providence, no less than creative power, became an inalienable attribute of Zeus; if lyric poetry, from Archilochus to Simonides and Pindar, is one long hymn of prayer and praise ever turned upward in adoring love to the Divine; we must remember that Themis was a synonyme for Earth, and that Prometheus, the original friend of humanity, for whose benefit he invented every useful art, augury included, was her son. The seeds of immortal hope were first planted in the fructifying bosom of Dêmêtêr, and life, a forsaken Ariadnê, took refuge in the mystical embraces of Dionysus from the memory of a promise that had allured her to betray. Thus, we may conjecture that between hall and farm-house, between the Olympian and the Chthonian religions, there was a constant reaction going on, during which ethical ideas were continually expanding, and extricating themselves from the superstitious elements associated with their earliest theological expression. III. This process was conceived by Aeschylus as a conflict between two generations of gods, ending with their complete reconciliation. In the _Prometheus Bound_ we have the commencement of the conflict, in the _Eumenides_ its close. Our sympathies are apparently at first intended to be enlisted on behalf of the older divinities, but at last are claimed exclusively by the younger. As opposed to Prometheus, Zeus is evidently in the wrong, and seeks to make up for his deficiencies by arbitrary violence. In the _Oresteia_ he is the champion of justice against iniquity, and through his interpreter, Apollo, he enforces a revised moral code against the antiquated claims of the Erinyes; these latter, however, ultimately consenting to become guardians of the new social order. The Aeschylean drama shows us Greek religion at the highest level it could reach, unaided by philosophical reflection. With Sophocles a perceptible decline has already begun. We are loth to say anything that may sound like disparagement of so noble a poet. We yield to none in admiration for one who has combined the two highest qualities of art—sweetness and strength—more completely than any other singer, Homer alone excepted, and who has given the primordial affections their definitive expression for all time. But we cannot help perceiving an element of superstition in his dramas, which, so far, distinguishes them unfavourably from those of his Titanic predecessor. With Sophocles, when the gods interfere, it is to punish disrespect towards themselves, not to enforce justice between man and man. Ajax perishes by his own hand because he has neglected to ask for divine assistance in battle. Laius and Jocastê come to a tragic end through disobedience to a perfectly arbitrary oracle; and as a part of the same divine purpose Oedipus encounters the most frightful calamities by no fault of his own. The gods are, moreover, exclusively objects of fear; their sole business is to enforce the fulfilment of enigmatic prophecies; they give no assistance to the pious and virtuous characters. Antigonê is allowed to perish for having performed the last duties to her brother’s corpse. Neoptolemus receives no aid in that struggle between ambition on the one hand with truthfulness and pity on the other which makes his character one of the most interesting in all imaginative literature. When Athênê bids Odysseus exult over the degradation of Ajax, the generous Ithacan refuses to her face, and falls back on the consciousness of a common humanity uniting him in sympathy with his prostrate foe. The rift within the lute went on widening till all its music was turned to jarring discord. With the third great Attic dramatist we arrive at a period of complete dissolution. Morality is not only separated from mythological tradition, but is openly at war with it. Religious belief, after becoming almost monotheistic, has relapsed into polytheism. With Euripides the gods do not, as with his predecessors, form a common council. They lead an independent existence, not interfering with each other, and pursuing private ends of their own—often very disreputable ones. Aphrodite inspires Phaedra with an incestuous passion for her stepson. Artemis is propitiated by human sacrifices. Hêrê causes Heraclês to kill his children in a fit of delirium. Zeus and Poseidôn are charged with breaking their own laws, and setting a bad example to mortals. Apollo, once so venerated, fares the worst of any. He outrages a noble maiden, and succeeds in palming off her child on the man whom she subsequently marries. He instigates the murder of a repentant enemy who has come to seek forgiveness at his shrine. He fails to protect Orestes from the consequences of matricide, committed at his own unwise suggestion. Political animosity may have had something to do with these attacks on a god who was believed to side with the Dorian confederacy against Athens. Doubtless, also, Euripides disbelieved many of the scandalous stories which he selected as appropriate materials for dramatic representation. But a satire on immoral beliefs would have been unnecessary had they not been generally accepted. Nor was the poet himself altogether a freethinker. One of his latest and most splendid works, the _Bacchae_, is a formal submission to the orthodox creed. Under the stimulus of an insane delusion, Pentheus is torn to pieces by his mother Agavê and her attendant Maenads, for having presumed to oppose the introduction of Dionysus-worship into Thebes. The antecedents of the new divinity are questionable, and the nature of his influence on the female population extremely suspicious. Yet much stress is laid on the impiety of Pentheus, and we are clearly intended to consider his fate as well-deserved. Euripides is not a true thinker, and for that very reason fitly typifies a period when religion had been shaken to its very foundation, but still retained a strong hold on men’s minds, and might at any time reassert its ancient authority with unexpected vigour. We gather, also, from his writings, that ethical sentiment had undergone a parallel transformation. He introduces characters and actions which the elder dramatists would have rejected as unworthy of tragedy, and not only introduces them, but composes elaborate speeches in their defence. Side by side with examples of devoted heroism we find such observations as that everyone loves himself best, and that those are most prosperous who attend most exclusively to their own interests. It so happens that in one instance where Euripides has chosen a subject already handled by Aeschylus, the difference of treatment shows how great a moral revolution had occurred in the interim. The conflict waged between Eteoclês and Polyneicês for their father’s throne is the theme both of the _Seven against Thebes_ and of the _Phoenician Women_. In both, Polyneicês bases his claim on grounds of right. It had been agreed that he and his brother should alternately hold sway over Thebes. His turn has arrived, and Eteoclês refuses to give way. Polyneicês endeavours to enforce his pretensions by bringing a foreign army against Thebes. Aeschylus makes him appear before the walls with an allegorical figure of Justice on his shield, promising to restore him to his father’s seat. On hearing this, Eteoclês exclaims:— ‘Aye, if Jove’s virgin daughter Justice shared In deed or thought of his, then it might be. But neither when he left the darkling womb, Nor in his childhood, nor in youth, nor when The clustering hair first gathered round his chin, Hath Justice turned approving eyes on him; Nor deem I that she comes as his ally, Now that he wastes his native land with war, Or Justice most unjustly were she called If ruthless hearts could claim her fellowship.’[56] Euripides, with greater dramatic skill, brings the two brothers together in presence of their mother, Jocastê. When Polyneicês has spoken, Eteoclês replies:— ‘Honour and wisdom are but empty names That mortals use, each with a different meaning, Agreeing in the sound, not in the sense. Hear, mother, undisguised my whole resolve! Were Sovereignty, chief goddess among gods, Far set as is the rising of a star, Or buried deep in subterranean gloom, There I would seek and win her for mine own. * * * * * Come fire, come sword, yoke horses to the car, And fill the plain with armed men, for I Will not give up my royalty to him! Let all my life be guiltless save in this: I dare do any wrong for sovereign power— The splendid guerdon of a splendid sin.’[57] The contrast is not only direct, but designed, for Euripides had the work of his predecessor before him, and no doubt imagined that he was improving on it. We perceive a precisely similar change of tone on comparing the two great historians who have respectively recorded the struggle of Greece against Persia, and the struggle of imperial Athens against Sparta and her allies. Though born within fifteen years of one another, Herodotus and Thucydides are virtually separated by an interval of two generations, for while the latter represents the most advanced thought of his time, the former lived among traditions inherited from the age preceding his own. Now, Herodotus is not more remarkable for the earnest piety than for the clear sense of justice which runs through his entire work. He draws no distinction between public and private morality. Whoever makes war on his neighbours without provocation, or rules without the consent of the governed, is, according to him, in the wrong, although he is well aware that such wrongs are constantly committed. Thucydides knows nothing of supernatural interference in human affairs. After relating the tragical end of Nicias, he observes, not without a sceptical tendency, that of all the Greeks then living, this unfortunate general least deserved such a fate, so far as piety and respectability of character went. If there are gods they hold their position by superior strength. That the strong should enslave the weak is a universal and necessary law of Nature. The Spartans, who among themselves are most scrupulous in observing traditional obligations, in their dealings with others most openly identify gain with honour, and expediency with right. Even if the historian himself did not share these opinions, it is evident that they were widely entertained by his contemporaries, and he expressly informs us that Greek political morality had deteriorated to a frightful extent in consequence of the civil discords fomented by the conflict between Athens and Sparta; while, in Athens at least, a similar corruption of private morality had begun with the great plague of 430, its chief symptom being a mad desire to extract the utmost possible enjoyment from life, for which purpose every means was considered legitimate. On this point Thucydides is confirmed and supplemented by the evidence of another contemporary authority. According to Aristophanes, the ancient discipline had in his time become very much relaxed. The rich were idle and extravagant; the poor mutinous; young men were growing more and more insolent to their elders; religion was derided; all classes were animated by a common desire to make money and to spend it on sensual enjoyment. Only, instead of tracing back this profound demoralisation to a change in the social environment, Aristophanes attributes it to demagogues, harassing informers, and popular poets, but above all to the new culture then coming into vogue. Physical science had brought in atheism; dialectic training had destroyed the sanctity of ethical restraints. When, however, the religious and virtuous Socrates is put forward as a type of both tendencies, our confidence in the comic poet’s accuracy, if not in his good faith, becomes seriously shaken; and his whole tone so vividly recalls the analogous invectives now hurled from press and pulpit against every philosophic theory, every scientific discovery, every social reform at variance with traditional beliefs or threatening the sinister interests which have gathered round iniquitous institutions, that at first we feel tempted to follow Grote in rejecting his testimony altogether. So far, however, as the actual phenomena themselves are concerned, and apart from their generating antecedents, Aristophanes does but bring into more picturesque prominence what graver observers are content to indicate, and what Plato, writing a generation later, treats as an unquestionable reality. Nor is the fact of a lowered moral tone going along with accelerated mental activity either incredible or unparalleled. Modern history knows of at least two periods remarkable for such a conjunction, the Renaissance and the eighteenth century, the former stained with every imaginable crime, the latter impure throughout, and lapsing into blood-thirsty violence at its close. Moral progress, like every other mode of motion, has its appropriate rhythm—its epochs of severe restraint followed by epochs of rebellious license. And when, as an aggravation of the reaction from which they periodically suffer, ethical principles have become associated with a mythology whose decay, at first retarded, is finally hastened by their activity, it is still easier to understand how they may share in its discredit, and only regain their ascendency by allying themselves with a purified form of the old religion, until they can be disentangled from the compromising support of all unverified theories whatever. We have every reason to believe that Greek life and thought did pass through such a crisis during the second half of the fifth century B.C., and we have now to deal with the speculative aspects of that crisis, so far as they are represented by the Sophists. IV. The word Sophist in modern languages means one who purposely uses fallacious arguments. Our definition was probably derived from that given by Aristotle in his _Topics_, but does not entirely reproduce it. What we call sophistry was with him eristic, or the art of unfair disputation; and by Sophist he means one who practises the eristic art for gain. He also defines sophistry as the appearance without the reality of wisdom. A very similar account of the Sophists and their art is given by Plato in what seems to be one of his later dialogues; and another dialogue, probably composed some time previously, shows us how eristic was actually practised by two Sophists, Euthydêmus and Dionysodôrus, who had learned the art, which is represented as a very easy accomplishment, when already old men. Their performance is not edifying; and one only wonders how any Greek could have been induced to pay for the privilege of witnessing such an exhibition. But the word Sophist, in its original signification, was an entirely honourable name. It meant a sage, a wise and learned man, like Solon, or, for that matter, like Plato and Aristotle themselves. The interval between these widely-different connotations is filled up and explained by a number of individuals as to whom our information is principally, though by no means entirely, derived from Plato. All of them were professional teachers, receiving payment for their services; all made a particular study of language, some aiming more particularly at accuracy, others at beauty of expression. While no common doctrine can be attributed to them as a class, as individuals they are connected by a series of graduated transitions, the final outcome of which will enable us to understand how, from a title of respect, their name could be turned into a byword of reproach. The Sophists, concerning whom some details have been transmitted to us, are Protagoras, Gorgias, Prodicus, Hippias, Pôlus, Thrasymachus, and the Eristics already mentioned. We have placed them, so far as their ages can be determined, in chronological order, but their logical order is somewhat different. The first two on the list were born about 480 B.C., and the second pair possibly twenty years later. But neither Protagoras nor Gorgias seems to have published his most characteristic theories until a rather advanced time of life, for they are nowhere alluded to by the Xenophontic Socrates, who, on the other hand, is well acquainted with both Prodicus and Hippias, while, conversely, Plato is most interested in the former pair. We shall also presently see that the scepticism of the elder Sophists can best be explained by reference to the more dogmatic theories of their younger contemporaries, which again easily fit on to the physical speculations of earlier thinkers. Prodicus was born in Ceos, a little island belonging to the Athenian confederacy, and seems to have habitually resided at Athens. His health was delicate, and he wrapped up a good deal, as we learn from the ridicule of Plato, always pitiless to a valetudinarian.[F] Judging from two allusions in Aristophanes, he taught natural science in such a manner as to conciliate even that unsparing enemy of the new learning.[58] He also gave moral instruction grounded on the traditional ideas of his country, a pleasing specimen of which has been preserved. It is conveyed under the form of an apologue, entitled the Choice of Heraclês, and was taken down in its present form by Xenophon from the lips of Socrates, who quoted it, with full approval, for the benefit of his own disciples. Prodicus also lectured on the use of words, laying especial emphasis on the distinction of synonyms. We hear, not without sympathy, that he tried to check the indiscriminate employment of ‘awful’ (δεινός), which was even more rife at Athens than among ourselves.[G] Finally, we are told that, like many moderns, he considered the popular divinities to be personifications of natural phenomena. Hippias, who was a native of Elis, seems to have taught on very much the same system. It would appear that he lectured principally on astronomy and physics, but did not neglect language, and is said to have invented an art of memory. His restless inquisitiveness was also exercised on ancient history, and his erudition in that subject was taxed to the utmost during a visit to Sparta, where the unlettered people still delighted in old stories, which among the more enlightened Greeks had been superseded by topics of livelier and fresher interest. At Sparta, too, he recited, with great applause, an ethical discourse under the form of advice given by Nestor to Neoptolemus after the capture of Troy. We know, on good authority, that Hippias habitually distinguished between natural and customary law, the former being, according to him, everywhere the same, while the latter varied from state to state, and in the same state at different times. Natural law he held to be alone binding and alone salutary. On this subject the following expressions, evidently intended to be characteristic, are put into his mouth by Plato:—‘All of you who are here present I reckon to be kinsmen and friends and fellow-citizens, by nature and not by law; for by nature like is akin to like, whereas law is the tyrant of mankind, and often compels us to do many things which are against Nature.’[59] Here two distinct ideas are implied, the idea that Nature is a moral guide, and, further, the idea that she is opposed to convention. The habit of looking for examples and lessons to some simpler life than their own prevailed among the Greeks from a very early period, and is, indeed, very common in primitive societies. Homer’s similes are a case in point; while all that we are told about the innocence and felicity of the Aethiopians and Hyperboreans seems to indicate a deep-rooted belief in the moral superiority of savage to civilised nations; and Hesiod’s fiction of the Four Ages, beginning with a golden age, arises from a kindred notion that intellectual progress is accompanied by moral corruption. Simonides of Amorgus illustrates the various types of womankind by examples from the animal world; and Aesop’s fables, dating from the first half of the sixth century, give ethical instruction under the same disguise. We have already pointed out how Greek rural religion established a thorough-going connexion between physical and moral phenomena, and how Heracleitus followed in the same track. Now, one great result of early Greek thought, as described in our first chapter, was to combine all these scattered fugitive incoherent ideas under a single conception, thus enabling them to elucidate and support one another. This was the conception of Nature as a universal all-creative eternal power, first superior to the gods, then altogether superseding them. When Homer called Zeus the father of gods and men; when Pindar said that both races, the divine and the human, are sprung from one mother (Earth);[60] when, again, he spoke of law as an absolute king; or when Aeschylus set destiny above Zeus himself;[61] they were but foreshadowing a more despotic authority, whose dominion is even now not extinct, is perhaps being renewed under the title of Evolution. The word Nature was used by most philosophers, and the thing was implied by all. They did not, indeed, commit the mistake of personifying a convenient abstraction; but a conception which they substituted for the gods would soon inherit every attribute of divine agency. Moreover, the Nature of philosophy had three fundamental attributes admitting of ready application as ethical standards. She was everywhere the same; fire burned in Greece and Persia alike. She tended towards an orderly system where every agent or element is limited to its appropriate sphere. And she proceeded on a principle of universal compensation, all gains in one direction being paid for by losses in another, and every disturbance being eventually rectified by a restoration of equilibrium. It was, indeed, by no means surprising that truths which were generalised from the experience of Greek social life should now return to confirm the orderliness of that life with the sanction of an all-pervading law. Euripides gives us an interesting example of the style in which this ethical application of physical science could be practised. We have seen how Eteoclês expresses his determination to do and dare all for the sake of sovereign power. His mother, Jocastê, gently rebukes him as follows:— ‘Honour Equality who binds together Both friends and cities and confederates, For equity is law, law equity; The lesser is the greater’s enemy, And disadvantaged aye begins the strife. From her our measures, weights, and numbers come, Defined and ordered by Equality; So do the night’s blind eye and sun’s bright orb Walk equal courses in their yearly round, And neither is embittered by defeat; And while both light and darkness serve mankind Wilt thou not bear an equal in thy house?’[62] On examining the apologue of Prodicus, we find it characterised by a somewhat similar style of reasoning. There is, it is true, no reference to physical phenomena, but Virtue dwells strongly on the truth that nothing can be had for nothing, and that pleasure must either be purchased by toil or atoned for by languor, satiety, and premature decay. We know also that the Cynical school, as represented by Antisthenês, rejected all pleasure on the ground that it was always paid for by an equal amount of pain; and Heraclês, the Prodicean type of a youth who follows virtue in preference to vice disguised as happiness, was also the favourite hero of the Cynics. Again, Plato alludes, in the _Philêbus_, to certain thinkers, reputed to be ‘great on the subject of physics,’ who deny the very existence of pleasure. Critics have been at a loss to identify these persons, and rather reluctantly put up with the explanation that Antisthenês and his school are referred to. Antisthenês was a friend of Prodicus, and may at one time have shared in his scientific studies, thus giving occasion to the association touched on by Plato. But is it not equally possible that Prodicus left behind disciples who, like him, combined moral with physical teaching; and, going a little further, may we not conjecture that their opposition to Hedonism was inherited from the master himself, who, like the Stoics afterwards, may have based it on an application of physical reasoning to ethics? Still more important was the antithesis between Nature and convention, which, so far as we know, originated exclusively with Hippias. We have already observed that universality and necessity were, with the Greeks, standing marks of naturalness. The customs of different countries were, on the other hand, distinguished by extreme variety, amounting sometimes to diametrical opposition. Herodotus was fond of calling attention to such contrasts; only, he drew from them the conclusion that law, to be so arbitrary, must needs possess supreme and sacred authority. According to the more plausible interpretation of Hippias, the variety, and at least in Greek democracies, the changeability of law proved that it was neither sacred nor binding. He also looked on artificial social institutions as the sole cause of division and discord among mankind. Here we already see the dawn of a cosmopolitanism afterwards preached by Cynic and Stoic philosophers. Furthermore, to discover the natural rule of right, he compared the laws of different nations, and selected those which were held by all in common as the basis of an ethical system.[63] Now, this is precisely what was done by the Roman jurists long afterwards under the inspiration of Stoical teaching. We have it on the high authority of Sir Henry Maine that they identified the _Jus Gentium_, that is, the laws supposed to be observed by all nations alike, with the _Jus Naturale_, that is, the code by which men were governed in their primitive condition of innocence. It was by a gradual application of this ideal standard that the numerous inequalities between different classes of persons, enforced by ancient Roman law, were removed, and that contract was substituted for status. Above all, the abolition of slavery was, if not directly caused, at any rate powerfully aided, by the belief that it was against Nature. At the beginning of the fourteenth century we find Louis Hutin, King of France, assigning as a reason for the enfranchisement of his serfs, that, ‘according to natural law, everybody ought to be born free,’ and although Sir H. Maine holds this to have been a mistaken interpretation of the juridical axiom ‘omnes homines naturâ aequales sunt,’ which means not an ideal to be attained, but a primitive condition from which we have departed: nevertheless it very faithfully reproduces the theory of those Greek philosophers from whom the idea of a natural law was derived. That, in Aristotle’s time at least, a party existed who were opposed to slavery on theoretical grounds of right is perfectly evident from the language of the _Politics_. ‘Some persons,’ says Aristotle, ‘think that slave-holding is against nature, for that one man is a slave and another free by law, while by nature there is no difference between them, for which reason it is unjust as being the result of force.’[64] And he proceeds to prove the contrary at length. The same doctrine of natural equality led to important political consequences, having, again according to Sir H. Maine, contributed both to the American Declaration of Independence and to the French Revolution. There is one more aspect deserving our attention, under which the theory of Nature has been presented both in ancient and modern times. A dialogue which, whether rightly or wrongly attributed to Plato, may be taken as good evidence on the subject it relates to,[65] exhibits Hippias in the character of a universal genius, who can not only teach every science and practise every kind of literary composition, but has also manufactured all the clothes and other articles about his person. Here we have precisely the sort of versatility which characterises uncivilised society, and which believers in a state of nature love to encourage at all times. The division of labour, while it carries us ever farther from barbarism, makes us more dependent on each other. An Odysseus is master of many arts, a Themistocles of two, a Demosthenes of only one. A Norwegian peasant can do more for himself than an English countryman, and therefore makes a better colonist. If we must return to Nature, our first step should be to learn a number of trades, and so be better able to shift for ourselves. Such was the ideal of Hippias, and it was also the ideal of the eighteenth century. Its literature begins with _Robinson Crusoe_, the story of a man who is accidentally compelled to provide himself, during many years, with all the necessaries of life. Its educational manuals are, in France, Rousseau’s _Émile_; in England, Day’s _Sandford and Merton_, both teaching that the young should be thrown as much as possible on their own resources. One of its types is Diderot, who learns handicrafts that he may describe them in the _Encyclopédie_. Its two great spokesmen are Voltaire and Goethe, who, after cultivating every department of literature, take in statesmanship as well. And its last word is Schiller’s _Letters on Aesthetic Culture_, holding up totality of existence as the supreme ideal to be sought after. There is no reason to believe that Hippias used his distinction between Nature and convention as an argument for despotism. It would rather appear that, if anything, he and his school desired to establish a more complete equality among men. Others, however, both rhetoricians and practical statesmen, were not slow to draw an opposite conclusion. They saw that where no law was recognised, as between different nations, nothing but violence and the right of the stronger prevailed. It was once believed that aggressions which human law could not reach found no favour with the gods, and dread of the divine displeasure may have done something towards restraining them. But religion had partly been destroyed by the new culture, partly perverted into a sanction for wrong-doing. By what right, it was asked, did Zeus himself reign? Had he not unlawfully dethroned his father, Cronos, and did he not now hold power simply by virtue of superior strength? Similar reasonings were soon applied to the internal government of each state. It was alleged that the ablest citizens could lay claim to uncontrolled supremacy by a title older than any social fiction. Rules of right meant nothing but a permanent conspiracy of the weak to withdraw themselves from the legitimate dominion of their born master, and to bamboozle him into a voluntary surrender of his natural privileges. Sentiments bearing a superficial resemblance to these have occasionally found utterance among ourselves. Nevertheless, it would be most unjust to compare Carlyle and Mr. Froude with Critias and Calliclês. We believe that their preference of despotism to representative government is an entire mistake. But we know that with them as with us the good of the governed is the sole end desired. The gentlemen of Athens sought after supreme power only as a means for gratifying their worst passions without let or hindrance; and for that purpose they were ready to ally themselves with every foreign enemy in turn, or to flatter the caprices of the Dêmos, if that policy promised to answer equally well. The antisocial theories of these ‘young lions,’ as they were called by their enemies and sometimes by themselves also, do not seem to have been supported by any public teacher. If we are to believe Plato, Pôlus, a Sicilian rhetor, did indeed regard Archelaus, the abler Louis Napoleon of his time, with sympathy and envious admiration, but without attempting to justify the crimes of his hero by an appeal to natural law. The corruption of theoretical morality among the paid teachers took a more subtle form. Instead of opposing one principle to another, they held that all law had the same source, being an emanation from the will of the stronger, and exclusively designed to promote his interest. Justice, according to Thrasymachus in the _Republic_, is another’s good, which is true enough, and to practise it except under compulsion is foolish, which, whatever Grote may say, is a grossly immoral doctrine. V. We have seen how the idea of Nature, first evolved by physical philosophy, was taken by some, at least, among the Sophists as a basis for their ethical teaching; then how an interpretation utterly opposed to theirs was put on it by practical men, and how this second interpretation was so generalised by the younger rhetoricians as to involve the denial of all morality whatever. Meanwhile, another equally important conception, destined to come into speedy and prolonged antagonism with the idea of Nature, and like it to exercise a powerful influence on ethical reflection, had almost contemporaneously been elaborated out of the materials which earlier speculation supplied. From Parmenides and Heracleitus down, every philosopher who had propounded a theory of the world, had also more or less peremptorily insisted on the fact that his theory differed widely from common belief. Those who held that change is impossible, and those who taught that everything is incessantly changing; those who asserted the indestructibility of matter, and those who denied its continuity; those who took away objective reality from every quality except extension and resistance, and those who affirmed that the smallest molecules partook more or less of every attribute that is revealed to sense—all these, however much they might disagree among themselves, agreed in declaring that the received opinions of mankind were an utter delusion. Thus, a sharp distinction came to be drawn between the misleading sense-impressions and the objective reality to which thought alone could penetrate. It was by combining these two elements, sensation and thought, that the idea of mind was originally constituted. And mind when so understood could not well be accounted for by any of the materialistic hypotheses at first proposed. The senses must differ profoundly from that of which they give such an unfaithful report; while reason, which Anaxagoras had so carefully differentiated from every other form of existence, carried back its distinction to the subjective sphere, and became clothed with a new spirituality when reintegrated in the consciousness of man. The first result of this separation between man and the world was a complete breach with the old physical philosophy, shown, on the one hand, by an abandonment of speculative studies, on the other, by a substitution of convention for Nature as the recognised standard of right. Both consequences were drawn by Protagoras, the most eminent of the Sophists. We have now to consider more particularly what was his part in the great drama of which we are attempting to give an intelligible account. Protagoras was born about 480 B.C. He was a fellow-townsman of Democritus, and has been represented, though not on good authority, as a disciple of that illustrious thinker. It was rather by a study of Heracleitus that his philosophical opinions, so far as they were borrowed from others, seem to have been most decisively determined. In any case, practice, not theory, was the principal occupation of his life. He gave instruction for payment in the higher branches of a liberal education, and adopted the name of Sophist, which before had simply meant a wise man, as an honourable title for his new calling. Protagoras was a very popular teacher. The news of his arrival in a strange city excited immense enthusiasm, and he was followed from place to place by a band of eager disciples. At Athens he was honoured by the friendship of such men as Pericles and Euripides. It was at the house of the great tragic poet that he read out a work beginning with the ominous declaration, ‘I cannot tell whether the gods exist or not; life is too short for such difficult investigations.’[66] Athenian bigotry took alarm directly. The book containing this frank confession of agnosticism was publicly burned, all purchasers being compelled to give up the copies in their possession. The author himself was either banished or took flight, and perished by shipwreck on the way to Sicily before completing his seventieth year. The scepticism of Protagoras went beyond theology and extended to all science whatever. Such, at least, seems to have been the force of his celebrated declaration that ‘man is the measure of all things, both as regards their existence and their non-existence.’[67] According to Plato, this doctrine followed from the identification of knowledge with sensible perception, which in its turn was based on a modified form of the Heracleitean theory of a perpetual flux. The series of external changes which constitutes Nature, acting on the series of internal changes which constitutes each man’s personality, produces particular sensations, and these alone are the true reality. They vary with every variation in the factors, and therefore are not the same for separate individuals. Each man’s perceptions are true for himself, but for himself alone. Plato easily shows that such a theory of truth is at variance with ordinary opinion, and that if all opinions are true, it must necessarily stand self-condemned. We may also observe that if nothing can be known but sensation, nothing can be known of its conditions. It would, however, be unfair to convict Protagoras of talking nonsense on the unsupported authority of the _Theaetêtus_. Plato himself suggests that a better case might have been made out for the incriminated doctrine could its author have been heard in self-defence. We may conjecture that Protagoras did not distinguish very accurately between existence, knowledge, and applicability to practice. If we assume, what there seems good reason to believe, that in the great controversy of Nature _versus_ Law, Protagoras sided with the latter, his position will at once become clear. When the champions of Nature credited her with a stability and an authority greater than could be claimed for merely human arrangements, it was a judicious step to carry the war into their territory, and ask, on what foundation then does Nature herself stand? Is not she, too, perpetually changing, and do we not become acquainted with her entirely through our own feelings? Ought not those feelings to be taken as the ultimate standard in all questions of right and wrong? Individual opinion is a fact which must be reckoned with, but which can be changed by persuasion, not by appeals to something that we none of us know anything about. _Man_ is the measure of all things, not the will of gods whose very existence is uncertain, nor yet a purely hypothetical state of Nature. Human interests must take precedence of every other consideration. Hector meant nothing else when he preferred the obvious dictates of patriotism to inferences drawn from the flight of birds. We now understand why Protagoras, in the Platonic dialogue bearing his name, should glance scornfully at the method of instruction pursued by Hippias, with his lectures on astronomy, and why he prefers to discuss obscure passages in the poets. The quarrel between a classical and a scientific education was just then beginning, and Protagoras, as a Humanist, sided with the classics. Again, he does not think much of the ‘great and sane and noble race of brutes.’ He would not, like the Cynics, take them as examples of conduct. Man, he says, is naturally worse provided for than any animal; even the divine gift of wisdom would not save him from extinction without the priceless social virtues of justice and reverence, that is, the regard for public opinion which Mr. Darwin, too, has represented as the strongest moralising power in primitive society. And, as the possession of these qualities constituted the fundamental distinction between men and brutes, so also did the advantage of civilisation over barbarism rest on their superior development, a development due to the ethical instruction received by every citizen from his earliest infancy, reinforced through after-life by the sterner correction of legal punishments, and completed by the elimination of all individuals demonstrably unfitted for the social state. Protagoras had no sympathy with those who affect to prefer the simplicity of savages to the fancied corruption of civilisation. Hear how he answers the Rousseaus and Diderots of his time:— ‘I would have you consider that he who appears to you to be the worst of those who have been brought up in laws and humanities would appear to be a just man and a master of justice if he were to be compared with men who had no education, or courts of justice, or laws, or any restraints upon them which compelled them to practise virtue—with the savages, for example, whom the poet Pherecrates exhibited on the stage at the last year’s Lenaean festival. If you were living among men such as the man-haters in his chorus, you would be only too glad to meet with Eurybates and Phrynondas, and you would sorrowfully long to revisit the rascality of this part of the world.’[68] We find the same theory reproduced and enforced with weighty illustrations by the great historian of that age. It is not known whether Thucydides owed any part of his culture to Protagoras, but the introduction to his history breathes the same spirit as the observations which we have just transcribed. He, too, characterises antiquity as a scene of barbarism, isolation, and lawless violence, particularly remarking that piracy was not then counted a dishonourable profession. He points to the tribes outside Greece, together with the most backward among the Greeks themselves, as representing the low condition from which Athens and her sister states had only emerged within a comparatively recent period. And in the funeral oration which he puts into the mouth of Pericles, the legendary glories of Athens are passed over without the slightest allusion,[69] while exclusive prominence is given to her proud position as the intellectual centre of Greece. Evidently a radical change had taken place in men’s conceptions since Herodotus wrote. They were learning to despise the mythical glories of their ancestors, to exalt the present at the expense of the past, to fix their attention exclusively on immediate human interests, and, possibly, to anticipate the coming of a loftier civilisation than had as yet been seen. The evolution of Greek tragic poetry bears witness to the same transformation of taste. On comparing Sophocles with Aeschylus, we are struck by a change of tone analogous to that which distinguishes Thucydides from Herodotus. It has been shown in our first chapter how the elder dramatist delights in tracing events and institutions back to their first origin, and in following derivations through the steps of a genealogical sequence. Sophocles, on the other hand, limits himself to a close analysis of the action immediately represented, the motives by which his characters are influenced, and the arguments by which their conduct is justified or condemned. We have already touched on the very different attitude assumed towards religion by these two great poets. Here we have only to add that while Aeschylus fills his dramas with supernatural beings, and frequently restricts his mortal actors to the interpretation or execution of a divine mandate, Sophocles, representing the spirit of Greek Humanism, only once brings a god on the stage, and dwells exclusively on the emotions of pride, ambition, revenge, terror, pity, and affection, by which men and women of a lofty type are actuated. Again (and this is one of his poetic superiorities), Aeschylus has an open sense for the external world; his imagination ranges far and wide from land to land; his pages are filled with the fire and light, the music and movement of Nature in a Southern country. He leads before us in splendid procession the starry-kirtled night; the bright rulers that bring round winter and summer; the dazzling sunshine; the forked flashes of lightning; the roaring thunder; the white-winged snow-flakes; the rain descending on thirsty flowers; the sea now rippling with infinite laughter, now moaning on the shingle, growing hoary under rough blasts, with its eastern waves dashing against the new-risen sun, or, again, lulled to waveless, windless, noonday sleep; the volcano with its volleys of fire-breathing spray and fierce jaws of devouring lava; the eddying whorls of dust; the resistless mountain-torrent; the meadow-dews; the flowers of spring and fruits of summer; the evergreen olive, and trees that give leafy shelter from dogstar heat. For all this world of wonder and beauty Sophocles offers only a few meagre allusions to the phenomena presented by sunshine and storm. No poet has ever so entirely concentrated his attention on human deeds and human passions. Only the grove of Colônus, interwoven with his own earliest recollections, had power to draw from him, in extreme old age, a song such as the nightingale might have warbled amid those inviolable recesses where the ivy and laurel, the vine and olive gave a never-failing shelter against sun and wind alike. Yet even this leafy covert is but an image of the poet’s own imagination, undisturbed by outward influences, self-involved, self-protected, and self-sustained. Of course, we are only restating in different language what has long been known, that the epic element of poetry, before so prominent, was with Sophocles entirely displaced by the dramatic; but if Sophocles became the greatest dramatist of antiquity, it was precisely because no other writer could, like him, work out a catastrophe solely through the action of mind on mind, without any intervention of physical force; and if he possessed this faculty, it was because Greek thought as a whole had been turned inward; because he shared in the devotion to psychological studies equally exemplified by his younger contemporaries, Protagoras, Thucydides, and Socrates, all of whom might have taken for their motto the noble lines— ‘On earth there is nothing great but man, In man there is nothing great but mind.’ We have said that Protagoras was a partisan of Nomos, or convention, against Nature. That was the conservative side of his character. Still, Nomos was not with him what it had been with the older Greeks, an immutable tradition indistinguishable from physical law. It was a human creation, and represented the outcome of inherited experience, admitting always of change for the better. Hence the vast importance which he attributed to education. This, no doubt, was magnifying his own office, for the training of youth was his profession. But, unquestionably, the feelings of his more liberal contemporaries went with him. A generation before, Pindar had spoken scornfully of intellectual culture as a vain attempt to make up for the absence of genius which the gods alone could give. Yet Pindar himself was always careful to dwell on the services rendered by professional trainers to the victorious athletes whose praises he sang, and there was really no reason why genius and culture should be permanently dissociated. A Themistocles might decide offhand on the questions brought before him; a Pericles, dealing with much more complex interests, already needed a more careful preparation. On the other hand, conservatives like Aristophanes continued to oppose the spread of education with acrimonious zeal. Some of their arguments have a curiously familiar ring. Intellectual pursuits, they said, were bad for the health, led to irreligion and immorality, made young people quite unlike their grandfathers, and were somehow or other connected with loose company and a fast life. This last insinuation was in one respect the very reverse of true. So far as personal morality went, nothing could be better for it than the change introduced by Protagoras from amateur to paid teaching. Before this time, a Greek youth who wished for something better than the very elementary instruction given at school, could only attach himself to some older and wiser friend, whose conversation might be very improving, but who was pretty sure to introduce a sentimental element into their relationship equally discreditable to both.[70] A similar danger has always existed with regard to highly intelligent women, although it may have threatened a smaller number of individuals; and the efforts now being made to provide them with a systematic education under official superintendence will incidentally have the effect of saving our future Héloises and Julies from the tuition of an Abélard or a Saint-Preux. It was their habit of teaching rhetoric as an art which raised the fiercest storm of indignation against Protagoras and his colleagues. The endeavour to discover rules for addressing a tribunal or a popular assembly in the manner best calculated to win their assent had originated quite independently of any philosophical theory. On the re-establishment of order, that is to say of popular government, in Sicily, many lawsuits arose out of events which had happened years before; and, owing to the lapse of time, demonstrative evidence was not available. Accordingly, recourse was had on both sides to arguments possessing a greater or less degree of probability. The art of putting such probable inferences so as to produce persuasion demanded great technical skill; and two Sicilians, Corax and Tisias by name, composed treatises on the subject. It would appear that the new-born art was taken up by Protagoras and developed in the direction of increased dialectical subtlety. We are informed that he undertook to make the worse appear the better reason; and this very soon came to be popularly considered as an accomplishment taught by all philosophers, Socrates among the rest. But if Protagoras merely meant that he would teach the art of reasoning, one hardly sees how he could have expressed himself otherwise, consistently with the antithetical style of his age. We should say more simply that a case is strengthened by the ability to argue it properly. It has not been shown that the Protagorean dialectic offered exceptional facilities for maintaining unjust pretensions. Taken, however, in connexion with the humanistic teaching, it had an unsettling and sceptical tendency. All belief and all practice rested on law, and law was the result of a convention made among men and ultimately produced by individual conviction. What one man had done another could undo. Religious tradition and natural right, the sole external standards, had already disappeared. There remained the test of self-consistency, and against this all the subtlety of the new dialectic was turned. The triumph of Eristic was to show that a speaker had contradicted himself, no matter how his statements might be worded. Moreover, now that reference to an objective reality was disallowed, words were put in the place of things and treated like concrete realities. The next step was to tear them out of the grammatical construction, where alone they possessed any truth or meaning, each being simultaneously credited with all the uses which at any time it might be made to fulfil. For example, if a man knew one thing he knew all, for he had knowledge, and knowledge is of everything knowable. Much that seems to us tedious or superfluous in Aristotle’s expositions was intended as a safeguard against this endless cavilling. Finally, negation itself was eliminated along with the possibility of falsehood and contradiction. For it was argued that ‘nothing’ had no existence and could not be an object of thought.[71] VI. From utter confusion to extreme nihilism there was but a single step. This step was taken by Gorgias, the Sicilian rhetorician, who held the same relation towards western Hellas and the Eleatic school as that which Protagoras held towards eastern Hellas and the philosophy of Heracleitus. He, like his eminent contemporary, was opposed to the thinkers whom, borrowing a useful term from the nomenclature of the last century, we may call the Greek physiocrats. To confute them, he wrote a book with the significant title, _On Nature or Nothing_: maintaining, first, that nothing exists; secondly, that if anything exists, we cannot know it; thirdly, that if we know it, there is no possibility of communicating our knowledge to others. The first thesis was established by pushing the Eleatic arguments against movement and change a little further; the second by showing that thought and existence are different, or else everything that is thought of would exist; the third by establishing a similar incommensurability between words and sensations. Grote has attempted to show that Gorgias was only arguing against the existence of a noumenon underlying phenomena, such as all idealists deny. Zeller has, however, convincingly proved that Gorgias, in common with every other thinker before Plato, was ignorant of this distinction;[72] and we may add that it would leave the second and third theses absolutely unimpaired. We must take the whole together as constituting a declaration of war against science, an assertion, in still stronger language, of the agnosticism taught by Protagoras. The truth is, that a Greek controversialist generally overproved his case, and in order to overwhelm an adversary pulled down the whole house, even at the risk of being buried among the ruins himself. A modern reasoner, taking his cue from Gorgias, without pushing the matter to such an extreme, might carry on his attack on lines running parallel with those laid down by the Sicilian Sophist. He would begin by denying the existence of a ‘state of Nature’; for such a state must be either variable or constant. If it is constant, how could civilisation ever have arisen? If it is variable, what becomes of the fixed standard appealed to? Then, again, supposing such a state ever to have existed, how could authentic information about it have come down to us through the ages of corruption which are supposed to have intervened? And, lastly, granting that a state of Nature accessible to enquiry has ever existed, how can we reorganise society on the basis of such discordant data as are presented to us by the physiocrats, no two of whom agree with regard to the first principles of natural order; one saying that it is equality, another aristocracy, and a third despotism? We do not say that these arguments are conclusive, we only mean that in relation to modern thought they very fairly represent the dialectic artillery brought to bear by Greek humanism against its naturalistic opponents. We have seen how Prodicus and Hippias professed to teach all science, all literature, and all virtuous accomplishments. We have seen how Protagoras rejected every kind of knowledge unconnected with social culture. We now find Gorgias going a step further. In his later years, at least, he professes to teach nothing but rhetoric or the art of persuasion. We say in his later years, for at one time he seems to have taught ethics and psychology as well.[73] But the Gorgias of Plato’s famous dialogue limits himself to the power of producing persuasion by words on all possible subjects, even those of whose details he is ignorant. Wherever the rhetorician comes into competition with the professional he will beat him on his own ground, and will be preferred to him for every public office. The type is by no means extinct, and flourishes like a green bay-tree among ourselves. Like Pendennis, a writer of this kind will review any book from the height of superior knowledge acquired by two hours’ reading in the British Museum; or, if he is adroit enough, will dispense with even that slender amount of preparation. He need not even trouble himself to read the book which he criticises. A superficial acquaintance with magazine articles will qualify him to pass judgment on all life, all religion, and all philosophy. But it is in politics that the finest career lies before him. He rises to power by attacking the measures of real statesmen, and remains there by adopting them. He becomes Chancellor of the Exchequer by gross economical blundering, and Prime Minister by a happy mixture of epigram and adulation. Rhetoric conferred even greater power in old Athens than in modern England. Not only did mastery of expression lead to public employment; but also, as every citizen was permitted by law to address his assembled fellow-countrymen and propose measures for their acceptance, it became a direct passport to supreme political authority. Nor was this all. At Athens the employment of professional advocates was not allowed, and it was easy to prosecute an enemy on the most frivolous pretexts. If the defendant happened to be wealthy, and if condemnation involved a loss of property, there was a prejudice against him in the minds of the jury, confiscation being regarded as a convenient resource for replenishing the national exchequer. Thus the possession of rhetorical ability became a formidable weapon in the hands of unscrupulous citizens, who were enabled to extort large sums by the mere threat of putting rich men on their trial for some real or pretended offence. This systematic employment of rhetoric for purposes of self-aggrandisement bore much the same relation to the teaching of Protagoras and Gorgias as the open and violent seizure of supreme power on the plea of natural superiority bore to the theories of their rivals, being the way in which practical men applied the principle that truth is determined by persuasion. It was also attended by considerably less danger than a frank appeal to the right of the stronger, so far at least as the aristocratic party were concerned. For they had been taught a lesson not easily forgotten by the downfall of the oligarchies established in 411 and 404; and the second catastrophe especially proved that nothing but a popular government was possible in Athens. Accordingly, the nobles set themselves to study new methods for obtaining their ultimate end, which was always the possession of uncontrolled power over the lives and fortunes of their fellow-citizens. With wealth to purchase instruction from the Sophists, with leisure to practise oratory, and with the ability often accompanying high birth, there was no reason why the successors of Charmides and Critias should not enjoy all the pleasures of tyranny unaccompanied by any of its drawbacks. Here, again, a parallel suggests itself between ancient Greece and modern Europe. On the Continent, where theories of natural law are far more prevalent than with us, it is by brute force that justice is trampled down: the one great object of every ambitious intriguer is to possess himself of the military machine, his one great terror, that a stronger man may succeed in wresting it from him; in England the political adventurer looks to rhetoric as his only resource, and at the pinnacle of power has to dread the hailstorm of epigrammatic invective directed against him by abler or younger rivals.[74] Besides its influence on the formation and direction of political eloquence, the doctrine professed by Protagoras had a far-reaching effect on the subsequent development of thought. Just as Cynicism was evolved from the theory of Hippias, so also did the teaching which denied Nature and concentrated all study on subjective phenomena, with a tendency towards individualistic isolation, lead on to the system of Aristippus. The founder of the Cyrenaic school is called a Sophist by Aristotle, nor can the justice of the appellation be doubted. He was, it is true, a friend and companion of Socrates, but intellectually he is more nearly related to Protagoras. Aristippus rejected physical studies, reduced all knowledge to the consciousness of our own sensations, and made immediate gratification the end of life. Protagoras would have objected to the last principle, but it was only an extension of his own views, for all history proves that Hedonism is constantly associated with sensationalism. The theory that knowledge is built up out of feelings has an elective affinity for the theory that action is, or ought to be, determined in the last resort by the most prominent feelings, which are pleasure and pain. Both theories have since been strengthened by the introduction of a new and more ideal element into each. We have come to see that knowledge is constituted not by sensations alone, but by sensations grouped according to certain laws which seem to be inseparable from the existence of any consciousness whatever. And, similarly, we have learned to take into account, not merely the momentary enjoyments of an individual, but his whole life’s happiness as well, and not his happiness only, but also that of the whole community to which he belongs. Nevertheless, in both cases it is rightly held that the element of feeling preponderates, and the doctrines of such thinkers as J. S. Mill are legitimately traceable through Epicurus and Aristippus to Protagoras as their first originator. Notwithstanding the importance of this impulse, it does not represent the whole effect produced by Protagoras on philosophy. His eristic method was taken up by the Megaric school, and at first combined with other elements borrowed from Parmenides and Socrates, but ultimately extricated from them and used as a critical solvent of all dogmatism by the later Sceptics. From their writings, after a long interval of enforced silence, it passed over to Montaigne, Bayle, Hume, and Kant, with what redoubtable consequences to received opinions need not here be specified. Our object is simply to illustrate the continuity of thought, and the powerful influence exercised by ancient Greece on its subsequent development. Every variety of opinion current among the Sophists reduces itself, in the last analysis, to their fundamental antithesis between Nature and Law, the latter being somewhat ambiguously conceived by its supporters as either human reason or human will, or more generally as both together, combining to assert their self-dependence and emancipation from external authority. This antithesis was prefigured in the distinction between Chthonian and Olympian divinities. Continuing afterwards to inspire the rivalry of opposing schools, Cynic against Cyrenaic, Stoic against Epicurean, Sceptic against Dogmatist, it was but partially overcome by the mediatorial schemes of Socrates and his successors. Then came Catholicism, equally adverse to the pretensions of either party, and held them down under its suffocating pressure for more than a thousand years. ‘Natur und Geist, so spricht man nicht zu Christen, Darum verbrennt man Atheisten; Natur ist Sünde, Geist ist Teufel.’ Both slowly struggled back into consciousness in the fitful dreams of mediaeval sleep. Nature was represented by astrology with its fatalistic predetermination of events; idealism by the alchemical lore which was to give its possessor eternal youth and inexhaustible wealth. With the complete revival of classic literature and the temporary neutralisation of theology by internal discord, both sprang up again in glorious life, and produced the great art of the sixteenth century, the great science and philosophy of the seventeenth. Later on, becoming self-conscious, they divide, and their partisans draw off into two opposing armies, Rousseau against Voltaire, Herder against Kant, Goethe against Schiller, Hume against himself. Together they bring about the Revolution; but after marching hand in hand to the destruction of all existing institutions they again part company, and, putting on the frippery of a dead faith, confront one another, each with its own ritual, its own acolytes, its own intolerance, with feasts of Nature and goddesses of Reason, in mutual and murderous hostility. When the storm subsided, new lines of demarcation were laid down, and the cause of political liberty was dissociated from what seemed to be thoroughly discredited figments. Nevertheless, imaginative literature still preserves traces of the old conflict, and on examining the four greatest English novelists of the last fifty years we shall find that Dickens and Charlotte Bronté, though personally most unlike, agree in representing the arbitrary, subjective, ideal side of life, the subjugation of things to self, not of self to things; he transfiguring them in the light of humour, fancy, sentiment; she transforming them by the alchemy of inward passion; while Thackeray and George Eliot represent the triumph of natural forces over rebellious individualities; the one writer depicting an often crude reality at odds with convention and conceit; while the other, possessing, if not an intrinsically greater genius, at least a higher philosophical culture, discloses to us the primordial necessities of existence, the pitiless conformations of circumstance, before which egoism, ignorance, illusion, and indecision must bow, or be crushed to pieces if they resist. VII. Our readers have now before them everything of importance that is known about the Sophists, and something more that is not known for certain, but may, we think, be reasonably conjectured. Taking the whole class together, they represent a combination of three distinct tendencies, the endeavour to supply an encyclopaedic training for youth, the cultivation of political rhetoric as a special art, and the search after a scientific foundation for ethics derived from the results of previous philosophy. With regard to the last point, they agree in drawing a fundamental distinction between Nature and Law, but some take one and some the other for their guide. The partisans of Nature lean to the side of a more comprehensive education, while their opponents tend more and more to lay an exclusive stress on oratorical proficiency. Both schools are at last infected by the moral corruption of the day, natural right becoming identified with the interest of the stronger, and humanism leading to the denial of objective reality, the substitution of illusion for knowledge, and the confusion of momentary gratification with moral good. The dialectical habit of considering every question under contradictory aspects degenerates into eristic prize-fighting and deliberate disregard of the conditions which alone make argument possible. Finally, the component elements of Sophisticism are dissociated from one another, and are either separately developed or pass over into new combinations. Rhetoric, apart from speculation, absorbs the whole time and talent of an Isocrates; general culture is imparted by a professorial class without originality, but without reproach; naturalism and sensuous idealism are worked up into systematic completion for the sake of their philosophical interest alone; and the name of sophistry is unhappily fastened by Aristotle on paid exhibitions of verbal wrangling which the great Sophists would have regarded with indignation and disgust. It remains for us to glance at the controversy which has long been carried on respecting the true position of the Sophists in Greek life and thought. We have already alluded to the by no means favourable judgment passed on them by some among their contemporaries. Socrates condemned them severely,[H] but only because they received payment for their lessons; and the sentiment was probably echoed by many who had neither his disinterestedness nor his frugality. To make profit by intellectual work was not unusual in Greece. Pheidias sold his statues; Pindar spent his life writing for money; Simonides and Sophocles were charged with showing too great eagerness in the pursuit of gain.[75] But a man’s conversation with his friends had always been gratuitous, and the novel idea of charging a high fee for it excited considerable offence. Socrates called it prostitution—the sale of that which should be the free gift of love—without perhaps sufficiently considering that the same privilege had formerly been purchased with a more dishonourable price. He also considered that a freeman was degraded by placing himself at the beck and call of another, although it would appear that the Sophists chose their own time for lecturing, and were certainly not more slaves than a sculptor or poet who had received an order to execute. It was also argued that any one who really succeeded in improving the community benefited so much by the result that it was unfair on his part to demand any additional remuneration. Suppose a popular preacher were to come over from New York to England, star about among the principal cities, charging a high price for admission to his sermons, and finally return home in possession of a handsome fortune, we can well imagine that sarcasms at the expense of such profitable piety would not be wanting. This hypothetical case will help us to understand how many an honest Athenian must have felt towards the showy colonial strangers who were making such a lucrative business of teaching moderation and justice. Plato, speaking for his master but not from his master’s standpoint, raised an entirely different objection. He saw no reason why the Sophists should not sell their wisdom if they had any wisdom to sell. But this was precisely what he denied. He submitted their pretensions to a searching cross-examination, and, as he considered, convicted them of being worthless pretenders. There was a certain unfairness about this method, for neither his own positive teaching nor that of Socrates could have stood before a similar test, as Aristotle speedily demonstrated in the next generation. He was, in fact, only doing for Protagoras and Gorgias what they had done for early Greek speculation, and what every school habitually does for its predecessors. It had yet to be learned that this dissolving dialectic constitutes the very law of philosophical progress. The discovery was made by Hegel, and it is to him that the Sophists owe their rehabilitation in modern times. His lectures on the History of Philosophy contain much that was afterwards urged by Grote on the same side. Five years before the appearance of Grote’s famous sixty-seventh chapter, Lewes had also published a vindication of the Sophists, possibly suggested by Hegel’s work, which he had certainly consulted when preparing his own History. There is, however, this great difference, that while the two English critics endeavour to minimise the sceptical, innovating tendency of the Sophists, it is, contrariwise, brought into exaggerated prominence by the German philosopher. We have just remarked that the final dissolution of Sophisticism was brought about by the separate development given to each of the various tendencies which it temporarily combined. Now, each of our three apologists has taken up one of these tendencies, and treated it as constituting the whole movement under discussion. To Hegel, the Sophists are chiefly subjective idealists. To Lewes, they are rhetoricians like Isocrates. To Grote, they are, what in truth the Sophists of the Roman empire were, teachers representing the standard opinions of their age. Lewes and Grote are both particularly anxious to prove that the original Sophists did not corrupt Greek morality. Thus much has been conceded by contemporary German criticism, and is no more than was observed by Plato long ago. Grote further asserts that the implied corruption of morality is an illusion, and that at the end of the Peloponnesian war the Athenians were no worse than their forefathers who fought at Marathon. His opinion is shared by so accomplished a scholar as Prof. Jowett;[76] but here he has the combined authority of Thucydides, Aristophanes, and Plato against him. We have, however, examined this question already, and need not return to it. Whether any of the Sophists themselves can be proved to have taught immoral doctrines is another moot point. Grote defends them all, Polus and Thrasymachus included. Here, also, we have expressed our dissent from the eminent historian, whom we can only suppose to have missed the whole point of Plato’s argument. Lewes takes different ground when he accuses Plato of misrepresenting his opponents. It is true that the Sophists cannot be heard in self-defence, but there is no internal improbability about the charges brought against them. The Greek rhetoricians are not accused of saying anything that has not been said again and again by their modern representatives. Whether the odium of such sentiments should attach itself to the whole class of Sophists is quite another question. Grote denies that they held any doctrine in common. The German critics, on the other hand, insist on treating them as a school with common principles and tendencies. Brandis calls them ‘a number of men, gifted indeed, but not seekers after knowledge for its own sake, who made a trade of giving instruction as a means for the attainment of external and selfish ends, and of substituting mere technical proficiency for real science.’[77] If our account be the true one, this would apply to Gorgias and the younger rhetoricians alone. One does not precisely see what external or selfish ends were subserved by the physical philosophy which Prodicus and Hippias taught, nor why the comprehensive enquiries of Protagoras into the conditions of civilisation and the limits of human knowledge should be contemptuously flung aside because he made them the basis of an honourable profession. Zeller, in much the same strain, defines a Sophist as one who professes to be a teacher of wisdom, while his object is individual culture (die formelle und praktische Bildung des Subjekts) and not the scientific investigation of truth.[78] We do not know whether Grote was content with an explanation which would only have required an unimportant modification of his own statements to agree precisely with them. It ought amply to have satisfied Lewes. For ourselves, we must confess to caring very little whether the Sophists investigated truth for its own sake or as a means to self-culture. We believe, and in the next chapter we hope to show, that Socrates, at any rate, did not treat knowledge apart from practice as an end in itself. But the history of philosophy is not concerned with such subtleties as these. Our contention is that the Stoic, Epicurean, and Sceptical schools may be traced back through Antisthenes and Aristippus to Hippias and Protagoras much more directly than to Socrates. If Zeller will grant this, then he can no longer treat Sophisticism as a mere solvent of the old physical philosophy. If he denies it, we can only appeal to his own history, which here, as well as in our discussions of early Greek thought, we have found more useful than any other work on the subject. Our obligations to Grote are of a more general character. We have learned from him to look at the Sophists without prejudice. But we think that he, too, underrates their far-reaching intellectual significance, while his defence of their moral orthodoxy seems, so far as certain members of the class are concerned, inconsistent with any belief in Plato’s historical fidelity. That the most eminent Sophists did nothing to corrupt Greek morality is now almost universally admitted. If we have succeeded in showing that they did not corrupt but fruitfully develop Greek philosophy, the purpose of this study will have been sufficiently fulfilled. The title of this chapter may have seemed to promise more than a casual mention of the thinker in whom Greek Humanism attained its loftiest and purest expression. But in history, no less than in life, Socrates must ever stand apart from the Sophists. Beyond and above all specialities of teaching, the transcendent dignity of a character which personified philosophy itself demands a separate treatment. Readers who have followed us thus far may feel interested in an attempt to throw some new light on one who was a riddle to his contemporaries, and has remained a riddle to after-ages. FOOTNOTES: [43] ‘Thou shalt not take that which is mine, and may I do to others as I would that they should do to me’ (Plato, _Legg._, 913, A. Jowett’s Transl., vol. V., p. 483). Isocrates makes a king addressing his governors say: ‘You should be to others what you think I should be to you’ (_Nicocles_, 49). And again: ‘Do not to others what it makes you angry to suffer yourselves’ (_Ibid._, 61). A similar observation is attributed to Thales, doubtless by an anachronism (Diogenes Laertius, I., i., 36). [44] We gladly avail ourselves of the masterly translation given by Prof. Jebb. The whole of this splendid passage will be found in his _Attic Orators_, vol. II., pp. 78-79. [45] _Symposium_, 211, C; Jowett’s Transl., vol. II. [46] Aesch., _Sep. con. Theb._, 592. [47] _Legg._, 727, E; Jowett’s Transl., V, 299. [48] See Plato’s _Charmides_; and Euripides’ _Medea_, 635 (Dindorf). [49] Pindar uses καιρός and μέτρον as synonymous terms. [50] _Opp. et D._, 271. [51] Hom. _Il._, IV., 160, 235; VII., 76, 411; XVI., 386. Hes., _Opp. et D._, 265. These references are copied from Welcker, _Griechische Götterlehre_, I., p. 178, q. v. [52] See Maine’s _Ancient Law_, chap. X., _The Early History of Delict and Crime_. [53] Preller, _Griechische Mythologie_, I., p. 523 (3rd ed.), with which cf. Welcker, _op. cit._, I., 234; and Mr. Walter Pater’s _Demeter and Persephone_, and _A Study of Dionysus_, in the _Fortnightly Review_ for Jan., Feb., and Dec. 1876. From their popular character, the country gods were favoured by the despots (Curtius, _Gr. Gesch._, I., p. 338). [54] Cf. Wordsworth— ‘Thou dost preserve the stars from wrong, And the most ancient heavens through thee are fresh and strong.’ _Ode to Duty._ [55] Pindar, _Olymp._, II., 57 ff.; and _Fragm._, 1-4 (Donaldson). [56] _Sep. con. Theb._, 662-71. [57] _Phoenissae_, 503-23. [58] Οὐ γὰρ ἄλλῳ γ’ ὑπακούσαιμεν τῶν νῦν μετεωροσοφιστῶν πλὴν ἢ Προδίκῳ, τῷ μὲν σοφίας καὶ γνώμης οὕνεκα κ.τ.λ.— _Nub._, 361-2. Cf. _Av._, 692. [59] Plato, _Protagoras_, 337, D; Jowett’s Transl., vol. I., p. 152. [60] _Nem._, VI., _sub. in._ [61] _Prom._, 518. [62] _Phoenissae_, 536-47. There is a delicious parody of this method in the _Clouds_. A creditor asks Strepsiades, who has been taking lessons in philosophy, to pay him the interest on a loan. Strepsiades begs to know whether the sea is any fuller now than it used to be. ‘No,’ replies the other, ‘for it would not be just,’ (οὐ γὰρ δίκαιον πλείον εἶναι). ‘Then, you wretch,’ rejoins his debtor, ‘do you suppose that the sea is not to get any fuller although all the rivers are flowing into it, and that your money is to go on increasing?’ (1290-95.) [63] Xenophon, _Memor._, IV., iv., 19. [64] _Pol._, I., ii. [65] The _Hippias Minor_. [66] Diog. L., IX., viii., 54. [67] Diog. L., IX., viii., 51. [68] Plato, _Protagoras_, 327; Jowett’s Transl., vol. I., p. 140. On the superior morality which accompanies advancing civilisation, as evinced by the great increase of mutual trust, see Maine’s _Ancient Law_, pp. 306-7. [69] This point is noticed by Zeller, _Ph. d. Gr._, II., 22. [70] This phase of Greek life is well illustrated by the addresses of Theognis to Cyrnus. [71] Eristicism had also points of contact with the philosophies of Parmenides and Socrates which will be indicated in a future chapter. [72] _Ph. d. Gr._, I., 903 (3rd ed.). [73] See Plato’s _Meno_, _sub. in._ [74] Lord Beaconsfield recently [written in February 1880] spoke of the Balkans as forming an ‘intelligible’ frontier for Turkey. Continental telegrams substituted ‘natural frontier.’ The change was characteristic and significant. [75] Aristoph., _Pax_, 697. [76] ‘As Mr. Grote remarks, there is no reason to suspect any greater moral corruption in the age of Demosthenes than in the age of Pericles.’ (_The Dialogues of Plato_, vol. IV., p. 380.) We do not remember that Grote commits himself to such a sweeping statement, nor was it necessary for his purpose to do so. No one would have been more surprised than Demosthenes himself to hear that the Athenians of his generation equalled the contemporaries of Pericles in public virtue. (Cf. Grote’s _Plato_, II., 148.) [77] _Geschichte der Entwickelung der Griechischen Philosophie_, I., p. 204. [78] _Philosophie d. Gr._, I., p. 943 (3rd ed.). [79] The invention of memoir-writing is claimed by Prof. Mahaffy (_Hist. Gr. Lit._, II., 42) for Ion of Chios and his contemporary Stesimbrotus. But—apart from their questionable authenticity—the sketches attributed to these two writers do not seem to have aimed at presenting a complete picture of a single individual, which is what was attempted with considerable success in Xenophon’s _Memorabilia_. CHAPTER III. THE PLACE OF SOCRATES IN GREEK PHILOSOPHY. I. Apart from legendary reputations, there is no name in the world’s history more famous than that of Socrates, and in the history of philosophy there is none so famous. The only thinker that approaches him in celebrity is his own disciple Plato. Every one who has heard of Greece or Athens has heard of him. Every one who has heard of him knows that he was supremely good and great. Each successive generation has confirmed the reputed Delphic oracle that no man was wiser than Socrates. He, with one or two others, alone came near to realising the ideal of a Stoic sage. Christians deem it no irreverence to compare him with the Founder of their religion. If a few dissentient voices have broken the general unanimity, they have, whether consciously or not, been inspired by the Socratic principle that we should let no opinion pass unquestioned and unproved. Furthermore, it so happens that this wonderful figure is known even to the multitude by sight as well as by name. Busts, cameos, and engravings have made all familiar with the Silenus-like physiognomy, the thick lips, upturned nose, and prominent eyes which impressed themselves so strangely on the imagination of a race who are accused of having cared for nothing but physical beauty, because they rightly regarded it as the natural accompaniment of moral loveliness. Those who wish to discover what manner of mind lay hid beneath this uninviting exterior may easily satisfy their curiosity, for Socrates is personally better known than any other character of antiquity. Dr. Johnson himself is not a more familiar figure to the student of literature. Alone among classical worthies his table-talk has been preserved for us, and the art of memoir-writing seems to have been expressly created for his behoof.[79] We can follow him into all sorts of company and test his behaviour in every variety of circumstances. He conversed with all classes and on all subjects of human interest, with artisans, artists, generals, statesmen, professors, and professional beauties. We meet him in the armourer’s workshop, in the sculptor’s studio, in the boudoirs of the _demi-monde_, in the banqueting-halls of flower-crowned and wine-flushed Athenian youth, combining the self-mastery of an Antisthenes with the plastic grace of an Aristippus; or, in graver moments, cheering his comrades during the disastrous retreat from Delium; upholding the sanctity of law, as President of the Assembly, against a delirious populace; confronting with invincible irony the oligarchic terrorists who held life and death in their hands; pleading not for himself, but for reason and justice, before a stupid and bigoted tribunal; and, in the last sad scene of all, exchanging Attic courtesies with the unwilling instrument of his death.[80] Such a character would, in any case, be remarkable; it becomes of extraordinary, or rather of unique, interest when we consider that Socrates could be and do so much, not in spite of being a philosopher, but because he was a philosopher, the chief though not the sole originator of a vast intellectual revolution; one who, as a teacher, constituted the supremacy of reason, and as an individual made reason his sole guide in life. He at once discovered new principles, popularised them for the benefit of others, and exemplified them in his own conduct; but he did not accomplish these results separately; they were only different aspects of the same systematising process which is identical with philosophy itself. Yet the very success of Socrates in harmonising life and thought makes it the more difficult for us to construct a complete picture of his personality. Different observers have selected from the complex combination that which best suited their own mental predisposition, pushing out of sight the other elements which, with him, served to correct and complete it. The very popularity that has attached itself to his name is a proof of this; for the multitude can seldom appreciate more than one excellence at a time, nor is that usually of the highest order. Hegel complains that Socrates has been made the patron-saint of moral twaddle.[81] We are fifty years further removed than Hegel from the golden age of platitude; the twaddle of our own time is half cynical, half aesthetic, and wholly unmoral; yet there are no signs of diminution in the popular favour with which Socrates has always been regarded. The man of the world, the wit, the _viveur_, the enthusiastic admirer of youthful beauty, the scornful critic of democracy is welcome to many who have no taste for ethical discourses and fine-spun arguments. Nor is it only the personality of Socrates that has been so variously conceived; his philosophy, so far as it can be separated from his life, has equally given occasion to conflicting interpretations, and it has even been denied that he had, properly speaking, any philosophy at all. These divergent presentations of his teaching, if teaching it can be called, begin with the two disciples to whom our knowledge of it is almost entirely due. There is, curiously enough, much the same inner discrepancy between Xenophon’s _Memorabilia_ and those Platonic dialogues where Socrates is the principal spokesman, as that which distinguishes the Synoptic from the Johannine Gospels. The one gives us a report certainly authentic, but probably incomplete; the other account is, beyond all doubt, a highly idealised portraiture, but seems to contain some traits directly copied from the original, which may well have escaped a less philosophical observer than Plato. Aristotle also furnishes us with some scanty notices which are of use in deciding between the two rival versions, although we cannot be sure that he had access to any better sources of information than are open to ourselves. By variously combining and reasoning from these data modern critics have produced a third Socrates, who is often little more than the embodiment of their own favourite opinions. In England, the most generally accepted method seems to be that followed by Grote. This consists in taking the Platonic _Apologia_ as a sufficiently faithful report of the defence actually made by Socrates on his trial, and piecing it on to the details supplied by Xenophon, or at least to as many of them as can be made to fit, without too obvious an accommodation of their meaning. If, however, we ask on what grounds a greater historical credibility is attributed to the _Apologia_ than to the _Republic_ or the _Phaedo_, none can be offered except the seemingly transparent truthfulness of the narrative itself, an argument which will not weigh much with those who remember how brilliant was Plato’s talent for fiction, and how unscrupulously it could be employed for purposes of edification. The _Phaedo_ puts an autobiographical statement into the mouth of Socrates which we only know to be imaginary because it involves the acceptance of a theory unknown to the real Socrates. Why, then, may not Plato have thought proper to introduce equally fictitious details into the speech delivered by his master before the dicastery, if, indeed, the speech, as we have it, be not a fancy composition from beginning to end? Before we can come to a decision on this point it will be necessary briefly to recapitulate the statements in question. Socrates is defending himself against a capital charge. He fears that a prejudice respecting him may exist in the minds of the jury, and tries to explain how it arose without any fault of his, as follows:—A certain friend of his had asked the oracle at Delphi whether there was any man wiser than Socrates? The answer was that no man was wiser. Not being conscious of possessing any wisdom, great or small, he felt considerably surprised on hearing of this declaration, and thought to convince the god of falsehood by finding out some one wiser than himself. He first went to an eminent politician, who, however, proved, on examination, to be utterly ignorant, with the further disadvantage that it was impossible to convince him of his ignorance. On applying the same test to others a precisely similar result was obtained. It was only the handicraftsmen who could give a satisfactory account of themselves, and their knowledge of one trade made them fancy that they understood everything else equally well. Thus the meaning of the oracle was shown to be that God alone is truly wise, and that of all men he is wisest who, like Socrates, perceives that human wisdom is worth little or nothing. Ever since then, Socrates has made it his business to vindicate the divine veracity by seeking out and exposing every pretender to knowledge that he can find, a line of conduct which has made him extremely unpopular in Athens, while it has also won him a great reputation for wisdom, as people supposed that the matters on which he convicted others of ignorance were perfectly clear to himself. The first difficulty that strikes one in connexion with this extraordinary story arises out of the oracle on which it all hinges. Had such a declaration been really made by the Pythia, would not Xenophon have eagerly quoted it as a proof of the high favour in which his hero stood with the gods?[82] And how could Socrates have acquired so great a reputation before entering on the cross-examining career which alone made him conscious of any superiority over other men, and had alone won the admiration of his fellow-citizens? Our doubts are still further strengthened when we find that the historical Socrates did not by any means profess the sweeping scepticism attributed to him by Plato. So far from believing that ignorance was the common and necessary lot of all mankind, himself included, he held that action should, so far as possible, be entirely guided by knowledge;[83] that the man who did not always know what he was about resembled a slave; that the various virtues were only different forms of knowledge; that he himself possessed this knowledge, and was perfectly competent to share it with his friends. We do, indeed, find him very ready to convince ignorant and presumptuous persons of their deficiencies, but only that he may lead them, if well disposed, into the path of right understanding. He also thought that there were certain secrets which would remain for ever inaccessible to the human intellect, facts connected with the structure of the universe which the gods had reserved for their own exclusive cognisance. This, however, was, according to him, a kind of knowledge which, even if it could be obtained, would not be particularly worth having, and the search after which would leave us no leisure for more useful acquisitions. Nor does the Platonic Socrates seem to have been at the trouble of arguing against natural science. The subjects of his elenchus are the professors of such arts as politics, rhetoric, and poetry. Further, we have something stronger than a simple inference from the facts recorded by Xenophon; we have his express testimony to the fact that Socrates did not limit himself to confuting people who fancied they knew everything; here we must either have a direct reference to the _Apologia_, or to a theory identical with that which it embodies.[I] Some stress has been laid on a phrase quoted by Xenophon himself as having been used by Hippias, which at first sight seems to support Plato’s view. The Elian Sophist charges Socrates with practising a continual irony, refuting others and not submitting to be questioned himself;[84] an accusation which, we may observe in passing, is not borne out by the discussion that subsequently takes place between them. Here, however, we must remember that Socrates used to convey instruction under the form of a series of leading questions, the answers to which showed that his interlocutor understood and assented to the doctrine propounded. Such a method might easily give rise to the misconception that he refused to disclose his own particular opinions, and contented himself with eliciting those held by others. Finally, it is to be noted that the idea of fulfilling a religious mission, or exposing human ignorance _ad majorem Dei gloriam_, on which Grote lays such stress, has no place in Xenophon’s conception of his master, although, had such an idea been really present, one can hardly imagine how it could have been passed over by a writer with whom piety amounted to superstition. It is, on the other hand, an idea which would naturally occur to a great religious reformer who proposed to base his reconstruction of society on faith in a supernatural order, and the desire to realise it here below. So far we have contrasted the _Apologia_ with the _Memorabilia_. We have now to consider in what relation it stands to Plato’s other writings. The constructive dogmatic Socrates, who is a principal spokesman in some of them, differs widely from the sceptical Socrates of the famous _Defence_, and the difference has been urged as an argument for the historical authenticity of the latter.[85] Plato, it is implied, would not have departed so far from his usual conception of the sage, had he not been desirous of reproducing the actual words spoken on so solemn an occasion. There are, however, several dialogues which seem to have been composed for the express purpose of illustrating the negative method supposed to have been described by Socrates to his judges, investigations the sole result of which is to upset the theories of other thinkers, or to show that ordinary men act without being able to assign a reason for their conduct. Even the _Republic_ is professedly tentative in its procedure, and only follows out a train of thought which has presented itself almost by accident to the company. Unlike Charles Lamb’s Scotchman, the leading spokesman does not bring, but find, and you are invited to cry halves to whatever turns up in his company. Plato had, in truth, a conception of science which no knowledge then attained—perhaps one may add, no knowledge ever attainable—could completely satisfy. Even the rigour of mathematical demonstration did not content him, for mathematical truth itself rested on unproved assumptions, as we also, by the way, have lately discovered. Perhaps the Hegelian system would have fulfilled his requirements; perhaps not even that. Moreover, that the new order which he contemplated might be established, it was necessary to begin by making a clean sweep of all existing opinions. With the urbanity of an Athenian, the piety of a disciple, and the instinct of a great dramatic artist, he preferred to assume that this indispensable task had already been done by another. And of all preceding thinkers, who was so well qualified for the undertaking as Socrates? Who else had wielded the weapons of negative dialectic with such consummate dexterity? Who had assumed such a critical attitude towards the beliefs of his contemporaries? Who had been so anxious to find a point of attachment for every new truth in the minds of his interlocutors? Who therefore could, with such plausibility, be put forward in the guise of one who laid claim to no wisdom on his own account? The son of Phaenaretê seemed made to be the Baptist of a Greek Messiah; but Plato, in treating him as such, has drawn a discreet veil over the whole positive side of his predecessor’s teaching, and to discover what this was we must place ourselves under the guidance of Xenophon’s more faithful report. Not that Xenophon is to be taken as a perfectly accurate exponent of the Socratic philosophy. His work, it must be remembered, was primarily intended to vindicate Socrates from a charge of impiety and immoral teaching, not to expound a system which he was perhaps incompetent to appreciate or understand. We are bound to accept everything that he relates; we are bound to include nothing that he does not relate; but we may fairly readjust the proportions of his sketch. It is here that a judicious use of Plato will furnish us with the most valuable assistance. He grasped Socratism in all its parts and developed it in all directions, so that by following back the lines of his system to their origin we shall be put on the proper track and shall know where to look for the suggestions which were destined to be so magnificently worked out.[86] II. Before entering on our task of reconstruction, we must turn aside to consider with what success the same enterprise has been attempted by modern German criticism, especially by its chief contemporary representative, the last and most distinguished historian of Greek philosophy. The result at which Zeller, following Schleiermacher, arrives is that the great achievement of Socrates was to put forward an adequate idea of knowledge; in other words, to show what true science ought to be, and what, as yet, it had never been, with the addition of a demand that all action should be based on such a scientific knowledge as its only sure foundation.[87] To know a thing was to know its essence, its concept, the assemblage of qualities which together constitute its definition, and make it to be what it is. Former thinkers had also sought for knowledge, but not _as_ knowledge, not with a clear notion of what it was that they really wanted. Socrates, on the other hand, required that men should always be prepared to give a strict account of the end which they had in view, and of the means by which they hoped to gain it. Further, it had been customary to single out for exclusive attention that quality of an object by which the observer happened to be most strongly impressed, passing over all the others; the consequence of which was that the philosophers had taken a one-sided view of facts, with the result of falling into hopeless disagreement among themselves; the Sophists had turned these contradictory points of view against one another, and thus effected their mutual destruction; while the dissolution of objective certainty had led to a corresponding dissolution of moral truth. Socrates accepts the Sophistic scepticism so far as it applies to the existing state of science, but does not push it to the same fatal conclusion; he grants that current beliefs should be thoroughly sifted and, if necessary, discarded, but only that more solid convictions may be substituted for them. Here a place is found for his method of self-examination, and for the self-conscious ignorance attributed to him by Plato. Comparing his notions on particular subjects with his idea of what knowledge in general ought to be, he finds that they do not satisfy it; he knows that he knows nothing. He then has recourse to other men who declare that they possess the knowledge of which he is in search, but their pretended certainty vanishes under the application of his dialectic test. This is the famous Socratic irony. Finally, he attempts to come at real knowledge, that is to say, the construction of definitions, by employing that inductive method with the invention of which he is credited by Aristotle. This method consists in bringing together a number of simple and familiar examples from common experience, generalising from them, and correcting the generalisations by comparison with negative instances. The reasons that led Socrates to restrict his enquiries to human interests are rather lightly passed over by Zeller; he seems at a loss how to reconcile the alleged reform of scientific method with the complete abandonment of those physical investigations which, we are told, had suffered so severely from being cultivated on a different system. There seem to be three principal points aimed at in the very ingenious theory which we have endeavoured to summarise as adequately as space would permit. Zeller apparently wishes to bring Socrates into line with the great tradition of early Greek thought, to distinguish him markedly from the Sophists, and to trace back to his initiative the intellectual method of Plato and Aristotle. We cannot admit that the threefold attempt has succeeded. It seems to us that a picture into which so much Platonic colouring has been thrown would for that reason alone, and without any further objection, be open to very grave suspicion. But even accepting the historical accuracy of everything that Plato has said, or of as much as may be required, our critic’s inferences are not justified by his authorities. Neither the Xenophontic nor the Platonic Socrates seeks knowledge for its own sake, nor does either of them offer a satisfactory definition of knowledge, or, indeed, any definition at all. Aristotle was the first to explain what science meant, and he did so, not by developing the Socratic notion, but by incorporating it with the other methods independently struck out by physical philosophy. What would science be without the study of causation? and was not this ostentatiously neglected by the founder of conceptualism? Again, Plato, in the _Theaetêtus_, makes his Socrates criticise various theories of knowledge, but does not even hint that the critic had himself a better theory than any of them in reserve. The author of the _Phaedo_ and the _Republic_ was less interested in reforming the methods of scientific investigation than in directing research towards that which he believed to be alone worth knowing, the eternal ideas which underlie phenomena. The historical Socrates had no suspicion of transcendental realities; but he thought that a knowledge of physics was unattainable, and would be worthless if attained. By knowledge he meant art rather than science, and his method of defining was intended not for the latter but for the former. Those, he said, who can clearly express what they want to do are best secured against failure, and best able to communicate their skill to others. He made out that the various virtues were different kinds of knowledge, not from any extraordinary opinion of its preciousness, but because he thought that knowledge was the variable element in volition and that everything else was constant. Zeller dwells strongly on the Socratic identification of cognition with conduct; but how could anyone who fell at the first step into such a confusion of ideas be fitted either to explain what science meant or to come forward as the reformer of its methods? Nor is it correct to say that Socrates approached an object from every point of view, and took note of all its characteristic qualities. On the contrary, one would be inclined to charge him with the opposite tendency, with fixing his gaze too exclusively on some one quality, that to him, as a teacher, was the most interesting. His identification of virtue with knowledge is an excellent instance of this habit. So also is his identification of beauty with serviceableness, and his general disposition to judge of everything by a rather narrow standard of utility. On the other hand, Greek physical speculation would have gained nothing by a minute attention to definitions, and most probably would have been mischievously hampered by it. Aristotle, at any rate, prefers the method of Democritus to the method of Plato; and Aristotle himself is much nearer the truth when he follows on the Ionian or Sicilian track than when he attempts to define what in the then existing state of knowledge could not be satisfactorily defined. To talk about the various elements—earth, air, fire, and water—as things with which everybody was already familiar, may have been a crude unscientific procedure; to analyse them into different combinations of the hot and the cold, the light and the heavy, the dry and the moist, was not only erroneous but fatally misleading; it was arresting enquiry, and doing precisely what the Sophists had been accused of doing, that is, substituting the conceit for the reality of wisdom. It was, no doubt, necessary that mathematical terms should be defined; but where are we told that geometricians had to learn this truth from Socrates? The sciences of quantity, which could hardly have advanced a step without the help of exact conceptions, were successfully cultivated before he was born, and his influence was used to discourage rather than to promote their accurate study. With regard to the comprehensive all-sided examination of objects on which Zeller lays so much stress, and which he seems to regard as something peculiar to the conceptual method, it had unquestionably been neglected by Parmenides and Heracleitus; but had not the deficiency been already made good by their immediate successors? What else is the philosophy of Empedocles, the Atomists, and Anaxagoras, but an attempt—we must add, a by no means unsuccessful attempt—to recombine the opposing aspects of Nature which had been too exclusively insisted on at Ephesus and Elea? Again, to say that the Sophists had destroyed physical speculation by setting these partial aspects of truth against one another is, in our opinion, equally erroneous. First of all, Zeller here falls into the old mistake, long ago corrected by Grote, of treating the class in question as if they all held similar views. We have shown in the preceding chapter, if indeed it required to be shown, that the Sophists were divided into two principal schools, of which one was devoted to the cultivation of physics. Protagoras and Gorgias were the only sceptics; and it was not by setting one theory against another, but by working out a single theory to its last consequences, that their scepticism was reached; with no more effect, be it observed, than was exercised by Pyrrho on the science of his day. For the two great thinkers, with the aid of whose conclusions it was attempted to discredit objective reality, were already left far behind at the close of the fifth century; and neither their reasonings nor reasonings based on theirs, could exercise much influence on a generation which had Anaxagoras on Nature and the encyclopaedia of Democritus in its hands. There was, however, one critic who really did what the Sophists are charged with doing; who derided and denounced physical science on the ground that its professors were hopelessly at issue with one another; and this critic was no other than Socrates himself. He maintained, on purely popular and superficial grounds, the same sceptical attitude to which Protagoras gave at least the semblance of a psychological justification. And he wished that attention should be concentrated on the very subjects which Protagoras undertook to teach—namely, ethics, politics, and dialectics. Once more, to say that Socrates was conscious of not coming up to his own standard of true knowledge is inconsistent with Xenophon’s account, where he is represented as quite ready to answer every question put to him, and to offer a definition of everything that he considered worth defining. His scepticism, if it ever existed, was as artificial and short-lived as the scepticism of Descartes. The truth is that no man who philosophised at all was ever more free from tormenting doubts and self-questionings; no man was ever more thoroughly satisfied with himself than Socrates. Let us add that, from a Hellenic point of view, no man had ever more reason for self-satisfaction. None, he observed in his last days, had ever lived a better or a happier life. Naturally possessed of a powerful constitution, he had so strengthened it by habitual moderation and constant training that up to the hour of his death, at the age of seventy, he enjoyed perfect bodily and mental health. Neither hardship nor exposure, neither abstinence nor indulgence in what to other men would have been excess, could make any impression on that adamantine frame. We know not how much truth there may be in the story that, at one time, he was remarkable for the violence of his passions; at any rate, when our principal informants knew him he was conspicuous for the ease with which he resisted temptation, and for the imperturbable sweetness of his temper. His wants, being systematically reduced to a minimum, were easily satisfied, and his cheerfulness never failed. He enjoyed Athenian society so much that nothing but military duty could draw him away from it. For Socrates was a veteran who had served through three arduous campaigns, and could give lectures on the duties of a general, which so high an authority as Xenophon thought worth reporting. He seems to have been on excellent terms with his fellow-citizens, never having been engaged in a lawsuit, either as plaintiff or defendant, until the fatal prosecution which brought his career to a close. He could, on that occasion, refuse to prepare a defence, proudly observing that his whole life had been a preparation, that no man had ever seen him commit an unjust or impious deed. The anguished cries of doubt uttered by Italian and Sicilian thinkers could have no meaning for one who, on principle, abstained from ontological speculations; the uncertainty of human destiny which hung like a thunder-cloud over Pindar and the tragic poets had melted away under the sunshine of arguments, demonstrating, to his satisfaction, the reality and beneficence of a supernatural Providence. For he believed that the gods would afford guidance in doubtful conjunctures to all who approached their oracles in a reverent spirit; while, over and above the Divine counsels accessible to all men, he was personally attended by an oracular voice, a mysterious monitor, which told him what to avoid, though not what to do, a circumstance well worthy of note, for it shows that he did not, like Plato, attribute every kind of right action to divine inspiration. It may be said that all this only proves Socrates to have been, in his own estimation, a good and happy, but not necessarily a wise man. With him, however, the last of these conditions was inseparable from the other two. He was prepared to demonstrate, step by step, that his conduct was regulated by fixed and ascertainable principles, and was of the kind best adapted to secure happiness both for himself and for others. That there were deficiencies in his ethical theory may readily be admitted. The idea of universal beneficence seems never to have dawned on his horizon; and chastity was to him what sobriety is to us, mainly a self-regarding virtue. We do not find that he ever recommended conjugal fidelity to husbands; he regarded prostitution very much as it is still, unhappily, regarded by men of the world among ourselves; and in opposing the darker vices of his countrymen, it was the excess rather than the perversion of appetite which he condemned. These, however, are points which do not interfere with our general contention that Socrates adopted the ethical standard of his time, that he adopted it on rational grounds, that having adopted he acted up to it, and that in so reasoning and acting he satisfied his own ideal of absolute wisdom. Even as regards physical phenomena, Socrates, so far from professing complete ignorance, held a very positive theory which he was quite ready to share with his friends. He taught what is called the doctrine of final causes; and, so far as our knowledge goes, he was either the first to teach it, or, at any rate, the first to prove the existence of divine agencies by its means. The old poets had occasionally attributed the origin of man and other animals to supernatural intelligence, but, apparently, without being led to their conviction by any evidence of design displayed in the structure of organised creatures. Socrates, on the other hand, went through the various external organs of the human body with great minuteness, and showed, to his own satisfaction, that they evinced the workings of a wise and beneficent Artist. We shall have more to say further on about this whole argument; here we only wish to observe that, intrinsically, it does not differ very much from the speculations which its author derided as the fruit of an impertinent curiosity; and that no one who now employed it would, for a single moment, be called an agnostic or a sceptic. Must we, then, conclude that Socrates was, after all, nothing but a sort of glorified Greek Paley, whose principal achievement was to present the popular ideas of his time on morals and politics under the form of a rather grovelling utilitarianism; and whose ‘evidences of natural and revealed religion’ bore much the same relation to Greek mythology as the corresponding lucubrations of the worthy archdeacon bore to Christian theology? Even were this the whole truth, it should be remembered that there was an interval of twenty-three centuries between the two teachers, which ought to be taken due account of in estimating their relative importance. Socrates, with his closely-reasoned, vividly-illustrated ethical expositions, had gained a tactical advantage over the vague declamations of Gnomic poetry and the isolated aphorisms of the Seven Sages, comparable to that possessed by Xenophon and his Ten Thousand in dealing with the unwieldy masses of Persian infantry and the undisciplined mountaineers of Carduchia; while his idea of a uniformly beneficent Creator marked a still greater advance on the jealous divinities of Herodotus. On the other hand, as against Hume and Bentham, Paley’s pseudo-scientific paraphernalia were like the muskets and cannon of an Asiatic army when confronted by the English conquerors of India. Yet had Socrates done no more than contributed to philosophy the idea just alluded to, his place in the evolution of thought, though honourable, would not have been what it is justly held to be—unique. III. So far we have been occupied in disputing the views of others; it is now time that our own view should be stated. We maintain, then, that Socrates first brought out the idea, not of knowledge, but of mind in its full significance; that he first studied the whole circle of human interests as affected by mind; that, in creating dialectics, he gave this study its proper method, and simultaneously gave his method the only subject-matter on which it could be profitably exercised; finally, that by these immortal achievements philosophy was constituted, and received a threefold verification—first, from the life of its founder; secondly, from the success with which his spirit was communicated to a band of followers; thirdly, from the whole subsequent history of thought. Before substantiating these assertions point by point, it will be expedient to glance at the external influences which may be supposed to have moulded the great intellect and the great character now under consideration. Socrates was, before all things, an Athenian. To understand him we must first understand what the Athenian character was in itself and independently of disturbing circumstances. Our estimate of that character is too apt to be biassed by the totally exceptional position which Athens occupied during the fifth century B.C. The possession of empire developed qualities in her children which they had not exhibited at an earlier period, and which they ceased to exhibit when empire had been lost. Among these must be reckoned military genius, an adventurous and romantic spirit, and a high capacity for poetical and artistic production—qualities displayed, it is true, by every Greek race, but by some for a longer and by others for a shorter period. Now, the tradition of greatness does not seem to have gone very far back with Athens. Her legendary history, what we have of it, is singularly unexciting. The same rather monotonous though edifying story of shelter accorded to persecuted fugitives, of successful resistance to foreign invasions, and of devoted self-sacrifice to the State, meets us again and again. The Attic drama itself shows how much more stirring was the legendary lore of other tribes. One need only look at the few remaining pieces which treat of patriotic subjects to appreciate the difference; and an English reader may easily convince himself of it by comparing Mr. Swinburne’s _Erechtheus_ with the same author’s _Atalanta_. There is a want of vivid individuality perceptible all through. Even Theseus, the great national hero, strikes one as a rather tame sort of personage compared with Perseus, Heraclês, and Jason. No Athenian figures prominently in the _Iliad_; and on the only two occasions when Pindar was employed to commemorate an Athenian victory at the Panhellenic games, he seems unable to associate it with any legendary glories in the past. The circumstances which for a long time made Attic history so barren of incident are the same to which its subsequent importance is due. The relation in which Attica stood to the rest of Greece was somewhat similar to the relation in which Tuscany, long afterwards, stood to the rest of Italy. It was the region least disturbed by foreign immigration, and therefore became the seat of a slower but steadier mental development. It was among those to whom war, revolution, colonisation, and commerce brought the most many-sided experience that intellectual activity was most speedily ripened. Literature, art, and science were cultivated with extraordinary success by the Greek cities of Asia Minor, and even in some parts of the old country, before Athens had a single man of genius, except Solon, to boast of. But along with the enjoyment of undisturbed tranquillity, habits of self-government, orderliness, and reasonable reflection were establishing themselves, which finally enabled her to inherit all that her predecessors in the race had accomplished, and to add, what alone they still wanted, the crowning consecration of self-conscious mind. There had, simultaneously, been growing up an intensely patriotic sentiment, due, in part, to the long-continued independence of Attica; in part, also, we may suppose, to the union, at a very early period, of her different townships into a single city. The same causes had, however, also favoured a certain love of comfort, a jovial pleasure-seeking disposition often degenerating into coarse sensuality, a thriftiness, and an inclination to grasp at any source of profit, coupled with extreme credulity where hopes of profit were excited, together forming an element of prose-comedy which mingles strangely with the tragic grandeur of Athens in her imperial age, and emerges into greater prominence after her fall, until it becomes the predominant characteristic of her later days. It is, we may observe, the contrast between these two aspects of Athenian life which gives the plays of Aristophanes their unparalleled comic effect, and it is their very awkward conjunction which makes Euripides so unequal and disappointing a poet. We find, then, that the original Athenian character is marked by reasonable reflection, by patriotism, and by a tendency towards self-seeking materialism. Let us take note of these three qualities, for we shall meet with them again in the philosophy of Socrates. Empire, when it came to Athens, came almost unsought. The Persian invasions had made her a great naval power; the free choice of her allies placed her at the head of a great maritime confederacy. The sudden command of vast resources and the tension accumulated during ages of repose, stimulated all her faculties into preternatural activity. Her spirit was steeled almost to the Dorian temper, and entered into victorious rivalry with the Dorian Muse. Not only did her fleet sweep the sea, but her army, for once, defeated Theban hoplites in the field. The grand choral harmonies of Sicilian song, the Sicyonian recitals of epic adventure, were rolled back into a framework for the spectacle of individual souls meeting one another in argument, expostulation, entreaty, and defiance; a nobler Doric edifice rose to confront the Aeginetan temple of Athênê; the strained energy of Aeginetan combatants was relaxed into attitudes of reposing power, and the eternal smile on their faces was deepened into the sadness of unfathomable thought. But to the violet-crowned city, Athênê was a giver of wealth and wisdom rather than of prowess; her empire rested on the contributions of unwilling allies, and on a technical proficiency which others were sure to equal in time; so that the Corinthian orators could say with justice that Athenian skill was more easily acquired than Dorian valour. At once receptive and communicative, Athens absorbed all that Greece could teach her, and then returned it in a more elaborate form, but without the freshness of its earliest inspiration. Yet there was one field that still afforded scope for creative originality. Habits of analysis, though fatal to spontaneous production, were favourable, or rather were necessary, to the growth of a new philosophy. After the exhaustion of every limited idealism, there remained that highest idealisation which is the reduction of all past experience to a method available for the guidance of all future action. To accomplish this last enterprise it was necessary that a single individual should gather up in himself the spirit diffused through a whole people, bestowing on it by that very concentration the capability of an infinitely wider extension when its provisional representative should have passed away from the scene. Socrates represents the popular Athenian character much as Richardson, in a different sphere, represents the English middle-class character—represents it, that is to say, elevated into transcendent genius. Except this elevation, there was nothing anomalous about him. If he was exclusively critical, rationalising, unadventurous, prosaic; in a word, as the German historians say, something of a Philistine; so, we may suspect, were the mass of his countrymen. His illustrations were taken from such plebeian employments as cattle-breeding, cobbling, weaving, and sailoring. These were his ‘touches of things common’ which at last ‘rose to touch the spheres.’ He both practised and inculcated virtues, the value of which is especially evident in humble life—frugality and endurance. But he also represents the Dêmos in its sovereign capacity as legislator and judge. Without aspiring to be an orator or statesman, he reserves the ultimate power of arbitration and election. He submits candidates for office to a severe scrutiny, and demands from all men an even stricter account of their lives than retiring magistrates had to give of their conduct, when in power, to the people. He applies the judicial method of cross-examination to the detection of error, and the parliamentary method of joint deliberation to the discovery of truth. He follows out the democratic principles of free speech and self-government, by submitting every question that arises to public discussion, and insisting on no conclusion that does not command the willing assent of his audience. Finally, his conversation, popular in form, was popular also in this respect, that everybody who chose to listen might have the benefit of it gratuitously. Here we have a great change from the scornful dogmatism of Heracleitus, and the virtually oligarchic exclusiveness of the teachers who demanded high fees for their instruction. To be free and to rule over freemen were, with Socrates, as with every Athenian, the goals of ambition, only his freedom meant absolute immunity from the control of passion or habit; government meant superior knowledge, and government of freemen meant the power of producing intellectual conviction. In his eyes, the possessor of any art was, so far, a ruler, and the only true ruler, being obeyed under severe penalties by all who stood in need of his skill. But the royal art which he himself exercised, without expressly laying claim to it, was that which assigns its proper sphere to every other art, and provides each individual with the employment which his peculiar faculties demand. This is Athenian liberty and Athenian imperialism carried into education, but so idealised and purified that they can hardly be recognised at first sight. The philosophy of Socrates is more obviously related to the practical and religious tendencies of his countrymen. Neither he nor they had any sympathy with the cosmological speculations which seemed to be unconnected with human interests, and to trench on matters beyond the reach of human knowledge. The old Attic sentiment was averse from adventures of any kind, whether political or intellectual. Yet the new spirit of enquiry awakened by Ionian thought could not fail to react powerfully on the most intelligent man among the most intelligent people of Hellas. Above all, one paramount idea which went beyond the confines of the old philosophy had been evolved by the differentiation of knowledge from its object, and had been presented, although under a materialising form, by Anaxagoras to the Athenian public. Socrates took up this idea, which expressed what was highest and most distinctive in the national character, and applied it to the development of ethical speculation. We have seen, in the last chapter, how an attempt was made to base moral truth on the results of natural philosophy, and how that attempt was combated by the Humanistic school. It could not be doubtful which side Socrates would take in this controversy. That he paid any attention to the teaching of Protagoras and Gorgias is, indeed, highly problematic, for their names are never mentioned by Xenophon, and the Platonic dialogues in which they figure are evidently fictitious. Nevertheless, he had to a certain extent arrived at the same conclusion with them, although by a different path. He was opposed, on religious grounds, to the theories which an acute psychological analysis had led them to reject. Accordingly, the idea of Nature is almost entirely absent from his conversation, and, like Protagoras, he is guided solely by regard for human interests. To the objection that positive laws were always changing, he victoriously replied that it was because they were undergoing an incessant adaptation to varying needs.[88] Like Protagoras, again, he was a habitual student of old Greek literature, and sedulously sought out the practical lessons in which it abounded. To him, as to the early poets and sages, Sôphrosynê, or self-knowledge and self-command taken together, was the first and most necessary of all virtues. Unlike them, however, he does not simply accept it from tradition, but gives it a philosophical foundation—the newly-established distinction between mind and body; a distinction not to be confounded with the old Psychism, although Plato, for his reforming purposes, shortly afterwards linked the two together. The disembodied spirit of mythology was a mere shadow or memory, equally destitute of solidity and of understanding; with Socrates, mind meant the personal consciousness which retains its continuous identity through every change, and as against every passing impulse. Like the Humanists, he made it the seat of knowledge—more than the Humanists, he gave it the control of appetite. In other words, he adds the idea of will to that of intellect; but instead of treating them as distinct faculties or functions, he absolutely identifies them. Mind having come to be first recognised as a knowing power, carried over its association with knowledge into the volitional sphere, and the two were first disentangled by Aristotle, though very imperfectly even by him. Yet no thinker helped so much to make the confusion apparent as the one to whom it was due. Socrates deliberately insisted that those who knew the good must necessarily be good themselves. He taught that every virtue was a science; courage, for example, was a knowledge of the things which should or should not be feared; temperance, a knowledge of what should or should not be desired, and so forth. Such an account of virtue would, perhaps, be sufficient if all men did what, in their opinion, they ought to do; and, however strange it may seem, Socrates assumed that such was actually the case.[89] The paradox, even if accepted at the moment by his youthful friends, was sure to be rejected, on examination, by cooler heads, and its rejection would prove that the whole doctrine was essentially unsound. Various causes prevented Socrates from perceiving what seemed so clear to duller intelligences than his. First of all, he did not separate duty from personal interest. A true Athenian, he recommended temperance and righteousness very largely on account of the material advantages they secured. That the agreeable and the honourable, the expedient and the just, frequently came into collision, was at that time a rhetorical commonplace; and it might be supposed that, if they were shown to coincide, no motive to misconduct but ignorance could exist. Then, again, being accustomed to compare conduct of every kind with the practice of such arts as flute-playing, he had come to take knowledge in a rather extended sense, just as we do when we say, indifferently, that a man knows geometry and that he knows how to draw. Aristotle himself did not see more clearly than Socrates that moral habits are only to be acquired by incessant practice; only the earlier thinker would have observed that knowledge of every kind is gained by the same laborious repetition of particular actions. To the obvious objection that, in this case, morality cannot, like theoretical truth, be imparted by the teacher to his pupils, but must be won by the learner for himself, he would probably have replied that all truth is really evolved by the mind from itself, and that he, for that very reason, disclaimed the name of a teacher, and limited himself to the seemingly humbler task of awakening dormant capacities in others. An additional influence, not the less potent because unacknowledged, was the same craving for a principle of unity that had impelled early Greek thought to seek for the sole substance or cause of physical phenomena in some single material element, whether water, air, or fire; and just as these various principles were finally decomposed into the multitudinous atoms of Leucippus, so also, but much more speedily, did the general principle of knowledge tend to decompose itself into innumerable cognitions of the partial ends or utilities which action was directed to achieve. The need of a comprehensive generalisation again made itself felt, and all good was summed up under the head of happiness. The same difficulties recurred under another form. To define happiness proved not less difficult than to define use or practical knowledge. Three points of view offered themselves, and all three had been more or less anticipated by Socrates. Happiness might mean unmixed pleasure, or the exclusive cultivation of man’s higher nature, or voluntary subordination to a larger whole. The founder of Athenian philosophy used to present each of these, in turn, as an end, without recognising the possibility of a conflict between them; and it certainly would be a mistake to represent them as constantly opposed. Yet a truly scientific principle must either prove their identity, or make its choice among them, or discover something better. Plato seems to have taken up the three methods, one after the other, without coming to any very satisfactory conclusion. Aristotle identified the first two, but failed, or rather did not attempt to harmonise them with the third. Succeeding schools tried various combinations, laying more or less stress on different principles at different periods, till the will of an omnipotent Creator was substituted for every human standard. With the decline of dogmatic theology we have seen them all come to life again, and the old battle is still being fought out under our eyes. Speaking broadly, it may be said that the method which we have placed first on the list is more particularly represented in England, the second in France, and the last in Germany. Yet they refuse to be separated by any rigid line of demarcation, and each tends either to combine with or to pass into one or both of the rival theories. Modern utilitarianism, as constituted by John Stuart Mill, although avowedly based on the paramount value of pleasure, in admitting qualitative differences among enjoyments, and in subordinating individual to social good, introduces principles of action which are not, properly speaking, hedonistic. Neither is the idea of the whole by any means free from ambiguity. We have party, church, nation, order, progress, race, humanity, and the sum total of sensitive beings, all putting in their claims to figure as that entity. Where the pursuit of any single end gives rise to conflicting pretensions, a wise man will check them by reference to the other accredited standards, and will cherish a not unreasonable expectation that the evolution of life is tending to bring them all into ultimate agreement. Returning to Socrates, we must further note that his identification of virtue with science, though it does not express the whole truth, expresses a considerable part of it, especially as to him conduct was a much more complex problem than it is to some modern teachers. Only those who believe in the existence of intuitive and infallible moral perceptions can consistently maintain that nothing is easier than to know our duty, and nothing harder than to do it. Even then, the intuitions must extend beyond general principles, and also inform us how and where to apply them. That no such inward illumination exists is sufficiently shown by experience; so much so that the mischief done by foolish people with good intentions has become proverbial. Modern casuists have, indeed, drawn a distinction between the intention and the act, making us responsible for the purity of the former, not for the consequences of the latter. Though based on the Socratic division between mind and body, this distinction would not have commended itself to Socrates. His object was not to save souls from sin, but to save individuals, families, and states from the ruin which ignorance of fact entails. If we enlarge our point of view so as to cover the moral influence of knowledge on society taken collectively, its relative importance will be vastly increased. When Auguste Comte assigns the supreme direction of progress to advancing science, and when Buckle, following Fichte, makes the totality of human action depend on the totality of human knowledge, they are virtually attributing to intellectual education an even more decisive part than it played in the Socratic ethics. Even those who reject the theory, when pushed to such an extreme, will admit that the same quantity of self-devotion must produce a far greater effect when it is guided by deeper insight into the conditions of existence. The same principle may be extended in a different direction if we substitute for knowledge, in its narrower significance, the more general conception of associated feeling. We shall then see that belief, habit, emotion, and instinct are only different stages of the same process—the process by which experience is organised and made subservient to vital activity. The simplest reflex and the highest intellectual conviction are alike based on sensori-motor mechanism, and, so far, differ only through the relative complexity and instability of the nervous connexions involved. Knowledge is life in the making, and when it fails to control practice fails only by coming into conflict with passion—that is to say, with the consolidated results of an earlier experience. Physiology offers another analogy to the Socratic method which must not be overlooked. Socrates recommended the formation of definite conceptions because, among other advantages, they facilitated the diffusion of useful knowledge. So, also, the organised associations of feelings are not only serviceable to individuals, but may be transmitted to offspring with a regularity proportioned to their definiteness. How naturally these deductions follow from the doctrine under consideration, is evident from their having been, to a certain extent, already drawn by Plato. His plan for the systematic education of feeling under scientific supervision answers to the first; his plan for breeding an improved race of citizens by placing marriage under State control answers to the second. Yet it is doubtful whether Plato’s predecessor would have sanctioned any scheme tending to substitute an external compulsion, whether felt or not, for freedom and individual initiative, and a blind instinct for the self-consciousness which can give an account of its procedure at every step. He would bring us back from social physics and physiology to psychology, and from psychology to dialectic philosophy. IV. To Socrates himself the strongest reason for believing in the identity of conviction and practice was, perhaps, that he had made it a living reality. With him to know the right and to do it were the same. In this sense we have already said that his life was the first verification of his philosophy. And just as the results of his ethical teaching can only be ideally separated from their application to his conduct, so also these results themselves cannot be kept apart from the method by which they were reached; nor is the process by which he reached them for himself distinguishable from the process by which he communicated them to his friends. In touching on this point, we touch on that which is greatest and most distinctively original in the Socratic system, or rather in the Socratic impulse to systematisation of every kind. What it was will be made clearer by reverting to the central conception of mind. With Protagoras mind meant an ever-changing stream of feeling; with Gorgias it was a principle of hopeless isolation, the interchange of thoughts between one consciousness and another, by means of signs, being an illusion. Socrates, on the contrary, attributed to it a steadfast control over passion, and a unifying function in society through its essentially synthetic activity, its need of co-operation and responsive assurance. He saw that the reason which overcomes animal desire tends to draw men together just as sensuality tends to drive them into hostile collision. If he recommended temperance on account of the increased egoistic pleasure which it secures, he recommended it also as making the individual a more efficient instrument for serving the community. If he inculcated obedience to the established laws, it was no doubt partly on grounds of enlightened self-interest, but also because union and harmony among citizens were thereby secured. And if he insisted on the necessity of forming definite conceptions, it was with the same twofold reference to personal and public advantage. Along with the diffusive, social character of mind he recognised its essential spontaneity. In a commonwealth where all citizens were free and equal, there must also be freedom and equality of reason. Having worked out a theory of life for himself, he desired that all other men should, so far as possible, pass through the same bracing discipline. Here we have the secret of his famous erotetic method. He did not, like the Sophists, give continuous lectures, nor profess, like some of them, to answer every question that might be put to him. On the contrary, he put a series of questions to all who came in his way, generally in the form of an alternative, one side of which seemed self-evidently true and the other self-evidently false, arranged so as to lead the respondent, step by step, to the conclusion which it was desired that he should accept. Socrates did not invent this method. It had long been practised in the Athenian law-courts as a means for extracting from the opposite party admissions which could not be otherwise obtained, whence it had passed into the tragic drama, and into the discussion of philosophical problems. Nowhere else was the analytical power of Greek thought so brilliantly displayed; for before a contested proposition could be subjected to this mode of treatment, it had to be carefully discriminated from confusing adjuncts, considered under all the various meanings which it might possibly be made to bear, subdivided, if it was complex, into two or more distinct assertions, and linked by a minute chain of demonstration to the admission by which its validity was established or overthrown. Socrates, then, did not create the cross-examining elenchus, but he gave it two new and very important applications. So far as we can make out, it had hitherto been only used (again, after the example of the law-courts) for the purpose of detecting error or intentional deceit. He made it an instrument for introducing his own convictions into the minds of others, but so that his interlocutors seemed to be discovering them for themselves, and were certainly learning how, in their turn, to practise the same didactic interrogation on a future occasion. And he also used it for the purpose of logical self-discipline in a manner which will be presently explained. Of course, Socrates also employed the erotetic method as a means of confutation, and, in his hands, it powerfully illustrated what we have called the negative moment of Greek thought. To prepare the ground for new truth it was necessary to clear away the misconceptions which were likely to interfere with its admission; or, if Socrates himself had nothing to impart, he could at any rate purge away the false conceit of knowledge from unformed minds, and hold them back from attempting difficult tasks until they were properly qualified for the undertaking. For example, a certain Glauco, a brother of Plato, had attempted to address the public assembly, when he was not yet twenty years of age, and was naturally quite unfitted for the task. At Athens, where every citizen had a voice in his country’s affairs, obstruction, whether intentional or not, was very summarily dealt with. Speakers who had nothing to say that was worth hearing were forcibly removed from the bêma by the police; and this fate had already more than once befallen the youthful orator, much to the annoyance of his friends, who could not prevail on him to refrain from repeating the experiment, when Socrates took the matter in hand. One or two adroit compliments on his ambition drew Glauco into a conversation with the veteran dialectician on the aims and duties of a statesman. It was agreed that his first object should be to benefit the country, and that a good way of achieving this end would be to increase its wealth, which, again, could be done either by augmenting the receipts or by diminishing the expenditure. Could Glauco tell what was the present revenue of Athens, and whence it was derived?—No; he had not studied that question.—Well then, perhaps, he had some useful retrenchments to propose.—No; he had not studied that either. But the State might, he thought, be enriched at the expense of its enemies.—A good idea, if we can be sure of beating them first! Only, to avoid the risk of attacking somebody who is stronger than ourselves, we must know what are the enemy’s military resources as compared with our own. To begin with the latter: Can Glauco tell how many ships and soldiers Athens has at her disposal?—No, he does not at this moment remember.—Then, perhaps, he has it all written down somewhere?—He must confess not. So the conversation goes on until Socrates has convicted his ambitious young friend of possessing no accurate information whatever about political questions.[90] Xenophon has recorded another dialogue in which a young man named Euthydêmus, who was also in training for a statesman, and who, as he supposed, had learned a great deal more out of books than Socrates could teach him, is brought to see how little he knows about ethical science. He is asked, Can a man be a good citizen without being just? No, he cannot.—Can Euthydêmus tell what acts are just? Yes, certainly, and also what are unjust.—Under which head does he put such actions as lying, deceiving, harming, enslaving?—Under the head of injustice.—But suppose a hostile people are treated in the various manners specified, is that unjust?—No, but it was understood that only one’s friends were meant.—Well, if a general encourages his own army by false statements, or a father deceives his child into taking medicine, or your friend seems likely to commit suicide, and you purloin a deadly weapon from him, is that unjust?—No, we must add ‘for the purpose of harming’ to our definition. Socrates, however, does not stop here, but goes on cross-examining until the unhappy student is reduced to a state of hopeless bewilderment and shame. He is then brought to perceive the necessity of self-knowledge, which is explained to mean knowledge of one’s own powers. As a further exercise Euthydêmus is put through his facings on the subject of good and evil. Health, wealth, strength, wisdom and beauty are mentioned as unquestionable goods. Socrates shows, in the style long afterwards imitated by Juvenal, that they are only means towards an end, and may be productive of harm no less than good.—Happiness at any rate is an unquestionable good.—Yes, unless we make it consist of questionable goods like those just enumerated.[91] It is in this last conversation that the historical Socrates most nearly resembles the Socrates of Plato’s _Apologia_. Instead, however, of leaving Euthydêmus to the consciousness of his ignorance, as the latter would have done, he proceeds, in Xenophon’s account, to direct the young man’s studies according to the simplest and clearest principles; and we have another conversation where religious truths are instilled by the same catechetical process.[92] Here the erotetic method is evidently a mere didactic artifice, and Socrates could easily have written out his lesson under the form of a regular demonstration. But there is little doubt that in other cases he used it as a means for giving increased precision to his own ideas, and also for testing their validity, that, in a word, the habit of oral communication gave him a familiarity with logical processes which could not otherwise have been acquired. The same cross-examination that acted as a spur on the mind of the respondent, reacted as a bridle on the mind of the interrogator, obliging him to make sure beforehand of every assertion that he put forward, to study the mutual bearings of his beliefs, to analyse them into their component elements, and to examine the relation in which they collectively stood to the opinions generally accepted. It has already been stated that Socrates gave the erotetic method two new applications; we now see in what direction they tended. He made it a vehicle for positive instruction, and he also made it an instrument for self-discipline, a help to fulfilling the Delphic precept, ‘Know thyself.’ The second application was even more important than the first. With us literary training—that is, the practice of continuous reading and composition—is so widely diffused, that conversation has become rather a hindrance than a help to the cultivation of argumentative ability. The reverse was true when Socrates lived. Long familiarity with debate was unfavourable to the art of writing; and the speeches in Thucydides show how difficult it was still found to present close reasoning under the form of an uninterrupted exposition. The traditions of conversational thrust and parry survived in rhetorical prose; and the crossed swords of tongue-fence were represented by the bristling _chevaux de frise_ of a laboured antithetical arrangement where every clause received new strength and point from contrast with its opposing neighbour. By combining the various considerations here suggested we shall arrive at a clearer understanding of the sceptical attitude commonly attributed to Socrates. There is, first of all, the negative and critical function exercised by him in common with many other constructive thinkers, and intimately associated with a fundamental law of Greek thought. Then there is the Attic courtesy and democratic spirit leading him to avoid any assumption of superiority over those whose opinions he is examining. And, lastly, there is the profound feeling that truth is a common possession, which no individual can appropriate as his peculiar privilege, because it can only be discovered, tested, and preserved by the united efforts of all. V. Thus, then, the Socratic dialogue has a double aspect. It is, like all philosophy, a perpetual carrying of life into ideas and of ideas into life. Life is raised to a higher level by thought; thought, when brought into contact with life, gains movement and growth, assimilative and reproductive power. If action is to be harmonised, we must regulate it by universal principles; if our principles are to be efficacious, they must be adopted; if they are to be adopted, we must demonstrate them to the satisfaction of our contemporaries. Language, consisting as it does almost entirely of abstract terms, furnishes the materials out of which alone such an ideal union can be framed. But men do not always use the same words, least of all if they are abstract words, in the same sense, and therefore a preliminary agreement must be arrived at in this respect; a fact which Socrates was the first to recognise. Aristotle tells us that he introduced the custom of constructing general definitions into philosophy. The need of accurate verbal explanations is more felt in the discussion of ethical problems than anywhere else, if we take ethics in the only sense that Socrates would have accepted, as covering the whole field of mental activity. It is true that definitions are also employed in the mathematical and physical sciences, but there they are accompanied by illustrations borrowed from sensible experience, and would be unintelligible without them. Hence it has been possible for those branches of knowledge to make enormous progress, while the elementary notions on which they rest have not yet been satisfactorily analysed. The case is entirely altered when mental dispositions have to be taken into account. Here, abstract terms play much the same part as sensible intuitions elsewhere in steadying our conceptions, but without possessing the same invariable value; the experiences from which those conceptions are derived being exceedingly complex, and, what is more, exceedingly liable to disturbance from unforeseen circumstances. Thus, by neglecting a series of minute changes the same name may come to denote groups of phenomena not agreeing in the qualities which alone it originally connoted. More than one example of such a gradual metamorphosis has already presented itself in the course of our investigation, and others will occur in the sequel. Where distinctions of right and wrong are involved, it is of enormous practical importance that a definite meaning should be attached to words, and that they should not be allowed, at least without express agreement, to depart from the recognised acceptation: for such words, connoting as they do the approval or disapproval of mankind, exercise a powerful influence on conduct, so that their misapplication may lead to disastrous consequences. Where government by written law prevails the importance of defining ethical terms immediately becomes obvious, for, otherwise, personal rule would be restored under the disguise of judicial interpretation. Roman jurisprudence was the first attempt on a great scale to introduce a rigorous system of definitions into legislation. We have seen, in the preceding chapter, how it tended to put the conclusions of Greek naturalistic philosophy into practical shape. We now see how, on the formal side, its determinations are connected with the principles of Socrates. And we shall not undervalue this obligation if we bear in mind that the accurate wording of legal enactments is not less important than the essential justice of their contents. Similarly, the development of Catholic theology required that its fundamental conceptions should be progressively defined. This alone preserved the intellectual character of Catholicism in ages of ignorance and superstition, and helped to keep alive the reason by which superstition was eventually overthrown. Mommsen has called theology the bastard child of Religion and Science. It is something that, in the absence of the robuster parent, its features should be recalled and its tradition maintained even by an illegitimate offspring. So far, we have spoken as if the Socratic definitions were merely verbal; they were, however, a great deal more, and their author did not accurately discriminate between what at that stage of thought could not well be kept apart—explanations of words, practical reforms, and scientific generalisations. For example, in defining a ruler to be one who knew more than other men, he was departing from the common usages of language, and showing not what was, but what ought to be true.[93] And in defining virtue as wisdom, he was putting forward a new theory of his own, instead of formulating the received connotation of a term. Still, after making every deduction, we cannot fail to perceive what an immense service was rendered to exact thought by introducing definitions of every kind into that department of enquiry where they were chiefly needed. We may observe also that a general law of Greek intelligence was here realising itself in a new direction. The need of accurate determination had always been felt, but hitherto it had worked under the more elementary forms of time, space, and causality, or, to employ the higher generalisation of modern psychology, under the form of contiguous association. The earlier cosmologies were all processes of circumscription; they were attempts to fix the limits of the universe, and, accordingly, that element which was supposed to surround the others was also conceived as their producing cause, or else (in the theory of Heracleitus) as typifying the rationale of their continuous transformation. For this reason Parmenides, when he identified existence with extension, found himself obliged to declare that extension was necessarily limited. Of all the physical thinkers, Anaxagoras, who immediately precedes Socrates, approaches, on the objective side, most nearly to his standpoint. For the governing Nous brings order out of chaos by segregating the confused elements, by separating the unlike and drawing the like together, which is precisely what definition does for our conceptions. Meanwhile Greek literature had been performing the same task in a more restricted province, first fixing events according to their geographical and historical positions, then assigning to each its proper cause, then, as Thucydides does, isolating the most important groups of events from their external connexions, and analysing the causes of complex changes into different classes of antecedents. The final revolution effected by Socrates was to substitute arrangement by difference and resemblance for arrangement by contiguity in coexistence and succession. To say that by so doing he created science is inexact, for science requires to consider nature under every aspect, including those which he systematically neglected; but we may say that he introduced the method which is most particularly applicable to mental phenomena, the method of ideal analysis, classification, and reasoning. For, be it observed that Socrates did not limit himself to searching for the One in the Many, he also, and perhaps more habitually, sought for the Many in the One. He would take hold of a conception and analyse it into its various notes, laying them, as it were, piecemeal before his interlocutor for separate acceptance or rejection. If, for example, they could not agree about the relative merits of two citizens, Socrates would decompose the character of a good citizen into its component parts and bring the comparison down to them. A good citizen, he would say, increases the national resources by his administration of the finances, defeats the enemy abroad, wins allies by his diplomacy, appeases dissension by his eloquence at home.[94] When the shy and gifted Charmides shrank from addressing a public audience on public questions, Socrates strove to overcome his nervousness by mercilessly subdividing the august Ecclêsia into its constituent classes. ‘Is it the fullers that you are afraid of?’ he asked, ‘or the leather-cutters, or the masons, or the smiths, or the husbandmen, or the traders, or the lowest class of hucksters?’[95] Here the analytical power of Greek thought is manifested with still more searching effect than when it was applied to space and motion by Zeno. Nor did Socrates only consider the whole conception in relation to its parts, he also grouped conceptions together according to their genera and founded logical classification. To appreciate the bearing of this idea on human interests it will be enough to study the disposition of a code. We shall then see how much more easy it becomes to bring individual cases under a general rule, and to retain the whole body of rules in our memory, when we can pass step by step from the most universal to the most particular categories. Now, it was by jurists versed in the Stoic philosophy that Roman law was codified, and it was by Stoicism that the traditions of Socratic philosophy were most faithfully preserved. Logical division is, however, a process not fully represented by any fixed and formal distribution of topics, nor yet is it equivalent to the arrangement of genera and species according to their natural affinities, as in the admirable systems of Jussieu and Cuvier. It is something much more flexible and subtle, a carrying down into the minutest detail, of that psychological law which requires, as a condition of perfect consciousness, that feelings, conceptions, judgments, and, generally speaking, all mental modes should be apprehended together with their contradictory opposites. Heracleitus had a dim perception of this truth when he taught the identity of antithetical couples, and it is more or less vividly illustrated by all Greek classic literature after him; but Socrates seems to have been the first who transformed it from a law of existence into a law of cognition; with him knowledge and ignorance, reason and passion, freedom and slavery, virtue, and vice, right and wrong (πολλῶν ὀνομάτων μορφὴ μία) were apprehended in inseparable connexion, and were employed for mutual elucidation, not only in broad masses, but also through their last subdivisions, like the delicate adjustments of light and shade on a Venetian canvas. This method of classification by graduated descent and symmetrical contrast, like the whole dialectic system of which it forms a branch, is only suited to the mental phenomena for which it was originally devised; and Hegel committed a fatal error when he applied it to explain the order of external coexistence and succession. We have already touched on the essentially subjective character of the Socratic definition, and we shall presently have to make a similar restriction in dealing with Socratic induction. With regard to the question last considered, our limits will not permit us, nor, indeed, does it fall within the scope of our present study, to pursue a vein of reflection which was never fully worked out either by the Athenian philosophers or by their modern successors, at least not in its only legitimate direction. After definition and division comes reasoning. We arrange objects in classes, that by knowing one or some we may know all. Aristotle attributes to Socrates the first systematic employment of induction as well as of general definitions.[96] Nevertheless, his method was not solely inductive, nor did it bear more than a distant resemblance to the induction of modern science. His principles were not gathered from the particular classes of phenomena which they determined, or were intended to determine, but from others of an analogous character which had already been reduced to order. Observing that all handicrafts were practised according to well-defined intelligible rules, leading, so far as they went, to satisfactory results, he required that life in its entirety should be similarly systematised. This was not so much reasoning as a demand for the more extended application of reasoning. It was a truly philosophic postulate, for philosophy is not science, but precedes and underlies it. Belief and action tend to divide themselves into two provinces, of which the one is more or less organised, the other more or less chaotic. We philosophise when we try to bring the one into order, and also when we test the foundations on which the order of the other reposes, fighting both against incoherent mysticism and against traditional routine. Such is the purpose that the most distinguished thinkers of modern times—Francis Bacon, Spinoza, Hume, Kant, Auguste Comte, and Herbert Spencer—however widely they may otherwise differ, have, according to their respective lights, all set themselves to achieve. No doubt, there is this vast difference between Socrates and his most recent successors, that physical science is the great type of certainty to the level of which they would raise all speculation, while with him it was the type of a delusion and an impossibility. The analogy of artistic production when applied to Nature led him off on a completely false track, the ascription to conscious design of that which is, in truth, a result of mechanical causation.[97] But now that the relations between the known and the unknown have been completely transformed, there is no excuse for repeating the fallacies which imposed on his vigorous understanding; and the genuine spirit of Socrates is best represented by those who, starting like him from the data of experience, are led to adopt a diametrically opposite conclusion. We may add, that the Socratic method of analogical reasoning gave a retrospective justification to early Greek thought, of which Socrates was not himself aware. Its daring generalisations were really an inference from the known to the unknown. To interpret all physical processes in terms of matter and motion, is only assuming that the changes to which our senses cannot penetrate are homogeneous with the changes which we can feel and see. When Socrates argued that, because the human body is animated by a consciousness, the material universe must be similarly animated, Democritus might have answered that the world presents no appearance of being organised like an animal. When he argued that, because statues and pictures are known to be the work of intelligence, the living models from which they are copied must be similarly due to design, Aristodêmus should have answered, that the former are seen to be manufactured, while the others are seen to grow. It might also have been observed, that if our own intelligence requires to be accounted for by a cause like itself, so also does the creative cause, and so on through an infinite regress of antecedents. Teleology has been destroyed by the Darwinian theory; but before the _Origin of Species_ appeared, the slightest scrutiny might have shown that it was a precarious foundation for religious belief. If many thoughtful men are now turning away from theism, ‘natural theology’ may be thanked for the desertion. ‘I believe in God,’ says the German baron in _Thorndale_, ‘until your philosophers demonstrate His existence.’ ‘And then?’ asks a friend. ‘And then—I do not believe the demonstration.’ Whatever may have been the errors into which Socrates fell, he did not commit the fatal mistake of compromising his ethical doctrine by associating it indissolubly with his metaphysical opinions. Religion, with him, instead of being the source and sanction of all duty, simply brought in an additional duty—that of gratitude to the gods for their goodness. We shall presently see where he sought for the ultimate foundation of morality, after completing our survey of the dialectic method with which it was so closely connected. The induction of Socrates, when it went beyond that kind of analogical reasoning which we have just been considering, was mainly abstraction, the process by which he obtained those general conceptions or definitions which played so great a part in his philosophy. Thus, on comparing the different virtues, as commonly distinguished, he found that they all agreed in requiring knowledge, which he accordingly concluded to be the essence of virtue. So other moralists have been led to conclude that right actions resemble one another in their felicific quality, and In that alone. Similarly, political economists find, or formerly found (for we do not wish to be positive on the matter), that a common characteristic of all industrial employments is the desire to secure the maximum of profit with the minimum of trouble. Another comparison shows that value depends on the relation between supply and demand. Aesthetic enjoyments of every kind resemble one another by including an element of ideal emotion. It is a common characteristic of all cognitions that they are constructed by association out of elementary feelings. All societies are marked by a more or less developed division of labour. These are given as typical generalisations which have been reached by the Socratic method. They are all taken from the philosophic sciences—that is, the sciences dealing with phenomena which are partly determined by mind, and the systematic treatment of which is so similar that they are frequently studied in combination by a single thinker, and invariably so by the greatest thinkers of any. But were we to examine the history of the physical sciences, we should find that this method of wide comparison and rapid abstraction cannot, as Francis Bacon imagined, be successfully applied to them. The facts with which they deal are not transparent, not directly penetrable by thought; hence they must be treated deductively. Instead of a front attack, we must, so to speak, take them in the rear. Bacon never made a more unfortunate observation than when he said that the syllogism falls far short of the subtlety of Nature. Nature is even simpler than the syllogism, for she accomplishes her results by advancing from equation to equation. That which really does fall far short of her subtlety is precisely the Baconian induction with its superficial comparison of instances. No amount of observation could detect any resemblance between the bursting of a thunderstorm and the attraction of a loadstone, or between the burning of charcoal and the rusting a nail. But while philosophers cannot prescribe a method to physical science, they may, to a certain extent, bring it under their cognisance, by disengaging its fundamental conceptions and assumptions, and showing that they are functions of mind; by arranging the special sciences in systematic order for purposes of study; and by investigating the law of their historical evolution. Furthermore, since psychology is the central science of philosophy, and since it is closely connected with physiology, which in turn reposes on the inorganic sciences, a certain knowledge of the objective world is indispensable to any knowledge of ourselves. Lastly, since the subjective sphere not only rests, once for all, on the objective, but is also in a continual state of action and reaction with it, no philosophy can be complete which does not take into account the constitution of things as they exist independently of ourselves, in order to ascertain how far they are unalterable, and how far they may be modified to our advantage. We see, then, that Socrates, in restricting philosophy to human interests, was guided by a just tact; that in creating the method of dialectic abstraction, he created an instrument adequate to this investigation, but to this alone; and, finally, that human interests, understood in the largest sense, embrace a number of subsidiary studies which either did not exist when he taught, or which the inevitable superstitions of his age would not allow him to pursue. It remains to glance at another aspect of the dialectic method first developed on a great scale by Plato, and first fully defined by Aristotle, but already playing a certain part in the Socratic teaching. This is the testing of common assumptions by pushing them to their logical conclusion, and rejecting those which lead to consequences inconsistent with themselves. So understood, dialectic means the complete elimination of inconsistency, and has ever since remained the most powerful weapon of philosophical criticism. To take an instance near at hand, it is constantly employed by thinkers so radically different as Mr. Herbert Spencer and Professor T. H. Green; while it has been generalised into an objective law of Nature and history, with dazzling though only momentary success, by Hegel and his school. VI. Consistency is, indeed, the one word which, better than any other, expresses the whole character of Socrates, and the whole of philosophy as well. Here the supreme conception of mind reappears under its most rigorous, but, at the same time, its most beneficent aspect. It is the temperance which no allurement can surprise; the fortitude which no terror can break through; the justice which eliminates all personal considerations, egoistic and altruistic alike; the truthfulness which, with exactest harmony, fits words to meanings, meanings to thoughts, and thoughts to things; the logic which will tolerate no self-contradiction; the conviction which seeks for no acceptance unwon by reason; the liberalism which works through free agencies for freedom; the love which wills another’s good for that other’s sake alone.[98] It was the intellectual passion for consistency which made Socrates so great and which fused his life into a flawless whole; but it was an unconscious motive power, and therefore he attributed to mere knowledge what knowledge alone could not supply. A clear perception of right cannot by itself secure the obedience of our will. High principles are not of any value, except to those in whom a discrepancy between practice and profession produces the sharpest anguish of which their nature is capable; a feeling like, though immeasurably stronger than, that which women of exquisite sensibility experience when they see a candle set crooked or a table-cover awry. How moral laws have come to be established, and why they prescribe or prohibit certain classes of actions, are questions which still divide the schools, though with an increasing consensus of authority on the utilitarian side: their ultimate sanction—that which, whatever they are, makes obedience to them truly moral—can hardly be sought elsewhere than in the same consciousness of logical stringency that determines, or should determine, our abstract beliefs. Be this as it may, we venture to hope that a principle has been here suggested deep and strong enough to reunite the two halves into which historians have hitherto divided the Socratic system, or, rather, the beginning of that universal systematisation called philosophy, which is not yet, and perhaps never will be, completed; a principle which is outwardly revealed in the character of the philosopher himself. With such an one, ethics and dialectics become almost indistinguishable through the intermixture of their processes and the parallelism of their aims. Integrity of conviction enters, both as a means and as an element, into perfect integrity of conduct, nor can it be maintained where any other element of rectitude is wanting. Clearness, consecutiveness, and coherence are the morality of belief; while temperance, justice, and beneficence, taken in their widest sense and taken together, constitute the supreme logic of life. It has already been observed that the thoughts of Socrates were thrown into shape for and by communication, that they only became definite when brought into vivifying contact with another intelligence. Such was especially the case with his method of ethical dialectic. Instead of tendering his advice in the form of a lecture, as other moralists have at all times been so fond of doing, he sought out some pre-existing sentiment or opinion inconsistent with the conduct of which he disapproved, and then gradually worked round from point to point, until theory and practice were exhibited in immediate contrast. Here, his reasoning, which is sometimes spoken of as exclusively inductive, was strictly syllogistic, being the application of a general law to a particular instance. With the growing emancipation of reason, we may observe a return to the Socratic method of moralisation. Instead of rewards and punishments, which encourage selfish calculation, or examples, which stimulate a mischievous jealousy when they do not create a spirit of servile imitation, the judicious trainer will find his motive power in the pupil’s incipient tendency to form moral judgments, which, when reflected on the individual’s own actions, become what we call a conscience. It has been mentioned in the preceding chapter that the celebrated golden rule of justice was already enunciated by Greek moralists in the fourth century B.C. Possibly it may have been first formulated by Socrates. In all cases it occurs in the writings of his disciples, and happily expresses the drift of his entire philosophy. This generalising tendency was, indeed, so natural to a noble Greek, that instances of it occur long before philosophy began. We find it in the famous question of Achilles: ‘Did not this whole war begin on account of a woman? Are the Atreidae the only men who love their wives?’[99] and in the now not less famous apostrophe to Lycaon, reminding him that an early death is the lot of far worthier men than he[100]—utterances which come on us with the awful effect of lightning flashes, that illuminate the whole horizon of existence while they paralyse or destroy an individual victim. The power which Socrates possessed of rousing other minds to independent activity and apostolic transmission of spiritual gifts was, as we have said, the second verification of his doctrine. Even those who, like Antisthenes and Aristippus, derived their positive theories from the Sophists rather than from him, preferred to be regarded as his followers; and Plato, from whom his ideas received their most splendid development, has acknowledged the debt by making that venerated figure the centre of his own immortal Dialogues. A third verification is given by the subjective, practical, dialectic tendency of all subsequent philosophy properly so called. On this point we will content ourselves with mentioning one instance out of many, the recent declaration of Mr. Herbert Spencer that his whole system was constructed for the sake of its ethical conclusion.[101] Apart, however, from abstract speculation, the ideal method seems to have exercised an immediate and powerful influence on Art, an influence which was anticipated by Socrates himself. In two conversations reported by Xenophon,[102] he impresses on Parrhasius, the painter, and Cleito, the sculptor, the importance of so animating the faces and figures which they represented as to make them express human feelings, energies, and dispositions, particularly those of the most interesting and elevated type. And such, in fact, was the direction followed by imitative art after Pheidias, though not without degenerating into a sensationalism which Socrates would have severely condemned. Another and still more remarkable proof of the influence exercised on plastic representation by ideal philosophy was, perhaps, not foreseen by its founder. We allude to the substitution of abstract and generic for historical subjects by Greek sculpture in its later stages, and not by sculpture only, but by dramatic poetry as well. For early art, whether it addressed itself to the eye or to the imagination, and whether its subjects were taken from history or from fiction, had always been historical in this sense, that it exhibited the performance of particular actions by particular persons in a given place and at a given time; the mode of presentment most natural to those whose ideas are mainly determined by contiguous association. The schools which came after Socrates let fall the limitations of concrete reality, and found the unifying principle of their works in association by resemblance, making their figures the personification of a single attribute or group of attributes, and bringing together forms distinguished by the community of their characteristics or the convergence of their functions. Thus Aphroditê no longer figured as the lover of Arês or Anchisês, but as the personification of female beauty; while her statues were grouped together with images of the still more transparent abstractions, Love, Longing, and Desire. Similarly Apollo became a personification of musical enthusiasm, and Dionysus of Bacchic inspiration. So also dramatic art, once completely historical, even with Aristophanes, now chose for its subjects such constantly-recurring types as the ardent lover, the stern father, the artful slave, the boastful soldier, and the fawning parasite.[103] Nor was this all. Thought, after having, as it would seem, wandered away from reality in search of empty abstractions, by the help of those very abstractions regained possession of concrete existence, and acquired a far fuller intelligence of its complex manifestations. For, each individual character is an assemblage of qualities, and can only be understood when those qualities, after having been separately studied, are finally recombined. Thus, biography is a very late production of literature, and although biographies are the favourite reading of those who most despise philosophy, they could never have been written without its help. Moreover, before characters can be described they must exist. Now, it is partly philosophy which calls character into existence by sedulous inculcation of self-knowledge and self-culture, by consolidating a man’s individuality into something independent of circumstances, so that it comes to form, not a figure in bas-relief, but what sculptors call a figure in the round. Such was Socrates himself, and such were the figures which he taught Xenophon and Plato to recognise and portray. Character-drawing begins with them, and the _Memorabilia_ in particular is the earliest attempt at a biographical analysis that we possess. From this to Plutarch’s _Lives_ there was still a long journey to be accomplished, but the interval between them is less considerable than that which divides Xenophon from his immediate predecessor, Thucydides. And when we remember how intimately the substance of Christian teaching is connected with the literary form of its first record, we shall still better appreciate the all-penetrating influence of Hellenic thought, vying, as it does, with the forces of nature in subtlety and universal diffusion. Besides transforming art and literature, the dialectic method helped to revolutionise social life, and the impulse communicated in this direction is still very far from being exhausted. We allude to its influence on female education. The intellectual blossoming of Athens was aided, in its first development, by a complete separation of the sexes. There were very few of his friends to whom an Athenian gentleman talked so little as to his wife.[104] Colonel Mure aptly compares her position to that of an English housekeeper, with considerably less liberty than is enjoyed by the latter. Yet the union of tender admiration with the need for intelligent sympathy and the desire to awaken interest in noble pursuits existed at Athens in full force, and created a field for its exercise. Wilhelm von Humboldt has observed that at this time chivalrous love was kept alive by customs which, to us, are intensely repellent. That so valuable a sentiment should be preserved and diverted into a more legitimate channel was an object of the highest importance. The naturalistic method of ethics did much, but it could not do all, for more was required than a return to primitive simplicity. Here the method of mind stepped in and supplied the deficiency. Reciprocity was the soul of dialectic as practised by Socrates, and the dialectic of love demands a reciprocity of passion which can only exist between the sexes. But in a society where the free intercourse of modern Europe was not permitted, the modern sentiment could not be reached at a single bound; and those who sought for the conversation of intelligent women had to seek for it among a class of which Aspasia was the highest representative. Such women played a great part in later Athenian society; they attended philosophical lectures, furnished heroines to the New Comedy, and on the whole gave a healthier tone to literature. Their successors, the Delias and Cynthias of Roman elegiac poetry, called forth strains of exalted affection which need nothing but a worthier object to place them on a level with the noblest expressions of tenderness that have since been heard. Here at least, to understand is to forgive; and we shall be less scandalised than certain critics,[105] we shall even refuse to admit that Socrates fell below the dignity of a moralist, when we hear that he once visited a celebrated beauty of this class, Theodotê by name;[106] that he engaged her in a playful conversation; and that he taught her to put more mind into her profession; to attract by something deeper than personal charms; to show at least an appearance of interest in the welfare of her lovers; and to stimulate their ardour by a studied reserve, granting no favour that had not been repeatedly and passionately sought after. Xenophon gives the same interest a more edifying direction when he enlivens the dry details of his _Cyropaedia_ with touching episodes of conjugal affection, or presents lessons in domestic economy under the form of conversations between a newly-married couple.[107] Plato in some respects transcends, in others falls short of his less gifted contemporary. For his doctrine of love as an educating process—a true doctrine, all sneers and perversions notwithstanding—though readily applicable to the relation of the sexes, is not applied to it by him; and his project of a common training for men and women, though suggestive of a great advance on the existing system if rightly carried out, was, from his point of view, a retrograde step towards savage or even animal life, an attempt to throw half the burdens incident to a military organisation of society on those who had become absolutely incapable of bearing them. Fortunately, the dialectic method proved stronger than its own creators, and, once set going, introduced feelings and experiences of which they had never dreamed, within the horizon of philosophic consciousness. It was found that if women had much to learn, much also might be learned from them. Their wishes could not be taken into account without giving a greatly increased prominence in the guidance of conduct to such sentiments as fidelity, purity, and pity; and to that extent the religion which they helped to establish has, at least in principle, left no room for any further progress. On the other hand, it is only by reason that the more exclusively feminine impulses can be freed from their primitive narrowness and elevated into truly human emotions. Love, when left to itself, causes more pain than pleasure, for the words of the old idyl still remain true which associate it with jealousy as cruel as the grave; pity, without prevision, creates more suffering than it relieves; and blind fidelity is instinctively opposed even to the most beneficent changes. We are still suffering from the excessive preponderance which Catholicism gave to the ideas of women; but we need not listen to those who tell us that the varied experiences of humanity cannot be organised into a rational, consistent, self-supporting whole. A survey of the Socratic philosophy would be incomplete without some comment on an element in the life of Socrates, which at first sight seems to lie altogether outside philosophy. There is no fact in his history more certain than that he believed himself to be constantly accompanied by a Daemonium, a divine voice often restraining him, even in trifling matters, but never prompting to positive action. That it was neither conscience in our sense of the word, nor a supposed familiar spirit, is now generally admitted. Even those who believe in the supernatural origin and authority of our moral feelings do not credit them with a power of divining the accidentally good or evil consequences which may attend on our most trivial and indifferent actions; while, on the other hand, those feelings have a positive no less than a negative function, which is exhibited whenever the performance of good deeds becomes a duty. That the Daemonium was not a personal attendant is proved by the invariable use of an indefinite neuter adjective to designate it. How the phenomenon itself should be explained is a question for professional pathologists. We have here to account for the interpretation put upon it by Socrates, and this, in our judgment, follows quite naturally from his characteristic mode of thought. That the gods should signify their pleasure by visible signs and public oracles was an experience familiar to every Greek. Socrates, conceiving God as a mind diffused through the whole universe, would look for traces of the Divine presence in his own mind, and would readily interpret any inward suggestion, not otherwise to be accounted for, as a manifestation of this all-pervading power. Why it should invariably appear under the form of a restraint is less obvious. The only explanation seems to be that, as a matter of fact, such mysterious feelings, whether the product of unconscious experience or not, do habitually operate as deterrents rather than as incentives. VII. This Daemonium, whatever it may have been, formed one of the ostensible grounds on which its possessor was prosecuted and condemned to death for impiety. We might have spared ourselves the trouble of going over the circumstances connected with that tragical event, had not various attempts been made in some well-known works to extenuate the significance of a singularly atrocious crime. The case stands thus. In the year 399 B.C. Socrates, who was then over seventy, and had never in his life been brought before a law-court, was indicted on the threefold charge of introducing new divinities, of denying those already recognised by the State, and of corrupting young men. His principal accuser was one Melêtus, a poet, supported by Lycon, a rhetorician, and by a much more powerful backer, Anytus, a leading citizen in the restored democracy. The charge was tried before a large popular tribunal, numbering some five hundred members. Socrates regarded the whole affair with profound indifference. When urged to prepare a defence, he replied, with justice, that he had been preparing it his whole life long. He could not, indeed, have easily foreseen what line the prosecutors would take. Our own information on this point is meagre enough, being principally derived from allusions made by Xenophon, who was not himself present at the trial. There seems, however, no unfairness in concluding that the charge of irreligion neither was nor could be substantiated. The evidence of Xenophon is quite sufficient to establish the unimpeachable orthodoxy of his friend. If it really was an offence at Athens to believe in gods unrecognised by the State, Socrates was not guilty of that offence, for his Daemonium was not a new divinity, but a revelation from the established divinities, such as individual believers have at all times been permitted to receive even by the most jealous religious communities. The imputation of infidelity, commonly and indiscriminately brought against all philosophers, was a particularly unhappy one to fling at the great opponent of physical science, who, besides, was noted for the punctual discharge of his religious duties. That the first two counts of the indictment should be so frivolous raises a strong prejudice against the third. The charges of corruption seem to have come under two heads—alleged encouragement of disrespect to parents, and of disaffection towards democratic institutions. In support of the former some innocent expressions let fall by Socrates seem to have been taken up and cruelly perverted. By way of stimulating his young friends to improve their minds, he had observed that relations were only of value when they could help one another, and that to do so they must be properly educated. This was twisted into an assertion that ignorant parents might properly be placed under restraint by their better-informed children. That such an inference could not have been sanctioned by Socrates himself is obvious from his insisting on the respect due even to so intolerable a mother as Xanthippê.[108] The political opinions of the defendant presented a more vulnerable point for attack. He thought the custom of choosing magistrates by lot absurd, and did not conceal his contempt for it. There is, however, no reason for believing that such purely theoretical criticisms were forbidden by law or usage at Athens. At any rate, much more revolutionary sentiments were tolerated on the stage. That Socrates would be no party to a violent subversion of the Constitution, and would regard it with high disapproval, was abundantly clear both from his life and from the whole tenor of his teaching. In opposition to Hippias, he defined justice as obedience to the law of the land. The chances of the lot had, on one memorable occasion, called him to preside over the deliberations of the Sovereign Assembly. A proposition was made, contrary to law, that the generals who were accused of having abandoned the crews of their sunken ships at Arginusae should be tried in a single batch. In spite of tremendous popular clamour, Socrates refused to put the question to the vote on the single day for which his office lasted. The just and resolute man, who would not yield to the unrighteous demands of a crowd, had shortly afterwards to face the threats of a frowning tyrant. When the Thirty were installed in power, he publicly, and at the risk of his life, expressed disapproval of their sanguinary proceedings. The oligarchy, wishing to involve as many respectable citizens as possible in complicity with their crimes, sent for five persons, of whom Socrates was one, and ordered them to bring a certain Leo from Salamis, that he might be put to death; the others obeyed, but Socrates refused to accompany them on their disgraceful errand. Nevertheless, it told heavily against the philosopher that Alcibiades, the most mischievous of demagogues, and Critias, the most savage of aristocrats, passed for having been educated by him. It was remembered, also, that he was in the habit of quoting a passage from Homer, where Odysseus is described as appealing to the reason of the chiefs, while he brings inferior men to their senses with rough words and rougher chastisement. In reality, Socrates did not mean that the poor should be treated with brutality by the rich, for he would have been the first to suffer had such license been permitted, but he meant that where reason failed harsher methods of coercion must be applied. Precisely because expressions of opinion let fall in private conversation are so liable to be misunderstood or purposely perverted, to adduce them in support of a capital charge where no overt act can be alleged, is the most mischievous form of encroachment on individual liberty. Modern critics, beginning with Hegel,[109] have discovered reasons for considering Socrates a dangerous character, which apparently did not occur to Melêtus and his associates. We are told that the whole system of applying dialectics to morality had an unsettling tendency, for if men were once taught that the sacredness of duty rested on their individual conviction they might refuse to be convinced, and act accordingly. And it is further alleged that Socrates first introduced this principle of subjectivity into morals. The persecuting spirit is so insatiable that in default of acts it attacks opinions, and in default of specific opinions it fastens on general tendencies. We know that Joseph de Maistre was suspected by his ignorant neighbours of being a Revolutionist because most of his time was spent in study; and but the other day a French preacher was sent into exile by his ecclesiastical superiors for daring to support Catholic morality on rational grounds.[110] Fortunately Greek society was not subject to the rules of the Dominican Order. Never anywhere in Greece, certainly not at Athens, did there exist that solid, all-comprehensive, unquestionable fabric of traditional obligation assumed by Hegel; and Zeller is conceding far too much when he defends Socrates, on the sole ground that the recognised standards of right had fallen into universal contempt during the Peloponnesian war, while admitting that he might fairly have been silenced at an earlier period, if indeed his teaching could have been conceived as possible before it actually began.[111] For from the first, both in literature and in life, Greek thought is distinguished by an ardent desire to get to the bottom of every question, and to discover arguments of universal applicability for every decision. Even in the youth of Pericles knotty ethical problems were eagerly discussed without any interference on the part of the public authorities. Experience had to prove how far-reaching was the effect of ideas before a systematic attempt could be made to control them. In what terms Socrates replied to his accusers cannot be stated with absolute certainty. Reasons have been already given for believing that the speech put into his mouth by Plato is not entirely historical; and here we may mention as a further reason that the specific charges mentioned by Xenophon are not even alluded to in it. This much, however, is clear, that the defence was of a thoroughly dignified character; and that, while the allegations of the prosecution were successfully rebutted, the defendant stood entirely on his innocence, and refused to make any of the customary but illegal appeals to the compassion of the court. We are assured that he was condemned solely on account of this defiant attitude, and by a very small majority. Melêtus had demanded the penalty of death, but by Attic law Socrates had the right of proposing some milder sentence as an alternative. According to Plato, he began by stating that the justest return for his entire devotion to the public good would be maintenance at the public expense during the remainder of his life, an honour usually granted to victors at the Olympic games. In default of this he proposed a fine of thirty minae, to be raised by contributions among his friends. According to another account,[112] he refused, on the ground of his innocence, to name any alternative penalty. On a second division Socrates was condemned to death by a much larger majority than that which had found him guilty, eighty of those who had voted for his acquittal now voting for his execution. Such was the transaction which some moderns, Grote among the number, holding Socrates to be one of the best and wisest of men, have endeavoured to excuse. Their argument is that the illustrious victim was jointly responsible for his own fate, and that he was really condemned, not for his teaching, but for contempt of court. To us it seems that this is a distinction without a difference. What has been so finely said of space and time may be said also of the Socratic life and the Socratic doctrine; each was contained entire in every point of the other. Such as he appeared to the Dicastery, such also he appeared everywhere, always, and to all men, offering them the truth, the whole truth, and nothing but the truth. If conduct like his was not permissible in a court of law, then it was not permissible at all; if justice could not be administered without reticences, evasions, and disguises, where was sincerity ever to be practised? If reason was not to be the paramount arbitress in questions of public interest, what issues could ever be entrusted to her decision? Admit every extenuating circumstance that the utmost ingenuity can devise, and from every point of view one fact will come out clearly, that Socrates was impeached as a philosopher, that he defended himself like a philosopher, and that he was condemned to death because he was a philosopher. Those who attempt to remove this stain from the character of the Athenian people will find that, like the blood-stain on Bluebeard’s key, when it is rubbed out on one side it reappears on the other. To punish Socrates for his teaching, or for the way in which he defended his teaching, was equally persecution, and persecution of the worst description, that which attacks not the results of free thought but free thought itself. We cannot then agree with Grote when he says that the condemnation of Socrates ‘ought to count as one of the least gloomy items in an essentially gloomy catalogue.’ On the contrary, it is the gloomiest of any, because it reveals a depth of hatred for pure reason in vulgar minds which might otherwise have remained unsuspected. There is some excuse for other persecutors, for Caiaphas, and St. Dominic, and Calvin: for the Inquisition, and for the authors of the dragonnades; for the judges of Giordano Bruno, and the judges of Vanini: they were striving to exterminate particular opinions, which they believed to be both false and pernicious; there is no such excuse for the Athenian dicasts, least of all for those eighty who, having pronounced Socrates innocent, sentenced him to death because he reasserted his innocence; if, indeed, innocence be not too weak a word to describe his life-long battle against that very irreligion and corruption which were laid to his charge. Here, in this one cause, the great central issue between two abstract principles, the principle of authority and the principle of reason, was cleared from all adventitious circumstances, and disputed on its own intrinsic merits with the usual weapons of argument on the one side and brute force on the other. On that issue Socrates was finally condemned, and on it his judges must be condemned by us. Neither can we admit Grote’s further contention, that in no Greek city but Athens would Socrates have been permitted to carry on his cross-examining activity for so long a period. On the contrary, we agree with Colonel Mure,[113] that in no other state would he have been molested. Xenophanes and Parmenides, Heracleitus and Democritus, had given utterance to far bolder opinions than his, opinions radically destructive of Greek religion, apparently without running the slightest personal risk; while Athens had more than once before shown the same spirit of fanatical intolerance, though without proceeding to such a fatal extreme, thanks, probably, to the timely escape of her intended victims. M. Ernest Renan has quite recently contrasted the freedom of thought accorded by Roman despotism with the narrowness of old Greek Republicanism, quoting what he calls the Athenian Inquisition as a sample of the latter. The word inquisition is not too strong, only the lecturer should not have led his audience to believe that Greek Republicanism was in this respect fairly represented by its most brilliant type, for had such been the case very little free thought would have been left for Rome to tolerate. During the month’s respite accidentally allowed him, Socrates had one more opportunity of displaying that stedfast obedience to the law which had been one of his great guiding principles through life. The means of escaping from prison were offered to him, but he refused to avail himself of them, according to Plato, that the implicit contract of loyalty to which his citizenship had bound him might be preserved unbroken. Nor was death unwelcome to him although it is not true that he courted it, any desire to figure as a martyr being quite alien from the noble simplicity of his character. But he had reached an age when the daily growth in wisdom which for him alone made life worth living, seemed likely to be exchanged for a gradual and melancholy decline. That this past progress was a good in itself he never doubted, whether it was to be continued in other worlds, or succeeded by the happiness of an eternal sleep. And we may be sure that he would have held his own highest good to be equally desirable for the whole human race, even with the clear prevision that its collective aspirations and efforts cannot be prolonged for ever. Two philosophers only can be named who, in modern times, have rivalled or approached the moral dignity of Socrates. Like him, Spinoza realised his own ideal of a good and happy life. Like him, Giordano Bruno, without a hope of future recompense, chose death rather than a life unfaithful to the highest truth, and death, too, under its most terrible form, not the painless extinction by hemlock inflicted in a heathen city, but the agonising dissolution intended by Catholic love to serve as a foretaste of everlasting fire. Yet with neither can the parallel be extended further; for Spinoza, wisely perhaps, refused to face the storms which a public profession and propagation of his doctrine would have raised; and the wayward career of Giordano Bruno was not in keeping with its heroic end. The complex and distracting conditions in which their lot was cast did not permit them to attain that statuesque completeness which marked the classic age of Greek life and thought. Those times developed a wilder energy, a more stubborn endurance, a sweeter purity than any that the ancient world had known. But until the scattered elements are recombined in a still loftier harmony, our sleepless thirst for perfection can be satisfied at one spring alone. Pericles must remain the ideal of statesmanship, Pheidias of artistic production, and Socrates of philosophic power. Before the ideas which we have passed in review could go forth on their world-conquering mission, it was necessary, not only that Socrates should die, but that his philosophy should die also, by being absorbed into the more splendid generalisations of Plato’s system. That system has, for some time past, been made an object of close study in our most famous seats of learning, and a certain acquaintance with it has almost become part of a liberal education in England. No better source of inspiration, combined with discipline, could be found; but we shall understand and appreciate Plato still better by first extricating the nucleus round which his speculations have gathered in successive deposits, and this we can only do with the help of Xenophon, whose little work also well deserves attention for the sake of its own chaste and candid beauty. The relation in which it stands to the Platonic writings may be symbolised by an example familiar to the experience of every traveller. As sometimes, in visiting a Gothic cathedral, we are led through the wonders of the more modern edifice—under soaring arches, over tesselated pavements, and between long rows of clustered columns, past frescoed walls, storied windows, carven pulpits, and sepulchral monuments, with their endless wealth of mythologic imagery—down into the oldest portion of any, the bare stern crypt, severe with the simplicity of early art, resting on pillars taken from an ancient temple, and enclosing the tomb of some martyred saint, to whose glorified spirit an office of perpetual intercession before the mercy-seat is assigned, and in whose honour all that external magnificence has been piled up; so also we pass through the manifold and marvellous constructions of Plato’s imagination to that austere memorial where Xenophon has enshrined with pious care, under the great primary divisions of old Hellenic virtue, an authentic reliquary of one standing foremost among those who, having worked out their own deliverance from the powers of error and evil, would not be saved alone, but published the secret of redemption though death were the penalty of its disclosure; and who, by their transmitted influence, even more than by their eternal example, are still contributing to the progressive development of all that is most rational, most consistent, most social, and therefore most truly human in ourselves. FOOTNOTES: [80] Cf. Havet, _Le Christianisme et ses Origines_, I., 167. [81] _Gesch. d. Phil._, II., 47. [82] The oracle quoted in the _Apologia Socratis_ attributed to Xenophon praises Socrates not for wisdom but for independence, justice, and temperance. Moreover, the work in question is held to be spurious by nearly every critic. [83] _Mem._, IV., vi., 1. [84] _Mem._, IV., iv., 10. [85] Zeller, _Ph. d. Gr._, II., a, 103, note 3 _sub fin._ [86] It may possibly be asked, Why, if Plato gave only an ideal picture of Socrates, are we to accept his versions of the Sophistic teaching as literally exact? The answer is that he was compelled, by the nature of the case, to create an imaginary Socrates, while he could have no conceivable object in ascribing views which he did not himself hold to well-known historical personages. Assuming an unlimited right of making fictitious statements for the public good, his principles would surely not have permitted him wantonly to calumniate his innocent contemporaries by foisting on them odious theories for which they were not responsible. Had nobody held such opinions as those attributed to Thrasymachus in the _Republic_ there would have been no object in attacking them; and if anybody held them, why not Thrasymachus as well as another? With regard to the veracity of the _Apologia_, Grote, in his work on Plato (I. 291), quotes a passage from Aristeides the rhetor, stating that all the companions of Socrates agreed about the Delphic oracle, and the Socratic disclaimer of knowledge. This, however, proves too much, for it shows that Aristeides quite overlooked the absence of any reference to either point in Xenophon, and therefore cannot be trusted to give an accurate report of the other authorities. [87] _Ph. d. Gr._, II., a, 93 ff. [88] In the conversation with Hippias already referred to. [89] _Mem._, III., ix., 4. [90] _Mem._, III., vi. [91] _Mem._, IV., ii. [92] _Mem._, IV., iii. [93] _Mem._, III., ix., 10. [94] _Mem._, IV., vi., 14. [95] Xenophon, _Mem._, III., vii. We may incidentally notice that this passage is well worth the attention of those who look on the Athenian Dêmos as an idle and aristocratic body, supported by slave labour. [96] _Metaph._, XIII., iv. [97] _Mem._, I., iv. [98] ‘Il sait que, dans l’intérêt même du bien, il ne faut pas imposer le bien d’une manière trop absolue, le jeu libre de la liberté étant la condition de la vie humaine.... poursuite en toutes choses du bien public, non des applaudissements.’—Renan, _Marc-Aurèle_, pp. 18, 19. [99] _Il._, IX., 337. [100] _Ib._, XXI., 106. [101] In the preface to the _Data of Ethics_. [102] _Mem._, III., x. [103] Curtius, _Griechische Geschichte_, III., 526-30 (3rd ed.), where, however, the revolution in art is attributed to the influence of the Sophists. [104] Xenoph., _Oeconom._, iii., 12. [105] Mure, _History of Grecian Literature_, IV., 451. [106] _Mem._, III., xi. [107] _Oeconom._, vii., 4 ff. [108] _Mem._, II., i. [109] _Gesch. d. Ph._, II., 100 ff. [110] Written in the spring of 1880. The allusion is to Father Didon, who was at that time rusticated in Corsica. [111] _Ph. d. Gr._, II., a, 192. [112] In the _Apologia_, attributed to Xenophon. [113] _Hist. of Gr. Lit._, IV., App. A. CHAPTER IV. PLATO: HIS TEACHERS AND HIS TIMES. I. In studying the growth of philosophy as an historical evolution, repetitions and anticipations must necessarily be of frequent occurrence. Ideas meet us at every step which can only be appreciated when we trace out their later developments, or only understood when we refer them back to earlier and half-forgotten modes of thought. The speculative tissue is woven out of filaments so delicate and so complicated that it is almost impossible to say where one begins and the other ends. Even conceptions which seem to have been transmitted without alteration are constantly acquiring a new value according to the connexions into which they enter or the circumstances to which they are applied. But if the method of evolution, with its two great principles of continuity and relativity, substitutes a maze of intricate lines, often returning on themselves, for the straight path along which progress was once supposed to move, we are more than compensated by the new sense of coherence and rationality where illusion and extravagance once seemed to reign supreme. It teaches us that the dreams of a great intellect may be better worth our attention than the waking perceptions of ordinary men. Combining fragments of the old order with rudimentary outlines of the new, they lay open the secret laboratory of spiritual chemistry, and help to bridge over the interval separating the most widely contrasted phases of life and thought. Moreover, when we have once accustomed ourselves to break up past systems of philosophy into their component elements, when we see how heterogeneous and ill-cemented were the parts of this and that proud edifice once offered as the only possible shelter against dangers threatening the very existence of civilisation—we shall be prepared for the application of a similar method to contemporary systems of equally ambitious pretensions; distinguishing that which is vital, fruitful, original, and progressive in their ideal synthesis from that which is of merely provisional and temporary value, when it is not the literary resuscitation of a dead past, visionary, retrograde, and mischievously wrong. And we shall also be reminded that the most precious ideas have only been shaped, preserved, and transmitted through association with earthy and perishable ingredients. The function of true criticism is, like Robert Browning’s Roman jeweller, to turn on them ‘the proper fiery acid’ of purifying analysis which dissolves away the inferior metal and leaves behind the gold ring whereby thought and action are inseparably and fruitfully united. Such, as it seems to us, is the proper spirit in which we should approach the great thinker whose works are to occupy us in this and the succeeding chapter. No philosopher has ever offered so extended and vulnerable a front to hostile criticism. None has so habitually provoked reprisals by his own incessant and searching attacks on all existing professions, customs, and beliefs. It might even be maintained that none has used the weapons of controversy with more unscrupulous zeal. And it might be added that he who dwells so much on the importance of consistency has occasionally denounced and ridiculed the very principles which he elsewhere upholds as demonstrated truths. It was an easy matter for others to complete the work of destruction which he had begun. His system seems at first sight to be made up of assertions, one more outrageous than another. The ascription of an objective concrete separate reality to verbal abstractions is assuredly the most astounding paradox ever maintained even by a metaphysician. Yet this is the central article of Plato’s creed. That body is essentially different from extension might, one would suppose, have been sufficiently clear to a mathematician who had the advantage of coming after Leucippus and Democritus. Their identity is implicitly affirmed in the _Timaeus_. That the soul cannot be both created and eternal; that the doctrine of metempsychosis is incompatible with the hereditary transmission of mental qualities; that a future immortality equivalent to, and proved by the same arguments as, our antenatal existence, would be neither a terror to the guilty nor a consolation to the righteous:—are propositions implicitly denied by Plato’s psychology. Passing from theoretical to practical philosophy, it might be observed that respect for human life, respect for individual property, respect for marriage, and respect for truthfulness, are generally numbered among the strongest moral obligations, and those the observance of which most completely distinguishes civilised from savage man; while infanticide, communism, promiscuity, and the occasional employment of deliberate deceit, form part of Plato’s scheme for the redemption of mankind. We need not do more than allude to those Dialogues where the phases and symptoms of unnameable passion are delineated with matchless eloquence, and apparently with at least as much sympathy as censure. Finally, from the standpoint of modern science, it might be urged that Plato used all his powerful influence to throw back physical speculation into the theological stage; that he deliberately discredited the doctrine of mechanical causation which, for us, is the most important achievement of early Greek thought; that he expatiated on the criminal folly of those who held the heavenly bodies to be, what we now know them to be, masses of dead matter with no special divinity about them; and that he proposed to punish this and other heresies with a severity distinguishable from the fitful fanaticism of his native city only by its more disciplined and rigorous application. A plain man might find it difficult to understand how such extravagances could be deliberately propounded by the greatest intellect that Athens ever produced, except on the principle, dear to mediocrity, that genius is but little removed from madness, and that philosophical genius resembles it more nearly than any other. And his surprise would become much greater on learning that the best and wisest men of all ages have looked up with reverence to Plato; that thinkers of the most opposite schools have resorted to him for instruction and stimulation; that his writings have never been more attentively studied than in our own age—an age which has witnessed the destruction of so many illusive reputations; and that the foremost of English educators has used all his influence to promote the better understanding and appreciation of Plato as a prime element in academic culture—an influence now extended far beyond the limits of his own university through that translation of the Platonic Dialogues which is too well known to need any commendation on our part, but which we may mention as one of the principal authorities used for the present study, together with the work of a German scholar, his obligations to whom Prof. Jowett has acknowledged with characteristic grace.[114] As a set-off against the list of paradoxes cited from Plato, it would be easy to quote a still longer list of brilliant contributions to the cause of truth and right, to strike a balance between the two, and to show that there was a preponderance on the positive side sufficiently great to justify the favourable verdict of posterity. We believe, however, that such a method would be as misleading as it is superficial. Neither Plato nor any other thinker of the same calibre—if any other there be—should be estimated by a simple analysis of his opinions. We must go back to the underlying forces of which individual opinions are the resultant and the revelation. Every systematic synthesis represents certain profound intellectual tendencies, derived partly from previous philosophies, partly from the social environment, partly from the thinker’s own genius and character. Each of such tendencies may be salutary and necessary, according to the conditions under which it comes into play, and yet two or more of them may form a highly unstable and explosive compound. Nevertheless, it is in speculative combinations that they are preserved and developed with the greatest distinctness, and it is there that we must seek for them if we would understand the psychological history of our race. And this is why we began by intimating that the lines of our investigation may take us back over ground which has been already traversed, and forward into regions which cannot at present be completely surveyed. We have this great advantage in dealing with Plato—that his philosophical writings have come down to us entire, while the thinkers who preceded him are known only through fragments and second-hand reports. Nor is the difference merely accidental. Plato was the creator of speculative literature, properly so called: he was the first and also the greatest artist that ever clothed abstract thought in language of appropriate majesty and splendour; and it is probably to their beauty of form that we owe the preservation of his writings. Rather unfortunately, however, along with the genuine works of the master, a certain number of pieces have been handed down to us under his name, of which some are almost universally admitted to be spurious, while the authenticity of others is a question on which the best scholars are still divided. In the absence of any very cogent external evidence, an immense amount of industry and learning has been expended on this subject, and the arguments employed on both sides sometimes make us doubt whether the reasoning powers of philologists are better developed than, according to Plato, were those of mathematicians in his time. The two extreme positions are occupied by Grote, who accepts the whole Alexandrian canon, and Krohn, who admits nothing but the _Republic_;[115] while much more serious critics, such as Schaarschmidt, reject along with a mass of worthless compositions several Dialogues almost equal in interest and importance to those whose authenticity has never been doubted. The great historian of Greece seems to have been rather undiscriminating both in his scepticism and in his belief; and the exclusive importance which he attributed to contemporary testimony, or to what passed for such with him, may have unduly biassed his judgment in both directions. As it happens, the authority of the canon is much weaker than Grote imagined; but even granting his extreme contention, our view of Plato’s philosophy would not be seriously affected by it, for the pieces which are rejected by all other critics have no speculative importance whatever. The case would be far different were we to agree with those who impugn the genuineness of the _Parmenides_, the _Sophist_, the _Statesman_, the _Philêbus_, and the _Laws_; for these compositions mark a new departure in Platonism amounting to a complete transformation of its fundamental principles, which indeed is one of the reasons why their authenticity has been denied. Apart, however, from the numerous evidences of Platonic authorship furnished by the Dialogues themselves, as well as by the indirect references to them in Aristotle’s writings, it seems utterly incredible that a thinker scarcely, if at all, inferior to the master himself—as the supposed imitator must assuredly have been—should have consented to let his reasonings pass current under a false name, and that, too, the name of one whose teaching he in some respects controverted; while there is a further difficulty in assuming that his existence could pass unnoticed at a period marked by intense literary and philosophical activity. Readers who wish for fuller information on the subject will find in Zeller’s pages a careful and lucid digest of the whole controversy leading to a moderately conservative conclusion. Others will doubtless be content to accept Prof. Jowett’s verdict, that ‘on the whole not a sixteenth part of the writings which pass under the name of Plato, if we exclude the works rejected by the ancients themselves, can be fairly doubted by those who are willing to allow that a considerable change and growth may have taken place in his philosophy.’[116] To which we may add that the Platonic dialogues, whether the work of one or more hands, and however widely differing among themselves, together represent a single phase of thought, and are appropriately studied as a connected series. We have assumed in our last remark that it is possible to discover some sort of chronological order in the Platonic Dialogues, and to trace a certain progressive modification in the general tenor of their teaching from first to last. But here also the positive evidence is very scanty, and a variety of conflicting theories have been propounded by eminent scholars. Where so much is left to conjecture, the best that can be said for any hypothesis is that it explains the facts according to known laws of thought. It will be for the reader to judge whether our own attempt to trace the gradual evolution of Plato’s system satisfies this condition. In making it we shall take as a basis the arrangement adopted by Prof. Jowett, with some reservations hereafter to be specified. Before entering on our task, one more difficulty remains to be noticed. Plato, although the greatest master of prose composition that ever lived, and for his time a remarkably voluminous author, cherished a strong dislike for books, and even affected to regret that the art of writing had ever been invented. A man, he said, might amuse himself by putting down his ideas on paper, and might even find written memoranda useful for private reference, but the only instruction worth speaking of was conveyed by oral communication, which made it possible for objections unforeseen by the teacher to be freely urged and answered.[117] Such had been the method of Socrates, and such was doubtless the practice of Plato himself whenever it was possible for him to set forth his philosophy by word of mouth. It has been supposed, for this reason, that the great writer did not take his own books in earnest, and wished them to be regarded as no more than the elegant recreations of a leisure hour, while his deeper and more serious thoughts were reserved for lectures and conversations, of which, beyond a few allusions in Aristotle, every record has perished. That such, however, was not the case, may be easily shown. In the first place it is evident, from the extreme pains taken by Plato to throw his philosophical expositions into conversational form, that he did not despair of providing a literary substitute for spoken dialogue. Secondly, it is a strong confirmation of this theory that Aristotle, a personal friend and pupil of Plato during many years, should so frequently refer to the Dialogues as authoritative evidences of his master’s opinions on the most important topics. And, lastly, if it can be shown that the documents in question do actually embody a comprehensive and connected view of life and of the world, we shall feel satisfied that the oral teaching of Plato, had it been preserved, would not modify in any material degree the impression conveyed by his written compositions. II. There is a story that Plato used to thank the gods, in what some might consider a rather Pharisaic spirit, for having made him a human being instead of a brute, a man instead of a woman, and a Greek instead of a barbarian; but more than anything else for having permitted him to be born in the time of Socrates. It will be observed that all these blessings tended in one direction, the complete supremacy in his character of reason over impulse and sense. To assert, extend, and organise that supremacy was the object of his whole life. Such, indeed, had been the object of all his predecessors, and such, stated generally, has been always and everywhere the object of philosophy; but none had pursued it so consciously before, and none has proclaimed it so enthusiastically since then. Now, although Plato could not have done this without a far wider range of knowledge and experience than Socrates had possessed, it was only by virtue of the Socratic method that his other gifts and acquisitions could be turned to complete account; while, conversely, it was only when brought to bear upon these new materials that the full power of the method itself could be revealed. To be continually asking and answering questions; to elicit information from everybody on every subject worth knowing; and to elaborate the resulting mass of intellectual material into the most convenient form for practical application or for further transmission, was the secret of true wisdom with the sage of the market-place and the workshop. But the process of dialectic investigation as an end in itself, the intense personal interest of conversation with living men and women of all classes, the impatience for immediate and visible results, had gradually induced Socrates to restrict within far too narrow limits the sources whence his ideas were derived and the purposes to which they were applied. And the dialectic method itself could not but be checked in its internal development by this want of breadth and variety in the topics submitted to its grasp. Therefore the death of Socrates, however lamentable in its occasion, was an unmixed benefit to the cause for which he laboured, by arresting (as we must suppose it to have arrested) the popular and indiscriminate employment of his cross-examining method, liberating his ablest disciple from the ascendency of a revered master, and inducing him to reconsider the whole question of human knowledge and action from a remoter point of view. For, be it observed that Plato did not begin where Socrates had left off; he went back to the germinal point of the whole system, and proceeded to reconstruct it on new lines of his own. The loss of those whom we love habitually leads our thoughts back to the time of our first acquaintance with them, or, if these are ascertainable, to the circumstances of their early life. In this manner Plato seems to have been at first occupied exclusively with the starting-point of his friend’s philosophy, and we know, from the narrative given in the _Apologia_, under what form he came to conceive it. We have attempted to show that the account alluded to cannot be entirely historical. Nevertheless it seems sufficiently clear that Socrates began with a conviction of his own ignorance, and that his efforts to improve others were prefaced by the extraction of a similar confession of ignorance on their part. It is also certain that through life he regarded the causes of physical phenomena as placed beyond the reach of human reason and reserved by the gods for their own exclusive cognisance, pointing, by way of proof, to the notorious differences of opinion prevalent among those who had meddled with such matters. Thus, his scepticism worked in two directions, but on the one side it was only provisional and on the other it was only partial. Plato began by combining the two. He maintained that human nescience is universal and necessary; that the gods had reserved all knowledge for themselves; and that the only wisdom left for men is a consciousness of their absolute ignorance. The Socratic starting-point gave the centre of his agnostic circle; the Socratic theology gave the distance at which it was described. Here we have to note two things—first, the breadth of generalisation which distinguishes the disciple from the master; and, secondly, the symptoms of a strong religious reaction against Greek humanism. Even before the end of the Peloponnesian War, evidence of this reaction had appeared, and the _Bacchae_ of Euripides bears striking testimony to its gloomy and fanatical character. The last agony of Athens, the collapse of her power, and the subsequent period of oligarchic terrorism, must have given a stimulus to superstition like that which quite recently afflicted France with an epidemic of apparitions and pilgrimages almost too childish for belief. Plato followed the general movement, although on a much higher plane. While looking down with undisguised contempt on the immoral idolatry of his countrymen, he was equally opposed to the irreligion of the New Learning, and, had an opportunity been given him, he would, like the Reformers of the sixteenth century, have put down both with impartial severity. Nor was this the only analogy between his position and that of a Luther or a Calvin. Like them, and indeed like all great religious teachers, he exalted the Creator by enlarging on the nothingness of the creature; just as Christianity exhibits the holiness of God in contrast and correlation with the sinfulness of unregenerate hearts; just as to Pindar man’s life seemed but the fleeting shadow in a dream when compared with the beauty and strength and immortality of the Olympian divinities; so also did Plato deepen the gloom of human ignorance that he might bring out in dazzling relief the fulness of that knowledge which he had been taught to prize as a supreme ideal, but which, for that very reason, seemed proper to the highest existences alone. And we shall presently see how Plato also discovered a principle in man by virtue of which he could claim kindred with the supernatural, and elaborated a scheme of intellectual mediation by which the fallen spirit could be regenerated and made a partaker in the kingdom of speculative truth. Yet if Plato’s theology, from its predominantly rational character, seemed to neglect some feelings which were better satisfied by the earlier or the later faiths of mankind, we cannot say that it really excluded them. The unfading strength of the old gods was comprehended in the self-existence of absolute ideas, and moral goodness was only a particular application of reason to the conduct of life. An emotional or imaginative element was also contributed by the theory that every faculty exercised without a reasoned consciousness of its processes and aims was due to some saving grace and inspiration from a superhuman power. It was thus, according to Plato, that poets and artists were able to produce works of which they were not able to render an intelligent account; and it was thus that society continued to hold together with such an exceedingly small amount of wisdom and virtue. Here, however, we have to observe a marked difference between the religious teachers pure and simple, and the Greek philosopher who was a dialectician even more than he was a divine. For Plato held that providential government was merely provisional; that the inspired prophet stood on a distinctly lower level than the critical, self-conscious thinker; that ratiocination and not poetry was the highest function of mind; and that action should be reorganised in accordance with demonstrably certain principles.[118] This search after a scientific basis for conduct was quite in the spirit of Socrates, but Plato seems to have set very little value on his master’s positive contributions to the systematisation of life. We have seen that the _Apologia_ is purely sceptical in its tendency; and we find a whole group of Dialogues, probably the earliest of Plato’s compositions, marked by the same negative, inconclusive tone. These are commonly spoken of as Socratic, and so no doubt they are in reference to the subjects discussed; but they would be more accurately described as an attempt to turn the Socratic method against its first originator. We know from another source that temperance, fortitude, and piety were the chief virtues inculcated and practised by Socrates; while friendship, if not strictly speaking a virtue, was equally with them one of his prime interests in life. It is clear that he considered them the most appropriate and remunerative subjects of philosophical discussion; that he could define their nature to his own satisfaction; and that he had, in fact, defined them as so many varieties of wisdom. Now, Plato has devoted a separate Dialogue to each of the conceptions in question,[119] and in each instance he represents Socrates, who is the principal spokesman, as professedly ignorant of the whole subject under discussion, offering no definition of his own (or at least none that he will stand by), but asking his interlocutors for theirs, and pulling it to pieces when it is given. We do, indeed, find a tendency to resolve the virtues into knowledge, and, so far, either to identify them with one another, or to carry them up into the unity of a higher idea. To this extent Plato follows in the footsteps of his master, but a result which had completely satisfied Socrates became the starting-point of a new investigation with his successor. If virtue is knowledge, it must be knowledge of what we most desire—of the good. Thus the original difficulty returns under another form, or rather we have merely restated it in different terms. For, to ask what is temperance or fortitude, is equivalent to asking what is its use. And this was so obvious to Socrates, that, apparently, he never thought of distinguishing between the two questions. But no sooner were they distinguished than his reduction of all morality to a single principle was shown to be illusive. For each specific virtue had been substituted the knowledge of a specific utility, and that was all. Unless the highest good were one, the means by which it was sought could not converge to a single point; nor, according to the new ideas, could their mastery come under the jurisdiction of a single art. We may also suspect that Plato was dissatisfied not only with the positive results obtained by Socrates, but also with the Socratic method of constructing general definitions. To rise from the part to the whole, from particular instances to general notions, was a popular rather than a scientific process; and sometimes it only amounted to taking the current explanations and modifying them to suit the exigencies of ordinary experience. The resulting definitions could never be more than tentative, and a skilful dialectician could always upset them by producing an unlooked-for exception, or by discovering an ambiguity in the terms by which they were conveyed. Before ascertaining in what direction Plato sought for an outlet from these accumulated difficulties, we have to glance at a Dialogue belonging apparently to his earliest compositions, but in one respect occupying a position apart from the rest. The _Crito_ tells us for what reasons Socrates refused to escape from the fate which awaited him in prison, as, with the assistance of generous friends, he might easily have done. The aged philosopher considered that by adopting such a course he would be setting the Athenian laws at defiance, and doing what in him lay to destroy their validity. Now, we know that the historical Socrates held justice to consist in obedience to the law of the land; and here for once we find Plato agreeing with him on a definite and positive issue. Such a sudden and singular abandonment of the sceptical attitude merits our attention. It might, indeed, be said that Plato’s inconsistencies defy all attempts at reconciliation, and that in this instance the desire to set his maligned friend in a favourable light triumphed over the claims of an impracticable logic. We think, however, that a deeper and truer solution can be found. If the _Crito_ inculcates obedience to the laws as a binding obligation, it is not for the reasons which, according to Xenophon, were adduced by the real Socrates in his dispute with the Sophist Hippias; general utility and private interest were the sole grounds appealed to then. Plato, on the other hand, ignores all such external considerations. True to his usual method, he reduces the legal conscience to a purely dialectical process. Just as in an argument the disputants are, or ought to be, bound by their own admissions, so also the citizen is bound by a tacit compact to fulfil the laws whose protection he has enjoyed and of whose claims his protracted residence is an acknowledgment. Here there is no need of a transcendent foundation for morality, as none but logical considerations come into play. And it also deserves to be noticed that, where this very idea of an obligation based on acceptance of services had been employed by Socrates, it was discarded by Plato. In the _Euthyphro_, a Dialogue devoted to the discussion of piety, the theory that religion rests on an exchange of good offices between gods and men is mentioned only to be scornfully rejected. Equally remarkable, and equally in advance of the Socratic standpoint, is a principle enunciated in the _Crito_, that retaliation is wrong, and that evil should never be returned for evil.[120] And both are distinct anticipations of the earliest Christian teaching, though both are implicitly contradicted by the so-called religious services celebrated in Christian churches and by the doctrine of a divine retribution which is only not retaliatory because it is infinitely in excess of the provocation received. If the earliest of Plato’s enquiries, while they deal with the same subjects and are conducted on the same method as those cultivated by Socrates, evince a breadth of view surpassing anything recorded of him by Xenophon, they also exhibit traces of an influence disconnected with and inferior in value to his. On more than one occasion[121] Plato reasons, or rather quibbles, in a style which he has elsewhere held up to ridicule as characteristic of the Sophists, with such success that the name of sophistry has clung to it ever since. Indeed, some of the verbal fallacies employed are so transparent that we can hardly suppose them to be unintentional, and we are forced to conclude that the young despiser of human wisdom was resolved to maintain his thesis with any weapons, good or bad, which came to hand. And it seems much more likely that he learned the eristic art from Protagoras or from his disciples than from Socrates. Plato spent a large part of his life in opposing the Sophists—that is to say, the paid professors of wisdom and virtue; but in spite of, or rather perhaps because of, this very opposition, he was profoundly affected by their teaching and example. It is quite conceivable, although we do not find it stated as a fact, that he resorted to them for instruction when a young man, and before coming under the influence of Socrates, an event which did not take place until he was twenty years old; or he may have been directed to them by Socrates himself. With all its originality, his style bears traces of a rhetorical training in the more elaborate passages, and the Sophists were the only teachers of rhetoric then to be found. His habit of clothing philosophical lessons in the form of a myth seems also to have been borrowed from them. It would, therefore, not be surprising that he should cultivate their argumentative legerdemain side by side with the more strict and severe discipline of Socratic dialectics. Plato does, no doubt, make it a charge against the Sophists that their doctrines are not only false and immoral, but that they are put together without any regard for logical coherence. It would seem, however, that this style of attack belongs rather to the later and constructive than to the earlier and receptive period of his intellectual development. The original cause of his antagonism to the professional teachers seems to have been their general pretensions to knowledge, which, from the standpoint of universal scepticism, were, of course, utterly illusive; together with a feeling of aristocratic contempt for a calling in which considerations of pecuniary interest were involved, heightened in this instance by a conviction that the buyer received nothing better than a sham article in exchange for his money. Here, again, a parallel suggests itself with the first preaching of the Gospel. The attitude of Christ towards the scribes and Pharisees, as also that of St. Paul towards Simon Magus, will help us to understand how Plato, in another order of spiritual teaching, must have regarded the hypocrisy of wisdom, the intrusion of fraudulent traders into the temple of Delphic inspiration, and the sale of a priceless blessing whose unlimited diffusion should have been its own and only reward. Yet throughout the philosophy of Plato we meet with a tendency to ambiguous shiftings and reversions of which, here also, due account must be taken. That curious blending of love and hate which forms the subject of a mystical lyric in Mr. Browning’s _Pippa Passes_, is not without its counterpart in purely rationalistic discussion. If Plato used the Socratic method to dissolve away much that was untrue, because incomplete, in Socratism, he used it also to absorb much that was deserving of development in Sophisticism. If, in one sense, the latter was a direct reversal of his master’s teaching, in another it served as a sort of intermediary between that teaching and the unenlightened consciousness of mankind. The shadow should not be confounded with the substance, but it might show by contiguity, by resemblance, and by contrast where the solid reality lay, what were its outlines, and how its characteristic lights might best be viewed. Such is the mild and conciliatory mode of treatment at first adopted by Plato in dealing with the principal representative of the Sophists—Protagoras. In the Dialogue which bears his name the famous humanist is presented to us as a professor of popular unsystematised morality, proving by a variety of practical arguments and ingenious illustrations that virtue can be taught, and that the preservation of social order depends upon the possibility of teaching it; but unwilling to go along with the reasonings by which Socrates shows the applicability of rigorously scientific principles to conduct. Plato has here taken up one side of the Socratic ethics, and developed it into a complete and self-consistent theory. The doctrine inculcated is that form of utilitarianism to which Mr. Sidgwick has given the name of egoistic hedonism. We are brought to admit that virtue is one because the various virtues reduce themselves in the last analysis to prudence. It is assumed that happiness, in the sense of pleasure and the absence of pain, is the sole end of life. Duty is identified with interest. Morality is a calculus for computing quantities of pleasure and pain, and all virtuous action is a means for securing a maximum of the one together with a minimum of the other. Ethical science is constituted; it can be taught like mathematics; and so far the Sophists are right, but they have arrived at the truth by a purely empirical process; while Socrates, who professes to know nothing, by simply following the dialectic impulse strikes out a generalisation which at once confirms and explains their position; yet from self-sufficiency or prejudice they refuse to agree with him in taking their stand on its only logical foundation. That Plato put forward the ethical theory of the Protagoras in perfect good faith cannot, we think, be doubted; although in other writings he has repudiated hedonism with contemptuous aversion; and it seems equally evident that this was his earliest contribution to positive thought. Of all his theories it is the simplest and most Socratic; for Socrates, in endeavouring to reclaim the foolish or vicious, often spoke as if self-interest was the paramount principle of human nature; although, had his assumption been formulated as an abstract proposition, he too might have shrunk from it with something of the uneasiness attributed to Protagoras. And from internal evidence of another description we have reason to think that the Dialogue in question is a comparatively juvenile production, remembering always that the period of youth was much more protracted among the Greeks than among ourselves. One almost seems to recognise the hand of a boy just out of college, who delights in drawing caricatures of his teachers; and who, while he looks down on classical scholarship in comparison with more living and practical topics, is not sorry to show that he can discuss a difficult passage from Simonides better than the professors themselves. III. Our survey of Plato’s first period is now complete; and we have to enter on the far more arduous task of tracing out the circumstances, impulses, and ideas by which all the scattered materials of Greek life, Greek art, and Greek thought were shaped into a new system and stamped with the impress of an imperishable genius. At the threshold of this second period the personality of Plato himself emerges into greater distinctness, and we have to consider what part it played in an evolution where universal tendencies and individual leanings were inseparably combined. Plato was born in the year 429, or according to some accounts 427, and died 347 B.C. Few incidents in his biography can be fixed with any certainty; but for our purpose the most general facts are also the most interesting, and about these we have tolerably trustworthy information. His family was one of the noblest in Athens, being connected on the father’s side with Codrus, and on the mother’s with Solon; while two of his kinsmen, Critias and Charmides, were among the chiefs of the oligarchic party. It is uncertain whether he inherited any considerable property, nor is the question one of much importance. It seems clear that he enjoyed the best education Athens could afford, and that through life he possessed a competence sufficient to relieve him from the cares of material existence. Possibly the preference which he expressed, when far advanced in life, for moderate health and wealth arose from having experienced those advantages himself. If the busts which bear his name are to be trusted, he was remarkably beautiful, and, like some other philosophers, very careful of his personal appearance. Perhaps some reminiscences of the admiration bestowed on himself may be mingled with those pictures of youthful loveliness and of its exciting effect on the imaginations of older men which give such grace and animation to his earliest dialogues. We know not whether as lover or beloved he passed unscathed through the storms of passion which he has so powerfully described, nor whether his apparently intimate acquaintance with them is due to divination or to regretful experience. We may pass by in silence whatever is related on this subject, with the certainty that, whether true or not, scandalous stories could not fail to be circulated about him. It was natural that one who united a great intellect to a glowing temperament should turn his thoughts to poetry. Plato wrote a quantity of verses—verse-making had become fashionable just then—but wisely committed them to the flames on making the acquaintance of Socrates. It may well be doubted whether the author of the _Phaedrus_ and the _Symposium_ would ever have attained eminence in metrical composition, even had he lived in an age far more favourable to poetic inspiration than that which came after the flowering time of Attic art. It seems as if Plato, with all his fervour, fancy, and dramatic skill, lacked the most essential quality of a singer; his finest passages are on a level with the highest poetry, and yet they are separated from it by a chasm more easily felt than described. Aristotle, whom we think of as hard and dry and cold, sometimes comes much nearer to the true lyric cry. And, as if to mark out Plato’s style still more distinctly from every other, it is also deficient in oratorical power. The philosopher evidently thought that he could beat the rhetoricians on their own ground; if the _Menexenus_ be genuine, he tried to do so and failed; and even without its testimony we are entitled to say as much on the strength of shorter attempts. We must even take leave to doubt whether dialogue, properly so called, was Plato’s forte. Where one speaker is placed at such a height above the others as Socrates, or the Eleatic Stranger, or the Athenian in the _Laws_, there cannot be any real conversation. The other interlocutors are good listeners, and serve to break the monotony of a continuous exposition by their expressions of assent or even by their occasional inability to follow the argument, but give no real help or stimulus. And when allowed to offer an opinion of their own, they, too, lapse into a monologue, addressed, as our silent trains of thought habitually are, to an imaginary auditor whose sympathy and support are necessary but are also secure. Yet if Plato’s style is neither exactly poetical, nor oratorical, nor conversational, it has affinities with each of these three varieties; it represents the common root from which they spring, and brings us, better than any other species of composition, into immediate contact with the mind of the writer. The Platonic Socrates has eyes like those of a portrait which follow us wherever we turn, and through which we can read his inmost soul, which is no other than the universal reason of humanity in the delighted surprise of its first awakening to self-conscious activity. The poet thinks and feels for us; the orator makes our thoughts and feelings his own, and then restores them to us in a concentrated form, ‘receiving in vapour what he gives back in a flood.’ Plato removes every obstacle to the free development of our faculties; he teaches us by his own example how to think and to feel for ourselves. If Socrates personified philosophy, Plato has reproduced the personification in artistic form with such masterly effect that its influence has been extended through all ages and over the whole civilised world. This portrait stands as an intermediary between its original and the far-reaching effects indirectly due to his dialectic inspiration, like that universal soul which Plato himself has placed between the supreme artificer and the material world, that it might bring the fleeting contents of space and time into harmony with uncreated and everlasting ideas. To paint Socrates at his highest and his best, it was necessary to break through the narrow limits of his historic individuality, and to show how, had they been presented to him, he would have dealt with problems outside the experience of a home-staying Athenian citizen. The founder of idealism—that is to say, the realisation of reason, the systematic application of thought to life—had succeeded in his task because he had embodied the noblest elements of the Athenian Dêmos, orderliness, patriotism, self-control, and publicity of debate, together with a receptive intelligence for improvements effected in other states. But, just as the impulse which enabled those qualities to tell decisively on Greek history at a moment of inestimable importance came from the Athenian aristocracy, with its Dorian sympathies, its adventurous ambition, and its keen attention to foreign affairs, so also did Plato, carrying the same spirit into philosophy, bring the dialectic method into contact with older and broader currents of speculation, and employ it to recognise the whole spiritual activity of his race. A strong desire for reform must always be preceded by a deep dissatisfaction with things as they are; and if the reform is to be very sweeping the discontent must be equally comprehensive. Hence the great renovators of human life have been remarkable for the severity with which they have denounced the failings of the world where they were placed, whether as regards persons, habits, institutions, or beliefs. Yet to speak of their attitude as pessimistic would either be unfair, or would betray an unpardonable inability to discriminate between two utterly different theories of existence. Nothing can well be more unlike the systematised pusillanimity of those lost souls, without courage and without hope, who find a consolation for their own failure in the belief that everything is a failure, than the fiery energy which is drawn into a perpetual tension by the contrast of what is with the vision of what yet may be. But if pessimism paralyses every generous effort and aspiration by teaching that misery is the irremediable lot of animated beings, or even, in the last analysis, of all being, the opposing theory of optimism exercises as deadly an influence when it induces men to believe that their present condition is, on the whole, a satisfactory one, or that at worst wrong will be righted without any criticism or interference on their part. Even those who believe progress to have been, so far, the most certain fact in human history, cannot blind themselves to the existence of enormous forces ever tending to draw society back into the barbarism and brutality of its primitive condition; and they know also, that whatever ground we have won is due to the efforts of a small minority, who were never weary of urging forward their more sluggish companions, without caring what angry susceptibilities they might arouse—risking recrimination, insult, and outrage, so that only, under whatever form, whether of divine mandate or of scientific demonstration, the message of humanity to her children might be delivered in time. Nor is it only with immobility that they have had to contend. Gains in one direction are frequently balanced by losses in another; while at certain periods there is a distinct retrogression along the whole line. And it is well if, amid the general decline to a lower level, sinister voices are not heard proclaiming that the multitude may safely trust to their own promptings, and that self-indulgence or self-will should be the only law of life. It is also on such occasions that the rallying cry is most needed, and that the born leaders of civilisation must put forth their most strenuous efforts to arrest the disheartened fugitives and to denounce the treacherous guides. It was in this aspect that Plato viewed his age; and he set himself to continue the task which Socrates had attempted, but had been trampled down in endeavouring to achieve. The illustrious Italian poet and essayist, Leopardi, has observed that the idea of the world as a vast confederacy banded together for the repression of everything good and great and true, originated with Jesus Christ.[122] It is surprising that so accomplished a Hellenist should not have attributed the priority to Plato. It is true that he does not speak of the world itself in Leopardi’s sense, because to him it meant something different—a divinely created order which it would have been blasphemy to revile; but the thing is everywhere present to his thoughts under other names, and he pursues it with relentless hostility. He looks on the great majority of the human race, individually and socially, in their beliefs and in their practices, as utterly corrupt, and blinded to such an extent that they are ready to turn and rend any one who attempts to lead them into a better path. The many ‘know not wisdom and virtue, and are always busy with gluttony and sensuality. Like cattle, with their eyes always looking down and their heads stooping, not, indeed, to the earth, but to the dining-table, they fatten and feed and breed, and in their excessive love of these delights they kick and butt at one another with horns and hoofs which are made of iron; and they kill one another by reason of their insatiable lust.’[123] Their ideal is the man who nurses up his desires to the utmost intensity, and procures the means for gratifying them by fraud or violence. The assembled multitude resembles a strong and fierce brute expressing its wishes by inarticulate grunts, which the popular leaders make it their business to understand and to comply with.[J] A statesman of the nobler kind who should attempt to benefit the people by thwarting their foolish appetites will be denounced as a public enemy by the demagogues, and will stand no more chance of acquittal than a physician if he were brought before a jury of children by the pastry-cook. That an Athenian, or, indeed, any Greek gentleman, should regard the common people with contempt and aversion was nothing strange. A generation earlier such feelings would have led Plato to look on the overthrow of democracy and the establishment of an aristocratic government as the remedy for every evil. The upper classes, accustomed to decorate themselves with complimentary titles, had actually come to believe that all who belonged to them were paragons of wisdom and goodness. With the rule of the Thirty came a terrible awakening. In a few months more atrocities were perpetrated by the oligarchs than the Dêmos had been guilty of in as many generations. It was shown that accomplished gentlemen like Critias were only distinguished from the common herd by their greater impatience of opposition and by the more destructive fury of their appetites. With Plato, at least, all allusions on this head came to an end. He now ‘smiled at the claims of long descent,’ considering that ‘every man has had thousands and thousands of progenitors, and among them have been rich and poor, kings and slaves, Hellenes and barbarians, many times over;’ and even the possession of a large landed property ceased to inspire him with any respect when he compared it with the surface of the whole earth.[K] There still remained one form of government to be tried, the despotic rule of a single individual. In the course of his travels Plato came into contact with an able and powerful specimen of the tyrant class, the elder Dionysius. A number of stories relating to their intercourse have been preserved; but the different versions disagree very widely, and none of them can be entirely trusted. It seems certain, however, that Plato gave great offence to the tyrant by his freedom of speech, that he narrowly escaped death, and that he was sold into slavery, from which condition he was redeemed by the generosity of Anniceris, a Cyrenaean philosopher. It is supposed that the scathing description in which Plato has held up to everlasting infamy the unworthy possessor of absolute power—a description long afterwards applied by Tacitus to the vilest of the Roman emperors—was suggested by the type which had come under his own observation in Sicily. Of all existing constitutions that of Sparta approached nearest to the ideal of Plato, or, rather, he regarded it as the least degraded. He liked the conservatism of the Spartans, their rigid discipline, their haughty courage, the participation of their daughters in gymnastic exercises, the austerity of their manners, and their respect for old age; but he found much to censure both in their ancient customs and in the characteristics which the possession of empire had recently developed among them. He speaks with disapproval of their exclusively military organisation, of their contempt for philosophy, and of the open sanction which they gave to practices barely tolerated at Athens. And he also comments on their covetousness, their harshness to inferiors, and their haste to throw off the restraints of the law whenever detection could be evaded.[124] So far we have spoken as if Plato regarded the various false polities existing around him as so many fixed and disconnected types. This, however, was not the case. The present state of things was bad enough, but it threatened to become worse wherever worse was possible. The constitutions exhibiting a mixture of good and evil contained within themselves the seeds of a further corruption, and tended to pass into the form standing next in order on the downward slope. Spartan timocracy must in time become an oligarchy, to oligarchy would succeed democracy, and this would end in tyranny, beyond which no further fall was possible.[125] The degraded condition of Syracuse seemed likely to be the last outcome of Hellenic civilisation. We know not how far the gloomy forebodings of Plato may have been justified by his own experience, but he sketched with prophetic insight the future fortunes of the Roman Republic. Every phase of the progressive degeneration is exemplified in its later history, and the order of their succession is most faithfully preserved. Even his portraits of individual timocrats, oligarchs, demagogues, and despots are reproduced to the life in the pages of Plutarch, of Cicero, and of Tacitus. If our critic found so little to admire in Hellas, still less did he seek for the realisation of his dreams in the outlying world. The lessons of Protagoras had not been wasted on him, and, unlike the nature-worshippers of the eighteenth century, he never fell into the delusion that wisdom and virtue had their home in primaeval forests or in corrupt Oriental despotisms. For him, Greek civilisation, with all its faults, was the best thing that human nature had produced, the only hearth of intellectual culture, the only soil where new experiments in education and government could be tried. He could go down to the roots of thought, of language, and of society; he could construct a new style, a new system, and a new polity, from the foundation up; he could grasp all the tendencies that came under his immediate observation, and follow them out to their utmost possibilities of expansion; but his vast powers of analysis and generalisation remained subject to this restriction, that a Hellene he was and a Hellene he remained to the end. A Hellene, and an aristocrat as well. Or, using the word in its most comprehensive sense, we may say that he was an aristocrat all round, a believer in inherent superiorities of race, sex, birth, breeding, and age. Everywhere we find him restlessly searching after the wisest, purest, best, until at last, passing beyond the limits of existence itself, words fail him to describe the absolute ineffable only good, not being and not knowledge, but creating and inspiring both. Thus it came to pass that his hopes of effecting a thorough reform did not lie in an appeal to the masses, but in the selection and seclusion from evil influences of a few intelligent youths. Here we may detect a remarkable divergence between him and his master. Socrates, himself a man of the people, did not like to hear the Athenians abused. If they went wrong, it was, he said, the fault of their leaders.[126] But according to Plato, it was from the people themselves that corruption originally proceeded, it was they who instilled false lessons into the most intelligent minds, teaching them from their very infancy to prefer show to substance, success to merit, and pleasure to virtue; making the study of popular caprice the sure road to power, and poisoning the very sources of morality by circulating blasphemous stories about the gods—stories which represented them as weak, sensual, capricious beings, setting an example of iniquity themselves, and quite willing to pardon it in men on condition of going shares in the spoil. The poets had a great deal to do with the manufacture of these discreditable myths; and towards poets as a class Plato entertained feelings of mingled admiration and contempt. As an artist, he was powerfully attracted by the beauty of their works; as a theologian, he believed them to be the channels of divine inspiration, and sometimes also the guardians of a sacred tradition; but as a critic, he was shocked at their incapacity to explain the meaning of their own works, especially when it was coupled with ridiculous pretensions to omniscience; and he regarded the imitative character of their productions as illustrating, in a particularly flagrant manner, that substitution of appearance for reality which, according to his philosophy, was the deepest source of error and evil. If private society exercised a demoralising influence on its most gifted members, and in turn suffered a still further debasement by listening to their opinions, the same fatal interchange of corruption went on still more actively in public life, so far, at least, as Athenian democracy was concerned. The people would tolerate no statesman who did not pamper their appetites; and the statesmen, for their own ambitious purposes, attended solely to the material wants of the people, entirely neglecting their spiritual interests. In this respect, Pericles, the most admired of all, had been the chief of sinners; for ‘he was the first who gave the people pay and made them idle and cowardly, and encouraged them in the love of talk and of money.’ Accordingly, a righteous retribution overtook him, for ‘at the very end of his life they convicted him of theft, and almost put him to death.’ So it had been with the other boasted leaders, Miltiades, Themistocles, and Cimon; all suffered from what is falsely called the ingratitude of the people. Like injudicious keepers, they had made the animal committed to their charge fiercer instead of gentler, until its savage propensities were turned against themselves. Or, changing the comparison, they were like purveyors of luxury, who fed the State on a diet to which its present ‘ulcerated and swollen condition’ was due. They had ‘filled the city full of harbours, and docks, and walls, and revenues and all that, and had left no room for justice and temperance.’ One only among the elder statesmen, Aristeides, is excepted from this sweeping condemnation, and, similarly, Socrates is declared to have been the only true statesman of his time.[127] On turning from the conduct of State affairs to the administration of justice in the popular law courts, we find the same tale of iniquity repeated, but this time with more telling satire, as Plato is speaking from his own immediate experience. He considers that, under the manipulation of dexterous pleaders, judicial decisions had come to be framed with a total disregard of righteousness. That disputed claims should be submitted to a popular tribunal and settled by counting heads was, indeed, according to his view, a virtual admission that no absolute standard of justice existed; that moral truth varied with individual opinion. And this is how the character of the lawyer had been moulded in consequence:— He has become keen and shrewd; he has learned how to flatter his master in word and indulge him in deed; but his soul is small and unrighteous. His slavish condition has deprived him of growth and uprightness and independence; dangers and fears which were too much for his truth and honesty came upon him in early years, when the tenderness of youth was unequal to them, and he has been driven into crooked ways; from the first he has practised deception and retaliation, and has become stunted and warped. And so he has passed out of youth into manhood, having no soundness in him, and is now, as he thinks, a master in wisdom.[128] To make matters worse, the original of this unflattering portrait was rapidly becoming the most powerful man in the State. Increasing specialisation had completely separated the military and political functions which had formerly been discharged by a single eminent individual, and the business of legislation was also becoming a distinct profession. No orator could obtain a hearing in the assembly who had not a technical acquaintance with the subject of deliberation, if it admitted of technical treatment, which was much more frequently the case now than in the preceding generation. As a consequence of this revolution, the ultimate power of supervision and control was passing into the hands of the law courts, where general questions could be discussed in a more popular style, and often from a wider or a more sentimental point of view. They were, in fact, beginning to wield an authority like that exercised until quite lately by the press in modern Europe, only that its action was much more direct and formidable. A vote of the Ecclêsia could only deprive a statesman of office: a vote of the Dicastery might deprive him of civil rights, home, freedom, property, or even life itself. Moreover, with the loss of empire and the decline of public spirit, private interests had come to attract a proportionately larger share of attention; and unobtrusive citizens who had formerly escaped from the storms of party passion, now found themselves marked out as a prey by every fluent and dexterous pleader who could find an excuse for dragging them before the courts. Rhetoric was hailed as the supreme art, enabling its possessor to dispense with every other study, and promising young men were encouraged to look on it as the most paying line they could take up. Even those whose civil status or natural timidity precluded them from speaking in public could gain an eminent and envied position by composing speeches for others to deliver. Behind these, again, stood the professed masters of rhetoric, claiming to direct the education and the whole public opinion of the age by their lectures and pamphlets. Philosophy was not excluded from their system of training, but it occupied a strictly subordinate place. Studied in moderation, they looked on it as a bracing mental exercise and a repertory of sounding commonplaces, if not as a solvent for old-fashioned notions of honesty; but a close adherence to the laws of logic or to the principles of morality seemed puerile pedantry to the elegant stylists who made themselves the advocates of every crowned filibuster abroad, while preaching a policy of peace at any price at home. It is evident that the fate of Socrates was constantly in Plato’s thoughts, and greatly embittered his scorn for the multitude as well as for those who made themselves its ministers and minions. It so happened that his friend’s three accusers had been respectively a poet, a statesman, and a rhetor; thus aptly typifying to the philosopher’s lively imagination the triad of charlatans in whom public opinion found its appropriate representatives and spokesmen. Yet Plato ought consistently to have held that the condemnation of Socrates was, equally with the persecution of Pericles, a satire on the teaching which, after at least thirty years’ exercise, had left its auditors more corrupt than it found them. In like manner the ostracism of Aristeides might be set against similar sentences passed on less puritanical statesmen. For the purpose of the argument it would have been sufficient to show that in existing circumstances the office of public adviser was both thankless and dangerous. We must always remember that when Plato is speaking of past times he is profoundly influenced by aristocratic traditions, and also that under a retrospective disguise he is really attacking contemporary abuses. And if, even then, his denunciations seem excessive, their justification may be found in that continued decay of public virtue which, not long afterwards, brought about the final catastrophe of Athenian independence. IV. To illustrate the relation in which Plato stood towards his own times, we have already had occasion to draw largely on the productions of his maturer manhood. We have now to take up the broken thread of our systematic exposition, and to trace the development of his philosophy through that wonderful series of compositions which entitle him to rank among the greatest writers, the most comprehensive thinkers, and the purest religious teachers of all ages. In the presence of such glory a mere divergence of opinion must not be permitted to influence our judgment. High above all particular truths stands the principle that truth itself exists, and it was for this that Plato fought. If there were others more completely emancipated from superstition, none so persistently appealed to the logic before which superstition must ultimately vanish. If his schemes for the reconstruction of society ignore many obvious facts, they assert with unrivalled force the necessary supremacy of public welfare over private pleasure; and their avowed utilitarianism offers a common ground to the rival reformers who will have nothing to do with the mysticism of their metaphysical foundation. Those, again, who hold, like the youthful Plato himself, that the ultimate interpretation of existence belongs to a science transcending human reason, will here find the doctrines of their religion anticipated as in a dream. And even those who, standing aloof both from theology and philosophy, live, as they imagine, for beauty alone, will observe with interest how the spirit of Greek art survived in the denunciation of its idolatry, and ‘the light that never was on sea or land,’ after fading away from the lower levels of Athenian fancy, came once more to suffuse the frozen steeps of dialectic with its latest and divinest rays. The glowing enthusiasm of Plato is, however, not entirely derived from the poetic traditions of his native city; or perhaps we should rather say that he and the great writers who preceded him drew from a common fount of inspiration. Mr. Emerson, in one of the most penetrating criticisms ever written on our philosopher,[129] has pointed out the existence of two distinct elements in the Platonic Dialogues—one dispersive, practical, prosaic; the other mystical, absorbing, centripetal. The American scholar is, however, as we think, quite mistaken when he attributes the second of these tendencies to Asiatic influence. It is extremely doubtful whether Plato ever travelled farther east than Egypt; it is probable that his stay in that country was not of long duration; and it is certain that he did not acquire a single metaphysical idea from its inhabitants. He liked their rigid conservatism; he liked their institution of a dominant priesthood; he liked their system of popular education, and the place which it gave to mathematics made him look with shame on the ‘swinish ignorance’ of his own countrymen in that respect;[130] but on the whole he classes them among the races exclusively devoted to money-making, and in aptitude for philosophy he places them far below the Greeks. Very different were the impressions brought home from his visits to Sicily and Southern Italy. There he became acquainted with modes of thought in which the search after hidden resemblances and analogies was a predominant passion; there the existence of a central unity underlying all phenomena was maintained, as against sense and common opinion, with the intensity of a religious creed; there alone speculation was clothed in poetic language; there first had an attempt been made to carry thought into life by associating it with a reform of manners and beliefs. There, too, the arts of dance and song had assumed a more orderly and solemn aspect; the chorus received its final constitution from a Sicilian master; and the loftiest strains of Greek lyric poetry were composed for recitation in the streets of Sicilian cities or at the courts of Sicilian kings. Then, with the rise of rhetoric, Greek prose was elaborated by Sicilian teachers into a sort of rhythmical composition, combining rich imagery with studied harmonies and contrasts of sense and sound. And as the hold of Asiatic civilisation on eastern Hellas grew weaker, the attention of her foremost spirits was more and more attracted to this new region of wonder and romance. The stream of colonisation set thither in a steady flow; the scenes of mythical adventure were rediscovered in Western waters; and it was imagined that, by grasping the resources of Sicily, an empire extending over the whole Mediterranean might be won. Perhaps, without being too fanciful, we may trace a likeness between the daring schemes of Alcibiades and the more remote but not more visionary kingdom suggested by an analogous inspiration to the idealising soul of Plato. Each had learned to practise, although for far different purposes, the royal art of Socrates—the mastery over men’s minds acquired by a close study of their interests, passions, and beliefs. But the ambition of the one defeated his own aim, to the destruction of his country and of himself; while the other drew into Athenian thought whatever of Western force and fervour was needed for the accomplishment of its imperial task. We may say of Plato what he has said of his own Theaetêtus, that ‘he moves surely and smoothly and successfully in the path of knowledge and inquiry; always making progress like the noiseless flow of a river of oil’;[131] but everywhere beside or beneath that placid lubricating flow we may trace the action of another current, where still sparkles, fresh and clear as at first, the fiery Sicilian wine. It will be remembered that in an earlier section of this chapter we accompanied Plato to a period when he had provisionally adopted a theory in which the Protagorean contention that virtue can be taught was confirmed and explained by the Socratic contention that virtue is knowledge; while this knowledge again was interpreted in the sense of a hedonistic calculus, a prevision and comparison of the pleasures and pains consequent on our actions. We have now to trace the lines of thought by which he was guided to a different conception of ethical science. After resolving virtue into knowledge of pleasure, the next questions which would present themselves to so keen a thinker were obviously, What is knowledge? and What is pleasure? The _Theaetêtus_ is chiefly occupied with a discussion of the various answers already given to the first of these enquiries. It seems, therefore, to come naturally next after the _Protagoras_; and our conjecture receives a further confirmation when we find that here also a large place is given to the opinions of the Sophist after whom that dialogue is named; the chief difference being that the points selected for controversy are of a speculative rather than of a practical character. There is, however, a close connexion between the argument by which Protagoras had endeavoured to prove that all mankind are teachers of virtue, and his more general principle that man is the measure of all things. And perhaps it was the more obvious difficulties attending the latter view which led Plato, after some hesitation, to reject the former along with it. In an earlier chapter we gave some reasons for believing that Protagoras did not erect every individual into an arbiter of truth in the sweeping sense afterwards put upon his words. He was probably opposing a human to a theological or a naturalistic standard. Nevertheless, it does not follow that Plato was fighting with a shadow when he pressed the Protagorean dictum to its most literal interpretation. There are plenty of people still who would maintain it to that extent. Wherever and whenever the authority of ancient traditions is broken down, the doctrine that one man’s opinion is as good as another’s immediately takes its place; or rather the doctrine in question is a survival of traditionalism in an extremely pulverised form. And when we are told that the majority must be right—which is a very different principle from holding that the majority should be obeyed—we may take it as a sign that the loose particles are beginning to coalesce again. The substitution of an individual for a universal standard of truth is, according to Plato, a direct consequence of the theory which identifies knowledge with sense-perception. It is, at any rate, certain that the most vehement assertors of the former doctrine are also those who are fondest of appealing to what they and their friends have seen, heard, or felt; and the more educated among them place enormous confidence in statistics. They are also fond of repeating the adage that an ounce of fact is worth a ton of theory, without considering that theory alone can furnish the balance in which facts are weighed. Plato does not go very deep into the _rationale_ of observation, nor in the infancy of exact science was it to be expected that he should. He fully recognised the presence of two factors, an objective and a subjective, in every sensation, but lost his hold on the true method in attempting to trace a like dualism through the whole of consciousness. Where we should distinguish between the mental energies and the physical processes underlying them, or between the elements respectively contributed to every cognition by immediate experience and reflection, he conceived the inner and outer worlds as two analogous series related to one another as an image to its original. At this last point we touch on the final generalisation by which Plato extended the dialectic method to all existence, and readmitted into philosophy the earlier speculations provisionally excluded from it by Socrates. The cross-examining elenchus, at first applied only to individuals, had been turned with destructive effect on every class, every institution, and every polity, until the whole of human life was made to appear one mass of self-contradiction, instability, and illusion. It had been held by some that the order of nature offered a contrast and a correction to this bewildering chaos. Plato, on the other hand, sought to show that the ignorance and evil prevalent among men were only a part of the imperfection necessarily belonging to derivative existence of every kind. For this purpose the philosophy of Heracleitus proved a welcome auxiliary. The pupil of Socrates had been taught in early youth by Cratylus, an adherent of the Ephesian school, that movement, relativity, and the conjunction of opposites are the very conditions under which Nature works. We may conjecture that Plato did not at first detect any resemblance between the Heracleitean flux and the mental bewilderment produced or brought to light by the master of cross-examination. But his visit to Italy would probably enable him to take a new view of the Ionian speculations, by bringing him into contact with schools maintaining a directly opposite doctrine. The Eleatics held that existence remained eternally undivided, unmoved, and unchanged. The Pythagoreans arranged all things according to a strained and rigid antithetical construction. Then came the identifying flash.[132] Unchangeable reality, divine order, mathematical truth—these were the objective counterpart of the Socratic definitions, of the consistency which Socrates introduced into conduct. The Heracleitean system applied to phenomena only; and it faithfully reflected the incoherent beliefs and disorderly actions of uneducated men. We are brought into relation with the fluctuating sea of generated and perishing natures by sense and opinion, and these reproduce, in their irreconcilable diversity, the shifting character of the objects with which they are conversant. Whatever we see and feel is a mixture of being and unreality; it is, and is not, at the same time. Sensible magnitudes are equal or greater or less according as the standard of comparison is chosen. Yet the very act of comparison shows that there is something in ourselves deeper than mere sense; something to which all individual sensations are referred as to a common centre, and in which their images are stored up. Knowledge, then, can no longer be identified with sensation, since the mental reproductions of external objects are apprehended in the absence of their originals, and since thought possesses the further faculty of framing abstract notions not representing any sensible objects at all. We need not follow Plato’s investigations into the meaning of knowledge and the causes of illusion any further; especially as they do not lead, in this instance, to any positive conclusion. The general tendency is to seek for truth within rather than without; and to connect error partly with the disturbing influence of sense-impressions on the higher mental faculties, partly with the inherent confusion and instability of the phenomena whence those impressions are derived. Our principal concern here is to note the expansive power of generalisation which was carrying philosophy back again from man to Nature—the deep-seated contempt of Plato for public opinion—and the incipient differentiation of demonstrated from empirical truth. A somewhat similar vein of reflection is worked out in the _Cratylus_, a Dialogue presenting some important points of contact with the _Theaetêtus_, and probably belonging to the same period. There is the same constant reference to Heracleitus, whose philosophy is here also treated as in great measure, but not entirely, true; and the opposing system of Parmenides is again mentioned, though much more briefly, as a valuable set-off against its extravagances. The _Cratylus_ deals exclusively with language, just as the _Theaetêtus_ had dealt with sensation and mental imagery, but in such a playful and ironical tone that its speculative importance is likely to be overlooked. Some of the Greek philosophers seem to have thought that the study of things might advantageously be replaced by the study of words, which were supposed to have a natural and necessary connexion with their accepted meanings. This view was particularly favoured by the Heracleiteans, who found, or fancied that they found, a confirmation of their master’s teaching in etymology. Plato professes to adopt the theory in question, and supports it with a number of derivations which to us seem ludicrously absurd, but which may possibly have been transcribed from the pages of contemporary philologists. At last, however, he turns round and shows that other verbal arguments, equally good, might be adduced on behalf of Parmenides. But the most valuable part of the discussion is a protest against the whole theory that things can be studied through their names. Plato justly observes that an image, to be perfect, should not reproduce its original, but only certain aspects of it; that the framers of language were not infallible; and that we are just as competent to discover the nature of things as they could be. One can imagine the delight with which he would have welcomed the modern discovery that sensations, too, are a language; and that the associated groups into which they most readily gather are determined less by the necessary connexions of things in themselves than by the exigencies of self-preservation and reproduction in sentient beings. Through all his criticisms on the popular sources of information—sense, language and public opinion—Plato refers to an ideal of perfect knowledge which he assumes without being able to define it. It must satisfy the negative condition of being free from self-contradiction, but further than this we cannot go. Yet, in the hands of a metaphysician, no more than this was required to reconstruct the world. The demand for consistency explains the practical philosophy of Socrates. It also explains, under another form, the philosophy, both practical and speculative, of his disciple. Identity and the correlative of identity, difference, gradually came to cover with their manifold combinations all knowledge, all life, and all existence. It was from mathematical science that the light of certainty first broke. Socrates had not encouraged the study of mathematics, either pure or applied; nor, if we may judge from some disparaging allusions to Hippias and his lectures in the _Protagoras_, did Plato at first regard it with any particular favour. He may have acquired some notions of arithmetic and geometry at school; but the intimate acquaintance with, and deep interest in them, manifested throughout his later works, probably dates from his visits to Italy, Sicily, Cyrênê, and Egypt. In each of these places the exact sciences were cultivated with more assiduity than at Athens; in southern Italy they had been brought into close connexion with philosophy by a system of mystical interpretation. The glory of discovering their true speculative significance was reserved for Plato. Just as he had detected a profound analogy between the Socratic scepticism and the Heracleitean flux, so also, by another vivid intuition, he saw in the definitions and demonstrations of geometry a type of true reasoning, a particular application of the Socratic logic. Thus the two studies were brought into fruitful reaction, the one gaining a wider applicability, and the other an exacter method of proof. The mathematical spirit ultimately proved too strong for Plato, and petrified his philosophy into a lifeless formalism; but no extraneous influence helped so much to bring about the complete maturity of his constructive powers, in no direction has he more profoundly influenced the thought of later ages. Both the _Theaetêtus_ and the _Cratylus_ contain allusions to mathematical reasoning, but its full significance is first exhibited in the _Meno_. Here the old question, whether virtue can be taught, is again raised, to be discussed from an entirely new point of view, and resolved into the more general question, Can anything be taught? The answer is, Yes and No. You may stimulate the native activity of the intellect, but you cannot create it. Take a totally uneducated man, and, under proper guidance, he shall discover the truths of geometry for himself, by virtue of their self-evident clearness. Being independent of any traceable experience, the elementary principles of this science, of all science, must have been acquired in some antenatal period, or rather they were never acquired at all, they belong to the very nature of the soul herself. The doctrine here unfolded had a great future before it; and it has never, perhaps, been discussed with so much eagerness as during the last half-century among ourselves. The masters of English thought have placed the issue first raised by Plato in the very front of philosophical controversy; and the general public have been brought to feel that their dearest interests hang on its decision. The subject has, however, lost much of its adventitious interest to those who know that the _à priori_ position was turned, a hundred years ago, by Kant. The philosopher of Königsberg showed that, granting knowledge to be composed of two elements, mind adds nothing to outward experience but its own forms, the system of connexions according to which it groups phenomena. Deprive these forms of the content given to them by feeling, and the soul will be left beating her wings in a vacuum. The doctrine that knowledge is not a dead deposit in consciousness or memory, but a living energy whereby phenomena are, to use Kant’s words, gathered up into the synthetic unity of apperception, has since found a physiological basis in the theory of central innervation. And the experiential school of psychology have simultaneously come to recognise the existence of fixed conditions under which consciousness works and grows, and which, in the last analysis, resolve themselves into the apprehension of resemblance, difference, coexistence, and succession. The most complex cognition involves no more than these four categories; and it is probable that they all co-operate in the most elementary perception. The truths here touched on seem to have been dimly present to the mind of Plato. He never doubts that all knowledge must, in some way or other, be derived from experience; and, accordingly, he assumes that what cannot have been learned in this world was learned in another. But he does not (in the _Meno_ at least) suppose that the process ever had a beginning. It would seem that he is trying to express in figurative language the distinction, lost almost as soon as found, between intelligence and the facts on which intelligence is exercised, An examination of the steps by which Meno’s slave is brought to perceive, without being directly told, the truth of the Pythagorean theorem, will show that his share in the demonstration is limited to the intuition of certain numerical equalities and inequalities. Now, to Plato, the perception of sameness and difference meant everything. He would have denied that the sensible world presented examples of these relations in their ideal absoluteness and purity. In tracing back their apprehension to the self-reflection of the soul, the consciousness of personal identity, he would not have transgressed the limits of a legitimate enquiry. But self-consciousness involved a possible abstraction from disturbing influences, which he interpreted as a real separation between mind and matter; and, to make it more complete, an independent pre-existence of the former. Nor was this all. Since knowledge is of likeness in difference, then the central truth of things, the reality underlying all appearance, must be an abiding identity recognised by the soul through her previous communion with it in a purer world. The inevitable tendency of two identities, one subjective and the other objective, was to coalesce in an absolute unity where all distinctions of time and space would have disappeared, carrying the whole mythical machinery along with them; and Plato’s logic is always hovering on the verge of such a consummation without being able fully to accept it. Still, the mystical tendency, which it was reserved for Plotinus to carry out in its entirety, is always present, though restrained by other motives, working for the ascertainment of uniformity in theory and for the enforcement of uniformity in practice. We have accompanied Plato to a point where he begins to see his way towards a radical reconstruction of all existing beliefs and institutions. In the next chapter we shall attempt to show how far he succeeded in this great purpose, how much, in his positive contributions to thought is of permanent, and how much of merely biographical or literary value. FOOTNOTES: [114] _The Dialogues of Plato translated into English._ By B. Jowett, M. A. 2nd ed., 1875. Zeller, _Die Philosophie der Griechen_. Zweiter Theil, erste Abtheilung. _Plato und die alte Academie_, 3rd ed., 1875. [115] Krohn, _Der Platonische Staat_, Halle 1876. [I know this work only through Chiapelli, _Della Interpretazione panteistica di Platone_, Florence, 1881.] [116] III., 418. [117] _Phaedr._, p. 274 B ff. [118] See Zeller’s note on the θεία μοῖρα, _op. cit._ p. 497. [119] The _Charmides_, _Laches_, _Euthyphro_, and _Lysis_. [120] P. 49, A ff. Zeller, 142. [121] _Charmides_, 161 E; _Lysis_, 212 C. [122] _Pensieri_, lxxxiv and lxxxv. [123] _Repub._, 586, A. Jowett, III, p. 481. [124] Zeller, _op. cit._, 777-8. [125] _Repub._, VIII. and IX. [126] Xenophon, _Mem._, III., v., 18. [127] _Gorgias_, 515, C., ff. Jowett, II., 396-400. [128] _Theaetêtus_, 173, A. Jowett, IV., 322. [129] The lecture on Plato in _Representative Man_. [130] _Legg._ 819, D. Jowett, V., 390. [131] _Theaet._, 144. Jowett’s Transl. [132] This expression is borrowed from Prof. Bain. See the chapter on Association by Resemblance in _The Senses and the Intellect_. [133] _Legg._ 716, C. CHAPTER V. PLATO AS A REFORMER. I. In the last chapter we considered the philosophy of Plato chiefly under its critical and negative aspects. We saw how it was exclusively from that side that he at first apprehended and enlarged the dialectic of Socrates, how deeply his scepticism was coloured by the religious reaction of the age, and how he attempted, out of his master’s mouth, to overturn the positive teaching of the master himself. We saw how, in the _Protagoras_, he sketched a theory of ethics, which was no sooner completed than it became the starting-point of a still more extended and arduous enquiry. We followed the widening horizon of his speculations until they embraced the whole contemporary life of Hellas, and involved it in a common condemnation as either hopelessly corrupt, or containing within itself the seeds of corruption. We then saw how, by a farther generalisation, he was led to look for the sources of error in the laws of man’s sensuous nature and of the phenomenal world with which it holds communion; how, moreover, under the guidance of suggestions coming both from within and from without, he reverted to the earlier schools of Greek thought, and brought their results into parallelism with the main lines of Socratic dialectic. And finally, we watched him planting a firm foothold on the basis of mathematical demonstration; seeking in the very constitution of the soul itself for a derivation of the truths which sensuous experience could not impart, and winning back from a more profoundly reasoned religion the hope, the self-confidence, the assurance of perfect knowledge, which had been formerly surrendered in deference to the demands of a merely external and traditional faith. That God alone is wise, and by consequence alone good, might still remain a fixed principle with Plato; but it ceased to operate as a restraint on human aspiration when he had come to recognise an essential unity among all forms of conscious life, which, though it might be clouded and forgotten, could never be entirely effaced. And when Plato tells us, at the close of his career, that God, far more than any individual man, is the measure of all things,[133] who can doubt that he had already learned to identify the human and divine essences in the common notion of a universal soul? The germ of this new dogmatism was present in Plato’s mind from the very beginning, and was partly an inheritance from older forms of thought. The _Apologia_ had reproduced one important feature in the positive teaching of Socrates—the distinction between soul and body, and the necessity of attending to the former rather than to the latter: and this had now acquired such significance as to leave no standing-room for the agnosticism with which it had been incompatible from the first. The same irresistible force of expansion which had brought the human soul into communion with absolute truth, was to be equally verified in a different direction. Plato was too much interested in practical questions to be diverted from them long by any theoretical philosophy; or, perhaps, we should rather say that this interest had accompanied and inspired him throughout. It is from the essential relativity of mind, the profound craving for intellectual sympathy with other minds, that all mystical imaginations and super-subtle abstractions take rise; so that, when the strain of transcendent absorption and ecstasy is relaxed under the chilling but beneficent contact of earthly experience, they become condensed into ideas for the reconstitution of life and society on a basis of reciprocity, of self-restraint, and of self-devotion to a commonwealth greater and more enduring than any individual, while, at the same time, presenting to each in objective form the principle by virtue of which only, instead of being divided, he can become reconciled with himself. Here we have the creed of all philosophy, whether theological, metaphysical, or positive, that there is, or that there should be, this threefold unity of feeling, of action, and of thought, of the soul, of society, and of universal existence, to win which is everlasting life, while to be without it is everlasting death. This creed must be re-stated and re-interpreted at every revolution of thought. We have to see how it was, for the first time, stated and interpreted by Plato. The principal object of Plato’s negative criticism had been to emphasise the distinction between reality and appearance in the world without, between sense, or imagination, and reason in the human soul. True to the mediatorial spirit of Greek thought, his object now was to bridge over the seemingly impassable gulf. We must not be understood to say that these two distinct, and to some extent contrasted, tendencies correspond to two definitely divided periods of his life. It is evident that the tasks of dissection and reconstruction were often carried on conjointly, and represented two aspects of an indivisible process. But on the whole there is good reason to believe that Plato, like other men, was more inclined to pull to pieces in his youth and to build up in his later days. We are, therefore, disposed to agree with those critics who assign both the _Phaedrus_ and the _Symposium_ to a comparatively advanced stage of Platonic speculation. It is less easy to decide which of the two was composed first, for there seems to be a greater maturity of thought in the one and of style in the other. For our purposes it will be most convenient to consider them together. We have seen how Plato came to look on mathematics as an introduction to absolute knowledge. He now discovered a parallel method of approach towards perfect wisdom in an order of experience which to most persons might seem as far as possible removed from exact science—in those passionate feelings which were excited in the Greek imagination by the spectacle of youthful beauty, without distinction of sex. There was, at least among the Athenians, a strong intellectual element in the attachments arising out of such feelings; and the strange anomaly might often be seen of a man devoting himself to the education of a youth whom he was, in other respects, doing his utmost to corrupt. Again, the beauty by which a Greek felt most fascinated came nearer to a visible embodiment of mind than any that has ever been known, and as such could be associated with the purest philosophical aspirations. And, finally, the passion of love in its normal manifestations is an essentially generic instinct, being that which carries an individual most entirely out of himself, making him instrumental to the preservation of the race in forms of ever-increasing comeliness and vigour; so that, given a wise training and a wide experience, the maintenance of a noble breed may safely be entrusted to its infallible selection.[134] All these points of view have been developed by Plato with such copiousness of illustration and splendour of language that his name is still associated in popular fancy with an ideal of exalted and purified desire. So far, however, we only stand on the threshold of Platonic love. The earthly passion, being itself a kind of generalisation, is our first step in the ascent to that highest stage of existence where wisdom and virtue and happiness are one—the good to which all other goods are related as means to an end. But love is not only an introduction to philosophy, it is a type of philosophy itself. Both are conditions intermediate between vacuity and fulfilment; desire being by its very nature dissatisfied, and vanishing at the instant that its object is attained. The philosopher is a lover of wisdom, and therefore not wise; and yet not wholly ignorant, for he knows that he knows nothing. Thus we seem to be thrown back on the standpoint of Plato’s earliest agnosticism. Nevertheless, if the _Symposium_ agrees nominally with the _Apologia_, in reality it marks a much more advanced point of speculation. The idea of what knowledge is has begun to assume a much clearer expression. We gather from various hints and suggestions that it is the perception of likeness; the very process of ascending generalisation typified by intellectual love. It is worthy of remark that in the Platonic Erôs we have the germ—or something more than the germ—of Aristotle’s whole metaphysical system.[135] According to the usual law of speculative evolution, what was subjective in the one becomes objective in the other. With Plato the passion for knowledge had been merely the guiding principle of a few chosen spirits. With Aristotle it is the living soul of Nature, the secret spring of movement, from the revolution of the outermost starry sphere to the decomposition and recomposition of our mutable terrestrial elements; and from these again through the whole scale of organic life, up to the moral culture of man and the search for an ideally-constituted state. What enables all these myriad movements to continue through eternity, returning ever in an unbroken circle on themselves, is the yearning of unformed matter—that is to say, of unrealised power—towards the absolute unchanging actuality, the self-thinking thought, unmoved, but moving every other form of existence by the desire to participate in its ineffable perfection. Born of the Hellenic enthusiasm for beauty, this wonderful conception subsequently became incorporated with the official teaching of Catholic theology. What had once been a theme for ribald merriment or for rhetorical ostentation among the golden youth of Athens, furnished the motive for his most transcendent meditations to the Angel of the Schools; but the fire which lurked under the dusty abstractions of Aquinas needed the touch of a poet and a lover before it could be rekindled into flame. The eyes of Beatrice completed what the dialectic of Plato had begun; and the hundred cantos of her adorer found their fitting close in the love that moves the sun and the other stars. We must, however, observe that, underlying all these poetical imaginations, there is a deeper and wider law of human nature to which they unconsciously bear witness—the intimate connexion of religious mysticism with the passion of love. By this we do not mean the constant interference of the one with the other, whether for the purpose of stimulation, as with the naturalistic religions, or for the purpose of restraint, as with the ethical religions; but we mean that they seem to divide between them a common fund of nervous energy, so that sometimes their manifestations are inextricably confounded, as in certain debased forms of modern Christianity; sometimes they utterly exclude one another; and sometimes, which is the most frequent case of any, the one is transformed into the other, their substantial identity and continuity being indicated very frankly by their use of the same language, the same ritual, and the same aesthetic decoration. And this will show how the decay of religious belief may be accompanied by an outbreak of moral licence, without our being obliged to draw the inference that passion can only be held in check by irrational beliefs, or by organisations whose supremacy is fatal to industrial, political, and intellectual progress. For, if our view of the case be correct, the passion was not really restrained, but only turned in a different direction, and frequently nourished into hysterical excess; so that, with the inevitable decay of theology, it returns to its old haunts, bringing with it seven devils worse than the first. After the Crusades came the Courts of Love; after the Dominican and Franciscan movements, the Renaissance; after Puritanism, the Restoration; after Jesuitism, the Regency. Nor is this all. The passion of which we are speaking, when abnormally developed and unbalanced by severe intellectual exercise, is habitually accompanied by delirious jealousy, by cruelty, and by deceit. On taking the form of religion, the influence of its evil associates immediately becomes manifest in the suppression of alien creeds, in the tortures inflicted on their adherents, and in the maxim that no faith need be kept with a heretic. Persecution has been excused on the ground that any means were justifiable for the purpose of saving souls from eternal torment. But how came it to be believed that such a consequence was involved in a mere error of judgment? The faith did not create the intolerance, but the intolerance created the faith, and so gave an idealised expression to the jealous fury accompanying a passion which no spiritual alchemy can purify from its original affinities. It is not by turning this most terrible instinct towards a supernatural object that we should combat it, but by developing the active and masculine in preference to the emotional and feminine side of our nervous organisation.[136] In addition to its other great lessons, the _Symposium_ has afforded Plato an opportunity for contrasting his own method of philosophising with pre-Socratic modes of thought. For it consists of a series of discourses in praise of love, so arranged as to typify the manner in which Greek speculation, after beginning with mythology, subsequently advanced to physical theories of phenomena, then passed from the historical to the contemporary method, asking, not whence did things come, but what are they in themselves; and finally arrived at the logical standpoint of analysis, classification, and induction. The nature of dialectic is still further elucidated in the _Phaedrus_, where it is also contrasted with the method, or rather the no-method, of popular rhetoric. Here, again, discussions about love are chosen as an illustration. A discourse on the subject by no less a writer than Lysias is quoted and shown to be deficient in the most elementary requisites of logical exposition. The different arguments are strung together without any principle of arrangement, and ambiguous terms are used without being defined. In insisting on the necessity of definition, Plato followed Socrates; but he defines according to a totally different method. Socrates had arrived at his general notions partly by a comparison of particular instances with a view to eliciting the points where they agreed, partly by amending the conceptions already in circulation. We have seen that the earliest Dialogues attributed to Plato are one long exposure of the difficulties attending such a procedure; and his subsequent investigations all went to prove that nothing solid could be built on such shifting foundations as sense and opinion. Meanwhile increasing familiarity with the great ontological systems had taught him to begin with the most general notions, and to work down from them to the most particular. The consequence was that dialectic came to mean nothing but classification or logical division. Definition was absorbed into this process, and reasoning by syllogism was not yet differentiated from it. To tell what a thing was, meant to fix its place in the universal order of existence, and its individual existence was sufficiently accounted for by the same determination. If we imagine first a series of concentric circles, then a series of contrasts symmetrically disposed on either side of a central dividing line, and finally a series of transitions descending from the most absolute unity to the most irregular diversity—we shall, by combining the three schemes, arrive at some understanding of the Platonic dialectic. To assign anything its place in these various sequences was at once to define it and to demonstrate the necessity of its existence. The arrangement is also equivalent to a theory of final causes; for everything has a function to perform, marked out by its position, and bringing it into relation with the universal order. Such a system would inevitably lead to the denial of evil, were not evil itself interpreted as the necessary correlative of good, or as a necessary link in the descending manifestations of reality. Moreover, by virtue of his identifying principle, Plato saw in the lowest forms a shadow or reflection of the highest. Hence the many surprises, concessions, and returns to abandoned positions which we find in his later writings. The three moments of Greek thought, circumscription, antithesis, and mediation, work in such close union, or with such bewildering rapidity of alternation, through all his dialectic, that we are never sure whither he is leading us, and not always sure that he knows it himself. In the opening chapter of this work we endeavoured to explain how the Pythagorean philosophy arose out of the intoxicated delight inspired by a first acquaintance with the manifold properties of number and figure. If we would enter into the spirit of Platonism, we must similarly throw ourselves back into the time when the idea of a universal classification first dawned on men’s minds. We must remember how it gratified the Greek love of order combined with individuality; what unbounded opportunities for asking and answering questions it supplied; and what promises of practical regeneration it held out. Not without a shade of sadness for so many baffled efforts and so many blighted hopes, yet also with a grateful recollection of all that reason has accomplished, and with something of his own high intellectual enthusiasm, shall we listen to Plato’s prophetic words—words of deeper import than their own author knew—‘If I find any man who is able to see a One and Many in Nature, him I follow and walk in his steps as if he were a god.’[137] It is interesting to see how the most comprehensive systems of the present century, even when most opposed to the metaphysical spirit, are still constructed on the plan long ago sketched by Plato. Alike in his classification of the sciences, in his historical deductions, and in his plans for the reorganisation of society, Auguste Comte adopts a scheme of ascending or descending generality. The conception of differentiation and integration employed both by Hegel and by Mr. Herbert Spencer is also of Platonic origin; only, what with the ancient thinker was a statical law of order has become with his modern successors a dynamic law of progress; while, again, there is this distinction between the German and the English philosopher, that the former construes as successive moments of the Idea what the latter regards as simultaneous and interdependent processes of evolution. II. The study of psychology with Plato stands in a fourfold relation to his general theory of the world. The dialectic method, without which Nature would remain unintelligible, is a function of the soul, and constitutes its most essential activity; then soul, as distinguished from body, represents the higher, supersensual element of existence; thirdly, the objective dualism of reality and appearance is reproduced in the subjective dualism of reason and sense; and lastly, soul, as the original spring of movement, mediates between the eternal entities which are unmoved and the material phenomena which are subject to a continual flux. It is very characteristic of Plato that he first strains an antithesis to the utmost and then endeavours to reconcile its extremes by the interposition of one or more intermediate links. So, while assigning this office to soul as a part of the universe, he classifies the psychic functions themselves according to a similar principle. On the intellectual side he places true opinion, or what we should now call empirical knowledge, midway between demonstration and sense-perception. Such at least seems to be the result reached in the _Theaetêtus_ and the _Meno_. In the _Republic_ a further analysis leads to a somewhat different arrangement. Opinion is placed between knowledge and ignorance; while the possible objects to which it corresponds form a transition from being to not-being. Subsequently mathematical reasoning is distinguished from the higher science which takes cognisance of first principles, and thus serves to connect it with simple opinion; while this again, dealing as it does with material objects, is related to the knowledge of their shadows as the most perfect science is related to mathematics.[138] Turning from dialectic to ethics, Plato in like manner feels the need of interposing a mediator between reason and appetite. The quality chosen for this purpose he calls θυμός, a term which does not, as has been erroneously supposed, correspond to our word Will, but rather to pride, or the feeling of personal honour. It is both the seat of military courage and the natural auxiliary of reason, with which it co-operates in restraining the animal desires. It is a characteristic difference between Socrates and Plato that the former should have habitually reinforced his arguments for virtue by appeals to self-interest; while the latter, with his aristocratic way of looking at things, prefers to enlist the aid of a haughtier feeling on their behalf. Aristotle followed in the same track when he taught that to be overcome by anger is less discreditable than to be overcome by desire. In reality none of the instincts tending to self-preservation is more praiseworthy than another, or more amenable to the control of reason. Plato’s tripartite division of mind cannot be made to fit into the classifications of modern psychology, which are adapted not only to a more advanced state of knowledge but also to more complex conditions of life. But the characters of women, by their greater simplicity and uniformity, show to some extent what those of men may once have been; and it will, perhaps, confirm the analysis of the _Phaedrus_ to recall the fact that personal pride is still associated with moral principle in the guardianship of female virtue. If the soul served to connect the eternal realities with the fleeting appearances by which they were at once darkened, relieved, and shadowed forth, it was also a bond of union between the speculative and the practical philosophy of Plato; and in discussing his psychology we have already passed from the one to the other. The transition will become still easier if we remember that the question, ‘What is knowledge?’ was, according to our view, originally suggested by a theory reducing ethical science to a hedonistic calculus, and that along with it would arise another question, ‘What is pleasure?’ This latter enquiry, though incidentally touched on elsewhere, is not fully dealt with in any Dialogue except the _Philêbus_, which we agree with Prof. Jowett in referring to a very late period of Platonic authorship. But the line of argument which it pursues had probably been long familiar to our philosopher. At any rate, the _Phaedo_, the _Republic_, and perhaps the _Gorgias_, assume, as already proved, that pleasure is not the highest good. The question is one on which thinkers are still divided. It seems, indeed, to lie outside the range of reason, and the disputants are accordingly obliged to invoke the authority either of individual consciousness or of common consent on behalf of their respective opinions. We have, however, got so far beyond the ancients that the doctrine of egoistic hedonism has been abandoned by almost everybody. The substitution of another’s pleasure for our own as the object of pursuit was not a conception which presented itself to any Greek moralist, although the principle of self-sacrifice was maintained by some of them, and especially by Plato, to its fullest extent. Pleasure-seeking being inseparably associated with selfishness, the latter was best attacked through the former, and if Plato’s logic does not commend itself to our understanding, we must admit that it was employed in defence of a noble cause. The style of polemics adopted on this occasion, whatever else may be its value, will serve excellently to illustrate the general dialectic method of attack. When Plato particularly disliked a class of persons, or an institution, or an art, or a theory, or a state of consciousness, he tried to prove that it was confused, unstable, and self-contradictory; besides taking full advantage of any discredit popularly attached to it. All these objections are brought to bear with full force against pleasure. Some pleasures are delusive, since the reality of them falls far short of the anticipation; all pleasure is essentially transitory, a perpetual becoming, never a fixed state, and therefore not an end of action; pleasures which ensue on the satisfaction of desires are necessarily accompanied by pains and disappear simultaneously with them; the most intense, and for that reason the most typical, pleasures, are associated with feelings of shame, and their enjoyment is carefully hidden out of sight. Such arguments have almost the air of an afterthought, and Plato was perhaps more powerfully swayed by other considerations, which we shall now proceed to analyse. When pleasure was assumed to be the highest good, knowledge was agreed to be the indispensable means for its attainment; and, as so often happens, the means gradually substituted itself for the end. Nor was this all; for knowledge (or reason) being not only the means but the supreme arbiter, when called on to adjudicate between conflicting claims, would naturally pronounce in its own favour. Naturally, also, a moralist who made science the chief interest of his own life would come to believe that it was the proper object of all life, whether attended or not by any pleasurable emotion. And so, in direct opposition to the utilitarian theory, Plato declares at last that to brave a lesser pain in order to escape from a greater, or to renounce a lesser pleasure in order to secure a greater, is cowardice and intemperance in disguise; and that wisdom, which he had formerly regarded as a means to other ends, is the one end for which everything else should be exchanged.[139] Perhaps it may have strengthened him in this attitude to observe that the many, whose opinion he so thoroughly despised, made pleasure their aim in life, while the fastidious few preferred knowledge. Yet, after a time, even the latter alternative failed to satisfy his restless spirit. For the conception of knowledge resolved itself into the deeper conceptions of a knowing subject and a known object, the soul and the universe, each of which became in turn the supreme ideal. What interpretation should be given to virtue depended on the choice between them. According to the one view it was a purification of the higher principle within us from material wants and passions. Sensual gratifications should be avoided, because they tend to degrade and pollute the soul. Death should be fearlessly encountered, because it will release her from the restrictions of bodily existence. But Plato had too strong a grasp on the realities of life to remain satisfied with a purely ascetic morality. Knowledge, on the objective side, brought him into relation with an organised universe where each individual existed, not for his own sake but for the sake of the whole, to fulfil a definite function in the system of which he formed a part. And if from one point of view the soul herself was an absolutely simple indivisible substance, from another point of view she reflected the external order, and only fulfilled the law of her being when each separate faculty was exercised within its appropriate sphere. There still remained one last problem to solve, one point where the converging streams of ethical and metaphysical speculation met and mixed. Granted that knowledge is the soul’s highest energy, what is the object of this beatific vision? Granted that all particular energies co-operate for a common purpose, what is the end to which they are subordinated? Granted that dialectic leads us up through ascending gradations to one all-comprehensive idea, how is that idea to be defined? Plato only attempts to answer this last question by re-stating it under the form of an illustration. As the sun at once gives life to all Nature, and light to the eye by which Nature is perceived, so also the idea of Good is the cause of existence and of knowledge alike, but transcends them both as an absolute unity, of which we cannot even say that it is, for the distinction of subject and predicate would bring back relativity and plurality again. Here we seem to have the Socratic paradox reversed. Socrates identified virtue with knowledge, but, at the same time, entirely emptied the latter of its speculative content. Plato, inheriting the idea of knowledge in its artificially restricted significance, was irresistibly drawn back to the older philosophy whence it had been originally borrowed; then, just as his master had given an ethical application to science, so did he, travelling over the same ground in an opposite direction, extend the theory of ethics far beyond its legitimate range, until a principle which seemed to have no meaning, except in reference to human conduct, became the abstract bond of union between all reality and all thought. Whether Plato ever succeeded in making the idea of Good quite clear to others, or even to himself, is more than we can tell. In the _Republic_ he declines giving further explanations on the ground that his pupils have not passed through the necessary mathematical initiation. Whether quantitative reasoning was to furnish the form or the matter of transcendent dialectic is left undetermined. We are told that on one occasion a large audience assembled to hear Plato lecture on the Good, but that, much to their disappointment, the discourse was entirely filled with geometrical and astronomical investigations. Bearing in mind, however, that mathematical science deals chiefly with equations, and that astronomy, according to Plato, had for its object to prove the absolute uniformity of the celestial motions, we may perhaps conclude that the idea of Good meant no more than the abstract notion of identity or indistinguishable likeness. The more complex idea of law as a uniformity of relations, whether coexistent or successive, had not then dawned, but it has since been similarly employed to bring physics into harmony with ethics and logic. III. So far we have followed the evolution of Plato’s philosophy as it may have been effected under the impulse of purely theoretical motives. We have now to consider what form was imposed on it by the more imperious exigencies of practical experience. Here, again, we find Plato taking up and continuing the work of Socrates, but on a vastly greater scale. There was, indeed, a kind of pre-established harmony between the expression of thought on the one hand and the increasing need for its application to life on the other. For the spread of public corruption had gone on _pari passu_ with the development of philosophy. The teaching of Socrates was addressed to individuals, and dealt chiefly with private morality. On other points he was content to accept the law of the land and the established political constitution as sufficiently safe guides. He was not accustomed to see them defied or perverted into instruments of selfish aggrandisement; nor, apparently, had the possibility of such a contingency occurred to him. Still less did he imagine that all social institutions then existing were radically wrong. Hence the personal virtues held a more important place in his system than the social virtues. His attacks were directed against slothfulness and self-indulgence, against the ignorant temerity which hurried some young men into politics before their education was finished, and the timidity or fastidiousness which prevented others from discharging the highest duties of citizenship. Nor, in accepting the popular religion of his time, had he any suspicion that its sanctions might be invoked on behalf of successful violence and fraud. We have already shown how differently Plato felt towards his age, and how much deeper as well as more shameless was the demoralisation with which he set himself to contend. It must also be remembered how judicial proceedings had come to overshadow every other public interest; and how the highest culture of the time had, at least in his eyes, become identified with the systematic perversion of truth and right. These considerations will explain why Greek philosophy, while moving on a higher plane, passed through the same orbit which had been previously described by Greek poetry. Precisely as the lessons of moderation in Homer had been followed by the lessons of justice in Aeschylus, precisely as the religion which was a selfish traffic between gods and men, and had little to tell of a life beyond the grave, was replaced by the nobler faith in a divine guardianship of morality and a retributive judgment after death—so also did the Socratic ethics and the Socratic theology lead to a system which made justice the essence of morality and religion its everlasting consecration. Temperance and justice are very clearly distinguished in our minds. The one is mainly a self-regarding, the other mainly a social virtue. But it would be a mistake to suppose that the distinction was equally clear to Plato. He had learned from Socrates that all virtue is one. He found himself confronted by men who pointedly opposed interest to honour and expediency to fair-dealing, without making any secret of their preference for the former. Here, as elsewhere, he laboured to dissolve away the vulgar antithesis and to substitute for it a deeper one—the antithesis between real and apparent goods. He was quite ready to imagine the case of a man who might have to incur all sorts of suffering in the practice of justice even to the extent of infamy, torture, and death; but without denying that these were evils, he held that to practise injustice with the accompaniment of worldly prosperity was a greater evil still. And this conviction is quite unconnected with his belief in a future life. He would not have agreed with St. Paul that virtue is a bad calculation without the hope of a reward for it hereafter. His morality is absolutely independent of any extrinsic considerations. Nevertheless, he holds that in our own interest we should do what is right; and it never seems to have entered his thoughts that there could be any other motive for doing it. We have to explain how such a paradox was possible. Plato seems to have felt very strongly that all virtuous action tends towards a good exceeding in value any temporary sacrifice which it may involve; and the accepted connotation of ethical terms went entirely along with this belief. But he could not see that a particular action might be good for the community at large and bad for the individual who performed it, not in a different sense but in the very same sense, as involving a diminution of his happiness. For from Plato’s abstract and generalising point of view all good was homogeneous, and the welfare of the individual was absolutely identified with the welfare of the whole to which he belonged. As against those who made right dependent on might and erected self-indulgence into the law of life Plato occupied an impregnable position. He showed that such principles made society impossible, and that without honour even a gang of thieves cannot hold together.[140] He also saw that it is reason which brings each individual into relation with the whole and enables him to understand his obligations towards it; but at the same time he gave this reason a personal character which does not properly belong to it; or, what comes to the same thing, he treated human beings as pure _entia rationis_, thus unwittingly removing the necessity for having any morality at all. On his assumption it would be absurd to break the law; but neither would there be any temptation to break it, nor would any unpleasant consequences follow on its violation. Plato speaks of injustice as an injury to the soul’s health, and therefore as the greatest evil that can befall a human being, without observing that the inference involves a confusion of terms. For his argument requires that soul should mean both the whole of conscious life and the system of abstract notions through which we communicate and co-operate with our fellow-creatures. All crime is a serious disturbance to the latter, for it cannot without absurdity be made the foundation of a general rule; but, apart from penal consequences, it does not impair, and may benefit the former. While Plato identified the individual with the community by slurring over the possible divergence of their interests, he still further contributed to their logical confusion by resolving the ego into a multitude of conflicting faculties and impulses supposed to represent the different classes of which a State is made up. His opponents held that justice and law emanate from the ruling power in the body politic; and they were brought to admit that supreme power is properly vested in the wisest and best citizens. Transferring these principles to the inner forum, he maintained that a psychological aristocracy could only be established by giving reason a similar control over the animal passions.[141] At first sight, this seemed to imply no more than a return to the standpoint of Socrates, or of Plato himself in the _Protagoras_. The man who indulges his desires within the limits prescribed by a regard for their safe satisfaction through his whole life, may be called temperate and reasonable, but he is not necessarily just. If, however, we identify the paramount authority within with the paramount authority without, we shall have to admit that there is a faculty of justice in the individual soul corresponding to the objective justice of political law; and since the supreme virtue is agreed on all hands to be reason, we must go a step further and admit that justice is reason, or that it is reasonable to be just; and that by consequence the height of injustice is the height of folly. Moreover, this fallacious substitution of justice for temperance was facilitated by the circumstance that although the former virtue is not involved in the latter, the latter is to a very great extent involved in the former. Self-control by no means carries with it a respect for the rights of others; but where such respect exists it necessitates a considerable amount of self-control. We trust that the steps of a difficult argument have been made clear by the foregoing analysis; and that the whole process has been shown to hinge on the ambiguous use of such notions as the individual and the community, of which the one is paradoxically construed as a plurality and the other as a unity; justice, which is alternately taken in the sense of control exercised by the worthiest, control of passion in the general interest, control of our passions in the interest of others, and control of the same passions in our own interest; and wisdom or reason, which sometimes means any kind of excellence, sometimes the excellence of a harmonious society, and sometimes the excellence of a well-balanced mind. Thus, out of self-regarding virtue social virtue is elicited, the whole process being ultimately conditioned by that identifying power which was at once the strength and the weakness of Plato’s genius. Plato knew perfectly well that although rhetoricians and men of the world might be silenced, they could not be converted nor even convinced by such arguments as these. So far from thinking it possible to reason men into virtue, he has observed of those who are slaves to their senses that you must improve them before you can teach them the truth.[L] And he felt that if the complete assimilation of the individual and the community was to become more than a mere logical formula, it must be effected by a radical reform in the training of the one and in the institutions of the other. Accordingly, he set himself to elaborate a scheme for the purpose, our knowledge of which is chiefly derived from his greatest work, the _Republic_. We have already made large use of the negative criticism scattered through that Dialogue; we have now to examine the positive teaching by which it was supplemented. IV. Plato, like Socrates, makes religious instruction the basis of education. But where the master had been content to set old beliefs on a new basis of demonstration, the disciple aimed at nothing less than their complete purification from irrational and immoral ingredients. He lays down two great principles, that God is good, and that He is true.[142] Every story which is inconsistent with such a character must be rejected; so also must everything in the poets which redounds to the discredit of the national heroes, together with everything tending in the remotest degree to make vice attractive or virtue repellent. It is evident that Plato, like Xenophanes, repudiated not only the scandalous details of popular mythology, but also the anthropomorphic conceptions which lay at its foundation; although he did not think it advisable to state his unbelief with equal frankness. His own theology was a sort of star-worship, and he proved the divinity of the heavenly bodies by an appeal to the uniformity of their movements.[143] He further taught that the world was created by an absolutely good Being; but we cannot be sure that this was more than a popular version of the theory which placed the abstract idea of Good at the summit of the dialectic series. The truth is that there are two distinct types of religion, the one chiefly interested in the existence and attributes of God, the other chiefly interested in the destiny of the human soul. The former is best represented by Judaism, the latter by Buddhism. Plato belongs to the psychic rather than to the theistic type. The doctrine of immortality appears again and again in his Dialogues, and one of the most beautiful among them is entirely devoted to proving it. He seems throughout to be conscious that he is arguing in favour of a paradox. Here, at least, there are no appeals to popular prejudice such as figure so largely in similar discussions among ourselves. The belief in immortality had long been stirring; but it had not taken deep root among the Ionian Greeks. We cannot even be sure that it was embraced as a consoling hope by any but the highest minds anywhere in Hellas, or by them for more than a brief period. It would be easy to maintain that this arose from some natural incongeniality to the Greek imagination in thoughts which drew it away from the world of sense and the delights of earthly life. But the explanation breaks down immediately when we attempt to verify it by a wider experience. No modern nation enjoys life so keenly as the French. Yet, quite apart from traditional dogmas, there is no nation that counts so many earnest supporters of the belief in a spiritual existence beyond the grave. And, to take an individual example, it is just the keen relish which Mr. Browning’s Cleon has for every sort of enjoyment which makes him shrink back with horror from the thought of annihilation, and grasp at any promise of a happiness to be prolonged through eternity. A closer examination is needed to show us by what causes the current of Greek thought was swayed. The great religious movement of the sixth and fifth centuries—chiefly represented for us by the names of Pythagoras, Aeschylus, and Pindar—would in all probability have entirely won over the educated classes, and given definiteness to the half-articulate utterances of popular tradition, had it not been arrested prematurely by the development of physical speculation. We showed in the first chapter that Greek philosophy in its earliest stages was entirely materialistic. It differed, indeed, from modern materialism in holding that the soul, or seat of conscious life, is an entity distinct from the body; but the distinction was one between a grosser and a finer matter, or else between a simpler and a more complex arrangement of the same matter, not between an extended and an indivisible substance. Whatever theories, then, were entertained with respect to the one would inevitably come to be entertained also with respect to the other. Now, with the exception of the Eleates, who denied the reality of change and separation altogether, every school agreed in teaching that all particular bodies are formed either by differentiation or by decomposition and recomposition out of the same primordial elements. From this it followed, as a natural consequence, that, although the whole mass of matter was eternal, each particular aggregate of matter must perish in order to release the elements required for the formation of new aggregates. It is obvious that, assuming the soul to be material, its immortality was irreconcilable with such a doctrine as this. A combination of four elements and two conflicting forces, such as Empedocles supposed the human mind to be, could not possibly outlast the organism in which it was enclosed; and if Empedocles himself, by an inconsistency not uncommon with men of genius, refused to draw the only legitimate conclusion from his own principles, the discrepancy could not fail to force itself on his successors. Still more fatal to the belief in a continuance of personal identity after death was the theory put forward by Diogenes of Apollonia, that there is really no personal identity even in life—that consciousness is only maintained by a perpetual inhalation of the vital air in which all reason resides. The soul very literally left the body with the last breath, and had a poor chance of holding together afterwards, especially, as the wits observed, if a high wind happened to be blowing at the time. It would appear that even in the Pythagorean school there had been a reaction against a doctrine which its founder had been the first to popularise in Hellas. The Pythagoreans had always attributed great importance to the conceptions of harmony and numerical proportion; and they soon came to think of the soul as a ratio which the different elements of the animal body bore to one another; or as a musical concord resulting from the joint action of its various members, which might be compared to the strings of a lute. But ‘When the lute is broken Sweet tones are remembered not.’ And so, with the dissolution of our bodily organism, the music of consciousness would pass away for ever. Perhaps no form of psychology taught in the Greek schools has approached nearer to modern thought than this. It was professed at Thebes by two Pythagoreans, Cebes and Simmias, in the time of Plato. He rightly regarded them as formidable opponents, for they were ready to grant whatever he claimed for the soul in the way of immateriality and superiority to the body, while denying the possibility of its separate existence. We may so far anticipate the course of our exposition as to mention that the direct argument by which he met them was a reference to the moving power of mind, and to the constraint exercised by reason over passionate impulse; characteristics which the analogy with a musical harmony failed to explain. But his chief reliance was on an order of considerations, the historical genesis of which we shall now proceed to trace. It was by that somewhat slow and circuitous process, the negation of a negation, that spiritualism was finally established. The shadows of doubt gathered still more thickly around futurity before another attempt could be made to remove them. For the scepticism of the Humanists and the ethical dialectic of Socrates, if they tended to weaken the dogmatic materialism of physical philosophy, were at first not more favourable to the new faith which that philosophy had suddenly eclipsed. For the one rejected every kind of supernaturalism; and the other did not attempt to go behind what had been directly revealed by the gods, or was discoverable from an examination of their handiwork. Nevertheless, the new enquiries, with their exclusively subjective direction, paved the way for a return to the religious development previously in progress. By leading men to think of mind as, above all, a principle of knowledge and deliberate action, they altogether freed it from those material associations which brought it under the laws of external Nature, where every finite existence was destined, sooner or later, to be reabsorbed and to disappear. The position was completely reversed when Nature was, as it were, brought up before the bar of Mind to have her constitution determined or her very existence denied by that supreme tribunal. If the subjective idealism of Protagoras and Gorgias made for spiritualism, so also did the teleological religion of Socrates. It was impossible to assert the priority and superiority of mind to matter more strongly than by teaching that a designing intelligence had created the whole visible universe for the exclusive enjoyment of man. The infinite without was in its turn absorbed by the infinite within. Finally, the logical method of Socrates contained in itself the germs of a still subtler spiritualism which Plato now proceeded to work out. The dialectic theory, considered in its relation to physics, tended to substitute the study of uniformity for the study of mechanical causation. But the general conceptions established by science were a kind of soul in Nature; they were immaterial, they could not be perceived by sense, and yet, remaining as they did unchanged in a world of change, they were far truer, far more real, than the phenomena to which they gave unity and definition. Now these self-existent ideas, being subjective in their origin, readily reacted on mind, and communicated to it those attributes of fixedness and eternal duration which had in truth been borrowed by them from Nature, not by Nature from them. Plato argued that the soul was in possession of ideas too pure to have been derived from the suggestions of sense, and therefore traceable to the reminiscences of an ante-natal experience. But we can see that the reminiscence was all on the side of the ideas; it was they that betrayed their human origin by the birthmark of abstraction and finality—betokening the limitation of man’s faculties and the interest of his desires—which still clung to them when from a temporary law of thought they were erected into an everlasting law of things. As Comte would say, Plato was taking out of his conceptions what he had first put into them himself. And, if this consideration applies to all his reasonings on the subject of immortality, it applies especially to what he regards as the most convincing demonstration of any. There is one idea, he tells us, with which the soul is inseparably and essentially associated—namely, the idea of life. Without this, soul can no more be conceived than snow without cold or fire without heat; nor can death approach it without involving a logical contradiction. To assume that the soul is separable from the body, and that life is inseparable from the soul, was certainly an expeditious method of proof. To a modern, it would have the further disadvantage of proving too much. For, by parity of reasoning, every living thing must have an immortal soul, and every soul must have existed from all eternity. Plato frankly accepted both conclusions, and even incorporated them with his ethical system. He looked on the lower animals as so many stages in a progressive degradation to which human beings had descended through their own violence or sensuality, but from which it was possible for them to return after a certain period of penitence and probation. At other times he describes a hell, a purgatory, and a heaven, not unlike what we read of in Dante, without apparently being conscious of any inconsistency between the two representations. It was, indeed, an inconsistency such as we find in the highest order of intellects, the inconsistency of one who mediated between two worlds, between naturalistic metempsychosis on the one side, and ethical individualism on the other. It was not merely the immortality, it was the eternity of the soul that Plato taught. For him the expectation of a life beyond the grave was identified with the memory of an ante-natal existence, and the two must stand or fall together. When Shelley’s shipwrecked mother exclaims to her child:— ‘Alas! what is life, what is death, what are we, That when the ship sinks we no longer may be! What! to see thee no more, and to feel thee no more, To be after life what we have been before!’ Her despair is but the inverted image of Plato’s hope, the return to a purer state of being where knowledge will no longer be obscured by passing through the perturbing medium of sight and touch. Again, modern apologists for the injustice and misery of the present system[144] argue that its inequalities will be redressed in a future state. Plato conversely regarded the sufferings of good men as a retribution for former sin, or as the result of a forgotten choice. The authority of Pindar and of ancient tradition generally may have influenced his belief, but it had a deeper ground in the logic of a spiritualistic philosophy. The dualism of soul and body is only one form of his fundamental antithesis between the changeless essence and the transitory manifestations of existence. A pantheism like Spinoza’s was the natural outcome of such a system; but his practical genius or his ardent imagination kept Plato from carrying it so far. Nor in the interests of progress was the result to be regretted; for theology had to pass through one more phase before the term of its beneficent activity could be reached. Ethical conceptions gained a new significance in the blended light of mythology and metaphysics; those who made it their trade to pervert justice at its fountain-head might still tremble before the terrors of a supernatural tribunal; or if Plato could not regenerate the life of his own people he could foretell what was to be the common faith of Europe in another thousand years; and memory, if not hope, is the richer for those magnificent visions where he has projected the eternal conflict between good and evil into the silence and darkness by which our lives are shut in on every side. V. Plato had begun by condemning poetry only in so far as it was inconsistent with true religion and morality. At last, with his usual propensity to generalise, he condemned it and, by implication, every imitative art _quâ_ art, as a delusion and a sham, twice removed from the truth of things, because a copy of the phenomena which are themselves unreal representations of an archetypal idea. His iconoclasm may remind us of other ethical theologians both before and after, whether Hebrew, Moslem, or Puritan. If he does not share their fanatical hatred for plastic and pictorial representations, it is only because works of that class, besides being of a chaster character, exercised far less power over the Greek imagination than epic and dramatic poetry. Moreover, the tales of the poets were, according to Plato, the worst lies of any, since they were believed to be true; whereas statues and pictures differed too obviously from their originals for any such illusion to be produced in their case. Like the Puritans, again, Plato sanctioned the use of religious hymns, with the accompaniment of music in its simplest and most elevated forms. Like them, also, he would have approved of literary fiction when it was employed for edifying purposes. Works like the _Faery Queen_, _Paradise Lost_, and the _Pilgrim’s Progress_, would have been his favourites in English literature; and he might have extended the same indulgence to fictions of the Edgeworthian type, where the virtuous characters always come off best in the end. The reformed system of education was to be not only moral and religious but also severely scientific. The place given to mathematics as the foundation of a right intellectual training is most remarkable, and shows how truly Plato apprehended the conditions under which knowledge is acquired and enlarged. Here, as in other respects, he is, more even than Aristotle, the precursor of Auguste Comte. He arranges the mathematical sciences, so far as they then existed, in their logical order; and his remarks on the most general ideas suggested by astronomy read like a divination of rational mechanics. That a recommendation of such studies should be put into the mouth of Socrates is a striking incongruity. The older Plato grew the farther he seems to have advanced from the humanist to the naturalistic point of view; and, had he been willing to confess it, Hippias and Prodicus were the teachers with whom he finally found himself most in sympathy. Macaulay has spoken as if the Platonic philosophy was totally unrelated to the material wants of men. This, however, is a mistake. It is true that, in the _Republic_, science is not regarded as an instrument for heaping up fresh luxuries, or for curing the diseases which luxury breeds; but only because its purpose is held to be the discovery of those conditions under which a healthy, happy, and virtuous race can best be reared. The art of the true statesman is to weave the web of life with perfect skill, to bring together those couples from whose union the noblest progeny shall issue; and it is only by mastering the laws of the physical universe that this art can be acquired. Plato knew no natural laws but those of mathematics and astronomy; consequently, he set far too much store on the times and seasons at which bride and bridegroom were to meet, and on the numerical ratios by which they were supposed to be determined. He even tells us about a mysterious formula for discovering the nuptial number, by which the ingenuity of commentators has been considerably exercised. The true laws by which marriage should be regulated among a civilised people have remained wrapped in still more impenetrable darkness. Whatever may be the best solution, it can hardly fail to differ in many respects from our present customs. It cannot be right that the most important act in the life of a human being should be determined by social ambition, by avarice, by vanity, by pique, or by accident—in a word, by the most contemptible impulses of which human nature is susceptible; nor is it to be expected that sexual selection will always necessitate the employment of insincerity, adulation, and bribery by one of the parties concerned, while fostering in the other credulity, egoism, jealousy, capriciousness, and petty tyranny—the very qualities which a wise training would have for its object to root out.[145] It seems difficult to reconcile views about marriage involving a recognition of the fact that mental and moral qualities are hereditarily transmitted, with the belief in metempsychosis elsewhere professed by Plato. But perhaps his adhesion to the latter doctrine is not to be taken very seriously. In imitation of the objective world, whose essential truth is half hidden and half disclosed by its phenomenal manifestations, he loves to present his speculative teaching under a mythical disguise; and so he may have chosen the old doctrine of transmigration as an apt expression for the unity and continuity of life. And, at worst, he would not be guilty of any greater inconsistency than is chargeable to those modern philosophers who, while they admit that mental qualities are inherited, hold each individual soul to be a separate and independent creation. The rules for breeding and education set forth in the _Republic_ are not intended for the whole community, but only for the ruling minority. It was by the corruption of the higher classes that Plato was most distressed, and the salvation of the State depended, according to him, on their reformation. This leads us on to his scheme for the reconstitution of society. It is intimately connected with his method of logical definition and classification. He shows with great force that the collective action of human beings is conditioned by the division of labour; and argues from this that every individual ought, in the interest of the whole, to be restricted to a single occupation. Therefore, the industrial classes, who form the bulk of the population, are to be excluded both from military service and from political power. The Peloponnesian War had led to a general substitution of professional soldiers for the old levies of untrained citizens in Greek warfare. Plato was deeply impressed by the dangers, as well as by the advantages, of this revolution. That each profession should be exercised only by persons trained for it, suited his notions alike as a logician, a teacher, and a practical reformer. But he saw that mercenary fighters might use their power to oppress and plunder the defenceless citizens, or to establish a military despotism. And, holding that government should, like strategy, be exercised only by functionaries naturally fitted and expressly trained for the work, he saw equally that a privileged class would be tempted to abuse their position in order to fill their pockets and to gratify their passions. He proposed to provide against these dangers, first by the new system of education already described, and secondly by pushing the division of labour to its logical conclusion. That they might the better attend to their specific duties, the defenders and the rulers of the State were not to practise the art of money-making; in other words, they were not to possess any property of their own, but were to be supported by the labour of the industrial classes. Furthermore, that they need not quarrel among themselves, he proposed that every private interest should be eliminated from their lives, and that they should, as a class, be united by the closest bonds of family affection. This purpose was to be effected by the abolition of marriage and of domesticity. The couples chosen for breeding were to be separated when the object of their union had been attained; children were to be taken from their mothers immediately after birth and brought up at the expense and under the supervision of the State. Sickly and deformed infants were to be destroyed. Those who fell short of the aristocratic standard were to be degraded, and their places filled up by the exceptionally gifted offspring of low-class parents. Members of the military and governing caste were to address each other according to the kinship which might possibly exist between them. In the absence of home-employments, women were to be, so far as possible, assimilated to men; to pass through the same bodily and mental training; to be enrolled in the army; and, if they showed the necessary capacity, to discharge the highest political functions. In this practical dialectic the identifying no less than the differentiating power of logic is displayed, and displayed also in defiance of common ideas, as in the modern classifications of zoology and botany. Plato introduces distinctions where they did not before exist, and annuls those which were already recognised. The sexes were to be assimilated, political life was to be identified with family life, and the whole community was to present an exact parallel with the individual soul. The ruling committee corresponded to reason, the army to passionate spirit, and the industrial classes to the animal desires; and each, in its perfect constitution, represented one of the cardinal virtues as reinterpreted by Plato. Wisdom belonged to the ruling part, courage to the intermediate executive power, and temperance or obedience to the organs of material existence; while justice meant the general harmony resulting from the fulfilment of their appropriate functions by all. We may add that the whole State reproduced the Greek family in a much deeper sense than Plato himself was aware of. For his aristocracy represents the man, whose virtue, in the words of Gorgias, was to ‘administer the State;’ and his industrial class takes the place of the woman, whose duty was ‘to order her house, and keep what is indoors, and obey her husband.’[146] Such was the celebrated scheme by which Plato proposed to regenerate mankind. We have already taken occasion to show how it was connected with his ethical and dialectical philosophy. We have now to consider in what relation it stands to the political experience of his own and other times, as well as to the revolutionary proposals of other speculative reformers. VI. According to Hegel,[147] the Platonic polity, so far from being an impracticable dream, had already found its realisation in Greek life, and did but give a purer expression to the constitutive principle of every ancient commonwealth. There are, he tells us, three stages in the moral development of mankind. The first is purely objective. It represents a régime where rules of conduct are entirely imposed from without; they are, as it were, embodied in the framework of society; they rest, not on reason and conscience, but on authority and tradition; they will not suffer themselves to be questioned, for, being unproved, a doubt would be fatal to their very existence. Here the individual is completely sacrificed to the State; but in the second or subjective stage he breaks loose, asserting the right of his private judgment and will as against the established order of things. This revolution was, still according to Hegel, begun by the Sophists and Socrates. It proved altogether incompatible with the spirit of Greek civilisation, which it ended by shattering to pieces. The subjective principle found an appropriate expression in Christianity, which attributes an infinite importance to the individual soul; and it appears also in the political philosophy of Rousseau. We may observe that it corresponds very nearly to what Auguste Comte meant by the metaphysical period. The modern State reconciles both principles, allowing the individual his full development, and at the same time incorporating him with a larger whole, where, for the first time, he finds his own reason fully realised. Now, Hegel looks on the Platonic republic as a reaction against the subjective individualism, the right of private judgment, the self-seeking impulse, or whatever else it is to be called, which was fast eating into the heart of Greek civilisation. To counteract this fatal tendency, Plato goes back to the constitutive principle of Greek society—that is to say, the omnipotence, or, in Benthamite parlance, omnicompetence, of the State; exhibiting it, in ideal perfection, as the suppression of individual liberty under every form, more especially the fundamental forms of property, marriage, and domestic life. It seems to us that Hegel, in his anxiety to crush every historical process into the narrow symmetry of a favourite metaphysical formula, has confounded several entirely distinct conceptions under the common name of subjectivity. First, there is the right of private judgment, the claim of each individual to have a voice in the affairs of the State, and to have the free management of his own personal concerns. But this, so far from being modern, is one of the oldest customs of the Aryan race; and perhaps, could we look back to the oldest history of other races now despotically governed, we should find it prevailing among them also. It was no new nor unheard-of privilege that Rousseau vindicated for the peoples of his own time, but their ancient birthright, taken from them by the growth of a centralised military system, just as it had been formerly taken from the city communities of the Graeco-Roman world. In this respect, Plato goes against the whole spirit of his country, and no period of its development, not even the age of Homer, would have satisfied him. We have next the disposition of individuals, no longer to interfere in making the law, but to override it, or to bend it into an instrument for their own purposes. Doubtless there existed such a tendency in Plato’s time, and his polity was very largely designed to hold it in check. But such unprincipled ambition was nothing new in Greece, however the mode of its manifestations might vary. What had formerly been seized by armed violence was now sought after with the more subtle weapons of rhetorical skill; just as at the present moment, among these same Greeks, it is the prize of parliamentary intrigue. The Cretan and Spartan institutions may very possibly have been designed with a view to checking this spirit of selfish lawlessness, by reducing private interests to a minimum; and Plato most certainly had them in his mind when he pushed the same method still further; but those institutions were not types of Hellenism as a whole, they only represented one, and that a very abnormal, side of it. Plato borrowed some elements from this quarter, but, as we shall presently show, he incorporated them with others of a widely different character. Sparta was, indeed, on any high theory of government, not a State at all, but a robber-clan established among a plundered population whom they never tried or cared to conciliate. How little weight her rulers attributed to the interests of the State as such, was well exhibited during the Peloponnesian War, when political advantages of the utmost importance were surrendered in deference to the noble families whose kinsmen had been captured at Sphactêria, and whose sole object was to rescue them from the fate with which they were threatened by the Athenians as a means of extorting concessions;—conduct with which the refusal of Rome to ransom the soldiers who had surrendered at Cannae may be instructively contrasted. We have, thirdly, to consider a form of individualism directly opposed in character to those already specified. It is the complete withdrawal from public affairs for the sake of attending exclusively to one’s private duties or pleasures. Such individualism is the characteristic weakness of conservatives, who are, by their very nature, the party of timidity and quiescence. To them was addressed the exhortation of Cato, _capessenda est respublica_. The two other forms of which we have spoken are, on the contrary, diseases of liberalism. We see them exemplified when the leaders of a party are harassed by the perpetual criticism of their professed supporters; or, again, when an election is lost because the votes of the Liberal electors are divided among several candidates. But when a party—generally the Conservative party—loses an election because its voters will not go to the poll, that is owing to the lazy individualism which shuns political contests altogether. It was of this disease that the public life of Athens really perished; and, so far, Hegel is on the right track; but although its action was more obviously and immediately fatal in antiquity, we are by no means safe from a repetition of the same experience in modern society. Nor can it be said that Plato reacted against an evil which, in his eyes, was an evil only when it deprived a very few properly-qualified persons of political supremacy. With regard to all others he proposed to sanction and systematise what was already becoming a common custom—namely, entire withdrawal from the administration of affairs in peace and war. Hegel seems to forget that it is only a single class, and that the smallest, in Plato’s republic which is not allowed to have any private interests; while the industrial classes, necessarily forming a large majority of the whole population, are not only suffered to retain their property and their families, but are altogether thrown back for mental occupation on the interests arising out of these. The resulting state of things would have found its best parallel, not in old Greek city life, but in modern Europe, as it was between the Reformation and the French Revolution. The three forms of individualism already enumerated do not exhaust the general conception of subjectivity. According to Hegel, if we understand him aright, the most important aspect of the principle in question would be the philosophical side, the return of thought on itself, already latent in physical speculation, proclaimed by the Sophists as an all-dissolving scepticism, and worked up into a theory of life by Socrates. That there was such a movement is, of course, certain; but that it contributed perceptibly to the decay of old Greek morality, or that it was essentially opposed to the old Greek spirit, cannot, we think, be truly asserted. What has been already observed of political liberty and of political unscrupulousness may be repeated of intellectual inquisitiveness, rationalism, scepticism, or by whatever name the tendency in question is to be called—it always was, and still is, essentially characteristic of the Greek race. It may very possibly have been a source of political disintegration at all times, but that it became so to a greater extent after assuming the form of systematic speculation has never been proved. If the study of science, or the passion for intellectual gymnastics, drew men away from the duties of public life, it was simply as one more private interest among many, just like feasting, or lovemaking, or travelling, or poetry, or any other of the occupations in which a wealthy Greek delighted; not from any intrinsic incompatibility with the duties of a statesman or a soldier. So far, indeed, was this from being true, that liberal studies, even of the abstrusest order, were pursued with every advantage to their patriotic energy by such citizens as Zeno, Melissus, Empedocles, and, above all, by Pericles and Epameinondas. If Socrates stood aloof from public business it was that he might have more leisure to train others for its proper performance; and he himself, when called upon to serve the State, proved fully equal to the emergency. As for the Sophists, it is well known that their profession was to give young men the sort of education which would enable them to fill the highest political offices with honour and advantage. It is true that such a special preparation would end by throwing increased difficulties in the way of a career which it was originally intended to facilitate, by raising the standard of technical proficiency in statesmanship; and that many possible aspirants would, in consequence, be driven back on less arduous pursuits. But Plato was so far from opposing this specialisation that he wished to carry it much farther, and to make government the exclusive business of a small class who were to be physiologically selected and to receive an education far more elaborate than any that the Sophists could give. If, however, we consider Plato not as the constructor of a new constitution but in relation to the politics of his own time, we must admit that his whole influence was used to set public affairs in a hateful and contemptible light. So far, therefore, as philosophy was represented by him, it must count for a disintegrating force. But in just the same degree we are precluded from assimilating his idea of a State to the old Hellenic model. We must rather say, what he himself would have said, that it never was realised anywhere; although, as we shall presently see, a certain approach to it was made in the Middle Ages. Once more, looking at the whole current of Greek philosophy, and especially the philosophy of mind, are we entitled to say that it encouraged, if it did not create, those other forms of individualism already defined as mutinous criticism on the part of the people, and selfish ambition on the part of its chiefs? Some historians have maintained that there was such a connexion, operating, if not directly, at least through a chain of intermediate causes. Free thought destroyed religion, with religion fell morality, and with morality whatever restraints had hitherto kept anarchic tendencies of every description within bounds. These are interesting reflections; but they do not concern us here, for the issue raised by Hegel is entirely different. It matters nothing to him that Socrates was a staunch defender of supernaturalism and of the received morality. The essential antithesis is between the Socratic introspection and the Socratic dialectics on the one side, and the unquestioned authority of ancient institutions on the other. If this be what Hegel means, we must once more record our dissent. We cannot admit that the philosophy of subjectivity, so interpreted, was a decomposing ferment; nor that the spirit of Plato’s republic was, in any case, a protest against it. The Delphic precept, ‘Know thyself,’ meant in the mouth of Socrates: Let every man find out what work he is best fitted for, and stick to that, without meddling in matters for which he is not qualified. The Socratic dialectic meant: Let the whole field of knowledge be similarly studied; let our ideas on all subjects be so systematised that we shall be able to discover at a moment’s notice the bearing of any one of them on any of the others, or on any new question brought up for decision. Surely nothing could well be less individualistic, in a bad sense, less anti-social, less anarchic than this. Nor does Plato oppose, he generalises his master’s principles; he works out the psychology and dialectic of the whole state; and if the members of his governing class are not permitted to have any separate interests in their individual capacity, each individual soul is exalted to the highest dignity by having the community reorganised on the model of its own internal economy. There are no violent peripeteias in this great drama of thought, but everywhere harmony, continuity, and gradual development. We have entered at some length into Hegel’s theory of the _Republic_, because it seems to embody a misleading conception not only of Greek politics but also of the most important attempt at a social reformation ever made by one man in the history of philosophy. Thought would be much less worth studying if it only reproduced the abstract form of a very limited experience, instead of analysing and recombining the elements of which that experience is composed. And our faith in the power of conscious efforts towards improvement will very much depend on which side of the alternative we accept. Zeller, while taking a much wider view than Hegel, still assumes that Plato’s reforms, so far as they were suggested by experience, were simply an adaptation of Dorian practices.[148] He certainly succeeds in showing that private property, marriage, education, individual liberty, and personal morality were subjected, at least in Sparta, to many restrictions resembling those imposed in the Platonic state. And Plato himself, by treating the Spartan system as the first form of degeneration from his own ideal, seems to indicate that this of all existing polities made the nearest approach to it. The declarations of the _Timaeus_[149] are, however, much more distinct; and according to them it was in the caste-divisions of Egypt that he found the nearest parallel to his own scheme of social reorganisation. There, too, the priests, or wise men came first, and after them the warriors, while the different branches of industry were separated from one another by rigid demarcations. He may also have been struck by that free admission of women to employments elsewhere filled exclusively by men, which so surprised Herodotus, from his inability to discern its real cause—the more advanced differentiation of Egyptian as compared with Greek society.[150] VII. But a profounder analysis of experience is necessary before we can come to the real roots of Plato’s scheme. It must be remembered that our philosopher was a revolutionist of the most thorough-going description, that he objected not to this or that constitution of his time, but to all existing constitutions whatever. Now, every great revolutionary movement, if in some respects an advance and an evolution, is in other respects a retrogression and a dissolution. When the most complex forms of political association are broken up, the older or subordinate forms suddenly acquire new life and meaning. What is true of practice is true also of speculation. Having broken away from the most advanced civilisation, Plato was thrown back on the spontaneous organisation of industry, on the army, the school, the family, the savage tribe, and even the herd of cattle, for types of social union. It was by taking some hints from each of these minor aggregates that he succeeded in building up his ideal polity, which, notwithstanding its supposed simplicity and consistency, is one of the most heterogeneous ever framed. The principles on which it rests are not really carried out to their logical consequences; they interfere with and supplement one another. The restriction of political power to a single class is avowedly based on the necessity for a division of labour. One man, we are told, can only do one thing well. But Plato should have seen that the producer is not for that reason to be made a monopolist; and that, to borrow his own favourite example, shoes are properly manufactured because the shoemaker is kept in order by the competition of his rivals and by the freedom of the consumer to purchase wherever he pleases. Athenian democracy, so far from contradicting the lessons of political economy, was, in truth, their logical application to government. The people did not really govern themselves, nor do they in any modern democracy, but they listened to different proposals, just as they might choose among different articles in a shop or different tenders for building a house, accepted the most suitable, and then left it to be carried out by their trusted agents. Again, Plato is false to his own rule when he selects his philosophic governors out of the military caste. If the same individual can be a warrior in his youth and an administrator in his riper years, one man can do two things well, though not at the same time. If the same person can be born with the qualifications both of a soldier and of a politician, and can be fitted by education for each calling in succession, surely a much greater number can combine the functions of a manual labourer with those of an elector. What prevented Plato from perceiving this obvious parallel was the tradition of the paterfamilias who had always been a warrior in his youth; and a commendable anxiety to keep the army closely connected with the civil power. The analogies of domestic life have also a great deal to do with his proposed community of women and children. Instead of undervaluing the family affections, he immensely overvalued them; as is shown by his supposition that the bonds of consanguinity would prevent dissensions from arising among his warriors. He should have known that many a home is the scene of constant wrangling, and that quarrels between kinsfolk are the bitterest of any. Then, looking on the State as a great school, Plato imagined that the obedience, docility, and credulity of young scholars could be kept up through a lifetime; that full-grown citizens would swallow the absurdest inventions; and that middle-aged officers could be sent into retirement for several years to study dialectic. To suppose that statesmen must necessarily be formed by the discipline in question is another scholastic trait. The professional teacher attributes far more practical importance to his abstruser lessons than they really possess. He is not content to wait for the indirect influence which they may exert at some remote period and in combination with forces of perhaps a widely different character. He looks for immediate and telling results. He imagines that the highest truth must have a mysterious power of transforming all things into its own likeness, or at least of making its learners more capable than other men of doing the world’s work. Here also Plato, instead of being too logical, was not logical enough. By following out the laws of economy, as applied to mental labour, he might have arrived at the separation of the spiritual and temporal powers, and thus anticipated the best established social doctrine of our time. With regard to the propagation of the race, Plato’s methods are avowedly borrowed from those practised by bird-fanciers, horse-trainers, and cattle-breeders. It had long been a Greek custom to compare the people to a flock of sheep and their ruler to a shepherd, phrases which still survive in ecclesiastical parlance. Socrates habitually employed the same simile in his political discussions; and the rhetoricians used it as a justification of the governors who enriched themselves at the expense of those committed to their charge. Plato twisted the argument out of their hands and showed that the shepherd, as such, studies nothing but the good of his sheep. He failed to perceive that the parallel could not be carried out in every detail, and that, quite apart from more elevated considerations, the system which secures a healthy progeny in the one case cannot be transferred to creatures possessing a vastly more complex and delicate organisation. The destruction of sickly and deformed children could only be justified on the hypothesis that none but physical qualities were of any value to the community. Our philosopher forgets his own distinction between soul and body just when he most needed to remember it. The position assigned to women by Plato may perhaps have seemed to his contemporaries the most paradoxical of all his projects, and it has been observed that here he is in advance even of our own age. But a true conclusion may be deduced from false premises; and Plato’s conclusion is not even identical with that reached on other grounds by the modern advocates of women’s rights, or rather of their equitable claims. The author of the _Republic_ detested democracy; and the enfranchisement of women is now demanded as a part of the general democratic programme. It is an axiom, at least with liberals, that no class will have its interests properly attended to which is left without a voice in the election of parliamentary representatives; and the interests of the sexes are not more obviously identical than those of producers and consumers, or of capitalists and labourers. Another democratic principle is that individuals are, as a rule, the best judges of what occupation they are fit for; and as a consequence of this it is further demanded that women should be admitted to every employment on equal terms with men; leaving competition to decide in each instance whether they are suited for it or not. Their continued exclusion from the military profession would be an exception more apparent than real; because, like the majority of the male sex, they are physically disqualified for it. Now, the profession of arms is the very one for which Plato proposes to destine the daughters of his aristocratic caste, without the least intention of consulting their wishes on the subject. He is perfectly aware that his own principle of differentiation will be quoted against him, but he turns the difficulty in a very dexterous manner. He contends that the difference of the sexes, so far as strength and intelligence are concerned, is one not of kind but of degree; for women are not distinguished from men by the possession of any special aptitude, none of them being able to do anything that some men cannot do better. Granting the truth of this rather unflattering assumption, the inference drawn from it will still remain economically unsound. The division of labour requires that each task should be performed, not by those who are absolutely, but by those who are relatively, best fitted for it. In many cases we must be content with work falling short of the highest attainable standard, that the time and abilities of the best workmen may be exclusively devoted to functions for which they alone are competent. Even if women could be trained to fight, it does not follow that their energies might not be more advantageously expended in another direction. Here, again, Plato improperly reasons from low to high forms of association. He appeals to the doubtful example of nomadic tribes, whose women took part in the defence of the camps, and to the fighting power possessed by the females of predatory animals. In truth, the elimination of home life left his women without any employment peculiar to themselves; and so, not to leave them completely idle, they were drafted into the army, more with the hope of imposing on the enemy by an increase of its apparent strength than for the sake of any real service which they were expected to perform.[151] When Plato proposes that women of proved ability should be admitted to the highest political offices, he is far more in sympathy with modern reformers; and his freedom from prejudice is all the more remarkable when we consider that no Greek lady (except, perhaps, Artemisia) is known to have ever displayed a talent for government, although feminine interference in politics was common enough at Sparta; and that personally his feeling towards women was unsympathetic if not contemptuous.[152] Still we must not exaggerate the importance of his concession. The Platonic polity was, after all, a family rather than a true State; and that women should be allowed a share in the regulation of marriage and in the nurture of children, was only giving them back with one hand what had been taken away with the other. Already, among ourselves, women have a voice in educational matters; and were marriage brought under State control, few would doubt the propriety of making them eligible to the new Boards which would be charged with its supervision. The foregoing analysis will enable us to appreciate the true significance of the resemblance pointed out by Zeller[153] between the Platonic republic and the organisation of mediaeval society. The importance given to religious and moral training; the predominance of the priesthood; the sharp distinction drawn between the military caste and the industrial population; the exclusion of the latter from political power; the partial abolition of marriage and property; and, it might be added, the high position enjoyed by women as regents, châtelaines, abbesses, and sometimes even as warriors or professors,—are all innovations more in the spirit of Plato than in the spirit of Pericles. Three converging influences united to bring about this extraordinary verification of a philosophical deal. The profound spiritual revolution effected by Greek thought was taken up and continued by Catholicism, and unconsciously guided to the same practical conclusions the teaching which it had in great part originally inspired. Social differentiation went on at the same time, and led to the political consequences logically deduced from it by Plato. And the barbarian conquest of Rome brought in its train some of those more primitive habits on which his breach with civilisation had equally thrown him back. Thus the coincidence between Plato’s _Republic_ and mediaeval polity is due in one direction to causal agency, in another to speculative insight, and in a third to parallelism of effects, independent of each other but arising out of analogous conditions. If, now, we proceed to compare the _Republic_ with more recent schemes having also for their object the identification of public with private interests, nothing, at first sight, seems to resemble it so closely as the theories of modern Communism; especially those which advocate the abolition not only of private property but also of marriage. The similarity, however, is merely superficial, and covers a radical divergence, For, to begin with, the Platonic polity is not a system of Communism at all, in our sense of the word. It is not that the members of the ruling caste are to throw their property into a common fund; neither as individuals nor as a class do they possess any property whatever. Their wants are provided for by the industrial classes, who apparently continue to live under the old system of particularism. What Plato had in view was not to increase the sum of individual enjoyments by enforcing an equal division of their material means, but to eliminate individualism altogether, and thus give human feeling the absolute generality which he so much admired in abstract ideas. On the other hand, unless we are mistaken, modern Communism has no objection to private property as such, could it remain divided either with absolute equality or in strict proportion to the wants of its holders; but only as the inevitable cause of inequalities which advancing civilisation seems to aggravate rather than to redress. So also with marriage; the modern assailants of that institution object to it as a restraint on the freedom of individual passion, which, according to them, would secure the maximum of pleasure by perpetually varying its objects. Plato would have looked on such reasonings as a parody and perversion of his own doctrine; as in very truth, what some of them have professed to be, pleas for the rehabilitation of the flesh in its original supremacy over the spirit, and therefore the direct opposite of a system which sought to spiritualise by generalising the interests of life. And so, when in the _Laws_ he gives his Communistic principles their complete logical development by extending them to the whole population, he is careful to preserve their philosophical character as the absorption of individual in social existence.[154] The parentage of the two ideas will further elucidate their essentially heterogeneous character. For modern Communism is an outgrowth of the democratic tendencies which Plato detested; and as such had its counterpart in ancient Athens, if we may trust the _Ecclêsiazusae_ of Aristophanes, where also it is associated with unbridled licentiousness.[155] Plato, on the contrary, seems to have received the first suggestion of his Communism from the Pythagorean and aristocratic confraternities of Southern Italy, where the principle that friends have all things in common was an accepted maxim. If Plato stands at the very antipodes of Fourier and St. Simon, he is connected by a real relationship with those thinkers who, like Auguste Comte and Mr. Herbert Spencer, have based their social systems on a wide survey of physical science and human history. It is even probable that his ideas have exercised a decided though not a direct influence on the two writers whom we have named. For Comte avowedly took many of his proposed reforms from the organisation of mediaeval Catholicism, which was a translation of philosophy into dogma and discipline, just as Positivism is a re-translation of theology into the human thought from which it sprang. And Mr. Spencer’s system, while it seems to be the direct antithesis of Plato’s, might claim kindred with it through the principle of differentiation and integration, which, after passing from Greek thought into political economy and physiology, has been restored by our illustrious countryman to something more than its original generality. It has also to be observed that the application of very abstract truths to political science needs to be most jealously guarded, since their elasticity increases in direct proportion to their width. When one thinker argues from the law of increasing specialisation to a vast extension of governmental interference with personal liberty, and another thinker to its restriction within the narrowest possible limits, it seems time to consider whether experience and expediency are not, after all, the safest guides to trust. VIII. The social studies through which we have accompanied Plato seem to have reacted on his more abstract speculations, and to have largely modified the extreme opposition in which these had formerly stood to current notions, whether of a popular or a philosophical character. The change first becomes perceptible in his theory of Ideas. This is a subject on which, for the sake of greater clearness, we have hitherto refrained from entering; and that we should have succeeded in avoiding it so long would seem to prove that the doctrine in question forms a much less important part of his philosophy than is commonly imagined. Perhaps, as some think, it was not an original invention of his own, but was borrowed from the Megarian school; and the mythical connexion in which it frequently figures makes us doubtful how far he ever thoroughly accepted it. The theory is, that to every abstract name or conception of the mind there corresponds an objective entity possessing a separate existence quite distinct from that of the scattered particulars by which it is exemplified to our senses or to our imagination. Just as the Heracleitean flux represented the confusion of which Socrates convicted his interlocutors, so also did these Ideas represent the definitions by which he sought to bring method and certainty into their opinions. It may be that, as Grote suggests, Plato adopted this hypothesis in order to escape from the difficulty of defining common notions in a satisfactory manner. It is certain that his earliest Dialogues seem to place true definitions beyond the reach of human knowledge. And at the beginning of Plato’s constructive period we find the recognition of abstract conceptions, whether mathematical or moral, traced to the remembrance of an ante-natal state, where the soul held direct converse with the transcendent realities to which those conceptions correspond. Justice, temperance, beauty, and goodness, are especially mentioned as examples of Ideas revealed in this manner. Subsequent investigations must, however, have led Plato to believe that the highest truths are to be found by analysing not the loose contents but the fixed forms of consciousness; and that, if each virtue expressed a particular relation between the various parts of the soul, no external experience was needed to make her acquainted with its meaning; still less could conceptions arising out of her connexion with the material world be explained by reference to a sphere of purely spiritual existence. At the same time, innate ideas would no longer be required to prove her incorporeality, when the authority of reason over sense furnished so much more satisfactory a ground for believing the two to be of different origin. To all who have studied the evolution of modern thought, the substitution of Kantian forms for Cartesian ideas will at once elucidate and confirm our hypothesis of a similar reformation in Plato’s metaphysics. Again, the new position occupied by Mind as an intermediary between the world of reality and the world of appearance, tended more and more to obliterate or confuse the demarcations by which they had hitherto been separated. The most general headings under which it was usual to contrast them were, the One and the Many, Being and Nothing, the Same and the Different, Rest and Motion. Parmenides employed the one set of terms to describe his Absolute, and the other to describe the objects of vulgar belief. They also served respectively to designate the wise and the ignorant, the dialectician and the sophist, the knowledge of gods and the opinions of men; besides offering points of contact with the antithetical couples of Pythagoreanism. But Plato gradually found that the nature of Mind could not be understood without taking both points of view into account. Unity and plurality, sameness and difference, equally entered into its composition; although undoubtedly belonging to the sphere of reality, it was self-moved and the cause of all motion in other things. The dialectic or classificatory method, with its progressive series of differentiations and assimilations, also involved a continual use of categories which were held to be mutually exclusive. And on proceeding to an examination of the summa genera, the highest and most abstract ideas which it had been sought to distinguish by their absolute purity and simplicity from the shifting chaos of sensible phenomena, Plato discovered that even these were reduced to a maze of confusion and contradiction by a sincere application of the cross-examining elenchus. For example, to predicate being of the One was to mix it up with a heterogeneous idea and let in the very plurality which it denied. To distinguish them was to predicate difference of both, and thus open the door to fresh embarrassments. Finally, while the attempt to attain extreme accuracy of definition was leading to the destruction of all thought and all reality within the Socratic school, the dialectic method had been taken up and parodied in a very coarse style by a class of persons called Eristics. These men had, to some extent, usurped the place of the elder Sophists as paid instructors of youth; but their only accomplishment was to upset every possible assertion by a series of verbal juggles. One of their favourite paradoxes was to deny the reality of falsehood on the Parmenidean principle that ‘nothing cannot exist.’ Plato satirises their method in the _Euthydêmus_, and makes a much more serious attempt to meet it in the _Sophist_; two Dialogues which seem to have been composed not far from one another.[156] The _Sophist_ effects a considerable simplification in the ideal theory by resolving negation into difference, and altogether omitting the notions of unity and plurality,—perhaps as a result of the investigations contained in the _Parmenides_, another dialogue belonging to the same group, where the couple referred to are analysed with great minuteness, and are shown to be infected with numerous self-contradictions. The remaining five ideas of Existence, Sameness, Difference, Rest, and Motion, are allowed to stand; but the fact of their inseparable connexion is brought out with great force and clearness. The enquiry is one of considerable interest, including, as it does, the earliest known analysis of predication, and forming an indispensable link in the transition from Platonic to Aristotelian logic—that is to say, from the theory of definition and classification to the theory of syllogism. Once the Ideas had been brought into mutual relation and shown to be compounded with one another, the task of connecting them with the external world became considerably easier; and the same intermediary which before had linked them to it as a participant in the nature of both, was now raised to a higher position and became the efficient cause of their intimate union. Such is the standpoint of the _Philêbus_, where all existence is divided into four classes, the limit, the unlimited, the union of both, and the cause of their union. Mind belongs to the last and matter to the second class. There can hardly be a doubt that the first class is either identical with the Ideas or fills the place once occupied by them. The third class is the world of experience, the Cosmos of early Greek thought, which Plato had now come to look on as a worthy object of study. In the _Timaeus_, also a very late Dialogue, he goes further, and gives us a complete cosmogony, the general conception of which is clear enough, although the details are avowedly conjectural and figurative; nor do they seem to have exercised any influence or subsequent speculation until the time of Descartes. We are told that the world was created by God, who is absolutely good, and, being without jealousy, wished that all things should be like himself. He makes it to consist of a soul and a body, the former constructed in imitation of the eternal archetypal ideas which now seem to be reduced to three—Existence, Sameness, and Difference.[157] The soul of the world is formed by mixing these three elements together, and the body is an image of the soul. Sameness is represented by the starry sphere rotating on its own axis; Difference by the inclination of the ecliptic to the equator; Existence, perhaps, by the everlasting duration of the heavens. The same analogy extends to the human figure, of which the head is the most essential part, all the rest of the body being merely designed for its support. Plato seems to regard the material world as a sort of machinery designed to meet the necessities of sight and touch, by which the human soul arrives at a knowledge of the eternal order without;—a direct reversal of his earlier theories, according to which matter and sense were mere encumbrances impeding the soul in her efforts after truth. What remains of the visible world after deducting its ideal elements is pure space. This, which to some seems the clearest of all conceptions, was to Plato one of the obscurest. He can only describe it as the formless substance out of which the four elements, fire, air, water, and earth, are differentiated. It closes the scale of existence and even lies half outside it, just as the Idea of Good in the _Republic_ transcends the same scale at the other end. We may conjecture that the two principles are opposed as absolute self-identity and absolute self-separation; the whole intermediate series of forms serving to bridge over the interval between them. It will then be easy to understand how, as Aristotle tells us, Plato finally came to adopt the Pythagorean nomenclature and designated his two generating principles as the monad and the indefinite dyad. Number was formed by their combination, and all other things were made out of number. Aristotle complains that the Platonists had turned philosophy into mathematics; and perhaps in the interests of science it was fortunate that the transformation occurred. To suppose that matter could be built up out of geometrical triangles, as Plato teaches in the _Timaeus_, was, no doubt, a highly reprehensible confusion; but that the systematic study of science should be based on mathematics was an equally new and important aperçu. The impulse given to knowledge followed unforeseen directions; and at a later period Plato’s true spirit was better represented by Archimedes and Hipparchus than by Arcesilaus and Carneades. It is remarkable that the spontaneous development of Greek thought should have led to a form of Theism not unlike that which some persons still imagine was supernaturally revealed to the Hebrew race; for the absence of any connexion between the two is now almost universally admitted. Modern science has taken up the attitude of Laplace towards the hypothesis in question; and those critics who, like Lange, are most imbued with the scientific spirit, feel inclined to regard its adoption by Plato as a retrograde movement. We may to a certain extent agree with them, without admitting that philosophy, as a whole, was injured by departing from the principles of Democritus. An intellectual like an animal organism may sometimes have to choose between retrograde metamorphosis and total extinction. The course of events drove speculation to Athens, where it could only exist on the condition of assuming a theological form. Moreover, action and reaction were equal and contrary. Mythology gained as much as philosophy lost. It was purified from immoral ingredients, and raised to the highest level which supernaturalism is capable of attaining. If the _Republic_ was the forerunner of the Catholic Church, the _Timaeus_ was the forerunner of the Catholic faith. IX. The old age of Plato seems to have been marked by restless activity in more directions than one. He began various works which were never finished, and projected others which were never begun. He became possessed by a devouring zeal for social reform. It seemed to him that nothing was wanting but an enlightened despot to make his ideal State a reality. According to one story, he fancied that such an instrument might be found in the younger Dionysius. If so, his expectations were speedily disappointed. As Hegel acutely observes, only a man of half measures will allow himself to be guided by another; and such a man would lack the energy needed to carry out Plato’s scheme.[158] However this may be, the philosopher does not seem to have given up his idea that absolute monarchy was, after all, the government from which most good might be expected. A process of substitution which runs through his whole intellectual evolution was here exemplified for the last time. Just as in his ethical system knowledge, after having been regarded solely as the means for procuring an ulterior end, pleasure, subsequently became an end in itself; just as the interest in knowledge was superseded by a more absorbing interest in the dialectical machinery which was to facilitate its acquisition, and this again by the social re-organisation which was to make education a department of the State; so also the beneficent despotism originally invoked for the purpose of establishing an aristocracy on the new model, came at last to be regarded by Plato as itself the best form of government. Such, at least, seems to be the drift of a remarkable Dialogue called the _Statesman_, which we agree with Prof. Jowett in placing immediately before the _Laws_. Some have denied its authenticity, and others have placed it very early in the entire series of Platonic compositions. But it contains passages of such blended wit and eloquence that no other man could have written them; and passages so destitute of life that they could only have been written when his system had stiffened into mathematical pedantry and scholastic routine. Moreover, it seems distinctly to anticipate the scheme of detailed legislation which Plato spent his last years in elaborating. After covering with ridicule the notion that a truly competent ruler should ever be hampered by written enactments, the principal spokesman acknowledges that, in the absence of such a ruler, a definite and unalterable code offers the best guarantees for political stability. This code Plato set himself to construct in his last and longest work, the _Laws_. Less than half of that Dialogue, however, is occupied with the details of legislation. The remaining portions deal with the familiar topics of morality, religion, science, and education. The first book propounds a very curious theory of asceticism, which has not, we believe, been taken up by any subsequent moralist. On the principle of _in vino veritas_ Plato proposes that drunkenness should be systematically employed for the purpose of testing self-control. True temperance is not abstinence, but the power of resisting temptation; and we can best discover to what extent any man possesses that power by surprising him when off his guard. If he should be proof against seductive influences even when in his cups, we shall be doubly sure of his constancy at other times. Prof. Jowett rather maliciously suggests that a personal proclivity may have suggested this extraordinary apology for hard drinking. Were it so, we should be reminded of the successive revelations by which indulgences of another kind were permitted to Mohammed, and of the one case in which divorce was sanctioned by Auguste Comte. We should also remember that the Christian Puritanism to which Plato approached so near has always been singularly lenient to this disgraceful vice. But perhaps a somewhat higher order of considerations will help us to a better understanding of the paradox. Plato was averse from rejecting any tendency of his age that could possibly be turned to account in his philosophy. Hence, as we have seen, the use which he makes of love, even under its most unlawful forms, in the _Symposium_ and the _Phaedrus_. Now, it would appear, from our scanty sources of information, that social festivities, always very popular at Athens, had become the chief interest in life about the time when Plato was composing his _Laws_. According to one graceful legend, the philosopher himself breathed his last at a marriage-feast. It may, therefore, have occurred to him that the prevalent tendency could, like the amorous passions of a former generation, be utilised for moral training and made subservient to the very cause with which, at first sight, it seemed to conflict. The concessions to common sense and to contemporary schools of thought, already pointed out in those Dialogues which we suppose to have been written after the _Republic_, are still more conspicuous in the _Laws_. We do not mean merely the project of a political constitution avowedly offered as the best possible in existing circumstances, though not the best absolutely; but we mean that there is throughout a desire to present philosophy from its most intelligible, practical, and popular side. The extremely rigorous standard of sexual morality (p. 838) seems, indeed, more akin to modern than to ancient notions, but it was in all probability borrowed from the naturalistic school of ethics, the forerunner of Stoicism; for not only is there a direct appeal to Nature’s teaching in that connexion; but throughout the entire work the terms ‘nature’ and ‘naturally’ occur with greater frequency, we believe, than in all the rest of Plato’s writings put together. When, on the other hand, it is asserted that men can be governed by no other motive than pleasure (p. 663, B), we seem to see in this declaration a concession to the Cyrenaic school, as well as a return to the forsaken standpoint of the _Protagoras_. The increasing influence of Pythagoreanism is shown by the exaggerated importance attributed to exact numerical determinations. The theory of ideas is, as Prof. Jowett observes, entirely absent, its place being taken by the distinction between mind and matter.[159] The political constitution and code of laws recommended by Plato to his new city are adapted to a great extent from the older legislation of Athens. As such they have supplied the historians of ancient jurisprudence with some valuable indications. But from a philosophic point of view the general impression produced is wearisome and even offensive. A universal system of espionage is established, and the odious trade of informer receives ample encouragement. Worst of all, it is proposed, in the true spirit of Athenian intolerance, to uphold religious orthodoxy by persecuting laws. Plato had actually come to think that disagreement with the vulgar theology was a folly and a crime. One passage may be quoted as a warning to those who would set early associations to do the work of reason; and who would overbear new truths by a method which at one time might have been used with fatal effect against their own opinions:— Who can be calm when he is called upon to prove the existence of the gods? Who can avoid hating and abhorring the men who are and have been the cause of this argument? I speak of those who will not believe the words which they have heard as babes and sucklings from their mothers and nurses, repeated by them both in jest and earnest like charms; who have also heard and seen their parents offering up sacrifices and prayers—sights and sounds delightful to children—sacrificing, I say, in the most earnest manner on behalf of them and of themselves, and with eager interest talking to the gods and beseeching them as though they were firmly convinced of their existence; who likewise see and hear the genuflexions and prostrations which are made by Hellenes and barbarians to the rising and setting sun and moon, in all the various turns of good and evil fortune, not as if they thought that there were no gods, but as if there could be no doubt of their existence, and no suspicion of their non-existence; when men, knowing all these things, despise them on no real grounds, as would be admitted by all who have any particle of intelligence, and when they force us to say what we are now saying, how can any one in gentle terms remonstrate with the like of them, when he has to begin by proving to them the very existence of the gods?[160] Let it be remembered that the gods of whom Plato is speaking are the sun, moon, and stars; that the atheists whom he denounces only taught what we have long known to be true, which is that those luminaries are no more divine, no more animated, no more capable of accepting our sacrifices or responding to our cries than is the earth on which we tread; and that he attempts to prove the contrary by arguments which, even if they were not inconsistent with all that we know about mechanics, would still be utterly inadequate to the purpose for which they are employed. Turning back once more from the melancholy decline of a great genius to the splendour of its meridian prime, we will endeavour briefly to recapitulate the achievements which entitle Plato to rank among the five or six greatest Greeks, and among the four or five greatest thinkers of all time. He extended the philosophy of mind until it embraced not only ethics and dialectics but also the study of politics, of religion, of social science, of fine art, of economy, of language, and of education. In other words, he showed how ideas could be applied to life on the most comprehensive scale. Further, he saw that the study of Mind, to be complete, necessitates a knowledge of physical phenomena and of the realities which underlie them; accordingly, he made a return on the objective speculations which had been temporarily abandoned, thus mediating between Socrates and early Greek thought; while on the other hand by his theory of classification he mediated between Socrates and Aristotle. He based physical science on mathematics, thus establishing a method of research and of education which has continued in operation ever since. He sketched the outlines of a new religion in which morality was to be substituted for ritualism, and intelligent imitation of God for blind obedience to his will; a religion of monotheism, of humanity, of purity, and of immortal life. And he embodied all these lessons in a series of compositions distinguished by such beauty of form that their literary excellence alone would entitle them to rank among the greatest masterpieces that the world has ever seen. He took the recently-created instrument of prose style and at once raised it to the highest pitch of excellence that it has ever attained. Finding the new art already distorted by false taste and overlaid with meretricious ornament, he cleansed and regenerated it in that primal fount of intellectual life, that richest, deepest, purest source of joy, the conversation of enquiring spirits with one another, when they have awakened to the desire for truth and have not learned to despair of its attainment. Thus it was that the philosopher’s mastery of expression gave added emphasis to his protest against those who made style a substitute for knowledge, or, by a worse corruption, perverted it into an instrument of profitable wrong. They moved along the surface in a confused world of words, of sensations, and of animal desires; he penetrated through all those dumb images and blind instincts, to the central verity and supreme end which alone can inform them with meaning, consistency, permanence, and value. To conclude: Plato belonged to that nobly practical school of idealists who master all the details of reality before attempting its reformation, and accomplish their great designs by enlisting and reorganising whatever spontaneous forces are already working in the same direction; but the fertility of whose own suggestions it needs more than one millennium to exhaust. There is nothing in heaven or earth that was not dreamt of in his philosophy: some of his dreams have already come true; others still await their fulfilment; and even those which are irreconcilable with the demands of experience will continue to be studied with the interest attaching to every generous and daring adventure, in the spiritual no less than in the secular order of existence. CHAPTER VI. CHARACTERISTICS OF ARISTOTLE. I. Within the last twelve years several books, both large and small, have appeared, dealing either with the philosophy of Aristotle as a whole, or with the general principles on which it is constructed. The Berlin edition of Aristotle’s collected works was supplemented in 1870 by the publication of a magnificent index, filling nearly nine hundred quarto pages, for which we have to thank the learning and industry of Bonitz.[161] Then came the unfinished treatise of George Grote, planned on so vast a scale that it would, if completely carried out, have rivalled the author’s _History of Greece_ in bulk, and perhaps exceeded the authentic remains of the Stagirite himself. As it is, we have a full account, expository and critical, of the _Organon_, a chapter on the _De Animâ_, and some fragments on other Aristotelian writings, all marked by Grote’s wonderful sagacity and good sense. In 1879 a new and greatly enlarged edition brought that portion of Zeller’s work on Greek Philosophy which deals with Aristotle and the Peripatetics[162] fully up to the level of its companion volumes; and we are glad to see that, like them, it is shortly to appear in an English dress. The older work of Brandis[163] goes over the same ground, and, though much behind the present state of knowledge, may still be consulted with advantage, on account of its copious and clear analyses of the Aristotelian texts. Together with these ponderous tomes, we have to mention the little work of Sir Alexander Grant,[164] which, although intended primarily for the unlearned, is a real contribution to Aristotelian scholarship, and, probably as such, received the honours of a German translation almost immediately after its first publication. Mr. Edwin Wallace’s _Outlines of the Philosophy of Aristotle_[165] is of a different and much less popular character. Originally designed for the use of the author’s own pupils, it does for Aristotle’s entire system what Trendelenburg has done for his logic, and Ritter and Preller for all Greek philosophy—that is to say, it brings together the most important texts, and accompanies them with a remarkably lucid and interesting interpretation. Finally we have M. Barthélemy Saint-Hilaire’s Introduction to his translation of Aristotle’s _Metaphysics_, republished in a pocket volume.[166] We can safely recommend it to those who wish to acquire a knowledge of the subject with the least possible expenditure of trouble. The style is delightfully simple, and that the author should write from the standpoint of the French spiritualistic school is not altogether a disadvantage, for that school is partly of Aristotelian origin, and its adherents are, therefore, most likely to reproduce the master’s theories with sympathetic appreciation. In view of such extensive labours, we might almost imagine ourselves transported back to the times when Chaucer could describe a student as being made perfectly happy by having