Microsoft Semantic Kernel

repository·main·Indexed 42 days ago

https://github.com/microsoftdocs/semantic-kernel-docs

An SDK that enables developers to integrate large language models (LLMs) with conventional programming languages. It includes an Agent Framework featuring an Agent Harness for managing autonomous agent runtime scaffolding, state management, and tool orchestration across .NET, Python, and Go.

Tokens
362.5K
Snippets
839
Records
1.2K
Agent score
51%

What's inside Semantic Kernel

  1. What is DevUI

    main

    DevUI is a lightweight, standalone sample application designed for running and testing agents and workflows within the Microsoft Agent Framework. It provides a web interface for interactive testing and an OpenAI-compatible API backend.

    Key Use Case: Use DevUI to visually debug, test, and iterate on agents and workflows during development before integrating them into production applications.

    IMPORTANT

    DevUI is a sample app for development and debugging. It is not intended for production use.

  2. Overview of the Couchbase Vector Store connector (Preview)

    main

    The Couchbase Vector Store connector allows Semantic Kernel to access and manage vector data within Couchbase. It maps a Semantic Kernel collection to a Couchbase collection and its associated index.

    Key Capabilities

    • Vector Property Types: Supports ReadOnlyMemory<float>, Embedding<float>, and float[].
    • Distance Functions: Supports CosineSimilarity, DotProductSimilarity, and EuclideanDistance.
    • Filter Clauses: Supports AnyTagEqualTo and EqualTo for metadata filtering.
    • Search Features: Supports Hybrid Search, multiple vectors per record, and both IsIndexed and IsFullTextIndexed properties.
    • Data Types: Supports any type compatible with System.Text.Json (built-in or via custom converters).
    • Key Property: The key property must be a string.
  3. Overview of Azure CosmosDB NoSQL Vector Store connector

    main

    The Azure CosmosDB NoSQL Vector Store connector allows Semantic Kernel to access and manage data within Azure CosmosDB NoSQL containers.

    Key Capabilities:

    • Collection Mapping: Maps to an Azure Cosmos DB NoSQL Container.
    • Key Types: Supports string and CosmosKey.
    • Data Types: Supports string, int, long, double, float, bool, DateTimeOffset, and enumerables of these types.
    • Vector Types: Supports various memory and array types including ReadOnlyMemory<float>, Embedding<float>, float[], ReadOnlyMemory<byte>, Embedding<byte>, byte[], ReadOnlyMemory<sbyte>, Embedding<sbyte>, and sbyte[].
    • Index Types: Supports Flat, QuantizedFlat, and DiskAnn.
    • Distance Functions: Supports CosineSimilarity, DotProductSimilarity, and EuclideanDistance.
    • Filter Clauses: Supports AnyTagEqualTo and EqualTo.
    • Features: Supports multiple vectors per record, indexing (IsIndexed), full-text indexing (IsFullTextIndexed), and Hybrid Search.
  4. What is Semantic Kernel?

    main
    Semantic Kernel is an open-source development kit designed to build AI agents and integrate AI models into C#, Python, or Java codebases. It acts as middleware that translates AI model requests into function calls within your existing code and passes the results back to the model. This allows you to automate business processes by combining natural language prompts with existing APIs.
  5. Overview of Agent Framework hosting options

    main

    Depending on your use case, you can host agents using several different protocols and environments:

    • A2A Protocol: Expose agents via the Agent-to-Agent protocol. Best for multi-agent systems.
    • OpenAI-Compatible Endpoints: Expose agents via Chat Completions or Responses APIs. Best for OpenAI-compatible clients.
    • Durable Extension: Use Azure Functions or self-hosted compute for C# and Python agents/workflows. Best for long-running, reliable workloads.
    • AG-UI Protocol: Build web-based AI agent applications for web frontends.
  6. Overview of the Process Framework

    main

    The Process Framework in Microsoft Semantic Kernel is an experimental framework designed to automate complex business workflows by integrating AI with existing code and systems. It uses an event-driven model where each step in a process invokes user-defined Kernel Functions.

    Note: The Process Framework package is currently experimental and subject to change before reaching preview or General Availability (GA).

  7. Overview of the Oracle Database Vector Store connector

    main

    The Oracle Database Vector Store Connector allows Semantic Kernel to access and manage data within an Oracle Database.

    Key Requirements:

    • Vector Data Searches: Requires Oracle Database 23ai or higher.
    • Other Features: Available on Oracle Database 19c or higher.

    Core Mapping:

    • A Semantic Kernel Collection maps directly to an Oracle database table.

    Capabilities by Language:

    C# (.NET)

    • Supported Index Types: Flat (default), HNSW, IVF.
    • Supported Distance Functions: CosineDistance, CosineSimilarity, DotProductSimilarity, NegativeDotProductSimilarity, EuclideanDistance, EuclideanSquaredDistance, HammingDistance (for BINARY vectors), and ManhattanDistance.
      • Note: To use Jaccard similarity, set the DistanceFunction string to "JACCARD" or "JACCARDSIMILARITY" (case sensitive). This requires BINARY numeric format vectors.
    • Supported Filter Clauses: ==, !=, <, <=, >, >=, and List.Contains() (when checking if a model property is in a list).
    • Features: Supports multiple vectors per record, IsIndexed, and StorageName.

    Python

    • Supported Index Types: HNSW, IVF.
    • Supported Distance Functions: COSINE_DISTANCE, EUCLIDEAN_DISTANCE, EUCLIDEAN_SQUARED_DISTANCE, DOT_PROD, HAMMING, MANHATTAN, and DEFAULT.
    • Supported Filter Clauses: Python lambdas with comparisons, boolean operators, string methods (startswith, endswith), between, and datetime operations (translated to SQL with bind variables).
    • Requirements: Requires python-oracledb 3.3 or later and Oracle Database 23ai or later for vector searches.

    Java

    • Supported Index Types: HNSW, IVF.
    • Supported Distance Functions: DOT_PRODUCT, COSINE_SIMILARITY, COSINE_DISTANCE, EUCLIDEAN_DISTANCE.
    • Supported Filter Clauses: AnyTagEqualTo, EqualTo.
    • Note: StoragePropertyName is not supported; use @JsonProperty instead.
  8. Overview of the Azure AI Search Vector Store connector

    main

    The Azure AI Search Vector Store connector allows Semantic Kernel to access and manage data within Azure AI Search. In this connector, a Collection maps directly to an Azure AI Search Index.

    Feature Support by Language

    C# Support

    • Key property types: string
    • Data property types: string, int, long, double, float, bool, DateTimeOffset (and enumerables of these types).
    • Vector property types: ReadOnlyMemory<float>, Embedding<float>, float[].
    • Index types: Hnsw, Flat.
    • Distance functions: CosineSimilarity, DotProductSimilarity, EuclideanDistance.
    • Filter clauses: AnyTagEqualTo, EqualTo.
    • Capabilities: Supports multiple vectors per record, IsIndexed, IsFullTextIndexed, and HybridSearch.
    • Note: StorageName is not supported. Use JsonSerializerOptions and JsonPropertyNameAttribute for data mapping.

    Python Support

    • Key property types: string
    • Data property types: string, int, long, double, float, bool, DateTimeOffset (and iterables of these types).
    • Vector property types: list[float], list[int], numpy array.
    • Index types: Hnsw, Flat.
    • Distance functions: CosineSimilarity, DotProductSimilarity, EuclideanDistance, Hamming.
    • Filter clauses: AnyTagEqualTo, EqualTo.
    • Capabilities: Supports multiple vectors per record, IsFilterable, and IsFullTextSearchable.

    Java Support

    • Key property types: string
    • Data property types: string, int, long, double, float, bool, DateTimeOffset (and enumerables of these types).
    • Vector property types: ReadOnlyMemory<float>.
    • Index types: Hnsw, Flat.
    • Distance functions: CosineSimilarity, DotProductSimilarity, EuclideanDistance.
    • Filter clauses: AnyTagEqualTo, EqualTo.
    • Capabilities: Supports multiple vectors per record, IsFilterable, and IsFullTextSearchable.
    • Note: StorageName is not supported. Use JsonSerializerOptions and JsonPropertyNameAttribute for data mapping.
  9. Integrate Agent Framework with AG-UI

    main
    AG-UI is a protocol for building web-based AI agent applications with features like real-time streaming (via SSE), state management, and interactive UI components. Integrating the Agent Framework with AG-UI allows you to deploy agents as remote web services that can be accessed by multiple clients (web or mobile) and supports advanced scenarios like human-in-the-loop approvals and generative UI.
  10. Benefits of the June 2025 Semantic Kernel Python Vector Store updates

    main

    The June 2025 updates to the Semantic Kernel Python Vector Store implementation provide several key improvements over the previous architecture:

    Performance Improvements

    • Batch Operations: New batch upsert and delete methods are available to improve throughput.
    • Integrated Embeddings: The new architecture eliminates the need for separate, manual embedding generation steps by integrating them into the field definitions.
    • Optimized Search: Built-in search functions are now optimized specifically for each individual store type.

    Feature Enhancements

    • Hybrid Search: Support for combining vector and text search for improved retrieval accuracy.
    • Advanced Filtering: Enhanced support for filter expressions and indexing.

    Developer Experience

    • Simplified API: A reduction in the number of classes and methods required.
    • Consistent Interface: A unified approach across all supported vector stores.
    • Cross-Platform Alignment: The Python SDK is now aligned with the .NET SDK for consistent development across platforms.
  11. Core features of Semantic Kernel

    main

    Semantic Kernel is designed for enterprise-grade AI integration with the following characteristics:

    • Modular and Extensible: You can add existing code as plugins. It uses OpenAPI specifications, allowing extensions to be shared across pro-code and low-code environments (similar to Microsoft 365 Copilot).
    • Future Proof: The architecture allows you to swap AI models easily as new ones are released without rewriting your entire codebase.
    • Enterprise Ready: Supports telemetry for observability, and provides hooks and filters to implement security and responsible AI patterns at scale.
    • Multi-language Support: Provides Version 1.0+ support across C#, Python, and Java.