File size: 2,180 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
from app.utils.model_factory import get_local_model
from langchain_core.prompts import  PromptTemplate
from app.prompts import QUESTION_WRITER_SYSTEM_PROMPT

model = get_local_model(True)
template = PromptTemplate.from_template(QUESTION_WRITER_SYSTEM_PROMPT)

test_questions = [
    # Department abbreviations - fees related (1-10)
    "ds fees?",
    "cse fees",
    "it fee structure",
    "ce yearly fees",
    "ec admission fees",
    "ic course fees",
    "me semester fees",
    "pe tuition fees",
    "civil engineering fees",
    "ict hostel fees",

    # Department abbreviations - general queries (11-20)
    "cse block?",
    "ict hod",
    "me admission process",
    "ec faculty list",
    "it placement stats",
    "ce lab facilities",
    "ic course duration",
    "pe project guidelines",
    "civil department location",
    "ds hod name",

    # Full department names (21-25)
    "computer science engineering seats",
    "information technology syllabus",
    "mechanical engineering faculty",
    "electronics and communication labs",
    "instrumentation and control projects",

    # Generic queries - no department (26-35)
    "What is the yearly fee?",
    "hostel facilities",
    "admission process",
    "library timing",
    "placement statistics",
    "scholarship available",
    "bus route",
    "college canteen",
    "wifi password",
    "exam schedule",

    # Edge cases - ambiguous/short (36-42)
    "fees",
    "admission",
    "placement",
    "hostel",
    "timing",
    "location",
    "contact",

    # ACPC/STS related (43-45)
    "acpc registration",
    "sts login",
    "acpc merit list",

    # Mixed/Complex queries (46-50)
    "ds vs cse which is better",
    "it or ce for placement",
    "fees for ds and cse both",
    "cse and it difference",
    "mechanical or civil scope"
]

results = []
for question in test_questions:
    prompt = template.invoke({
        "query": question
    })
    result = model.invoke(prompt)
    # print("*"*50)
    # print("Question : ", question)
    # print("Rewrote : ", result.content)
    results.append({
        "question": question,
        "rewrote": result.content
    })

print(results)