Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
.NET Day 2025: Enhancing Legal Document Analysi...
Search
.NET Day
August 29, 2025
Technology
0
23
.NET Day 2025: Enhancing Legal Document Analysis with Reflection Agents, Semantic Kernel, and Azure AI Search
.NET Day
August 29, 2025
Tweet
Share
More Decks by .NET Day
See All by .NET Day
.NET Day 2025: How to Lie with AI: Understanding Bias, Ethics, and the Hidden Risks in Machine Learning
dotnetday
0
18
.NET Day 2025: Most Expensive Design Mistakes (Ever) and how to avoid them
dotnetday
0
19
.NET Day 2025: Turbocharged: Writing High-Performance C# and .NET Code
dotnetday
0
30
.NET Day 2025: Developing ASP.NET Core Microservices with Dapr: A practical guide
dotnetday
0
28
.NET Day 2025: Future-Proof Your Blazor Apps with bUnit
dotnetday
0
16
.NET Day 2025: .NET Core Testing: pushing the limits
dotnetday
0
27
.NET Day 2025: The best ways to use the latest OpenAPI features in .NET 9!
dotnetday
0
26
.NET Day 2025: Supercharged Search with Semantic Search and Vector Embeddings
dotnetday
0
20
.NET Day 2025: Tickets to Ride: Conquering Booking Chaos with Resilient .NET Architecture
dotnetday
0
23
Other Decks in Technology
See All in Technology
あすけん_Developers_Summit_2026_-_Vibe_Coding起点での新機能開発で__あすけん_が乗り越えた壁.pdf
iwahiro
0
760
Interop Tokyo 2025 ShowNet Team Memberで学んだSRv6を基礎から丁寧に
miyukichi_ospf
0
180
「技術的にできません」を越えて価値を生み出せ──研究開発チームをPMが率いて生み出した価値創出
hiro93n
1
330
GitHub Copilot CLI 現状確認会議(2026年2月のすがた)
torumakabe
4
620
欲しいを叶える個人開発の進め方 / How to Run an Indie Project That Brings Your Ideas to Life
endohizumi
0
340
GoとWasmでつくる軽量ブラウザUI
keyl0ve
0
130
『誰の責任?』で揉めるのをやめて、エラーバジェットで判断するようにした ~感情論をデータで終わらせる、PMとエンジニアの意思決定プロセス~
coconala_engineer
0
1.7k
AWS Bedrock Guardrails / 機密情報の入力・出力をブロックする — Blocking Sensitive Information Input/Output
kazuhitonakayama
2
170
Agent Skills 入門
puku0x
0
930
【Developers Summit 2026】Memory Is All You Need:コンテキストの「最適化」から「継続性」へ ~RAGを進化させるメモリエンジニアリングの最前線~
shisyu_gaku
5
710
AIで 浮いた時間で 何をする? 2026春 #devsumi
konifar
16
3.2k
社内でAWS BuilderCards体験会を立ち上げ、得られた気づき / 20260225 Masaki Okuda
shift_evolve
PRO
1
110
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
The Spectacular Lies of Maps
axbom
PRO
1
570
The Invisible Side of Design
smashingmag
302
51k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
77
Speed Design
sergeychernyshev
33
1.6k
Thoughts on Productivity
jonyablonski
75
5.1k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
How STYLIGHT went responsive
nonsquared
100
6k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.1k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
130
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
750
Transcript
ENHANCING LEGAL DOCUMENT ANALYSIS WITH REFLECTION AGENTS, SEMANTIC KERNEL, AND
AZURE AI SEARCH
CÉDRIC MENDELIN Software Developer - isolutions AG
AGENDA LLM Basics Customer Project - FTA The Microsoft Way
- Azure AI Services Step-by-Step Improvements - FTA Conclusion
LLM BASICS
None
None
PROMPT History Parameters (Top-P, Temperature) System Message (Persona) Input
What is the current date?
None
None
RAG – RETRIEVAL-AUGMENTED GENERATION Search Engine Data Model User Application
RETRIEVAL STEP Is the document relevant for the query? +
=
EMBEDDINGS Source: https://weaviate.io/blog/how-to-choose-an-embedding-model
VECTOR SEARCH VECTORIZE DATA VECTORIZE QUERY VECTOR SEARCH (COSINE SIMILARITY)
FEDERAL TAX ADMINISTRATION
Federal Tax Administration 4 k
LAWS AND ORDINANCES (XML)
COURT RULING – FTA PUBLICATIONS (PDF)
CHALLENGES Wording/Style of texts Citation requirement Hierarchy in data Amount
of data
AZURE AI SERVICES
AZURE AI SERVICES OpenAI Vision Speech Language Content Safety Face
Document Intelligence Azure AI services AI Search AI Agent Service AI Model Inference AI Foundry
None
SEMANTIC KERNEL • Open-Source SDK • Middleware • Abstraction over
different Models
None
RAG – Azure OpenAI on your data Azure OpenAI Azure
AI Search
None
None
None
What is the current date?
None
None
FUNCTION CALLING
STEP-BY-STEP IMPROVEMENTS FTA
1ST ITERATION
1ST ITERATION Focus on 50 documents Index Laws per article
Index PDFs per page Azure Open AI – on your data Vector Search
AZURE OPENAI – ON YOUR DATA
1ST ITERATION – FEEDBACK Relevant documents not found Hallucination Poor
Answer Quality Other reasons
2ND ITERATION
2ND ITERATION Hybrid Search Prompting Writing Profiles (Persona) Chat Settings
HYBRID SEARCH PIPELINE Vector Search Text Search N Search Results
Derive Vector Query Derive Text Query
HYBRID SEARCH CODE
2ND ITERATION - FEEDBACK Relevant documents not found Hallucination Poor
Answer Quality Other reasons
None
We need more than a gut feeling
LLM EVALUATION
EVALUATION TYPES LLM evaluation How good the foundation models performs
on a certain task. LLM system evaluation How good the LLM performs in your specific use case, on your data, in your domain.
EVALUATION PIPELINE LLM System Evaluation Dataset Evaluators Score Input Reference
Answer Expected Doc Answer
LLM SYSTEM EVALUATION - METRICS Reference-based Reference-free LLM based
MEAI.EVALUATION OVERVIEW • Open-source • Predefined LLM-based evaluators • Interface
for custom-evaluators • Local and Azure Storage Account • In Preview
None
MEAI.EVALUATION.CONSOLE
None
EVALUATION QUESTIONS Question Reference Answer Expected Doc(s) Category
None
EVALUATION RESULTS 0 10 20 30 40 50 60 70
80 90 100 Provided source Applied source Retrieval Step - % of documents provided and applied Vector Search Hybrid Search
EVALUATION RESULTS 0.8 0.948 0.914 0.85 0.948 0.917 0.7 0.75
0.8 0.85 0.9 0.95 1 Relevance Groundedness Cosin Sim Answer Generation – Quality Metrics Vector Search Hybrid Search
3RD ITERATION
3RD ITERATION – RETRIEVAL OPTIMIZATION AI Enrichment Semantic Reranking
AI ENRICHMENT
SEMANTIC RERANKING Vector Search Text Search N Search Results Derive
Vector Query Derive Text Query Reranking
SEMANTIC RERANKING
3RD ITERATION - FEEDBACK Retrieval improved Sometimes poor Answer Quality
Other reasons
EVALUATION RESULTS 0 10 20 30 40 50 60 70
80 90 100 Provided source Applied source Retrieval Step - % of documents provided and applied Vector Search Hybrid Search Hybrid Search with Summary Hybrid Search with Reranking
EVALUATION RESULTS 0.8 0.948 0.914 0.85 0.948 0.917 0.86 0.945
0.917 0.9 0.988 0.927 0.7 0.75 0.8 0.85 0.9 0.95 1 Relevance Groundedness Cosin Sim Answer Generation – Quality Metrics Vector Search Hybrid Search Hybrid Search with Summary Hybrid Search with Reranking
4TH ITERATION
4TH ITERATION – ANSWER GENERATION OPTIMIZATION Reflection Agent
REFLECTION AGENT Writer Agent Critic Agent N Fact Checker Style
Checker Citation Checker
IMPLEMENTATION • Not supported by Azure OpenAI - On your
data • Derive Search Query • Using Azure AI Search SDK + Autogen
None
None
4TH ITERATION - FEEDBACK Other Reason
EVALUATION – EXECUTION TIME 2889 1999 2966 0 500 1000
1500 2000 2500 3000 3500 Azure OYOD - Hybrid Custom - Hybrid Multiagent (with Reranking) ms LLM system evaluation – Mean Execution Time
EVALUATION RESULTS 0.86 0.88 0.9 0.92 0.94 0.96 0.98 1
Relevance Groundedness Cos Sim LLM System evaluation – MultiAgent Single Agent MultiAgent
LAST ITERATION
CONCLUSION
SURVEY RESULTS 86% OF ANSWERS RATED POSITIVELY 89% OF THE
USERS WANT TO USE THE SYSTEM PRODUCTIVELY
CONCLUSION • SK is your SDK of choice • Azure
AI Search for unstructured data • Use advanced capabilities • Start Evaluating early • What is your Use case • Business Value & Innovation The dotnet Stack is ready for productive AI Applications