Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Generative AI Application Integration Patterns

You're reading from   Generative AI Application Integration Patterns Integrate large language models into your applications

Arrow left icon
Product type Paperback
Published in Sep 2024
Publisher Packt
ISBN-13 9781835887608
Length 218 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Luis Lopez Soria Luis Lopez Soria
Author Profile Icon Luis Lopez Soria
Luis Lopez Soria
Juan Pablo Bustos Juan Pablo Bustos
Author Profile Icon Juan Pablo Bustos
Juan Pablo Bustos
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Introduction to Generative AI Patterns FREE CHAPTER 2. Identifying Generative AI Use Cases 3. Designing Patterns for Interacting with Generative AI 4. Generative AI Batch and Real-Time Integration Patterns 5. Integration Pattern: Batch Metadata Extraction 6. Integration Pattern: Batch Summarization 7. Integration Pattern: Real-Time Intent Classification 8. Integration Pattern: Real-Time Retrieval Augmented Generation 9. Operationalizing Generative AI Integration Patterns 10. Embedding Responsible AI into Your GenAI Applications 11. Other Books You May Enjoy
12. Index

When to consider generative AI

As we have been exploring, one of the powers of GenAI is the ability to automatically generate responses without being explicitly trained on it. Rather than just executing predefined tasks, LLMs can infer responses by drawing on their contextual understanding and knowledge. This aspect of emergent reasoning unlocks unique opportunities for rapid experimentation and iterative refinement of novel use cases.

When considering potential applications for GenAI, the first evaluation criterion centers on comprehension-based tasks. Sentiment analysis, content classification, intent classification, relationship extraction, summarization, and more all leverage innate language understanding. Developers can formulate prompts aligning to use cases that interpret, organize, or infer meaning. To unlock the full potential of LLMs, developers will iterate on these given prompts through thoughtful “prompt engineering.” Prompt engineering attempts to optimize LLM responses by providing task-specific input text that guides a model toward the desired output.

However, purely numerical analysis may not be the best initial fit for GenAI. While mathematical reasoning exists within models, large volumes of statistical data processing are better suited for traditional programmatic algorithms and predictive AI. Of course, GenAI could help describe insights from numeric analysis – communicating trends in natural language, for example, or creating queries from natural language. But we wouldn’t expect strong performance by running regression analysis or optimization from prompts alone.

Along these lines, one of the earliest discoveries around the limitations of LLMs surfaced in mathematical reasoning. Users experimenting with prompts that involved numeric calculations or comparisons found nonsensical outputs. The models would produce response text that sounded coherent but lacked any grounding in basic arithmetic principles. This disconnect highlights the risk of hallucinations – responses that have fluent language but little accuracy or logical consistency.

Researchers formulated that the enormous parameter spaces of LLMs allow them to optimize textual cohesion while lacking the tighter constraints of symbolic logic found in math. Without specifically encoding numeric logic, the models “hallucinate” plausible-sounding numeric reasoning that mathematically makes little sense. The outputs expose both the power of language fluency and the risk of generalizing beyond the actual knowledge limitations of models.

As we dive deeper into use cases in this book, we encourage you to brainstorm opportunities aligned with the strengths provided by language understanding tools.

The goal is to match high-value challenges around language, content, and reasoning with the emergent capabilities of LLMs. We will evaluate where modern AI could augment human workflow – is there a comprehension component that bogs us down? Could prompts help classify, summarize, suggest, or predict within those contexts? And finally, we will factor in how the outputs generated by LLMs could evolve from experimental prompting into a refined API-driven solution.

It is important to remark one more time on the importance of business alignment. When emerging technologies garner tremendous hype and media attention, organizations face the tendency to rush to deploy “shiny new toys” without clearly defining the value they will drive for a business. GenAI risks this same dynamic, given the incredible mainstream breakout prompted by chatbots like ChatGPT. Executives clamor to stake their claim in using these powerful technological advances to future-proof competitiveness.

Unfortunately, treating AI as an end solution rather than an ingredient to enhance solutions often leads to failure. Well-intentioned teams demo flashy prototype capabilities that fail to map into tangible business challenges or workflows. Progress stalls beyond experiments in isolation. Funding dries up without demonstrating a real-world impact. Even worse, poorly planned AI integration risks harming the customer experience or market position. Conversely, focusing on use cases with clear business value upfront fosters successful AI implementations, leading to a positive business impact while driving innovation and maximizing the return on investment.

Figure 2.1: “The Symphony of Data and Imagination” – a generated image to illustrate generative AI vs Predictive AI

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image