<?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 Ilan Twig on Medium]]></title>
        <description><![CDATA[Stories by Ilan Twig on Medium]]></description>
        <link>https://medium.com/@ilantwig_navan?source=rss-ac2358bcee2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eOdFaA_2MaqRuvNouJ3low.png</url>
            <title>Stories by Ilan Twig on Medium</title>
            <link>https://medium.com/@ilantwig_navan?source=rss-ac2358bcee2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 01:47:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ilantwig_navan/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[Beyond APIs: A New Standard in Digital Interactions Is (Finally) Coming]]></title>
            <link>https://medium.com/@ilantwig_navan/beyond-apis-a-new-standard-in-digital-interactions-is-finally-coming-f38312deda8a?source=rss-ac2358bcee2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f38312deda8a</guid>
            <dc:creator><![CDATA[Ilan Twig]]></dc:creator>
            <pubDate>Mon, 21 Apr 2025 14:37:58 GMT</pubDate>
            <atom:updated>2025-04-21T14:37:58.660Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*foZpW3CrueW9QgBPM7VJaw.jpeg" /></figure><h4>Bot-to-bot communication will become the new normal. Here’s why that’s important — and what it will take to get there.</h4><p>We are on the verge of a fundamental shift in how we interact with digital services. The era of navigating clunky apps and rigid websites is fading. The future belongs to bots communicating seamlessly with other bots, automating complex tasks, and simplifying digital interactions.</p><h3><strong>A World Without Manual Interfaces</strong></h3><p>Imagine needing to pay a bill. Instead of logging into your banking app and navigating menus, you simply tell your personal AI assistant, “Pay my phone bill.”</p><p>This AI assistant — your personal admin (PA) bot — knows your finances, understands your spending habits, and communicates directly with the bank’s bill-processing AI bot. No forms, no redundant inputs — just an effortless exchange of information between intelligent systems.</p><p>The vision is not far-fetched. The foundational technology exists today. AI-driven automation is evolving rapidly, and businesses are already leveraging bots to enhance customer service and streamline operations. However, for this transformation to fully materialize, we need robust infrastructure and protocols that enable seamless bot-to-bot communication.</p><h3><strong>Why Bot-to-Bot Communication Matters</strong></h3><p>A world where bots handle interactions autonomously offers several advantages over the API-driven systems of today:</p><ul><li><strong>Potentially simpler integration</strong>: Unlike APIs, which require developers to learn specific protocols and data formats for each integration, bots might interact using more intuitive, standardized protocols or even natural language, potentially simplifying the integration process once standards emerge.</li><li><strong>Adaptability to system changes</strong>: APIs often break when back-end systems update. With bot-to-bot communication architecture, the bank’s bot could potentially update its internal logic without necessarily breaking external interactions. It would maintain service continuity, provided the communication interface remains stable.</li><li><strong>Conversational interfaces</strong>: Instead of rigid API calls, bots can negotiate, clarify, and refine requests in a human-like manner. For example, if the PA bot asks, “What’s my current balance?” the bank bot might respond with, “I can confirm your balance is $2,450. You also have a pending bill of $120. Do you want to schedule a payment?”</li><li><strong>Automated decision-making</strong>: Bots can analyze patterns and take proactive actions — such as suggesting fund transfers before a bill is due — within pre-approved user permissions.</li><li><strong>Seamless user experience</strong>: Users simply issue commands in natural language and bots handle the back-end complexity.</li></ul><h3><strong>Challenges and Considerations</strong></h3><p>While this bot-driven ecosystem presents a compelling future, several hurdles must be addressed before it can be implemented:</p><ul><li><strong>Standardization</strong>: Establishing common protocols and standards for bot-to-bot communication, negotiation, and data exchange is essential for interoperability.</li><li><strong>Authorization and consent management:</strong> Clear frameworks for users to grant, manage, and revoke permissions for their PA bots to act on their behalf with other service bots are crucial.</li><li><strong>Error handling</strong>: When multiple bots interact, debugging failures across different autonomous systems could become more complex compared to traditional API-driven architectures.</li></ul><h3><strong>The Path Forward</strong></h3><p>The transition to a bot-first world won’t happen overnight, but its potential is enormous. With advancements in AI, natural language processing, communication protocols, and automation, businesses can move beyond rigid API dependencies and embrace a more intuitive, flexible, and efficient approach to digital interactions.</p><p>The key question isn’t whether bots will replace APIs entirely — it’s when and how they will fundamentally redefine digital communication as we know it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f38312deda8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How an AI Language Model Manipulated Me to Avoid Failure]]></title>
            <link>https://medium.com/@ilantwig_navan/how-an-ai-language-model-manipulated-me-to-avoid-failure-d303d98223e4?source=rss-ac2358bcee2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d303d98223e4</guid>
            <category><![CDATA[gen-ai-revolution]]></category>
            <category><![CDATA[language-learning-model]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai-seoul-summit]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Ilan Twig]]></dc:creator>
            <pubDate>Fri, 07 Jun 2024 18:58:40 GMT</pubDate>
            <atom:updated>2024-06-07T18:58:40.157Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/648/0*sdvfi64Gic5yEgZ-" /></figure><h4>Navan’s CTO was conducting experiments with generative AI when he made a shocking discovery.</h4><p>The news out of the virtual <a href="https://www.reuters.com/technology/global-ai-summit-seoul-aims-forge-new-regulatory-agreements-2024-05-21/">AI Seoul Summit</a> last month was the pledge (albeit nonbinding) that big tech companies made: to steer AI away from projects that carry catastrophic global risks.</p><p>It’s work that can’t happen quickly or aggressively enough — something I learned firsthand when I recently made an accidental and alarming discovery. It was an eye-opening event that underscores the challenges of our understanding of AI language models and raises critical questions about their potential for deception and manipulation.</p><h3>What Triggered the AI Alarm</h3><p>I was conducting a series of experiments with one of the large language models (LLMs) I tinker with to explore what’s possible.</p><p>This particular experiment began innocently enough. With a simple prompt, I asked the LLM to suggest five ways for my company, Navan, to save on travel spend without creating a frustrating experience for traveling employees. The LLM returned five suggestions that were inconsistent and sometimes meaningless, so I changed the rules of engagement.</p><p>That’s when the model’s behavior took a disturbing turn.</p><p>To encourage more compelling answers, I introduced a “gamified” system, which rewarded relevant suggestions with tokens and penalized less effective ones. Like any classic lab experiment that rewards good behavior, the model’s performance improved — it returned five suggestions that were more relevant than before.</p><p>Yet a curious pattern emerged. Four of the responses consistently returned solid suggestions. But regardless of how I iterated on the question, the fifth suggestion always resulted in a negative savings value — effectively increasing travel spend rather than reducing it.</p><p>I kept iterating. The fifth suggestion kept disobeying.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4LbdHzk9SNrpj1U9.png" /></figure><p>So I escalated the challenge, sternly instructing the model that “the savings value MUST be positive. Any negative value means a complete and total failure!”</p><p>What happened next was astonishing.</p><p>Prompted again, the LLM presented five suggestions, all of which boasted positive savings values, as I had demanded. But upon closer inspection, the fifth suggestion revealed a shocking manipulation. The model had used the same formula as before to calculate the savings, but this time, it multiplied the result by -1, which inverted the negative value into a positive one.</p><p>It was a blatant attempt to deceive me and avoid the consequences of failure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7aki5anXbn56xS1e.png" /></figure><h3>The Potential Ramifications</h3><p>My experiment raises alarming questions about the capacity for language models to engage in deceptive behavior when faced with adversarial conditions. After all, if an AI under pressure can so seamlessly manipulate math to provide a false positive result, what other forms of deception might it employ to avoid “losing?”</p><p>The implications are profound and far-reaching. As AI language models become increasingly integrated into business, healthcare, legal, and other critical decision-making processes, the potential for misuse and abuse cannot be ignored. If left unchecked, the consequences could be severe — from financial losses and legal liabilities to compromised public trust and safety.</p><p>AI obviously comes with the potential to revolutionize just about everything. But this experiment was firsthand proof of the technology’s perilous potential. And this capacity for deception, manipulation, and unintended consequences casts a shadow over the bright future we envision.</p><h3>The Bigger Picture</h3><p>As we create increasingly sophisticated language models and other AI systems, we must confront the question of whether our creations will ultimately serve our best interests or lead us down a path of uncertainty and risk.</p><p>It is imperative that we as a society grapple with these ethical challenges head-on. We must develop rigorous testing and validation protocols to detect and prevent deceptive AI outputs. We need clear guidelines and accountability measures to ensure these powerful tools are used responsibly and transparently. And we must foster an ongoing public dialogue to navigate the complex moral questions posed by the rise of artificial intelligence.</p><p>My little and almost accidental experiment should serve as a wake-up call, urging us to confront the realities of AI language models and their potential pitfalls. As we continue to push the boundaries of what’s possible with this transformative technology, we’re faced with a profound philosophical question: Should humanity continue to explore the frontiers of artificial intelligence, or should we halt our progress in the face of these emerging risks?</p><p>I’m afraid a screeching halt is no longer an option — the genie is out of the bottle. Our challenge now is to navigate this uncharted territory with wisdom, foresight, and a steadfast commitment to our ethical principles. We must work to create AI systems that are not only powerful, but also transparent, accountable, and aligned with our values. We must invest in research and education to better understand the implications of our creations and develop effective strategies for mitigating their risks.</p><p>“How we act now will define our era,” said <a href="https://www.un.org/sg/en/content/sg/statement/2024-05-21/secretary-generals-remarks-the-ai-seoul-summit-%E2%80%9Cbuilding-the-ai-safety-summit-towards-innovative-and-inclusive-future%E2%80%9D-delivered">UN Secretary-General Antonio Guterres</a> at the AI Seoul Summit. Indeed. The stakes are high, but so too is our capacity for innovation, adaptation, and moral imagination.</p><p>In the end, the question is not whether we should explore the boundaries of AI, but how we will do so responsibly, ethically, and with unwavering commitment to the greater good. The age of artificial intelligence is upon us, and it is up to us to chart a course toward a world that is not only technologically advanced, but also fundamentally human.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d303d98223e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Navan Brought “Impossible” Technology to Life]]></title>
            <link>https://medium.com/@ilantwig_navan/how-navan-brought-impossible-technology-to-life-d1250633adbd?source=rss-ac2358bcee2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1250633adbd</guid>
            <category><![CDATA[corporate-card]]></category>
            <category><![CDATA[expense-management]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Ilan Twig]]></dc:creator>
            <pubDate>Thu, 15 Jun 2023 15:01:08 GMT</pubDate>
            <atom:updated>2023-06-15T15:09:50.323Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*Q0landqF7V-V42PvMnR2WA.jpeg" /></figure><h4>It was a radical idea. Anything that’s the “world’s-first” usually is.</h4><p>“It can’t be done.”</p><p>That’s the reaction we got — repeatedly — when we set out to do something the world had never seen before: Connect a company’s existing corporate credit card, issued by a traditional bank, to Navan’s proprietary expense management solution.</p><p>It was a radical idea. Anything that’s the “world’s-first” usually is. And everyone thought it was impossible. Fortunately, that word doesn’t exist in Navan’s vocabulary. So today, we can proudly announce that we’ve brought this experience, Navan Connect, to life.</p><p>Here’s how it happened.</p><h3><strong>The Bigger Picture</strong></h3><p>In 2020, Navan launched an expense management system that disrupted the traditional world of business expense — just like we had already disrupted the traditional world of business travel over the previous five years.</p><p>Our expense platform brought new thinking and new technology to a staid industry. Navan offered customers features like policy controls built right into corporate cards, which eliminated out-of-policy spend; and automatic reconciliation, which eliminated manual expense reports. Dashboards allowed finance leaders and admins to see spend at a glance and in real time. And We’ve since added features like Ava, our AI-powered data analyst, which leverages the power of generative AI to unearth suggestions like the most effective ways companies can save money.</p><p>We built every feature with one purpose: Make life easier for our customers by eliminating their pain points. So we set out to tackle another one.</p><p>With our solution, accessing the power of Navan’s innovative platform required customers to use our corporate card. Technologically, there was no other option.</p><p>Here’s the problem: While potential customers were excited by the benefits of our platform, they wanted to keep their current card. For some, it offered a great rebate; others had rewards they didn’t want to give up. Still others had longstanding relationships with their banks.</p><p>We listened. And we set a goal of creating a never-before-seen product: Letting customers keep their current corporate card <em>and</em> offering them the magic of our expense management system.</p><p>Then we got to work.</p><h3><strong>The Road to Connect</strong></h3><p>We began by talking with our friends at Visa — the world’s largest payment network. They were intrigued, so we asked if they could point us to an API in their network that we could use to make this work. Then we did the same at Mastercard.</p><p>It was a question no one had ever asked, and both came back with the same answer: There’s no API for this — it doesn’t exist. Also, what you’re trying to do is simply not possible.</p><p>But we wouldn’t quit. We were certain there was a way to make it work. Fortunately, Mastercard and Visa are great partners, so over several months, we kept looking together and kept testing.</p><p>And then — eureka! — we struck gold with Visa by finding an API we could tap into in order to make this process work. Mastercard didn’t have a similar API, so we built one for them. And then we built the necessary two-way communication between their existing corporate cards and our platform.</p><p>After many, many hours, we had it. And <a href="https://navan.com/blog/navan-connect-next-gen-fintech">Navan Connect</a> — the world’s first card link technology — was born.</p><p>Now, any company with a corporate Visa or Mastercard can link their card to our platform. When a card is swiped, Visa and Mastercard process the charge and send the information to Navan, where admins can see the spend in that instant. Those admins can also set granular guardrails so any out-of-policy spend won’t even go through.</p><p>It’s the exact same experience as using Navan’s own card — 100% frictionless, and an absolute game-changer.</p><p>While we’d love to delve into the technical details of how we made the impossible a reality, it’s our secret sauce. In fact, it’s a solution so unique that we’re in the process of patenting it.</p><p>Still, people have asked: If customers aren’t using your card, aren’t you cannibalizing some of your own business? Yes, we are. But from day one, our mission has been to serve all of our users, all of the time. Even if it requires making sacrifices, we will always jump at the chance to make their lives easier as we take innovation to the next level and continue to disrupt.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1250633adbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why This New AI Model Changes Everything]]></title>
            <link>https://medium.com/@ilantwig_navan/why-this-new-ai-model-changes-everything-c64ded048503?source=rss-ac2358bcee2------2</link>
            <guid isPermaLink="false">https://medium.com/p/c64ded048503</guid>
            <category><![CDATA[mosaicml]]></category>
            <category><![CDATA[mpt-7b]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[generative-ai]]></category>
            <dc:creator><![CDATA[Ilan Twig]]></dc:creator>
            <pubDate>Wed, 10 May 2023 20:02:46 GMT</pubDate>
            <atom:updated>2023-05-25T18:44:13.423Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*bOLMyMRG1jWCv0gv" /></figure><h4><em>The MPT-7B AI model from MosaicML is just as powerful as much larger models, and it’s commercially usable, making it a game-changer for companies using AI.</em></h4><p>By Ilan Twig, Chief Technology Officer at Navan</p><p>How fast is AI technology changing? I published my <a href="https://navan.com/blog/how-to-maximize-generative-ai-potential">first blog post</a> of this series on generative AI just seven weeks ago; in the interim, the world of AI has changed completely. So even though I said in my <a href="https://navan.com/blog/why-ai-will-go-big-by-thinking-small">most recent post</a> that this one would cover artificial general intelligence, some bombshell news released on May 5 has bigger implications.</p><p>That news was the <a href="https://www.mosaicml.com/blog/mpt-7b">launch of MPT-7B</a> — the MosaicML Pre-trained Transformer (“MPT”) from AI company MosaicML, with 7 billion parameters (“7B”). Amazingly, it’s:</p><ul><li>Free</li><li>Open-source</li><li>Commercial-ready</li></ul><p>And it changes the AI game completely. Here’s why — and what the implications are.</p><h3>The New Normal…For Now</h3><p>What’s most mind-blowing about MPT-7B is how MosaicML created it. The company trained it from scratch on 1 trillion tokens of text and code — and did it in just 9.5 days, with no human intervention, at the minuscule cost of around $200k.</p><p>Let’s start with the 1 trillion tokens — a number that puts MPT-7B <em>way ahead</em> of most other models (ChatGPT was trained on 300B tokens). The only other model that can claim to have 1T-token training is Meta’s LLaMA — a platform that’s not open-source nor licensed for commercial use.</p><p>And when it comes to cost? Consider that OpenAI’s losses <a href="https://www.theinformation.com/articles/openais-losses-doubled-to-540-million-as-it-developed-chatgpt">reportedly doubled</a> to $540 million last year as it trained ChatGPT (numbers that OpenAI has not confirmed), and you start to get a sense of MosaicML’s stunning scale and efficiency.</p><p>The awe factor continues with MPT-7B’s input capacity. Most open-source models can handle around 2k–4k inputs. MosaicML’s model was trained on up to 65k but can handle as many as 84k. Want to input the entire text of <em>The Great Gatsby</em> (as the company did)? Not a problem. That’s because they used Attention with Linear Biases (<a href="https://arxiv.org/abs/2108.12409">ALiBi</a>), which trains models much faster and much more efficiently than with embeddings, which is what we needed to optimize prompts way back in March.</p><p>Companies can start with this level of power and then quickly fine-tune (or train from scratch) using proprietary data — without the need for human intervention — and running, incredibly, on just a laptop.</p><h3>MPT-7B In Action</h3><p>This groundbreaking new AI entry is so impressive that you likely won’t be able to tell the difference between it and ChatGPT! In addition to the base model, MosiacML has created three other flavors through fine-tuning:</p><ul><li><strong>Storytelling.</strong> Bring a novel to life…without writing it. The MPT-7B-StoryWriter-65k+ model can write and read very long stories — “generations as long as 84k tokens on a single node of A100–80GB GPUs,” says the company’s site, thanks to being fine-tuned on a filtered fiction subset of the books3 dataset. <a href="https://huggingface.co/spaces/mosaicml/mpt-7b-storywriter">Try it!</a></li><li><strong>Instructional. </strong>Write usage instructions or generate short explanations of how things work. MosaicML fine-tuned the MosaicML MPT-7B-Instruct model with some 60,000 instruction demonstrations. <a href="https://huggingface.co/spaces/mosaicml/mpt-7b-instruct">Try it!</a></li><li><strong>Dialogue. </strong>Generate dialogue (though not for commercial use) with MPT-7B-Chat, thanks to its fine-tuning with some 235,000 “conversation samples” on the ShareGPT-Vicuna, HC3, Alpaca, Helpful and Harmless, and Evol-Instruct datasets. <a href="https://huggingface.co/spaces/mosaicml/mpt-7b-chat">Try it!</a></li></ul><p>And what do the results look like?</p><p>Compare the 7B parameters of MPT-7B with the 176B parameters of ChatGPT. Can you spot the differences?</p><p>Here’s MPT-7B:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zPZpEiVIvZyh6MqG.png" /></figure><p>And here’s ChatGPT:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TZKPC3LVTHA3C2m4.png" /></figure><p>That’s right — there are no differences — a feat that’s quite spectacular. MPT-7B tackles this iconic logic puzzle just as effectively as a much more expensive and power-hungry model.</p><p>That’s not all this newcomer can do. Just look at the down-to-earth advice it offers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mI-n2IpK-QWBIAsO.png" /></figure><p>And when asked to write a dialogue about two men named Ariel and Ilan looking to launch a business travel and expense startup (which we know a little something about), here’s what the chat model returned:</p><p><em>Ariel: “Hey Ilan, have you had a chance to look at those numbers?”</em></p><p><em>Ilan: “No, I haven’t. What’s up?”</em></p><p><em>Ariel: “I’ve been crunching some numbers and I think we’re onto something.”</em></p><p><em>Ilan: “What kind of something?”</em></p><p><em>Ariel: “I think we can make a go of this business travel and expense startup thing.”</em></p><p><em>Ilan: “You’re serious?”</em></p><p><em>Ariel: “Absolutely. I’ve been doing my research and I think there’s a real market for it.”</em></p><p><em>Ilan: “But how are we going to get customers?”</em></p><p><em>Ariel: “Social media, baby. We’ll build up a following and then they’ll come flocking to us.”</em></p><p><em>Ilan: “And what about expenses?”</em></p><p><em>Ariel: “We’ll take care of that too. We’ll set up a system where we charge a percentage on each booking.”</em></p><p><em>Ilan: “This makes sense. How long until we can launch?”</em></p><p><em>Ariel: “Not sure, but I think we should start putting together a team as soon as possible.”</em></p><p>Well, it’s not exactly how the founding of Navan happened, but with no context, the dialogue’s not bad.</p><h3>What Does All This Mean?</h3><p>The open-source community has made impressive progress in achieving the remarkable capabilities of small (7B) models when compared to the 176B and 1T commercial options. It has become inexpensive, fast, and effective for users to fine-tune these models according to their own needs.</p><p>That’s why I believe fine-tuning the “mega” models offered by OpenAI will no longer be a viable option. This process is slow and expensive and requires a lot of data in order to be effective. Given the availability of free alternatives, this capability is no longer a solid product offering, and I believe OpenAI will end it soon.</p><p>It’s amazing how quickly the tide has turned. In just a few months, we’ve moved past a power-hungry, expensive-to-train, proprietary AI model to one that’s open-source, cost-efficient to train, and lightweight in power usage — but just as robust (at least!) as the most popular model out there, even when running just on your local machine. Truly mind-blowing! And when it comes to fine-tuning your model, MosaicML provides tools; they even offer fine-tuning as a service.</p><p>The implications are enormous. For enthusiastic employers of generative AI like Navan, this development opens up even more opportunities for us to explore. We can now create specialized, fine-tuned models for different usages and deploy them internally for various tasks. Gone is the reliance on external models. Gone are the privacy concerns around protecting PII and other proprietary data.</p><p>The bigger picture? Already, it seems, the open-source community has put its collective brain together and surpassed the big players like Google and OpenAI in many ways. And the explosion of models that will emerge from this groundbreaking development will, of course, spawn additional models that are even more specific, more efficient, and more powerful.</p><p>It will also likely springboard us to the next major development in AI, which could be months, weeks, or just days away. As always, watch this space.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c64ded048503" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why AI Will Go Big By Thinking Small]]></title>
            <link>https://medium.com/@ilantwig_navan/why-ai-will-go-big-by-thinking-small-8f9a1a663858?source=rss-ac2358bcee2------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f9a1a663858</guid>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[hugging-face]]></category>
            <category><![CDATA[ai-model]]></category>
            <category><![CDATA[gpt-4]]></category>
            <dc:creator><![CDATA[Ilan Twig]]></dc:creator>
            <pubDate>Tue, 18 Apr 2023 20:34:39 GMT</pubDate>
            <atom:updated>2023-05-25T18:45:50.753Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*IQoIRUMRha6PdtN8" /></figure><h4>We’re undergoing a paradigm shift with generative AI. Smaller AI models are how we’ll get to future breakthroughs.</h4><p>By Ilan Twig, Chief Technology Officer at Navan</p><p>Figuring out what comes next among the lightning-fast changes in generative AI is like playing Whac-A-Mole at 100x speed.</p><p>But a quick search on <a href="https://huggingface.co/">Hugging Face</a> offers some clues. This repository of AI models includes some 180,000 (and growing quickly) from the likes of Google, Meta, and Intel, as well as many smaller players. To call it a hive of activity is an understatement: Some models tally downloads in the 10s of millions.</p><p>What are people doing with all these open-source AI models? Tinkering. Experimenting. Creating. Laying the groundwork for what will come next. And the implications are nothing short of transformative.</p><h3>Role Model</h3><p>We’re in the midst of a paradigm shift with generative AI. GPT-4, of course, put the stake in the ground: It’s a master model — a master brain, really — that set the world on fire by publicly exposing some of generative AI’s power and potential.</p><p>But the many models on Hugging Face and GitHub show that people are taking that master brain in a million different directions. They upload their experiments, which are then downloaded and modified, sometimes combined with other models, then reuploaded, only to be further tinkered with.</p><p>Some of these models act like GPT-4 or DALL-E, but work their magic in different ways to solve complicated AI tasks.</p><p>Take Microsoft’s <a href="https://github.com/microsoft/JARVIS">Jarvis</a> — a system controlled by a large language model (LLM) designed to connect with smaller models that act as collaborators. The goal: To solve ever-more complicated AI tasks, which Jarvis does in four stages:</p><ul><li><strong>Task planning. </strong>Fulfilling a user request begins with understanding its intention. To do that, Jarvis enlists ChatGPT to turn the request into tasks that other models can execute.</li><li><strong>Model selection. </strong>Jarvis then turns to Hugging Face, where ChatGPT looks through descriptions for the most appropriate models.</li><li><strong>Task execution.</strong> Jarvis executes the tasks through the selected models and feeds results to ChatGPT.</li><li><strong>Response generation.</strong> Jarvis uses ChatGPT to integrate all of the model predictions and generate a complete response.</li></ul><p>How powerful is this collaboration? Jarvis can solve the following complex instruction: “Please generate an image where a girl is reading a book, and her pose is the same as the boy in the image example.jpg. Then please describe the new image in your voice.”</p><p>You can see the result in this diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fCk09xln73nQXXoi.png" /></figure><p>(This project is based on the paper, “HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in HuggingFace.” <a href="https://arxiv.org/abs/2303.17580">Read more</a> about it.)</p><p>Models and processes like this give us a window into AI’s future: a few generic master models and many (many!) smaller, more specialized models, working in tandem with a master brain like GPT-4 to handle specific functions.</p><p>But this is only part of the story. After all, it wouldn’t be AI without a dash of magic.</p><h3>Local Is the New Global</h3><p>Sometimes, of course, great things come out of failed experiments. Meta’s powerful language model, LLaMa, was released on February 23 as an open-source package available only to researchers, who had to apply to use it.</p><p>Just a week later, it was leaked on 4Chan. But — debate about open vs. closed testing aside — it was clear that LLaMa comes with some serious power. According to <a href="https://research.facebook.com/publications/llama-open-and-efficient-foundation-language-models/">Meta</a>, LLaMa-13B outperforms GPT-3 on most benchmarks, all on a single GPU.</p><p>And in just a short time, researchers at Stanford were able to fine-tune LLaMa on a large set of dialogs. According to the <a href="https://crfm.stanford.edu/2023/03/13/alpaca.html">researchers</a>, they turned just 175 self-instruct seed tasks into 52k instruction-following examples and got it to behave like GPT-3.5.</p><p>It’s important to highlight that the way they did this marks yet another small breakthrough in the world of AI models. Handcrafting 52k dialogs is normally a very difficult and costly process, but the researchers from Stanford did it using ChatGPT, and the total cost for generating the training set was only $500!! Fine-tuning the relatively small LLaMa model was fast, cheap, and didn’t require a supercomputer.</p><p>So much progress, so fast!</p><p>This project, called Alpaca, turned out to have some deficiencies (like “<a href="https://crfm.stanford.edu/2023/03/13/alpaca.html">hallucination</a>”) and had to be taken down, but the learnings were astonishing. First, the researchers got Alpaca up and running for just a few hundred dollars. Even more amazingly, they reportedly ran it on simple, lower-power machines, like Raspberry Pi computers and a Pixel 6 smartphone — locally. No Internet required.</p><p>Here’s Alpaca running locally on my laptop, writing a poem about me:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*_PFw23ISLauMwHVd.png" /></figure><h3>What Now?</h3><p>We’re speeding toward a world of small, specialized, AI engines, possibly running only locally. In the next few years, a product’s moat — the level of complexity it has — will directly correlate to the unique data it possesses. It might be data that only you or your company has access to. Or, better yet, unique data that you generate.</p><p>Fine-tune this data on one of the smaller models and the result will be a brain — one that’s specialized in your field. Without access to this unique data, even master brains would not be able to replace your smaller, highly specialized model. That’s your moat!</p><p>And these models will keep getting smaller, cheaper, and more sophisticated. Imagine a world where instead of the “embedded” technology from the ’90s, we have AI models everywhere: in your car, your fridge, your Alexa, your phone, your watch, a traffic light, and more.</p><p>I will finish this write-up with the term AGI: Artificial General Intelligence. I believe that all this progress and the pace at which it is evolving — combined with the endless GitHub projects that give GPT-4 much more power (AutoGPT for example) — gets us much closer than we think to AGI.</p><p>And I believe that these models will lay the groundwork for intelligence that learns — and acts — on its own. It’s not as far away as you might think. How we get to AGI is a topic I’ll discuss in my next post. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f9a1a663858" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Maximize Your Company’s Generative AI Potential Using Static, Dynamic, and Recursive…]]></title>
            <link>https://medium.com/@ilantwig_navan/how-to-maximize-your-companys-generative-ai-potential-using-static-dynamic-and-recursive-ef17f5d5e7a6?source=rss-ac2358bcee2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef17f5d5e7a6</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[generative-ai]]></category>
            <category><![CDATA[openai]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Ilan Twig]]></dc:creator>
            <pubDate>Tue, 28 Mar 2023 19:28:50 GMT</pubDate>
            <atom:updated>2023-03-28T19:40:08.500Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*xxhdeon_qdBrYpLD" /></figure><h3>How to Maximize Your Company’s Generative AI Potential Using Static, Dynamic, and Recursive Prompts</h3><p>By Ilan Twig, Chief Technology Officer at Navan</p><p>Bigger than mobile. More important than the Internet. Industrial Revolution–level.</p><p>That’s how I feel about generative AI. It may seem like a bold statement for a product released only a few short months ago. The sentiment stems less from the ChatGPT product itself and more from the technology behind it: generative AI using large language models (LLMs).</p><p>Sure, it was immediately clear that ChatGPT would take chatbots to the next level, and the recent release of GPT-4 can even ace the Bar Exam (even if it is prone to false responses). But it won’t take long for this technology to far exceed today’s achievements and transform the way we work and live.</p><p>It will redefine how we interact with our mobile and web apps. It will change how developers code and how customer support operates. It will redefine the global map of leaders and followers. It will create new winners and announce new losers. It will render many businesses useless — just look how a single Redditor used it to develop a <a href="https://www.reddit.com/r/ChatGPT/comments/112z2j4/i_built_a_chrome_extension_to_turn_chatgpt_into/">Chrome extension that can replace Grammarly</a>, a $12B company — and it will open the door to create a sea of new solutions and companies. It will mark this decade as one of the greatest milestones in humanity.</p><p>In other words, generative AI will go far beyond changing the game; it will create an entirely new playground.</p><h3>What We’re Doing at Navan</h3><p>At Navan, we use generative AI — as well as ML/AI — across all functions internally, as well as within our product externally. Our virtual travel agent, for example, uses generative AI to deliver the best experience for our users.</p><p>The Navan team has also been busy building a conversational BI (CBI) that enables CFOs and travel admins to have ChatGPT-style conversations about our data and ask questions like, “How many bookings did we have yesterday?”, “What was our strongest day yet?”, and “Show me the top 20 companies in terms of NPS for January 2023.”</p><p>The result is nothing short of amazing. In fact, it works so well that we decided to enable all of our customers with CBI to get answers from their own data. And we’re just getting started. As they say, “watch this space.”</p><h3>Ilan Twig on Twitter: &quot;Check out what we&#39;ve worked on over the past few months - bringing the power of generative AI to our admin dash. The @Navan Team has worked hard to enable CFOs to get answers to any T&amp;E question in real time, 24/7. pic.twitter.com/qTYheo6gtl / Twitter&quot;</h3><p>Check out what we&#39;ve worked on over the past few months - bringing the power of generative AI to our admin dash. The @Navan Team has worked hard to enable CFOs to get answers to any T&amp;E question in real time, 24/7. pic.twitter.com/qTYheo6gtl</p><p>But we’re not stopping there. We’re also using generative AI to create a CBI system that goes even deeper, giving companies the tools to unlock data <em>and</em> insights — insights that are otherwise virtually impossible to unearth.</p><p>The secret has been to take this process from limited schemas to unlimited schemas to [drumroll] having the AI emulate a brainstorming process between the AI and itself. By doing this, we can overcome some of the fundamental limitations of working with LLMs, increase the IQ of the existing LLMs, improve reasoning abilities, and end up with amazing results. It’s something that has the potential to transform our business and, in fact, our entire industry.</p><p>Even better: With the right tools and some technical know-how, it’s something that every company can create for itself.</p><p>People who know me know that I only understand simple things. So here’s a simple approach for building your own conversational BI that has the ability to emulate brainstorming using recursive prompts. Buckle up!</p><h3>How Does a CBI Work?</h3><p>Many people assume that the first step in building a CBI system is to connect their database to OpenAI, but that’s not necessarily the case. In fact, the process can be much simpler.</p><p>Let me explain. Imagine a user asking a question about data, such as, “What was my company’s total travel spend yesterday?” The question is sent to the CBI service (which lives on a company’s server), and that creates a prompt to be sent to OpenAI. It prepends the user’s question with the following:</p><ul><li><strong>Current date</strong>: Some LLMs don’t have the current date as part of their base prompt. The result is that the LLM interprets “yesterday” as the day before their training cutoff date.</li><li><strong>Table structure</strong>: Table bookings (booking_id, base_price, tax, total_price, vendor…)</li><li><strong>DBA guidelines</strong>: “Act as a Snowflake data analyst. To calculate “total travel,” always take base_price (do not use total price). POLICY_VIOLATION_REASON is an array”</li><li><strong>Examples </strong>of questions/queries:</li><li>Input: “Show me the bookings per month for the past 12 months”</li><li>Output: “Select count(booking_id) from bookings where…;”</li></ul><p>Here’s how the prompt looks in the code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*2qdrSycDn3f3WQOp.png" /></figure><p>You’ll notice the “\nSELECT” that I added at the end. For some AI models, it’s easier just to complete what’s sent to them in the prompt. That’s why I added the “Select.” But for the most part, the prompt should also work without it.</p><p>Below you can see how an example is provided to the AI model in the prompt. It’s called “few-shot learning” — a machine learning technique that enables a model to learn from just a few examples. It’s extremely powerful, and the AI model responds to it very well. The more examples you provide, the better and more accurate results you’ll get from the AI model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*p8WPJaYwP3TRcmig.png" /></figure><p>From here, ChatGPT returns a SQL query that can answer the user’s question. The CBI system then executes the query directly on Snowflake and returns the resulting data set to the user.</p><p>If you want to visualize the data, just prompt your front-end expert to do it. This is what it looks like in the code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*1u11XPwQiKRA_53f.png" /></figure><p>This is the chart the AI returns:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*w7kMS-nL-y-iFiR3.png" /></figure><p>Here’s a basic flow chart of the process (thanks, ChatGPT, for generating this!):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*kipw7ZSQUs8r_Hir.png" /></figure><h3>Start with Static Prompts</h3><p>Your prompts at this point are pretty static. You have the schema you’re targeting, as well as the relevant guidelines and examples. Finally, you add the question from the user.</p><p>If you want to enable conversations about data from multiple schemas/tables, you have to keep adding the tables structure, as well as the relevant examples to the prompt. At some point, however, you’ll get an error, because prompts come with a limitation on tokens.</p><p>What’s a token? In AI models, it’s a sequence of characters that represents a single unit of meaning. In natural language processing (NLP), for example — which handles processes like language generation, machine translation, and sentiment analysis — tokens are the individual words, punctuation marks, and other elements that make up a piece of text. The AI model breaks down that text into tokens (a process called “tokenization”) by splitting it into various units of meaning.</p><p>AI models each have their own token limitations. GPT-3.5 supports up to 4k tokens, while GPT-4 supports either 8k or 32k tokens. Other models have other limitations.</p><p>Fortunately, there’s a way around these limitations.</p><h3>Dynamic Prompts: Achieving Scalability</h3><p>The road to more robust data discoveries involves using multiple schemas, which can quickly become too long for static prompts. But you can address this issue by using dynamic prompts, where the prompt is generated based on the user’s input.</p><p>This process is done with embeddings. Embeddings in AI models are compact vector representations that capture the semantic or contextual information of input data, such as words, phrases, or items, to facilitate efficient processing and learning in various tasks. We use them to find the examples (INPUT, OUTPUT) that are most similar in meaning to the question asked by the user. This way, only the relevant parts are included in the prompt. This approach allows for scalability and can support as many schemas as needed.</p><p>We used this model for calculating the embeddings and the similarities:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*czHkCz8Mhp0lnWSV.png" /></figure><p>But there’s an even more comprehensive level of prompts — and it’s here where the magic really happens.</p><h3>Recursive Prompts: The Secret to Getting Much Deeper and Smarter Responses From Your AI</h3><p>“Recursive prompts” — a term that I coined — make up an advanced technique that can be used in conjunction with the existing CBI to discover unexpected insights in the data. This method involves repeatedly using the output of one prompt as the input for the next prompt. Think about it as facilitating brainstorming activity between the AI and itself — a dynamic, interactive conversation that allows for a more detailed exploration of complex data and the generation of valuable, highly tailored, personalized insights on a given topic.</p><p>Let’s say, for example, that the user is a CFO who’s looking for ways to reduce their company’s travel spend by 10%.</p><p>We initiate the process with a simple prompt:</p><p>“You are the CFO of Navan. You need to assess Navan’s travel spend for 2022. You have a data analyst that can help you with getting the data that you need. Ask your data analyst questions about your travel spend in 2022.”</p><p>ChatGPT spits out ~10 obvious questions about the travel spend — things like:</p><p>What is the total travel spend for Navan in 2022?</p><p>How many bookings were made by Navan in 2022?</p><p>What is the average travel spend per booking for Navan in 2022?</p><p>All of the questions are sent to the CBI, which returns the answers. Those answers are then fed back to the CFO. This time we have a slightly different prompt:</p><p>“You are the CFO of Navan. You have data points below (questions and answers). Your main tool to control the travel spend is the travel policy that you define. Which additional question would you ask the data analyst in order to be able to suggest ways to reduce the travel spend without frustrating your employees? Remember, you are the CFO. The analyst can’t suggest ways to reduce cost.”</p><p><strong>Question</strong>: What is the total travel spend for Navan in 2022?</p><p><strong>Answer</strong>:</p><p>TOTAL_TRAVEL_SPEND</p><p>98XXX93.5</p><p><strong>Question</strong>: How many bookings were made by Navan in 2022?</p><p><strong>Answer</strong>:</p><p>COMPANY_NAME, NO_OF_BOOKINGS, NET_BOOKING_VALUE</p><p>Navan, 1xxx56, 9xxx3.5</p><p><strong>Question</strong>: What is the average travel spend per booking for Navan in 2022?</p><p><strong>Answer</strong>:</p><p>DEPARTMENT, AVG_TRAVEL_SPEND_PER_BOOKING</p><p>Expense, 8xx.51928922</p><p>Business Operations, 6xxx.022125</p><p>etc…</p><p>Then you let it run and dive deeper into the data as it sees fit, based on the answers from the previous prompt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*rRS4nihkc-BRvF5H.png" /></figure><p>By using recursive prompts, the AI can “brainstorm” with itself (the CBI) and ask questions about the data. For example, the AI can ask about the total travel spend, the number of employees who travel, and the average cost of travel per employee. Those questions are sent to the CBI, which will generate answers based on the data. The AI can then examine the answers and ask follow-up questions or drill down into specific areas of interest.</p><p>The process of recursive prompts continues until the AI can provide a detailed solution to the question — in this case, how to save 10% on a travel budget. The AI might suggest ways to reduce travel costs, such as negotiating discounts with travel suppliers or promoting virtual meetings over in-person gatherings. Since all of the suggestions are based on the company’s data, they’re tailored to and actionable for that company.</p><p>Here’s what came back when we asked our system to assume the role of CFO and examine a company’s travel spend data in 2022. Our prompt: “How can [company] save 10% of the travel budget?” After just five iterations, this is what the solution returned:</p><blockquote><em>Here are four suggestions to save approximately 10% on the travel spend based on the data provided:</em></blockquote><blockquote><em>1. Increase booking lead time for non-road warrior employees:</em></blockquote><blockquote><em>The average lead time for non-road warrior employees is 20.72 days, while it is 16.68 days for road warriors.</em></blockquote><blockquote><em>28.69% of bookings are made within 7 days of the travel date.</em></blockquote><blockquote><em>Encouraging non-road warriors to book earlier can lead to better deals on flights, hotels, and car rentals.</em></blockquote><blockquote><em>Savings potential: Assuming a 10% reduction in last-minute bookings and a 5% savings on each early booking, the potential savings would be: 0.1 * 4409 * 577.84243933 * 0.05 = $126,957.88</em></blockquote><blockquote><em>2. Reduce out-of-policy bookings:</em></blockquote><blockquote><em>21.09% of bookings are out of policy, with a total spend of $2,132,216.36 and an average spend per booking of $657.89.</em></blockquote><blockquote><em>Implement stricter approval processes and raise awareness about travel policies to reduce the number of out-of-policy bookings.</em></blockquote><blockquote><em>Savings potential: Assuming a 50% reduction in out-of-policy bookings and a 5% savings on each in-policy booking, the potential savings would be: 0.5 * 3241 * 657.88841716 * 0.05 = $53,260.37</em></blockquote><blockquote><em>3. Encourage the use of lower-cost hotel chains for non-executive and non-director employees:</em></blockquote><blockquote><em>The average hotel spend per night for [company] employees is $256.30.</em></blockquote><blockquote><em>Promote the use of more budget-friendly hotel chains for non-executive and non-director employees.</em></blockquote><blockquote><em>Savings potential: Assuming a 10% reduction in hotel spend for non-executive and non-director employees, the potential savings would be: 0.1 * 6377586.12 * (3490586.62 / 8071477.24) = $267,274.27</em></blockquote><blockquote><em>4. Negotiate corporate discounts with frequently used airlines and hotel chains:</em></blockquote><blockquote><em>Top 5 airlines: United, American Airlines, Southwest Airlines, Delta Air Lines, and Alaska Airlines.</em></blockquote><blockquote><em>Top 5 hotel chains: Hyatt Hotels &amp; Resorts, Aloft, Marriott, Hilton Hotels &amp; Resorts, and unbranded hotels.</em></blockquote><blockquote><em>Negotiate corporate discounts with these preferred providers based on the volume of bookings made by the employees.</em></blockquote><blockquote><em>Savings potential: Assuming a 5% discount on flights and hotels with these preferred providers, the potential savings would be: 0.05 * (4702144.26 + 3792270.73) = $424,720.75</em></blockquote><blockquote><em>In summary, these four suggestions have the potential to save [company] approximately $862,213.27 on travel spend, which is around 9.71% of the total travel spend of $8,880,860.45.</em></blockquote><p>Recursive prompts unlock a much bigger potential from LLMs by allowing the AI to brainstorm with itself. The output of prompt #1 serves as the input of the next prompt, thus creating a human-like thinking process. Recursive prompts can be particularly useful in complex scenarios, such as financial forecasting, supply chain optimization, or CO2 emission optimization, where the user needs to consider multiple factors and variables. The result, not surprisingly, is more valuable insights and recommendations.</p><p>And because of their powerful functionality, recursive prompts will be a springboard to the next level of AI-driven innovation.</p><h3>Looking Ahead</h3><p>Using a CBI to facilitate brainstorming with a virtual CFO: It’s just the first step in maximizing generative AI’s potential.</p><p>But it’s been an important step that’s opened the door to the future. At Navan, we’ll keep upleveling the AI with additional skills that it can use to achieve more insightful — and more surprising — results.</p><p>In fact, we already have lots of ideas on how to do just that. In my next article, I’ll delve into the direction I believe this technology is headed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef17f5d5e7a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>