AI Design Patterns

AI Design Patterns

As we’ve been researching the AI landscape & how to build applications, a few design patterns are emerging for AI products.

These design patterns are simple mental models. They help us understand how builders are engineering AI applications today & which components may be important in the future.


The first design pattern is the AI query router. A user inputs a query, that query is sent to a router, which is a classifier that categorizes the input.

A recognized query routes to small language model, which tends to be more accurate, more responsive, & less expensive to operate.

If the query is not recognized, a large language model handles it. LLMs much more expensive to operate, but successfully returns answers to a larger variety of queries.

In this way, an AI product can balance cost, performance, & user experience.

The second design pattern is for training. Models are trained with data (which can be real-world & synthetic or made by another machine), then they are sent for evaluation.

The evaluation is a topic of much debate today because we lack a gold standard of model greatness. The challenge with evaluating these models is the inputs can vary enormously. Two users are unlikely to ask the same question in the same way.

The outputs can also be quite variable, a result of the non-determinism & chaotic nature of these algorithms.

Adversarial models will be used to test & evaluated AI. Adversarial models can suggest billions of tests to stress the model. They can be trained to have strengths different to the target model. Just as great teammates & competitors improve our performance, adversarial models play will play that role for AI.

The core security around LLMs has two components. A user component, here it’s called a proxy, & a firewall, which wraps the model.

The proxy intercepts a user query both on the way out & on the way in. The proxy eliminates personally identifiable information (PII) & intellectual property (IP), logs the queries, & optimizes costs.

The firewall protects the model & the infrastructure it uses. We have a minimal understanding of how humans can manipulate models to reveal their underlying training data, their underlying function, & the orchestration for malicious acts today. But we know these powerful models are vulnerable.

Other security layers will exist within the stack, but in terms of the query path, these are the most important.

The last of our current design patterns in the AI developer design path.

The developer’s machine is secured with endpoint detection & response, or EDR, to ensure that the data being used to train models & the underlying models are not poisoned.

The developer’s code is sent to a CICD system. The CICD system checks the model & the data are correct using signatures (Sig Verification). Today, most softwares’ signatures are verified. But not AI models.

Also, the large language model will be subjected to a testing harness (a series of tests) to ensure that it performs as expected. Real user queries from live traffic will inform the harness.

Once those tests pass, the model is pushed to production.

These are our four current mental models for how large language models will be built, secured, & deployed. These are sketches of each leg of an elephant we are trying to draw in a dark room.

If you have ideas about other design patterns or improvements to the current ones, please contact us. We’d love to improve these to help others.

Ebonku Abaku

Technology Project Manager @ Swift Medical | Technology Program Management | IT Strategy & Delivery Expert

9 个月

Insightful!!

回复
Mary Stanco Realtor

Licensed Real Estate Salesperson

9 个月

Great Article

回复
Steven Forth

CEO Ibbaka Performance - Leader LinkedIn Design Thinking Group - Generative Pricing

9 个月

We are going to need a design pattern approach to make sense of generative AI and AI generally. Great to see Tom leading this. Another person working in generative AI design patterns is Debmayla Biswas https://www.dhirubhai.net/pulse/generative-ai-architectural-patterns-debmalya-biswas-hlvye/

Absolutely fascinating insights into the evolving AI landscape and application development! ?? It's intriguing to learn about the emerging design patterns that serve as mental models for building AI products. These patterns not only provide a glimpse into the current state of AI engineering but also offer valuable cues about the pivotal components shaping the future of AI applications. ?? Excited to dive deeper into these design patterns and explore the innovative possibilities they unlock! ???? #AI #DesignPatterns #Innovation

回复
Rees Bayba

Astra GTM | Modern GTM systems for startups

9 个月

Nice breakdown Tomasz Tunguz! On point #1, it’s interesting to see how these models are being used a piece in the dev process, vs the model being the end all be all. A lot more potential applications and efficiency unlocked when you include additional logic, tooling, different models, etc. cc Cindy Y. Liu

要查看或添加评论,请登录

Tomasz Tunguz的更多文章

  • Theory Two

    Theory Two

    Today, we’re announcing our second fund of $450m to support our mission of partnering with early stage software…

    25 条评论
  • My Little Library

    My Little Library

    I didn’t notice it at first but there in the back corner of my laptop, I’ve been assembling a little library. The…

    5 条评论
  • 75 Cents per Month

    75 Cents per Month

    What does it cost to have an assistant with you like in the movie Her? The cost of using AI has dropped precipitously…

    13 条评论
  • Small but Mighty AI

    Small but Mighty AI

    77% of enterprise AI usage are using models that are small models, less than 13b parameters. Databricks, in their…

    4 条评论
  • The Post Election Surge is Unevenly Distributed

    The Post Election Surge is Unevenly Distributed

    After the election, the public markets have roared, but not equally. The broad software ecosystem has seen a relatively…

    7 条评论
  • I Talk to Robots While Driving

    I Talk to Robots While Driving

    Over the weekend, I found myself in an hour-long conversation during my drive with an AI. We jumped from discussing…

    12 条评论
  • The White Collar Revolution

    The White Collar Revolution

    The major areas of AI innovation automate white-collar work. Reviewing the BLS’ data on employment for white collar…

    8 条评论
  • Profit Dollars per GPU Dollar

    Profit Dollars per GPU Dollar

    “AWS’ AI business is a multibillion-dollar revenue run rate business that continues to grow at a triple-digit…

    6 条评论
  • My AI Rube Goldberg Machine

    My AI Rube Goldberg Machine

    In yesterday’s post, I calculated the profitability of public software companies. To calculate these figures, I built a…

    9 条评论
  • Productivity One Year from Now

    Productivity One Year from Now

    If AI continues on its current trajectory or accelerates, what will change in your business? We’ve been asking leaders…

    5 条评论

社区洞察

其他会员也浏览了