Skip to main content
AG·SORA
Technology

Prompt, RAG, or Fine-Tuning: Choosing How to Adapt AI to Your Business Needs

Published 10 min readWritten by agsora.tech
AG·SORA / BLOGAG·SORATechnologyPrompt, RAG, or Fine-Tuning:Choosing How to Adapt AI toYour Business Needsagsora.tech
In this article

When a business starts using large language models (LLMs) for customer service, document creation, or internal analysis, a question comes up quickly: how do we make the AI "understand" our business? A commonly heard answer is "just train the model on our data". In reality there are three main approaches that differ greatly in cost, speed, and risk: writing instructions (prompt engineering), connecting the model to company documents (retrieval-augmented generation, or RAG), and adapting the model itself (fine-tuning). Choosing the wrong one means wasted time and budget, or inaccurate results.

This article explains the three approaches in language that business owners and product managers can follow, when each is right, how to combine them, and the steps to decide in order. The key message: start with the simplest and cheapest, measure the results, and move up only when there is evidence of need.

Summary

  • Prompt engineering is the starting point: cheap, quick to change, and often enough for many needs
  • RAG fits when the AI must answer from company documents that change often and sources need to be cited
  • Fine-tuning fits for tuning a consistent style, format, or specific behavior, not for "injecting" changing knowledge
  • All three can be combined; a healthy order is prompt, then RAG, then fine-tuning if a gap remains
  • Whatever the choice, prepare a test set and metrics so decisions rest on evidence, not instinct
Rows of colored code on a dark screen with partly blurred focus
Choosing how to adapt AI should start from the business need, not from the technique in fashion

The three approaches in plain language

Imagine you hire a new assistant who is very bright and broadly informed but does not yet know your business. There are three ways to make them useful.

Prompt engineering: giving written instructions

You give clear instructions with each request: the role, tone, answer format, rules to follow, and examples of good answers. The model does not change at all; only the instructions get better. The analogy is handing the new assistant a one-page work guide every morning.

RAG: giving access to books and archives

The system searches for relevant pieces of documents (policies, catalogs, SOPs, FAQs) and inserts them into the request so the model answers based on those documents. The model can also name its sources. The analogy is letting the new assistant open the filing cabinet before answering a question. The full discussion is in knowledge-based AI chatbots using RAG.

Fine-tuning: retraining the model's habits

The model is trained further on hundreds to thousands of example pairs of input and ideal output, so its behavior shifts: writing style, answer structure, or how it decides. The analogy is an intensive training course until the assistant is used to working your way. Note that fine-tuning changes habits much better than it stores accurate, always up-to-date facts.

When prompt engineering is enough

Many teams jump to complicated techniques before trying the simplest one. A well-written prompt often solves 70 to 80 percent of needs without large investment.

A prompt is enough when:

  • The task is general and does not depend on internal data, such as summarizing, translating, or drafting emails
  • The rules and tone can be explained in a few paragraphs
  • Ideal example answers can be given directly in the request (few-shot)
  • The request volume is not large, so the cost of long instructions is not felt
  • You are still exploring what is actually needed

Good prompt practices

  • State the role and goal clearly
  • State the limits: what must not be answered and when to hand over to a human
  • Ask for a definite output format (a list, table, or data structure) so other systems can process it easily
  • Include 2 to 5 examples that represent real cases, including hard ones
  • Keep prompts in version control and test every change, because small changes can shift results
  • Separate fixed instructions from user data to reduce the risk of prompt injection, see [AI application security: prompt injection and data leakage](/blog/keamanan-aplikasi-ai-prompt-injection-dan-kebocoran-data)

When RAG is the answer

RAG is most suitable when your problem is knowledge: the AI must answer from company-specific facts that a general model does not have.

