SlideShare a Scribd company logo
Building AI Applications
in the Enterprise
Nadheesh Jihan
Technical Lead
WSO2
Our Mission Today!
I will be taking you on a journey:
● Practical Use-Case Evolution: Guide a real-world use case to a scalable
solution.
● Gen AI Drawbacks: Explore challenges and how to address them.
● Key “Gen-AI Patterns”: Learn three essential patterns for building Gen AI
apps.
● Hands-On Implementation: Implement each pattern to see it in action.
● Leveraging Integration Expertise: Use integration skills to create
successful Gen AI apps.
● AI & Integrations: Understand how AI and integration strategies intersect.
2
From Traditional AI to Generative AI
What is AI, Gen AI, and LLMs?
● Artificial Intelligence (AI)
⦿ Simulates human intelligence in machines to perform tasks like learning, problem-
solving, and decision-making.
● Generative AI (Gen AI)
⦿ A type of AI that creates new, original content (text, images, music) by learning from
existing data patterns.
● Large Language Models (LLMs)
⦿ A specific type of Gen AI that understands and generates human text.
4
5
Generative AI: A Significant Leap Forward!
2017
Transformer Architecture
- "Attention Is All You Need" paper:
revolutionizes AI with Transformer models.
2018-2019
The Rise of LLMs
- BERT (Google): Advances language
understanding.
- GPT-1 & GPT-2 (OpenAI): Breakthroughs in text
generation.
2020-2022
The Explosion of Gen AI
- GPT-3 (OpenAI): 175 billion parameters, setting
new benchmarks.
- RAG Paper: Enhances LLMs with external data
retrieval.
2023-2024
- ChatGPT: Makes AI accessible to everyone.
- LangChain & ReAct: Frameworks for building
Gen AI applications and multi-agent systems.
- Gen AI APIs: Widespread availability of pre-
trained models via simple API integrations
Present & Beyond
The Agentic Era
- Explosion of Gen AI Models, Frameworks, and
Multi-Agent Systems
- Platforms are evolving to enable Gen AI
applications
Mainstream Adoption &
Frameworks
Business Value: What’s Changed?
● Building AI Applications was Previously:
⦿ Complex, time-consuming, and required specialized knowledge in AI, ML, Deep
Learning, Data Science, etc.
● With Gen AI:
⦿ No need for deep AI/ML expertise.
⦿ Gen AI models are pre-trained and easily accessible through APIs.
Building AI applications is now all about coding and
integrations!
6
Do You Want to Build an AI
Application?
Enhancing WSO2Con with AI
We’ve integrated AI-driven features into the WSO2Con mobile app to improve your conference
experience:
WSO2Con Assistant: Get real-time answers to your questions about conference.
Session Advisor: Receive personalized session recommendations based on your interests.
Attendee Connections: Helps to connect with attendees who share similar interests.
Expert Finder: Discover WSO2 O2Bar experts to discuss your specific technical needs.
A Real-World AI Use Case
8
Enhancing WSO2Con with AI
We’ve integrated AI-driven features into the WSO2Con mobile app to improve your conference
experience:
WSO2Con Assistant: Get real-time answers to your questions about conference.
Session Advisor: Receive personalized session recommendations based on your interests.
Attendee Connections: Helps to connect with attendees who share similar interests.
Expert Finder: Discover WSO2 O2Bar experts to discuss your specific technical needs.
A Real-World AI Use Case
9
● Building the WSO2Con Assistant
○ We have Generative AI models—so how hard can it be?
● A prompt is simply:
○ Instructions, context or questions that guides the model to generate a relevant
response
Brainstorming!
10
Question
Answer
Prompt
Response
Let’s Start: Building the WSO2Con AI
Assistant
● Gen AI models have a knowledge cut-off.
⦿ They only "know" up to the point of their last training data.
● Key Warning:
⦿ They don’t provide facts—they generate responses based on patterns.
⦿ Hallucinations are a real risk.
● So how do we add knowledge to a Gen AI model?
It Doesn’t Have All the Answers!
12
● Fine-tuning can update Gen AI model with new knowledge.
● Require some expertise on how to:
⦿ Structure the data
⦿ Tune hyperparameters (epochs, learning rate, etc.)
● Takes time & isn't real-time
● Not ideal for WSO2Con Assistant Conference agendas change
→
frequently!
Can We Train It to "Know" More?
13
● Grounding the Model with Facts
⦿ Instead of fine-tuning, we can inject real-time data into the prompt:
● Prompt = Instructions + Question + Live Data (Conference Agenda)
● How do we get the latest conference agenda?
⦿ It’s just another integration!
In-Context Learning – A Simpler Approach
14
Question
Answer
Question
Answer Prompt
Response
Request
Agenda
Agenda
WSO2Con AI Assistant with
Knowledge Integration
● The assistant answers questions correctly using real-time agenda data.
⦿ But what if users ask about WSO2 products?
● We need more data sources—but there’s a challenge!
Level Unlocked: AI Application Builder
16
Dall-E generated
● LLMs can’t process unlimited data in one go!
⦿ For example: GPT-4o has a 128k token limit (input + output).
● That may seem like a lot, but…
⦿ 📉 Accuracy drops if we stuff too much data.
⦿ 🕒 Response time increases with longer prompts.
⦿ 💰 Costs go up as we send larger requests.
● We need a better approach!
The Challenge – LLMs Have Token Limits
17
● Instead of stuffing all data into the prompt…
● Retrieve only the most relevant data on demand!
⦿ Efficient – Only fetch what’s needed.
⦿ Accurate – Uses up-to-date, context-aware data.
⦿ Scalable – Works even with massive datasets.
● But how does it work? Let’s break it down…
Retrieval-Augmented Generation (RAG)
18
Databases
Online
Data Sources
LLM
Search and Retrieval
Chatbot
User
1
2
3
4
5
1) Data Ingestion (Happens Once)
a) Chunk the information into smaller, meaningful sections.
b) Convert each chunk into embeddings using an embedding model.
c) Store embeddings in a vector database for efficient retrieval.
2) Data Retrieval (For Every Question)
a) Convert the user’s question into embeddings.
b) Perform a similarity search in the vector database.
c) Fetch the most relevant chunks.
3) Augmented Generation
a) Include only relevant data in the prompt.
b) Generate a fact-grounded answer using the LLM.
RAG Explained – Three Key Steps
19
Let’s Supercharge Our AI Assistant
with RAG!
● Our WSO2Con Assistant can now answer agenda-related and product
related questions.
● But what’s missing?
⦿ Conference venue details
⦿ Information about speakers
⦿ Personalized recommendations based on attendees' interests
⦿ Ability to submit feedback
● Some of these require retrieving information, while others require storing
new data.
Beyond Agenda & Docs – What’s Next?
21
Our Vision for the AI Assistant
22
Speaker
Information
Conference
Agenda
Product
Information
Current
Time
User’s Information
(Name, Interests)
Submit
Feedback
Conference General
Information
GEN AI
Application
● At first glance, it seems like we just need more integrations.
● But think about it…
⦿ Should we load data from all sources for every question?
⦿ What if the user simply says, “Hi!” – do we need all that data?
⦿ How do we store user feedback dynamically?
● What if AI can do the heavy lifting?
How Do We Achieve This?
23
● Instead of static workflows, we use a system that can reason and execute
tools (APIs, functions, databases) dynamically.
⦿ Dynamic Data Retrieval – AI decides whether to query APIs, databases, or external
systems based on user input.
⦿ Intelligent Action Execution – AI can invoke functions, trigger APIs, or update state as
needed.
● These tools act as data sources or actions, chosen in real time by Gen AI.
● This is what we call a Gen AI Agent!
Let’s Make AI Do the Work!
24
1) Agent loads a set of tools + a Gen AI model
2) Each tool has:
a) A name, description, input schema, and execution method
3) The prompt instructs the LLM to reason and select the correct tool.
4) When a user asks a question:
a) The agent decides which tool(s) to use
b) Executes the tool dynamically
c) Uses the output for the next reasoning step
5) This continues until:
a) The task is fully completed
b) The AI has enough information to respond to the user
How Does a Gen AI Agent Work?
25
AI Agent: Example
26
● Question: “Who is speaking about AI at
the conference?”
● Iteration 1:
○ Thought: Find out sessions about AI
○ Action: Fetch the conference agenda
● Iteration 2:
○ Thought: Now figure out speaker
names.
○ Action: Fetch speaker info
● Iteration 3:
○ Thought: I have all info needed
○ Action: Provide answer to the question.
WSO2Con Assistant with AI Agents
Great Job! You made it!
● We've explored three key patterns for building GenAI applications:
○ Gen AI Integrations: Connecting pre-trained models with enterprise systems via APIs.
○ Retrieval-Augmented Generation (RAG): Enhancing AI responses by dynamically
retrieving relevant external data.
○ GenAI Agents: Autonomous systems that can make decisions, and execute tools
dynamically based on the given task.
● We built a GenAI-powered application in just a few minutes—seems
simple, right?
● But despite the excitement, very few GenAI applications actually succeed in
production. Why?
Our Journey So Far…
29
● Many organizations are investing heavily in GenAI applications, but only a
small fraction make it to production.
● What’s going wrong?
⦿ Some see it purely as an AI problem (model tuning, prompting, etc.).
⦿ Others see it solely as an integration problem (APIs, data pipelines).
⦿ The reality? A successful GenAI application requires both AI and integration strategies!
⦿ And no—we’re not talking about traditional AI expertise alone.
A Common Pitfall!
30
● Beyond just solving a valid problem, a production-ready GenAI application
must:
⦿ Deliver accurate, consistent responses
⦿ Maintain acceptable latency for real-time interactions
⦿ Scale efficiently under varying loads
⦿ Securely access data and tools
⦿ Minimize misuse and unintended behavior
⦿ Provide explainability and visibility into its decisions
What Makes a Successful GenAI Application?
31
● What AI strategies can improve accuracy?
⦿ Prompt tuning (a.k.a. prompt engineering)
⦿ Hyperparameter optimization
⦿ Fine-tuning LLMs
● But is that enough? To take it to the next level, can we optimize the
integration!
Improving WSO2Con Assistant
32
● Let’s revisit the previous scenario:
⦿ Question: "Who is speaking about AI at the conference?"
● For an accurate response, the AI Agent must:
⦿ Query conference_agenda to identify AI-related sessions.
⦿ Query speaker_info to retrieve speaker details.
⦿ Map sessions to speakers using speaker IDs.
● Potential Risks:
⦿ Incorrect decision-making could result in returning only speaker IDs.
⦿ Faulty mappings could lead to incorrect speaker names.
● Key Insight: Recognizing these risks requires an AI-aware perspective
Taking A Step Back
33
To Solve This, We Need Better Integrations!
34
● Our modifications bring key benefits:
⦿ Improved Accuracy: Eliminates the risk of returning speaker IDs instead of names
and prevents errors from incorrect mappings.
⦿ Lower Latency: Reduces unnecessary LLM calls and enables parallel execution of API
requests.
⦿ Cost Efficiency: Optimizes token usage and minimizes redundant LLM calls.
● Why AI + Integration Expertise Matters
⦿ Traditional integration best practices may not always optimize AI-powered
applications.
⦿ APIs are typically designed through domain-driven decomposition, but AI Agents
require a different abstraction.
⦿ To build effective AI applications, we must think beyond traditional integrations and
consider AI-driven optimizations.
Integration Expertise to the Rescue!
35
How Can an AI Perspective Help?
● At the start, we explored four key AI-driven experiences:
WSO2Con Assistant | Session Advisor | Attendee Connections | Expert
Finder
● Should we apply the AI Agent pattern to all of them?
● As an integration developer, you might say yes
⦿ More automation is always better!
● But from an AI-first perspective, the decision won’t be that straightforward.
⦿ Session Advisor: Gen AI integration
⦿ Expert Finder: Gen AI integration
⦿ Attendee Connections: Retrieval Augmentation Generation (RAG) + Gen AI Integration
36
● Rosen will share his insights on AI development and its impact on the
industry.
● Afterwards, I’ll walk you through the architecture behind the WSO2Con AI
features and reveal how we moved from local development to production
in just a few hours.
● Finally, I’ll highlight the role of the AI Gateway in securing and optimizing
AI interactions, using the WSO2Con use cases as an example.
After the Break!
37
Question Time!
WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)

