What makes an AI application?

LLMs are engines, not products. Applications wrap them with retrieval, tools, guardrails, system prompts, and agentic loops to create useful, safe products.

Why does the same LLM feel so different in different products?

Claude powers both a friendly chatbot and a code editor. GPT-4 runs everything from customer service bots to research assistants. The base model is the same, but the experiences feel different.

The difference is the application layer: everything wrapped around the raw LLM to make it suitable for a specific task. LLMs are engines; applications are vehicles.

The layers of an AI application

A raw LLM API gives you completion: send text, get text back. To build a product, you add layers:

Each layer shapes behavior. The combination defines the application.

System prompts: defining persona and behavior

The system prompt is invisible instructions given to the model before your message. It shapes personality, establishes rules, and provides context.

System prompt for a customer service bot:

You are a helpful customer service agent for TechCorp.
Be friendly, concise, and solution-oriented.
Never discuss competitor products.
If you can't help, offer to escalate to a human agent.
Always greet the customer by name if known.

The user never sees this. But it fundamentally changes how the model responds. Same LLM, completely different behavior.

Guardrails: hard rules on input and output

System prompts suggest behavior. Guardrails enforce it with code, not just instructions.

Input guardrails filter user messages before they reach the model: blocking prohibited content, detecting prompt injection, filtering sensitive data. Output guardrails check responses before they reach users: removing harmful content, ensuring format compliance, validating claims.

Guardrails provide the safety margin that soft prompts can't guarantee. They're how you turn "usually safe" into "reliably safe."

โ†’ Guardrails in depth

Retrieval-Augmented Generation (RAG): grounding in real information

LLMs have vast knowledge from training, but that knowledge is frozen at the cutoff date, may be incomplete, and can't cover your private data. What if you need answers about your documents, your database, your codebase?

RAG solves this. Before generating a response, the system retrieves relevant information and includes it in the prompt. The model reasons over retrieved content, not just training memory.

The model doesn't need to "know" the answer from training. It reads the answer from retrieved text and synthesizes a response. Suddenly the LLM can answer questions about things it never saw in training.

Why RAG instead of fine-tuning?

You could train the model on your data. But:

  • Fine-tuning is expensive: Compute, data prep, training runs
  • Knowledge becomes stale: Retrain when data changes
  • No transparency: Can't see what the model "knows"

RAG offers:

  • Dynamic updates: Change documents, answers update immediately
  • Transparency: See exactly what was retrieved
  • Scale: Millions of documents without retraining

RAG reduces hallucination by grounding responses in actual documents. Instead of inventing plausible-sounding details, the model synthesizes from retrieved evidence.

Tools: taking actions beyond text

Tools let the model do things:

  • Search: Web search, database queries, API calls
  • Calculate: Math, code execution, data analysis
  • Act: Send emails, create tickets, update records
  • Create: Generate images, produce documents, write code

An application defines which tools are available. A coding assistant has different tools than a customer service bot, which has different tools than a research assistant.

The tool selection shapes what the application can do. An LLM without tools can only talk. An LLM with tools can work.

Agentic loops: multi-step reasoning

Simple applications are one-shot: user asks, model answers. Agents are iterative: the model plans, uses tools, observes results, and repeats until the task is complete.

This is what enables AI to book flights, research topics across multiple sources, or refactor code across many files. These are tasks requiring multiple steps and adaptive decision-making.

โ†’ How agents work

The composition of modern AI products

A sophisticated AI application might combine:

  • System prompts establishing persona and base behavior
  • RAG providing knowledge from company docs
  • Input guardrails blocking inappropriate requests
  • Tool access enabling search, calculation, and actions
  • Agentic loops for multi-step task completion
  • Output guardrails ensuring safe, on-brand responses
  • Memory tracking conversation history and user preferences
  • Fallbacks escalating to humans when confidence is low

Each component is a design decision. The combination defines the product.

Why this matters

When evaluating AI products, look beyond "which model does it use":

  • What knowledge does it have access to?
  • What tools can it use?
  • What guardrails protect users?
  • How is it prompted to behave?
  • What happens when it fails?

The application layer often matters more than the base model. A well-wrapped smaller model can outperform a poorly-wrapped larger one for specific tasks.

Sources & Further Reading

๐Ÿ“„ Paper
๐Ÿ“– Docs
๐Ÿ”— Article
AI Agents
Anthropic
๐Ÿ“– Docs