Skip to content

Research Articles

Semantic Answer Caching with Version Boundaries: Delayed Feedback

Mara Belmere (Data Engineering Group, Kestrelby Institute of Technology), Tomas Ivermere (Data Engineering Group, Cairnwell Research Institute), Leila Hartfen (Autonomous Systems Laboratory, Ivermere University), Nadia Ivermere (Data Engineering Group, Cairnwell Research Institute), Amari Alderfen (Machine Learning Laboratory, Thornmere Polytechnic), Priya Ternwell (Machine Learning Laboratory, Eastmarsh Institute for Applied Computing)

Vol. 5 No. 1 (2024) · pp. 132–144 · Published 12 August 2024

Abstract

We ask whether checking embedding similarity and the evidence snapshot before reusing a generated answer performs better than reusing the nearest cached answer by similarity alone in a setting where feedback is available only after the next decision. The evaluation is synthetic. Each configuration is evaluated on the same 240 cases. In the 60 stress cases, nearly identical prompts must refer to different policy editions; the analysis distinguishes decisions made with incomplete feedback from those scored after the full trace is known. A case counts as a pass only if it meets this criterion: a cache hit must still be correct for the current corpus and requested date. The replay retains source versions and arrival order. A reference output built from the complete synthetic history is used to distinguish a fast response from one that is both current and correct. Across the full set, 180 cases meet the criterion with the first configuration and 171 with the second. The stress cases account for 44 and 33 passes, respectively. The stress results should be read alongside the full-set results rather than treated as a general performance guarantee. The practical trade-off is that a version-aware cache invalidates some answers that would still be valid. The paired design makes the comparison interpretable within the fixture. It does not establish the size of the effect in an independent deployment.

Keywords: semantic caching, retrieval-augmented generation, snapshot consistency, delayed feedback, synthetic evaluation

References

  1. Baroni, M., Dinu, G., & Kruszewski, G. (2014). Don't count, predict! A systematic comparison of context-counting vs. context-predicting semantic vectors. Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics, 238–247.
  2. Es, S., James, J., Espinosa-Anke, L., & Schockaert, S. (2023). RAGAS: Automated evaluation of retrieval augmented generation. arXiv:2309.15217.
  3. Gao, Y., et al. (2023). Retrieval-augmented generation for large language models: A survey. arXiv:2312.10997.
  4. Guu, K., Lee, K., Tung, Z., Pasupat, P., & Chang, M.-W. (2020). REALM: Retrieval-augmented language model pre-training. Proceedings of the 37th International Conference on Machine Learning, 3929–3938.
  5. Izacard, G., et al. (2022). Atlas: Few-shot learning with retrieval augmented language models. arXiv:2208.03299.
  6. Jiang, Z., et al. (2023). Active retrieval augmented generation. Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, 7969–7992.
  7. Krishna, K., Song, Y., Karpinska, M., Wieting, J., & Iyyer, M. (2023). Paraphrasing evades detectors of AI-generated text, but retrieval is an effective defense. Advances in Neural Information Processing Systems, 36.
  8. Lewis, P., et al. (2020). Retrieval-augmented generation for knowledge-intensive NLP tasks. Advances in Neural Information Processing Systems, 33, 9459–9474.
  9. Ma, J., Korotkov, I., Yang, Y., Hall, K., & McDonald, R. (2021). Zero-shot neural passage retrieval via domain-targeted synthetic question generation. Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics, 1075–1088.
  10. Ma, X., Gong, Y., He, P., Zhao, H., & Duan, N. (2023). Query rewriting for retrieval-augmented large language models. Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, 5303–5315.
  11. Ram, O., et al. (2023). In-context retrieval-augmented language models. Transactions of the Association for Computational Linguistics, 11, 1316–1331.
  12. Salton, G., & Buckley, C. (1988). Term-weighting approaches in automatic text retrieval. Information Processing & Management, 24(5), 513–523.
  13. Shen, Y., He, X., Gao, J., Deng, L., & Mesnil, G. (2014). A latent semantic model with convolutional-pooling structure for information retrieval. Proceedings of the 23rd ACM International Conference on Information and Knowledge Management, 101–110.
  14. Shi, W., et al. (2023). REPLUG: Retrieval-augmented black-box language models. arXiv:2301.12652.