RAG fits when:

  • Answers must come from internal documents: policies, product catalogs, contracts, SOPs, knowledge bases
  • The documents change often (prices, rules, stock, procedures) and answers must always be current
  • You need to show sources so users can verify
  • Access must be restricted: employees may only get answers from documents they are entitled to see
  • You want to reduce made-up answers (hallucinations) by confining the model to the supplied context

RAG advantages over fine-tuning for knowledge

  • **Instant updates**: change the document and the answers change, with no retraining
  • **Traceable sources**: easy to audit
  • **Access control**: documents can be filtered per user
  • **Lower upfront cost**: no need to prepare thousands of training examples

Conditions for RAG success

RAG quality depends heavily on document quality and retrieval. Outdated, contradictory, or messy documents produce poor answers even with an advanced model. Prepare the data and document ownership first; guidance is in company data readiness before starting an AI project and data quality and data governance. Also tune how documents are chunked, indexed, and how retrieval is tested, not just the quality of the final answer.

When fine-tuning is worth considering

Fine-tuning is not a shortcut for putting business knowledge into a model. It is useful for narrower needs.

Fine-tuning fits when:

  • You need a very consistent style, tone, or format that is hard to describe in instructions, such as a specific brand voice or a fixed report structure
  • The task is specific and repeated at high volume, such as classifying tickets, extracting fields from documents, or converting text to a given format
  • Very long prompts make cost and speed no longer reasonable, and a smaller tuned model can replace a large model at lower cost
  • You have hundreds to thousands of high-quality examples already reviewed by experts
  • High accuracy on a narrow task is not reached with prompts and RAG

Things to watch in fine-tuning

  • **Knowledge goes stale**: trained facts do not change when a policy changes
  • **Need for quality data**: poor or biased examples are inherited by the model
  • **Cost and time**: data preparation, training, evaluation, and maintenance each time the base model changes
  • **Privacy risk**: sensitive data in training can reappear in outputs; anonymize and make sure the provider's policy fits
  • **Dependence**: a model tuned on one provider is hard to move, related to [vendor lock-in in cloud and business software](/blog/vendor-lock-in-di-cloud-dan-software-bisnis-strategi-keluar)

A quick comparison

Here are the practical differences among the three, for initial consideration.

  • **Time to start**: prompts take days, RAG takes weeks, fine-tuning takes weeks to months
  • **Upfront cost**: prompts lowest, RAG medium (search infrastructure and document processing), fine-tuning highest (data, training, evaluation)
  • **Ease of updating**: prompts and RAG are easy, fine-tuning needs retraining
  • **Accuracy on business facts**: RAG is best if the documents are good, prompts are limited, fine-tuning is not relied on for facts
  • **Consistency of style and format**: fine-tuning is strongest, prompts are good if the examples are clear, RAG does not focus here
  • **Source transparency**: RAG excels, the others are weak

Combining approaches

In practice a good system often uses a combination.

  • **Prompt and RAG**: the most common combination for internal assistants and customer service chatbots. The prompt sets the role, tone, and limits; RAG supplies the facts
  • **RAG and a tuned model**: a small model tuned for fixed style or format, with RAG for facts
  • **Agents with tools**: the model calls business systems (stock, orders, prices) through APIs for real-time data; see [AI agents for business process automation](/blog/ai-agent-untuk-otomatisasi-proses-bisnis) and [Model Context Protocol (MCP)](/blog/model-context-protocol-mcp-menghubungkan-ai-dengan-sistem-bisnis)

For highly dynamic data such as today's stock and prices, do not rely on static documents or a trained model; fetch directly from the source system when the request occurs.

A simple decision tree

Answer the following questions in order.

1. Is the problem knowledge or behavior?

If the AI is wrong because it does not know company facts, that is a knowledge problem; go to RAG or data integration. If the AI knows but its style, format, or way of deciding is off, that is a behavior problem; start with prompts, then consider fine-tuning.

2. How often does the information change?

Changing often means RAG or direct data access. Rarely changing and more a matter of decision patterns opens the option of fine-tuning.

