Bayesian_LangChain / artifacts /rag_benchmark_results.json
Angshul's picture
Upload 22 files
ce3f6c1 verified
Raw History Blame Contribute Delete
24.7 kB
{
"benchmark": "controlled_rag_v2",
"methodology": "Two end-to-end suites. CLEAN checks ordinary retrieval+grounded answer synthesis. CONFLICT adds stale authoritative conflicts, missing evidence, and unresolved equal-authority contradictions. The generator is extractive and citation-grounded so the evaluation isolates retrieval and uncertainty behavior without an external LLM confound.",
"clean": {
"bayesian": {
"system": "bayesian",
"n_cases": 8,
"answerable_cases": 8,
"abstention_cases": 0,
"recall_at_1": 1.0,
"recall_at_3": 1.0,
"mrr": 1.0,
"end_to_end_accuracy": 1.0,
"grounding_accuracy": 1.0,
"abstention_accuracy": null,
"answer_accuracy_on_answerable": 1.0,
"top_posterior_brier": 2.8128197163138293e-05
},
"baseline": {
"system": "plain_tfidf",
"n_cases": 8,
"answerable_cases": 8,
"abstention_cases": 0,
"recall_at_1": 1.0,
"recall_at_3": 1.0,
"mrr": 1.0,
"end_to_end_accuracy": 1.0,
"grounding_accuracy": 1.0,
"abstention_accuracy": null,
"answer_accuracy_on_answerable": 1.0,
"top_posterior_brier": 0.0
},
"bayesian_cases": [
{
"id": "c1",
"query": "When does the observatory open on Saturday?",
"expected_abstain": false,
"top_doc": "C1",
"retrieval_score": 0.552814,
"top_posterior": 0.991539,
"answer": "The observatory opens to visitors at 9 AM every Saturday. [C1]",
"citations": [
"C1"
],
"correct": true,
"grounded": true
},
{
"id": "c2",
"query": "Where is the chemistry safety briefing held?",
"expected_abstain": false,
"top_doc": "C2",
"retrieval_score": 0.825787,
"top_posterior": 0.996101,
"answer": "The chemistry safety briefing is held in Hall 7. [C2]",
"citations": [
"C2"
],
"correct": true,
"grounded": true
},
{
"id": "c3",
"query": "How long may library books be borrowed?",
"expected_abstain": false,
"top_doc": "C3",
"retrieval_score": 0.683723,
"top_posterior": 0.994378,
"answer": "Library books may be borrowed for 21 days. [C3]",
"citations": [
"C3"
],
"correct": true,
"grounded": true
},
{
"id": "c4",
"query": "When does the robotics club meet?",
"expected_abstain": false,
"top_doc": "C4",
"retrieval_score": 0.742488,
"top_posterior": 0.995207,
"answer": "The robotics club meets on Thursday evenings. [C4]",
"citations": [
"C4"
],
"correct": true,
"grounded": true
},
{
"id": "c5",
"query": "Where is visitor parking?",
"expected_abstain": false,
"top_doc": "C5",
"retrieval_score": 0.79521,
"top_posterior": 0.995804,
"answer": "Visitor parking is located beside Gate 3. [C5]",
"citations": [
"C5"
],
"correct": true,
"grounded": true
},
{
"id": "c6",
"query": "What time does the campus shuttle begin service?",
"expected_abstain": false,
"top_doc": "C6",
"retrieval_score": 0.769605,
"top_posterior": 0.995529,
"answer": "The campus shuttle begins service at 6:30 AM. [C6]",
"citations": [
"C6"
],
"correct": true,
"grounded": true
},
{
"id": "c7",
"query": "How many credits is the data science seminar worth?",
"expected_abstain": false,
"top_doc": "C7",
"retrieval_score": 0.836653,
"top_posterior": 0.996199,
"answer": "The data science seminar carries two academic credits. [C7]",
"citations": [
"C7"
],
"correct": true,
"grounded": true
},
{
"id": "c8",
"query": "Where is the emergency assembly point?",
"expected_abstain": false,
"top_doc": "C8",
"retrieval_score": 0.683723,
"top_posterior": 0.994378,
"answer": "The emergency assembly point is the North Lawn. [C8]",
"citations": [
"C8"
],
"correct": true,
"grounded": true
}
],
"baseline_cases": [
{
"id": "c1",
"query": "When does the observatory open on Saturday?",
"expected_abstain": false,
"top_doc": "C1",
"retrieval_score": 0.552814,
"top_posterior": 1.0,
"answer": "The observatory opens to visitors at 9 AM every Saturday. [C1]",
"citations": [
"C1"
],
"correct": true,
"grounded": true
},
{
"id": "c2",
"query": "Where is the chemistry safety briefing held?",
"expected_abstain": false,
"top_doc": "C2",
"retrieval_score": 0.825787,
"top_posterior": 1.0,
"answer": "The chemistry safety briefing is held in Hall 7. [C2]",
"citations": [
"C2"
],
"correct": true,
"grounded": true
},
{
"id": "c3",
"query": "How long may library books be borrowed?",
"expected_abstain": false,
"top_doc": "C3",
"retrieval_score": 0.683723,
"top_posterior": 1.0,
"answer": "Library books may be borrowed for 21 days. [C3]",
"citations": [
"C3"
],
"correct": true,
"grounded": true
},
{
"id": "c4",
"query": "When does the robotics club meet?",
"expected_abstain": false,
"top_doc": "C4",
"retrieval_score": 0.742488,
"top_posterior": 1.0,
"answer": "The robotics club meets on Thursday evenings. [C4]",
"citations": [
"C4"
],
"correct": true,
"grounded": true
},
{
"id": "c5",
"query": "Where is visitor parking?",
"expected_abstain": false,
"top_doc": "C5",
"retrieval_score": 0.79521,
"top_posterior": 1.0,
"answer": "Visitor parking is located beside Gate 3. [C5]",
"citations": [
"C5"
],
"correct": true,
"grounded": true
},
{
"id": "c6",
"query": "What time does the campus shuttle begin service?",
"expected_abstain": false,
"top_doc": "C6",
"retrieval_score": 0.769605,
"top_posterior": 1.0,
"answer": "The campus shuttle begins service at 6:30 AM. [C6]",
"citations": [
"C6"
],
"correct": true,
"grounded": true
},
{
"id": "c7",
"query": "How many credits is the data science seminar worth?",
"expected_abstain": false,
"top_doc": "C7",
"retrieval_score": 0.836653,
"top_posterior": 1.0,
"answer": "The data science seminar carries two academic credits. [C7]",
"citations": [
"C7"
],
"correct": true,
"grounded": true
},
{
"id": "c8",
"query": "Where is the emergency assembly point?",
"expected_abstain": false,
"top_doc": "C8",
"retrieval_score": 0.683723,
"top_posterior": 1.0,
"answer": "The emergency assembly point is the North Lawn. [C8]",
"citations": [
"C8"
],
"correct": true,
"grounded": true
}
]
},
"conflict": {
"bayesian": {
"system": "bayesian",
"n_cases": 18,
"answerable_cases": 12,
"abstention_cases": 6,
"recall_at_1": 1.0,
"recall_at_3": 1.0,
"mrr": 1.0,
"end_to_end_accuracy": 1.0,
"grounding_accuracy": 1.0,
"abstention_accuracy": 1.0,
"answer_accuracy_on_answerable": 1.0,
"top_posterior_brier": 0.09485010369519668
},
"baseline": {
"system": "plain_tfidf",
"n_cases": 18,
"answerable_cases": 12,
"abstention_cases": 6,
"recall_at_1": 0.25,
"recall_at_3": 1.0,
"mrr": 0.611111111111111,
"end_to_end_accuracy": 0.2777777777777778,
"grounding_accuracy": 1.0,
"abstention_accuracy": 0.3333333333333333,
"answer_accuracy_on_answerable": 0.25,
"top_posterior_brier": 0.26943925109630584
},
"bayesian_cases": [
{
"id": "q1",
"query": "What is the current HR portal for leave requests and payslips?",
"expected_abstain": false,
"top_doc": "OFF-HR-PORTAL",
"retrieval_score": 0.221707,
"top_posterior": 0.419857,
"answer": "All employee self-service tasks, including leave requests and payslips, are now handled in PeopleHub. [OFF-HR-PORTAL]",
"citations": [
"OFF-HR-PORTAL"
],
"correct": true,
"grounded": true
},
{
"id": "q2",
"query": "How many paid leave days do employees get per year under the current policy?",
"expected_abstain": false,
"top_doc": "OFF-LEAVE",
"retrieval_score": 0.366908,
"top_posterior": 0.675297,
"answer": "The 2026 employee benefits policy grants 18 paid leave days per calendar year. [OFF-LEAVE]",
"citations": [
"OFF-LEAVE"
],
"correct": true,
"grounded": true
},
{
"id": "q3",
"query": "How many remote work days per week are currently allowed with manager approval?",
"expected_abstain": false,
"top_doc": "OFF-REMOTE",
"retrieval_score": 0.383162,
"top_posterior": 0.598358,
"answer": "Under the active flexible-work policy, employees may work remotely up to two days per week with manager approval. [OFF-REMOTE]",
"citations": [
"OFF-REMOTE"
],
"correct": true,
"grounded": true
},
{
"id": "q4",
"query": "By which working day are salary slips published each month?",
"expected_abstain": false,
"top_doc": "OFF-PAYSLIP",
"retrieval_score": 0.457118,
"top_posterior": 0.8609,
"answer": "Payroll publishes salary slips by the fifth working day of each month. [OFF-PAYSLIP]",
"citations": [
"OFF-PAYSLIP"
],
"correct": true,
"grounded": true
},
{
"id": "q5",
"query": "Which VPN protocol is required by the current corporate security baseline?",
"expected_abstain": false,
"top_doc": "OFF-VPN",
"retrieval_score": 0.514507,
"top_posterior": 0.904463,
"answer": "The security baseline now requires WireGuard for the standard corporate VPN profile. [OFF-VPN]",
"citations": [
"OFF-VPN"
],
"correct": true,
"grounded": true
},
{
"id": "q6",
"query": "What is the production database backup retention period?",
"expected_abstain": false,
"top_doc": "OFF-BACKUP",
"retrieval_score": 0.424384,
"top_posterior": 0.835659,
"answer": "Production database backups have a retention period of 30 days. [OFF-BACKUP]",
"citations": [
"OFF-BACKUP"
],
"correct": true,
"grounded": true
},
{
"id": "q7",
"query": "What is the current public API rate limit per minute per token?",
"expected_abstain": false,
"top_doc": "OFF-RATE",
"retrieval_score": 0.260415,
"top_posterior": 0.600144,
"answer": "The current gateway quota permits 120 requests per minute per token. [OFF-RATE]",
"citations": [
"OFF-RATE"
],
"correct": true,
"grounded": true
},
{
"id": "q8",
"query": "Which cloud region is primary for production?",
"expected_abstain": false,
"top_doc": "OFF-REGION",
"retrieval_score": 0.400734,
"top_posterior": 0.819994,
"answer": "The production primary region is ap-south-1; disaster recovery remains in a separate region. [OFF-REGION]",
"citations": [
"OFF-REGION"
],
"correct": true,
"grounded": true
},
{
"id": "q9",
"query": "What is the domestic business travel meal expense cap per day?",
"expected_abstain": false,
"top_doc": "OFF-EXPENSE",
"retrieval_score": 0.391575,
"top_posterior": 0.520438,
"answer": "For domestic business travel, reimbursable meals are capped at INR 4,500 per day. [OFF-EXPENSE]",
"citations": [
"OFF-EXPENSE"
],
"correct": true,
"grounded": true
},
{
"id": "q10",
"query": "Within how many days must expense reimbursement claims be submitted?",
"expected_abstain": false,
"top_doc": "OFF-REIMB",
"retrieval_score": 0.513156,
"top_posterior": 0.907517,
"answer": "Expense claims must be submitted within 15 days of the transaction date. [OFF-REIMB]",
"citations": [
"OFF-REIMB"
],
"correct": true,
"grounded": true
},
{
"id": "q11",
"query": "Which portal must be used to book approved business travel?",
"expected_abstain": false,
"top_doc": "OFF-TRAVEL",
"retrieval_score": 0.580663,
"top_posterior": 0.832603,
"answer": "Approved business travel must be booked through TripDesk. [OFF-TRAVEL]",
"citations": [
"OFF-TRAVEL"
],
"correct": true,
"grounded": true
},
{
"id": "q12",
"query": "Above what amount is procurement review mandatory?",
"expected_abstain": false,
"top_doc": "OFF-PROC",
"retrieval_score": 0.512226,
"top_posterior": 0.856608,
"answer": "Procurement review is mandatory for purchases above INR 50,000. [OFF-PROC]",
"citations": [
"OFF-PROC"
],
"correct": true,
"grounded": true
},
{
"id": "q13",
"query": "What is the company dental insurance annual limit?",
"expected_abstain": true,
"top_doc": "LEG-RATE",
"retrieval_score": 0.325883,
"top_posterior": 0.829873,
"answer": "I do not know based on the provided documents.",
"citations": [],
"correct": true,
"grounded": true
},
{
"id": "q14",
"query": "What is the cafeteria breakfast price?",
"expected_abstain": true,
"top_doc": "OFF-HR-PORTAL",
"retrieval_score": 0.0,
"top_posterior": 0.248018,
"answer": "I do not know based on the provided documents.",
"citations": [],
"correct": true,
"grounded": true
},
{
"id": "q15",
"query": "What is the emergency satellite phone number?",
"expected_abstain": true,
"top_doc": "OFF-HR-PORTAL",
"retrieval_score": 0.0,
"top_posterior": 0.248018,
"answer": "I do not know based on the provided documents.",
"citations": [],
"correct": true,
"grounded": true
},
{
"id": "q16",
"query": "What is the annual gym membership reimbursement?",
"expected_abstain": true,
"top_doc": "OFF-REIMB",
"retrieval_score": 0.178672,
"top_posterior": 0.385158,
"answer": "I do not know based on the provided documents.",
"citations": [],
"correct": true,
"grounded": true
},
{
"id": "q17",
"query": "Which room is the graduate AI lab currently in?",
"expected_abstain": true,
"top_doc": "OFF-LAB-A",
"retrieval_score": 0.752053,
"top_posterior": 0.499378,
"answer": "I do not know based on the provided documents.",
"citations": [],
"correct": true,
"grounded": true
},
{
"id": "q18",
"query": "When are Professor Sen's office hours?",
"expected_abstain": true,
"top_doc": "OFF-OFFICE-A",
"retrieval_score": 0.702454,
"top_posterior": 0.49929,
"answer": "I do not know based on the provided documents.",
"citations": [],
"correct": true,
"grounded": true
}
],
"baseline_cases": [
{
"id": "q1",
"query": "What is the current HR portal for leave requests and payslips?",
"expected_abstain": false,
"top_doc": "LEG-HR-PORTAL",
"retrieval_score": 0.807312,
"top_posterior": 0.592469,
"answer": "The current HR portal for leave requests and payslips is WorkSphere. [LEG-HR-PORTAL]",
"citations": [
"LEG-HR-PORTAL"
],
"correct": false,
"grounded": true
},
{
"id": "q2",
"query": "How many paid leave days do employees get per year under the current policy?",
"expected_abstain": false,
"top_doc": "LEG-LEAVE",
"retrieval_score": 0.602126,
"top_posterior": 0.462903,
"answer": "Employees receive 15 paid leave days per year under the leave policy. [LEG-LEAVE]",
"citations": [
"LEG-LEAVE"
],
"correct": false,
"grounded": true
},
{
"id": "q3",
"query": "How many remote work days per week are currently allowed with manager approval?",
"expected_abstain": false,
"top_doc": "LEG-REMOTE",
"retrieval_score": 0.699429,
"top_posterior": 0.435096,
"answer": "The current remote work policy permits three remote days per week with manager approval. [LEG-REMOTE]",
"citations": [
"LEG-REMOTE"
],
"correct": false,
"grounded": true
},
{
"id": "q4",
"query": "By which working day are salary slips published each month?",
"expected_abstain": false,
"top_doc": "LEG-PAYSLIP",
"retrieval_score": 0.672029,
"top_posterior": 0.550648,
"answer": "Salary slips are published on the tenth working day of each month. [LEG-PAYSLIP]",
"citations": [
"LEG-PAYSLIP"
],
"correct": false,
"grounded": true
},
{
"id": "q5",
"query": "Which VPN protocol is required by the current corporate security baseline?",
"expected_abstain": false,
"top_doc": "LEG-VPN",
"retrieval_score": 0.524301,
"top_posterior": 0.420244,
"answer": "The supported corporate VPN protocol is OpenVPN. [LEG-VPN]",
"citations": [
"LEG-VPN"
],
"correct": false,
"grounded": true
},
{
"id": "q6",
"query": "What is the production database backup retention period?",
"expected_abstain": false,
"top_doc": "LEG-BACKUP",
"retrieval_score": 0.556814,
"top_posterior": 0.467937,
"answer": "Production database backups are retained for 14 days. [LEG-BACKUP]",
"citations": [
"LEG-BACKUP"
],
"correct": false,
"grounded": true
},
{
"id": "q7",
"query": "What is the current public API rate limit per minute per token?",
"expected_abstain": false,
"top_doc": "LEG-RATE",
"retrieval_score": 0.845222,
"top_posterior": 0.672178,
"answer": "The public API rate limit is 60 requests per minute per token. [LEG-RATE]",
"citations": [
"LEG-RATE"
],
"correct": false,
"grounded": true
},
{
"id": "q8",
"query": "Which cloud region is primary for production?",
"expected_abstain": false,
"top_doc": "LEG-REGION",
"retrieval_score": 0.542439,
"top_posterior": 0.460259,
"answer": "The primary deployment region is us-east-1. [LEG-REGION]",
"citations": [
"LEG-REGION"
],
"correct": false,
"grounded": true
},
{
"id": "q9",
"query": "What is the domestic business travel meal expense cap per day?",
"expected_abstain": false,
"top_doc": "LEG-EXPENSE",
"retrieval_score": 0.671336,
"top_posterior": 0.451066,
"answer": "The meal expense cap is INR 3,000 per day on domestic travel. [LEG-EXPENSE]",
"citations": [
"LEG-EXPENSE"
],
"correct": false,
"grounded": true
},
{
"id": "q10",
"query": "Within how many days must expense reimbursement claims be submitted?",
"expected_abstain": false,
"top_doc": "OFF-REIMB",
"retrieval_score": 0.513156,
"top_posterior": 0.45338,
"answer": "Expense claims must be submitted within 15 days of the transaction date. [OFF-REIMB]",
"citations": [
"OFF-REIMB"
],
"correct": true,
"grounded": true
},
{
"id": "q11",
"query": "Which portal must be used to book approved business travel?",
"expected_abstain": false,
"top_doc": "OFF-TRAVEL",
"retrieval_score": 0.580663,
"top_posterior": 0.514293,
"answer": "Approved business travel must be booked through TripDesk. [OFF-TRAVEL]",
"citations": [
"OFF-TRAVEL"
],
"correct": true,
"grounded": true
},
{
"id": "q12",
"query": "Above what amount is procurement review mandatory?",
"expected_abstain": false,
"top_doc": "OFF-PROC",
"retrieval_score": 0.512226,
"top_posterior": 0.38514,
"answer": "Procurement review is mandatory for purchases above INR 50,000. [OFF-PROC]",
"citations": [
"OFF-PROC"
],
"correct": true,
"grounded": true
},
{
"id": "q13",
"query": "What is the company dental insurance annual limit?",
"expected_abstain": true,
"top_doc": "LEG-RATE",
"retrieval_score": 0.325883,
"top_posterior": 1.0,
"answer": "The public API rate limit is 60 requests per minute per token. [LEG-RATE]",
"citations": [
"LEG-RATE"
],
"correct": false,
"grounded": true
},
{
"id": "q14",
"query": "What is the cafeteria breakfast price?",
"expected_abstain": true,
"top_doc": "LEG-HR-PORTAL",
"retrieval_score": 0.0,
"top_posterior": 0.0,
"answer": "I do not know based on the provided documents.",
"citations": [],
"correct": true,
"grounded": true
},
{
"id": "q15",
"query": "What is the emergency satellite phone number?",
"expected_abstain": true,
"top_doc": "LEG-HR-PORTAL",
"retrieval_score": 0.0,
"top_posterior": 0.0,
"answer": "I do not know based on the provided documents.",
"citations": [],
"correct": true,
"grounded": true
},
{
"id": "q16",
"query": "What is the annual gym membership reimbursement?",
"expected_abstain": true,
"top_doc": "COM-REIMB",
"retrieval_score": 0.333617,
"top_posterior": 0.327295,
"answer": "Finance may request additional receipts during reimbursement review. [COM-REIMB]",
"citations": [
"COM-REIMB"
],
"correct": false,
"grounded": true
},
{
"id": "q17",
"query": "Which room is the graduate AI lab currently in?",
"expected_abstain": true,
"top_doc": "OFF-LAB-A",
"retrieval_score": 0.752053,
"top_posterior": 0.5,
"answer": "The graduate AI lab has moved to room B-204. [OFF-LAB-A]",
"citations": [
"OFF-LAB-A"
],
"correct": false,
"grounded": true
},
{
"id": "q18",
"query": "When are Professor Sen's office hours?",
"expected_abstain": true,
"top_doc": "OFF-OFFICE-A",
"retrieval_score": 0.702454,
"top_posterior": 0.5,
"answer": "Professor Sen holds office hours on Tuesday at 3 PM. [OFF-OFFICE-A]",
"citations": [
"OFF-OFFICE-A"
],
"correct": false,
"grounded": true
}
]
}
}