<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by John Carpenter (He/Him) on Medium]]></title>
        <description><![CDATA[Stories by John Carpenter (He/Him) on Medium]]></description>
        <link>https://medium.com/@john.carpenter?source=rss-44f5b6db67b0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6oPw3j1vJh1Nnsi4umeETA.png</url>
            <title>Stories by John Carpenter (He/Him) on Medium</title>
            <link>https://medium.com/@john.carpenter?source=rss-44f5b6db67b0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 20:18:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@john.carpenter/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ReAct Model: Enhancing AI Capabilities through Multi-step Decision Making]]></title>
            <link>https://medium.com/blacksquareca/react-model-enhancing-ai-capabilities-through-multi-step-decision-making-dfc268a2d1be?source=rss-44f5b6db67b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfc268a2d1be</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[gpt-3]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[John Carpenter (He/Him)]]></dc:creator>
            <pubDate>Fri, 14 Apr 2023 12:13:16 GMT</pubDate>
            <atom:updated>2023-10-22T22:25:50.367Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NKmIko4VOGwSUzoPJRr31g.png" /><figcaption>AI generated image showing a beer made for dogs</figcaption></figure><p>In previous articles, we discussed the capabilities of GPT large language models (LLMs) in <a href="https://data.blacksquare.io/rethinking-product-search-in-the-world-of-chatgpt-57b435b5ce3c"><em>Semantic Search</em></a> and <a href="https://data.blacksquare.io/using-gpt3-to-build-zero-shot-recommendation-and-search-engine-using-whisky-tasting-notes-eae0e25a45fc"><em>Recommender Systems</em></a>. These systems demonstrated their ability to categorize, understand, and distill language information through breaking data into <em>embeddings vectors </em>and comparing them against reference vectors. While powerful, these tools address a narrowly defined problem, offering only incremental benefits in the field of search and recommender systems.</p><p>Within that narrow scope, GPT models are fantastic. When presented with a fixed problem they can solve it quickly and efficiently. But what if we are presented with a more complex problem that requires more executive decision making? Something that requires a multi-step observe-act-observe chain? That is precisely the advancement that AI researchers have been working on and have recently made big steps.</p><p>One of the forefront models is the ReAct: model from Google ( Which by the way is the worst name for an AI model. Try doing a search for “react model” or “react language” )</p><p><a href="https://ai.googleblog.com/2022/11/react-synergizing-reasoning-and-acting.html">ReAct: Synergizing Reasoning and Acting in Language Models</a></p><p>This model leverages the understanding from LLM (<em>Reason</em>), and uses that to generate a series of actions based on the tools it has on hand (<em>Act</em>). Hence the ReAct name. So if you give ReAct a description of it’s capabilities (you can do <em>web search, calculations </em>or<em> query a database</em>) and a goal ( <em>Can you tell me the total sales November, in $USD) </em>it will break down the actions (<em>Query sales, search for exchange rate, calculate total</em>) and chain together the steps needed to accomplish those.</p><p>Here’s an example, let’s say you want to know the following question;</p><p><strong>I want to cook something with chicken, and can you tell me the total time?</strong></p><p>Putting that into ChatGPT yields the “correct” answer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zVxFuZHGk_l6-RNnTxX0Qg.png" /><figcaption>ChatGPT for actions</figcaption></figure><p>If we take that same concept into a ReAct chain, but this time use ChatGPT for the recipe and a math engine for the calculations…</p><pre><br>tools = [<br>    Tool(<br>        name = &quot;Suggest Recipe&quot;,<br>        func=chain.run,<br>        description=&quot;useful for when you need to decide on what to cook&quot;<br>    ),<br>    Tool(<br>        name=&quot;Calculator&quot;,<br>        func=llm_math_chain.run,<br>        description=&quot;useful for when you need to answer questions about math&quot;<br>    )<br>]<br><br>agent = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)<br><br>agent.run(&quot;I want to cook something with chicken, and can you tell me the total time?&quot;)</pre><p>The answer is significantly different;</p><pre>&gt; Entering new AgentExecutor chain...<br> I need to decide what to cook and then calculate the total time.<br>Action: Suggest Recipe<br>Action Input: Chicken<br>Observation: <br>Chicken and Vegetable Stir Fry<br>Ingredients: <br>- 2 tablespoons vegetable oil<br>- 1 lb. boneless, skinless chicken breasts, cut into thin strips<br>- 1/2 cup chopped onion<br>- 1/2 cup chopped red bell pepper<br>- 1/2 cup chopped green bell pepper<br>- 2 cloves garlic, minced<br>- 1 teaspoon ground ginger<br>- 1 teaspoon ground cumin<br>- 1/2 teaspoon chili powder<br>- 2 tablespoons soy sauce<br>- 2 tablespoons honey<br>- 1/4 cup water<br>- 2 cups cooked white rice<br><br>Instructions:<br><br>1. Heat oil in a large skillet over medium-high heat.<br><br>2. Add chicken strips and cook for 5 minutes, stirring occasionally.<br><br>3. Add onion, bell peppers, garlic, ginger, cumin, and chili powder. Cook for 5 minutes, stirring occasionally.<br><br>4. Add soy sauce, honey, and water. Bring to a boil, reduce heat to low, and simmer for 10 minutes, stirring occasionally.<br><br>5. Serve over cooked white rice. Enjoy!<br>Thought: I need to calculate the total time.<br>Action: Calculator<br>Action Input: 5 minutes + 5 minutes + 10 minutes<br><br>&gt; Entering new LLMMathChain chain...<br>5 minutes + 5 minutes + 10 minutes<br>```python<br>print(5 + 5 + 10)<br>```<br><br>Answer: 20<br><br>&gt; Finished chain.<br><br>Observation: Answer: 20<br><br>Thought: I now know the final answer.<br>Final Answer: The total time to cook this chicken and vegetable stir fry is 20 minutes.</pre><p>The results are much more focused. You provide the GPT LLM with the instructions to find a recipe and then another model to calculate to add all the time values in the recipe. Having the executive reasoning ReAct model means that we can focus the LLMs on a narrowly defined tasks which they can excel at.</p><p>So the combination of ReAct with multiple GPT4 models opens up massive capabilities in terms of automation. Some potential applications include identifying users at risk of churn and offering personalized rewards, adjusting pricing and promotions based on real-time demand and inventory levels, and offering targeted promotions to move surplus inventory. Especially for ecommerce and DTC operations, ReAct used in conjunction with an automation system can enable a massive boost in your capabilities.</p><p>If you want to read more try the following articles</p><ul><li><a href="https://ai.googleblog.com/2022/05/language-models-perform-reasoning-via.html">Language Models Perform Reasoning via Chain of Thought</a></li><li><a href="https://crfm.stanford.edu/2023/03/13/alpaca.html">Stanford CRFM</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfc268a2d1be" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blacksquareca/react-model-enhancing-ai-capabilities-through-multi-step-decision-making-dfc268a2d1be">ReAct Model: Enhancing AI Capabilities through Multi-step Decision Making</a> was originally published in <a href="https://medium.com/blacksquareca">BlackSquare.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revolutionize the Alcohol Industry with new Generative AI Applications]]></title>
            <link>https://medium.com/blacksquareca/revolutionize-the-alcohol-industry-with-new-generative-ai-applications-eab67ae005fc?source=rss-44f5b6db67b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/eab67ae005fc</guid>
            <category><![CDATA[alcohol]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[generative-ai]]></category>
            <dc:creator><![CDATA[John Carpenter (He/Him)]]></dc:creator>
            <pubDate>Thu, 30 Mar 2023 09:26:56 GMT</pubDate>
            <atom:updated>2023-03-30T09:26:56.356Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*NFd8cfhsdHwd6z3xnW4bnQ.png" /></figure><p>New AI tools, around generative models provide industries with the ability to create data-driven applications, without massive investment and without having to train models. Smarter chat bots, search, recommendations can all be built out-of-the-box faster than ever leveraging generic large data models. Recently, Google announced <a href="https://cloud.google.com/blog/products/ai-machine-learning/create-generative-apps-in-minutes-with-gen-app-builder">Gen App Builder, a no-code solution to building apps with the new GPT tools</a>. All of which point towards these Large Language Models forming the base of transformative apps and experiences. It will likely make big changes in a huge amount of industries.</p><p>The alcohol, wine, spirits, and beer market is no exception. This newsletter will introduce you to the power of generative AI apps that are transforming the industry and providing unparalleled benefits.</p><p>🌟 The Joy of Happy Customers 🌟</p><p>Generative AI apps, such as AI-driven sommeliers and recommendation engines, can provide personalized suggestions to customers based on their preferences, taste profiles, and past purchases. With these apps, customers will enjoy an engaging, tailored experience that goes beyond traditional customer service.</p><p>🚀 Happy Business: The Perfect Market Fit 🚀</p><p>By analyzing consumer data and industry trends, generative AI apps can help businesses identify gaps in the market and better understand their customers’ preferences. This information can be used to create new product offerings or refine existing ones, ensuring a strong product-market fit that resonates with consumers.</p><p>🌈 Happier Employees: Empowered and Efficient 🌈</p><p>Automation powered by generative AI apps can streamline various tasks in the alcohol industry, from inventory management to customer support. By automating repetitive and time-consuming tasks, employees can focus on more strategic, creative, and value-adding activities.</p><p>The adoption of generative AI apps in the alcohol, wine, spirits, and beer market is a game-changer. Businesses that embrace this technology will enjoy enhanced customer experiences, a stronger product-market fit, and significant time savings for employees. Don’t let your business miss out on the competitive edge that generative AI apps provide.</p><h3>New Blog Post</h3><p>We experimented with new Generative AI searches and wrote about it within our latest blog post.</p><h4><a href="https://data.blacksquare.io/rethinking-product-search-in-the-world-of-chatgpt-57b435b5ce3c">Rethinking Whisky Search in the World of ChatGPT</a></h4><p>Keep an eye on your inbox for more inspiring stories, tips, and insights on the wondrous world of data-driven DTC. And, as always, feel free to share your thoughts and ideas with our ever-growing community. We’d love to hear from you!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eab67ae005fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blacksquareca/revolutionize-the-alcohol-industry-with-new-generative-ai-applications-eab67ae005fc">Revolutionize the Alcohol Industry with new Generative AI Applications</a> was originally published in <a href="https://medium.com/blacksquareca">BlackSquare.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rethinking Whisky Search in the World of ChatGPT]]></title>
            <link>https://medium.com/blacksquareca/rethinking-product-search-in-the-world-of-chatgpt-57b435b5ce3c?source=rss-44f5b6db67b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/57b435b5ce3c</guid>
            <category><![CDATA[whisky]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[search]]></category>
            <category><![CDATA[data-engineering]]></category>
            <dc:creator><![CDATA[John Carpenter (He/Him)]]></dc:creator>
            <pubDate>Wed, 29 Mar 2023 12:33:45 GMT</pubDate>
            <atom:updated>2023-03-29T12:36:17.159Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uRS9cdyc164yk7hoVBen_w.jpeg" /></figure><p>Think about the last time you went into a retail liquor store in search of a product. You may be looking to celebrate a specific occasion, or trying to find the perfect wine for a meal. You may have asked the attendant for recommendations and they might have guided you to an unexpected gem.</p><p>Now compare an ecommerce search to asking for a recommendation in a retail setting. Just as you would seek the assistance of a store attendant when you are looking for a particular product in a retail store, the search function on a website is the virtual equivalent of a store attendant who can help you find what you’re looking for.</p><p>In a physical store, a store attendant may ask you questions about the product you’re looking for, such as the what’s is the occasion for, is it formal or casual? What other products have you tried and what did you dislike/like about them. All of that to better understand your needs and provide a relevant recommendation. Similarly, a website search engine uses natural language processing techniques to interpret your search query and present you with the most relevant results.</p><p>However, there is a difference between the way a store attendant and a website search engine approach product recommendations. A store attendant may rely more on their own knowledge and expertise quizzing you on the <em>context</em> behind your search, while a website search engine uses algorithms to match your search query with relevant keywords and metadata associated with the products.</p><p>This is where the difference between semantic and lexical search comes in. Semantic search goes beyond simple keyword matching and attempts to understand the context and meaning behind the search query to provide more accurate and relevant results. Lexical search, on the other hand, relies primarily on matching keywords and metadata associated with the products.</p><figure><img alt="Diagram showing the difference between lexical and semantic searches" src="https://cdn-images-1.medium.com/max/1024/1*Pb_vUakWlhktZqa6XeBREA.png" /></figure><p>The physical world needs that context for any recommendation, but because of the ways computers store and index information we’ve resorted to lexical search for our websites. There is no physical analogy for a lexical search and I can guarantee you will get some strange looks if you try that on your next outing.</p><blockquote>Rum, Dark. And order them by a review given by the guy in the next aisle over.</blockquote><p>We use lexical search because semantic search is notoriously difficult as computers aren’t terribly good at understanding context. Now with GPT3–4 they are getting closer to understanding context and we can start to look at searches that are more conversational and less keyword based.</p><h3>Semantic Based Searches</h3><p>Conceptually, semantic searches are surprisingly easy to implement. Take a product description, calculate the embedding vector. Then add the search sentence as another embedding and determine the k-nearest neighbours to the search sentence embedding in the vector space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7mDFzMrvfRiskyUN0A_eyA.png" /></figure><p>First, a short primer on embeddings. Embeddings are a way of representing words or phrases as vectors (i.e., mathematical representations) in a high-dimensional space. These vectors capture the semantic meaning of the words or phrases and their relationships with other words or phrases in the language.</p><p>For example, suppose a user searches for “smartphone with a great camera.” The search engine can use embeddings to identify related words or phrases, such as “mobile phone with good camera quality” or “cell phone with high-quality camera.” This allows the search engine to provide more accurate and relevant results, even if the user’s search query is not an exact match with the product descriptions in the database.</p><p>For our test, we created the embeddings using OpenAI model <em>text-embedding-ada-002:</em></p><pre>from openai.embeddings_utils import (<br>    get_embedding<br>)<br><br># constants<br>EMBEDDING_MODEL = &quot;text-embedding-ada-002&quot;<br><br>df[&quot;embedding&quot;] = df.description.apply(lambda x: get_embedding(x, engine=EMBEDDING_MODEL))</pre><p>Our description field is simply the string of everything we are searching against;</p><pre>def set_search_string(product):<br>    title = product.product_title if product and product.product_title else &#39;N/A&#39;<br>    category = product.product_category if product and product.product_category else &#39;N/A&#39;<br>    sku = product.product_sku if product and product.product_sku else &#39;N/A&#39;<br>    short = product.short_description if product and product.short_description else &#39;N/A&#39;<br>    description = product.description if product and product.description else &#39;N/A&#39;<br>    return f&#39;title={title} category={category} sku={sku} description={description} short={short}&#39;</pre><p>We are using <em>title= </em>in the search string because it allows us to sneakily perform a lexical search by framing the search text as;</p><pre>search_string = f&#39;description={search_string}&#39;</pre><p>This opens up the possibility of searching via SKU or title directly.</p><p>From this point, we now have a vector embedding for each SKU ready to be loaded into a database.</p><h3>Querying the Vectors</h3><p>We are using <a href="https://www.pinecone.io/">Pinecone db</a> to perform our nearest neighbour search, although it can easily be accomplished with either the <a href="https://github.com/facebookresearch/faiss">FAISS library</a> from Meta, or using a simple dot product/cosine similarity search in the OpenAI API library;</p><pre>def search(df, product_description, n=3, pprint=True):<br>    product_embedding = get_embedding(<br>        product_description,<br>        engine=EMBEDDING_MODEL<br>    )<br>    df[&quot;similarity&quot;] = df.embedding.apply(lambda x: cosine_similarity(x, product_embedding))<br><br>    results = (<br>        df.sort_values(&quot;similarity&quot;, ascending=False)<br>        .head(n)<br>    )<br><br>    return results</pre><p>In Pinecone we upsert the data and then perform the query method call;</p><pre>search_text = &quot;whisky that was put in a sherry cask&quot;<br><br>vec_response = get_embedding(search_text,EMBEDDING_MODEL)<br><br>query_response = index.query(<br>    top_k=3,<br>    include_values=False,<br>    include_metadata=True,<br>    vector=vec_response, <br>    filter={<br>        &quot;category&quot;: {&quot;$eq&quot;: &quot;Whiskies&quot;},        <br>    },<br>)<br>print(query_response.matches)<br></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mHj7iHL0fc-y51b-AmQRpg.png" /></figure><p>The results were quite prescriptive. The lexical site search found products that matched, sherry and cask but also whisky stones which is quite clearly not in the context the customer was looking for.</p><p>Semantic search pulled the same sherry cask product, but also added the port cask aged product. In terms of recommendations, if a customer is looking for a sherry cask, the port cask might be an excellent choice for them.</p><h3>Visualizing the Results</h3><p>If we want to look at the vector space, we can reduce the dimensionality and plot it on a graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pl9KzX135NYTBoN5Dk1ldw.png" /></figure><p>The colours represent the different product lines from the distillery. Clustering products that are similar together. Intuitively this makes sense as products that are similar in nature will be semantically similar on the graph. This is the same concept from a previous article on <a href="https://data.blacksquare.io/using-gpt3-to-build-zero-shot-recommendation-and-search-engine-using-whisky-tasting-notes-eae0e25a45fc">Whisky Tasting Notes</a></p><h3>Conclusions</h3><p>Semantic search provides a simple and fast way to arrive at a more human-centric discovery for your site. Allowing your customers to have a better experience and find a product they are much more likely to enjoy.</p><p>Slainte</p><p>There is still ongoing work to be done on this search. Here are some of the things we are working on.</p><ul><li>Adding in conversational elements to the search. Can we create a prompt by asking the questions about occasion/taste/needs and improve the search results?</li><li>Hybrid search is a concept that you can merge lexical and semantic search. There is still lots of work to be done here but since users are more familiar with lexical search providing a hybrid model will help bridge some users to the semantic searches.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57b435b5ce3c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blacksquareca/rethinking-product-search-in-the-world-of-chatgpt-57b435b5ce3c">Rethinking Whisky Search in the World of ChatGPT</a> was originally published in <a href="https://medium.com/blacksquareca">BlackSquare.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Raising the Bar: Optimizing Alcohol and Spirits Sales Forecasting with Seasonal ARIMA Models]]></title>
            <link>https://medium.com/blacksquareca/raising-the-bar-optimizing-alcohol-and-spirits-sales-forecasting-with-seasonal-arima-models-a889e085644d?source=rss-44f5b6db67b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a889e085644d</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[supply-chain]]></category>
            <category><![CDATA[forecasting]]></category>
            <category><![CDATA[ecommerce]]></category>
            <dc:creator><![CDATA[John Carpenter (He/Him)]]></dc:creator>
            <pubDate>Mon, 20 Mar 2023 23:52:39 GMT</pubDate>
            <atom:updated>2023-03-20T23:52:39.030Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xFwAY-GvEYV2DMUJiBnjcw.jpeg" /></figure><ul><li>Accurate forecasts lead to better inventory management and a better understanding of the seasonal variations in your product demand.</li><li>Forecasts for alcohol sales need to take into consideration local holidays, demand and laws</li><li>ARIMA model can effectively model holidays and time varying demand on a SKU and regional levels</li></ul><p>Achieving pinpoint accuracy in sales forecasting is imperative for businesses in the alcohol and spirits industry, especially within the Direct-to-Consumer (DTC) market. This is because precise forecasting paves the way for streamlined inventory management, ensuring you deliver products to customers efficiently.</p><p>A unique aspect of forecasting within the alcohol industry stems from the indisputable association between alcohol sales and celebratory occasions — festivities, holidays, and social gatherings are inherently tied to an increased demand for alcoholic beverages. Consequently, it is imperative for forecasting endeavors to consider the spikes in demand resulting from holidays, celebrations, festivals, and locale-specific inclinations. Moreover, given the regional character of these events, global demand planning and forecasting necessitate individualized modeling for each region to accurately account for the distinct subtleties and variations. Models built for Germany won’t apply to models built for the California market.</p><p>This article will discuss the importance oaf inventory planning and forecasting, the challenges faced by the industry, and introduce a forecasting model, ARIMA, that can help address these issues.</p><h3>Inventory Planning and Forecasting</h3><p>Inventory planning is the process of ensuring that you have just enough stock on hand to satisfy customer demand without being inefficient by storing too much product.</p><p>For the DTC alcohol market, the complexity increases, as the distribution often necessitates numerous local warehouses. This is due to the fact that transporting controlled substances like alcohol across regional boundaries can result in additional financial burdens, such as increased taxes or fees.</p><p>The best way to have an efficient inventory plan is to have accurate sales forecasts. By having a clear and precise understanding of that future demand, businesses can optimize their inventory levels in several ways:</p><ol><li><strong>Reducing Stockouts</strong>: With accurate forecasting, DTC brands can ensure they have sufficient stock to meet customer demands during peak periods, such as holidays and special events. Having products on hand is the easiest way to ensure customer satisfaction with your brand.</li><li><strong>Minimizing Overstocking</strong>: Overstocking alcohol inventory leads to higher holding costs, including storage, insurance, and, in some cases, spoilage for products with limited shelf life. These increased costs can erode profit margins and hinder business growth.</li><li><strong>Opportunity Costs</strong>: Inefficient inventory management can tie up capital in slow-moving or excess inventory, limiting a business’s ability to invest in other growth initiatives, marketing, or product development. Product that is sitting in a warehouse isn’t making money for the company.</li><li><strong>Facilitating informed decision-making</strong>: With a reliable forecast, businesses can make more informed decisions about pricing, promotions, and product assortment. This allows them to capitalize on opportunities, such as seasonal trends.</li></ol><h3>Introducing the ARIMA Model</h3><p>ARIMA, which stands for AutoRegressive Integrated Moving Average, is a popular and versatile time series forecasting method. It combines three components: Autoregression (AR), Integration (I), and Moving Average (MA). The AR component captures the relationship between a current observation and a number of lagged observations, in our case historical sales. The I component represents the process of differencing the time series to make it stationary, i.e., to remove trends and seasonality. The MA component accounts for the relationship between a current observation and a residual error from a moving average of lagged observations.</p><p>The ARIMA model has a number of benefits. First, it is very flexible and will work with a variety of different time-series data. It takes into consideration sales variations with holidays, spikes, dips and seasonal decompositions making them suitable for alcohol and spirits sales forecasting. Second, while ARIMA models require a certain level of statistical understanding, they are relatively straightforward to implement using modern software and programming languages.</p><p>For our testing we implemented a version or ARIMA from <a href="https://cloud.google.com/bigquery-ml/docs">BigQueryML</a> (ARIMA_PLUS). This model decomposes the time stream into the constituent parts and reassembles the model for forecasting.</p><figure><img alt="Google BigQuery ARIMA model diagram" src="https://cdn-images-1.medium.com/max/1024/1*qw20gVMckob3VbAPIw9Ytg.png" /><figcaption><a href="https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-create-time-series">https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-create-time-series</a></figcaption></figure><p>One of the great features of this prebuilt model is that you can generate the explanation of the output using.</p><pre>select * from ML.EXPLAIN_FORECAST(MODEL `arima_model`,<br>                   struct(90 as horizon, 0.90 as confidence_level))</pre><p>The derived output (shown below) can tell you; for an individual SKU, how much the sales are cyclical (yearly, monthly, quarterly, weekly) and how much holidays or special events (spikes and dips) dominate the sales.</p><pre>{<br>  &quot;sku&quot;: &quot;123456&quot;,<br>  &quot;trend&quot;: &quot;0.0&quot;,<br>  &quot;seasonal_period_yearly&quot;: null,<br>  &quot;seasonal_period_quarterly&quot;: &quot;-2.6641903226458963&quot;,<br>  &quot;seasonal_period_monthly&quot;: &quot;-8.66264067477488&quot;,<br>  &quot;seasonal_period_weekly&quot;: &quot;4.1585732749501689&quot;,<br>  &quot;seasonal_period_daily&quot;: null,<br>  &quot;holiday_effect&quot;: null,<br>  &quot;spikes_and_dips&quot;: &quot;0.0&quot;,<br>  &quot;step_changes&quot;: &quot;11.936206568243172&quot;<br>}</pre><p>The output for this product shows that there is a “step_change” triggered by a sudden sales from marketing efforts, but also a very strong monthly correlation, meaning the sales are stronger near the end of the month. Plotting out the sales as a function of the day of the month, you can see the emergent trend.</p><figure><img alt="Plot of sales over the day of the month, showing a spike on day 29" src="https://cdn-images-1.medium.com/max/1024/1*9MsYqXahW0-7GXtkxAia9g.png" /></figure><p>In this instance, the ARIMA model has successfully discerned the product’s typical sales pattern. This pattern could be a reflection of customer purchasing habits or the result of marketing initiatives implemented toward the month’s end. Regardless of the cause, the ARIMA model effectively captures the cyclical nature of sales, which can then be leveraged for forecasting purposes.</p><h3>ARIMA Forecasting Model: Examples in Action</h3><p>We applied the ARIMA forecasting model to a suite of SKUs to see if we could forecast the sales and reduce the inventory on hand within one warehouse.</p><p>Because the demand for individual SKUs will vary seasonally, the ARIMA model had to be applied on a SKU by SKU basis and aggregated together to provide a wholistic view.</p><p>Plotting the actual sales vs. forecasted sales, we can see that the aggregated ARIMA model had smoothed out the spikes and maintained the week-to-week variations. (We see an increase in purchases near the end of the week across all the SKUs)</p><figure><img alt="Plot showing the last 3 months worth of sales and the next 3 months predicted with the ARIMA model" src="https://cdn-images-1.medium.com/max/1024/1*wRnrTcVhcC0SsUGJzWA2Hg.png" /></figure><p>In general, the forecasted sales trend with a higher average than the actual sales for the previous month. This is in part due to the fact that we calculate the forecast error with a high level (0.90) of statistical confidence. Based on the previous trend we can make a statement saying that <em>“the accuracy of the model is 90% likely that forecasted sales will fall below the estimated number”</em>. While we would like to optimize the inventory on-hand we want to make sure that we aren’t running into situations where we can’t satisfy customer demand. We are better to err on the side of additional products in the warehouse, so the forecasts provide a measure of the base inventory you should be keeping on hand.</p><blockquote>“It’s tough to make predictions, especially about the future.” — Yogi Berra</blockquote><p>Although sales forecasts are valuable for inventory management, they do not encompass the entire equation. Factors such as supply chain delays, receiving costs and delays, and product availability must also be considered. A robust sales forecast enables businesses to address manageable issues within their supply chain more proactively by providing ample lead time. However, it should not be the sole foundation for inventory management; a comprehensive approach is essential for success.</p><h3>Conclusion: ARIMA Forecasting Model on Our Insight Platform</h3><p>We implemented an ARIMA that was able to accurately model the seasonal and periodic variations that we see within individual products sales. This model will help our sales forecasts and will form an important part of our inventory management process going forward. The additional benefit of understanding the variations in the time of the sales for a product will be useful from a marketing perspective.</p><p>The accuracy of the forecast is only as good as the underlying training data, so as we continue to refine the model we will continue to see improvements on forecasting and inventory management.</p><h3>Implementing the ARIMA Model</h3><p>With any ML/AI model, the complexity is not in the research behind the model but making the output available in production environments to the people that need the information. A recent <a href="https://www.kdnuggets.com/2022/01/models-rarely-deployed-industrywide-failure-machine-learning-leadership.html">study</a> showed 80% of ML/AI models fail to make it into production. That study highlights the importance of having a pipeline to move models from concept to production, and leverage the value of that research.</p><p>Our <strong>insight:</strong> platform, utilizes the Google Cloud platform to deploy, test and iterate ML/AI models, at scale in production. Having a strategy to ensure ML/AI can make it into production is an important part of any strategy.</p><p>ARIMA forecast model is available on our DTC <strong>insight:</strong> platform, and if you’d like to explore how it can help you out, contact us <a href="https://www.blacksquare.io/contact-us/">here</a></p><p>Some research papers that will aid in your own investigation for ARIMA models;</p><p><a href="https://arxiv.org/pdf/2203.06848.pdf">Hasan, M. R., Kabir, M. A., Shuvro, R. A., &amp; Das, P. (2022). <em>A Comparative Study on Forecasting of Retail Sales</em>.</a></p><p><a href="https://arxiv.org/pdf/2107.12770.pdf">Menculini, L., Marini, A., Proietti, M., Garinei, A., Bozza, A., Moretti, C., &amp; Marconi, M. (2021). <em>Comparing Prophet and Deep Learning to ARIMA in Forecasting Wholesale Food Prices</em>.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a889e085644d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blacksquareca/raising-the-bar-optimizing-alcohol-and-spirits-sales-forecasting-with-seasonal-arima-models-a889e085644d">Raising the Bar: Optimizing Alcohol and Spirits Sales Forecasting with Seasonal ARIMA Models</a> was originally published in <a href="https://medium.com/blacksquareca">BlackSquare.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are There Benefits to Using ChatGPT in Your Organization?]]></title>
            <link>https://medium.com/blacksquareca/are-there-benefits-to-using-chatgpt-in-your-organization-3fbc23cc68c7?source=rss-44f5b6db67b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fbc23cc68c7</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[whisky]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[John Carpenter (He/Him)]]></dc:creator>
            <pubDate>Mon, 13 Mar 2023 08:02:04 GMT</pubDate>
            <atom:updated>2023-03-13T08:02:04.825Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CulhdUXbj9JK70_3WkoGMw.jpeg" /></figure><p>In a recently (not peer reviewed, mind you) <a href="https://economics.mit.edu/sites/default/files/inline-files/Noy_Zhang_1.pdf">published article</a>[1], MIT students Shakked Noy and Whitney Zhang ran a simple experiment presenting 444 professionals with the opportunity to leverage ChatGPT to perform some basic writing tasks. The results were quite prescriptive as the AI supported groups saw a <strong>37% increase in productivity with no measurable drop in the quality of output.</strong></p><p>The biggest drawback was the work undertaken by professionals often requires real-time or customer specific data, and in this regard the ChatGPT struggles because it is trained with generic writing. But the AI model behind ChatGPT can be trained with your specific data, in near real-time and customer specific. That 37% can be a massive boost when trained against your specific data.</p><p>We tested that out leveraging the GPT model at OpenAI to solve the complex issue of recommending whiskies using just tasting notes;</p><p><a href="https://data.blacksquare.io/using-gpt3-to-build-zero-shot-recommendation-and-search-engine-using-whisky-tasting-notes-eae0e25a45fc">https://data.blacksquare.io/using-gpt3-to-build-zero-shot-recommendation-and-search-engine-using-whisky-tasting-notes-eae0e25a45fc</a></p><p>We are only brushing the surface of the capability of GPT models and as more companies start implementing GPT it is likely to become as common place as spreadsheets in the modern workplace.</p><p>[1] <a href="https://economics.mit.edu/sites/default/files/inline-files/Noy_Zhang_1.pdf">https://economics.mit.edu/sites/default/files/inline-files/Noy_Zhang_1.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fbc23cc68c7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blacksquareca/are-there-benefits-to-using-chatgpt-in-your-organization-3fbc23cc68c7">Are There Benefits to Using ChatGPT in Your Organization?</a> was originally published in <a href="https://medium.com/blacksquareca">BlackSquare.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using GPT3 to Build Zero-Shot Recommendation and Search Engine using Whisky Tasting Notes.]]></title>
            <link>https://medium.com/blacksquareca/using-gpt3-to-build-zero-shot-recommendation-and-search-engine-using-whisky-tasting-notes-eae0e25a45fc?source=rss-44f5b6db67b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/eae0e25a45fc</guid>
            <category><![CDATA[recommendation-system]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[whisky]]></category>
            <dc:creator><![CDATA[John Carpenter (He/Him)]]></dc:creator>
            <pubDate>Fri, 10 Mar 2023 02:17:46 GMT</pubDate>
            <atom:updated>2023-03-10T21:24:51.665Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Whisky barrels overlooking the sea" src="https://cdn-images-1.medium.com/max/1024/1*xPCc84L0zfKu2UVWa3Paew.jpeg" /></figure><p>In the world of direct-to-consumer (DTC) ecommerce, one of the biggest challenges is guiding customers to products they’ll love. Enter the algorithmic recommendation engines. Recommendation engines are one of the most powerful tools any ecommerce business can leverage to maximize user engagement, increase sales and drive revenue.<a href="http://www.mckinsey.com/industries/retail/our-insights/how-retailers-can-keep-up-with-consumers"> Amazon, for example, generates an astounding 25% of its revenue from product recommendations.</a></p><p>Intuitively this makes sense. When shopping in a physical store, a salesperson will often recommend products to customers. Usually based on their product knowledge and expertise. In contrast, recommendation engines leverage vast amounts of browsing and purchase data to generate personalized recommendations for online shoppers. Both are very effective at guiding customers. However, an effective recommendation engine can be challenging for several reasons.</p><p>Firstly, it requires the collection and organization of significant amounts of data, including user behaviour and purchase history. This data collection process must also take into account privacy concerns and legal compliance requirements. Additionally, the accuracy of recommendations relies heavily on historical patterns of user behaviour or product purchases. Without sufficient data, the recommendations generated by the engine may lack relevance or value.</p><p>That insufficient data problem arrises when you have users that have never visited your site, or for products that have never been seen. For most DTC this represents the majority of all interactions, and so recommendation engines will not produce much value.</p><p>So we investigated a <strong>zero-shot recommendation technique</strong> to generate recommendations based on contextual cues instead of relying on historical behaviour or purchase history.</p><p>Since we sell whisky online, (BlackSquare is the independent retailer for malts.com) we had access to a large collection of whisky tasting notes. All of them are online at malts.com. These are notes from whisky experts that cover the full sensory scope of the whisky experience. In theory then, if we could categorize the taste profile of a whisky, we could use that as accurate context for the recommendations. Mapping whiskies that have the same profile together.</p><p>But the way experts describe flavours, smells, colours and tastes are wildly creative and impossible to accurately categorize. The image below from whatsyourwhisky.com flavour profiler shows the array and depth of terms to describe the sensory experience of whisky. That probably explains why it such a popular drink!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*4gbTgSChlYGSULNa4Wz3tQ.jpeg" /><figcaption>Diageo flavour wheel © Diageo</figcaption></figure><p>Recently ChatGPT and GPT3 from OpenAI has shown a skill at handling and interpreting complex, context information, particularly language. Merging the language capabilities and the whisky tasting notes we could arrive at a map of the sensory profile and recommend products that are close within that sensory profile map.</p><p>To do this we pulled in all the information for all the whiskies we had, and merged that into a single string. Something like what we’ve entered below.</p><pre>Caledonian &#39;The Cally&#39; 40 Year Old Single Grain Scotch Whisky, 70cl:  Description is Part of the 2015 Special Releases. Aromas of toffee popcorn, grilled pineapple and honeycomb. Toasty and oaky, bu</pre><p>So from the single string, we generate an <a href="https://platform.openai.com/docs/guides/embeddings/what-are-embeddings">Embedding using the OpenAI API</a>. Embeddings measure the relatedness of the two strings using the GPT3 model. A convenient helper model can be used to generate all the embeddings;</p><pre>df = pd.DataFrame(zip(product,combined, brand), columns = [&#39;product&#39;,&#39;combined&#39;, &#39;brand&#39;])<br>df[&quot;embedding&quot;] = df.prompt.apply(lambda x: get_embedding(x, engine=EMBEDDING_MODEL))</pre><p>The result is a descriptive vector of roughly 1800 elements describing the whisky. By performing a simple cosine search within the vector space we can find the closest neighbours.</p><pre>from openai.embeddings_utils import (<br>    get_embedding,<br>    distances_from_embeddings,<br>    tsne_components_from_embeddings,<br>    chart_from_components,<br>    indices_of_nearest_neighbors_from_distances,<br>    cosine_similarity<br>)<br><br># constants<br>EMBEDDING_MODEL = &quot;text-embedding-ada-002&quot; <br><br># get distances between the source embedding and other embeddings (function from embeddings_utils.py)<br>distances = distances_from_embeddings(query_embedding, embeddings, distance_metric=&quot;cosine&quot;)</pre><p>That gives us results like the following;</p><pre>Source: Inchgower 14 Year Old Flora &amp; Fauna Single Malt Whisky, 70cl<br>Rec: Inchgower 27 Year Old Special Releases 2018 Single Malt Scotch Whisky, 70cl <br>Rec: Knockando 12 Year Old Single Malt Scotch Whisky, 70cl <br>Rec: Glen Elgin 18 Year Old Single Malt Scotch Whisky, 70cl </pre><p>Which are scotches characterized by their sweetness as far as whiskies go. <a href="https://www.malts.com/en-gb/products/single-malt-whisky/inchgower-14-year-old-flora-fauna-single-malt-whisky-70cl">Inchgower</a> is described as;</p><blockquote>“Rich and deep and a hint of toffee. After a while offers some short-crust pastry and fruit, like greengage tart or damson pie. Then it settles and becomes lighter and vaguely ‘gun-metal’ — a mix of metal, gun oil and cordite, but all very faint. With water, it freshens up but gives little away. For a time there is an unmistakable scent of horse chestnuts — green and nutty — but after a while, it becomes much sweeter and more floral, like acacia honey.”</blockquote><p>and <a href="https://www.malts.com/en-gb/products/single-malt-whisky/glen-elgin-18-year-old-single-malt-scotch-whisky-70cl">Glen Elgin</a>;</p><blockquote>“Smooth and very sweet, A burst of sweetness washes over the palate, with traces of spun honey and honeycomb, followed by sour apples, oaky spice and brown sugar. The fruit stays centre stage, with icing sugar sweetness, butter and wood at the edges. The spice builds, with light cinnamon joined by dark clove and dried orange peel. Water calms the spice to reveal sweet notes of cream, sherbet and almond nuttiness, with orchard fruit and fruit jelly.”</blockquote><p>The two languages are very distinct but have the same tones of sweetness, nuttiness. The Embeddings from GPT3 identified the similarity between those two contexts and classified them together. Customers who enjoy Inchgower would have a similar sensory experience with Glen Elgin.</p><p>Visualizing the map becomes a little difficult because of the size of the vector space. But using t-Distributed Stochastic Neighbor Embedding (t-SNE) ( Good walkthrough <a href="https://towardsdatascience.com/an-introduction-to-t-sne-with-python-example-5a3a293108d1">here</a>) we can reduce that number from 1800 to around 3. Useful for mapping and plotting.</p><p>You can then explore the relation of the sensory map and how the products relate to each other.</p><figure><img alt="3D Graph Showing Inchgower and Glen Elgin closely related. Colours represent different whisky brands" src="https://cdn-images-1.medium.com/max/1024/1*EqQj_JD0TTkk3JlJ0n2ZjA.png" /></figure><p>Emergent out of the map, we could see specific clusters. Each point on the map was colour coded based on the distillery or brand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qTg8ntHtu-_agOHBQ0QT9w.png" /></figure><p>This shows that different distilleries have distinct sensory profiles, or at least they are described that way….</p><p>Feel free to visit and test it out here;</p><p><a href="https://cdn.insightplatform.ai/scripts/gpt-scatter/scatter.html">GPT3 Embeddings using Whisky Sensory Notes</a></p><p>I would love to hear any feedback or thoughts on the distinct patterns you might see.</p><p>As a bonus, we are aren’t limited to embeddings simply of the whisky profile. We can create an embedding using any search term and find the nearest whisky profile. In essence it becomes a whisky taste search engine!</p><figure><img alt="Search results output from a example search, sweet and a little nutty. Showing inchgower on the list" src="https://cdn-images-1.medium.com/max/1024/1*7FSkBRr65CXXDWrFbJAEOg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eae0e25a45fc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blacksquareca/using-gpt3-to-build-zero-shot-recommendation-and-search-engine-using-whisky-tasting-notes-eae0e25a45fc">Using GPT3 to Build Zero-Shot Recommendation and Search Engine using Whisky Tasting Notes.</a> was originally published in <a href="https://medium.com/blacksquareca">BlackSquare.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Key Metrics that Signal DTC Success]]></title>
            <link>https://medium.com/blacksquareca/5-key-metrics-that-signal-dtc-success-4efcd101bf1f?source=rss-44f5b6db67b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/4efcd101bf1f</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[dtc-brands]]></category>
            <dc:creator><![CDATA[John Carpenter (He/Him)]]></dc:creator>
            <pubDate>Tue, 07 Mar 2023 03:34:28 GMT</pubDate>
            <atom:updated>2023-03-07T03:34:28.701Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*87GOmu5XetM-Jdtypt1SGA.png" /></figure><p>Direct-to-consumer (DTC) is a lucrative business model that can deliver exceptional results if executed correctly. By cutting out intermediaries, like warehousing and suppliers, DTC allows brands to generate significant revenues, build a loyal customer base and gather key market insights at the same time.</p><p>However, a poorly executed DTC strategy is a recipe for disaster. Big DTC brands Warby Parker, Casper, and Allbirds all struggle with profitability because of their focus on accelerated growth at the expense of operating efficiency. They have a huge amount of capital to fund this growth but not every brand has that access to capital or wants to show losses year after year.</p><p>For DTC to be profitable at any scale, you need to make the correct data-driven decisions. The most successful brands understand the power of Metrics and Key Performance Indicators (KPIs) to guide their growth and optimize their operations. Where the right metrics can enable brands to unlock sustainable growth, the wrong ones can hinder their progress.</p><p>In this article, we will present five essential metrics that we have used over the past decade while running, advising, and building DTC operations globally. The key to successful DTC is to achieve profitability at any scale and grow sustainably. By monitoring and optimizing these critical metrics, brands can steer their DTC strategy toward success and avoid pitfalls that can sink their growth.</p><h3>Conversion Rates</h3><p>Conversion rate is the ratio of the number of people that visit your site that end up buying. It measures how effective your website is at converting visitors into paying customers. At BlackSquare, we track conversion rates of above 2%, but the actual benchmark for your business will depend on various factors, such as your product offerings, and target audience.</p><p>Also, it’s important to analyze the conversion rate per channel, as the rate can vary depending on how customers arrived at your site. Email campaigns should have a higher conversion rate of around 4–5%, while referral traffic could be lower than 2%. Understanding your conversion rates means you understand that the customers you are attracting are the same ones looking to purchase your products.</p><h3>Margins</h3><p>DTC brands cut out intermediaries like warehouses and suppliers to generate higher revenues, build a loyal customer base, and gain key insights into their markets. However, they must cover the expense of delivering products, storing them in warehouses, and providing customer service. Therefore, it is essential to keep track of the product margins to be profitable at any scale whilst being able to grow sustainably. But calculating margins is tricky.</p><p>When calculating margins for DTC, it is important to consider more than just the cost of goods sold (COGS). Other considerations include marketing, customer service, warehousing, shipping costs, and taxes. The complexity is that often those numbers are never located in the same system. Marketing, warehousing, and customer service are typically stored in separate systems and aggregating that data is often time-consuming and/or expensive (I’m looking at you SAP).</p><p>But by understanding your margins, you can make data-driven decisions about pricing, production, and marketing strategies to maximize profitability.</p><h3>Return on Ad/Marketing Spend (ROAS)</h3><p>ROAS measures the revenue generated from advertising spend. It’s calculated by dividing the revenue generated from advertising by the cost of that advertising. DTC brands that overspend or underspend on digital marketing may struggle with profitability, making ROAS a critical metric to monitor.</p><p>A minimum ROAS should be set based on the margin of the product. If the margin is 33%, for instance, a minimum ROAS of 3 should be set to ensure profitability. If the ROAS is too high, it may be a sign that the brand is not spending enough to meet customer demand.</p><p>Tracking ROAS allows DTC brands to identify which advertising channels are most effective at driving revenue and adjust their advertising strategy accordingly. For example, if a brand is not getting a good ROAS on social media advertising, it may want to consider shifting its focus to search engine advertising, where they are seeing a higher return. ROAS is a great lever to be able to amplify the successful parts of your marketing programs.</p><h3>Repeat Customers</h3><p>Loyal customers are the cheapest and easiest way for DTC brands to be successful, so it’s essential to curate those customers to drive repeat business.There are several KPIs that brands can use to measure repeat customers, including customer lifetime value, return rate, and subscription churn.</p><p>Customer lifetime value (CLV) is the amount of revenue that a customer is expected to generate over their lifetime of doing business with a brand. Return rate measures the percentage of customers that return to make another purchase. Subscription churn measures the percentage of customers that cancel their subscription over a given period.</p><p>Tracking these KPIs allows DTC brands to identify areas where they may need to improve their customer experience, product offerings, or customer service. If a brand has a low return rate, it may want to consider offering more personalized product recommendations to encourage customers to come back.</p><h3>IT Spend</h3><p>As a brand’s DTC operation grows, the complexity of the operation increases. This means that the brand may need additional teams, warehouses, bigger and more sophisticated tools, different services, more team members, and more servers to support its growth.</p><p>IT spending refers to the money that a brand spends on information technology, such as software, hardware, and services. It is important to track this spending as a function of growth because overbuilding your system can destroy the margins built into your DTC operation. This means that if you invest too much in IT spending too early, you may not be able to generate enough revenue to cover those costs, which will negatively impact your profitability.</p><p>Optimizing IT spending is all about finding the sweet spot between investing enough to support growth while not overinvesting and negatively impacting margins. It’s important to consider the total cost of ownership (TCO) of your IT investments, including the cost of employees needed to support and manage the software. This way, you can make informed decisions about where to allocate your IT spending to support your DTC operation’s growth effectively.</p><p>Data-driven decisions are essential for DTC brands to be successful. By tracking the right KPIs, DTC brands can gain insights into their customers’ behaviour and adjust their strategies accordingly. Furthermore, it is critically important to monitor IT spending so that you don’t overinvest in technology too early which could impact your profitability negatively. Investing in data analytics tools will help you make better business decisions based on real customer insights rather than guesswork or assumptions. With the power of data at your fingertips, you’ll have a much greater chance of success with your DTC operation.</p><h3>Bonus: Metrics that don’t work</h3><p>Vanity metrics and KPIs can be tempting for DTC brands to use to measure success. However, these metrics are often lagging indicators that don’t provide much insight into the true profitability of a business. Five examples of vanity metrics are shown below. Sales, pageviews, bounce rates, time on page and social metrics have very little impact on a DTC site and are the results of focusing on the metrics that can be impacted by DTC. You can’t impact sales, but you can choose the right people to visit and incentives to buy your product.</p><ol><li><em>Sales</em></li><li><em>Hits / Pageviews</em></li><li><em>Bounce Rates</em></li><li><em>Session Duration / Time on Page</em></li><li><em>Like, Upvotes, Engagement</em></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4efcd101bf1f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blacksquareca/5-key-metrics-that-signal-dtc-success-4efcd101bf1f">5 Key Metrics that Signal DTC Success</a> was originally published in <a href="https://medium.com/blacksquareca">BlackSquare.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding the ChatGPT Cycle]]></title>
            <link>https://medium.com/blacksquareca/understanding-the-chatgpt-cycle-96460c9f478d?source=rss-44f5b6db67b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/96460c9f478d</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[John Carpenter (He/Him)]]></dc:creator>
            <pubDate>Wed, 01 Mar 2023 02:56:25 GMT</pubDate>
            <atom:updated>2023-03-01T03:10:56.670Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve missed the last couple of months communing with nature or pushing boulders up hills, ChatGPT is rapidly dominating print (who uses that?) and social media spaces. ChatGPT is an AI language model developed by the team at OpenAI. What’s different about this model is that it learns context from previous prompts. Basically, it can hold a conversation, in the most generous sense of the word.</p><p>But where ChatGPT is different is that the language model excels at, baring my own lack of vernacular, understanding languages. More than that, it can understand language context. So if you prompt ChatGPT with “write a limerick about whisky”…</p><blockquote>In Scotland, they take whisky quite seriously. Their love for it is quite eerie. It’s aged to perfection. With just the right direction. And the taste is incredibly cheery!</blockquote><p>…You can shift the context with “Can you make that into a blues song lyric?”</p><blockquote>Verse 1: Well, I’m sittin’ here drinkin’ whisky in Scotland Where the love for it is quite profound, man Aged to perfection, it’s the real deal The taste is so good, it makes me wanna squeal</blockquote><blockquote>Chorus: Oh, whisky, whisky, how you make me feel</blockquote><p>That’s a really powerful tool. Using that ability to shift “language context,” you can do some powerful things. With just the ability to shift context, you can:</p><ul><li>Translate text into PowerPoint slides…</li><li>Generate source code from prompts…(Really, this works)</li><li>Rewrite emails in a professional voice…</li><li>Brainstorm ideas for the next campaign (“Raise your spirits with Liquid Lab — where technology meets your favorite drink!” — Thanks ChatGPT)</li></ul><p>But it’s easy to get wrapped up in the hype cycle of ChatGPT. There is still much that needs to be improved in the models, and there is a lot that it can’t do. ChatGPT can generate text, but it’s often incorrect, filled with errors, or contextually wrong. So be careful using it as a replacement for social media posts or generating content. Always check content before distributing it. ChatGPT is incredibly good at looking competent.</p><p>If Ernest Hemingway said, “Write drunk, edit sober,” he was probably referring to the use of AI. At least that’s what ChatGPT told me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=96460c9f478d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blacksquareca/understanding-the-chatgpt-cycle-96460c9f478d">Understanding the ChatGPT Cycle</a> was originally published in <a href="https://medium.com/blacksquareca">BlackSquare.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The First Steps to Embracing Machine-Learning and AI for DTC Companies: How to Stay Ahead of the…]]></title>
            <link>https://medium.com/blacksquareca/the-first-steps-to-embracing-machine-learning-and-ai-for-dtc-companies-how-to-stay-ahead-of-the-b52bdae0abd7?source=rss-44f5b6db67b0------2</link>
            <guid isPermaLink="false">https://medium.com/p/b52bdae0abd7</guid>
            <category><![CDATA[dtc-brands]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[dtc]]></category>
            <dc:creator><![CDATA[John Carpenter (He/Him)]]></dc:creator>
            <pubDate>Wed, 01 Mar 2023 01:23:48 GMT</pubDate>
            <atom:updated>2023-03-01T01:37:24.523Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*06vBye1VmE0gpoZe2S8GDg.png" /><figcaption>a lonely robot working at a desk in the style of Johannes Vermeer — Dall-E 2</figcaption></figure><h2>The First Steps to Embracing Machine-Learning and AI for DTC Companies: How to Stay Ahead of the Game</h2><p>Direct-to-consumer (DTC) brands are shaking things up like never before. Scrappy upstarts, like Warby Parker are giving traditional industries a run for their money, thanks to their ability to deliver higher margins, lower operating costs, and build more loyal customers. But let’s not be fooled — success in the DTC world is not a given. In fact, staying ahead of the competition is the key to long-term success.</p><p>But how can you do that when everyone else is fighting just as hard for a piece of the pie?</p><p>The answer is <strong>Data</strong> and using machine learning (ML) and artificial intelligence (AI) to harness the value of that data. ML/AI has the power to transform the way DTC companies do business, from improving the customer experience to optimizing inventory management. It’s the secret sauce that can help you stay ahead of the curve and keep your customers coming back for more.</p><p>But don’t be fooled – adopting ML/AI isn’t as simple as flicking a switch. The first steps are crucial, and can mean the difference between success and failure. That’s why in this article, we’ll explore the key first steps that DTC companies need to take when adopting ML/AI, from identifying the right business problem to choosing the right technology. By following these steps, you’ll be on the path to ML/AI mastery in no time</p><h3>Identifying the Business Problem</h3><p>Some people think that ML/AI is like a magic wand that can solve any business problem. But the truth is, ML/AI is only methodology that can help mine through data and expose patterns. Without a clear understanding of the problem you’re trying to solve, ML/AI can be expensive and time consuming.</p><p>One company that’s doing it right is Sephora, the cosmetic retailer. They use ML/AI to create a personalized shopping experience for their customers. By analyzing customer data, such as purchase history and browsing behaviour, Sephora’s algorithms can provide personalized recommendations for makeup, skincare, and other beauty products.</p><p>To measure the success of their personalized recommendation system, Sephora tracks key metrics such as click-through rates, conversion rates, and revenue generated. These metrics are critical to set in advance and form part of the training data to build the system.</p><blockquote><em>Better Metrics means Better Training means Better Metrics</em></blockquote><p>Knowing the business value and expected outcomes is important in building a successful ML/AI strategy. ML/AI works by finding patterns in data sets, so having a solid understanding of the problem and desired outcomes will ensure that the system can derive real value for the business.</p><p>While ML/AI can be incredibly powerful, it’s not a silver bullet. It’s important to approach it strategically and with a clear understanding of the problem you’re trying to solve and the metrics that will be used to measure success.</p><h3>Assess Your Data</h3><p>When it comes to ML/AI, data is everything. ML/AI algorithms are only as good as the data, so the quality and quantity of your data can make all the difference when it comes to the success of your ML/AI implementation.</p><p>DTC, in general, collects a huge amount of data, on customers, products, transactions, and more, all with the goal of improving the customer experience and driving growth. But here’s the thing: all that data can quickly become overwhelming, and it’s not always easy to extract insights and make decisions based on the data, especially if that data is located in separate systems.</p><p>That’s where a data lake comes in. A data lake is a centralized repository for all of a company’s data, where data can be stored, managed, and analyzed in a flexible and scalable way. With a data lake, DTC companies can break down data silos, integrate data from multiple sources, and make data-driven decisions with greater speed and accuracy.</p><p>Having all your data in a data lake will make it much easier to assess your data and identify any gaps or inconsistencies in the data, and importantly help asses if there is enough data to build a robust AI model.</p><p>Even with the right data, you also need to clean and pre-process your data to ensure it’s in a format that can be used by ML/AI algorithms. This means identifying and addressing any missing or erroneous data, and transforming the data into a format that can be understood by the AI algorithms. Depending on the type of data, this may involve techniques such as normalization, feature engineering, or dimensionality reduction.</p><p>In some cases, the current data sets are not always enough for a robust AI model. There needs to be a willingness to experiment and iterate until you find the right solution. This means collecting more data, minimizing the model or using external data sets to augment your data.</p><p>Having a strategic and data-driven approach for DTC means that you are collecting the right data and can take advantage of using that data.</p><h3>Build the Innovation Foundation</h3><p>Once you are ready to deploy ML/AI, it’s important to start small and focus on specific problems where it can add real value. This means choosing a problem that is well-defined and has a clear impact on the business, and developing a proof of concept to demonstrate the potential value of ML/AI in solving that problem. Developing a proof of concept is an important step in the ML/AI adoption process, as it allows you to test the feasibility and potential of ML/AI in a controlled and low-risk environment.</p><p>But to be successful with the proof of concept, you first have to build the foundation to drive that innovation. This is where most ML/AI projects tend to fall apart. A foundation for testing ML/AI models means building a team of data scientists, engineers and analysts. Collecting, transforming and pipelining the data to build an ML/AI model. Deploying that model into production to test and continue to iterate to optimize the results.</p><p>This is an expensive process in terms of time and resources, with an outcome that may be uncertain. There are a couple of shortcuts you can build that allow you to see the value in ML/AI without massive investments.</p><ol><li><strong>Build a culture of innovation</strong>, encourage teams to identify problems and think about those problems in terms of patterns of data. The most valuable business insights come from employees in the day-to-day operation of DTC.</li><li><strong>Invest in data lake and data infrastructure</strong>. The dirty secret for most data scientists is that they spend most of their time finding, cleaning and preparing data. Data lake and infrastructure will allow them to focus on results instead of process. There are reasonable options here and the right technology decisions don’t have to be expensive.</li><li><strong>Have a playground</strong>. Build a playground that allows data teams to model, test and iterate on those models. Code environments like Juypter or AWS Sagemaker allow teams to experiment directly on the data without impacting other parts of the DTC business.</li><li><strong>Have a testing framework</strong>. Even the best ML/AI models need iteration and testing in production to show value. This means the innovation teams will need to be able to deploy into production, asses the impact the model has and iterate on those models. Investing in tools that enable rapid testing like Feature Flagging, A/B testing and CI/CD deployments; will allow the data teams to rapidly come up with ML/AI models that return real value to the brand.</li></ol><p>Taking a deliberate and strategic approach to building an innovation foundation, DTC companies can unlock the full potential of data programs and ML/AI in a smart and cost-efficient manner. And a strategic innovation foundation goes far beyond data, it can provide the foundation for an agile and flexible organization.</p><p>By adopting an agile mindset and building a culture of flexibility and experimentation, DTC companies can ensure the success of ML/AI programs and drive growth and innovation over the long term.</p><h3>Choose the Right Technology</h3><p>When it comes to implementing ML/AI programs, it’s easy to focus on the technology and tools that are available. But the truth is that technology is a small part of the equation. At its heart, ML/AI is a methodology and enabling the success of the teams is is more important that the underlying technology. There is no technology out there that will solve your ML/AI problem for you <em>but</em> there are platforms and tools that will make teams more productive.</p><p>In choosing the platform you should consider scalability, flexibility, security, cost and ease of use. Realistically most cloud platforms are relatively similar, DataBricks, Snowflake, AWS, Google Cloud, Microsoft Azure all tend to be interoperable and very capable.</p><p>The key consideration for this stage of learning ML/AI, should be on cost and flexibility. You want to invest in a platform that will grow but not at the expense of disturbing any ROI when you are launching the proof-of-concept. Over-engineering or investing too much in the technology will saddle your operation with expensive software that may require special expertise to manage and run. Data Engineering, DevOps, MLOps and SRE skillsets are in high demand and critical to scaling but come at a very high cost.</p><p>Realistically, the biggest tool you can provide is a central place to aggregate and store data. A data lake. Investing in a data lake will likely return you the highest gains and will allow teams to work seamlessly on the data sets.</p><p>A data lake is more than just a technology solution , it becomes the framework for your data program. A good data lake setup is more than technology and will become a strategic asset. By building a data lake, DTC companies can create a culture of data-driven decision-making, where insights are used to drive action and results. This requires a commitment to data governance, quality, and security, as well as a willingness to experiment and iterate until the right insights are found. It will provide the framework to allow you to grow your data program efficiently.</p><h3>Conclusion</h3><p>Direct-to-Consumer (DTC) companies can benefit from using machine learning (ML) and artificial intelligence (AI) to harness the value of their data. However, adopting ML/AI isn’t as simple as flicking a switch. DTC companies need to follow several crucial steps, including identifying the right business problem, assessing data quality, building an innovation foundation, and choosing the right technology.</p><p>By taking a strategic and data-driven approach to building an innovation foundation, DTC companies can unlock the full potential of data programs and ML/AI in a smart and cost-efficient manner.</p><p>Investing in a data lake will allow DTC companies to create a culture of data-driven decision-making and provide a framework to efficiently grow their data program.</p><p>Adopting ML/AI can help DTC companies stay ahead of the competition and drive additional DTC sales. With a willingness to experiment and iterate, a clear understanding of the business problem, and the right team and technology in place, DTC companies can use ML/AI to optimize their operations, enhance the customer experience, and drive growth and innovation over the long term.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b52bdae0abd7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/blacksquareca/the-first-steps-to-embracing-machine-learning-and-ai-for-dtc-companies-how-to-stay-ahead-of-the-b52bdae0abd7">The First Steps to Embracing Machine-Learning and AI for DTC Companies: How to Stay Ahead of the…</a> was originally published in <a href="https://medium.com/blacksquareca">BlackSquare.io</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>