Spaces:
Sleeping
Sleeping
| from app.api.dependencies import get_rag_service | |
| rag_service = get_rag_service() | |
| tests = [ | |
| # ========================= | |
| # STUDENT SECTION (student_section.json) | |
| # ========================= | |
| { | |
| "question": "Who provides overall supervision of the scholarship section?", | |
| "document": "student_section.json", | |
| "chunk_index": 9 | |
| }, | |
| { | |
| "question": "Who manages National Scholarship Portal (NSP) scholarships?", | |
| "document": "student_section.json", | |
| "chunk_index": 8 | |
| }, | |
| { | |
| "question": "Who handles Scheduled Tribe (ST) scholarships?", | |
| "document": "student_section.json", | |
| "chunk_index": 7 | |
| }, | |
| { | |
| "question": "Where is the Student Section located?", | |
| "document": "student_section.json", | |
| "chunk_index": 1 | |
| }, | |
| { | |
| "question": "What are the working hours of the Student Section?", | |
| "document": "student_section.json", | |
| "chunk_index": 1 | |
| }, | |
| { | |
| "question": "What is the fee for a Transfer Certificate?", | |
| "document": "student_section.json", | |
| "chunk_index": 10 | |
| }, | |
| { | |
| "question": "Which scholarships are managed under Mukhyamantri Yuva Swavalamban Yojana (MYSY)?", | |
| "document": "student_section.json", | |
| "chunk_index": 4 | |
| }, | |
| { | |
| "question": "What services are included under administrative services in the Student Section?", | |
| "document": "student_section.json", | |
| "chunk_index": 3 | |
| }, | |
| # ========================= | |
| # HOSTEL (hostel.json) | |
| # ========================= | |
| { | |
| "question": "How many rooms are available in the Boys Hostel?", | |
| "document": "hostel.json", | |
| "chunk_index": 1 | |
| }, | |
| { | |
| "question": "What is the total capacity of the Girls Hostel?", | |
| "document": "hostel.json", | |
| "chunk_index": 2 | |
| }, | |
| { | |
| "question": "Who administers the hostels?", | |
| "document": "hostel.json", | |
| "chunk_index": 3 | |
| }, | |
| { | |
| "question": "Who is the Rector of the hostel?", | |
| "document": "hostel.json", | |
| "chunk_index": 4 | |
| }, | |
| # ========================= | |
| # ADMISSION UG (admission_ug.json) | |
| # ========================= | |
| { | |
| "question": "What is the tuition fee for undergraduate boys?", | |
| "document": "admission_ug.json", | |
| "chunk_index": 0 | |
| }, | |
| { | |
| "question": "What is the tuition fee for undergraduate girls?", | |
| "document": "admission_ug.json", | |
| "chunk_index": 0 | |
| }, | |
| { | |
| "question": "How many seats are available in Computer Engineering?", | |
| "document": "admission_ug.json", | |
| "chunk_index": 1 | |
| }, | |
| { | |
| "question": "Which programs are accredited by NBA until June 30, 2025?", | |
| "document": "admission_ug.json", | |
| "chunk_index": 3 | |
| }, | |
| { | |
| "question": "Where can students find cutoff marks for 2023 and 2024?", | |
| "document": "admission_ug.json", | |
| "chunk_index": 4 | |
| } | |
| ] | |
| docs = rag_service.test_queries({ | |
| "tests": tests, | |
| "k": 5, | |
| "threshold": 0.4 | |
| }) | |
| print(docs) |