EVERYTHING YOU NEED TO KNOW ABOUT AI AGENTS: PROMPT ENGINEERING, RAG, AND FINETUNING (PART 2)

What Is Prompt Engineering, RAG, and Fine-Tuning? (AI Agents Part 2)

AI Agents for Business · Part 2

In Part 1, we covered what an AI Agent actually is. Part 2 answers the next question: what is prompt engineering, what is RAG, and why does fine-tuning decide whether an AI Agent can actually be trusted with real business work — or is just a demo that “talks.”

10
major LLMs (the “Roots”) currently dominate the entire AI Agent industry
OplaCRM Insights, 2026
<30
specialized model branches (text, image, video, audio)
OplaCRM Insights, 2026
3
core techniques: Prompt Engineering, RAG, Fine-tuning
Part 2 analysis
100K+
AI Agents (“Leaves”) running on the same underlying Roots & Branches
OplaCRM Insights, 2026

Plenty of people use ChatGPT, Gemini, or a sales AI Agent every day without ever asking: why does the AI sometimes nail exactly what you meant, sometimes stay frustratingly generic, and sometimes confidently invent facts about your own orders or company policy? The answer comes down to three foundational techniques that every mature AI Agent relies on at least one of: Prompt Engineering, RAG, and Fine-tuning. Understanding what prompt engineering is and what RAG is will help you judge whether an AI Agent is genuinely usable for a business — or just running an impressive demo on stage.

Key takeaways

  • Prompt engineering is the technique of designing instructions so the AI understands intent correctly — the cheapest and fastest to apply, and the first thing to get right.
  • RAG (Retrieval-Augmented Generation) lets an AI Agent pull in a company’s real data — orders, policies, chat history — before answering, instead of “guessing” from pre-trained knowledge.
  • Fine-tuning retrains a model’s weights when the AI needs to speak in a specific tone, use specialized terminology, or stay current with very recent information.
  • In practice, RAG is the most widely used technique today because it balances cost, deployment speed, and accuracy so well.

1.Recap: How Does an AI Agent “Talk” to an LLM?

In Part 1, we compared the AI industry to a giant tree. The Roots are the LLMs (Large Language Models) like GPT, Gemini, Claude, Llama, and DeepSeek — where the core process of collecting and training data happens. In reality, only around 10 major LLMs dominate the entire space. The trunk and Branches split by domain — language, image, video, audio — with fewer than 30 significant branches. The Leaves are the AI applications, and AI Agents make up the largest share — hundreds of thousands of them, growing every day, even though most rely on the same limited set of Roots and Branches behind a flashy marketing layer.

Each leaf — each AI Agent — talks to the roots in its own way, but mainly through three techniques: Prompt Engineering, RAG, and Fine-tuning. The next three sections break down each one with concrete examples.

How to apply it: When evaluating an AI Agent (a support chatbot, a sales assistant…), ask the vendor which technique it uses to retrieve information. The answer directly determines that AI Agent’s accuracy, running cost, and how well it will scale.

2.What Is Prompt Engineering?

Every time you ask ChatGPT or Gemini a question, you’re really feeding it a prompt — and the craft of writing effective prompts is called prompt engineering. Not everyone knows how to write a prompt good enough to get the result they actually want; in fact, some AI Agents exist solely to optimize prompts for other users, and still make money doing it.

For example, instead of a plain prompt like “Write an article about the differences between B2B and B2C CRM,” a refined prompt could be: “Act as Nam Nguyen, author of the book ‘Winning Over CRM,’ and write an article…”, or “Imagine your readers are fresh graduates who’ve never heard of CRM, then write an article…”. At a more advanced level, a prompt can even set up multiple branching scenarios with specific conditions to produce more relevant, more token-efficient answers.

How to apply it: When building an AI Agent for your business, don’t just write one generic instruction. Clearly define the role (who the AI is playing), the audience, and the scope of the answer — the cheapest step, but the one that improves answer quality the most before you even consider more complex techniques.

3.What Is RAG?

Prompt engineering alone can’t manually map prompts to every specific context, because real-world requests are too varied. It works well for general topics, but for specific queries — a customer complaint, looking up order details, or accessing proprietary business data — an AI Agent needs to pull in outside information. This technique is called RAG (Retrieval-Augmented Generation). External data sources can include:

  • Previous chat history with a customer
  • A company’s private database (e.g. customer data, orders inside a CRM)
  • Structured or unstructured data from various formats

Implementing RAG well is its own art — balancing response speed, data security, and token cost.

How to apply it: A sales AI Agent that relies on prompt engineering alone won’t know what state customer A’s order #1234 is in — because that information was never part of the model’s original training data. With RAG, the AI Agent retrieves that data directly from the CRM before answering, so the response is accurate instead of guessed or invented.

4.What Is Fine-Tuning?

