Most AI engineering teams aren't actually designing their systems; they are accidentally accumulating them.
When a support bot gives a wrong answer, the instinct is to escalate: tweak the prompt, add more docs to the retrieval system, or—if all else fails—fine-tune the model. This "ladder of escalation" is a trap that leads to broken architectures and hallucinating models.
The Simple Version
Imagine you are training a new chef in a restaurant. You don't give them a 500-page manual to memorize every single time a customer orders a steak; that would be too slow and they'd forget the details.
Instead, you give them a Recipe Card (the Prompt) that tells them how to behave—to be professional and fast. You provide a Pantry (the Memory) where they can grab fresh ingredients like seasonal vegetables or current stock. Finally, you train their Muscle Memory (the Weights) so they can chop onions perfectly without thinking about it.
If the chef forgets what a seasonal vegetable is, you don't retrain their entire brain; you just update the pantry. If they are being rude to customers, you update the recipe card. This distinction is what separates a scalable AI system from a messy, accidental one.
How It Actually Works
Anant Srivastava, a principal technologist at Oracle, argues that most enterprise AI architectures are "accumulated, not designed." This happens when teams make small, uncoordinated changes that eventually conflict with one another.
The Three Pillars of AI Knowledge
To build a proper system, you must apply a specific diagnostic question to every piece of information you want the model to handle.
1. The Prompt: Small, Stable, and Behavioral
The job of the prompt is to define the persona, tone, and instructions. It is for things that are small and don't change every hour.
A common mistake is stuffing a product catalog into a prompt. Not only is this expensive in terms of token costs, but it also triggers the "lost in the middle" problem, where models struggle to find information buried in long contexts.
2. Memory: Current, Large, and Citable
Memory (which includes RAG—Retrieval-Augmented Generation) is for knowledge that is too large for a prompt or changes too fast to fine-tune. It must be citable, meaning the system can point to exactly where the fact came from.
For example, a code assistant shouldn't be fine-tuned on a company's entire codebase because code changes constantly. Instead, the codebase should live in memory, retrieved via specialized "code-aware chunking" and metadata filtering.
3. Weights: Stable Reflexes
Fine-tuning should be reserved for reflexes, not facts. A reflex is a pattern of reasoning or a specific way of formatting data that has become stable over time.
As Srivastava points out, "You'd fine-tune your model to learn reflexes, not facts typically." If you fine-tune a model on a pricing list, you are creating a disaster for when those prices inevitably change.
Technical Deep Dive
The core architectural failure Srivastava identifies is the "leaking" of knowledge between these layers. He describes a scenario where a team fine-tunes a model on support tickets from six months ago. Because those tickets contained old product names, that outdated information is now "baked into the weights," causing the model to hallucinate non-existent products even when the correct catalog is provided in the prompt.
The Circulating Architecture
Instead of a one-way ladder, a sophisticated AI system uses a circulating architecture. This creates a feedback loop between the three layers:
- Prompt $\rightarrow$ Memory: As the agent interacts, it generates signals that can be turned into durable, long-term memory.
- Memory $\rightarrow$ Weights: Once a pattern in the memory becomes highly consistent (e.g., a specific way users ask for refunds), you can move that pattern into the weights via fine-tuning to reduce retrieval costs.
- Weights $\rightarrow$ Memory: Once a model has a "reflex" for a certain format, you no longer need to provide as many examples in the RAG context, making your memory retrieval more efficient.
This loop allows the agent to get better at its job simply by doing its job, moving from high-cost reasoning in the prompt to low-cost, high-speed reflexes in the weights.
Why This Matters
For developers and architects, this shift in thinking changes the definition of "success." Success isn't just getting the model to answer a question; it's about designing a system where knowledge is easy to update without breaking the model's core behavior.
If you are facing retrieval issues, the answer is rarely "more fine-tuning." It is almost always "better retrieval." By separating behavior (Prompt), knowledge (Memory), and reflexes (Weights), you build a system that is modular, cost-effective, and—most importantly—maintainable.