Download tests/test_rag_product_names.py from Wizzas/DefectRAG: direct link, hf CLI and curl.
- Browser
- Download file 770 Bytes
-
https://huggingface.co/Wizzas/DefectRAG/resolve/main/tests/test_rag_product_names.py
- Command line
-
hf download hf://Wizzas/DefectRAG/tests/test_rag_product_names.py
-
curl -L -o test_rag_product_names.py https://huggingface.co/Wizzas/DefectRAG/resolve/main/tests/test_rag_product_names.py
770 Bytes
| """Assistant answers use the product names the dashboard shows, never internal keys.""" | |
| import pytest | |
| from backend.rag import inspection_facts | |
| def test_answer_names_the_product_like_the_dashboard(category, shown): | |
| facts = inspection_facts('why is this result anomalous?', {'category': category, 'verdict': 'Anomalous', | |
| 'score': 0.6, 'threshold': 0.5, 'uncertainty_margin': 0.01}) | |
| assert f'flagged this {shown} image' in facts['text'] | |