
Implementing large language models well means treating them as probabilistic components inside deterministic systems: ground answers in your own data with retrieval-augmented generation (RAG), validate every output, route work to the cheapest model that can do it, evaluate continuously and keep data in Australian infrastructure where obligations require it. A person approves high-stakes actions.
Key takeaways
- LLM outputs vary. Wrap them in schema validation, scoped tasks and human approval for consequential actions.
- Most enterprise use cases need RAG over your own content, not model training.
- The model call is the smallest part of the stack. Orchestration, retrieval, evaluation and observability carry the work.
- Route simple tasks to small models and reserve frontier models for reasoning.
- Decide hosting early: Australian regions on major clouds, or open-weight models on your own servers, depending on data sensitivity.
The core shift: deterministic to probabilistic engineering
The hardest adjustment for engineering teams is moving from deterministic to probabilistic systems.
With SQL and REST APIs: input A + logic B = output C, every time.
With LLMs: input A + model B + settings T = output C (probably).
You cannot assert that a model returns exactly "Hello World". It might return "Hi there". So do not force determinism into the model; build it around the model.
- Validate outputs. Use schema libraries such as Zod or Pydantic to require valid structured output. Retry or escalate on failure.
- Limit scope. Give the model a narrow task ("extract the invoice number and total") instead of an open brief.
- Human approval. For consequential actions, such as refunds, payments or customer communications, the model proposes and a person approves.
What an LLM actually is
An LLM predicts the next token (roughly three-quarters of a word) from all the tokens before it, using patterns learned from training data.
# Simplified conceptual model
context = "The capital of Australia is"
probabilities = {
"Canberra": 0.85, # highest probability
"Sydney": 0.10, # common misconception
"Melbourne": 0.05
}
That explains both the strength (fluent language and broad knowledge) and the weakness (confident errors when the right answer is not well represented or not in context).
The LLM application stack
| Layer | Examples | Function |
|---|---|---|
| Orchestration | LangGraph, LlamaIndex, custom code | Manages flow between user, tools, data and model |
| Context store | pgvector, OpenSearch, Azure AI Search | Stores embeddings of your content for retrieval |
| Model layer | GPT, Claude, Gemini families; open-weight Llama, Mistral, Qwen | Generates and reasons |
| Tools | APIs into ERP, CRM, ticketing, document systems | Lets the model read and act, with permissions |
| Evaluation and observability | LangSmith, Langfuse, Arize, custom test sets | Traces why the system answered as it did and measures quality |
The RAG pattern: retrieval-augmented generation
Most enterprise use cases do not need a trained model. They need the model to answer from your content.
- IngestPull documents, wiki pages and records with their permissions
- EmbedConvert chunks to vectors that represent meaning
- RetrieveFind the most relevant chunks for each question
- GenerateAnswer using only retrieved context, with citations
Production RAG problems are usually retrieval problems: poor chunking, stale content, missing permissions or the right document not being found. Fix retrieval before blaming the model. Respect source permissions so users cannot retrieve what they could not open directly; our Copilot readiness and permissions audit guide covers the same risk in Microsoft 365.
Evaluation: how you know it works
Because you cannot unit test exact strings, build an evaluation set:
- 50 to 200 real questions or documents with expected answers or fields.
- Automated checks for structure, citations and forbidden content.
- Model-graded or human-graded scoring for answer quality.
- Run the set on every prompt, model or retrieval change.
Track accuracy by task type, refusal rate, latency and cost per task. Keep running the system alongside your team until results are stable.
Cost: model routing
LLMs are priced per input and output token, and prices change often, so check current provider pricing. The durable rule: use the smallest model that does the job reliably.
Example: customer support agent
- Router (small model): classifies "Where is my order?" as
intent: order_statusat very low cost. - Reasoning (frontier model): handles a complex terms-and-conditions question only when needed.
Routing, caching repeated context and batching non-urgent work can reduce blended cost substantially.
Data sovereignty for Australian organisations
The Privacy Act 1988 and APP 8 make you accountable for personal information sent offshore. For health, financial and other sensitive data:
- Major clouds: Azure OpenAI in Australian regions, Amazon Bedrock in Sydney (including Anthropic Claude models) and Google Vertex AI in Sydney and Melbourne. Check which models are available regionally and read per-service data handling documentation. See our AWS vs Azure vs Google Cloud guide.
- Your own servers: open-weight models run entirely inside your environment. See our offline and local LLM guide.
- Vector stores and logs must sit in the same jurisdiction as the model, or residency is only partial.
Build, buy or open-weight?
| Proprietary API | Open-weight, self-hosted | Impact | |
|---|---|---|---|
| Capability | Strongest frontier reasoning | Strong and improving, varies by task | Test on your tasks |
| Data location | Provider cloud, Australian regions available | Entirely inside your environment | Sovereignty |
| Operations | Provider runs the infrastructure | You run GPUs, updates and scaling | Effort |
| Cost model | Per token, scales with usage | Hardware or GPU rental, fixed | Volume dependent |
| Best fit | Complex reasoning, fast start | High volume, narrow tasks, classified or sensitive data | Use case |
What is your dominant constraint?
- Fast start, moderate data sensitivityProprietary model in an Australian cloud region
- Highly sensitive or classified dataOpen-weight model on your own infrastructure
- Very high volume of simple tasksSmall open-weight or small hosted model with routing
- Mixed workloadsRouter across hosted and self-hosted models
Agents: when the model takes actions
Agents let models call tools: query a database, create a ticket, draft an email. The same rules apply with more force: least-privilege credentials, an allow-list of actions, logs of every call and human approval before anything reaches a customer or system of record. See AI agent governance and multi-agent systems.
Start small, architect for scale
The common failure is the proof-of-concept trap: a notebook demo that works most of the time and fails in production on latency, cost or wrong answers.
- Pick one high-value, low-risk use case, such as internal knowledge search or document extraction.
- Decide hosting and data boundaries first.
- Build the evaluation set before the feature.
- Measure business outcomes: time saved, errors avoided, cycle time.
How Solve8 can help
Our engineers design and build LLM applications inside your environment: retrieval over your content, evaluation sets, model routing and approval steps, on your cloud in Australia or your own servers. See our private AI infrastructure and custom AI development services, or talk to our team.