More Related Content

PDF
MongoDB World 2018: Building Intelligent Apps with MongoDB & Google Cloud
PDF
A Guide to Generative AI Development.pdf
PDF
Ai design sprint - Finance - Wealth management
PDF
What's Next: Ogilvy x Google Chatbots Partnership
PDF
Generative AI Foundations: AI Skills for the Future of Work
PDF
SkillsFuture Festival at NUS 2019- Artificial Intelligence for Everyone - A P...
PPTX
Salesforce Einstein: Use Cases and Product Features
PDF
Whats Next for Machine Learning
MongoDB World 2018: Building Intelligent Apps with MongoDB & Google Cloud
A Guide to Generative AI Development.pdf
Ai design sprint - Finance - Wealth management
What's Next: Ogilvy x Google Chatbots Partnership
Generative AI Foundations: AI Skills for the Future of Work
SkillsFuture Festival at NUS 2019- Artificial Intelligence for Everyone - A P...
Salesforce Einstein: Use Cases and Product Features
Whats Next for Machine Learning

Similar to WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1) (20)

PDF
H2O Generative AI Starter Track - Support Presentation Slides.pdf
PDF
How Generative AI is Shaping the Future of Software Application Development
PPTX
AI in Software Development.pptx
PDF
Using Data Science to Build an End-to-End Recommendation System
PDF
architecting-ai-in-the-enterprise-apis-and-applications.pdf
PPTX
Generative AI and Large Language Models (LLMs)
PDF
Flink Forward Berlin 2017: Bas Geerdink, Martijn Visser - Fast Data at ING - ...
PDF
楽天技術研究所の次世代AI 技術への挑戦
PDF
Gemini Roadmap for Beginners PDF By ScholarHat
PDF
Fallacies of GenAI by Speaker 3
PDF
How to Build an AI System A Complete Guide.pdf
PDF
How to Build an AI System A Complete Guide.pdf
PDF
Big Data LDN 2018: HOW AUTOMATION CAN ACCELERATE THE DELIVERY OF MACHINE LEAR...
PDF
leewayhertz.com-Generative AI Use cases applications solutions and implementa...
PDF
Generative AI Integration: A Simple Guide
PDF
How to build a generative AI solution A step-by-step guide.pdf
PDF
Salesforce Architect Group, Frederick, United States July 2023 - Generative A...
PDF
AI Digital Marketing Presentation 7-13-23.pdf
PDF
How to build a generative AI solution A step-by-step guide.pdf
H2O Generative AI Starter Track - Support Presentation Slides.pdf
How Generative AI is Shaping the Future of Software Application Development
AI in Software Development.pptx
Using Data Science to Build an End-to-End Recommendation System
architecting-ai-in-the-enterprise-apis-and-applications.pdf
Generative AI and Large Language Models (LLMs)
Flink Forward Berlin 2017: Bas Geerdink, Martijn Visser - Fast Data at ING - ...
楽天技術研究所の次世代AI 技術への挑戦
Gemini Roadmap for Beginners PDF By ScholarHat
Fallacies of GenAI by Speaker 3
How to Build an AI System A Complete Guide.pdf
How to Build an AI System A Complete Guide.pdf
Big Data LDN 2018: HOW AUTOMATION CAN ACCELERATE THE DELIVERY OF MACHINE LEAR...
leewayhertz.com-Generative AI Use cases applications solutions and implementa...
Generative AI Integration: A Simple Guide
How to build a generative AI solution A step-by-step guide.pdf
Salesforce Architect Group, Frederick, United States July 2023 - Generative A...
AI Digital Marketing Presentation 7-13-23.pdf
How to build a generative AI solution A step-by-step guide.pdf
Ad

