SlideShare a Scribd company logo
1 of 24
Download to read offline
Do you need Python to play
with LLM?
Marco De Nittis
Independent cloud architect
marco.denittis [a] gmail.com | @mdnmdn
First steps with Semantic Kernel
Who am I?
• Independent cloud architect
• Trainer
• ❤ cloud, serverless, devops, AI, wasm
• Curious and tinkerer
Objectives
• A gentle introduction to LLM-ized apps
• First steps with Semantic Kernel
BTW what is a LLM?
• Probabilistic engine: most probable text
response from input
• according to the corpus
• Pure function (almost)
• No dynamic/short term memory
string llm(string input,…){
…
}
Why in our app?
• Add some kind of intelligence
• Retrieve and summary info semantically
• Understand unstructured input
• Generate “creative” data
How
• Train custom AI model
• Refine existing models
• Consume 3rd party models via API
• OpenAI
• Azure AI services
• Hugging face
• …
Semantic Kernel …what?
• Integrate AI services with apps
• Open source SDK
• By Microsoft with ❤
• Enhance base functionality of AI API
• High level functions
• Overlaps with python fwk as langchain
• Multiplaform
• Features
• Connectivity to AI services
• Custom “functions" to empower AI
• Integrated memory support
• Orchestrate AI to use all features available
• Assistants API
Semantic Kernel 2
NEW
MangoBot
• Discord Bot
• Community helper
• AI driven
Demo
First steps
Architecture
• Connectors:
• consume AI model, vector DBs
• Plugins:
• Provide LLM enhancements
• “Make a summary”, “Sentiment analysis”
• Integrates with external systems
• “Send a message”, “List of discord users"
Plugins/functions
• Plugins: group of functions
• Functions: enhance model capabilities
• AI, prompt based:
• “Summarize”, “Write an haiku"
• Code based:
• “GetTime”, “Send a message”, “Search in internet”
Memory of a LLM
• LLMs have no memory
• Several techniques to provide custom data:
• Include all infos in prompt
• Eg: all messages of chat
• Retrieval Augmented Generation (RAG)
• Vector DB + Semantic Search
• Fine tuning
RAG
• Include in prompt only relevant data
• Data are semantically searchable in a vector DB
• Embeddings:
• conversion from text to a vector of floats
• Coordinates in a “space of concepts”
• Vector DB makes vector searchable by similarity
RAG
Demo
Memory
Semantic Kernel functions
• Specialized Behaviours
• Zero or more input parameters
• Text output
• Controlled and invoked by the LLM
• Function and parameters are decorated with text description to
be understood and used by an LLM
Semantic Functions
• Functions "executed" in an LLM
• Eg: “SummarizeText"
• Based on prompt engineering
• Modes:
• Inline (strings in C#)
• Textual/templated: defined by text + json metadata
Native Function
• Expose capabilities provided via code:
• GetTime
• Send a mail
• Access internet
• Function and parameters decorated via textual descriptions
• 2 degrees of intelligence:
• Code inside the function
• Elaboration of result by AI
Planners
• Orchestrates chains of functions
• Let the AI decide:
• Which functions to call
• How use the parameters/results
• How to compose them
• Awesome results
• Cost intensive
Demo
Planner for complex actions
Challenges
• Let act the LLM in a efficient way
• Prompt injection
• Appropriate handling of business data
• Predictability
• Cost management
• Sustainability
Thank you 🙇
• Questions?
• Feedback:
• https://speakerscore.it/NET23-SK
• Code:
• https://github.com/mdnmdn/netconf-ita-2023-semantic-kernel-mangobot/
@mdnmdn
marco.denittis [a] gmail.com
Slide e materiale su
https://www.dotnetconference.it/

More Related Content

What's hot

Inside vacuum - 第一回PostgreSQLプレ勉強会
Inside vacuum - 第一回PostgreSQLプレ勉強会Inside vacuum - 第一回PostgreSQLプレ勉強会
Inside vacuum - 第一回PostgreSQLプレ勉強会
Masahiko Sawada
 

What's hot (20)

Inside vacuum - 第一回PostgreSQLプレ勉強会
Inside vacuum - 第一回PostgreSQLプレ勉強会Inside vacuum - 第一回PostgreSQLプレ勉強会
Inside vacuum - 第一回PostgreSQLプレ勉強会
 
Kakao Cloud Native Platform, 9rum
Kakao Cloud Native Platform, 9rumKakao Cloud Native Platform, 9rum
Kakao Cloud Native Platform, 9rum
 
MySQL SYSスキーマのご紹介
MySQL SYSスキーマのご紹介MySQL SYSスキーマのご紹介
MySQL SYSスキーマのご紹介
 
Escalabilidade, Sharding, Paralelismo e Bigdata com PostgreSQL? Yes, we can!
Escalabilidade, Sharding, Paralelismo e Bigdata com PostgreSQL? Yes, we can!Escalabilidade, Sharding, Paralelismo e Bigdata com PostgreSQL? Yes, we can!
Escalabilidade, Sharding, Paralelismo e Bigdata com PostgreSQL? Yes, we can!
 
Oracleからamazon auroraへの移行にむけて
Oracleからamazon auroraへの移行にむけてOracleからamazon auroraへの移行にむけて
Oracleからamazon auroraへの移行にむけて
 
Nagios
NagiosNagios
Nagios
 
Infrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfraInfrastructure testing with Molecule and TestInfra
Infrastructure testing with Molecule and TestInfra
 
GraphQL入門 (AWS AppSync)
GraphQL入門 (AWS AppSync)GraphQL入門 (AWS AppSync)
GraphQL入門 (AWS AppSync)
 
今だから!Amazon CloudFront 徹底活用
今だから!Amazon CloudFront 徹底活用今だから!Amazon CloudFront 徹底活用
今だから!Amazon CloudFront 徹底活用
 
AWS で Presto を徹底的に使いこなすワザ
AWS で Presto を徹底的に使いこなすワザAWS で Presto を徹底的に使いこなすワザ
AWS で Presto を徹底的に使いこなすワザ
 
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
Architecting ASP.NET Core Microservices Applications on AWS (WIN401) - AWS re...
 
[Cloud OnAir] Google Networking Deep Dive ! その技術と設計の紹介 2018年8月9日 放送
[Cloud OnAir] Google Networking Deep Dive ! その技術と設計の紹介 2018年8月9日 放送[Cloud OnAir] Google Networking Deep Dive ! その技術と設計の紹介 2018年8月9日 放送
[Cloud OnAir] Google Networking Deep Dive ! その技術と設計の紹介 2018年8月9日 放送
 
Fargate起動歴1日の男が語る運用の勘どころ
Fargate起動歴1日の男が語る運用の勘どころFargate起動歴1日の男が語る運用の勘どころ
Fargate起動歴1日の男が語る運用の勘どころ
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning
 
Hadoop and Kerberos
Hadoop and KerberosHadoop and Kerberos
Hadoop and Kerberos
 
Docker管理もHinemosで! ~監視・ジョブ機能を併せ持つ唯一のOSS「Hinemos」のご紹介~
Docker管理もHinemosで! ~監視・ジョブ機能を併せ持つ唯一のOSS「Hinemos」のご紹介~Docker管理もHinemosで! ~監視・ジョブ機能を併せ持つ唯一のOSS「Hinemos」のご紹介~
Docker管理もHinemosで! ~監視・ジョブ機能を併せ持つ唯一のOSS「Hinemos」のご紹介~
 
Amazon VPCトレーニング-VPCの説明
Amazon VPCトレーニング-VPCの説明Amazon VPCトレーニング-VPCの説明
Amazon VPCトレーニング-VPCの説明
 
The Deep Learning Compiler
The Deep Learning CompilerThe Deep Learning Compiler
The Deep Learning Compiler
 
CUDAプログラミング入門
CUDAプログラミング入門CUDAプログラミング入門
CUDAプログラミング入門
 
OpenStack Trove 技術解説
OpenStack Trove 技術解説OpenStack Trove 技術解説
OpenStack Trove 技術解説
 

Similar to Semantic kernel - Do you need Python to play with LLM?

Dot net Online Training | .Net Training and Placement online
Dot net Online Training | .Net Training and Placement onlineDot net Online Training | .Net Training and Placement online
Dot net Online Training | .Net Training and Placement online
Garuda Trainings
 

Similar to Semantic kernel - Do you need Python to play with LLM? (20)

Integrate LLM in your applications 101
Integrate LLM in your applications 101 Integrate LLM in your applications 101
Integrate LLM in your applications 101
 
Logic appsforbeginners
Logic appsforbeginnersLogic appsforbeginners
Logic appsforbeginners
 
David buksbaum a-briefintroductiontocsharp
David buksbaum a-briefintroductiontocsharpDavid buksbaum a-briefintroductiontocsharp
David buksbaum a-briefintroductiontocsharp
 
The Python in the Apple
The Python in the AppleThe Python in the Apple
The Python in the Apple
 
Dot net Online Training | .Net Training and Placement online
Dot net Online Training | .Net Training and Placement onlineDot net Online Training | .Net Training and Placement online
Dot net Online Training | .Net Training and Placement online
 
Toward Hybrid Cloud Serverless Transparency with Lithops Framework
Toward Hybrid Cloud Serverless Transparency with Lithops FrameworkToward Hybrid Cloud Serverless Transparency with Lithops Framework
Toward Hybrid Cloud Serverless Transparency with Lithops Framework
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
Discovering Vulnerabilities For Fun and Profit
Discovering Vulnerabilities For Fun and ProfitDiscovering Vulnerabilities For Fun and Profit
Discovering Vulnerabilities For Fun and Profit
 
ClojuTRE2015: Kekkonen - making your Clojure web APIs more awesome
ClojuTRE2015: Kekkonen - making your Clojure web APIs more awesomeClojuTRE2015: Kekkonen - making your Clojure web APIs more awesome
ClojuTRE2015: Kekkonen - making your Clojure web APIs more awesome
 
A Multi-Tenancy Cloud-Native Digital Library Platform
A Multi-Tenancy Cloud-Native Digital Library PlatformA Multi-Tenancy Cloud-Native Digital Library Platform
A Multi-Tenancy Cloud-Native Digital Library Platform
 
Serverless Node.js
Serverless Node.jsServerless Node.js
Serverless Node.js
 
CISSP Prep: Ch 9. Software Development Security
CISSP Prep: Ch 9. Software Development SecurityCISSP Prep: Ch 9. Software Development Security
CISSP Prep: Ch 9. Software Development Security
 
Convert Your Code into a Microservice using AWS Lambda
Convert Your Code into a Microservice using AWS LambdaConvert Your Code into a Microservice using AWS Lambda
Convert Your Code into a Microservice using AWS Lambda
 
Azure Digital Twins 2.0
Azure Digital Twins 2.0Azure Digital Twins 2.0
Azure Digital Twins 2.0
 
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
Tokyo Azure Meetup #7 - Introduction to Serverless Architectures with Azure F...
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
With Automated ML, is Everyone an ML Engineer?
With Automated ML, is Everyone an ML Engineer?With Automated ML, is Everyone an ML Engineer?
With Automated ML, is Everyone an ML Engineer?
 
MongoDB Basics
MongoDB BasicsMongoDB Basics
MongoDB Basics
 
TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)
 
