File size: 568 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
from app.api.dependencies import get_rag_service

req = {
  "tests": [
    {
      "question": "List all faculties in Computer Engineering Department",
      "document": "_department_php_dept_3.md"
    },
    {
      "question": "Who is Dr. Arun B. Nandurbarkar?",
      "document": "_department_php_dept_15.md"
    },
    {
      "question": "Give faculty names from Information Technology Department",
      "document": "_department_php_dept_7.md"
    }
  ],
  "k": 5,
  "threshold": 0.4
}

RAG_SERVICE = get_rag_service()
print(RAG_SERVICE.test_queries(tests=req))