You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: semantic-kernel/Frameworks/agent/agent-contextual-function-selection.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,10 @@ Contextual Function Selection is an advanced capability in the Semantic Kernel A
22
22
23
23
This approach addresses the challenge of function selection when dealing with a large number of available functions, where AI models may otherwise struggle to choose the appropriate function, leading to confusion and suboptimal performance.
24
24
25
+
> [!WARNING]
26
+
> When using the `ContextualFunctionProvider`, the `UseImmutableKernel` setting on the agent has to be set to `true` as the feature requires cloning the kernel when invoking the agent.
27
+
> Note that setting `UseImmutableKernel` to `true` will mean that any kernel data modifications done during the agent invocation by e.g. plugins, will not be retained after the invocation completes.
28
+
25
29
## How Contextual Function Selection Works
26
30
27
31
When an agent is configured with contextual function selection, it leverages a vector store and an embedding generator to semantically match the current conversation context (including previous messages and user input) with the descriptions and names of available functions. The most relevant functions, up to the specified limit, are then advertised to the AI model for invocation.
Instructions="You are a friendly assistant that summarizes key points and sentiments from customer reviews. For each response, list available functions.",
> When using the `TextSearchProvider` with `OnDemandFunctionCalling`, the `UseImmutableKernel` setting on the agent has to be set to `true` as the feature requires cloning the kernel when invoking the agent.
131
+
> Note that setting `UseImmutableKernel` to `true` will mean that any kernel data modifications done during the agent invocation by e.g. plugins, will not be retained after the invocation completes.
132
+
127
133
## TextSearchProvider options
128
134
129
135
The `TextSearchProvider` can be configured with various options to customize its behavior. Options are provided using the `TextSearchProviderOptions` class to the `TextSearchProvider` constructor.
Copy file name to clipboardExpand all lines: semantic-kernel/concepts/vector-store-connectors/index.md
+14-8Lines changed: 14 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: What are Semantic Kernel Vector Store connectors? (Preview)
2
+
title: What are Semantic Kernel Vector Stores? (Preview)
3
3
description: Describes what a Semantic Kernel Vector Store is, and provides a basic example of how to use one and how to get started.
4
4
zone_pivot_groups: programming-languages
5
5
author: westey-m
@@ -8,7 +8,7 @@ ms.author: westey
8
8
ms.date: 07/08/2024
9
9
ms.service: semantic-kernel
10
10
---
11
-
# What are Semantic Kernel Vector Store connectors? (Preview)
11
+
# What are Semantic Kernel Vector Stores? (Preview)
12
12
13
13
::: zone pivot="programming-language-csharp"
14
14
@@ -35,24 +35,30 @@ One use case for storing information in a vector database is to enable large lan
35
35
36
36
For example, if you want to write a blog post about the latest trends in AI, you can use a vector database to store the latest information about that topic and pass the information along with the ask to a LLM in order to generate a blog post that leverages the latest information.
37
37
38
-
Semantic Kernel and .net provides an abstraction for interacting with Vector Stores and a list of out-of-the-box connectors that implement these abstractions. Features include creating, listing and deleting collections of records, and uploading, retrieving and deleting records. The abstraction makes it easy to experiment with a free or locally hosted Vector Store and then switch to a service when needing to scale up.
38
+
Semantic Kernel and .net provides an abstraction for interacting with Vector Stores and a list of out-of-the-box implementations that implement these abstractions for various databases. Features include creating, listing and deleting collections of records, and uploading, retrieving and deleting records. The abstraction makes it easy to experiment with a free or locally hosted Vector Store and then switch to a service when needing to scale up.
39
+
40
+
The out-of-the-box implementations can be used with Semantic Kernel, but do not depend on the core Semantic Kernel stack and can also therefore be used completely independently if required.
41
+
The Semantic Kernel provided imlementations are referred to as 'connectors'.
39
42
40
43
::: zone pivot="programming-language-csharp"
41
44
42
45
## Retrieval Augmented Generation (RAG) with Vector Stores
43
46
44
-
The vector store abstractions are a low level api for adding and retrieving data from vector stores.
47
+
The vector store abstraction is a low level api for adding and retrieving data from vector stores.
45
48
Semantic Kernel has built-in support for using any one of the Vector Store implementations for RAG.
46
49
This is achieved by wrapping `IVectorSearchable<TRecord>` and exposing it as a Text Search implementation.
47
50
48
51
> [!TIP]
49
52
> To learn more about how to use vector stores for RAG see [How to use Vector Stores with Semantic Kernel Text Search](../text-search/text-search-vector-stores.md).
50
53
> [!TIP]
51
54
> To learn more about text search see [What is Semantic Kernel Text Search?](../text-search/index.md)
55
+
> [!TIP]
56
+
> To learn more about how to quickly add RAG into your agent see [Adding Retrieval Augmented Generation (RAG) to Semantic Kernel Agents](../../Frameworks/agent/agent-rag.md).
52
57
53
58
## The Vector Store Abstraction
54
59
55
-
The main abstract base classes and interfaces in the Vector Store abstraction are the following.
60
+
The Vector Store abstractions are provided in the [`Microsoft.Extensions.VectorData.Abstractions`](https://www.nuget.org/packages/Microsoft.Extensions.VectorData.Abstractions/) nuget package.
61
+
The following are the main abstract base classes and interfaces.
The Semantic Kernel Vector Store connectors use a model first approach to interacting with databases. This means that the first step is to define a data model that maps to the storage schema. To help the connectors create collections of records and map to the storage schema, the model can be annotated to indicate the function of each property.
152
+
The Vector Store abstractions use a model first approach to interacting with databases. This means that the first step is to define a data model that maps to the storage schema. To help the implementations create collections of records and map to the storage schema, the model can be annotated to indicate the function of each property.
147
153
148
154
::: zone pivot="programming-language-csharp"
149
155
@@ -340,7 +346,7 @@ public class Main {
340
346
::: zone-end
341
347
342
348
> [!TIP]
343
-
> For more information on what key and field types each Vector Store connector supports, refer to [the documentation for each connector](./out-of-the-box-connectors/index.md).
349
+
> For more information on what key and field types each Vector Store implementation supports, refer to [the documentation for each implementation](./out-of-the-box-connectors/index.md).
0 commit comments