3. Have the best prompts been tried and measured?

If not, do not move on. Improve the prompt, add examples, and measure with a test set. Many projects turn out to end here.

4. Is there quality training data?

Fine-tuning without hundreds of clean, expert-reviewed examples is usually wasted. If you do not have them yet, collect them first through the running system (prompt and RAG) with user feedback.

5. Are cost per request and speed already a problem?

If high volume and long prompts push cost up, a small tuned model can be cheaper. See controlling AI costs: tokens and inference.

Measure before deciding

Whatever the approach, decisions should rest on measurement.

  • Collect 50 to 200 real questions or tasks with expected answers
  • Score each approach's results consistently: accuracy, completeness, safety, tone, and speed
  • Involve domain experts to judge a sample of answers
  • Repeat the testing whenever the prompt, documents, or model change
  • Monitor after launch with user feedback and random samples

The full framework is discussed in evaluating AI output quality (LLM evals). Without a test set, teams tend to judge by a few impressive examples and are then surprised by failures in the field.

Model considerations: cloud API or self-managed

The choice of approach is also tied to where the model runs. Tuning and running your own model gives control over data but demands infrastructure and expertise. Using a provider's API is faster to start, with privacy and dependence considerations. The full discussion is in self-hosted LLM or cloud API. Sensitive data should follow your AI usage policy and AI governance in the company.

Example scenarios

An online store customer service chatbot

Need: answer questions about return policy, shipping, and products. Approach: a prompt for tone and limits, RAG over the policy pages and catalog, API integration for order status. Fine-tuning is not needed in the early stage.

Support ticket classification

Need: group thousands of tickets a day into categories and priorities. Approach: start with a prompt with examples; if volume is high and accuracy needs to rise, a small model tuned on labeled tickets. Related to customer support ticket systems and SLAs.

Drafting proposals in the company style

Need: drafts with a consistent structure and tone. Approach: a prompt with a template and examples, RAG for the portfolio and standard prices. Fine-tuning is considered if hundreds of the best proposals are available and the style is hard to describe.

Common mistakes

  • Treating fine-tuning as the best way to instill company facts
  • Jumping to fine-tuning without measuring what prompts and RAG can do
  • Using outdated or messy documents in RAG, then blaming the model
  • Not building a test set, so there is no way to compare options
  • Training on sensitive data without anonymization and policy review
  • Forgetting maintenance: documents, prompts, and base models change over time

Frequently asked questions

Does fine-tuning make the AI smarter about my business?

Not automatically. It mainly changes style and behavior. For accurate, up-to-date business facts, RAG or direct data access is usually more suitable.

How much data is needed for fine-tuning?

It depends on the task, but generally hundreds to thousands of high-quality examples. Quality and diversity matter more than sheer quantity.

Can RAG and fine-tuning be used together?

Yes, and it often produces a strong system: a model tuned for fixed style or format, with RAG for current facts.

Which is safest for sensitive data?

None is automatically safe. What decides it is where the data is processed, access control, provider policy, and anonymization. RAG with per-user access control helps ensure people only see documents they are entitled to.

Conclusion

Choosing among prompts, RAG, and fine-tuning is a matter of matching the problem to the right tool. Start with a good prompt, add RAG for changing company knowledge, and consider fine-tuning only for specific behavior or formats that nothing else achieves. Measure with a test set at every stage, and your decisions will be evidence-based, cost-effective, and easy to maintain.

Design the right AI solution for your business

Agsora helps determine the suitable AI approach, from prompts and RAG to integration with business systems, complete with quality testing and cost control. Tell us your needs to get an initial recommendation.

Free Consultation

Free checklist: choosing a software house

24 points to evaluate a vendor before you sign. Can be saved as a PDF.

Get the checklist

Ready to build a system that grows with your business?

Discuss your needs with the AG·SORA team, no cost, no commitment.