More from WSO2 (20)

PDF
Demystifying CMS-0057-F - Compliance Made Seamless with WSO2
PDF
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
PDF
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
PDF
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
PDF
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
PDF
Platformless Modernization with Choreo.pdf
PDF
Application Modernization with Choreo for the BFSI Sector
PDF
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
PDF
[Roundtable] Choreo - The AI-Native Internal Developer Platform as a Service
PPTX
WSO2Con 2025 - Building Secure Business Customer and Partner Experience (B2B)...
PPTX
WSO2Con 2025 - Building Secure Customer Experience Apps
PPTX
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
PPTX
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
PPTX
WSO2Con 2025 - Unified Management of Ingress and Egress Across Multiple API G...
PPTX
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
PPTX
WSO2Con 2025 - Architecting Cloud-Native Applications
PDF
Mastering Intelligent Digital Experiences with Platformless Modernization
PDF
Accelerate Enterprise Software Engineering with Platformless
PDF
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
PDF
Driving Innovation: Scania's API Revolution with WSO2
Demystifying CMS-0057-F - Compliance Made Seamless with WSO2
Quantum Threats Are Closer Than You Think – Act Now to Stay Secure
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Build Smarter, Deliver Faster with Choreo - An AI Native Internal Developer P...
Platformless Modernization with Choreo.pdf
Application Modernization with Choreo for the BFSI Sector
Choreo - The AI-Native Internal Developer Platform as a Service: Overview
[Roundtable] Choreo - The AI-Native Internal Developer Platform as a Service
WSO2Con 2025 - Building Secure Business Customer and Partner Experience (B2B)...
WSO2Con 2025 - Building Secure Customer Experience Apps
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
WSO2Con 2025 - AI-Driven API Design, Development, and Consumption with Enhanc...
WSO2Con 2025 - Unified Management of Ingress and Egress Across Multiple API G...
WSO2Con 2025 - How an Internal Developer Platform Lets Developers Focus on Code
WSO2Con 2025 - Architecting Cloud-Native Applications
Mastering Intelligent Digital Experiences with Platformless Modernization
Accelerate Enterprise Software Engineering with Platformless
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
Driving Innovation: Scania's API Revolution with WSO2
Ad

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Machine learning based COVID-19 study performance prediction
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Cloud computing and distributed systems.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
KodekX | Application Modernization Development
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced Soft Computing BINUS July 2025.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Machine learning based COVID-19 study performance prediction
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Cloud computing and distributed systems.
Chapter 3 Spatial Domain Image Processing.pdf
KodekX | Application Modernization Development
Understanding_Digital_Forensics_Presentation.pptx
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Big Data Technologies - Introduction.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
GamePlan Trading System Review: Professional Trader's Honest Take
NewMind AI Monthly Chronicles - July 2025
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced Soft Computing BINUS July 2025.pdf

