top of page
Diseño e Implementación de KG-RAG Dinámico: una Extensión del Paradigma Rag con Memoria Persistente mediante Grafo de Conocimiento Bitemporal

Design and Implementation of Dynamic KG-RAG: Extending the
RAG Paradigm with Persistent Memory through a Bitemporal
Knowledge Graph

   Caldera   Sánchez Christian Javier
   Narvalla Innovación S.A.P.I. de C.V.
   christian.caldera@outlook.com
   https://orcid.org/0009-0000-2638-9737

Volumen:

2

Edición:

12

Resumen

Los sistemas de Generación Aumentada por Recuperación (RAG) permiten consultar fuentes externas para generar respuestas fundamentadas; sin embargo, carecen de mecanismos para actualizar el conocimiento entre interacciones, lo que limita su personalización y continuidad a largo plazo. Este artículo presenta el diseño e implementación de un motor de memoria persistente multicapa, denominado KG-RAG Dinámico, que extiende este paradigma mediante la incorporación de memoria dinámica basada en un grafo de conocimiento bitemporal.

El objetivo es desarrollar una arquitectura capaz de retener, estructurar y recuperar conocimiento a través de sesiones independientes. Para ello, se siguió un enfoque en cuatro fases: revisión del estado del arte, definición arquitectónica, implementación y validación experimental. La propuesta organiza la memoria en tres capas: transcripciones brutas inmutables, un grafo bitemporal que modela entidades, relaciones y su evolución en el tiempo, y una capa de recuperación híbrida que integra búsqueda semántica mediante embeddings, búsqueda léxica y recorrido de grafo. El contexto recuperado se inyecta sistemáticamente antes de la generación de respuestas. El grafo se construye de forma automática y asíncrona mediante un pipeline de extracción de entidades y relaciones, eliminando la necesidad de indexación manual. Los resultados muestran una recuperación consistente de contexto entre sesiones y una representación coherente de hechos cambiantes en el tiempo. La viabilidad se valida mediante un prototipo implementado como agente conversacional. Se concluye que KG-RAG Dinámico amplía eficazmente el paradigma RAG y es aplicable a sistemas que requieren memoria estructurada, persistente y evolutiva.

RevistaCIDTec2026V2.png
Palabras clave

Grafo de Conocimiento Bi-temporal, KG-RAG Dinámico, Memoria Persistente Dinámica, Modelos de Lenguaje, Recuperación Híbrida, Sistemas de Inteligencia Artificial.

