Spaces:
Sleeping
Sleeping
Update rag/ui.py
Browse files
rag/ui.py
CHANGED
|
@@ -9,17 +9,25 @@ def build_demo(retrieve_and_answer):
|
|
| 9 |
|
| 10 |
gr.Markdown(
|
| 11 |
"""
|
|
|
|
|
|
|
| 12 |
### About this demo
|
| 13 |
- Entity-aware routing (Apple / Microsoft)
|
| 14 |
-
-
|
| 15 |
- Tables processed as images (no OCR flattening)
|
|
|
|
| 16 |
|
| 17 |
### Try these prompts
|
| 18 |
- `What was Apple’s total revenue in 2023?`
|
| 19 |
- `What is Microsoft’s operating income?`
|
| 20 |
-
- `Compare Apple and Microsoft revenues` →
|
| 21 |
- `What was Google’s revenue in 2023?` → rejected
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
ℹ️ Full details are in the Space README below (scroll) / GitHub repo.
|
| 24 |
"""
|
| 25 |
)
|
|
|
|
| 9 |
|
| 10 |
gr.Markdown(
|
| 11 |
"""
|
| 12 |
+
gr.Markdown(
|
| 13 |
+
"""
|
| 14 |
### About this demo
|
| 15 |
- Entity-aware routing (Apple / Microsoft)
|
| 16 |
+
- Prevents *accidental* cross-company document mixing
|
| 17 |
- Tables processed as images (no OCR flattening)
|
| 18 |
+
- Explicit refusals for out-of-scope or ambiguous queries
|
| 19 |
|
| 20 |
### Try these prompts
|
| 21 |
- `What was Apple’s total revenue in 2023?`
|
| 22 |
- `What is Microsoft’s operating income?`
|
| 23 |
+
- `Compare Apple and Microsoft revenues` → explicit multi-entity reasoning
|
| 24 |
- `What was Google’s revenue in 2023?` → rejected
|
| 25 |
|
| 26 |
+
ℹ️ Explicit multi-company queries are allowed by design; accidental cross-company leakage is prevented.
|
| 27 |
+
"""
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
ℹ️ Full details are in the Space README below (scroll) / GitHub repo.
|
| 32 |
"""
|
| 33 |
)
|