Skip to content

Commit a90ed6c

Browse files
committed
Improve wording of AI context composition
1 parent 026c921 commit a90ed6c

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

readme.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,14 @@ and `AIContext`. This package supports dynamic extension of a configured agent i
186186
1. A keyed service `AIContextProviderFactory` with the same name as the agent will be set up just as if you had
187187
set it manually as the [ChatClientAgentOptions.AIContextProviderFactory](https://learn.microsoft.com/en-us/dotnet/api/microsoft.agents.ai.chatclientagentoptions.aicontextproviderfactory)
188188
in code.
189-
2. A keyed service `AIContextProvider` with the same name as the agent.
190-
3. A keyed service `AIContext` with the same name as the agent.
191-
4. Aggregate of AI contexts pulled in via `use` setting for an agent.
192-
193-
The first three alternatives enable auto-wiring of context providers or contexts registered in the service collection and
194-
are pretty self-explanatory. The last alternative allows even more declarative scenarios involving reusable and cross-cutting
189+
2. Aggregate of AI contexts from:
190+
a. Keyed service `AIContextProvider` with the same name as the agent.
191+
b. Keyed service `AIContext` with the same name as the agent.
192+
c. Other services pulled in via `use` setting for an agent registered as either `AIContextProvider` or `AIContext`
193+
with a matching key.
194+
195+
The first option assumes you want full control of the context, so it does not allow futher composition.
196+
The second alternative allows more declarative scenarios involving reusable and cross-cutting
195197
context definitions.
196198

197199
For example, let's say you want to provide consistent tone for all your agents. It would be tedious, repetitive and harder

0 commit comments

Comments
 (0)