Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

C# + Semantic Kernel + OpenAI: Building Smarter...

Avatar for Kardel Ruveyda Kardel Ruveyda
December 06, 2025
1

C# + Semantic Kernel + OpenAI: Building Smarter AI Agents with MongoDB Atlas

Avatar for Kardel Ruveyda

Kardel Ruveyda

December 06, 2025
Tweet

Transcript

  1. C# + SEMANTİC KERNEL + OPENAI: BUİLDİNG SMARTER AI AGENTS

    WİTH MONGODB ATLAS Kardel Rüveyda Çetin Software Development Lead Microsoft MVP
  2. BEN KİMİM? 2023- 2025 YILDIZ TECHNICAL UNIVERSİTY Mathematical Engineering (Licentiate

    Degree) YILDIZ TECHNICAL UNIVERSİTY Computer Engineering/IT (Master's Degree (Non-Thesis)) 2013-2018 2019-2020 YILDIZ TECHNICAL UNIVERSİTY Mathematical Engineering (Master's Degree (Thesis)) 2021-.. DOĞUŞ TEKNOLOJİ Software Support Asistant Specialist Software Asistant Specialist Software Specialist 2018-2021 KARİYER.NET Software Specialist Senior Software Specialist Expert Software Engineer Software Development Lead Mavi (2016) Overtech (2017) INTERNSHIPS Junior Frontend Developer 2018 ICONEC WAVE X: @kardelanite in: kardelruveydacetin
  3. Why did I choose this topic? 2024 ML.Net Dotnet Konferansı

    2024 OpenAI .NET API Developer Summit 2025 Semantic Kernel, MCP Dotnet Konferansı 2025 AutoGen: The Programming Framework for Agentic AI Developer Summit
  4. Why did I choose this topic? GenAI Bot Geliştirme Faaliyetleri

    Yapay Zeka işimizi elimizden mi alacak? Tez Sürecim Projelerimize yapay zekayı bir şekilde entegre etmemiz gerektiğinin farkındalığı .NET ekosisteminde bir chatbot oluşturma isteği ve merakı
  5. BABY STEPS LangChain is a framework for developing applications powered

    by large language models (LLMs). It was developed over the past 2 years!
  6. HARD STEPS LangChain's innovation, LangGraph, is built on LangChain and

    is designed to offer users more advanced agent runtimes.
  7. The Evolution of AI Interaction Let's start by defining where

    we are. We all know Chatbots. They are amazing conversationalists. You ask a question, and they give an answer based on what they learned during training.
  8. Enter the AI Agents This is where AI Agents come

    in. If Chatbots are the 'Brain', Agents are the 'Brain' plus 'Hands'. An Agent is an AI system that can reason (think), plan, and most importantly, use tools. It doesn't just talk; it acts. It can read files. It can call APIs (like GitHub). It can query databases (like MongoDB). It can create files on your desktop. IT BREAKS OUT OF THE CHAT WİNDOW AND IT BREAKS OUT OF THE CHAT WİNDOW AND İNTERACTS WİTH THE REAL WORLD." İNTERACTS WİTH THE REAL WORLD."‌ ‌ IT BREAKS OUT OF THE CHAT WİNDOW AND İNTERACTS WİTH THE REAL WORLD."‌
  9. What is the technical difference? An Agent, however, runs in

    a Loop. Observe: It looks at the user's request. Reason: It thinks, 'What do I need to solve this?' Act: It selects the right tool (Plugin) and uses it. Reflect: It looks at the result. Is it enough? If not, it loops back and tries another tool. A Chatbot follows a simple linear path: Input -> Processing -> Output.
  10. Artificial Intelligence and the Concept of Agency While traditional automation

    systems only follow specific rules, artificial intelligence models can develop new solutions based on the situation.
  11. AI and the Concept of Agency One agent handles reservations,

    Another sends invitations, Another manages the guest list, Another sets up the seating arrangement. In a wedding organization, there are many tasks such as venue reservation, guest list, meal plan, and seating arrangement. Each of these tasks is carried out by a “person in charge.” Similarly, in an Agentic AI system, each task can be handled by a different artificial intelligence agent: Multi-agent workflow
  12. Baby vs LLM ? Baby: The more you talk to

    me, the more I learn and understand. So be careful what you say. I can imitate you. But I can't answer something you haven't taught me. For example, if you ask me for my Turkish ID number, I won't know it LLM: The more information you give me, the more I learn and understand. That's why I say pay attention to the information you give me. I can imitate you, but I can't answer something you haven't taught me. For example, if you ask me for my Turkish ID number, I wouldn't know it either :)
  13. So, are the LLMs lying, and is everything an illusion?

    IT İS NOT POSSİBLE TO COMPLETELY ELİMİNATE HALLUCİNATİONS, IT İS NOT POSSİBLE TO COMPLETELY ELİMİNATE HALLUCİNATİONS, BECAUSE THEY ARE A STATİSTİCAL BYPRODUCT OF LEARNİNG. BECAUSE THEY ARE A STATİSTİCAL BYPRODUCT OF LEARNİNG. HOWEVER, İT İS POSSİBLE TO MANAGE THEM AND CREATE THE HOWEVER, İT İS POSSİBLE TO MANAGE THEM AND CREATE THE RİGHT İNCENTİVES. RİGHT İNCENTİVES.‌ ‌ IT İS NOT POSSİBLE TO COMPLETELY ELİMİNATE HALLUCİNATİONS, BECAUSE THEY ARE A STATİSTİCAL BYPRODUCT OF LEARNİNG. HOWEVER, İT İS POSSİBLE TO MANAGE THEM AND CREATE THE RİGHT İNCENTİVES.‌
  14. Language Models and Vectors Language models convert words or sentences

    into numerical representations called vectors in order to understand text. These representations contain the meaning of a sentence or word.
  15. What is the purpose of vectors? Vectors allow us to

    search for ideas, not just keywords. It's the difference between matching letters and understanding intent.
  16. Storing Vectors:The Old Way: Managing Two Brains Vector Storage stores

    text as vectors, enabling fast and efficient searching of this data. Text and user queries are converted into vectors, and the most similar vectors are identified to deliver the most semantically relevant results. This structure facilitates finding similar content within large datasets.
  17. The Unified Solution: MongoDB ATLAS Operational + Vector Data in

    ONE place. No synchronization headaches. Seamless integration with .NET. WHEREVER YOUR NORMAL DATA İS STORED, STORE YOUR VECTORS THERE TOO.‌ WHEREVER YOUR NORMAL DATA İS STORED, STORE YOUR VECTORS THERE TOO.‌
  18. Why MongoDB for RAG? The Architecture: Storing Metadata in SQL

    vs. Embeddings in a separate Vector DB. The Scenario: Vector DB finds a perfect match ("Job ID #105"). The Reality: That job was deleted from SQL DB 5 minutes ago. The Result: "Record Not Found" error. Disconnected brain and memory. Our Solution: Unified storage in MongoDB Atlas (No sync required).
  19. Simple RAG Example For example, the Website.xml file, which is

    an XML file, can contain the URLs of all pages on your website.
  20. Category: Low-Level Client Metaphor: “Manual Transmission Car” When to Use

    It? If you're building a simple “Chat” application. If you just need to summarize a text and move on. If you don't need orchestration or memory. .NET AI Ecosystem: OpenAI .NET API
  21. Category: Metaphor: Swiss Army Knife or Iron Man Armor When

    to Use It? If you want to make the LLM talk using your own code, database, and APIs. If you want to do RAG. If you want a single “Agent” (Career Architect) to have different capabilities (Plugins). Application Framework .NET AI Ecosystem: Semantic Kernel (The Orchestrator)
  22. OpenAI API: A direct cable. (Simple, Raw) Semantic Kernel: A

    Toolbox 🧰 + 🧠. (Plugins, Memory, RAG) Which should we use ? OpenAI .NET API: This is the most basic level. It's great if you're just building a simple chatbot. But you have to manually write the memory, RAG, and tool usage (Tool Call). It's like driving a car with a manual transmission. Microsoft Semantic Kernel: This is the technology we used in today's demo. Why? Because we built a single “Super Agent.” We wanted this agent to have memory (MongoDB), eyes (GitHub API), and hands (file system). The Semantic Kernel is the nervous system connecting these organs to the brain.
  23. Using semantic kernel with openai for agentic ai solutions for

    autonomous environmental control in smart homes Building AI Applications with Microsoft Semantic Kernel Semantic Kernel, Plugins, and Function Calling
  24. CareerAgentApp AgentBuilder ajanı hazırlar. ChatSession başlar, kullanıcı GitHub adını girer.

    GitHubPlugin ile profili okur. Ajan, eksik yetenekleri belirler. RoadmapPlugin ile DB'den kaynak arar. CreateRoadmapPng ile görsel yol haritasını çizer ve kaydeder. Ve rapor çıkartır