WSO2Con 2025 - Building AI Applications in the Enterprise (Part 1)

  • 1. Building AI Applications in the Enterprise Nadheesh Jihan Technical Lead WSO2
  • 2. Our Mission Today! I will be taking you on a journey: ● Practical Use-Case Evolution: Guide a real-world use case to a scalable solution. ● Gen AI Drawbacks: Explore challenges and how to address them. ● Key “Gen-AI Patterns”: Learn three essential patterns for building Gen AI apps. ● Hands-On Implementation: Implement each pattern to see it in action. ● Leveraging Integration Expertise: Use integration skills to create successful Gen AI apps. ● AI & Integrations: Understand how AI and integration strategies intersect. 2
  • 3. From Traditional AI to Generative AI
  • 4. What is AI, Gen AI, and LLMs? ● Artificial Intelligence (AI) ⦿ Simulates human intelligence in machines to perform tasks like learning, problem- solving, and decision-making. ● Generative AI (Gen AI) ⦿ A type of AI that creates new, original content (text, images, music) by learning from existing data patterns. ● Large Language Models (LLMs) ⦿ A specific type of Gen AI that understands and generates human text. 4
  • 5. 5 Generative AI: A Significant Leap Forward! 2017 Transformer Architecture - "Attention Is All You Need" paper: revolutionizes AI with Transformer models. 2018-2019 The Rise of LLMs - BERT (Google): Advances language understanding. - GPT-1 & GPT-2 (OpenAI): Breakthroughs in text generation. 2020-2022 The Explosion of Gen AI - GPT-3 (OpenAI): 175 billion parameters, setting new benchmarks. - RAG Paper: Enhances LLMs with external data retrieval. 2023-2024 - ChatGPT: Makes AI accessible to everyone. - LangChain & ReAct: Frameworks for building Gen AI applications and multi-agent systems. - Gen AI APIs: Widespread availability of pre- trained models via simple API integrations Present & Beyond The Agentic Era - Explosion of Gen AI Models, Frameworks, and Multi-Agent Systems - Platforms are evolving to enable Gen AI applications Mainstream Adoption & Frameworks
  • 6. Business Value: What’s Changed? ● Building AI Applications was Previously: ⦿ Complex, time-consuming, and required specialized knowledge in AI, ML, Deep Learning, Data Science, etc. ● With Gen AI: ⦿ No need for deep AI/ML expertise. ⦿ Gen AI models are pre-trained and easily accessible through APIs. Building AI applications is now all about coding and integrations! 6
  • 7. Do You Want to Build an AI Application?
  • 8. Enhancing WSO2Con with AI We’ve integrated AI-driven features into the WSO2Con mobile app to improve your conference experience: WSO2Con Assistant: Get real-time answers to your questions about conference. Session Advisor: Receive personalized session recommendations based on your interests. Attendee Connections: Helps to connect with attendees who share similar interests. Expert Finder: Discover WSO2 O2Bar experts to discuss your specific technical needs. A Real-World AI Use Case 8
  • 9. Enhancing WSO2Con with AI We’ve integrated AI-driven features into the WSO2Con mobile app to improve your conference experience: WSO2Con Assistant: Get real-time answers to your questions about conference. Session Advisor: Receive personalized session recommendations based on your interests. Attendee Connections: Helps to connect with attendees who share similar interests. Expert Finder: Discover WSO2 O2Bar experts to discuss your specific technical needs. A Real-World AI Use Case 9
  • 10. ● Building the WSO2Con Assistant ○ We have Generative AI models—so how hard can it be? ● A prompt is simply: ○ Instructions, context or questions that guides the model to generate a relevant response Brainstorming! 10 Question Answer Prompt Response
  • 11. Let’s Start: Building the WSO2Con AI Assistant
  • 12. ● Gen AI models have a knowledge cut-off. ⦿ They only "know" up to the point of their last training data. ● Key Warning: ⦿ They don’t provide facts—they generate responses based on patterns. ⦿ Hallucinations are a real risk. ● So how do we add knowledge to a Gen AI model? It Doesn’t Have All the Answers! 12
  • 13. ● Fine-tuning can update Gen AI model with new knowledge. ● Require some expertise on how to: ⦿ Structure the data ⦿ Tune hyperparameters (epochs, learning rate, etc.) ● Takes time & isn't real-time ● Not ideal for WSO2Con Assistant Conference agendas change → frequently! Can We Train It to "Know" More? 13
  • 14. ● Grounding the Model with Facts ⦿ Instead of fine-tuning, we can inject real-time data into the prompt: ● Prompt = Instructions + Question + Live Data (Conference Agenda) ● How do we get the latest conference agenda? ⦿ It’s just another integration! In-Context Learning – A Simpler Approach 14 Question Answer Question Answer Prompt Response Request Agenda Agenda
  • 15. WSO2Con AI Assistant with Knowledge Integration
  • 16. ● The assistant answers questions correctly using real-time agenda data. ⦿ But what if users ask about WSO2 products? ● We need more data sources—but there’s a challenge! Level Unlocked: AI Application Builder 16 Dall-E generated
  • 17. ● LLMs can’t process unlimited data in one go! ⦿ For example: GPT-4o has a 128k token limit (input + output). ● That may seem like a lot, but… ⦿ 📉 Accuracy drops if we stuff too much data. ⦿ 🕒 Response time increases with longer prompts. ⦿ 💰 Costs go up as we send larger requests. ● We need a better approach! The Challenge – LLMs Have Token Limits 17
  • 18. ● Instead of stuffing all data into the prompt… ● Retrieve only the most relevant data on demand! ⦿ Efficient – Only fetch what’s needed. ⦿ Accurate – Uses up-to-date, context-aware data. ⦿ Scalable – Works even with massive datasets. ● But how does it work? Let’s break it down… Retrieval-Augmented Generation (RAG) 18 Databases Online Data Sources LLM Search and Retrieval Chatbot User 1 2 3 4 5
  • 19. 1) Data Ingestion (Happens Once) a) Chunk the information into smaller, meaningful sections. b) Convert each chunk into embeddings using an embedding model. c) Store embeddings in a vector database for efficient retrieval. 2) Data Retrieval (For Every Question) a) Convert the user’s question into embeddings. b) Perform a similarity search in the vector database. c) Fetch the most relevant chunks. 3) Augmented Generation a) Include only relevant data in the prompt. b) Generate a fact-grounded answer using the LLM. RAG Explained – Three Key Steps 19
  • 20. Let’s Supercharge Our AI Assistant with RAG!
  • 21. ● Our WSO2Con Assistant can now answer agenda-related and product related questions. ● But what’s missing? ⦿ Conference venue details ⦿ Information about speakers ⦿ Personalized recommendations based on attendees' interests ⦿ Ability to submit feedback ● Some of these require retrieving information, while others require storing new data. Beyond Agenda & Docs – What’s Next? 21
  • 22. Our Vision for the AI Assistant 22 Speaker Information Conference Agenda Product Information Current Time User’s Information (Name, Interests) Submit Feedback Conference General Information GEN AI Application
  • 23. ● At first glance, it seems like we just need more integrations. ● But think about it… ⦿ Should we load data from all sources for every question? ⦿ What if the user simply says, “Hi!” – do we need all that data? ⦿ How do we store user feedback dynamically? ● What if AI can do the heavy lifting? How Do We Achieve This? 23
  • 24. ● Instead of static workflows, we use a system that can reason and execute tools (APIs, functions, databases) dynamically. ⦿ Dynamic Data Retrieval – AI decides whether to query APIs, databases, or external systems based on user input. ⦿ Intelligent Action Execution – AI can invoke functions, trigger APIs, or update state as needed. ● These tools act as data sources or actions, chosen in real time by Gen AI. ● This is what we call a Gen AI Agent! Let’s Make AI Do the Work! 24
  • 25. 1) Agent loads a set of tools + a Gen AI model 2) Each tool has: a) A name, description, input schema, and execution method 3) The prompt instructs the LLM to reason and select the correct tool. 4) When a user asks a question: a) The agent decides which tool(s) to use b) Executes the tool dynamically c) Uses the output for the next reasoning step 5) This continues until: a) The task is fully completed b) The AI has enough information to respond to the user How Does a Gen AI Agent Work? 25
  • 26. AI Agent: Example 26 ● Question: “Who is speaking about AI at the conference?” ● Iteration 1: ○ Thought: Find out sessions about AI ○ Action: Fetch the conference agenda ● Iteration 2: ○ Thought: Now figure out speaker names. ○ Action: Fetch speaker info ● Iteration 3: ○ Thought: I have all info needed ○ Action: Provide answer to the question.
  • 28. Great Job! You made it!
  • 29. ● We've explored three key patterns for building GenAI applications: ○ Gen AI Integrations: Connecting pre-trained models with enterprise systems via APIs. ○ Retrieval-Augmented Generation (RAG): Enhancing AI responses by dynamically retrieving relevant external data. ○ GenAI Agents: Autonomous systems that can make decisions, and execute tools dynamically based on the given task. ● We built a GenAI-powered application in just a few minutes—seems simple, right? ● But despite the excitement, very few GenAI applications actually succeed in production. Why? Our Journey So Far… 29
  • 30. ● Many organizations are investing heavily in GenAI applications, but only a small fraction make it to production. ● What’s going wrong? ⦿ Some see it purely as an AI problem (model tuning, prompting, etc.). ⦿ Others see it solely as an integration problem (APIs, data pipelines). ⦿ The reality? A successful GenAI application requires both AI and integration strategies! ⦿ And no—we’re not talking about traditional AI expertise alone. A Common Pitfall! 30
  • 31. ● Beyond just solving a valid problem, a production-ready GenAI application must: ⦿ Deliver accurate, consistent responses ⦿ Maintain acceptable latency for real-time interactions ⦿ Scale efficiently under varying loads ⦿ Securely access data and tools ⦿ Minimize misuse and unintended behavior ⦿ Provide explainability and visibility into its decisions What Makes a Successful GenAI Application? 31
  • 32. ● What AI strategies can improve accuracy? ⦿ Prompt tuning (a.k.a. prompt engineering) ⦿ Hyperparameter optimization ⦿ Fine-tuning LLMs ● But is that enough? To take it to the next level, can we optimize the integration! Improving WSO2Con Assistant 32
  • 33. ● Let’s revisit the previous scenario: ⦿ Question: "Who is speaking about AI at the conference?" ● For an accurate response, the AI Agent must: ⦿ Query conference_agenda to identify AI-related sessions. ⦿ Query speaker_info to retrieve speaker details. ⦿ Map sessions to speakers using speaker IDs. ● Potential Risks: ⦿ Incorrect decision-making could result in returning only speaker IDs. ⦿ Faulty mappings could lead to incorrect speaker names. ● Key Insight: Recognizing these risks requires an AI-aware perspective Taking A Step Back 33
  • 34. To Solve This, We Need Better Integrations! 34
  • 35. ● Our modifications bring key benefits: ⦿ Improved Accuracy: Eliminates the risk of returning speaker IDs instead of names and prevents errors from incorrect mappings. ⦿ Lower Latency: Reduces unnecessary LLM calls and enables parallel execution of API requests. ⦿ Cost Efficiency: Optimizes token usage and minimizes redundant LLM calls. ● Why AI + Integration Expertise Matters ⦿ Traditional integration best practices may not always optimize AI-powered applications. ⦿ APIs are typically designed through domain-driven decomposition, but AI Agents require a different abstraction. ⦿ To build effective AI applications, we must think beyond traditional integrations and consider AI-driven optimizations. Integration Expertise to the Rescue! 35
  • 36. How Can an AI Perspective Help? ● At the start, we explored four key AI-driven experiences: WSO2Con Assistant | Session Advisor | Attendee Connections | Expert Finder ● Should we apply the AI Agent pattern to all of them? ● As an integration developer, you might say yes ⦿ More automation is always better! ● But from an AI-first perspective, the decision won’t be that straightforward. ⦿ Session Advisor: Gen AI integration ⦿ Expert Finder: Gen AI integration ⦿ Attendee Connections: Retrieval Augmentation Generation (RAG) + Gen AI Integration 36
  • 37. ● Rosen will share his insights on AI development and its impact on the industry. ● Afterwards, I’ll walk you through the architecture behind the WSO2Con AI features and reveal how we moved from local development to production in just a few hours. ● Finally, I’ll highlight the role of the AI Gateway in securing and optimizing AI interactions, using the WSO2Con use cases as an example. After the Break! 37

Editor's Notes

  • #28: 1 hour milestone
  • #29: You can learn more! Different prompt techniques (e.g. few shot, chain of thoughts,...) Try different LLMs Different Agent protocols, and frameworks (E.g. crewai, langchain, autogen) Adding memory into your Gen AI application