Toward a Smart State: Cognitive Agents and RAG Architectures for Public Administration in Peru
Structured Summary
The adoption of artificial intelligence (AI) in Peru’s public administration requires transparency, traceability, and accountability. Large language models (LLMs) offer powerful capabilities, but they also pose risks such as hallucinations, opacity, and reliance on unverified data—risks that are unacceptable in government settings.
Objective. To analyze the potential of institutional cognitive agents based on Retrieval-Augmented Generation (RAG2) to enhance the reliability, traceability, and regulatory compliance of AI in the Peruvian public sector, in accordance with Law No. 31814 and its Regulations (D.S. 115-2025-PCM).
RAG agents represent a viable technical and legal strategy by enabling traceability, algorithmic transparency, human oversight, and risk management.
Theoretical Framework
Digital transformation positions artificial intelligence as a key driver for improving processes, supporting decision-making, and strengthening public services. However, the use of large language models (LLMs) requires a responsible approach that ensures the quality of information, transparency, and the protection of personal data.
Trustworthy AI addresses these challenges through explainability, robustness, security, traceability, and human oversight. This is where institutional cognitive agents come into play: socio-technical systems that frame artificial cognition within institutional rules, data, and objectives, integrating algorithmic governance and distributed cognition (the interaction between humans, norms, and technologies).
The Role of RAG Architectures
RAG architectures embody this trust. Unlike conventional models, RAG acts as an expert consultant: when faced with a query, they retrieve accurate information from verified institutional repositories before generating responses.
This approach prevents improvisation by grounding outputs in official sources. The operational workflow is:
- • Retrieval: Identifies relevant fragments in the knowledge base.
- • Augmentation: Enriches the query with verified context.
- • Generation: Produces cited and audible responses.
_________________
- 1LLM – Large Language Model.
- 2RAG – Generative Augmented Reconstruction .
- 3Regulations for Law No. 31814 – Supreme Decree No. 115-2025-PCM, Law Promoting the Use of Artificial Intelligence for the Economic and Social Development of the Country.
Strategic Impact and Public Value
Beyond technology, these agents are driving a cultural shift in knowledge management. They reduce research and synthesis tasks from days to seconds, freeing up human capital for high-value functions: interpretation, decision-making, and expert judgment.
This leads to greater institutional agility, increased productivity, and more efficient services, strengthening the government’s ability to lead the digital transformation in the region.
Regulatory Alignment in Peru
Law No. 31814: Principles and Authority
This law establishes a framework for AI in the digital transformation, prioritizing human rights. Key principles for RAG include:
- • Risk-based safety standards (sole article, subsection (a)).
- • Responsible ethical development (subsection e).
- • Privacy and security (subsection f).
- • Transparency and replicability (art. 1).
The Presidency of the Council of Ministers (PCM) / Secretariat of Government and Digital Transformation (SGTD) serves as the National Authority responsible for directing, evaluating, and supervising AI (art. 4).
Regulation (Supreme Decree No. 115-2025-PCM): Implementation
Outlines governance and obligations, with direct support from RAG:
- • Guiding principles (art. 7): non-discrimination, privacy, human oversight, transparency, and accountability
- • Risk classification (arts. 22-24): Prohibited (misuse), high (with control) and acceptable.
- • Algorithmic transparency a (art. 25): disclose the purpose, label, and explain the impact on rights.
- • Government bonds (arts. 28-29, 36.ª disp. Comp.): AI policy, NTP-ISO/IEC 42001:2025 (SGIA), 27002, and 31000 standards; audits and selective use of open source .
- • Supervision (arts. 34-36): monitored by SGTD and alert channel.
In this context, approaches such as Retrieval Augmented Generation (RAG) help pave the way toward a more responsible use of artificial intelligence by ensuring that information comes from reliable sources and can be reviewed. This helps build greater trust and transparency and leads to better services for citizens.
We should also consider Ministerial Resolution No. 152-2026 PCM, dated April 29, 2026: “National Artificial Intelligence Strategy (ENIA) 2026–2030”; The strategy establishes a comprehensive monitoring and evaluation system, with goals and indicators defined through 2030, which ensures accountability, drives continuous improvement, and guides the creation of public value. Within this framework, the ENIA defines a clear roadmap for Peru to transition from a digital government to a smart government, in which artificial intelligence strengthens human capabilities, modernizes public management, and effectively contributes to the country’s economic and social development.
The National Artificial Intelligence Strategy (ENIA) 2026–2030 serves as the strategic framework guiding the governance, promotion, and oversight of artificial intelligence use in Peru, based on principles of ethics, security, inclusion, and a focus on public value. The strategy addresses persistent gaps in governance, capabilities, infrastructure, and trust, and aims to strengthen AI management in both the government and society. Its implementation is structured around four strategic pillars: talent development, innovation and entrepreneurship, an ethical and regulatory framework, and citizen participation and cooperation, promoting the adoption of international standards, risk management, and human oversight as the cornerstones of a more efficient, transparent, and people-centered government.

Conclusions
RAG-based cognitive agents represent a milestone toward trustworthy AI in Peru’s public sector. By grounding responses in institutional sources, they ensure transparency, traceability, and legal certainty in accordance with Law No. 31814 and its implementing regulations.
Adopting this modular architecture—which integrates advanced algorithms, data processing, and high-performance computing capabilities (algorithms, data, and hardware) is a significant step toward laying the groundwork for AI agents, enabling the creation of more agile, modern, and data-driven institutions. An organization that not only adapts to the future but also leads the region’s digital transformation through the ethical and strategic use of AI. By redefining service capabilities and boosting productivity, the government not only strengthens its operations but also inspires a new generation of professionals prepared for the challenges of the cognitive era.
Its implementation requires robust governance and continuous human oversight to ensure that automated decisions align with principles of equity, legality, and social justice. In this way, the Peruvian government is not only adapting to the future but also leading the way in the cognitive era, driving productivity and modern public service.
Artificial Intelligence (AI) is not the future; it is the present.