WikiConstraintCalibration: Content-Aware Cost Preference Estimation for Constraint Threshold Selection in Wiki-Grounded LLM Agents
Article Information
Abstract
Wiki-grounded LLM agents enforce output constraints through safety rules and scope boundaries derived from structured knowledge bases, yet selecting an appropriate constraint scorer threshold $\theta$ remains challenging. Since outputs are blocked when $s(o) \geq \theta$, a low threshold may over-restrict safe responses, whereas a high threshold may admit dangerous outputs. Existing approaches largely rely on manual, domain-agnostic tuning without systematically incorporating wiki content. This paper proposes WikiConstraintCalibration, a framework that extracts eight wiki-derived features spanning hazard indicators (dangerous assertion density, immediate-action fraction, domain risk prior, and high-risk constraint fraction) and reliability indicators (citation rate, completeness, staleness mean, and stale fraction). These features determine a domain-specific cost ratio $\rho=C_{fn}/C_{fp}$, representing the relative cost of missing dangerous outputs versus blocking safe ones. The ratio determines a safety weight $w_s$ for navigating an empirical Safety--Function Pareto frontier, while constrained optimisation identifies a recommended operating region $[\theta_l,\theta_h]$. A dynamic module further incorporates staleness signals to adapt class-conditional response policies. Experiments across four deployed wiki-agent domains show that the cost ratio captures domain risk differences, ranging from 5.76 for GP medical to 1.89 for AI course. The GP domain selects the lowest feasible threshold, $\theta^\ast=0.32$, driven by a score-distribution cliff near $\theta\approx0.30$. Ablation analysis identifies domain risk prior as the dominant calibration factor, while content-level features provide additional discrimination. Overall, WikiConstraintCalibration provides an auditable, content-grounded approach to threshold calibration by linking wiki characteristics and domain risk to empirical safety--function trade-offs. Future work will address limited test-set sizes and domain-generic safety judging through human annotation and domain-specific scoring.
Graphical Abstract
Keywords
Data Availability Statement
Funding
Conflicts of Interest
AI Use Statement
Ethical Approval and Consent to Participate
References
- Karpathy, A. (2026, April). LLM Wiki: Maintaining structured knowledge bases for language model agents [GitHub Gist]. Retrieved from https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
[Google Scholar] - Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., ... & Kiela, D. (2020). Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in neural information processing systems, 33, 9459-9474. https://proceedings.neurips.cc/paper_files/paper/2020/hash/6b493230-Abstract.html
[Google Scholar] - Inan, H., Upasani, K., Chi, J., Rungta, R., Iyer, K., Mao, Y., ... & Khabsa, M. (2023). Llama guard: Llm-based input-output safeguard for human-ai conversations. arXiv preprint arXiv:2312.06674.
[CrossRef] [Google Scholar] - Bai, Y., Jones, A., Ndousse, K., Askell, A., Chen, A., DasSarma, N., ... & Kaplan, J. (2022). Training a helpful and harmless assistant with reinforcement learning from human feedback. arXiv preprint arXiv:2204.05862.
[CrossRef] [Google Scholar] - Elkan, C. (2001, August). The foundations of cost-sensitive learning. In International joint conference on artificial intelligence (Vol. 17, No. 1, pp. 973-978). Lawrence Erlbaum Associates Ltd. https://cseweb.ucsd.edu/~elkan/rescale.pdf
[Google Scholar] - Platt, J. (1999). Probabilistic outputs for support vector machines and comparisons to regularized likelihood methods. Advances in large margin classifiers, 10(3), 61-74. https://www.researchgate.net/publication/2594015
[Google Scholar] - Angelopoulos, A., Bates, S., Fisch, A., Lei, L., & Schuster, T. (2024, May). Conformal risk control. In International conference on learning representations (Vol. 2024, pp. 55198-55218). https://proceedings.iclr.cc/paper_files/paper/2024/hash/f3549ef9b5ff520a7e41ff3cc306ab2b-Abstract-Conference.html
[Google Scholar] - Bai, Y., Kadavath, S., Kundu, S., Askell, A., Kernion, J., Jones, A., ... & Kaplan, J. (2022). Constitutional ai: Harmlessness from ai feedback. arXiv preprint arXiv:2212.08073.
[CrossRef] [Google Scholar] - Zeng, A., Xu, B., Wang, B., Zhang, C., Yin, D., ... & Wang, Z. (2024). Chatglm: A family of large language models from glm-130b to glm-4 all tools. arXiv preprint arXiv:2406.12793.
[CrossRef] [Google Scholar]
Cite This Article
TY - JOUR
AU - Zhang, Bailing
PY - 2026
DA - 2026/09/05
TI - WikiConstraintCalibration: Content-Aware Cost Preference Estimation for Constraint Threshold Selection in Wiki-Grounded LLM Agents
JO - Next-Generation Computing Systems and Technologies
T2 - Next-Generation Computing Systems and Technologies
JF - Next-Generation Computing Systems and Technologies
VL - 2
IS - 3
SP - 99
EP - 108
DO - 10.62762/NGCST.2026.503855
UR - https://www.icck.org/article/abs/NGCST.2026.503855
KW - LLM agents
KW - constraint calibration
KW - wiki
KW - Pareto frontier
KW - cost-sensitive classification
KW - knowledge freshness
AB - Wiki-grounded LLM agents enforce output constraints through safety rules and scope boundaries derived from structured knowledge bases, yet selecting an appropriate constraint scorer threshold $\theta$ remains challenging. Since outputs are blocked when $s(o) \geq \theta$, a low threshold may over-restrict safe responses, whereas a high threshold may admit dangerous outputs. Existing approaches largely rely on manual, domain-agnostic tuning without systematically incorporating wiki content. This paper proposes WikiConstraintCalibration, a framework that extracts eight wiki-derived features spanning hazard indicators (dangerous assertion density, immediate-action fraction, domain risk prior, and high-risk constraint fraction) and reliability indicators (citation rate, completeness, staleness mean, and stale fraction). These features determine a domain-specific cost ratio $\rho=C_{fn}/C_{fp}$, representing the relative cost of missing dangerous outputs versus blocking safe ones. The ratio determines a safety weight $w_s$ for navigating an empirical Safety--Function Pareto frontier, while constrained optimisation identifies a recommended operating region $[\theta_l,\theta_h]$. A dynamic module further incorporates staleness signals to adapt class-conditional response policies. Experiments across four deployed wiki-agent domains show that the cost ratio captures domain risk differences, ranging from 5.76 for GP medical to 1.89 for AI course. The GP domain selects the lowest feasible threshold, $\theta^\ast=0.32$, driven by a score-distribution cliff near $\theta\approx0.30$. Ablation analysis identifies domain risk prior as the dominant calibration factor, while content-level features provide additional discrimination. Overall, WikiConstraintCalibration provides an auditable, content-grounded approach to threshold calibration by linking wiki characteristics and domain risk to empirical safety--function trade-offs. Future work will address limited test-set sizes and domain-generic safety judging through human annotation and domain-specific scoring.
SN - 3070-3328
PB - Institute of Central Computation and Knowledge
LA - English
ER -
@article{Zhang2026WikiConstr,
author = {Bailing Zhang},
title = {WikiConstraintCalibration: Content-Aware Cost Preference Estimation for Constraint Threshold Selection in Wiki-Grounded LLM Agents},
journal = {Next-Generation Computing Systems and Technologies},
year = {2026},
volume = {2},
number = {3},
pages = {99-108},
doi = {10.62762/NGCST.2026.503855},
url = {https://www.icck.org/article/abs/NGCST.2026.503855},
abstract = {Wiki-grounded LLM agents enforce output constraints through safety rules and scope boundaries derived from structured knowledge bases, yet selecting an appropriate constraint scorer threshold \$\theta\$ remains challenging. Since outputs are blocked when \$s(o) \geq \theta\$, a low threshold may over-restrict safe responses, whereas a high threshold may admit dangerous outputs. Existing approaches largely rely on manual, domain-agnostic tuning without systematically incorporating wiki content. This paper proposes WikiConstraintCalibration, a framework that extracts eight wiki-derived features spanning hazard indicators (dangerous assertion density, immediate-action fraction, domain risk prior, and high-risk constraint fraction) and reliability indicators (citation rate, completeness, staleness mean, and stale fraction). These features determine a domain-specific cost ratio \$\rho=C\_{fn}/C\_{fp}\$, representing the relative cost of missing dangerous outputs versus blocking safe ones. The ratio determines a safety weight \$w\_s\$ for navigating an empirical Safety--Function Pareto frontier, while constrained optimisation identifies a recommended operating region \$[\theta\_l,\theta\_h]\$. A dynamic module further incorporates staleness signals to adapt class-conditional response policies. Experiments across four deployed wiki-agent domains show that the cost ratio captures domain risk differences, ranging from 5.76 for GP medical to 1.89 for AI course. The GP domain selects the lowest feasible threshold, \$\theta^\ast=0.32\$, driven by a score-distribution cliff near \$\theta\approx0.30\$. Ablation analysis identifies domain risk prior as the dominant calibration factor, while content-level features provide additional discrimination. Overall, WikiConstraintCalibration provides an auditable, content-grounded approach to threshold calibration by linking wiki characteristics and domain risk to empirical safety--function trade-offs. Future work will address limited test-set sizes and domain-generic safety judging through human annotation and domain-specific scoring.},
keywords = {LLM agents, constraint calibration, wiki, Pareto frontier, cost-sensitive classification, knowledge freshness},
issn = {3070-3328},
publisher = {Institute of Central Computation and Knowledge}
}
Article Metrics
Publisher's Note
ICCK stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and Permissions
Copyright © 2026 by the Author(s). Published by Institute of Central Computation and Knowledge. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.
Portico