Referencias Bibliográficas
  • Anthropic. (2024). The Claude 3 model family: Opus, Sonnet, Haiku. https://www-cdn.anthropic.com/de8ba9b01c9ab7cbabf5c33b80b7bbc618857627/Model_Card_Claude_3.pdf

  • Chen, Z., Du, W., Zhang, W., Liu, K., Liu, J., Zheng, M., Zhuo, J., Zhang, S., Lin, D., Chen, K., & Zhao, F. (2024). T-Eval: Evaluating the Tool Utilization Capability of Large Language Models Step by Step. Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 9510–9529. https://doi.org/10.18653/v1/2024.acl-long.515

  • Chhikara, P., Khant, D., Aryan, S., Singh, T., & Yadav, D. (2025). Mem0: Building production-ready AI agents with scalable long-term memory. arXiv preprint arXiv:2504.19413. https://arxiv.org/abs/2504.19413

  • Cormack, G. V., Clarke, C. L. A., & Büttcher, S. (2009). Reciprocal Rank Fusion Outperforms Condorcet and Individual Rank Learning Methods. Proceedings of the 32nd International ACM SIGIR Conference on Research and Development in Information Retrieval, 758–759. https://doi.org/10.1145/1571941.1572114

  • Edge, D., Trinh, H., Cheng, N., Bradley, J., Chao, A., Mody, A., Truitt, S., Metropolitansky, D., Ness, R. O., & Larson, J. (2024). From local to global: A Graph RAG approach to query-focused summarization. arXiv preprint arXiv:2404.16130. https://arxiv.org/abs/2404.16130

  • Gemma Team. (2026). Gemma 4 model card. Google AI for Developers. https://ai.google.dev/gemma/docs/core/model_card_4

  • Khot, T., Trivedi, H., Finlayson, M., Fu, Y., Richardson, K., Clark, P., & Sabharwal, A. (2023). Decomposed Prompting: A Modular Approach for Solving Complex Tasks. Proceedings of the 11th International Conference on Learning Representations (ICLR 2023). https://arxiv.org/abs/2210.02406

  • Kulkarni, K., & Michels, J.-E. (2012). Temporal Features in SQL:2011. ACM SIGMOD Record, 41(3), 34–43. https://doi.org/10.1145/2380776.2380786

  • Leblay, J., & Chekol, M. W. (2018). Towards Probabilistic Bitemporal Knowledge Graphs. Companion Proceedings of The Web Conference 2018 (WWW '18), 1–6. https://doi.org/10.1145/3184558.3191637

  • Luan, Y., Eisenstein, J., Toutanova, K., & Collins, M. (2021). Sparse, Dense, and Attentional Representations for Text Retrieval. Transactions of the Association for Computational Linguistics, 9, 329–345. https://doi.org/10.1162/tacl_a_00369

  • Packer, C., Wooders, S., Lin, K., Fang, V., Patil, S. G., Stoica, I., & Gonzalez, J. E. (2023). MemGPT: Towards LLMs as operating systems. arXiv preprint arXiv:2310.08560. https://arxiv.org/abs/2310.08560

  • Patil, S. G., Mao, H., Yan, F., Ji, C. C.-J., Suresh, V., Stoica, I., & Gonzalez, J. E. (2025). The Berkeley Function Calling Leaderboard (BFCL): From Tool Use to Agentic Evaluation of Large Language Models. En Proceedings of the 42nd International Conference on Machine Learning (Vol. 267, pp. 48371–48392). PMLR. https://proceedings.mlr.press/v267/patil25a.html

  • Rasmussen, P., Paliychuk, P., Beauvais, T., Ryan, J., & Chalef, D. (2025). Zep: A temporal knowledge graph architecture for agent memory. arXiv preprint arXiv:2501.13956. https://arxiv.org/abs/2501.13956

  • Reimers, N., & Gurevych, I. (2021). The curse of dense low-dimensional information retrieval for large index sizes. En C. Zong, F. Xia, W. Li, & R. Navigli (Eds.), Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 2: Short Papers) (pp. 605–611). Association for Computational Linguistics. https://doi.org/10.18653/v1/2021.acl-short.77

  • Richardson, C. (2018). Microservices Patterns: With Examples in Java. Manning Publications. https://microservices.io/patterns/data/transactional-outbox.html

  • Snodgrass, R. T., & Ahn, I. (1985). A Taxonomy of Time in Databases. Proceedings of the 1985 ACM SIGMOD International Conference on Management of Data, 236–246. https://doi.org/10.1145/318898.318921

  • Thakur, N., Reimers, N., Rücklé, A., Srivastava, A., & Gurevych, I. (2021). BEIR: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models. Proceedings of the 35th Conference on Neural Information Processing Systems (NeurIPS 2021), Datasets and Benchmarks Track. https://arxiv.org/abs/2104.08663

  • Vashishth, S., Jain, P., & Talukdar, P. (2018). CESI: Canonicalizing Open Knowledge Bases using Embeddings and Side Information. Proceedings of the 2018 World Wide Web Conference (WWW '18), 1317–1327. https://doi.org/10.1145/3178876.3186030

  • Zaratiana, U., Tomeh, N., Holat, P., & Charnois, T. (2024). GLiNER: Generalist Model for Named Entity Recognition using Bidirectional Transformer. Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics (NAACL 2024). https://arxiv.org/abs/2311.08526

  • Zhang, Z., Dai, Q., Bo, X., Ma, C., Li, R., Chen, X., Zhu, J., Dong, Z., & Wen, J.-R. (2025). A survey on the memory mechanism of large language model-based agents. ACM Transactions on Information Systems, 43(6), Article 155. https://doi.org/10.1145/3748302

Ciencia, Ingeniería y Desarrollo (CID-TecLerdo) es una revista científica arbitrada, de publicación anual, editada por el Instituto Tecnológico Superior de Lerdo (Av. Tecnológico N 1555 Sur Periférico Gómez Lerdo Km. 14.5C.P. 35150 Cd. Lerdo, Dgo; Tels. 871 725 23 71, 871 725 57 79, 871 725 58 02), dedicada a la difusión de resultados originales de investigación en las áreas de ingeniería, tecnología, innovación y desarrollo científico. Publica contribuciones originales sometidas a un proceso de evaluación por pares académicos bajo la modalidad triple ciego.

by.png
  • Facebook
  • X
  • YouTube
bottom of page