Skip to content

Commit 3e8d0be

Browse files
committed
fix: Policy Citations - Added evidence to UI and Report
1 parent db3f052 commit 3e8d0be

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

frontend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM python:3.11-slim
22

33
WORKDIR /app
4-
# Cache bust: v1.3.1-fixes-force
4+
# Cache bust: v1.3.2-evidence-force
55

66
# Install system dependencies
77
RUN apt-get update && apt-get install -y \

frontend/app.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
AuditFlow - Agentic & Explainable Claims Processing
33
5-Page App: Home, Process Claims, Claim History, Performance Analytics, Policy Library
44
Light mode optimized for modern UI
5-
Cache bust: 2026-01-21T02:02
5+
Cache bust: 2026-01-21T02:20
66
"""
77

8-
VERSION = "v1.3.1-fixes" # Bumped for PDF/Override/Claims verification
8+
VERSION = "v1.3.2-evidence" # Bumped for policy evidence fixes
99

1010
import os
1111
import base64
@@ -789,6 +789,7 @@ def compute_stats():
789789
"timestamp": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
790790
"region": claim_region,
791791
"category": claim_category,
792+
"citation": {"policy": policy_name, "section": section_cited},
792793
"summary": f"Claim analyzed based on policy coverage criteria. Decision: {expected} with {confidence*100:.1f}% confidence.",
793794
"events": [
794795
{"time": "00:00.12", "component": "ROUTER", "icon": "🔀", "action": "Route Request", "details": f"Routing to {claim_region} / {claim_category} handler"},
@@ -851,6 +852,10 @@ def compute_stats():
851852
st.markdown("##### 🚩 Flagging Criteria")
852853
for flag in active_flags:
853854
st.warning(f"**{flag['criteria']}**: {flag['reason']}")
855+
# Policy Citations
856+
if result.get("citation"):
857+
st.markdown("##### 📋 Policy Evidence")
858+
st.success(f"**{result['citation']['policy']}**\n\nCited Section: *{result['citation']['section']}*")
854859

855860
# Agent Reasoning
856861
with st.expander("🧠 Agent Reasoning & Explanations", expanded=False):
@@ -892,7 +897,7 @@ def compute_stats():
892897
"confidence": result["confidence"],
893898
"summary": result["summary"],
894899
"reasoning_trace": [{"step_number": r["step"], "step_type": r["type"], "content": r["content"]} for r in result.get("reasoning", [])],
895-
"evidence": [],
900+
"evidence": [f"{result['citation']['policy']} - {result['citation']['section']}"] if result.get("citation") else [],
896901
"exclusions_found": [f["reason"] for f in active_flags],
897902
"limits_found": []
898903
}

0 commit comments

Comments
 (0)