SlideShare uma empresa Scribd logo
1 de 24
Baixar para ler 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/

Mais conteúdo relacionado

Mais procurados

Introduction to Chat GPT
Introduction to Chat GPTIntroduction to Chat GPT
Introduction to Chat GPTDianaGray10
 
How ChatGPT and AI-assisted coding changes software engineering profoundly
How ChatGPT and AI-assisted coding changes software engineering profoundlyHow ChatGPT and AI-assisted coding changes software engineering profoundly
How ChatGPT and AI-assisted coding changes software engineering profoundlyPekka Abrahamsson / Tampere University
 
Prompting is an art / Sztuka promptowania
Prompting is an art / Sztuka promptowaniaPrompting is an art / Sztuka promptowania
Prompting is an art / Sztuka promptowaniaMichal Jaskolski
 
Why Python?
Why Python?Why Python?
Why Python?Adam Pah
 
ChatGPT-the-revolution-is-coming.pdf
ChatGPT-the-revolution-is-coming.pdfChatGPT-the-revolution-is-coming.pdf
ChatGPT-the-revolution-is-coming.pdfLiang Yan
 
Chain-of-thought Prompting.pptx
Chain-of-thought Prompting.pptxChain-of-thought Prompting.pptx
Chain-of-thought Prompting.pptxNeethaSherra1
 
Word representation: SVD, LSA, Word2Vec
Word representation: SVD, LSA, Word2VecWord representation: SVD, LSA, Word2Vec
Word representation: SVD, LSA, Word2Vecananth
 
How AI is going to change the world _M.Mujeeb Riaz.pdf
How AI is going to change the world _M.Mujeeb Riaz.pdfHow AI is going to change the world _M.Mujeeb Riaz.pdf
How AI is going to change the world _M.Mujeeb Riaz.pdfMujeeb Riaz
 
GitHub Copilot.pptx
GitHub Copilot.pptxGitHub Copilot.pptx
GitHub Copilot.pptxLuis Beltran
 
What is chat gpt advance guide.docx
What is chat gpt advance guide.docxWhat is chat gpt advance guide.docx
What is chat gpt advance guide.docxVersionsol
 
Making Testing Easy w GitHub Copilot.pdf
Making Testing Easy w GitHub Copilot.pdfMaking Testing Easy w GitHub Copilot.pdf
Making Testing Easy w GitHub Copilot.pdfApplitools
 
LangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AILangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AIOzgurOscarOzkan
 
Build an LLM-powered application using LangChain.pdf
Build an LLM-powered application using LangChain.pdfBuild an LLM-powered application using LangChain.pdf
Build an LLM-powered application using LangChain.pdfAnastasiaSteele10
 
LanGCHAIN Framework
LanGCHAIN FrameworkLanGCHAIN Framework
LanGCHAIN FrameworkKeymate.AI
 

Mais procurados (20)

Introduction to Chat GPT
Introduction to Chat GPTIntroduction to Chat GPT
Introduction to Chat GPT
 
AzureOpenAI.pptx
AzureOpenAI.pptxAzureOpenAI.pptx
AzureOpenAI.pptx
 
How ChatGPT and AI-assisted coding changes software engineering profoundly
How ChatGPT and AI-assisted coding changes software engineering profoundlyHow ChatGPT and AI-assisted coding changes software engineering profoundly
How ChatGPT and AI-assisted coding changes software engineering profoundly
 
Prompting is an art / Sztuka promptowania
Prompting is an art / Sztuka promptowaniaPrompting is an art / Sztuka promptowania
Prompting is an art / Sztuka promptowania
 
Why Python?
Why Python?Why Python?
Why Python?
 
ChatGPT-the-revolution-is-coming.pdf
ChatGPT-the-revolution-is-coming.pdfChatGPT-the-revolution-is-coming.pdf
ChatGPT-the-revolution-is-coming.pdf
 
Chain-of-thought Prompting.pptx
Chain-of-thought Prompting.pptxChain-of-thought Prompting.pptx
Chain-of-thought Prompting.pptx
 
Chatbot Basics for Customer Communication
Chatbot Basics for Customer CommunicationChatbot Basics for Customer Communication
Chatbot Basics for Customer Communication
 
Word representation: SVD, LSA, Word2Vec
Word representation: SVD, LSA, Word2VecWord representation: SVD, LSA, Word2Vec
Word representation: SVD, LSA, Word2Vec
 
How AI is going to change the world _M.Mujeeb Riaz.pdf
How AI is going to change the world _M.Mujeeb Riaz.pdfHow AI is going to change the world _M.Mujeeb Riaz.pdf
How AI is going to change the world _M.Mujeeb Riaz.pdf
 
Introduction to ChatGPT and Overview of its capabilities and functionality.pdf
Introduction to ChatGPT and Overview of its capabilities and functionality.pdfIntroduction to ChatGPT and Overview of its capabilities and functionality.pdf
Introduction to ChatGPT and Overview of its capabilities and functionality.pdf
 
GitHub Copilot.pptx
GitHub Copilot.pptxGitHub Copilot.pptx
GitHub Copilot.pptx
 
What is chat gpt advance guide.docx
What is chat gpt advance guide.docxWhat is chat gpt advance guide.docx
What is chat gpt advance guide.docx
 
Generative AI
Generative AIGenerative AI
Generative AI
 
Making Testing Easy w GitHub Copilot.pdf
Making Testing Easy w GitHub Copilot.pdfMaking Testing Easy w GitHub Copilot.pdf
Making Testing Easy w GitHub Copilot.pdf
 
LangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AILangChain Intro by KeyMate.AI
LangChain Intro by KeyMate.AI
 
Build an LLM-powered application using LangChain.pdf
Build an LLM-powered application using LangChain.pdfBuild an LLM-powered application using LangChain.pdf
Build an LLM-powered application using LangChain.pdf
 
Chat bot in_pythion
Chat bot in_pythionChat bot in_pythion
Chat bot in_pythion
 
CHATGPT.pptx
CHATGPT.pptxCHATGPT.pptx
CHATGPT.pptx
 
LanGCHAIN Framework
LanGCHAIN FrameworkLanGCHAIN Framework
LanGCHAIN Framework
 

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

The Python in the Apple
The Python in the AppleThe Python in the Apple
The Python in the ApplezeroSteiner
 
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 onlineGaruda Trainings
 
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 FrameworkLibbySchulze
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development SecuritySam Bowne
 
Discovering Vulnerabilities For Fun and Profit
Discovering Vulnerabilities For Fun and ProfitDiscovering Vulnerabilities For Fun and Profit
Discovering Vulnerabilities For Fun and ProfitAbhisek Datta
 
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 awesomeMetosin Oy
 
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 PlatformYinlin Chen
 
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 SecuritySam Bowne
 
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 LambdaAmazon Web Services
 
Azure Digital Twins 2.0
Azure Digital Twins 2.0Azure Digital Twins 2.0
Azure Digital Twins 2.0Marco Parenzan
 
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...Tokyo Azure Meetup
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development SecuritySam Bowne
 
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?Dan Sullivan, Ph.D.
 
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)Igor Talevski
 

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

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
 
Microservices
MicroservicesMicroservices
Microservices
 

Último

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

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/