OMP GSE
OMP GSEOMP GSE
OMP GSE
 

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Recently uploaded (20)

State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
Top 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development CompaniesTop 10 CodeIgniter Development Companies
Top 10 CodeIgniter Development Companies
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Introduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptxIntroduction to FIDO Authentication and Passkeys.pptx
Introduction to FIDO Authentication and Passkeys.pptx
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
الأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهلهالأمن السيبراني - ما لا يسع للمستخدم جهله
الأمن السيبراني - ما لا يسع للمستخدم جهله
 

Semantic kernel - Do you need Python to play with LLM?

  • 1. Do you need Python to play with LLM? Marco De Nittis Independent cloud architect marco.denittis [a] gmail.com | @mdnmdn First steps with Semantic Kernel
  • 2. Who am I? • Independent cloud architect • Trainer • ❤ cloud, serverless, devops, AI, wasm • Curious and tinkerer
  • 3. Objectives • A gentle introduction to LLM-ized apps • First steps with Semantic Kernel
  • 4. BTW what is a LLM? • Probabilistic engine: most probable text response from input • according to the corpus • Pure function (almost) • No dynamic/short term memory string llm(string input,…){ … }
  • 5. Why in our app? • Add some kind of intelligence • Retrieve and summary info semantically • Understand unstructured input • Generate “creative” data
  • 6. How • Train custom AI model • Refine existing models • Consume 3rd party models via API • OpenAI • Azure AI services • Hugging face • …
  • 7. Semantic Kernel …what? • Integrate AI services with apps • Open source SDK • By Microsoft with ❤ • Enhance base functionality of AI API • High level functions • Overlaps with python fwk as langchain
  • 8. • Multiplaform • Features • Connectivity to AI services • Custom “functions" to empower AI • Integrated memory support • Orchestrate AI to use all features available • Assistants API Semantic Kernel 2 NEW
  • 9. MangoBot • Discord Bot • Community helper • AI driven
  • 11. Architecture • Connectors: • consume AI model, vector DBs • Plugins: • Provide LLM enhancements • “Make a summary”, “Sentiment analysis” • Integrates with external systems • “Send a message”, “List of discord users"
  • 12. Plugins/functions • Plugins: group of functions • Functions: enhance model capabilities • AI, prompt based: • “Summarize”, “Write an haiku" • Code based: • “GetTime”, “Send a message”, “Search in internet”
  • 13. Memory of a LLM • LLMs have no memory • Several techniques to provide custom data: • Include all infos in prompt • Eg: all messages of chat • Retrieval Augmented Generation (RAG) • Vector DB + Semantic Search • Fine tuning
  • 14. RAG • Include in prompt only relevant data • Data are semantically searchable in a vector DB • Embeddings: • conversion from text to a vector of floats • Coordinates in a “space of concepts” • Vector DB makes vector searchable by similarity
  • 15. RAG
  • 17. Semantic Kernel functions • Specialized Behaviours • Zero or more input parameters • Text output • Controlled and invoked by the LLM • Function and parameters are decorated with text description to be understood and used by an LLM
  • 18. Semantic Functions • Functions "executed" in an LLM • Eg: “SummarizeText" • Based on prompt engineering • Modes: • Inline (strings in C#) • Textual/templated: defined by text + json metadata
  • 19. Native Function • Expose capabilities provided via code: • GetTime • Send a mail • Access internet • Function and parameters decorated via textual descriptions • 2 degrees of intelligence: • Code inside the function • Elaboration of result by AI
  • 20. Planners • Orchestrates chains of functions • Let the AI decide: • Which functions to call • How use the parameters/results • How to compose them • Awesome results • Cost intensive
  • 22. Challenges • Let act the LLM in a efficient way • Prompt injection • Appropriate handling of business data • Predictability • Cost management • Sustainability
  • 23. Thank you 🙇 • Questions? • Feedback: • https://speakerscore.it/NET23-SK • Code: • https://github.com/mdnmdn/netconf-ita-2023-semantic-kernel-mangobot/
  • 24. @mdnmdn marco.denittis [a] gmail.com Slide e materiale su https://www.dotnetconference.it/