Your intelligent assistant for navigating Mexico's official legal documents
DOF Chat is a web application that enables natural language querying of the Diario Oficial de la Federación (DOF), Mexico's official government publication. By leveraging AI, it transforms complex legal documents into accessible, conversational information for citizens, legal professionals, and researchers.
The Diario Oficial de la Federación (DOF) is the official publication organ of the Mexican federal government, managed by the Secretaría de Gobernación. It publishes laws, regulations, decrees, agreements, circulars, orders, treaties, and other acts issued by federal authorities.
Navigating thousands of legal documents published in the DOF is time-consuming and requires expertise in legal terminology. Citizens and professionals alike need quick, accurate answers to legal questions without reading through dense documentation.
DOF Chat provides an AI-powered conversational interface that understands natural language questions in Spanish, retrieves relevant information from DOF documents, and delivers clear, contextual answers.
- Citizens seeking to understand laws and regulations that affect them
- Legal professionals researching case precedents and regulatory changes
- Journalists and researchers investigating government policies and legal frameworks
- Government employees needing quick reference to official publications
| Document Type | Spanish Name | Description |
|---|---|---|
| Laws | Leyes | Legislative acts passed by Congress |
| Regulations | Reglamentos | Administrative rules implementing laws |
| Decrees | Decretos | Executive orders and presidential decisions |
| Agreements | Acuerdos | Inter-agency or international agreements |
| Circulars | Circulares | Administrative directives |
| Orders | Órdenes | Official commands and instructions |
| Treaties | Tratados | International agreements and conventions |
- Clone the repository:
git clone https://github.com/CodeandoGuadalajara/dof-chat.git
cd dof-chat- Create and activate the virtual environment:
uv sync --frozen- Run the application:
uv run fastapi devOnce the application is running, navigate to http://localhost:8000 in your web browser.
Example queries:
- "¿Cuáles son los requisitos para abrir una empresa en México?"
- "Reformas fiscales de 2024"
| Technology | Purpose | Description |
|---|---|---|
| Python | Core Language | High-level programming language |
| FastAPI | Web Framework | Modern, fast web framework for building APIs |
| Air | Development Framework | Modern Python web framework built with FastAPI, Starlette, and Pydantic |
| AI/ML | Natural Language Processing | Vector embeddings and LLM integration for intelligent query handling |
We're actively developing DOF Chat. Here's what's planned:
- Natural Language Q&A - Ask questions in plain Spanish
- Comprehensive Coverage - Access to laws, regulations, decrees, agreements, and more
- Smart Search - AI-powered semantic search finds relevant documents even with imprecise queries
- Web-Based Interface - Access from any device with a browser
Note: This is a new project and we're actively discussing the architecture through GitHub Issues. Your input is welcome!
We welcome contributions from the community! DOF Chat is an open-source project built to serve the public good.
To contribute, please read our Contributing Guidelines for detailed instructions on:
- Setting up your development environment
- Creating feature branches
- Submitting pull requests
- Code style and commit conventions
For questions or discussions about the project architecture, check out our GitHub Issues.
This project is licensed under the GNU Affero General Public License v3.0.
See the LICENSE file for the full license text, or visit https://www.gnu.org/licenses/agpl-3.0.html
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option) any
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
details.
You should have received a copy of the GNU Affero General Public License along
with this program. If not, see https://www.gnu.org/licenses/
- Project Repository: https://github.com/CodeandoGuadalajara/dof-chat
- Issue Tracker: https://github.com/CodeandoGuadalajara/dof-chat/issues
- The Secretaría de Gobernación for maintaining the DOF public archives
- The open-source community for the amazing tools that make this project possible
- Codeando Guadalajara for hosting and supporting this civic tech initiative
DOF Chat is an independent project and is not officially affiliated with or endorsed by the Mexican federal government or the Secretaría de Gobernación. The information provided by this application is for informational purposes only and should not be considered legal advice. Always refer to the official DOF publications for authoritative legal information.