-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmap.txt
More file actions
22 lines (20 loc) · 849 Bytes
/
Copy pathmap.txt
File metadata and controls
22 lines (20 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
User Query ──▶ Query Interpreter (spaCy + regex, fallback: LLM)
│
▼
┌──────── Structured Info ───────┐
▼ ▼
Retriever ←──── Clause Embeddings ───── Uploaded Docs
│
▼
LLM-based Decision Prompt:
"Based on query: {...} and clauses: {...}, return JSON with approval, amount, and justification"
▼
Final Output JSON ➝ Gradio UI
#Architecture for Query Processing
User Query
│
├──▶ Regex extractor (age, gender, duration)
├──▶ spaCy NER (GPE, DATE, procedure via noun chunks)
└──▶ [Optional] LLM fallback (for missing fields only)
│
└── JSON output (age, gender, procedure, location, policy_duration)