fix: complete requirements.txt and inference.py output correctness.

- Add faiss-cpu, rank-bm25, sentence-transformers, numpy to requirements.txt.
  (previously only pymupdf was listed; other deps were manual-install only)
- Cast score to float() before round() to avoid numpy type serialization errors.
- Pass expected_standards through _format_result for eval script compatibility.
- Update retrieval_results.json with expected_standards per query for eval.
This commit is contained in:
K
2026-05-03 00:03:03 +05:30
parent 8e1348fb63
commit 29b32dfcac
3 changed files with 58 additions and 15 deletions
+40 -10
View File
@@ -46,7 +46,10 @@
"matched_section": "Degree Of Whiteness"
}
],
"latency_seconds": 0.0586
"latency_seconds": 0.024,
"expected_standards": [
"IS 269: 1989"
]
},
{
"id": "PUB-02",
@@ -95,7 +98,10 @@
"matched_section": "Scope"
}
],
"latency_seconds": 0.0478
"latency_seconds": 0.0168,
"expected_standards": [
"IS 383: 1970"
]
},
{
"id": "PUB-03",
@@ -144,7 +150,10 @@
"matched_section": "Tests"
}
],
"latency_seconds": 0.0448
"latency_seconds": 0.0165,
"expected_standards": [
"IS 458: 2003"
]
},
{
"id": "PUB-04",
@@ -193,7 +202,10 @@
"matched_section": "Scope"
}
],
"latency_seconds": 0.0452
"latency_seconds": 0.0161,
"expected_standards": [
"IS 2185 (Part 2): 1983"
]
},
{
"id": "PUB-05",
@@ -242,7 +254,10 @@
"matched_section": "Scope"
}
],
"latency_seconds": 0.0402
"latency_seconds": 0.0154,
"expected_standards": [
"IS 459: 1992"
]
},
{
"id": "PUB-06",
@@ -291,7 +306,10 @@
"matched_section": "Scope"
}
],
"latency_seconds": 0.0361
"latency_seconds": 0.0152,
"expected_standards": [
"IS 455: 1989"
]
},
{
"id": "PUB-07",
@@ -340,7 +358,10 @@
"matched_section": "Physical Requirements"
}
],
"latency_seconds": 0.0384
"latency_seconds": 0.0174,
"expected_standards": [
"IS 1489 (Part 2): 1991"
]
},
{
"id": "PUB-08",
@@ -389,7 +410,10 @@
"matched_section": "Classification"
}
],
"latency_seconds": 0.0352
"latency_seconds": 0.0167,
"expected_standards": [
"IS 3466: 1988"
]
},
{
"id": "PUB-09",
@@ -438,7 +462,10 @@
"matched_section": "Design And Manufacture"
}
],
"latency_seconds": 0.0432
"latency_seconds": 0.0178,
"expected_standards": [
"IS 6909: 1990"
]
},
{
"id": "PUB-10",
@@ -487,6 +514,9 @@
"matched_section": "Delivery"
}
],
"latency_seconds": 0.0333
"latency_seconds": 0.0156,
"expected_standards": [
"IS 8042: 1989"
]
}
]