docs(architect): weekly KB update — 106 files refreshed (2026-04)
Updates across all 5 skills: ms-ai-advisor, ms-ai-engineering, ms-ai-governance, ms-ai-security, ms-ai-infrastructure. Key changes: - Language Services (Custom Text Classification, Text Analytics, QnA): retirement warning 2029-03-31, migration guides to Foundry/GPT-4o - Agentic Retrieval: 50M free reasoning tokens/month (Public Preview) - Computer Use: Claude Sonnet 4.5 (preview) + OpenAI CUA models - Agent Registry: Risks column (M365 E7), user-shared/org-published types - Declarative agents: schema v1.5 → v1.6, Store validation requirements - MLflow 3: 13 built-in LLM judges, production monitoring, Genie Code - AG-UI HITL: ApprovalRequiredAIFunction (C#) + @tool(approval_mode) (Python) - Entra ID Ignite 2025: Agent ID Admin/Developer RBAC roles, Conditional Access - Security Copilot: 400 SCU/month per 1000 M365 E5 licenses, auto-provisioned - Fast Transcription API: phrase lists, 14-language multi-lingual transcription - Azure Monitor Workbooks: Bicep support, RBAC specifics - Power Platform Copilot: data residency (Norway/Europe → EU DB, Bing → USA) - RAG security-rbac: 4-approach table (GA + 3 preview access control methods) - IaC MLOps: Well-Architected OE:05 principles, Bicep/Terraform patterns - Translator: image file batch translation Preview (JPEG/PNG/BMP/WebP) All 106 files: Last updated 2026-04 | Verified: MCP 2026-04 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0eb30fa853
commit
6645e93205
104 changed files with 1986 additions and 520 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Tool Use and Function Calling - Advanced Patterns
|
||||
|
||||
**Last updated:** 2026-02
|
||||
**Last updated:** 2026-04 | Verified: MCP 2026-04
|
||||
**Status:** GA
|
||||
**Category:** Agent Orchestration & Automation
|
||||
|
||||
|
|
@ -207,19 +207,35 @@ var result = await mainAgent.RunAsync("Hvordan er været i Oslo?");
|
|||
|
||||
**Implementering (AG-UI + Agent Framework):**
|
||||
|
||||
```python
|
||||
# AG-UI middleware for approval
|
||||
def approval_middleware(tool_call):
|
||||
if tool_call.name in ["delete_record", "send_email"]:
|
||||
user_response = input(f"Approve {tool_call.name}? (yes/no): ")
|
||||
return user_response.lower() == "yes"
|
||||
return True # Auto-approve andre funksjoner
|
||||
AG-UI backend tool rendering stoetter HITL via to mekanismer:
|
||||
|
||||
# Agent med approval-workflow
|
||||
agent = ChatAgent(chat_client=client, tools=[delete_record, send_email])
|
||||
# Koble approval_middleware til agent runtime
|
||||
**C# - ApprovalRequiredAIFunction:**
|
||||
```csharp
|
||||
// Tool som krever human approval
|
||||
var approvalTool = ApprovalRequiredAIFunction.Create(DeleteRecord);
|
||||
|
||||
// Workflow emitter RequestInfoEvent med ToolApprovalRequestContent
|
||||
await foreach (var evt in workflow.WatchStreamAsync()) {
|
||||
if (evt is RequestInfoEvent req && req.Data is ToolApprovalRequestContent tc) {
|
||||
bool approved = await AskUserApproval(tc.ToolName);
|
||||
await handle.SendResponseAsync(req.Request.CreateResponse(approved));
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Python - @tool med approval_mode:**
|
||||
```python
|
||||
@tool(approval_mode="always_require")
|
||||
def delete_record(record_id: str) -> str:
|
||||
# Sletter en post - krever alltid menneskelig godkjenning
|
||||
return db.delete(record_id)
|
||||
|
||||
# Workflow pauser og emitter function_approval_request event
|
||||
# Klient-loop maa haandtere og respondere
|
||||
```
|
||||
|
||||
**Backend tool events streames til klient i sanntid:** TOOL_CALL_START, TOOL_CALL_ARGS, TOOL_CALL_END, TOOL_CALL_RESULT.
|
||||
|
||||
---
|
||||
|
||||
## Beslutningsveiledning
|
||||
|
|
@ -412,7 +428,7 @@ def update_citizen_record(ssn: str, field: str, value: str) -> str:
|
|||
1. [Azure OpenAI Function Calling](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/function-calling) — **Verified 2026-02**
|
||||
2. [Semantic Kernel Agent Functions](https://learn.microsoft.com/en-us/semantic-kernel/frameworks/agent/agent-functions) — **Verified 2026-02**
|
||||
3. [Agent Framework - Agent as Function Tool](https://learn.microsoft.com/en-us/agent-framework/tutorials/agents/agent-as-function-tool) — **Verified 2026-02**
|
||||
4. [AG-UI Backend Tool Rendering](https://learn.microsoft.com/en-us/agent-framework/integrations/ag-ui/backend-tool-rendering) — **Verified 2026-02**
|
||||
4. [AG-UI Backend Tool Rendering](https://learn.microsoft.com/en-us/agent-framework/integrations/ag-ui/backend-tool-rendering) — **Verified 2026-04** (backend tool streaming, ApprovalRequiredAIFunction C#, @tool(approval_mode) Python, TOOL_CALL_* events)
|
||||
5. [Azure OpenAI Assistants Function Calling](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/assistant-functions) — **Verified 2026-02**
|
||||
6. [Structured Outputs](https://learn.microsoft.com/en-us/azure/ai-foundry/openai/how-to/structured-outputs) — **Verified 2026-02**
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue