Developer's Guide to Integrating Generative AI into Applications
- Nyhet
789 kr
Beställningsvara. Skickas inom 7-10 vardagar. Fri frakt för medlemmar vid köp för minst 249 kr.
Produktinformation
- Utgivningsdatum2026-02-16
- Mått185 x 231 x 20 mm
- Vikt794 g
- FormatHäftad
- SpråkEngelska
- SerieTech Today
- Antal sidor416
- FörlagJohn Wiley & Sons Inc
- ISBN9781394373130
Tillhör följande kategorier
CHRIS MINNICK is a developer and tech educator who teaches JavaScript, React, Node.js, prompt engineering, and generative AI. He’s the author of more than 20 technical books, including Microsoft Copilot For Dummies, Coding With AI For Dummies, and JavaScript All-in-One For Dummies.
- Introduction xxviiPart I Foundations of Generative AI 1Chapter 1 Introduction to Generative AI 3Evolution of AI Applications 4Key Eras of AI Development 4Logic and Rules-Based Systems 4Early Machine Learning 5Expert Systems 5Big Data and Statistical Machine Learning 5Deep Learning 6The Rise of Generative AI 8Transition to GenAI 9Understanding AI and ml 11What Machine Learning Can Do 12Supervised Learning 12Unsupervised Learning 13Semi-Supervised Learning 13Reinforcement Learning 13Self-Supervised Learning 13Large Language Models 14Tokenization 14Embedding 16Transformer Layers 17Prediction 18What Makes Generative AI Different? 18Generating Content 18GenAI Is Necessarily Unpredictable 19GenAI Is Probabilistic 19GenAI Requires Prompt Design 19GenAI Is Multimodal 19GenAI Shifts UX Expectations 20GenAI Needs Guardrails 20Real-World Examples of AI Integration 20AI-Enhanced Customer Service Bots 20Generative Writing Tools 21Image Generation in Creative Tools 22Summary 24Chapter 2 Understanding Generative AI Models 25Key Factors in Choosing a Model 25Cost and Pricing Structure 26Licensing Model 26Performance Metrics 27Suitability for Your Use Case 28Technical Features 28Architecture 29Parameter Count 30Training Objective and Data 30Fine-Tuning 30Context Window 30Unique Functionalities 31Proprietary Models 31GPT (OpenAI) 32Claude (Anthropic) 33DALL·E (OpenAI) 33Gemini (Google DeepMind) 33Open and Open-Source Models 34OLMo (Allen AI) 35Llama (Meta) 35Stable Diffusion (Stability AI) 36Deciding Between Proprietary and Open Models 36When to Use Which Model 38Adapting Your Model’s Abilities 39Fine-Tuning 39Prompt Engineering 40Retrieval-Augmented Generation 40Choosing the Right Adaptation Strategy 42When to Use Non-Generative Models Alongside GenAI 43Key Advantages of Non-Generative Approaches 43Strategic Use Cases for Hybrid Approaches 43Latency-Critical Applications 44Cost and Performance Optimization 44Quality Control and Validation 44Preprocessing and Filtering 45Decision-Making and Scoring 45When to Choose Traditional Approaches Over AI 45Summary 46Chapter 3 Getting Started with AI APIs and SDKs 47Exploring Hosted Models 47Setting Up a Simple Development Environment 48OpenAI Developer Platform 48Getting an OpenAI API Key 49Anthropic’s Build with Claude 55Google Gemini Developer API 57GenAI Integration Patterns 59Common Architectural Models for Integrating GenAI 59Backend Service Integration 59Frontend-Only Integration 61Plugin-Based Integration 66Hybrid Integration 66Model Access Patterns 66Synchronous vs. Asynchronous 67Streaming vs. Batch 68Input Types for GenAI Integration 69Plain Text Prompts 69Structured Prompts 69Multimodal Prompts 70Response Handling 71Integrating Responses into the User Interface 71Logging and Analytics 71Chaining Responses to Other Services 72Combining Techniques 72Summary 73Chapter 4 AI-Generated Data and Synthetic Users 75Generating Test Data with GenAI 76Traditional Test Data Generation 76Manual Generation 76Automated Data Generation 76Data Masking 76Using GenAI for Test Data Generation 77Introducing the Sample App 77Techniques for Generating Synthetic Data 79Few-Shot Prompting for Schema-Aligned Data 79Template-Based Generation with Randomized Inputs 81Structured Output Formats 83Simulating User Behavior and Interaction Flows 86Simulating Chat-Based Interactions 86Simulating Navigational Flows and Multistep Interactions 87Simulating Edge Case and Adversarial Behavior 88Best Practices and Limitations of Behavior Simulation 89Summary 90Chapter 5 Prompt Engineering 91Why Prompt Design Matters in GenAI Applications 92Prompt Quality Affects Output Quality 92Prompting Is Cheaper and Faster than Fine-Tuning 93Prompts Shape the Voice and Tone of AI 93Better Prompts Reduce Hallucinations 93Prompts Embed Business Logic 94Prompt Design Supports Edge Case Handling 94Good Prompts Improve Performance and Reduce Cost 94Prompt Types 95Zero-Shot Prompting 95Few-Shot Prompting 96Chain-of-Thought Prompting 96Prompting Best Practices 97Guiding the LLM with System Messages 98Prompt Templates for Repeatable Interactions 98Adjusting Generation Parameters 101Max Tokens 101Temperature 102Top P 103Top K 104Stop Sequences 104Deciding How to Set Inference Parameters 104Tooling for Prompt Development 105In-Browser Prompt Playgrounds 105Anthropic Workbench 105OpenAI Playground 112Google AI Studio 115Prompt Management 116Summary 117Part II Designing for a Better AI Experience 119Chapter 6 Human–AI Interaction and UX Design 121Managing User Expectations 122Clarify the AI’s Capabilities Up Front 123Set Expectations Around Potential Failure 124Communicate When Outputs are Probabilistic 124Provide Cues that Suggest When the AI is “Thinking” 124Use Progressive Disclosure to Build Trust 125Avoid Overpromising AI Abilities 125Designing Interfaces for AI-Powered Features 126Understand the Users and Context 126Ensure Clarity of AI-Generated vs. User-Generated Content 126Provide Opportunities for Correcting or Refining AI Outputs 127Use Visual or Interaction Cues to Indicate When the AI Is Active or Idle 127Offer Undo or Step-Back Controls to Reduce Risk and Build Confidence 127Design for Uncertainty and Failure 128Balancing Automation with Human Control 128Improving Over Time 129Capturing and Using User Feedback 129Balancing Explicit Ratings and Behavioral Signals 130Learning Without Surprising Users 130Monitoring for Drift and Relevance 130Accessibility and Inclusion in AI UX 131Accessibility Standards for AI Applications 131Best Practices for Accessible AI UX 132GenAI as an Accessibility Aid 134Testing GenAI Accessibility 134Using GenAI to Test GenAI Outputs 137Human-Centered AI in the Real World 138Summary 139Chapter 7 Optimizing AI for Performance and Cost 141From Prototype to Production 141The Hidden Cost of GenAI Features 142Why Optimization Matters 142The Trade-Off Triangle 143Minimize Latency and Reduce Redundant API Calls 144Reduce Prompt Size 144Reduce the Size of the Model’s Response 145Use Caching to Avoid Redundant Calls 146Cache Exact Prompt–Response Pairs 146Prompt Fingerprint Caching 148Reuse Similar Responses with Embedding Search 150Parallelize Requests 153Stream Responses 155Precompute for Known Flows 157Lightweight Fine-Tuning 158Profile and Monitor Performance 158Logging to Identify Latency Hotspots 159Observability Tools for GenAI Systems 159Handle Rate Limits Gracefully 160Understanding Usage Tiers 162Throttle and Buffer Requests 162Design for Fallback and Graceful Degradation 162Summary 163Part III Integrating AI into Applications 165Chapter 8 Building AI-Powered Chatbots and Assistants 167Start with a Simple Chatbot 168Principles of Conversational Interface Design 174Managing Turn-Taking, Flow, and Feedback in Dialogue 175Show Feedback and Errors 176Temporarily Disable the Input to Prevent Accidental Repeat Submissions 178Use Backchannel Cues and Confirmations 178Guide the Next Turn 180Keep the User Oriented 181Handling Memory, Context, and User Personalization 183Tracking Conversation History 183Adding Basic Personalization 186Steering AI Toward Specific Tasks or Domains 190Using System Prompts to Constrain Behavior 190Welcoming the User 192When to Use RAG for External Knowledge 194Adding Auto-Scroll and Streaming Responses 195Designing for Fallback, Clarification, and Edge Cases 200Clarify Ambiguous Questions 200Fall Back When the Answer Isn’t Known 202Handle Out-of-Scope Requests Gracefully 202Best Practices for Customer Service Chatbots 203Summary 204Chapter 9 Generating and Enhancing Content with AI 205Building SPOT: Fast, On-Brand, and Grounded 205Overview of SPOT 206Getting Set Up 208Where to Put This in a Real Application 208AI-Assisted Writing and Summarization 209Going from Brief to Draft 209Rewriting for Tone, Audience, and Locale 211Summarization with Source Citations 212Repurposing Long-Form Content 212Choosing the Right Summarization Mode 213Keep It On-Brand with the Style Pack 214Prompt-Time Injection 214Post-Generation Validation 215Implementation Patterns for Your Own Apps 218Grounded Writing with RAG 218Structured Outputs for Pipelines 220Evaluation and Human Review 220Accessibility and Inclusive Language 221Legal, IP, and Disclosure Considerations 223AI-Generated Images and Media 224Design First, Pixels Second 224Maintain Brand Consistency in Visuals 225Image Editing Workflows 226Audio and Voice Features 226Video Workflows: Storyboard First, Shots Second 227Measure What Matters 228Logging and Provenance for Media 228Personalization and Dynamic Content 229Understanding the Personalization Spectrum 229Defining Your Signals and Features 230Runtime vs. Precomputed Variants 230Adding Guardrails for Fairness and Safety 231Experimenting and Optimizing 231Localizing and Adapting Across Cultures 231Locale-Specific Spelling and Grammar 232Multilingual Prompt Templates 232Cultural Norms and Communication Style 233Regional Imagery and References 233Showing Your Work: UX Patterns for Trust 234Common Pitfalls and How to Avoid Them 235Fabrication Masquerading as Authority 235Brand Drift 236Over-Personalization 236Hidden Costs and Latency Surprises 237Schema Drift and Output Parsing Failures 237Evaluation Gaps 237Legal and Regulatory Surprise 238Summary 238Chapter 10 AI for Code Generation and Developer Tools 239Setting Up and Using PACE 240Installation 241The Interface 241Using PACE 241Adding Your Own Features 242Writing Prompt Templates for Common Coding Tasks 243Viewing the Built-In Prompts 243Explaining Code 244Generating Function Stubs 245Error Helpers 246Adding Comments 246Optimization Suggestions 247Automating Repetitive Work with Prompts 248Generating Boilerplate 248Performing Refactors 249Suggesting Reviews and Improvements 250Combining Prompts 251When Not to Automate 251Prompts for Testing and Debugging 251Generating Unit Tests 252Explaining Test Failures 252Debugging Runtime Issues 253Spotting Performance and Security Issues 253Improving the Developer Experience Around Testing 254Caution: Don’t Overtrust Test Generation 255Best Practices for Prompt-Driven Tools 255Show a Diff, Not a Blob 255Run Formatters and Linters Automatically 256Keep Prompts Short, Modular, and Reusable 257Be Explicit About Intent and Output 257Ask for Multiple Options When Appropriate 257Let the Model Say “I Don’t Know” 258Treat Prompts Like Code 258Start Narrow, Then Generalize 259Avoid Prompt Sprawl 259Design for Human Control 259Building Better Dev Tools 260Add New Prompt Capabilities 260Improve the UI 260Store Templates Persistently 261Add Support for Other AI Providers 261Experiment with Retrieval 261Share Prompt Collections 262Summary 262Chapter 11 Enhancing Search and Recommendations with AI 263Why Traditional Search Falls Short 264Vector Search and Embeddings 264Building a Vector Search Demo with Embeddings 266Step 1. Prepare the Project 266Step 2. Create a Utility for Similarity 267Step 3. Build the Index 267Step 4. Implement Search 268Step 5. Try It Out 269Reranking with LLMs 269Conversational Search 271Personalized Recommendations 272Classic Approaches 272AI-Enhanced Recommendations 273Building a Simple Recommender with Embeddings + User Profiles 273Step 1. Prepare the Project 274Step 2. Add Utility Functions 275Step 3. Embed Items and Save the Index 276Step 4. Compute User Vectors 277Step 5. Generate Recommendations 278Step 6. Add “Why This” Explanations 280Dynamic Personalization 281Evaluation and Feedback Loops 282Hybrid Approaches 282Introduction to FUSE 283Installing and Launching FUSE 284How It Works 284Comparing Search Modes 284Personalization in Action 286Experimenting with Retrieval and Ranking 286Summary 287Part IV Business Considerations 289Chapter 12 Ethical Considerations and Pitfalls 291Bias and Fairness in Generative AI 291Real-World Impacts 292Mitigation Strategies 293Test with Synthetic Users 294Apply Prompt Engineering to Steer Outputs Toward Inclusivity 294Build User Controls and Transparency Mechanisms 294Use Models or APIs with Fairness Tuning or Moderation Filters 296Developer’s Responsibility 298Document Observed Biases 298Provide Mechanisms for User Feedback and Correction 299Treat Fairness Testing as a Continuous Process 299Define Fairness Metrics and Conduct Regular Audits 299Build Diverse Teams and Invest in Ethics Training 300Handling Fabrication and Misinformation 300Why Fabrication Happens 301Next-Token Prediction, Not Truth Seeking 301Gaps in the Training Data 302Ambiguous or Overly Broad Prompts 302Risks to Applications 302Legal and Compliance Issues 303Loss of User Trust 303Amplification of Conspiracy Theories and Harmful Misinformation 303Mitigation Strategies 303Ground Outputs in Real Data 304Constrain the Scope and Encourage Abstention 304Build a Human-in-the-Loop Review 304Label Outputs Clearly 304Security and Privacy Concerns 305Key Risks 305Prompt Hacking 306Prompt Injection 306Prompt Leaking 307Jailbreaking 307Ethical vs. Malicious Prompt Hacking 307Mitigation Strategies 308Prevent Data Leakage 309Defend Against Prompt Injection 309Protect Training Data and RAG Pipelines 310Mitigate Caching Risks 311Regulatory and Compliance Issues 311General Data Protection Regulation (GDPR) 311EU AI Act 312Other Legal Considerations 313Industry-Specific Regulations 313Finance 314Healthcare 314Education 314Practical Steps for Developers 314Developer’s Ethical Checklist 315Summary 316Chapter 13 Monetizing AI Features 317Understanding AI Feature Costs and Value 317Estimating the Per-Use Cost of ToasterBot Deployment 318Per-Use Cost Components Breakdown 318Example: Cost of a Single Chat Session 321Cost Comparison: API-Based vs. Self-Hosted Deployment 323Pricing Strategies: Cost-Based vs. Value-Based 325Cost-Based Pricing 325Value-Based Pricing 325When and How to Charge for AI Features 326Tiered Subscription Models 326Usage-Metering and Rate Limits 327Paywall Strategies 329Value Communication and Pricing Iteration 330Indirect Monetization of AI Features 330Implementation and Engineering Considerations for Monetization 331API Usage Tracking and Token Counting 331Enforcing Limits and Feature Gating 335Integrating Billing and Payments 337Architecture Example: Implementing Monetization 337Cost Modeling and Forecasting in Code 338Applying Monetization Strategies to Example Apps 340SimpleBot/ToasterBot: AI Chatbot 340SPOT: Structured Prompt Output Toolkit 341PACE: Prompt-Augmented Coding Environment 342FUSE: Find, Understand, Search, Enhance 343Summary 344Chapter 14 Successful AI-Powered Products 345Case Studies 345Ups Orion 346Nuance DAX: Ambient Clinical Documentation 346Real-World Examples of AI-driven Applications 347AudioPen 348Consensus 350Humata 351Eightify 353Scribe 354Tability 356tl;dv 357Lessons Learned from Successful Implementations 358Start with User-Centric Problems 359Integrate AI into Existing Workflows 359Keep Humans in the Loop 359Prioritize Transparency, Ethics, and Data Responsibility 359Scale Compound Impact 360Close the Feedback Loop 360Balance Automation with Creativity 360Future Trends 360Explosive Growth of Generative AI Adoption 361Rising Investment in AI 361Synthetic Data and Privacy-Enhancing Technologies 361Data-Mesh Architectures and Real-Time Analytics 362Agentic AI Assistants 362Multimodal GenAI 363The Perceive → Reason → Act Loop 363Modality Abstractions and Adapters 364Memory, Retrieval, and Cross-Modal Indexing 365Fallback Logic and Graceful Degradation 365Safe Tool Invocation and Audit Wrappers 366Orchestration and Multiagent Coordination 366Regulatory and Ethical Considerations 367Human–AI Collaboration 367Sustainability and Efficiency 367Summary 367Index 369
Mer från samma författare
Artificial Intelligence All-in-One For Dummies
Chris Minnick, John Paul Mueller, Luca Massaron, Stephanie Diamond, Pam Baker, Daniel Stanton, Shiv Singh, Paul Mladjenovic, Sheryl Lindsell-Roberts, Jeffrey Allan
559 kr
Mer från samma serie
Active Defender
Catherine J. Ullman, Catherine J. (University at Buffalo) Ullman, Catherine J Ullman
279 kr
Professional JavaScript for Web Developers
Matt Frisbie, Matt (University of Illinois Urbana-Champaign) Frisbie
779 kr
Microsoft SharePoint Premium in the Real World
Jacob J. Sanford, Woodrow W. Windischman, Dustin Willard, Ryan Dennis, Jacob J Sanford, Woodrow W Windischman
779 kr
x86 Software Reverse-Engineering, Cracking, and Counter-Measures
Stephanie Domas, Christopher Domas
809 kr
Du kanske också är intresserad av
Microsoft 365 Copilot At Work
Sandar Van Laan, Jared Matfess, Thomas Flock, Ann Reid, Sandar (Slalom) Van Laan, Jared (AvePoint) Matfess, Thomas (Slalom) Flock, Ann (Slalom) Reid, Sandar van Laan
789 kr
Microsoft SharePoint Premium in the Real World
Jacob J. Sanford, Woodrow W. Windischman, Dustin Willard, Ryan Dennis, Jacob J Sanford, Woodrow W Windischman
779 kr