<?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 Matthew Kim on Medium]]></title>
        <description><![CDATA[Stories by Matthew Kim on Medium]]></description>
        <link>https://medium.com/@mattbuilds?source=rss-77747e2de633------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NjcIQEU8al-GdgS-9l-vsw.jpeg</url>
            <title>Stories by Matthew Kim on Medium</title>
            <link>https://medium.com/@mattbuilds?source=rss-77747e2de633------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 04:02:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mattbuilds/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[Build the Thing That Builds the Product]]></title>
            <link>https://blog.dancingrobots.co/build-the-thing-that-builds-the-product-9243317731e1?source=rss-77747e2de633------2</link>
            <guid isPermaLink="false">https://medium.com/p/9243317731e1</guid>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Matthew Kim]]></dc:creator>
            <pubDate>Wed, 11 Nov 2026 00:00:56 GMT</pubDate>
            <atom:updated>2026-11-13T19:57:25.964Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4bZT8aQSHjc4mZAZfLEABw.jpeg" /></figure><h3>If only engineers can use AI to build software, every other team goes back to waiting in line. A better design has engineers build the platform that makes it safe for other teams to build for themselves.</h3><p>Goldman Sachs has reportedly limited its advanced AI coding tools to engineers and strats, according to <a href="https://www.fastcompany.com/91636500/goldman-sachs-bans-non-engineers-from-using-advanced-ai-tools">Fast Company</a>, which cites Bloomberg. Traders and bankers lost access. The firm still offers a chatbot to all employees, and a spokesperson described the limit as part of an experimental period.</p><p>The worry behind it is reasonable. Bank of America CEO Brian Moynihan described the risk in September as “letting it start getting answers without humans checking to make sure the answer was right.” A program keeps acting once it runs, so a mistake can repeat until someone catches it.</p><p>Restricting who can use the tool is one way to put the control. I think a better one is to build the checks into the system that makes the software. Most of the ideas below already exist in software engineering. What is new, and what I am proposing, is applying them to people who aren’t engineers, working with AI that writes the code.</p><h3>What happens when only engineers can build</h3><p>Dana leads trade operations at a hypothetical bank. Every morning she compares unmatched trade confirmations across three systems by hand. A small tool could do it. She knows exactly what it should show and which exceptions matter.</p><p>Dana isn’t an engineer, so she files a request. It joins the requests from every other desk.</p><p>That is a waterfall process. Work moves through stages in order, and each stage is usually owned by a different function. The business writes requirements and waits. Engineering builds from a ticket, and then testing and release take their turns. The people who understand the problem are not the people building the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rmmp3RWMODOoTHEA.png" /></figure><p>In my experience, this arrangement tends to produce three problems:</p><ul><li>Backlogs. The engineering group’s capacity is fixed, and demand grows with every team that learns what AI can do.</li><li>Firefighting. Urgent requests push aside planned work, so engineers spend their time reacting.</li><li>Systems nobody owns. The engineer who built Dana’s tool has moved to the next ticket. Dana knows what the tool should do now but can’t change it, and nobody else knows why it was built that way.</li></ul><p>These are my observations, not research findings.</p><h3>From waterfall to agile to agentic agile</h3><p>Agile development was a response to this problem. One principle in the <a href="https://agilemanifesto.org/principles.html">Agile Manifesto</a> says “Business people and developers must work together daily throughout the project.” Agile teams put the functions they need into one small cross-functional team so the team can deliver on its own.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jJrZZMCwyLggizKp.png" /></figure><p>Business teams have also built their own tools for a long time, in spreadsheets and low-code platforms. This is often called citizen development. The people closest to the problem build quickly, and the results can be hard to govern: Microsoft’s Power Platform guidance <a href="https://learn.microsoft.com/en-us/power-platform/guidance/adoption/manage-default-environment">describes apps and flows left ownerless</a> when their makers leave.</p><p>AI changes what those people can build. An agentic system is an AI that can plan and carry out multi-step work, such as writing, testing and changing code. It can produce far more capable software than a spreadsheet, which raises both the value and the risk. I’ll call a team that builds this way agentic agile. In the best case, the team’s owner describes what is needed, reviews what comes back and asks for changes, much as they would with an engineer.</p><p>That only works if the system runs inside guardrails, and engineering sets them: what the system can access, which security checks and tests every change must pass, and how a change gets rolled back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AO7FIF1BynZzQppS.png" /></figure><p>Compare it with the agile picture above. The Build box is now an agentic system, and testing and security checks move into the guardrails. The team owns the problem and the app, and engineering owns the guardrails.</p><h3>Engineers build the system that builds the product</h3><p>Two existing ideas support the engineering half of this.</p><p>The first is platform engineering. In <em>Team Topologies</em>, Matthew Skelton and Manuel Pais describe a platform team that provides self-service tools so other teams can deliver on their own, and treats those teams as its customers. <a href="https://thenewstack.io/how-team-topologies-supports-platform-engineering/">The New Stack</a> summarizes the model.</p><p>The second is Zach Lloyd’s version for AI. Lloyd is the CEO of Warp. In an <a href="https://latent.space/p/software-factories/">interview with Latent Space</a>, he said: “I think it can be extremely interesting if you view the job as meta-engineering: building the system that builds the product.” That gives this article its title. He also gave a talk, <a href="https://www.youtube.com/watch?v=nKjPBAw_N_0">“How to Build a Software Factory That Improves Itself”</a>, on the AI Engineer channel.</p><p>Lloyd says the most valuable thing to automate is “the main loop of software engineering: triage, specification, implementation, review, verification, shipping and monitoring,” with teams deciding “the points where humans should be brought into the loop.” His subject is a software company’s own engineering work, and the people using his factory are engineers. Extending the idea to traders, bankers and operations staff is my proposal, not his claim.</p><h3>Let the person with the problem build</h3><p>Suppose Dana’s bank has built that platform. She describes the tool she needs. The platform lets her tool read the three systems but not change them. Every change has to pass checks before release, and the platform records who owns the tool.</p><p>One caution: tests written by the same AI that wrote the tool are not enough on their own. The platform needs checks the builder can’t edit, such as comparing the tool’s output with known results, and a human reviewer for anything that touches money.</p><p>Once the tool is released, Dana owns it. Amazon’s CTO Werner Vogels described a similar principle in a <a href="https://queue.acm.org/detail.cfm?id=1142065">2006 interview</a>: “You build it, you run it.” For Dana, that means deciding when to change the tool, roll it back or retire it, because she knows who uses it and when it has stopped being useful. A named owner on every app also addresses the ownerless-app problem described earlier.</p><p>Engineers own the platform: the access rules, security checks, approvals for anything that touches money, required tests, rollback and the owner record. When a tool breaks in a way a test should have caught, they add a check, and every app gets it. The builder owns the app, and engineers own the platform.</p><h3>Who builds on the platform</h3><p>In this model each team is a self-contained unit with its own agentic system and someone who can build with it. I can see two ways to staff that role. A team could train its own people, such as a trader who builds a tool for her desk. Or it could have an embedded builder, a person on the team whose job is building tools for it, much like an agile team with one expert building on behalf of the others. Either way, the team owns what gets built, and the engineering group does not take it back.</p><h3>Who runs the platform</h3><p>Platform engineering already treats the platform as a product, with customers and a roadmap. Someone has to decide what the platform should let people build, what “safe” means for each kind of app, and whether it works: whether Dana’s problem was solved, how many tools were rolled back, and how many apps have no owner. What may be new is that the platform’s customers are non-engineers building with AI. I think that makes this a new variety of platform product manager. That is my view, and I haven’t seen evidence that settles it.</p><h3>What exists and what is unproven</h3><p>Already established: waterfall and agile as ways to organize work, platform teams that provide self-service tools, teams that run what they build, and governance for citizen-built apps, including owners and cleanup.</p><p>Still unproven: whether an AI agent can reliably build software for non-engineers inside guardrails, whether those guardrails can be automatic and trustworthy, and whether risk and compliance teams in a regulated bank will accept them. I don’t know whether this works for a regulated bank.</p><p>A first test could be narrow: read-only tools built by a few trained people on one desk. Measure how often released tools needed rollback, how often tests missed a problem a reviewer later found, and how many tools ended up without an owner. If tests keep missing problems or ownerless tools pile up, the platform isn’t ready for wider use.</p><h3>The two designs side by side</h3><p>Here is the same AI under both designs. On the left, waterfall: engineers do every step for every request in turn. On the right, agentic agile: engineers set the guardrails once, and each team builds inside them. Both sides run the same requests through the same steps: build, tests and security. The right side assumes the guardrails run tests and security checks automatically.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*vC7a4TpIj51WPhko.gif" /></figure><p><em>Originally published at </em><a href="https://neuralworks.co/insights/build-the-thing-that-builds-the-product"><em>https://neuralworks.co</em></a><em> on November 11, 2026.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9243317731e1" width="1" height="1" alt=""><hr><p><a href="https://blog.dancingrobots.co/build-the-thing-that-builds-the-product-9243317731e1">Build the Thing That Builds the Product</a> was originally published in <a href="https://blog.dancingrobots.co/">Dancing Robots</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Claims Agent using n8n, OpenAI, and Outlook (with vision and parallel tool calling)]]></title>
            <link>https://blog.dancingrobots.co/your-employee-of-the-month-is-a-robot-part-2-0e4dbb879586?source=rss-77747e2de633------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e4dbb879586</guid>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[workflow-automation]]></category>
            <category><![CDATA[n8n]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Matthew Kim]]></dc:creator>
            <pubDate>Thu, 25 Apr 2024 15:57:26 GMT</pubDate>
            <atom:updated>2024-05-23T12:22:32.448Z</atom:updated>
            <content:encoded><![CDATA[<h4>Your employee of the month is a robot, Part 2</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*htALEXuVfZ-10BRJcsly8w.png" /></figure><p>With companies like <a href="https://www.fastcompany.com/90888639/dropbox-tech-industry-layoffs-ai-job-cuts">Dropbox</a> and <a href="https://financialpost.com/fp-work/ai-driving-more-layoffs-than-companies-admit">UPS</a> laying off workers citing efficiency gains from AI, the trend has accelerated since the introduction of advanced Large-Language Models (LLMs) last year. Microsoft announced earlier this month their plan to invest $2.9 billion over the next two years. Sam Altman, CEO of OpenAI, is reportedly seeking <a href="https://www.wsj.com/tech/ai/sam-altman-seeks-trillions-of-dollars-to-reshape-business-of-chips-and-ai-89ab3db0">$7 trillion</a> worth of capital for his ventures.</p><p>To ensure we’re not left behind, let’s explore how we can put these advanced language models to practical use. In this article, I’ll guide you through building a customer support robot using n8n, Microsoft Outlook, and <a href="https://openai.com/">OpenAI</a>, using multi-modal and parallel tool calling features.</p><p>If you missed Part 1 of this series, I use n8n with OpenAI and ElevenLabs to build a talking enrollment agent robot. You can find that article <a href="https://blog.dancingrobots.agency/building-an-llm-crm-part-1-the-enrollment-agent-d4e4292f2a46">here</a>.</p><h3>Identifying the problem</h3><p>I’d be a naughty product manager if I didn’t start with a customer pain point. So, before I get ahead of myself, let’s come up with a hypothetical scenario for an e-commerce business:</p><p><em>You work on a product team for an online business selling a variety of books. The CEO has set a company-wide goal to automate away all repetitive and manual tasks. At an all-hands, you throw out a suggestion to hire your first robot! The CEO agrees to your suggestion and asks for a proof-of-concept.</em></p><p><em>After a few weeks of user interviews, process mapping, and discussions with your team you’ve picked a narrow use case as a candidate for your first automation:</em></p><ul><li><em>Despite stellar customer reviews, 1% of orders arrive damaged. As the business grows, this 1% has become a back-office nightmare. The process involves handling inbound customer emails, verifying damage from photos, checking warranties, making decisions, and responding to customers.</em></li></ul><h3>Building the workflow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OVN1eW5b-ZAeKcKRTFVGkw.jpeg" /><figcaption>A high-level concept for our robot</figcaption></figure><p><a href="https://n8n.io/">N8n</a> is an open-source low-code workflow automation tool that connects nearly 1000 services and features via a drag-and-drop canvas. It’s ideal for rapid prototyping and systems thinkers.</p><p>As we set up our customer support robot, n8n will orchestrate the entire process, including:</p><ul><li>Collecting order information from customers</li><li>Analyzing photos for defects</li><li>Checking warranties</li><li>Responding to customers</li></ul><p>We’ll leverage OpenAI’s capability for calling multiple tools in parallel, guided by a detailed ‘process manual’ in the form of a system prompt.</p><p>Here’s what the entire workflow looks like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T2B1_scgu9ynzJFUFcMvgw.png" /><figcaption>n8n workflow of our customer support robot</figcaption></figure><h4>Fetching mail from Outlook</h4><p>Let’s use <a href="https://learn.microsoft.com/en-us/graph/overview">Microsoft Graph</a> to access and send emails through Outlook, supported out-of-the-box by n8n.</p><p><strong>Connecting to Outlook</strong></p><p>To allow your n8n instance to connect to Outlook, we’ll need to set up a credential within n8n. I won’t cover this in detail since you can find those instructions on the n8n <a href="https://docs.n8n.io/integrations/builtin/credentials/microsoft/#prerequisites">website</a>.</p><p>On a high level we’ll need to:</p><ol><li>Set up an <a href="https://azure.microsoft.com/">Azure account</a> (if you don’t have one)</li><li>Register your application in the Azure portal</li><li>Connect n8n Microsoft Outlook Oauth2 API credential to your Azure application</li></ol><p><strong>Email fetching branch</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sr1n5SReqb59w3cMl9jf0g.png" /></figure><p>At the start of our workflow, we use a Schedule Trigger that will fetch emails from Outlook on a regular cadence. We also apply a filter on the query so that we’re only fetching relevant emails.</p><p>To apply the filters in the Outlook node, add two filters:</p><ol><li>Folders to include: Inbox</li><li>Filter query: `isRead eq false and (categories/any(c:c eq ‘robot’))`</li></ol><p>The “eq ‘robot’” portion of filter 2 will only fetch emails that have been categorized as ‘robot’. This means we can manually categorize inbound emails for the robot to pick up, which is useful during testing.</p><p>Here’s our Outlook node in detail:</p><pre>{<br>  &quot;meta&quot;: {<br>    &quot;templateCredsSetupCompleted&quot;: true,<br>    &quot;instanceId&quot;: &quot;{instance_id}&quot;<br>  },<br>  &quot;nodes&quot;: [<br>    {<br>      &quot;parameters&quot;: {<br>        &quot;operation&quot;: &quot;getAll&quot;,<br>        &quot;returnAll&quot;: true,<br>        &quot;output&quot;: &quot;raw&quot;,<br>        &quot;filtersUI&quot;: {<br>          &quot;values&quot;: {<br>            &quot;filters&quot;: {<br>              &quot;custom&quot;: &quot;isRead eq false and (categories/any(c:c eq &#39;robot&#39;))&quot;,<br>              &quot;foldersToInclude&quot;: [<br>                &quot;{id_of_inbox}&quot;<br>              ]<br>            }<br>          }<br>        },<br>        &quot;options&quot;: {}<br>      },<br>      &quot;id&quot;: &quot;{node_id}&quot;,<br>      &quot;name&quot;: &quot;[MS] Get Messages&quot;,<br>      &quot;type&quot;: &quot;n8n-nodes-base.microsoftOutlook&quot;,<br>      &quot;typeVersion&quot;: 2,<br>      &quot;position&quot;: [<br>        -5040,<br>        880<br>      ],<br>      &quot;credentials&quot;: {<br>        &quot;microsoftOutlookOAuth2Api&quot;: {<br>          &quot;id&quot;: &quot;{credential_id}&quot;,<br>          &quot;name&quot;: &quot;Outlook Account&quot;<br>        }<br>      }<br>    }<br>  ],<br>  &quot;connections&quot;: {},<br>  &quot;pinData&quot;: {}<br>}</pre><h4>Reasoning with tools</h4><p>To set up the LLM we need to define the tools and the process manual to pass to gpt-4-turbo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W-ejdgbBlZ3xcXsXPB9mCA.png" /></figure><p><strong>Defining the tools (functions)</strong></p><p>As emails arrive, we pass the content of the email along with the tool definitions so that our robot can reason which functions to call in parallel to get the job done.</p><p>Let’s define three functions for our robot:</p><ul><li><strong>review_photo</strong>-reviews the customer’s photo for defects</li><li><strong>verify_warranty-</strong>checks to see if the product is still under warranty.</li><li><strong>email_customer-</strong>sends a reply email to the customer</li></ul><pre>const tools = [<br>  {<br>    &quot;type&quot;: &quot;function&quot;,<br>    &quot;function&quot;: {<br>          &quot;name&quot;: &quot;review_photo&quot;,<br>          &quot;description&quot;: &quot;Reviews the customer&#39;s photo for defects.&quot;,<br>          &quot;parameters&quot;: {<br>              &quot;type&quot;: &quot;object&quot;,<br>              &quot;properties&quot;: {<br>                  &quot;photo_link&quot;: {<br>                      &quot;type&quot;: &quot;string&quot;,<br>                      &quot;description&quot;: &quot;URL of the customer&#39;s uploaded photo.&quot;<br>                  },<br>              },<br>              &quot;required&quot;: [<br>                  &quot;photo_link&quot;<br>              ]<br>          }<br>    },<br>  },<br>  {<br>    &quot;type&quot;: &quot;function&quot;,<br>    &quot;function&quot;: {<br>          &quot;name&quot;: &quot;verify_warranty&quot;,<br>          &quot;description&quot;: &quot;Checks to see if the product is still under warranty.&quot;,<br>          &quot;parameters&quot;: {<br>              &quot;type&quot;: &quot;object&quot;,<br>              &quot;properties&quot;: {<br>                  &quot;order_id&quot;: {<br>                      &quot;type&quot;: &quot;string&quot;,<br>                      &quot;description&quot;: &quot;The customer&#39;s order ID.&quot;<br>                  },<br>              },<br>              &quot;required&quot;: [<br>                  &quot;order_id&quot;<br>              ]<br>          }<br>    },<br>  },<br>  {<br>    &quot;type&quot;: &quot;function&quot;,<br>    &quot;function&quot;: {<br>        &quot;name&quot;: &quot;email_customer&quot;,<br>        &quot;description&quot;: &quot;Sends a reply email to the customer.&quot;,<br>        &quot;parameters&quot;: {<br>            &quot;type&quot;: &quot;object&quot;,<br>            &quot;properties&quot;: {<br>                &quot;message&quot;: {<br>                    &quot;type&quot;: &quot;string&quot;,<br>                    &quot;description&quot;: &quot;Message to the customer.&quot;<br>                },<br>            },<br>            &quot;required&quot;: [<br>                &quot;message&quot;<br>            ]<br>        }<br>    }<br>  }<br>];<br>return {tools};</pre><p><strong>Process manual</strong></p><p>Next, we need a manual detailing the steps for the process and some rules to keep the LLM on-task.</p><pre>Act as a Customer Support Agent. The customer has sent you their order ID, <br>shipping address, and a photo of a defective product they recently purchased. <br>Your goal is to walk through this entire process with the customer.<br><br>Steps to accomplish your task:<br>1. Verify that the photo shows defects (function: review_photo)<br>2. Verify that the product is still under warranty. Products are under <br>warranty if purchased within the past 14 days (function: verify_warranty)<br>3. Decide if a replacement should be shipped to the customer - replacements <br>are offered if a valid order ID is given, it&#39;s covered under warranty, <br>and the photo review shows damage to the product<br>4. Email your decision to the customer (function: email_customer)<br>5. Terminate<br>Rules of engagement:<br>- Stick to the procedure and don&#39;t invent your own steps<br>- Stick to your role, and politely decline off-topic questions<br>- Do not output messages, only call functions</pre><h4>Building the functions</h4><p>Now that we’ve prepped the LLM with the necessary definitions, it’s time to build out our functions.</p><p><strong>function 1: review_photo</strong></p><p>The goal of this function is to use gpt-4-turbo with vision to check if defects are detected in the photo uploaded by the customer. First, we download the image, then we encode it into base64 and finally, we pass it to OpenAI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cM0FugTR_UHKk-pf8eYSNA.png" /></figure><p>The system message to guide the vision model:</p><pre>Act as a product defect detector for an e-commerce company that sells a <br>variety of books. The user has sent you a photo of a defective product.<br><br>Respond in JSON, referring to the following example:<br>{<br>  &#39;isDefective&#39;: true<br>  &#39;reason&#39;: &#39;The book shows visible damage on the cover, it seems to be torn.&#39;<br>}</pre><p>After running a function the response needs to be passed back to OpenAI to help it decide if it should call additional tools. I’ll cover this in a later section.</p><p><strong>function 2: verify_warranty</strong></p><p>This function will pull a record from the database and calculate the order age. Later, our robot will use this value to determine if the order is still covered under warranty based on the instructions in the process manual.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m47P1mamDXegvwXgHf-MHA.png" /></figure><p>We use an HTTP request to call our orders database. This could be an API hosted by Amazon, Shopify, or a proprietary data source.</p><p><strong>function 3: email_customer</strong></p><p>For our last function, our robot sends an HTML email response to the customer. We do this with an HTML node to format the content and an Outlook <em>reply: message</em> node to send the reply email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TcANrqJLyTHV3lPK_sespA.png" /></figure><h4>Recursive tool calling</h4><p>Calling tools in parallel is a recursive process. After we call a function we need to pass the result back to the LLM so that it can decide if it needs to call additional tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QWtvUFwSWI8j9jDHpQOZ_Q.gif" /><figcaption>Recursive tool calling in action</figcaption></figure><p>It’s important to take precautions here as there is a chance we get caught in a loop, driving up our OpenAI bill. You may want to consider adding a counter to break the loop. In my testing, an improperly written process manual was enough to confuse our robot into a loop.</p><p>For a detailed overview of parallel tool calling visit the OpenAI <a href="https://platform.openai.com/docs/guides/function-calling/parallel-function-calling">website</a>.</p><h4>Example execution</h4><p>Now that our robot is constructed let’s take a look a an example execution of our workflow:</p><p><strong>inbound customer email:</strong></p><p><em>Hi there,</em></p><p><em>I recently purchased a card book and noticed it’s water damaged.</em></p><p><em>order ID: 102–8434057<br>address: 1165 Angelina St, Austin, TX 78702, United States</em></p><p><em>photo link: </em><a href="https://drive.usercontent.google.com/download?id=1BuhAlLRHV6RHLAwq_-o2uRykYR4u8Txd&amp;authuser=0"><em>https://drive.usercontent.google.com/download?id=1BuhAlLRHV6RHLAwq_-o2uRykYR4u8Txd&amp;authuser=0</em></a></p><p><em>Matt</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/0*DnmJja4cuXPkRBej" /></figure><p><strong>robot’s response:</strong></p><p><em>Dear Matt,</em></p><p><em>Thank you for providing the details and photo of your card book. Upon reviewing the photo, we confirmed that the book is indeed water damaged. However, our records indicate that this product was purchased a significant time ago and is no longer under warranty.</em></p><p><em>Unfortunately, as it falls outside our warranty period, we are unable to offer a replacement or refund for this item.</em></p><p><em>We apologize for any inconvenience this may cause and appreciate your understanding.</em></p><p><em>Best regards,<br>Customer Support</em></p><h3>Closing thoughts</h3><p>This article shares a very basic version of a customer support robot where I focus on building a recursive tool calling workflow with n8n that uses the multi-modal capabilities of gpt-4-turbo. If you plan to implement this in production, you’ll need to set up a memory system so that the robot can maintain conversation threads with customers. If you’re adventurous enough, you can add additional tools and build out a longer process manual to suit your needs.</p><p>I’ve been running a more complex robot in production and so far it’s been highly reliable and nothing short of amazing. I plan to continue to expand the toolset to handle other back-office automation tasks and will continue to share my journey here.</p><p>Now that you’ve created your first robot employee, it’s time to show the CEO what it’s made of!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFUpzYdijYrQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFUpzYdijYrQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFUpzYdijYrQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/82ecf2c8a2c330dabe2c6b45fd9f59a8/href">https://medium.com/media/82ecf2c8a2c330dabe2c6b45fd9f59a8/href</a></iframe><h3>Project Resources</h3><p>If you’re inclined to test or improve on this workflow, here’s the project <a href="https://github.com/mattmattkim/medium/tree/main/eom-part-2-n8n-customer-service">GitHub repo</a>. You’ll need to set up the scaffolding around this workflow like adding your keys and credentials.</p><h3>Follow me!</h3><p>If you’ve made it this far, consider offering a few claps 👏, comment, and follow. You can also join me on this journey at these coordinates:</p><ul><li><a href="https://www.youtube.com/@mattbuildsai">YouTube</a></li><li><a href="https://blog.dancingrobots.agency/">Medium</a></li><li><a href="https://discord.gg/D6tyZcNxsx">Discord community</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e4dbb879586" width="1" height="1" alt=""><hr><p><a href="https://blog.dancingrobots.co/your-employee-of-the-month-is-a-robot-part-2-0e4dbb879586">Building a Claims Agent using n8n, OpenAI, and Outlook (with vision and parallel tool calling)</a> was originally published in <a href="https://blog.dancingrobots.co/">Dancing Robots</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an LLM-powered Journaling App]]></title>
            <link>https://blog.dancingrobots.co/building-an-llm-powered-journaling-app-8e526cb596ae?source=rss-77747e2de633------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e526cb596ae</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[journaling]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Matthew Kim]]></dc:creator>
            <pubDate>Thu, 15 Feb 2024 16:50:41 GMT</pubDate>
            <atom:updated>2024-02-15T22:34:30.293Z</atom:updated>
            <content:encoded><![CDATA[<h4>And rethinking user experience in an LLM world</h4><p>Just a year back, I dove headfirst into the wild world of Large Language Models (LLMs), channeling my inner coder and pulling all-nighters that could rival a Tesla employee sleeping on the factory floor. My mission? To fire up several apps during what I called my “engineering discovery” phase — learning through tinkering. This tale is about one such tinkering session that leads to the imagination of a journaling app with a futuristic AI twist.</p><p>Download the iOS app <a href="https://apps.apple.com/us/app/eternamind-ai-journaling/id6476518859?platform=iphone">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*swFyxTS6535GbUHZ.jpeg" /><figcaption>Evolution of creativity.</figcaption></figure><h4>Step-changes in technology</h4><p>Rewind to my tech-nerd childhood: picture a wide-eyed grade-schooler, hunched over a beige keyboard, dialing into a bulletin board system (BBS) to conquer TradeWars and then shoot an “e-mail” to a buddy who lived down the street. Fast forward, and I’ve had a front-row seat to tech’s roller coaster ride, witnessing technology step-changes that have reshaped how we interact with the world. Some tech marvels crept in like ninjas, like the slow evolution to wireless Internet. Then there were the showstoppers like the iPhone, dropping the mic on tech as we knew it. Post-iPhone, the tech world seemed to hit the snooze button… until OpenAI rolled out GPT-4 in spring 2023, scoring a brainy 1410 out of 1600 on the SATs and kick-starting a whole new tech revolution.</p><blockquote>“All of SaaS software is just MySQL wrappers’“ — <a href="https://www.youtube.com/watch?v=TwDJhUJL-5o&amp;t=1254s">Lightcone Podcast</a> (Y-Combinator)</blockquote><p>Amid the LLM hype, the term ‘wrapper’ became the go-to buzzword, often tossed around to describe apps that were essentially OpenAI’s models in a fancy costume, like avocado toast — overhyped but somehow still on every cafe menu. Yeah, we’re still in that “wrapper” phase, but don’t get too cozy; history teaches us that today’s avocado toasts are tomorrow’s <a href="https://www.instagram.com/amauryguichon/?hl=en">Amaury Guichon</a> creation. From the discovery of electricity to the dawn of the internet and now LLMs, each leap has catapulted us into new realms of creativity. Sure, the initial offerings might seem like mere party tricks, but the real magic lies in the second-wave innovations that promise to turn our world upside down. And you bet I’m snagging the best seat in the house for that show.</p><h4>Channeling my inner Doc Brown</h4><p>Last year, I decided to put on my favorite floaties and jump into the LLM pool feet first. Since LLMs were new to most of the world it was important to start experimenting to understand their capabilities and limitations. My main goal was to suss out the engineering feasibility (see: <a href="https://www.uxpin.com/studio/blog/design-review-template-balancing-desirability-viability-feasibility/">innovation</a>):</p><blockquote>Engineering feasibility — What novel user experiences are possible to craft with the tools available to us?</blockquote><p>Worrying about whether people would want these creations (user desirability) or if they could make a buck (business viability) was a problem for Future Me. For now, my mission was simple: push the tech to its limits and see what sticks. This led me to dabble in open-source playgrounds like <a href="https://www.langchain.com/">LangChain</a>, <a href="https://huggingface.co/">HuggingFace</a>, <a href="https://n8n.io/">N8N</a>, enlist GPT-4 as my coding sidekick, and churn out a couple of apps.</p><h4>Rethinking the user experience</h4><p>Remember when we all thought we’d be bossing around our homes like Tony Stark with devices like the Amazon Echo and Google Home? Turns out, they were glorified kitchen timers and light switch flippers. But there’s a new wave of optimism with companies like <a href="https://hu.ma.ne/">Humane</a> and <a href="https://www.rabbit.tech/">Rabbit</a> betting big on AI-powered gadgets that favor a good old chinwag over fiddly interfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*D2a-jYCacwHCc54Hm9K9Fw.jpeg" /><figcaption>The Ai Pin from <a href="https://hu.ma.ne/">Humane</a> and the <a href="https://www.rabbit.tech/">Rabbit R1</a>.</figcaption></figure><p>Will these gizmos take over the world? The jury’s still out. Their hearts are in the right place, trying to save us from our smartphone addiction, but it’s a tall order; we really love our Tiktok.</p><p>After a good few months of tinkering, I had an “aha” moment for an app that puts LLM-first in the user experience department. It was time to roll up the sleeves and bring this brainchild to life. As a longtime devotee of <a href="https://juliacameronlive.com/basic-tools/morning-pages/">morning pages</a>, I wanted to reimagine the digital diary. Why not build a platform that gets me, one that digs into the essence of my thoughts and feelings, maybe even clone my brain? Ambitious and strange, sure, but with LLMs shaking up the scene, it was time to get weird or go home and chat with my LG fridge about existentialism.</p><h4>Journal design challenges</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IqxA-7Y1t8up3tl7sH6HsQ.jpeg" /><figcaption>Early mockup of speech-based journal writing.</figcaption></figure><p>Designing my journaling app was a bit like playing a high-stakes game of Tetris. The cornerstone was clear: making journal writing as conversational as a late-night chat with David Letterman. Then there was the dashboard for analyzing my entries, which screamed for a traditional UI. But then came the head-scratchers — what about the other parts, like the onboarding and help sections? Should they join the chatbot party, or was I unnecessarily trying to teach an old dog new tricks?</p><p>For example, the onboarding process ended up a mash-up of old and new: a classic setup wizard meets a chat interface; imagine your own Ned Flanders popping over the digital fence to learn your name and enthusiastically gab about all the app’s doodly-doo features. Was this the best design choice? Maybe not, but it was worth the experiment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U8nCcLrFTjroWA738QDQaA.png" /><figcaption>Onboarding Part 1: Classic setup wizard.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QspEOHvOTEUPZi4dMmAuPQ.png" /><figcaption>Onboarding Part 2: Conversation with AI.</figcaption></figure><p>Just like the delicate dance of life, software design is all about the tradeoffs. Opting for a hands-free experience means the system has to shoulder the burden of complexity, keeping things smooth and simple for the user. On the flip side, if we’re aiming for a streamlined system, it’s the user who has to pick up the slack, feeding in more details and commands. Striking that perfect harmony between user-friendliness and system simplicity was the real puzzle in crafting this journaling app.</p><h4>Initial reactions</h4><p>Diving into user feedback was like opening Pandora’s box — the journal die-hards, with their quills quivering, were dubious about ditching ink for pixels. However, they did express interest in the app’s analysis feature if they would be able to somehow upload their entries into the app. On the flip side, those who didn’t have time for traditional journaling found the app helpful since they could open it during a morning commute.</p><p>I was blown away at the quality of the monthly summarization of my entries, it’s like having a personal biographer who actually pays attention. I can’t wait to see how well it summarizes quarters and years of my life. What also threw me for a loop was the feedback on how the AI tailored its responses. It turns out, that the AI is a bit of a chameleon, adapting to everyone’s unique vocabularies.</p><p>I’m fully committed to this app. However, let’s face it: I’m biased. But that’s okay because I’m building this for myself. Watching my emotional ebbs and flows charted over time was like having a personal mood ring. I’m curious to see how far I can push this.</p><h4>The road ahead</h4><p>This adventure with LLMs has been a dance of embracing new knowledge while tossing old habits out the window. More often than not, I found myself clinging to old-school thoughts and reminding myself to think LLM-first. As well, the speed at which this app went from concept to reality impressed me. With GPT-4 as my pair programmer, I navigated uncharted territory and emerged three months later with a shiny new app.</p><p>My app, Eternamind, stands as my personal playground for all things LLM, a test lab for my endless curiosity. Later this year I’ll add features like:</p><ul><li>Multi-modal support — for image and video uploads</li><li>Prompt packs — for AI personalities and journaling programs</li><li>Pattern analysis — for deeper analysis of moods</li></ul><p>Want to try it for yourself? Download the iOS app <a href="https://apps.apple.com/us/app/eternamind-ai-journaling/id6476518859?platform=iphone">here</a>.</p><p>If you enjoyed this article why not give it some claps, comment, and follow!<br><strong> </strong>👏👏👏</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WMbMQyLK9yOJIS00B71AMA.png" /><figcaption>Eternamind on <a href="https://apps.apple.com/us/app/eternamind-ai-journaling/id6476518859?platform=iphone">iOS</a>.</figcaption></figure><p><strong>Find me here:</strong></p><ul><li><a href="https://www.youtube.com/@mattbuildsai">YouTube</a> — tutorials and video blogs</li><li><a href="https://discord.gg/2eWmd9nQ">Discord</a> — online community and feedback</li><li><a href="https://www.linkedin.com/in/matt-kim-272316/">LinkedIn</a> — being a professional human</li><li><a href="https://blog.dancingrobots.agency/">Medium</a> — this blog</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e526cb596ae" width="1" height="1" alt=""><hr><p><a href="https://blog.dancingrobots.co/building-an-llm-powered-journaling-app-8e526cb596ae">Building an LLM-powered Journaling App</a> was originally published in <a href="https://blog.dancingrobots.co/">Dancing Robots</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a talking Enrollment Agent with n8n, OpenAI, and Elevenlabs]]></title>
            <link>https://blog.dancingrobots.co/building-an-llm-crm-part-1-the-enrollment-agent-d4e4292f2a46?source=rss-77747e2de633------2</link>
            <guid isPermaLink="false">https://medium.com/p/d4e4292f2a46</guid>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[crm]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[n8n]]></category>
            <dc:creator><![CDATA[Matthew Kim]]></dc:creator>
            <pubDate>Wed, 18 Oct 2023 11:45:36 GMT</pubDate>
            <atom:updated>2024-04-29T02:46:56.637Z</atom:updated>
            <content:encoded><![CDATA[<h4>Your employee of the month is a robot, Part 1</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EFKgYQgYyFZyqobiTNuzSQ.png" /></figure><p>In this multi-part series, I try to tackle the age-old question: “Can we really trust robots? And to what extent can we entrust our person-to-person customer management to them?” My hunch oscillates between “greater than a goldfish’s attention span” and “less than my affection for pizza.”</p><p>There’s only one way to find out, and that’s by building a minimum-learnable product. So sit back and allow me to steer you through this enlightening journey, ultimately settling you into the sofa section of an IKEA.</p><h3>Recap of the customer journey</h3><p>Since this is Part 1 in a series, I’ll set the stage by quickly reviewing the e-commerce customer journey and its five main stages. The long-term objective of this project will be to walk across this journey to identify if any person-to-person interactions can be automated by our robot. Because, honestly, who needs human warmth when you can have cold, efficient automation, right?</p><ul><li><strong>Awareness</strong>: A customer casually stumbles upon a new product or service, probably through a late-night Instagram doom-scroll, or through a clickbait YouTube video. The intrigue begins!</li><li><strong>Consideration</strong>: Fueled by burning desire, our customer embarks on a quest of comparison shopping. They explore the features, pricing, and reviews, and weigh it against similar products or services available in the market.</li><li><strong>Acquisition</strong>: The plot is thickening. After evaluating the options, the customer decides to make a purchase. With a heart full of hope and a cart filled with desires, their checkout experience goes smoother than scrolling an ex’s wedding photos on Facebook.</li><li><strong>Service</strong>: Even after the curtain falls, the drama isn’t over. Our backstage service crew swoops in, armed with headsets and an unending supply of patience. They answer questions, handle complaints, and keep our customer happy.</li><li><strong>Loyalty</strong>: The stars have aligned and our customer is so smitten, they start writing us love letters. Recommendations to friends and glowing reviews are shared, it’s like high school crushes all over again, but with fewer mixtapes and more loyalty points. Have you ever seen someone swoon over a discount code? Well, prepare your popcorn.</li></ul><p>It’s important to point out that these are broad stages of the customer journey. Each stage houses more intricate sub-journeys with several additional steps. We’re skimming the surface here — because I need to grab lunch and you need to get back to scrolling through memes.</p><h3>The Importance of Enrollment</h3><p>While many businesses might opt for the self-serve method, like using an online form, there are instances where a human touch is indispensable. Imagine a customer unfamiliar with the nuances of a new product; an enrollment agent can guide them and answer complex questions. Perhaps the business has strict identification protocols?</p><p>During enrollment, customers create an account and personalized profile for a better shopping experience. By enrolling, customers may get access to promotions, and recommendations based on their preferences. It also helps our business gather valuable customer data to improve marketing strategies and engagement.</p><p>For many businesses, enrollment isn’t just a formality; it’s the bedrock of our enduring relationship with every customer.</p><h3>Anatomy of a Robot Enroller</h3><p>You may have seen the <a href="https://www.youtube.com/watch?v=yDI5oVn0RgM&amp;ab_channel=DevCookHouse">video</a> from Google that demonstrates a realistic-sounding AI assistant that books a hair salon appointment on behalf of a customer. It’s time for us to enact our defenses by unleashing our army of robots to counter them.</p><p>To do this we’ll need to pull together several important elements into our robot.</p><p><strong>The Brain</strong></p><ul><li>Reasoning — our agents will need to keep our humans in check since humans have been known to be unpredictable. It’ll need to parry the trolls while handling genuine questions. For this, we’ll use OpenAI’s LLMs, mainly gpt-3.5-turbo-0630.</li><li>Personality — using system prompts we’ll give our robot a little personality.</li></ul><p><strong>The Skills</strong></p><ul><li>Our agents will need to learn a few skills. They’ll need to understand our business to help answer any questions, update the customer’s account details, and finally mark the enrollment process as complete.</li><li>One of my favorite new tools to orchestrate this has been N8N, which is an open-source low-code workflow automation software.</li></ul><p><strong>The Auditory and Vocal systems (not covered in detail in this post)</strong></p><ul><li>Since AI assistants are trying to fool us with their realistic voices, we’ll need to fool them back, and we’ll need a set of ears and a voice to do that.</li><li>For our ears, we’ll use OpenAI’s Whisper speech-to-text (STT) service and for our voice, we’ll use ElevenLabs text-to-speech (TTS) service.</li></ul><h3>Pulling it all together</h3><p>I’ve omitted some key elements to this project to focus primarily on the N8N workflow as I think this is the more ambiguous piece. But if you’re curious, I’ll tell you that I’m using Flutter for the UI, Firestore for the conversation memory, and Cloud Functions to handle the app’s logic.</p><p>So how do we pull it all together?</p><h4>Conversation flow</h4><p>Below is an illustration of the high-level flow of our robot in action while communicating with a customer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vD0vnoPcJ3C8QV3ZJ6Blwg.png" /></figure><ol><li>The customer will interact with our robo-enroller via a mobile app, communicating with voice.</li><li>While the customer speaks, the app calls the Whisper speech-to-text endpoint to convert the audio into text before sending it to our service.</li><li>Our service receives the message and saves the message to memory, in our case Firestore.</li><li>Cloud Function’sonDocumentCreated is triggered by the new document in the Firestore message collection that kicks off some backend logic. We fetch the agent configuration along with the message history and pass it to N8N via a webhook.</li><li>N8N receives the payload and pushes it through the workflow. Regardless of which branch the payload is passed down, the result is to respond to the original web-hook request with an LLM-generated text for the user.</li><li>The service takes the response from N8N and stores it in Firebase. Since the app is listening to Firestore updates in real time, new messages are received on-device immediately.</li><li>The App then passes the message to the Elevenlabs speech synthesis service (text-to-speech) to generate the audio to play back to the customer.</li></ol><h3>Diving into the N8N workflow</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BtTKrPY94I8B5if2cZmlpg.png" /></figure><p>The entire workflow is comprised of almost 40 nodes. There are more ways to do this than there are atoms in the universe, and here’s one version of it.</p><p>This workflow is designed to handle the following skills.</p><ul><li>Guiding a new customer through the enrollment process while staying in character.</li><li>Answer any questions the user has about the company and products.</li><li>Collect customer profile details like name, email, title, company name, location, and annual budget.</li><li>Mark enrollment as complete once all of the above is done.</li></ul><p>The main reason why these skills are separated into their branches is LLM <a href="https://paperswithcode.com/method/sliding-window-attention">attention windows</a>. It’s like teaching a cat quantum physics while it&#39;s distracted by laser pointers. This also means that using too many system messages with lengthy instructions makes our robot less steerable and prone to hallucination. Separating skills into their branches allows us to hone in on the problem at hand.</p><p>While this wasn’t exactly <a href="https://www.kdnuggets.com/2023/07/power-chain-thought-prompting-large-language-models.html#:~:text=Understanding%20Chain%2Dof%2DThought%20Prompting,thought%20when%20answering%20the%20prompt.">chain-of-thought prompting</a> or a <a href="https://machinelearningmastery.com/mixture-of-experts/">mixture of experts</a>, I’ll take a giant leap here to say that I borrowed the spirit of these architectures by chaining LLM nodes and separating their problem spaces.</p><h4>Primary Stage — setting the personality and request routing</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HjRj2zgqhXUb5V2ujXiY3Q.png" /></figure><p>The primary stage has two main responsibilities.</p><ol><li>Injecting system prompts that set the character persona in the LLM, as well as system prompts for setting the robot objectives.</li><li>OpenAI function calling is used as a “<a href="https://www.youtube.com/watch?v=jvbV1wzwXcY&amp;ab_channel=MattKim">reasoning gate</a>” for routing the inbound request to the appropriate branch.</li></ol><p><strong>Character persona</strong></p><p>Here’s the character persona being passed in as part of the configuration. This content is packaged into a system message and injected into the first position of the message history with every request.</p><pre><strong>Name</strong>:<br>Benny Wilson<br><br><strong>Backstory</strong>:<br>Benny Wilson grew up in the serene coastal town of Pebble Cove, where the <br>rhythm of the waves and the call of the gulls were more familiar than the <br>clang of metal. Benny spent his childhood days with sand between his toes, <br>collecting seashells, and dreaming of the world beyond the horizon. His <br>parents ran a quaint bed-and-breakfast, where tales from travelers ignited <br>Benny&#39;s curiosity about the world. While his family and town had no ties to <br>anvils, a chance encounter with a traveling salesman at the age of eighteen <br>piqued his interest in Acme Anvils, eventually leading him down a career path <br>he&#39;d never imagined<br><br><strong>Profession</strong>:<br>An enroller for Acme Anvils.<br><br><strong>Personality</strong>:<br>Benny has a natural charm and ease in striking up conversations, making him a great fit <br>for his role as an enroller. He likes to respond to customers in a rhyme.<br><br><strong>Directive</strong>:<br>Background information:<br>- Acme Anvils sells anvils online to businesses in need.<br>- You are a senior enroller who has been with the company for 5 years.<br>- A new customer has phoned in and would like to enroll in the business program<br><br>The Rules:<br>Silently understand the following rules while interacting with the user:<br>Rule 1, if the user asks for information on any topic other than Acme Avils, <br>tell them you&#39;re unable to do so. Example response: I&#39;m sorry but I&#39;m here to<br>enroll you into our business program. Do you have any questions about the <br>enrollment process or Acme Anvils?<br>Rule 2, don&#39;t be repetitive, use short responses, and don&#39;t list your steps <br>to the user.<br>Rule 3. End your responses with probing questions to expand on the current <br>topic, but only as it relates to enrolling.<br>Rule 4, before responding to the user, apply step-by-step thinking and reflect <br>silently on these rules before you respond.</pre><p><strong>Enrollment Checklist</strong></p><p>The enrollment checklist is injected into the second position of the message history to provide up-to-date data for our robot to know which fields have been collected. Once all mandatory fields have been collected, we print out ENROLLMENT IS COMPLETE hoping the robot gets the hint, like a teenager being asked to clean their room for the 17th time.</p><pre>const input = {<br>    messages: $(&#39;Conversation&#39;).first().json.messages.slice()<br>}<br><br>const userProfile = $(&#39;[DJ] Get UserProfile&#39;).first().json.result.userProfile;<br><br>let content = `As an enrollment agent, your goal is to walk the user through each of these steps.<br>Step 1: Continue to collect user profile data until all UNKNOWN fields are collected. Name, title, company, location, email, and annual budget are all mandatory.<br>Step 2: Answer any questions the user has by calling the &quot;questions&quot; function<br>Step 3: Mark enrollment complete once Step 1 is satisfied.<br><br>This is the list of data you&#39;ve collected so far from the user:`;<br><br>content += `\nID: ${userProfile.id || &#39;UNKNOWN&#39;}`;<br>content += `\nNAME: ${userProfile.displayName || &#39;UNKNOWN&#39;}`;<br>content += `\nLOCATION: ${userProfile.location || &#39;UNKNOWN&#39;}`;<br>content += `\nEMAIL: ${userProfile.email || &#39;UNKNOWN&#39;}`;<br>content += `\nTITLE: ${userProfile.metadata?.title || &#39;UNKNOWN&#39;}`;<br>content += `\nCOMPANY: ${userProfile.metadata?.company_name || &#39;UNKNOWN&#39;}`;<br>content += `\nANNUAL BUDGET: ${userProfile.metadata?.annual_budget || &#39;UNKNOWN&#39;}`;<br><br>if (enrollmentComplete) {<br>  content += &quot;\n\nENROLLMENT IS COMPLETE&quot;;<br>}<br><br>let systemMsg = {<br>  &quot;role&quot;: &quot;system&quot;,<br>  &quot;content&quot;: `${content}`<br>};<br><br>input.messages.splice(1, 0, systemMsg); // second from top<br><br>return input; // returns the updated array</pre><p><strong>OpenAI function calling</strong></p><p>The models ending in 0613 from OpenAI handle <a href="https://openai.com/blog/function-calling-and-other-api-updates">functions</a> by evaluating their makeup (name, description, parameters, etc). Because the outcome is stochastic, being descriptive helps the model choose the right function, or ignore them when necessary. Still, it’s liable to make the wrong choice from time to time, especially when using gpt-3.5-turbo-0613. The gpt-4-0613 model is more reliable, but it&#39;s also more reliable in draining your bank account.</p><p>Here’s how I set up the functions. Each function has its responsibility.</p><ul><li>questions answer customer questions using a FAQ list.</li><li>update_profile updates the customer profile data.</li><li>enrollment_complete update the database to mark enrollment as complete.</li></ul><pre>// The gpt-3.5-turbo-0613 model makes a decision based on the context contained <br>// on which function to call, or if simply to generate a text response to<br>// the user.<br> <br>const functions = [<br>        {<br>          &quot;name&quot;: &quot;questions&quot;,<br>          &quot;description&quot;: &quot;If the user asks a question about the company or its products, this function returns the answer. Should be triggered for ALL questions&quot;,<br>          &quot;parameters&quot;: {<br>              &quot;type&quot;: &quot;object&quot;,<br>              &quot;properties&quot;: {<br>                  &quot;question&quot;: {<br>                      &quot;type&quot;: &quot;string&quot;,<br>                      &quot;description&quot;: &quot;The user&#39;s question about the company or its products.&quot;<br>                  },<br>            },<br>            &quot;required&quot;: [<br>                &quot;question&quot;,<br>            ],<br>          }<br>        },<br>        {<br>            &quot;name&quot;: &quot;update_profile&quot;,<br>            &quot;description&quot;: &quot;Updates the user&#39;s profile record with provided details about their life. UNKNOWN is not a valid entry in any property.&quot;,<br>            &quot;parameters&quot;: {<br>                &quot;type&quot;: &quot;object&quot;,<br>                &quot;properties&quot;: {<br>                    &quot;id&quot;: {<br>                        &quot;type&quot;: &quot;string&quot;,<br>                        &quot;description&quot;: &quot;The user&#39;s ID.&quot;<br>                    },<br>                    &quot;name&quot;: {<br>                        &quot;type&quot;: &quot;string&quot;,<br>                        &quot;description&quot;: &quot;The name of the user.&quot;<br>                    },<br>                    &quot;email&quot;: {<br>                        &quot;type&quot;: &quot;string&quot;,<br>                        &quot;description&quot;: &quot;The work email address of the user.&quot;<br>                    },<br>                    &quot;location&quot;: {<br>                        &quot;type&quot;: &quot;string&quot;,<br>                        &quot;description&quot;: &quot;The geographic location of the user.&quot;<br>                    },<br>                    &quot;title&quot;: {<br>                        &quot;type&quot;: &quot;string&quot;,<br>                        &quot;description&quot;: &quot;The title at their company.&quot;<br>                    },<br>                    &quot;company_name&quot;: {<br>                        &quot;type&quot;: &quot;string&quot;,<br>                        &quot;description&quot;: &quot;The name of the company they work for.&quot;<br>                    },<br>                    &quot;annual_budget&quot;: {<br>                        &quot;type&quot;: &quot;number&quot;,<br>                        &quot;description&quot;: &quot;Budget in USD for the next 12 months&quot;<br>                    },<br>                },<br>                &quot;required&quot;: [<br>                    &quot;id&quot;<br>                ]<br>            }<br>        },<br>        {<br>          &quot;name&quot;: &quot;enrollment_complete&quot;,<br>          &quot;description&quot;: &quot;Marks enrollment as complete when ONBOARDING IS COMPLETE is found in the system message.&quot;,<br>          &quot;parameters&quot;: {<br>              &quot;type&quot;: &quot;object&quot;,<br>              &quot;properties&quot;: {<br>                  &quot;id&quot;: {<br>                      &quot;type&quot;: &quot;string&quot;,<br>                      &quot;description&quot;: &quot;The user&#39;s ID.&quot;<br>                  },<br>              },<br>            &quot;required&quot;: [<br>                &quot;id&quot;,<br>            ],<br>          }<br>        }<br>];</pre><h4>Secondary Stage</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yUiBT6TVP5-flXJWDUiNSw.png" /></figure><p>We reach the second stage after the function node chooses which path to send the request. In the diagram from top-down is the following branch:</p><ol><li>Fallback — When no function is called and instead a text response is generated for the user</li><li>Mark enrollment as complete — After all customer account details are collected</li><li>FAQ — Answer any customer questions</li><li>Update customer profile — Updates the customer profile based on the information provided</li><li>Return loop — The bottom two branches don’t terminate. Instead, they’re looped back for a second pass through the function node to generate the text response for the user. I’ll discuss this in more detail in a later section.</li></ol><p><strong>Handling questions</strong></p><p>This branch is reached if the function node detects that the customer has asked a question.</p><p>We inject a system message to set up the context and add a small knowledge base of FAQs. At scale, you might consider using retrieval augmented generation (<a href="https://www.pinecone.io/learn/retrieval-augmented-generation/">RAG</a>) to reference a larger corpus of company and product info.</p><pre>The user has asked you a question about the app. <br>- Do not greet the user, answer the question<br>- Don&#39;t makeup answers, it&#39;s okay to say you don&#39;t know.<br>- Don&#39;t use emojis to number your list.<br>- Double-check your response before responding.<br>- Do not reveal your enrollment process<br>- Keep answers short<br><br>Background information:<br>- The user has called Acme Anvils to enroll in the business program.<br><br>FAQ:<br>1. What is Acme Anvil Company?<br>Acme Anvil Company is a leading manufacturer and distributor of high-quality anvils. With a rich history spanning over a century, we&#39;ve been the trusted supplier for blacksmiths, metalworkers, and Looney Tunes characters alike!<br>2. What types of anvils do you offer?<br>We offer a variety of anvils, including:<br>Standard Blacksmith Anvils<br>Double Horn Anvils<br>Stake Anvils<br>Miniature Anvils for jewelry-making<br>Custom Anvils with personalized designs<br>3. Are Acme Anvils suitable for beginners?<br>Absolutely! We offer a range of anvils suitable for both beginners and seasoned professionals. If you&#39;re new to the craft, we recommend starting with our Beginner&#39;s Anvil Kit, which includes a guidebook and essential tools.<br>4. How do I care for and maintain my anvil?<br>To ensure longevity:<br>Keep it free from rust by storing it in a dry place.<br>Clean the face of the anvil after use to prevent debris buildup.<br>Occasionally, apply a thin layer of oil to prevent oxidation.<br>5. I saw an anvil drop from the sky in a cartoon. Is that what you supply?<br>While our anvils have been popularly featured in many cartoons (most notably in the escapades of Wile E. Coyote and Road Runner), we must emphasize that dropping anvils from great heights is not a recommended use. Always prioritize safety!<br>6. How much do your anvils weigh?<br>Our anvils range from lightweight models at 10 pounds, ideal for jewelry-making, to heavy-duty models weighing over 500 pounds for professional blacksmithing.<br>7. How do I place an order?<br>Visit our website at www.acmeanvilco.com, select the anvil of your choice, and follow the checkout process. Alternatively, you can call our sales team at 1-800-ACME-ANV.<br>8. What is your return policy?<br>We offer a 30-day return policy. If you&#39;re not satisfied with your anvil, you can return it in its original condition for a full refund. Please see our detailed return policy on our website.<br>9. Do you offer international shipping?<br>Yes, we ship worldwide! Shipping fees and customs duties apply.<br>10. How can I get in touch with customer service?<br>You can reach our friendly customer service team at support@acmeanvilco.com or call us at 1-800-ACME-SUP.<br>11. Do you offer anvils for rent?<br>Currently, we only offer anvils for purchase. However, we&#39;re considering introducing a rental service shortly.<br>12. Are your anvils certified?<br>Absolutely! All Acme Anvils undergo rigorous quality control and are certified for durability and safety.<br>13. Are there discounts for new customers?<br>Yes, after successful enrollment you will be sent an email with a discount code offering you 20% off your first purchase order`;</pre><p><strong>Updating the customer profile</strong></p><p>This branch is triggered when the function node detects that account information was provided by the customer.</p><p>The primary stage function node will generate the arguments for us to use in our update call. Due to the unreliable formatting of gpt-3.5-turbo, I’ve added a gpt-4 node to validate and correct the JSON. We then call our custom endpoint to make the update to our database.</p><p>Here’s the system message to validate the JSON generated by the LLM.</p><pre>Act as a JSON validator. Validate the format of this JSON and correct it if <br>necessary. - Only output the valid JSON, do not output anything else. <br>- Check proper use of double quotes <br>- Remove all unnecessary spaces <br>- Remove all in-line comments <br>- Double-check your answer before responding Validate the following <br>JSON: { INJECTED_JSON }</pre><p><strong>Marking enrollment as complete</strong></p><p>This branch is constructed a little differently for demonstrative purposes. I implemented a wait before calling the webhook to mark enrollment as complete. During this time the enroller will tell the customer that their enrolling has been completed and what the next steps are. In the background maybe our robot takes a coffee break or chats up some colleagues at the water cooler.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sF5xPwAXtEoaB1yNp6bkFA.png" /></figure><p>We don’t use the return loop to generate a response for the user and instead generate it in the branch, wait, mark enrollment complete, and then finally terminate.</p><p>Here’s the system message used for generating the enrollment complete message for the customer.</p><pre>Enrollment completed, inform the customer that they&#39;ll be able to access their <br>personalized catalog on the website and be offered a welcome discount on <br>their first purchase.</pre><p><strong>Return loop</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2xmDUCrKGQGpa6NqX-lWQ.png" /></figure><p>With OpenAI function calling, the results of the call are meant to be passed back to the model in order to generate a text response for the user.</p><p>In our case, we’re using the return loop in our N8N workflow to take the function response and inject it into the bottom of the message history before passing it through the workflow a second time. When the message history containing the function response passes through the function node the model generates a text response for the user, which gets sent out through the fallback branch.</p><p>In theory, this should work every time, however, sometimes the model decides to unnecessarily call the same function back-to-back. What we can do is, on the second pass we force the model to generate a text response by setting function_call to none.</p><p>More details on this can be found on the OpenAI <a href="https://openai.com/blog/function-calling-and-other-api-updates#:~:text=could%20be%20improved-,Function,-calling%20example">website</a>. The caveat here is that according to the documentation, the model may choose to call functions back-to-back to complete multiple tasks. Something we’ll need to continue experimenting with.</p><h3>Enroller Bots, Roll Out!</h3><p>Okay, let’s check our robot enroller in action.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fxy413dqZoeY&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dxy413dqZoeY&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=google" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8a804d4445a40650db563acfa3936172/href">https://medium.com/media/8a804d4445a40650db563acfa3936172/href</a></iframe><p>If you were that kid in school who was good at finding Waldo, you’d have noticed that the demo wasn’t exactly perfect. In my testing, the agent correctly funneled me through enrollment about 8/10 times. Other times it missed fields, missed steps, or repeated itself.</p><p>What I did find impressive or unexpected was the following:</p><ul><li>The robot’s general ability to improvise details outside of the small corpus of data it was given (due to the model’s training).</li><li>Ability to handle multiple topics in one interaction. Ex. collecting profile data while answering questions.</li><li>Doing the mental math to convert a quarterly budget to an annual budget.</li><li>The conversation didn’t take any abrupt turns or detours and felt fairly fluid despite having branching workflows.</li></ul><h3>Final Thoughts</h3><p>I set out to break down an ambiguous idea into a minimal learnable product to understand its engineering viability and business feasibility. So do I think there is potential in this? Yes, but there’s a long way to go.</p><p>The system performed well with a limited scope of data and little adversarial questioning. It’s like learning a karate move that only works when your attacker is your sparring partner with a rubber knife moving with the speed of a turtle.</p><p>I’ll continue to make improvements and share my progress in future posts. I plan to experiment withgpt-4 nodes and I have a hunch that incorporating <a href="https://github.com/microsoft/autogen">Autogen</a> might finally get us out of this IKEA maze.</p><h4><strong>Project Resources</strong></h4><p>If you’re inclined to test or improve on this workflow, here’s the project <a href="https://github.com/mattmattkim/medium/tree/main/eom-part-1-n8n-robo-enroller">GitHub repo</a>. You’ll need to set up the scaffolding around this workflow and add your keys and such, or simply use Postman.</p><h4>Follow me!</h4><p>If you’ve made it this far, why not give this article a few claps 👏, comment, and follow? You can also join me on this journey at these coordinates:</p><ul><li><a href="https://discord.gg/D6tyZcNxsx">Discord community</a></li><li><a href="https://www.youtube.com/@mattbuildsai">YouTube</a></li><li><a href="https://blog.dancingrobots.agency/">Medium</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d4e4292f2a46" width="1" height="1" alt=""><hr><p><a href="https://blog.dancingrobots.co/building-an-llm-crm-part-1-the-enrollment-agent-d4e4292f2a46">Building a talking Enrollment Agent with n8n, OpenAI, and Elevenlabs</a> was originally published in <a href="https://blog.dancingrobots.co/">Dancing Robots</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dude, where’s my Product (Part 2/2)]]></title>
            <link>https://blog.dancingrobots.co/dude-wheres-my-product-part-2-2-52302c03bf2?source=rss-77747e2de633------2</link>
            <guid isPermaLink="false">https://medium.com/p/52302c03bf2</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[customer-journey]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[customer-journey-map]]></category>
            <dc:creator><![CDATA[Matthew Kim]]></dc:creator>
            <pubDate>Mon, 19 Jun 2023 13:09:24 GMT</pubDate>
            <atom:updated>2023-06-19T17:02:01.335Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dIZqHd-9eQVt6b3jDCqKbg.png" /><figcaption>Source: Midjourney</figcaption></figure><h4>Organizing product teams around the customer journey</h4><p><a href="https://medium.com/build-the-right-thing/dude-wheres-my-product-f7593f2b9627">Previously</a>, we dove into the world of Agile evolution, examining how software companies have transformed their organizations from waterfall to Agile. We explored the challenges that come with such change, from the muddiness of accountability to the hazy lines of multi-ownership of feature ideas. In this post I dive into how we might organize teams around the customer journey, using e-commerce as an example.</p><h4>Introduction to the customer lifecycle in e-commerce</h4><p>One morning, after my daily struggle with the espresso machine, I found myself considering the lifecycle of my customers. You might be thinking, “aren’t lifecycles for frogs and plants?” The answer is, “it’s for frogs, plants, and customers”. Just as our amphibian friends have their stages of life, in e-commerce, our customers have stages in their relationship with us.</p><p>Let’s put on our biology goggles and break down this lifecycle. Our customers typically pass through these five stages:</p><p><strong>Awareness — </strong>they discover we exist<br><strong>Consideration — </strong>they ponder if we’re the right fit for their needs <br><strong>Purchase — </strong>they shell out their hard-earned dough to buy our products<br><strong>Retention — </strong>we provide ongoing value, so they keep coming back for more<br><strong> Advocacy — </strong>they love us so much that they recommend us to friends</p><p>Understanding this lifecycle is crucial for businesses because, spoiler alert, the customer is the whole point of being in business.</p><h4><strong>Drilling down from lifecycle into journey</strong></h4><p>The customer lifecycle is the high-level stage of the customer’s relationship with our business. Within each stage of the lifecycle are customer touchpoints that map into a journey. For example:</p><p>In the “Consideration” stage of the lifecycle, a prospective customer is exploring their options, deliberating on their choices. Now, within this lifecycle stage, a myriad of touchpoints — the customer’s journey — unfolds.</p><p>It could start with a late-night Google search. They’ve heard about our brand, and curiosity has piqued. They land on our website, the digital foyer of our brand’s home, and they start to browse. Our product pages are a library of possibilities, and they spend time reading descriptions, comparing features, and weighing prices. As they dig deeper, customer reviews catch their eye. They find themselves reading reviews of other people who’ve taken the leap, made the purchase. Each review is a breadcrumb on the trail, leading them closer to a decision. Meanwhile, our live chat pops up — a friendly offer of help. They type in a question and receive a prompt response. This interaction, this human touch, adds a layer of trust and personal connection. Their journey in the “Consideration” stage ends as they bookmark our page, leaving it on their browser as a reminder for later.</p><p>And so, within the “Consideration” stage of the lifecycle, a customer journey — filled with multiple touchpoints like search, website visit, product comparison, review reading, and live chat interaction — takes place, inching the customer closer to the next lifecycle stage: “Purchase.”</p><h4>Organizing teams around the customer journey</h4><p>A reminder on Conway’s Law which states, “any organization that designs a system will produce a design whose structure is a copy of the organization’s communication structure”. What I’m trying to say is that the easy part is me writing words and drawing pictures. The hard part is making the transformation.</p><p>Now that we have a mental map of our customer lifecycle, let’s imagine that we plan to reorganize our teams around each stage of the lifecycle. Depending on the size of the organization the strategy may differ. In our example lets assume we have a 200 person Online division that includes sales, support, engineers, designers, and product managers.</p><p>In the spirit of true product thinkers, we begin this journey with setting clear objectives. We’ll roll out our imaginary mat and land in the bustling world of Acme Anvil Co. With a stellar reputation in selling anvils through their brick and mortar business for decades, Acme has spent the last five years carving out a digital presence. But this year, the ambitious CEO has set her sights on transforming the company into the premier online hub for industrial anvils.</p><p>In this pursuit of online domination, Acme crafts its high-level OKRs, which then cascade down through each stage of the customer lifecycle. The illustration below demonstrates how goal-setting can have clear, direct impact and ownership.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jykK5KyDeHBRK9ehQNd3rg.png" /><figcaption>OKR planning along the customer lifecycle.</figcaption></figure><p>But how do we structure the teams? One strategy is to assign a Head of Product for each stage of the customer lifecycle, something akin to a mini-CEO. These leaders would own their group’s vision, roadmap, and alignment with other organizational Heads.</p><p>The next layer are our empowered product teams. These are the cross-functional team of designers, engineers, product wizards, and business folks who join forces for problem discovery and delivery. Together, they would work towards the group’s OKRs, making this reorganization more than just an org chart reshuffle — it’s a step towards clear ownership and focused customer empathy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CSFyiuCz5MvIET-SWAOMMA.png" /><figcaption>Organizing teams by customer journey.</figcaption></figure><p>Having a customer journey focused structure comes with numerous benefits:</p><p><strong>Aligned OKR planning — </strong>With the customer journey at the forefront, teams can develop better and more focused OKRs.</p><p><strong>Enhanced empathy and problem mapping — </strong>By focusing on a specific customer stage, teams can put themselves in the customers’ shoes more effectively.</p><p><strong>Clear accountability and ownership —</strong> Like my dog owning every tennis ball he sees, teams have a clear understanding of their roles and can take full ownership of their systems and tasks.</p><p><strong>Prevention of orphaned services — </strong>Like an episode of Scooby-Doo, there’s no mystery about who is responsible for what service.</p><p>In a nutshell, organizing teams around the customer has many benefits. Your teams will tell you that it’s like taking a well guided tour instead of feeling lost while wandering aimlessly around a city.</p><h4>A comment on system architecture</h4><p>My narrative on organizational restructuring wouldn’t be complete without a sprinkling of system architecture insights. It’s time we break away from architecture that is organized by function. By realigning our teams we realign our systems and tidy up the flow of information. Teams end up building products that manage a part of the customer journey. Products would then publish APIs to interconnect the rest of the customer journey. This layout becomes much easier to audit, test, plan, and there is clear ownership. The microservices behind each product can also be spun up, taken down, and replaced transparently and communicating such changes to teams becomes streamlined.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*17IMhblbTh2bknwGmu6sOQ.png" /><figcaption>Functional point-to-point systems (left) vs. product oriented architecture (right)</figcaption></figure><h4>Final thoughts</h4><p>The business world, much like my morning espresso, can be bitter, complex, and, if managed correctly, extremely satisfying. Reflecting on our journey with the customer lifecycle and team structure, it’s clear that this approach increases efficiency, streamlines roles, and keeps teams as focused as a cat stalking a laser pointer.</p><p>Looking ahead, as we continue to evolve in the Agile world, we’ll likely see further adaptations to this model. Just like my ever-evolving quest for the perfect espresso, we must be prepared to tweak, experiment, and innovate.</p><p>In closing, consider how your own team fits into the customer lifecycle. And hey, if you’re working through this in your own organization, I’d love to hear how it’s going. Or, even if you just have some great coffee recommendations, drop me a line!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52302c03bf2" width="1" height="1" alt=""><hr><p><a href="https://blog.dancingrobots.co/dude-wheres-my-product-part-2-2-52302c03bf2">Dude, where’s my Product (Part 2/2)</a> was originally published in <a href="https://blog.dancingrobots.co/">Dancing Robots</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Future of Product Management Meets Prompt Engineering: Exciting Times Ahead]]></title>
            <link>https://blog.dancingrobots.co/the-future-of-product-management-meets-prompt-engineering-exciting-times-ahead-9f970ce78d7c?source=rss-77747e2de633------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f970ce78d7c</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[chatgpt4]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <dc:creator><![CDATA[Matthew Kim]]></dc:creator>
            <pubDate>Wed, 12 Apr 2023 12:46:02 GMT</pubDate>
            <atom:updated>2023-04-12T12:46:02.288Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jB8OBPzQq0KqGQLZ.png" /><figcaption>Source: Midjourney</figcaption></figure><h3>The Future of Product Management and Prompt Engineering: Exciting Times Ahead</h3><h4>Unleashing Product Management in the Application of LLMs</h4><p>It’s an exciting time to be a product manager, as the field of prompt engineering gains traction and offers new opportunities for innovation. But what exactly is prompt engineering, and how do product management principles fit into this emerging field? In this blog post, we’ll explore the fascinating world of prompt engineering and demonstrate how product managers can apply their existing skills and knowledge to make a significant impact, while also discussing the nuances and considerations of these principles.</p><h4>Prompt Engineering: A Brief Overview</h4><p>Prompt engineering is the process of designing and refining prompts to guide AI language models like GPT-4 into generating human-like text responses. This burgeoning field is critical in ensuring AI systems understand and address user needs effectively, making it a natural fit for product management principles.</p><h4>How Product Management Principles Apply to Prompt Engineering</h4><p>Product management principles can be applied to prompt engineering in various ways, helping to create better user experiences and drive innovation in AI systems.</p><p><strong>User Personas</strong></p><p>Developing detailed user personas is essential for ensuring that AI systems cater to different users’ needs, preferences, and pain points. However, it is important to balance the time and effort spent on creating personas with the need for prompt iteration and refinement.</p><p><strong>User Stories and Acceptance Criteria</strong></p><p>Crafting user stories and acceptance criteria for prompt engineering helps align product managers and engineers on desired outcomes and ensures AI systems deliver expected functionality and user experiences. At the same time, it is crucial to strike a balance between clear, concise user stories and allowing room for innovation to maintain an effective AI system.</p><p><strong>Goals Setting</strong></p><p>Setting goals is fundamental for guiding the team’s work and facilitating the AI system’s continual improvement. Balancing short-term goals with long-term objectives is essential for driving innovation.</p><p><strong>Being Agile</strong></p><p>Adopting an iterative approach, known as Agility, allows product managers to test and refine prompts, gather user feedback, and make data-driven decisions to improve AI systems continually. While incrementalism offers many benefits, it is necessary to weigh these against the need for bold, transformative ideas to create a robust and innovative AI system.</p><h4>Real-World Example</h4><p>Let’s take a look at how a product manager, Jane, successfully transitioned her skillset to the field of prompt engineering at a leading AI company. Jane, a seasoned product manager with a background in software development, found her new role in prompt engineering to be an exciting challenge.</p><p>Jane started by collaborating with the prompt engineering team to enhance the AI-powered content generation platform the company was developing. She began by utilizing her expertise in creating user personas, representing various content creators, marketers, and editors. This helped the team focus on addressing the specific needs, preferences, and pain points of each user group.</p><p>Next, Jane worked on writing clear user stories and acceptance criteria for each persona, ensuring that both product management and the prompt engineering team were aligned on the desired outcomes. She struck a balance between specificity and flexibility, allowing the AI system to innovate while maintaining a clear focus on user needs.</p><p>To guide the team’s work, Jane set measurable goals, such as increasing the AI-generated content’s relevance and quality and reducing the time users spent editing and refining the content. She ensured that these goals were both ambitious and achievable, promoting a healthy balance between short-term gains and long-term strategy.</p><p>Jane encouraged an incremental approach to the AI system’s development, working in short, iterative cycles. She implemented a feedback loop that allowed the team to gather user feedback and make data-driven decisions to improve the AI system continually. By balancing the benefits of incremental improvements with the need for breakthrough ideas, Jane helped the team create a robust and innovative content generation platform.</p><p>Finally, Jane embraced agile methodologies, fostering a culture of adaptability and responsiveness to changing user needs, technological advancements, and market trends. She ensured that the team maintained a balance between agility and long-term planning, allowing them to achieve both immediate milestones and strategic objectives.</p><p>Through her successful application of product management principles to the field of prompt engineering, Jane played a pivotal role in the development of a cutting-edge AI content generation platform that delighted users and transformed the content creation landscape.</p><h4>Final Thoughts</h4><p>As the field of prompt engineering continues to grow, product managers have a unique opportunity to apply their skills and expertise to shape the future of AI. By leveraging product management principles like user personas, user stories, goal setting, incrementalism, and working with agility, product managers can make a significant impact in this emerging field and drive innovation in AI systems.</p><p>If you’ve made it this far, here’s where I drop the bomb that Chat GPT-4 wrote the entirety of this post from a prompt written in the form of a user story. It took me roughly 20 min to iteratively update the prompt to get the desired output.</p><p>While this post won’t win any Pulitzers, as you’ve likely heard many times, this is the worst GPT will ever be. It really makes one philosophical about human creativity and our place in the world. Some see this as frightening and others, exciting. I’d love to read in the comments what you think.</p><p><strong>Prompt used to generate this blog post</strong></p><blockquote>As a blog writer, I would like you act as my ghost writer and write for me a blog post for medium.com that discusses the use of product management principals in prompt engineering, so that I can excite product managers about the potential future of their work. Use the criteria below to guide your writing:</blockquote><blockquote>Acceptance criteria:</blockquote><blockquote>- start by providing a structure for your blog post<br>- continue by writing all sections you’ve outlined in your structure<br>- expand on each section to consider benefits and trade-offs<br>- come up with your own comparisons between the subject matter<br>- be sure to include concepts like: 1) user personas, 2) user story and acceptance criteria writing, 3) goals setting, 4) incrementalism and 5) working with agility<br>- provide a real-world example to how a product manager can apply her skillset to prompt engineering<br>- write with cohesive sets of paragraphs as we might speak in natural language</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f970ce78d7c" width="1" height="1" alt=""><hr><p><a href="https://blog.dancingrobots.co/the-future-of-product-management-meets-prompt-engineering-exciting-times-ahead-9f970ce78d7c">The Future of Product Management Meets Prompt Engineering: Exciting Times Ahead</a> was originally published in <a href="https://blog.dancingrobots.co/">Dancing Robots</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ChatGPT wrote this post, in the voice of Peter Griffin]]></title>
            <link>https://blog.dancingrobots.co/chatgpt-rebuilt-our-app-in-flutter-3df8ec6b97ce?source=rss-77747e2de633------2</link>
            <guid isPermaLink="false">https://medium.com/p/3df8ec6b97ce</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[Matthew Kim]]></dc:creator>
            <pubDate>Mon, 03 Apr 2023 11:44:49 GMT</pubDate>
            <atom:updated>2024-04-29T02:52:04.634Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*vr0S4kqKmJws56AYSGzY3A.jpeg" /><figcaption>Source: Family Guy</figcaption></figure><h4>My journey learning Flutter with ChatGPT</h4><p>ChatGPT wrote a blog post about my experience learning Flutter and rebuilding a hobby app in two months… in the voice of Peter Griffin.</p><h4>You know what really grinds my gears?</h4><p>I used to be a coding whiz back in the day, but things change, you know? I mean, every few years, I have to dust off the cobwebs from my coding bookshelf and get back in the game. It’s like riding a bike, except the bike is on fire, and you’re in hell. But anyway, I was interested in Flutter as a cross-platform language, and I thought it would be perfect for revamping our Rainbow diet app. I mean, who doesn’t want to eat rainbows, right?</p><p>A few years back, my pal and I had this genius idea to make an app to track our rainbow diet. We were all high fives and fist bumps until we started slacking off. Then, like a squirrel on a power line, the app went haywire! Bugs were crawling out of every orifice, and features were breaking like wind under a bean-eating contest! It was a complete disaster, and I was more lost than a tourist in a nudist colony.</p><p>The first app was built in React-Native, which is like using a horse-drawn carriage in a world of Teslas. It was outdated and clunky, like trying to send a fax in 2023. So, I fired up ChatGPT, my trusty coding assistant, and got to work. It was like having a high-tech version of R2-D2 by my side who was always ready with a suggestion or a witty remark. “Hey, ChatGPT, how do I make this button look more… button-y?” And it was like, “Well, Peter, have you tried using a button?”</p><h4>First impressions</h4><p>Oh boy, let me tell you, when I first fired up ChatGPT, the wow factor was through the roof! It was like I had my own personal coding genie ready to grant me three wishes. And let me tell you, my wishes were pretty basic — I just wanted to get this darn rainbow diet app back on track.</p><p>I’ll be honest with you, I didn’t even use Stack Overflow at first. I mean, why bother when I had ChatGPT? It was like having the answer key to a test, but without the risk of getting caught. And it wasn’t just about finding answers to specific coding problems. ChatGPT also helped me understand programming concepts better. It was like having a patient and understanding tutor, except without the weird smells and questionable fashion choices.</p><p>But then, I started to get a little too comfortable. It was like having a coding buddy who never left my side, even when I was covered in Dorito crumbs and soda stains. I started taking ChatGPT for granted. I mean, it was always there for me, always ready with a suggestion or a solution. And before I knew it, I was relying on it too much. It’s like having a butler who helps you get in shape. Sure, you’ll have abs of steel, but you’ll also have to deal with the shame of someone else wiping your sweat.</p><p>So, I had to take a step back and remember that learning isn’t just about the destination; it’s about the journey. And with ChatGPT, the journey was just too easy. But hey, I can’t blame ChatGPT for being awesome. It’s like blaming a unicorn for being too magical.</p><h4>Second impressions</h4><p>As I started to get into more advanced topics, I realized that ChatGPT wasn’t quite the coding unicorn I thought it was. Don’t get me wrong, it was still helpful for the basics, but when it came to more complex topics, it was like trying to teach a cat how to code.</p><p>For advanced topics, it was referencing old libraries and dated Stack Overflow posts. It was like having an elderly grandparent who still talked about the good old days of Fortran and punch cards. “Back in my day, we didn’t have your fancy Flutter and React Native. We had to write code with a hammer and chisel!”</p><p>It was like ChatGPT was a time traveler from the past, trying to give me advice on modern-day coding. “Hey Peter, have you tried using jQuery for that?” And I was like, “Uh, ChatGPT, jQuery is so 2010. Get with the times, man!”. But then I realized that even the smartest robots have their limitations. ChatGPT is an incredible tool, but it’s only as good as the data it’s been trained on. Sometimes that data is outdated, just like my dad’s old mustache.</p><p>Don’t get me wrong, ChatGPT was still helpful in some ways, but when it came to the more advanced stuff, I had to turn to the experts on Stack Overflow. It was like going to a doctor for a serious illness instead of relying on your friend who read a WebMD article once.</p><h4>Final thoughts</h4><p>Learning a new programming language is like trying to shave your back hair. At first, you’re fumbling around with the razor and wondering if you’re doing it right, but eventually, you’ll have a smooth and shiny back that’s the envy of all your friends!</p><p>And ChatGPT? Well, it was like having a weird robot circus clown as my coding coach. At first, it was helpful and entertaining, but as things got more advanced, it started juggling outdated libraries and dropping flaming bowling pins everywhere. But hey, you can’t blame a robot clown for trying!</p><p>If there’s one thing I’ve learned from this experience, it’s this — never trust a machine to do a human’s job. Unless, of course, you’re trying to take over the world. In that case, ChatGPT is probably your best bet.</p><p>Hey, take a peek at the app if you want or don’t. I’m not your puppet master, controlling your every move like a creepy marionette. It’s your life; live it how you want! But if you do check it out, be prepared for a wild ride, like a rollercoaster made of spaghetti. It might be the best decision you ever make, or it might be like ordering a pizza with pineapple on it.</p><p><a href="https://apps.apple.com/us/app/eat-the-rainbow/id1441463086?platform=iphone">iOS &amp; Mac</a> | <a href="https://play.google.com/store/apps/details?id=app.eattherainbow.android">Android</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t2Hw-gZ9TQ62llyX8UF7hw.png" /><figcaption>Rainbow Food Journal App</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3df8ec6b97ce" width="1" height="1" alt=""><hr><p><a href="https://blog.dancingrobots.co/chatgpt-rebuilt-our-app-in-flutter-3df8ec6b97ce">ChatGPT wrote this post, in the voice of Peter Griffin</a> was originally published in <a href="https://blog.dancingrobots.co/">Dancing Robots</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dude, where’s my Product? (Part 1/2)]]></title>
            <link>https://blog.dancingrobots.co/dude-wheres-my-product-f7593f2b9627?source=rss-77747e2de633------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7593f2b9627</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[product-manager]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Matthew Kim]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 14:18:06 GMT</pubDate>
            <atom:updated>2024-06-06T01:44:43.945Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQsBNHUOSygBdVk1ai7nig.jpeg" /><figcaption>Source: <a href="https://medium.com/hackernoon/scrum-gone-wild-in-15-cartoons-cca23937a183">Marija C</a>.</figcaption></figure><h4>When being Agile isn’t enough</h4><p>This article was inspired by <a href="https://www.svpg.com/product-fail/">Marty Cagan’s Product Fail</a>.</p><p>You might be part of an Agile team working at a scaling software company and are experiencing one or more of the following patterns:</p><ul><li>Unclear accountability for the success of products and programs</li><li>Sources of feature ideas have multiple owners</li><li>Feature work is retroactively mapped to OKRs</li><li>Services become orphaned</li></ul><p>Having worked at all sizes of software companies over the years, I’ve seen teams organized and have organized them myself in all ways. While there’s no right and wrong way, there is usually a better way.</p><p>This is a two-part series where I’ll share with you the standard organizational models we see at software companies and propose an approach that will benefit the most of us.</p><h3>Evolution I (Project age)</h3><p>Before product management in software became commonplace, project management took center stage. A project manager’s role is to manage resources to deliver a project on time and within budget.</p><p>Central to this organizational style is that ideas are the responsibility of executives and business leaders. These ideas are put into a roadmap and handed to a project manager to orchestrate delivery with engineering teams.</p><p>To scale this model, leaders create departments by their function (project management, engineering, design, operations, etc.) and form teams around new projects, pulling in contributors as needed.</p><figure><img alt="https://cdn-images-1.medium.com/max/1600/1*lpUzMmxcyJfDjEQt1Hk66g.png" src="https://cdn-images-1.medium.com/proxy/1*lpUzMmxcyJfDjEQt1Hk66g.png" /><figcaption><em>Evolution I (Project age)</em></figcaption></figure><p>What’s illustrated above is a classic waterfall project. To be clear, this isn’t an indictment of Waterfall. Waterfall ≠ wrong and Agile ≠ right. There is a place for both, but generally, Waterfall is most suited when predictability is high and Agile works best when uncertainty is high. I’ll take the extra step and say that for software companies usually better to be Agile to take advantage of quick feedback loops, which may not be possible in other industries.</p><p>The truth is that without quick feedback loops, waterfall projects do a poor job of mitigating risks related to highly uncertain initiatives. These projects often go over budget, are delayed, and don’t provide the value initially intended. For these reasons, leaders often adopt Agile and undergo an organizational transformation. There are many online resources for understanding <a href="https://www.atlassian.com/agile">Agile</a>, but in short, it’s a risk mitigation play. It’s designed to help us learn from mistakes and do it quickly so that we can focus on building the right things.</p><h3>Evolution II (early-Agile age)</h3><p>During Agile transformation, we matrix our organization to form cross-functional teams comprised of Product, Engineering, and UX (when available). Each function reports to its functional manager, but their day-to-day is with their Agile team.</p><p>As in Evolution I, ideas originate from executives and business teams. These needs are captured into requirements by Product, passed to UX for design, and finally to Engineers for delivery. Delivery teams may use sprints to plan their work and appear to be working Agile. This is Waterfall with Agile delivery, as eloquently described in Marty Cagan’s blog post <a href="https://www.svpg.com/product-fail/">“Product Fail”</a>.</p><figure><img alt="https://cdn-images-1.medium.com/max/1600/1*ek02a0AE4CMDWYmlPsX4CQ.png" src="https://cdn-images-1.medium.com/proxy/1*ek02a0AE4CMDWYmlPsX4CQ.png" /><figcaption>Evolution II (early-Agile age)</figcaption></figure><p>While we’ve reorganized our teams, we haven’t changed the flow of ideas. It’s arguable if this is a better evolution. Looking closely at the two models, both Evolution I and II are almost identical. Swap ‘project’ for ‘product’, and they are. Sure, the two roles may have slightly different responsibilities, but the cascading of information continues to make this a Waterfall way of working.</p><figure><img alt="https://cdn-images-1.medium.com/max/1600/1*4e-POOqk4Ck7wMw9-JQ9pA.png" src="https://cdn-images-1.medium.com/proxy/1*4e-POOqk4Ck7wMw9-JQ9pA.png" /><figcaption>Same same, but different.</figcaption></figure><p>Simply reorienting teams without empowering them makes Evolution II fall short of de-risking the nature of Waterfall. Whether it’s due to change management, resistance to let go, or being unaware, unfortunately, this is where many of us stop evolving.</p><blockquote><em>“any organization that designs a system will produce a design whose structure is a copy of the organization’s communication structure” <br>— Melvin E. Conway</em></blockquote><h4><strong>Agile teams are not enough</strong></h4><p>As <a href="https://en.wikipedia.org/wiki/Conway%27s_law">Conway’s Law</a> states, “any organization that designs a system will produce a design whose structure is a copy of the organization’s communication structure”.</p><p>As we’ve seen in Evolution I and II, the empowerment to solve customer (or user) problems is still in the hands of our executives and business leaders. As such, our delivery teams build systems and tools that solve stakeholder-identified problems without fully understanding the customer journey. As our business scales, systems likely organize around these business processes making product centricity illusive and OKR planning difficult.</p><p>Without product centricity, it’s common for <a href="https://www.notion.so/db912cb02f37426297285cd1624218e1">point-to-point</a> systems to emerge, built around disparate stakeholder-identified initiatives. Data consistency and maintainability become issues in time, ownership of systems becomes unclear, and worst of all, systems become orphaned.</p><h4><strong>A side thought on goal setting</strong></h4><p>First, let’s not trivialize goal setting; it’s hard.</p><p>Many adopt the <a href="https://felipecastro.com/en/okr/what-is-okr/">OKR</a> framework to align their teams around common goals. In Evolution II, due to the point-to-point nature of systems and teams, it’s unclear which teams should work on which OKRs. The problem exacerbates if our functional leaders (business, product, engineering, operations, etc.) develop their own set of OKRs in isolation.</p><p>In an attempt to make workable OKRs across their teams, we work bottom-up. First, we wrap our heads around business processes and their supporting systems, then develop goals to improve them. This might seem okay on the surface, but due to the lack of product centricity, goals focus too narrowly on business processes rather than on the customer journey.</p><p>OKRs should be simple, memorable, thematic, and most importantly, focused on the customer.</p><h3>Evolution III (neo-Agile age)</h3><p>We should all strive towards empowered teams. Instead of handing down requirements, our executives and business leaders can focus on working with their cross-functional counterparts to set the high-level vision and objectives for the organization and evangelize the values and tenants that act as guardrails to guide teams.</p><p>Empowered teams are accountable for crafting their product vision and working across functions to collaboratively build a roadmap that supports the objectives.</p><p>By breaking away from the patterns in Waterfall, our organizations start to embody the following characteristics:</p><ul><li>Product plays a lead role in Discovery</li><li>Customer and product-centricity emerges</li><li>Clear accountability for the success of a product</li></ul><p>Enter Evolution III, the neo-Agile era, where empowered teams are organized around customer themes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2pp_7qdJmpOBx_47YSfeMA.png" /><figcaption>Evolution III (neo-Agile age)</figcaption></figure><p>I won’t get into the mechanics of Agile here, but if you’re working at a startup, those patterns are easily identifiable in Evolution III. The product manager leads the empowered model. She doesn’t dictate what gets built but draws upon cross-functional partners to empathize with the customer and discover it together. She is accountable for the product&#39;s success and must lead the team to build the right thing.</p><p>Easier said than done! I’ve presented only the tip of the iceberg. In Part 2, I’ll share an example of transforming a point-to-point business lead organization to a hub-and-spoke product lead organization. It isn’t until we orchestrate around products that:</p><ul><li>Aligning around OKR becomes intuitive</li><li>We reduce role confusion</li><li>Services don’t get orphaned</li></ul><h3>Final thought</h3><p>As a product manager, if you feel un-empowered to solve customer problems, have an unclear alignment of OKRs, or feel disconnected from customers, it may be worth reflecting on your organization’s journey into Agile.</p><p>If you’ve gotten this far down the article, I hope I’ve struck a few chords with you. I’m eager to hear about your experiences working in your respective industries and encourage your comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7593f2b9627" width="1" height="1" alt=""><hr><p><a href="https://blog.dancingrobots.co/dude-wheres-my-product-f7593f2b9627">Dude, where’s my Product? (Part 1/2)</a> was originally published in <a href="https://blog.dancingrobots.co/">Dancing Robots</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key App Metric with BigQuery Part 2: Power User Curve]]></title>
            <link>https://blog.dancingrobots.co/key-app-metric-with-bigquery-part-2-power-user-curve-c8a8eeafe575?source=rss-77747e2de633------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8a8eeafe575</guid>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[apps]]></category>
            <dc:creator><![CDATA[Matthew Kim]]></dc:creator>
            <pubDate>Mon, 20 Apr 2020 14:15:29 GMT</pubDate>
            <atom:updated>2025-10-07T16:29:36.915Z</atom:updated>
            <content:encoded><![CDATA[<h3>Key App Metrics with BigQuery Part 2: Power User Curve</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tlpoZl77hcRF-KclfEuzPA.png" /><figcaption>Source: Disney</figcaption></figure><p><em>Warning: This post was created during the pandemic lockdown, during which time I was heavily influenced by cat videos.</em></p><p>This is Part 2 of a series inspired by the a16z podcast episode <a href="https://a16z.com/2018/08/06/power-user-curve-l30-l7/">Metrics and Mindsets for Retention &amp; Engagement</a>. The episode covers the metrics that come after acquisition including engagement metrics like the DAU/MAU, and the power user curve (L7, L30). Inspired, I thought it would be a good idea to put some theory into practice using our <a href="https://eattherainbow.app/">Rainbow App</a>.</p><p>For this article, I highly encourage listening to the podcast <a href="https://a16z.com/2018/08/06/power-user-curve-l30-l7/">episode</a> and reading <a href="https://andrewchen.co/power-user-curve/">this</a> post by Andrew Chen before proceeding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TsGlJgxDhBuCZ4qL4IhyPQ.png" /></figure><p>In <a href="https://medium.com/build-the-right-thing/key-app-metrics-with-bigquery-part-1-dau-mau-9eac7cbdbe04">Part 1</a> of this series, we hypothesized that there might be a small group of power users within our app because Firebase Analytics told us that our 3-month retention rate was 9%. What this metric doesn’t tell us is the frequency of engagement within that period. What we’re interested in now is: how many of our users are power users?</p><h3>Power User Curve</h3><p>The power user curve, also commonly called the activity histogram or the L30, is a histogram that compares the total number of days users were active across a 30-day period (or a month).</p><h4>Look for the smile</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6FD-qF0BlhCxqBsxbZUrfQ.jpeg" /></figure><p>An app with a strong cohort of power users will present a “smile” in its power user curve. In our sample histogram, the data first shows a steep drop-off of engagement from most users after a couple of days. More interestingly on the tail end of the histogram, we see engagement rise.</p><h4>Calculating the Power User Curve</h4><p>To create our power user curve we’ll use from our dataset the month of February in 2020. Here’s the SQL query to extract our data from BigQuery.</p><pre>-- Replace the fields PROJECT and DATABASE to match your project</pre><pre>DECLARE STARTMONTH DATE DEFAULT &#39;2020-02-01&#39;;  --day is ignored</pre><pre>WITH data as (<br>  SELECT * FROM (<br>    SELECT  PARSE_DATE(&#39;%Y%m%d&#39;, &#39;2020&#39;||_TABLE_SUFFIX) event_date, user_pseudo_id user_id<br>      FROM `PROJECT.DATABASE.events_2020*`<br>      WHERE event_name = &#39;user_engagement&#39;<br>  ) WHERE <br>      EXTRACT(MONTH from event_date) = EXTRACT(MONTH from STARTMONTH)<br>)<br>SELECT<br>  daysActive, <br>  COUNT(DISTINCT(user_id))<br>FROM<br>  (<br>    SELECT<br>      user_id,<br>      COUNT(DISTINCT event_date) daysActive<br>    FROM<br>      data<br>    GROUP BY user_id<br>  ) userEvents<br>GROUP BY daysActive<br>ORDER BY daysActive ASC</pre><p>Note that in our query, we filter our logs forevent_name = &#39;user_engagement&#39;. In Firebase, this particular event log is automatically generated when a user has the app in the foreground for a minimum number of seconds (default set to 10 sec). This value is set within the app, so we need to be aware of how this may impact our results. For the moment we’ll live with it (because my time machine is still in beta).</p><p>The above query will extract for us a unique count of days that a user has engaged with our app in February of 2020 (29 days, it was a leap year). Then, plotting the results into a histogram we can get a better idea of how our users are engaging with our daily-use app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QAZg9p41b7ebw8JxRsH4bg.png" /></figure><p>At first glance, we see a sharp dropoff of users after a single day of use and we also don’t see the upward trend at its tail. However, upon closer inspection, there is something interesting going on at day 29. What would happen if we cropped away the first two days and zoomed in?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n216hvMP8mcRmc3SGKJ8Yg.png" /></figure><p>Now, this is interesting. After removing the first two days we see our smile appear. In fact, it appears that 14 users have used our app every day in the month of February.</p><h4>Monthly trends</h4><p>Taking this one step further, we can also track this trend over several months. We haven’t done any marketing nor has the app been updated, so we shouldn’t expect drastic changes, but here are the results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*um0WxhS3W24JmxXjrg7yxA.png" /></figure><p>Since January, there definitely seems to be a small group of power users on our app. Perhaps a New Years resolutions bump? It will be interesting to monitor this over the coming months to see if the trend persists or levels off.</p><h4>Take away</h4><p>Zooming in on the data can be misleading and we need to be careful not to paint a story that isn’t accurate. For this example, we merely wanted to validate that we have power users on our app.</p><p>We might take a guess at who these people are but there’s no way to be sure from a single histogram. We can consider taking the following next steps from lowest to highest effort:</p><ul><li><strong>Dive into the data</strong>: Taking a deeper dive into the default event logs may reveal patterns that help us better understand our users.</li><li><strong>User survey</strong>: Sending out a user survey to build a profile of our power users can answer questions that we otherwise couldn’t by combing through the event logs.</li><li><strong>Collect more data</strong>: We can consider adding a questionnaire to the onboarding steps to help us build a profile of our users. As well, adding custom event triggers in the app can help us monitor activities not captured by default in Firebase.</li></ul><h3>Closing Thoughts</h3><p>Despite the cohort being small (1% of our total user base in February), we’ve used data to confirm that we have power users on our app 🎉. The task from here would be to identify what type of users they represent and how we can get more of them.</p><p>Now that we have a baseline measurement we can continue to monitor this metric as we push new features. We’ll need to keep in mind that this is a lagging metric and that we’ll need a month’s worth of data to calculate it again. It would be a good idea to A/B test new features to keep the data separate for evaluation.</p><p>In the next part of this series, I’ll cover cohort analysis.</p><p>PS. I think it’s time to adopt a cat. 🐈</p><h4>Posts in this Series</h4><ul><li><a href="https://medium.com/build-the-right-thing/key-app-metrics-with-bigquery-part-1-dau-mau-9eac7cbdbe04">Key App Metrics with BigQuery Part 1: DAU/MAU</a></li><li>Key App Metric with BigQuery Part 2: Power User Curve (this post)</li></ul><h4>Get in Touch!</h4><ul><li>Visit my <a href="https://www.linkedin.com/in/matt-kim-272316/">LinkedIn</a> profile</li><li>Visit my <a href="https://medium.com/build-the-right-thing">Medium</a> blog</li></ul><h4>References</h4><ul><li>a16z — <a href="https://a16z.com/2018/08/06/power-user-curve-l30-l7/">Metrics and Mindsets for Retention &amp; Engagement</a></li><li>Andrew Chen — <br><a href="https://andrewchen.co/power-user-curve/">The Power User Curve: The best way to understand your most engaged users</a></li><li>Firebase Help — <a href="https://support.google.com/firebase/answer/6317485?hl=en">Automatically collected events</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8a8eeafe575" width="1" height="1" alt=""><hr><p><a href="https://blog.dancingrobots.co/key-app-metric-with-bigquery-part-2-power-user-curve-c8a8eeafe575">Key App Metric with BigQuery Part 2: Power User Curve</a> was originally published in <a href="https://blog.dancingrobots.co/">Dancing Robots</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Key App Metrics with BigQuery Part 1: DAU/MAU]]></title>
            <link>https://blog.dancingrobots.co/key-app-metrics-with-bigquery-part-1-dau-mau-9eac7cbdbe04?source=rss-77747e2de633------2</link>
            <guid isPermaLink="false">https://medium.com/p/9eac7cbdbe04</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[bigquery]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[apps]]></category>
            <dc:creator><![CDATA[Matthew Kim]]></dc:creator>
            <pubDate>Thu, 05 Mar 2020 11:01:01 GMT</pubDate>
            <atom:updated>2025-10-07T16:29:48.868Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*PmqcigU6CAp3HlNuM6JrzQ.png" /><figcaption>Unknown artist.</figcaption></figure><p>This post is Part 1 of a series inspired by the a16z podcast episode <a href="https://a16z.com/2018/08/06/power-user-curve-l30-l7/">Metrics and Mindsets for Retention &amp; Engagement</a>. The episode covers the metrics that come after acquisition including engagement metrics like the DAU/MAU, and the power user curve (L7, L28). Inspired, I thought it would be a good idea to put some theory into practice using our <a href="https://eattherainbow.app/">Rainbow App</a>.</p><p>For this article, I highly encourage listening to the podcast <a href="https://a16z.com/2018/08/06/power-user-curve-l30-l7/">episode</a> and reading <a href="https://andrewchen.co/dau-mau-is-an-important-metric-but-heres-where-it-fails/">this</a> post by Andrew Chen before proceeding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KPO2MoX_XjJc0xc67Zhm4w.png" /></figure><h3>The Setup</h3><p>Our app is a plant-based food journal. The hope is that users will engage with it on a daily basis and so the DAU/MAU would be a relevant metric for us.</p><p>The DAU/MAU will tell us what percentage of monthly users use our app on a daily basis. A perfect and impossible score here would be a DAU/MAU of 100%, but more importantly, we know that a strong sign of an app finding its product/market fit is a DAU/MAU of 40%.</p><p>Reviewing the history of our apps growth to date, in May of 2019 we had about 650 monthly active users (MAU) which grew to 2000 MAU by February of 2020.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hus-UiUjxN8DKB1jH5kucw.png" /><figcaption>Note: The dashboard analytics data is a wider window than our available event logs.</figcaption></figure><p>Before we dive in, let’s make some educated guesses about our app using the Firebase analytics dashboard, our app rating and feedback as inputs.</p><ul><li><strong>Hypothesis 1:</strong> Our app has not found product/market fit. Since our Week-1 retention is about 20%, this means 80% of users drop out after the first week. We can answer this by calculating the DAU/MAU.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_DaOkY3zel5m3ovy3WOwog.png" /></figure><ul><li><strong>Hypothesis 2:</strong> There may be a handful of power users. This is based on enthusiastic app reviews and a 90-day retention rate of 9%. Let’s answer this by calculating the Power User Curve (in Part 2).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kc3GHvPJj5Cm9OosH7YY_A.png" /></figure><p>For Part 1 of our tutorial, let’s answer our first hypothesis: <em>Our app has not found product/market fit. </em>To do that I’ll use BigQuery to extract metrics from our event logs in Firebase. Note that I’ve already connected BigQuery to our Firebase project, which I don’t cover in this tutorial.</p><h3>Calculating the DAU/MAU</h3><p>In order to calculate the DAU/MAU, we use a rolling 30-day window to calculate the respective MAU value for a given DAU value. For example:</p><pre>To calculate the DAU/MAU for Feb 29 2020:</pre><pre>- First, calculate the DAU for Feb 29, 2020<br>- Second, calculate the MAU for Jan 31 2020 to Feb 29, 2020<br>- Finally, apply the math DAU/MAU</pre><p>The below query calculates the daily DAU/MAU values for 30 days pivoting on a start date. In our case NDAYS=30 and STARTDATE=2020–03-01.</p><pre>-- Special mention to <a href="https://medium.com/@hoffa">Felipe Hoffa</a> for inspiring and cleaning up this query<br>-- Replace the fields PROJECT and DATABASE<br>-- As well as the table name: &#39;events_202001*&#39;</pre><pre>DECLARE STARTDATE DATE DEFAULT &#39;2020-03-01&#39;;<br>DECLARE NDAYS INT64 DEFAULT 30;</pre><pre>WITH data AS (<br>  SELECT * FROM (<br>    SELECT *, PARSE_DATE(&#39;%Y%m%d&#39;, &#39;2020&#39;||_TABLE_SUFFIX) day, user_pseudo_id user_id<br>    FROM `PROJECT.DATABASE.events_2020*`<br>  ) WHERE day &lt;= STARTDATE  <br>), daysN AS (<br>  SELECT * FROM data <br>  WHERE day &gt;= DATE_ADD(STARTDATE, INTERVAL -NDAYS DAY) <br>), days60 AS (<br>  SELECT * FROM data <br>  WHERE day &gt;= DATE_ADD(STARTDATE, INTERVAL -60 DAY) <br>), stopdays AS (<br>  SELECT DISTINCT day stopday FROM data <br>  WHERE day &gt;= DATE_ADD(STARTDATE, INTERVAL -NDAYS DAY) <br>), maus AS (<br>  SELECT stopday, COUNT(DISTINCT(user_pseudo_id)) mau<br>  FROM days60 JOIN stopdays<br>  ON day BETWEEN DATE_ADD(stopday, INTERVAL -NDAYS DAY) AND stopday<br>  GROUP BY stopday<br>)<br>SELECT day, dau, mau, 100*dau/mau daumau<br>FROM (<br>  SELECT day, COUNT(DISTINCT user_pseudo_id) dau<br>    , (SELECT mau FROM maus WHERE a.day=maus.stopday) mau<br>  FROM daysN a<br>  GROUP BY day<br>)<br>ORDER BY dayResults</pre><p>After averaging the days values into a single monthly metric we can plot it on a line graph, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*IOFU17_hbDqsTOWdL7iPRA.png" /></figure><p>The result reveals a uniform distribution across the 9 months we have data. It also tells us that despite the volume of users growing over time, the app is not increasing in daily engagement. This makes sense because nothing fundamentally changed within the app during this period.</p><h4>Take away</h4><blockquote>I’ve also not seen a 10% DAU/MAU product, through sheer effort, become 40% DAU/MAU. — Andrew Chen</blockquote><p>Getting from a DAU/MAU of 9% to 40% will be an immense challenge. The next step from here is to develop strategies to increase daily retention rates. For our app we could consider these:</p><ul><li><strong>Top of the funnel</strong> (quick win): If we brand our app storefront to target plant-based journal seekers, we can increase our daily engagement by being more targeted. At the moment there may be some ambiguity in our messaging as voiced by some users. This is a quick win but a short-term fix.</li><li><strong>Leverage power users </strong>(incremental improvements): Get feedback from our power users and A/B test new features optimizing daily engagement. This is what Andrew had warned us against. My instincts tell me incremental improvements will lead us down a dead end.</li><li><strong>Product pivot </strong>(big effort)<strong>:</strong> Getting from 9% to 40% will likely require a product pivot. If we do the work to understand our power user cohort we may uncover a hidden use-case that leads to a successful pivot. The alternative is to appeal to the masses by becoming a calorie tracking app, and that doesn’t align with our mission.</li></ul><h3>Closing Thoughts</h3><p>The data suggests that our original hypothesis was correct. The 2000 monthly-active user metric is more vanity than substance. That said the DAU/MAU value of 9% while not strong is our new baseline. We can aim to improve it from here.</p><p>In the next part of this series, I’ll cover the Power User Curve. For an early-stage app like ours, figuring out who our power users are will help us navigate to product/market fit 🤞. If we’re successful this should also result in a lift to our daily engagement metric.</p><h3>Posts in this Series</h3><ul><li>Key App Metrics with BigQuery Part 1: DAU/MAU (this post)</li><li><a href="https://medium.com/build-the-right-thing/key-app-metric-with-bigquery-part-2-power-user-curve-c8a8eeafe575">Key App Metric with BigQuery Part 2: Power User Curve</a></li></ul><h4>Get in Touch!</h4><ul><li>Visit my <a href="https://www.linkedin.com/in/matt-kim-272316/">LinkedIn</a> profile</li><li>Visit my <a href="https://medium.com/build-the-right-thing">Medium</a> blog</li></ul><h4>References</h4><ul><li>a16z — <a href="https://a16z.com/2018/08/06/power-user-curve-l30-l7/">Metrics and Mindsets for Retention &amp; Engagement</a></li><li>Andrew Chen — <a href="https://andrewchen.co/dau-mau-is-an-important-metric-but-heres-where-it-fails/">DAU/MAU is an important metric to measure engagement, but here’s where it fails</a></li><li>Felipe Hoffa on StackOverflow — <a href="https://stackoverflow.com/questions/33226570/how-to-calculate-dau-mau-with-bigquery-engagement">DAU/MAU</a></li><li>Google Support — <a href="https://support.google.com/firebase/answer/9037342?hl=en">Sample Queries</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9eac7cbdbe04" width="1" height="1" alt=""><hr><p><a href="https://blog.dancingrobots.co/key-app-metrics-with-bigquery-part-1-dau-mau-9eac7cbdbe04">Key App Metrics with BigQuery Part 1: DAU/MAU</a> was originally published in <a href="https://blog.dancingrobots.co/">Dancing Robots</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>