Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
.NET Day 2025: Enhancing Legal Document Analysi...
Search
.NET Day
August 29, 2025
Technology
53
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
.NET Day 2025: Enhancing Legal Document Analysis with Reflection Agents, Semantic Kernel, and Azure AI Search
.NET Day
August 29, 2025
More Decks by .NET Day
See All by .NET Day
.NET Day 2026 What I learned from modernizing a microservices architecture
dotnetday
0
38
.NET Day 2026 The impact and relevance of code reviews on software quality
dotnetday
0
45
.NET Day 2026 From Co-Pilot to Co-Worker: Mastering GitHub Copilot Agent Mode
dotnetday
0
49
.NET Day 2026 Are you sure your access tokens are really secure?
dotnetday
0
35
.NET Day 2026 The death of Passwords, Implementing Passkeys in .NET 10
dotnetday
0
48
.NET Day 2026 How Banks Protect Their Applications with FAPI
dotnetday
0
30
.NET Day 2026 AI Your Way: MCPs vs Skills vs SubAgents 🤖🚀
dotnetday
0
43
.NET Day 2026 The Past, Present and Future of Programming Languages
dotnetday
0
52
.NET Day 2026 Mis-Estimating – why estimating effort does not work
dotnetday
0
46
Other Decks in Technology
See All in Technology
SREでアラート疲れを 解決しよう!
kairim0
1
210
スキルを作る、その前に!複数人で使われるスキルを 作るためのプロセス
junkifurukawa
2
340
[2026 Oracle Technical Deep Dive] エンタープライズAIエージェントを支えるOCIソリューション。ラインナップと特徴を理解しよう! (2026年9月17日開催)
oracle4engineer
PRO
0
550
AI Made Us Faster at Solving the Wrong Problems
marceloancelmo
0
170
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
280
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
3
650
不可逆な意思決定を避けながら10億超の顧客データを AI Ready にするデータ基盤設計
baseballyama
1
120
Execution in the Kingdom of Agents: Reflections on Abstraction and Complexity
bcantrill
0
860
自律型 AI をセキュアに実装!Gemini と MIG で作る動的コード実行環境
recruitengineers
PRO
1
220
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
150
インバスケット試験対策アプリを 作って見えたAIエージェント構築 ナレッジ2選
shichijoyuhi
1
130
OpenSharing について熱く語る〜AI アセットの共有について〜
kameitomohiro
0
230
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
460
From π to Pie charts
rasagy
1
390
Skip the Path - Find Your Career Trail
mkilby
1
240
Are puppies a ranking factor?
jonoalderson
2
4k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
3
4.3k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
520
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
860
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
350
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
920
RailsConf 2023
tenderlove
30
1.6k
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