Fine-tuning is the process of retraining an AI Agent by adjusting the model’s weights using data that’s more precise or more current than the LLM’s original training data. Here’s a step-by-step comparison:

  • Regular prompt: “Write a poem about CRM.”
  • Refined prompt (prompt engineering): “Write a poem about CRM in Nam Nguyen’s writing style.”
  • Prompt with RAG: “Write a poem about CRM in Nam Nguyen’s writing style from line 2, page 129 of ‘Winning Over CRM.'” (this requires loading the entire book as an external data source)
  • Fine-tuning: if the poem the AI produces still sounds outdated or generic, you retrain the AI on all of Nam Nguyen’s 2024 CRM-related Facebook posts so it picks up the latest industry concepts.

In essence:

  • RAG ensures factual accuracy (facts).
  • Fine-tuning improves style and relevance (form).
  • If a prompt lacks context — use RAG.
  • If an answer is factually correct but lacks the right nuance — use fine-tuning.
How to apply it: Fine-tuning costs money and needs a large enough volume of quality data, so most small and mid-sized businesses don’t need this step right away — get prompt engineering and RAG right first, then consider fine-tuning only once you have a very specific need around tone or domain expertise.

5.When Should You Use Prompt Engineering, RAG, or Fine-Tuning?

“RAG ensures factual accuracy (facts). Fine-tuning improves style and relevance (form). If a prompt lacks context, use RAG. If an answer is correct but lacks the right nuance, use fine-tuning.”— A framework for choosing AI Agent techniques, OplaCRM 2026

The current AI landscape shows that an AI Agent can use prompt engineering, RAG, fine-tuning, or a combination of RAG and fine-tuning (known as RAFT). At present, however, RAG remains the most widely used technique — because most real business needs call for AI that answers correctly from constantly changing internal data, more than AI that writes in someone’s exact voice.

How to apply it: Start with prompt engineering (cheap, fast) → add RAG once you need the AI to answer using your company’s real data → only consider fine-tuning once both steps above still fall short and you have training data of sufficient quality.

Applying This in Practice

Most businesses that are new to AI Agents tend to stop at prompt engineering — using one general-purpose chatbot to answer product questions, draft emails, or summarize calls. But the moment a customer asks about a specific order, their interaction history, or pricing tied to their customer segment, plain prompt engineering runs out of steam, because the AI has no access to that data.

That’s exactly when RAG becomes necessary — and when a structured customer data system, like a CRM, becomes the ideal external data source for an AI Agent to query. An AI Agent connected to a CRM can accurately answer “what did customer B buy, when, and where are they in the pipeline” — instead of giving a generic answer or making something up. Fine-tuning, by contrast, usually only becomes worthwhile once a business has accumulated enough of its own data (brand voice, industry terminology) to make retraining worth the cost.

Final Thoughts

Prompt engineering, RAG, and fine-tuning aren’t three competing choices — they’re three complementary layers of capability on the path from an AI Agent that “can talk” to one that’s actually usable inside a business. Understanding what prompt engineering is helps you give the right instructions; understanding what RAG is lets you demand that an AI Agent answer using your company’s real data; and understanding fine-tuning tells you when it’s worth investing further. In Part 3 of this series, we’ll look at how AI Agents are actually deployed inside a B2B sales process.

Get your data ready for your business’s AI Agent

An AI Agent only answers accurately when customer data is clean and structured enough to be retrieved through RAG. OplaCRM helps B2B sales teams centralize customer data, orders, and interaction history — the foundation an AI Agent needs.

Book a demo now →

Frequently Asked Questions

Oppy - OplaCRM mascotWhat is prompt engineering?+

Prompt engineering is the craft of designing a prompt so the AI understands the real intent and returns a result that closely matches the need, without changing the underlying model. For example, instead of asking generically “write an article about CRM,” a refined prompt spells out the role, the audience, and the desired format.

Oppy - OplaCRM mascotWhat is RAG?+

RAG (Retrieval-Augmented Generation) is a technique that lets an AI Agent pull in outside data — such as chat history, a company’s private database, or internal documents — before generating an answer, instead of relying only on knowledge baked into the model. RAG keeps answers accurate and current against real data.

Oppy - OplaCRM mascotHow is fine-tuning different from RAG?+

RAG injects outside data into each individual answer (ensuring factual accuracy), while fine-tuning retrains the model’s weights to change its style, terminology, or reasoning long-term (improving form). If a prompt lacks context, use RAG; if the answer is factually correct but lacks the right nuance, use fine-tuning.

Oppy - OplaCRM mascotShould a small business start with prompt engineering, RAG, or fine-tuning?+

Start with prompt engineering — it’s the cheapest and fastest to deploy. Move to RAG once you need the AI to answer using your company’s own data (orders, policies, customer history). Fine-tuning is only worth considering once you have a large enough dataset and a very specific need around tone or domain expertise.

Oppy - OplaCRM mascotWhich technique is most commonly used in AI Agents today?+

Based on current analysis of AI Agents in production, RAG is the most widely used technique, because it strikes the best balance between cost, deployment speed, and accuracy — especially for businesses that need AI to answer using internal data that keeps changing.

Filed under AI for Business · OplaCRM — The proactive CRM for B2B sales teams.