AZMX AI

Guide · 2026-05-27 · 7 min read

Stop Trusting AI. Force it to Cite.

Moving from probabilistic guesses to verifiable citations in your codebase and technical documentation.

LLMs are designed to predict the next token, not to retrieve facts. When an AI fails to cite sources, it is guessing based on weights, not referencing your actual documentation. For technical teams, this gap leads to hallucinated API parameters and deprecated library calls. To solve this, you must move the source of truth from the model's weights to your local filesystem and external tools.

The Problem with Implicit Knowledge

Most developers treat LLMs as a search engine. When you ask an AI how to implement a specific feature in a proprietary framework, the model relies on its training data. If that data is six months old, the AI will confidently suggest a method that no longer exists. This is where the need for an AI to cite sources becomes a requirement rather than a feature.

Without explicit citations, you are forced to manually verify every line of code. This creates a cognitive load that often outweighs the speed gains of using AI. The goal is to shift the AI from generative mode to retrieval-augmented mode.

Three Patterns for Verifiable AI Outputs

1. Retrieval Augmented Generation (RAG)

RAG is the industry standard for grounding AI. It works by searching a vector database for relevant snippets of your documentation and injecting them into the prompt context. While tools like GitHub Copilot and Sourcegraph Cody use RAG extensively, the transparency of the citations varies. If the AI doesn't tell you which file it read to generate an answer, the RAG process is a black box.

2. Model Context Protocol (MCP)

The Model Context Protocol (MCP) allows AI agents to query external data sources via a standardized interface. Instead of relying on a pre-indexed vector store, MCP allows an agent to perform a real-time grep or an API call to a documentation server. When an agent uses MCP to fetch a file, the citation is implicit in the tool call: the agent literally reads docs/api/v2/auth.md before answering.

3. Local Project Memory

For complex projects, a centralized memory file—such as an AZMX.md file—acts as a manual index of truth. By maintaining a high-density markdown file that maps architectural decisions and critical paths, you provide the AI with a single source of truth to cite. This eliminates the need for the AI to scan thousands of files and reduces the likelihood of it picking up outdated patterns from old branches.

Comparing Tooling for Source Verification

Different tools handle source grounding with varying levels of transparency. Cursor and Windsurf provide deep integration with the codebase, often showing which files were indexed. Aider and Cline operate via the terminal, giving you a direct view of the files being edited, which serves as a functional citation.

AZMX AI takes a different approach by focusing on a native, low-overhead footprint (~7 MB) and strict approval gates. Because AZMX AI supports MCP over stdio and HTTP, you can connect it to any custom data source. When the agent proposes a change, the approval gate forces you to review the diff against the actual file content, ensuring that the source of the change is verified before execution. You can find more on this in our documentation.

Implementing a Citation Workflow

To ensure your AI consistently cites sources, implement the following constraints in your system prompts or project memory:

  • Require File Paths: Explicitly instruct the model to prefix every technical claim with the file path it originated from (e.g., [src/auth.ts] The token is validated via JWT).
  • Ban Generalizations: Instruct the AI to state I cannot find this in the provided context rather than guessing.
  • Use a Deny-list: Ensure the AI isn't citing sensitive files. AZMX AI handles this by default with a deny-list for .env and .ssh directories, preventing the AI from accidentally citing credentials as configuration patterns.
# Example System Prompt for Citations
"You are a technical assistant. Every time you reference a function, variable, or architectural decision, you must cite the specific file and line number. If the information is not present in the current project context, state that you are relying on general training data."

The Trade-off: Latency vs. Accuracy

Forcing an AI to cite sources increases the token count and can slightly increase latency. The model must spend more compute cycles mapping its output back to the provided context. However, in a production environment, the cost of a 2-second delay is negligible compared to the cost of a production outage caused by a hallucinated configuration flag.

For those who prioritize privacy and zero telemetry, running these workflows locally via Ollama or LM Studio is the most secure path. By using a BYOK (Bring Your Own Key) model, you control exactly where your data goes and how it is indexed. This is a core tenet of the AZMX security model: no accounts, no telemetry, and no vendor lock-in.

Conclusion

AI that doesn't cite sources is a liability in a professional codebase. Whether you use RAG, MCP, or a dedicated project memory file, the objective is the same: move the source of truth from the model's weights to your own verified files. By enforcing strict citation requirements and using tools that provide transparency into the AI's retrieval process, you can actually trust the code being generated.

One window. The whole loop.