During my Fall 2024 semester, I did a co-op at Tesla on the Supply Chain Optimization team, and I acted as a full stack data scientist working on leveraging LLMs for the creation of a comprehensive AI Chatbot for automating Supply Chain related tasks.
Throughout my fall co-op at Tesla, I worked on a project to design, develop, and deploy an AI chatbot that could perform various supply chain-related automation tasks. For example, internal users could:
1) Ask questions about parts between two of Teslas distribution centers, and the chatbot could convert the text to a SQL Query, execute the SQL Query against our data =base, and return the result to the user, all in mere seconds without a data analyst to read user questions and write the SQL for them.
2) Upload an Excel file and ask questions such as, "Who are the planners for these parts?", which would initiate a chain of first writing and executing a SQL Query, and then having Python merge the data frame output from the SQL Query back with the user's original upload on the necessary primary keys.
3) Utilize Tesla's Cost Engine to allow users to determine various costs such as shipping parts between Distribution Centers.
4) Determine the optimal transfer & rebalance quantities for parts between distribution centers.
5) Ask any logic-related questions surrounding the context of Tesla's supply chain or in-house operations.
1) Text-to-SQL Retrieval Augmented Generation Pipeline:
Classify the intent of the user's question -> Prompt an LLM to parse the user's input into the appropriate JSON object depending on the initial classification -> feed the JSON object into the relevant function based on the present values -> If it is determined that a SQL Query is necessary, then we initiate the actual Text-to-SQL chain where we draw upon a data pipeline that pulls the relevant information from our database schema and sample questions and associated queries to write the appropriate SQL Query and execute it against the database to return the result to the user.
2) Design, Development, and Deployment of the AI Chatbot:
I utilized Streamlit for quick prototyping, development, and initial deployment. Once we piloted to dozens of users and felt comfortable with the features of the chatbot and its functionality, we pivoted to building out a more robust UI and Backend utilizing Django and React.