Spaces:
Sleeping
Sleeping
File size: 3,129 Bytes
4225666 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | 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) |