<?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 Alexandr Matsenov on Medium]]></title>
        <description><![CDATA[Stories by Alexandr Matsenov on Medium]]></description>
        <link>https://medium.com/@amacenov?source=rss-efbaf986388d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*MqE41-czTYHjZuzI2FTfUw.jpeg</url>
            <title>Stories by Alexandr Matsenov on Medium</title>
            <link>https://medium.com/@amacenov?source=rss-efbaf986388d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 07:52:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@amacenov/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[Compilers: The Lizard Brain Missing From LLMs]]></title>
            <link>https://medium.com/swlh/compilers-the-lizard-brain-missing-from-llms-01af6c375329?source=rss-efbaf986388d------2</link>
            <guid isPermaLink="false">https://medium.com/p/01af6c375329</guid>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[business-strategy]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Alexandr Matsenov]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 16:58:44 GMT</pubDate>
            <atom:updated>2026-01-06T16:58:44.989Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Bridging gaps in artificial reasoning with good-old domain logic</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jRcgdmYxR2Jrji3F" /><figcaption>Photo by <a href="https://unsplash.com/@sadswim?utm_source=medium&amp;utm_medium=referral">ian dooley</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>LLMs can explain almost anything. They’re astonishing at recall — chess openings, loan rules, tax codes, you name it. But ask them to <em>play</em> the game rather than describe it, and they fall apart.</p><p>In the recent Kaggle chess tournament, top models collapsed within a few moves: forgetting state, making illegal plays, losing track of strategy. They had knowledge, not understanding.</p><p>Back in 2016–2019, when I was investing in AI startups, the dream was autonomy. But the closest we got were brittle smart home routines and Alexa Skills. Today LLMs can finally act — reason to call APIs, run tools, and orchestrate workflows.</p><p>And yet, reasoning-based autonomy isn’t intelligence. Intelligence requires something LLMs still don’t have: persistent memory and a model of cause and effect (a world model).</p><p>Without those, every prompt becomes a fresh reset. This is why so many “AI agents” behave like flexible RPA bots — they follow instructions beautifully, but they don’t recognize when those instructions no longer make sense.</p><p>What could make an agent reliable?</p><p>The same thing evolution gave us long before higher cognition: a lizard brain — fast, strict, rule-bound sanity checks. In software, that layer is the compiler.</p><h3>Compilers Are the Missing Layer of Reasoning</h3><p>AlphaGo didn’t win because of a neural network alone. It won because the network lived inside a strict rules engine that validated every move. AlphaFold and AlphaEvolve breakthroughs aren’t magic intuition; they are the product of a model wrapped in domain-specific structure and verification.</p><p>A compiler does one thing exceptionally well: enforce domain rules before an action executes. Not unlike the limbic system, it doesn’t think, but it prevents catastrophic mistakes instantly.</p><p>LLMs generate ideas. Compilers make those ideas safe, consistent, and grounded in constraints.</p><p>This is the layer that turns a model from autocomplete into something that behaves like a system.</p><h3>Why Compilers Are Becoming the New Moat</h3><p>The companies that figure out the right compiler for their domain will own the deepest moat of this AI cycle. Compilers are where domain logic lives, and domain logic is hard to copy.</p><p>You can ask another LLM to serve as a verifier (the trendy “self-healing loop” in coding agents), but anyone who has vibe-coded knows what happens: you get faster iterations of the same mistake.</p><p>Human-defined policy layers are even stronger. One reason platforms like Mercor grew so fast is that businesses want expert policies for reinforcement learning that act as constraints, not suggestions. The more critical the task, the more valuable those constraints become.</p><p>Compilers are becoming the new quality layer, the new safety layer, and ultimately the new competitive advantage layer.</p><h3>Where This Gets Exciting: Scientific Reasoning</h3><p>Compiler-first approaches are quietly reshaping scientific reasoning, where correctness matters more than fluency.</p><ul><li>AI Feynman (MIT) explored physics by navigating constrained mathematical structures.</li><li>Harmonic AI translates problems into Lean 4, a formal theorem prover — a compiler for mathematics itself.</li></ul><p>These systems don’t just “chat about” physics or proofs — they can check whether a solution is actually true.</p><p>And now, newer neuro-symbolic systems — such as AUI’s recent work — push this further by mixing learned representations with fully verifiable logic. They bring formal reasoning to business domains that previously relied on heuristics and human oversight.</p><p>This is where AI starts doing more than generating text: it starts producing reasoning we can trust.</p><h3>Founder’s Take</h3><p>At Gauss, we realized something simple: building the agent was easy, engineering the compiler was the moat.</p><p>Our debt management engine works because every action — every credit report analysis, every refinancing route — is checked in real time against user constraints, financial benefit, and regulatory rules.</p><p>The LLM handles the conversation. The compiler ensures the outcome makes sense.</p><p>The same pattern holds for QA. Our testing stack combines autonomous LLM tests with strict logic in Maestro. The compiler layer keeps reasoning consistent across updates. Without it, the entire system would drift within days.</p><p>Every durable AI product is secretly a compiler product.</p><p>LLMs today are stunning at language but still weak at reliable reasoning. True reasoning requires memory, stable world models, and constraint-aware planning.</p><p>All three remain open research problems. Which means the practical path to useful AI agents is hybrid: LLMs + strong compilers.</p><p>Model weights won’t be the moat eventually. Fine-tuning won’t be the moat. Defensibility still sits in the rules, constraints, and verification layers wrapped around the model.</p><h3>The Bottom Line</h3><p>If 2019 was about autonomy, 2026 is about reasoning with persistent memory.</p><p>And until we solve reasoning at the model level, compilers are the only reliable bridge between “AI that sounds smart” and “AI that makes correct decisions.”</p><p>The winners in the next wave won’t be the companies just deploying LLMs on proprietary data. They’ll be the ones building the lizard brains that keep those models grounded in rules, reality, and accountability.</p><p>The real moat forms at the intersection of reasoning, constraint, and execution.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=01af6c375329" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/compilers-the-lizard-brain-missing-from-llms-01af6c375329">Compilers: The Lizard Brain Missing From LLMs</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Restaurants Beware: Amazon Moment Ahead]]></title>
            <link>https://medium.com/rehunch/restaurants-beware-amazon-moment-ahead-512024030b38?source=rss-efbaf986388d------2</link>
            <guid isPermaLink="false">https://medium.com/p/512024030b38</guid>
            <category><![CDATA[restaurant]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[food]]></category>
            <category><![CDATA[disruption]]></category>
            <category><![CDATA[marketplaces]]></category>
            <dc:creator><![CDATA[Alexandr Matsenov]]></dc:creator>
            <pubDate>Sat, 13 Jun 2020 16:06:44 GMT</pubDate>
            <atom:updated>2020-06-13T16:26:45.859Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LZR_9nO0h515DiJDgBYl1A.jpeg" /></figure><h3><strong>The Trouble</strong></h3><p>COVID has teleported the restaurant industry to the cross-roads it was slowly getting to over the last 5–10 years. The industry is having its Amazon moment right now, and it’s up to restaurants to recognize that and decide their fate — be completely commoditized and pressured out of the business or take control of the relationships with diners back from digital marketplaces and find a way to serve diners on terms that work for restaurants.</p><p>Big food delivery marketplaces are playing the Amazon game for a while now. They brought convenience and low prices to diners at the expense of restaurants’ and their own profitability, hoping one day to get to scale where economics can be changed in their favor with a click of a button. To get there, marketplaces had to put diners at the center and control the relationships with them at all costs — not unlike in Amazon case, it’s the consumer who dictates their rise and fall.</p><p>And that’s a total disaster for restaurants. The promise of incremental sales, that sounded so appealing 5–10 years ago, turned out to be a way to loose brand identity in front of a digital consumer and to pay for that loss with a significant fraction of revenue and sometimes more than 100% of profits.</p><p>For majority of restaurants, being on a marketplace means being a square box with a name in a long list of almost identical options for a diner, who priorities delivery time and prices. Few have a luxury of a strong offline brand or a marketing budget to stand out. And building a digital brand from scratch on a marketplace restaurant have no influence over is nearly impossible.</p><p>This is still relatively early days of trouble, there’s still revenue flowing in, and though it’s unfair in a sense that it’s often not incremental or profitable, it still helps to pay the bills. But not for much longer. With delivery quickly growing in scale, even more so due to COVID, and marketplaces losing money on every order, they will have to find a way to turn their business around sooner than later.</p><p>There’s a few ways they can try to do that — running more of their own virtual brands out of dark kitchens, directly competing with their restaurant partners, or raising the prices for restaurants and diners. Given how sensitive the diners are to pricing after being lured for years with coupons and promotions and how important their growing engagement is for marketplaces to survive, it looks more likely that the major part of the the increased fee burden will fall on the restaurants again, and only the strongest brands and largest operations will be able to survive.</p><p>We know that Amazon succeed in this model a while ago. We know about the miserable fate of Amazon suppliers, commoditized and competing fiercely for a few percentage points of profits with other suppliers and Amazon own brands. In the world of e-commerce, a business of selling commodities at a large scale, it can still make sense.</p><p>But I can’t imagine how restaurant business can be done this way. I think the industry is shooting itself in the foot every day it keeps working through existing marketplaces and I think it’s only a few years way from being forced to quickly loose its hospitality roots. COVID has accelerated this process dramatically by making digital channels overwhelmingly important.</p><h3>The Solution</h3><p>Diners preferences for omni-channel convenience are not going away any time soon, so there’s probably no going back from marketplace aggregation model. Restaurants have to find a way to meet diners needs and prevent commoditization at the same time.</p><p>I salute the attempts to establish direct connections with diners and promote their own delivery and pickup services, that hundreds of restaurants all over the country are trying to do today. I salute initiatives like <a href="https://medium.com/tock/tocks-bridge-to-the-future-tock-20-2f510b0d1938">Tock 20</a> that try to reinvent fee structures and data ownership rights for restaurants.</p><p>But I’m afraid those efforts are just not enough anymore, because diners will keep requesting convenience of choice and lower prices, and marketplaces will keep providing it at a huge scale, incomparable to capabilities of any given restaurant brand, even if it’s McDonalds.</p><p>What restaurants really need is a new marketplace, that serves diners at least as good as the existing ones, but also puts restaurants in the center. The economics of such a marketplace would prioritize restaurants, having diners preferences as requirements and keeping little to its own benefit. The only way to incentives a model like that is to build one.</p><p>I call for all restaurants to collectively form a new co-op-like marketplace, that would be serving diners and restaurants more than itself and would facilitate and nourish direct diner-restaurant relationships, building digital brands for restaurants and keeping diners happy with the prices and service.</p><p>It’s not impossible — it’s just a matter of taking a stand. And it’s now or never for the industry to do that.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=512024030b38" width="1" height="1" alt=""><hr><p><a href="https://medium.com/rehunch/restaurants-beware-amazon-moment-ahead-512024030b38">Restaurants Beware: Amazon Moment Ahead</a> was originally published in <a href="https://medium.com/rehunch">Rehunch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CI/CD fbprophet on AWS Lambda using CircleCI]]></title>
            <link>https://medium.com/data-science/ci-cd-fbprophet-on-aws-lambda-using-circleci-b7f584115737?source=rss-efbaf986388d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7f584115737</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[forecasting]]></category>
            <category><![CDATA[timeseries]]></category>
            <category><![CDATA[fbprophet]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Alexandr Matsenov]]></dc:creator>
            <pubDate>Sat, 17 Aug 2019 08:15:43 GMT</pubDate>
            <atom:updated>2019-08-19T01:23:59.969Z</atom:updated>
            <content:encoded><![CDATA[<h3>CI/CD fbprophet to AWS Lambda</h3><h4>Integrate forecasting into your development flow with CircleCI</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qXlfnAZ4xGpRqdTdZfQjow.jpeg" /><figcaption>Greg Studio / Unsplash</figcaption></figure><p>About a year ago I was trying to figure out how to get fbprophet forecasting work on a AWS Lambda and eventually got it working. Since then the need for serverless forecasting matured, and more people got interested in making the tech seamless, leading to some very helpful stuff, like an fbprophet <a href="https://medium.com/@marc.a.metz/docker-run-rm-it-v-pwd-var-task-lambci-lambda-build-python3-7-bash-c7d53f3b7eb2">assembler</a> for AWS Lambda by <a href="https://medium.com/u/9da2f3392040">Marc Metz</a>.</p><p>A natural evolution from just getting the package working is to make it part of your CI/CD process. I had a need to deploy my forecasting code frequently — was integrating a forecasting microservice into other apps — and manually generating and uploading zips was not an option. I’m gonna share how I solved it for CircleCI. Hope you’ll find it useful and reusable for other CI/CD solutions.</p><p>The foundation for consistent deploys is this <a href="https://hub.docker.com/r/amacenov/aws-lambda-fbprophet">Docker image</a> with fbprophet pre-installed into AWS Lambda Python 3.6 environment. It has full, unedited fbprophet, so that customization is possible on the CI/CD side. For example, you may or may not want to uninstall matplotlib from the Docker.</p><p>Feel free to use he image at your discretion. Below is the Dockerfile for it (built off <a href="https://medium.com/u/9da2f3392040">Marc Metz</a>’s) and here’s the <a href="https://github.com/matse004/docker-prophet">whole repo</a>.</p><pre># Dockerfile</pre><pre>FROM lambci/lambda:build-python3.6</pre><pre>ENV <em>VIRTUAL_ENV</em>=venv<br>ENV <em>PATH </em>$<em>VIRTUAL_ENV</em>/bin:$<em>PATH</em></pre><pre>RUN python3 -m venv $<em>VIRTUAL_ENV<br></em>RUN . $<em>VIRTUAL_ENV</em>/bin/activate</pre><pre>COPY requirements.txt .<br>RUN pip install — upgrade pip<br>RUN pip install -r requirements.txt</pre><pre># requirements.txt<br>pystan==2.18<br>fbprophet</pre><p>Below is the CircleCI config.yml code I use. It leverages the path to the virtualenv set up in Docker to prepare fbprophet for deploy.</p><pre># config.yml</pre><pre># assumes the repo structure like this:<br># repo_name<br>#   main_repo_folder<br>#      ...<br>#   name_of_lambda_handler.py<br>#   requirements.txt</pre><pre>version: 2<br>jobs:<br>  build:<br>    docker:<br>      - image: amacenov/aws-lambda-fbprophet<br>        environment:<br>          AWS_ACCESS_KEY_ID: &#39;xxx&#39;<br>          AWS_SECRET_ACCESS_KEY: &#39;xxx&#39;<br>          AWS_DEFAULT_REGION: &#39;xxx&#39;<br><br>    steps:<br>      - checkout<br><br>      - restore_cache:<br>          keys:<br>            - v1-dependencies- <em>#{{ checksum &quot;requirements.txt&quot; }}<br><br>      </em>- run:<br>          name: install dependencies<br>          command: |<br>            VIRTUAL_ENV=/var/task/$VIRTUAL_ENV  # path was set up in the Docker image<br>            source $VIRTUAL_ENV/bin/activate<br>            pip install -r requirements.txt<br><br>      - run:<br>          name: make prophet small enough for lambda<br>          command: |<br>            VIRTUAL_ENV=/var/task/$VIRTUAL_ENV<br>            source $VIRTUAL_ENV/bin/activate<br>            pip uninstall -y matplotlib<br>            find &quot;$VIRTUAL_ENV/lib/python3.6/site-packages&quot; -name &quot;test&quot; | xargs rm -rf<br>            find &quot;$VIRTUAL_ENV/lib/python3.6/site-packages&quot; -name &quot;tests&quot; | xargs rm -rf<br>            rm -rf &quot;$VIRTUAL_ENV/lib/python3.6/site-packages/pystan/stan/src&quot;<br>            rm -rf &quot;$VIRTUAL_ENV/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib&quot;<br><br>      - run:<br>          name: prepare zip<br>          command: |<br>            VIRTUAL_ENV=/var/task/$VIRTUAL_ENV<br>            pushd $VIRTUAL_ENV/lib/python3.6/site-packages/<br>            zip -9qr ~/repo/name_of_the_zip.zip *<br>            popd<br>            zip -9r name_of_the_zip.zip main_repo_folder/<br>            zip -9 name_of_the_zip.zip name_of_lambda_handler.py</pre><pre>- save_cache:<br>          paths:<br>            - ./cache<br>          key: v1-dependencies- <em>#{{ checksum &quot;requirements.txt&quot; }}<br><br>      </em>- run:<br>          name: push to s3<br>          command: aws s3 cp name_of_the_zip.zip s3://your_s3_bucket_name/name_of_the_zip.zip<br><br>      - run:<br>          name: push function code<br>          command: &gt;<br>            aws lambda update-function-code --function-name your_aws_lambda_function_arn<br>            --s3-bucket your_s3_bucket_name<br>            --s3-key name_of_the_zip.zip<br><br><br>workflows:<br>  version: 2<br>  deploy:<br>    jobs:<br>      - build:<br>          filters:<br>            branches:<br>              only: [master]</pre><p>Next time will share a bit more about how I use fbprohet at scale.</p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7f584115737" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/ci-cd-fbprophet-on-aws-lambda-using-circleci-b7f584115737">CI/CD fbprophet on AWS Lambda using CircleCI</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On-demand Food Delivery: Who Wins In the Zero-Sum Game]]></title>
            <link>https://medium.com/@amacenov/on-demand-food-delivery-who-wins-in-the-zero-sum-game-c0958b91ba57?source=rss-efbaf986388d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0958b91ba57</guid>
            <category><![CDATA[delivery]]></category>
            <category><![CDATA[restaurant]]></category>
            <category><![CDATA[delivery-software]]></category>
            <category><![CDATA[on-demand]]></category>
            <category><![CDATA[restaurant-business]]></category>
            <dc:creator><![CDATA[Alexandr Matsenov]]></dc:creator>
            <pubDate>Sun, 09 Jun 2019 15:48:12 GMT</pubDate>
            <atom:updated>2019-08-17T09:46:32.621Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8M1SaTzi4aZEt34zNylOeg.jpeg" /><figcaption>© Kai Pilger / Unsplash</figcaption></figure><h3>Who’s Really Making Money in Food Delivery?</h3><p>Just recently PitchBook reported a new $600M round for DoorDash at $12.6B valuation. And Amazon put $575M into DeliveryHero. Venture capitalists predict cloud kitchens will take over restaurants. Investors and early employees of delivery companies open up <a href="https://twitter.com/m__houck/status/1125814340718776320">interesting public discussions</a> on the future of the industry. And pundits are concerned our society will become even more atomized. So much attention to a relatively old service — getting prepared food to your door. What is actually going on? And who benefits most from all this hype? Let’s take a closer look at the industry to better understand its dynamics and to see where it’s all headed.</p><p>There’s a few key stakeholders in the game: delivery companies, their investors, their employees, their customers and their restaurant partners. We’ll talk about all of them and pay a closer attention to the last group — restaurants — that are affected by the phenomena in a few non-trivial ways.</p><p><strong>Delivery companies </strong>(marketplaces)<strong> </strong>like DoorDash are mostly business model and not technology innovations. They rely on a set of existing platforms, from cloud computing to GPS and mobile phones, and, as it often happens with business model innovations, disrupt business models of other players.</p><p>The business innovation ideas revolve around creative ways to subsidize scaling efficiently. Efficient scaling is also the basis for fierce competition and <a href="https://medium.com/edison-discovers/doordash-surpasses-grubhub-in-national-market-share-of-total-consumer-spend-with-28-to-27-with-94dea124f844">rapid market share moves</a> when one of the companies figures out a better way to do it. Venture capital is the major source of scaling subsidies, but also treating delivery employees as contractors and charging both consumers and restaurants for a match. This is essentially the Uber model, applied to an adjacent vertical. It’s no coincidence Uber Eats is the major extension of the main Uber product.</p><p>How is <strong>venture capital </strong>paid back for the subsidies? Scale delivers billion dollar valuations and hundreds of millions of dollars in revenues. That opens doors to IPOs. Retail and professional investors buy out venture capital investors at a hefty premiums under a promise of further scale and valuation growth and even profitability (maybe). Amazon pioneered this model in early 2000s and it’s been working ever since for the ever-growing list of venture-backed unicorns.</p><p>How are <strong>delivery employees</strong> compensated? They aren’t, really. People get some income source, but they agree to a hard job with an underpayment compared to traditional jobs that have social security, pension and other benefits and protections. This agreement often comes from having very limited employment options.</p><p>What about <strong>consumers</strong>? Seems almost like a fair deal here. On one hand, it’s expensive — you have to pay the restaurant price, the delivery fee, and some tips to make it a bit more fair for the delivery guys. And you don’t get the full service from a restaurant you’ve paid to, and you miss on the social experience of dining out, and you risk getting the food in a not very consumable shape, because restaurants still have a hard time adjusting their menus to delivery conditions. But all that balances out if you believe you have better/more valuable things to do with your time while waiting for the delivery. And that’s apparently the case for more than 50 million Americans these days.</p><p>Finally, where do <strong>restaurants</strong> stand? This one is tricky. The promise of delivery marketplaces to the restaurants is very clear — get more customers and more revenues at no extra fixed cost. But the profitability of this new revenue streams is extremely opaque for the restaurants.</p><p>The scale of delivery marketplaces is the key here too: their huge operations and the need to at least break-even on an average delivery (which is hard to do on small checks) dictate high revenue share fees — up to 30% and sometimes even more. Marketplaces don’t know and, frankly, wouldn’t care how their fee structure affects restaurant profits.</p><p>Unfortunately, neither do most of the restaurants. Most of the delivery platforms claim that restaurants do not fully understand the concept of variable costs and that contribution margins after fees on their platforms are positive. But except for the largest chains, that have data infrastructure and data science teams to figure out contribution margins down to every menu position in every location, the rest of the restaurant industry is having another “Groupon Moment” - “Everybody’s doing it, my top line is growing, and that’s all that matters”. More often than not, as Groupon days clearly showed it before, earning a proportional extra profit from this growth is very hard.</p><p>Moreover, restaurants have no access to their delivery customers. Customer relationships and data are fully owned by delivery marketplaces. Restaurants have to compete blindly, passing their destiny on the platforms to algorithms that maximize revenues and fees for the marketplaces and, sometimes, for the their largest partners like McDonalds. The problem of misaligned incentives may become really big, as we all know well from the examples of Amazon and their suppliers or iTunes and the music labels.</p><p>Surely, <strong>restaurants can benefit</strong> from delivery revenue streams. They just have to properly address a bunch of complex business questions about their own operations, as well as delivery channels and their customer flows. For example, “What are the contribution margins of my menu items?”, “What are those margins after delivery fees?”, “What about margins from the brunch menu vs. dinner menu?”, “Are we cannibalizing high margin sales when people dine-in less often?”, “How are customer preferences on GrubHub different from Uber Eats?” With proper analytical tools available only to larger chains, it’s fair to assume that the gross delivery benefit of the restaurant industry as a whole is limited, if not neutral.</p><p>Restaurants can try to offload the burden to landlords by trying the new <strong>cloud kitchen</strong> model. No dine-in service means cheaper rent, less labor costs, no cannibilization, very limited waste and fraud, and stable menus optimized for delivery. But the new cost structure has almost the same net margins as the traditional one, because now delivery fees apply to all of your customers, not just a smaller portion of them. The true benefit is the ability to scale your operations much more easily, so that the dollar value of profits has a much higher potential. At the same time, the big caveat of the model is that a restaurant is not in full control of its destiny, when delivery platforms have both so much power over the business and misaligned incentives.</p><p>Another trick for the restaurants would be to <strong>build their own</strong> delivery operations. But that has its own obvious tradeoffs — doings things that are not in the core competence and are very hard to scale to meaningful ROI. A few players will be able to pull it off, sometimes merging it with the cloud kitchen model, but the approach doesn’t sound like a generic solution.</p><p>So this it then, we are looking at the same zero sum game — venture capitalists as a group make a lot of money by fueling companies that cater to the population obsessed with convenience. A few hundreds of people (founders and early employees of delivery companies) get rich along the way, hundreds of thousands get some additional cash to pay the bills. The rest of us are mostly paying for it and enjoying (hopefully) our growing productivity and/or leisure time.</p><p>Here at <a href="http://www.agnoris.com/">Agnoris</a> we try to improve the business outcomes for the restaurants. Hopefully others will step in and help find better solutions for delivery employees and consumers, so that the zero sum game transforms to a growing the pie game.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0958b91ba57" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to get fbprophet working on AWS Lambda]]></title>
            <link>https://medium.com/data-science/how-to-get-fbprophet-work-on-aws-lambda-c3a33a081aaf?source=rss-efbaf986388d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3a33a081aaf</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[lambda]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[fbprophet]]></category>
            <dc:creator><![CDATA[Alexandr Matsenov]]></dc:creator>
            <pubDate>Sat, 15 Sep 2018 12:41:35 GMT</pubDate>
            <atom:updated>2019-08-19T01:23:55.456Z</atom:updated>
            <content:encoded><![CDATA[<h4>Solving package size issues of fbprophet serverless deployment</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jwaqqgi5dBPVLZ66RyABpQ.jpeg" /><figcaption>Adi Goldstein / Unsplash</figcaption></figure><p>I assume you’re reading this post because you’re looking for ways to use the awesome fbprophet (Facebook open source forecasting) library on AWS Lambda and you’re already familiar with the various issues around getting it done. I will be using a python 3.6 example, but the approach is applicable to other runtimes as well as other large ML libraries. Without further ado:</p><ol><li>Install Docker locally. An alternative is to run a EC2 instance and copy files between the instance and local machine, which feels more complicated and less reliable to me.</li><li>Run a shell on a relevant Lambda image (take a look at <a href="https://github.com/lambci/docker-lambda#build-examples">lambci</a>) from the working directory with your code, that is supposed to run on Lambda (which has the lambda handler):</li></ol><pre>docker run --rm -it -v “$PWD”:/var/task lambci/lambda:build-python3.6 bash</pre><p>For an explanation of the commands used here go to Docker docs or <a href="https://medium.freecodecamp.org/escaping-lambda-function-hell-using-docker-40b187ec1e48">here</a>.</p><p>3. Create a virtual environment and install relevant packages:</p><pre>python3 -m venv venv<br>. venv/bin/activate<br>pip install --upgrade pip<br>pip install fbprophet --no-cache</pre><p>4. You can check if your code is working: python lambda_handler.py</p><p>5. Reduce the venv size to be below the 250Mb limit:</p><pre>pip uninstall -y matplolib</pre><pre>find &quot;$VIRTUAL_ENV/lib/python3.6/site-packages&quot; -name &quot;test&quot; | xargs rm -rf</pre><pre>find &quot;$VIRTUAL_ENV/lib/python3.6/site-packages&quot; -name &quot;tests&quot; | xargs rm -rf</pre><pre>rm -rf &quot;$VIRTUAL_ENV/lib/python3.6/site-packages/pystan/stan/src&quot;</pre><pre>rm -rf &quot;$VIRTUAL_ENV/lib/python3.6/site-packages/pystan/stan/lib/stan_math/lib&quot;</pre><pre>echo &quot;venv size $(du -sh $VIRTUAL_ENV | cut -f1)&quot;</pre><p>What happens here is that you’re getting rid of matplotlib (if you don’t need plotting), tests, and the pystan source codes (the heaviest part of the package). Last command displays the size of the venv, which should be below 250Mb.</p><p>6. Make sure your code is still working after the cleanup: python lambda_handler.py</p><p>7. Create a .zip to upload to Lambda:</p><pre>pushd $VIRTUAL_ENV/lib/python3.6/site-packages/</pre><pre>zip -r -9 -q /var/task/name_of_your_zip.zip *</pre><pre>popd</pre><pre>zip -9r name_of_your_zip.zip name_of_your_code_folder/</pre><pre>zip -9 name_of_your_zip.zip lambda_handler.py</pre><p>8. You now have a .zip in your working directory that you can use for Lambda. You can stop/quit Docker now — the zip will still be in your folder.</p><p>Additional resources:</p><p>Great post on preparing ML libraries for Lambda: <a href="https://medium.com/@maebert/machine-learning-on-aws-lambda-5dc57127aee1">https://medium.com/@maebert/machine-learning-on-aws-lambda-5dc57127aee1</a></p><p>The discussion on preparing fbprophet for Lambda: <a href="https://gist.github.com/CarstVaartjes/77dbe8249d171e592bd17847f7009272">https://gist.github.com/CarstVaartjes/77dbe8249d171e592bd17847f7009272</a></p><p>Reducing the size of scipy: <a href="https://gist.github.com/wrwrwr/4a38a17113e3845f3385e9388effc064">https://gist.github.com/wrwrwr/4a38a17113e3845f3385e9388effc064</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3a33a081aaf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/how-to-get-fbprophet-work-on-aws-lambda-c3a33a081aaf">How to get fbprophet working on AWS Lambda</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What defines bot success on messaging platforms?]]></title>
            <link>https://medium.com/swlh/what-defines-bot-success-on-messaging-platforms-6cdfa27f5925?source=rss-efbaf986388d------2</link>
            <guid isPermaLink="false">https://medium.com/p/6cdfa27f5925</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[messaging]]></category>
            <category><![CDATA[facebook-messenger]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[bots]]></category>
            <dc:creator><![CDATA[Alexandr Matsenov]]></dc:creator>
            <pubDate>Sun, 23 Apr 2017 11:57:56 GMT</pubDate>
            <atom:updated>2017-04-24T11:36:45.802Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Defines a Successful Bot on Messaging Platforms?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-1M7ArBfA20RQd9Mm2kJw.jpeg" /><figcaption>Thinking through “UI-use case” fit before jumping to code is critical for bot success</figcaption></figure><p>Recent F8 conference, where FB introduced new features of its Messenger platform in an attempt to re-ignite “<a href="http://www.theverge.com/2016/4/18/11422278/facebook-messenger-bots-david-marcus-interview">rocky roll-out</a>” and slow adoption, triggered my thinking about what would make bots more successful.</p><p>If you look at top-5 <a href="https://www.producthunt.com/topics/bots?order=most-upvoted">bots on Product Hunt</a>, 4 out of 5 will be platforms for building bots. The hype around bots, that started in 2016 with FB introducing bot-building API for Messenger, hasn’t materialized until now.</p><p>I see a few reasons for that.</p><p>First, the <strong>hype around natural language understanding</strong> (NLU) in voice/text interfaces as a substitute or universally better version of visual interfaces is misleading, see for example this <a href="http://ben-evans.com/benedictevans/2017/2/22/voice-and-the-uncanny-valley-of-ai">great post</a> by Benedict Evans with analysis of voice interfaces. It is simply not the case that texting or talking is universally more convenient than seeing and clicking. Think of any use case where you have to deal reach a decision through by analyzing multiple options, parameters and steps, for example finding the cheapest flight in the next 3 months, and what type of UI would be more convenient for you personally. Bandwidth of our vision is order of magnitude higher than of our typing, reading or hearing (see Moran Cerf’s <a href="http://28oa9i1t08037ue3m1l0i861.wpengine.netdna-cdn.com/wp-content/uploads/2018/04/WBW.png">data</a> from recent Tim Urban’s <a href="http://waitbutwhy.com/2017/04/neuralink.html#part4">post</a>).</p><p>Second, platform owners, be it <strong>Facebook</strong> with Messenger or Amazon with Alexa, intentionally or not, <strong>positioned bots to developers as a great AI vehicle</strong>. This positioning formed expectations of both developers and users that bots are sophisticated agents, capable of complex reasoning. Such perception was naturally driven by expectation of NLU capabilities of bots that are inherent for messengers and voice platforms. But it turned out that human level NLU in chatting contexts is extremely hard do develop, despite all great tools made available to developers, such as Wit.ai or Api.ai. It’s even harder to enable bots with true reasoning capabilities, that would account for quickly changing intents in real life conversations. In many options- and reasoning-heavy cases, when bots promise to be natural and convenient way to transact with businesses, they turned out to be impractical (see Kayak Messenger bot screenshot below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9sIDY_10yjTrBsH59iygAQ.png" /></figure><p>Moreover, in most of these cases user experience with bots is inferior to apps, where UI is manly in charge of clean visual representation of options, and is not scenario-dependent. Apps maybe a few extra clicks away from user’s current active flow, but it’s still worth switching to make an educated decision faster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HO5gnLIyJh6dcbLny8AoqA.png" /></figure><p>No doubts bots can work well in many complex cases, but development of a compelling bot is very hard. See, for example, Seth Rosenberg’s <a href="https://news.greylock.com/what-i-learned-from-launching-the-messenger-developer-platform-b6402f2e55bc">post</a>, revealing how much effort the first KLM bot required from the Messenger team. Anyone who tried to develop a bot with NLU elements knows, that even the most basic conversations require developing processing logic for a vast number of possible scenarios and that even then a very large chunk of real life user behavior will remain uncovered by bot’s logic. This is so much different from apps development, where a developer doesn’t have to think through all possible permutations of user’s actions. Facebook et al. democratized bot creation a great deal and users saw a flood of bots, but majority of bots remain low quality products (that deservedly don’t see traction) due to hardness of bot’s logic development.</p><p>Lastly, even for good bots their <strong>utilities</strong> will most probably be <strong>quite limited</strong>, leaving a lot of functionality to traditional apps. This is why better bots, for example <a href="https://epytom.com/">Epytome Stylist</a> on Messenger, are very transparent about bot’s functionality up front and leverage all possible platform tools to mix NLU with traditional visual interfaces.</p><p>Despite limitations and unimpressive start, I believe bots as a new UI platform has great potential for boosting revenue and efficiency of various businesses if leveraged in certain use cases. I’m thinking of 2 broad categories.</p><p>The first category is more consumer-oriented and relates to cases when a bot automates relatively simple actions that currently require users to do multiple app switches and clicks. I’m essentially talking about <strong>aggregation and streamlining of well-defined scenarios </strong>(“save me clicks”). Imaging you’re looking for a fastest/cheapest way to get from point A to point B. Your current routine could include looking at possible routes, traffic jams and travel time estimates in Google Maps/Waze/Moovit apps, than switching to Uber and/or Lyft to check for ETAs and prices and maybe even checking Zip Car availability or Weather app to make a decision on how to commute best. Worst part — you’re doing the same routine almost every time you need to commute. A single-function bot, provided with location information, could make this task much easier for your by just presenting you top-3 options (cheapest, fastest, most convenient) and executing your choice in “no questions asked” fashion. The first KLM bot, built in collaboration between KLM and Messenger teams, falls into this category.</p><p>If you’re working on a use case like that — ping me, maybe we could invest in your company. :)</p><p>The second category is more business-oriented. It is about <strong>automation of repetitive and relatively basic interactions between customers and businesses</strong> (if they are not automated already)— bookings, payments, FAQ answers retrieval etc. Aggregation may add additional value to consumers here, when a bot is also a UI aggregator across various providers (for example, buying movies tickets for any theater in town), but it is not a must. Many of current success stories of enterprise bots fall into this category with customer service functionality.</p><p>An important <strong>edge case</strong> in this category is when a bot is just a substitute for typing in a Google search request or an URL or simply looking at the home screen of an app.</p><p>In this case <em>conversing</em> with bots doesn’t add much value over common visual interfaces. Take for example hyped fintech bots for so called conversational banking, when you can ask bot for account balance. Your banking app is probably a much more convenient way to quickly get a snapshot of your finances and to make transactions — simply way less clicking!</p><p>An argument in favor of this edge case is that a bot can keep your current conversational context uninterrupted and save you the app switching effort. This was probably the rational behind <strong>extensions</strong> — an option to access some service providers functionality from your current conversation, that Facebook has just added to Messenger, following the move by iMessage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jZGqe2M50sanvgC9TQog0Q.png" /></figure><p>In many cases, e.g. OpenTable, extensions just open web pages from service’s web site in the Messenger shell.</p><p>Extensions are much less about conversational bots and NLU and much more about bringing traditional UI to <em>your</em> conversations seamlessly. In some cases the idea of inviting a third party to your conversation to do something may feel quite weird because that would interrupt the conversation flow. And sometimes, when it’s about content sharing or making a collective decision, e.g. sharing a song or ordering a take away for the team, it may feel natural and convenient.</p><p>Extensions can “save clicks” and be natural part of conversations. They can help Messenger become a more powerful ecosystem similar to WeChat. But one of the major bot challenges remains true for extensions — creating seamless mechanism for discovering a relevant bots is hard. Time will show if the “bot store” offered by Facebook solves the challenge. I’d personally love to see the evolution of the store from just a pop-up tab to a seamless in-conversation search engine, similar to the mentioning mechanism of messengers, e.g. add Spotify bot to a conversation by typing “@Spotify” or, more broadly, “@Music” for a default bot in the category.</p><p>As much as I’d love to see more progress in general AI and digital reasoning, it seems more likely that AI will keep developing in “verticals” — not just business verticals, but also tech verticals like object recognition in videos. This means that for bots/extensions to see real user adoption developers will need to 0) carefully think about bot value add vs. traditional channels 1) manage users’ expectations by being upfront and explicit about bot’s purpose, functionality and limitations 2) keep NLU functionality under tight control and 3) in many cases incorporate human handoff to bot flows. I see these conditions essential for building trust and true scaling.</p><p>Would love to hear your thoughts on the future of bots for messengers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6cdfa27f5925" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/what-defines-bot-success-on-messaging-platforms-6cdfa27f5925">What defines bot success on messaging platforms?</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>