Menu di accessibilità (premi Invio per aprire)

September 7, 2026

RAG: what it is, how it works and how it differs from fine-tuning

2026 Gartner data and technical guides from Google Cloud and IBM: why 78% of projects fail and how RAG reduces hallucinations and compute costs

The survey conducted by Gartner between January and April 2026 across 1,303 functional leaders from organizations with at least $50 million in annual revenue reveals a stark disconnect between allocated resources and actual business outcomes: only 22% of organizations have successfully scaled AI across multiple business units or adopted an AI-first operational model. The remaining 78% have either failed to move beyond pilot phases or have not achieved cross-functional operational integration.

Yet spending continues to accelerate. Eighty-five percent of functional leaders plan to increase budgets in 2026, after dedicating an average of 12% of their departmental resources to AI in 2025. Financial oversight is also noticeably absent: roughly 11% of respondents admit to being completely unaware of what their function spent on AI initiatives during fiscal year 2025. As noted by Tina Nunno, Distinguished Vice President and Gartner Fellow: “This lack of financial visibility heightens risk as spending accelerates; without disciplined measurement tied directly to business outcomes, organizations risk wasted resources and unmet expectations.”

Positive economic returns are concentrated where management accounting and governance are actively applied. High-performing organizations—those that systematically track project ROI, manage AI as a value portfolio, regularly evaluate performance, and reallocate or discontinue underperforming initiatives—report positive returns on 81% of their AI initiatives. In contrast, low performers state that they do not know the rate of return for 29% of their projects.

Most enterprise functions continue to prioritize near-term productivity gains over systemic process transformation or new revenue streams. Operational efficiency represents the primary target outcome for 75% of leaders and commands approximately 30% of total functional AI spending, nearly double the allocation of the next highest objective. Within IT departments, there is also a documented disconnect between the most frequently pursued use cases and those that generate tangible economic margin. Executive leaders have predominantly launched projects in cybersecurity threat detection and response (54%), IT service desk automation (54%), and automated code generation and refactoring (44%). However, the three use cases yielding the highest proportion of positive financial returns are intelligent IT asset and cost optimization (40%), synthetic data generation (28%), and, only in third place, code generation and refactoring (23%).

The root technical cause behind these underwhelming outcomes often lies in attempting to apply generic language models directly to core business workflows, without the infrastructure required to ground algorithms in proprietary company documentation.


Structural limitations of generative language models on proprietary data

Large language models (LLMs) operate under two structural constraints documented in the technical guides published by Google Cloud and IBM.

The first constraint is the training cutoff date, known as the knowledge cutoff. A standard foundation model generates answers based on public information ingested during its pre-training phase (web pages, public domain literature, open-source datasets). Once training completes, the mathematical parameters of the network are frozen: the model is unaware of subsequent events and cannot access proprietary enterprise documentation, such as vendor agreements, bills of materials, work orders, or internal operating procedures.

The second constraint concerns factual accuracy. Generative models operate by predicting probabilistic correlations across token sequences: when lacking specific domain data or identifying non-existent statistical patterns, they can produce unsubstantiated claims with authoritative conversational tone. This phenomenon is termed hallucination or confabulation. In an industrial or commercial setting, an inaccurate figure within a safety manual or a contract analysis introduces immediate operational liability.

To resolve these shortcomings, engineering teams often evaluate training a proprietary model from scratch or performing fine-tuning on an existing foundation model using internal records. As IBM points out, retraining or adapting a neural network on a domain-specific corpus demands dedicated GPU clusters, significant capital expenditure, and specialized data science teams. Furthermore, fine-tuning adjusts internal weights to align linguistic style or task formatting, but it does not resolve temporal data stagnation: every newly revised document would require an additional compute cycle.

The engineering framework that integrates dynamic documents without modifying underlying model weights is RAG (Retrieval-Augmented Generation).


How RAG works: retrieval, contextualization, and generation

Retrieval-Augmented Generation is a software architecture that pairs traditional information retrieval systems (search engines and databases) with the natural language processing capabilities of generative models. Rather than requiring the model to memorize enterprise knowledge within its parametric weights, RAG retrieves relevant documentation in real time and feeds it into the model as verifiable prompt context.

As detailed by both Google Cloud and IBM, the operational workflow unfolds across five sequential stages:

  • Query submission: an operator or customer submits a request in natural language.
  • Information retrieval (retrieval): the retriever queries the knowledge base to isolate the document passages relevant to the request.
  • Data integration layer: retrieved text chunks are pre-processed, filtered, and passed to the orchestration layer.
  • Augmented prompt construction (augmented prompt): the integration layer combines the initial user query with the retrieved source context into an enforced prompt structure.
  • Grounded generation (grounded generation): the pre-trained LLM produces an answer restricted to the injected context, including explicit citations to the underlying sources.
User Query

🗄️ Enterprise Knowledge Base

Retrieval Engine
Integration Layer
Augmented Prompt
with Context
Pre-trained LLM
Grounded Response
with Citations

The four core components of a RAG architecture

IBM’s technical documentation breaks down a RAG system into four functional building blocks:

  • The knowledge base: the external repository storing enterprise documentation, typically composed of unstructured data (PDFs, technical manuals, shift logs, operational spreadsheets). Source files are partitioned into uniform segments through a process known as chunking. Chunk size is a critical hyperparameter: overly broad chunks risk exceeding the LLM context window or diluting semantic precision; excessively granular chunks break the logical continuity of the narrative. Chunks are subsequently converted by embedding models into numerical vectors within a high-dimensional vector space.
  • The retriever: calculates the mathematical similarity between the vector representation of the user query and the vectors stored in the database to identify semantically proximate records. As noted by Google Cloud, robust deployments combine vector search with keyword-based retrieval (implementing hybrid search) and incorporate a scoring algorithm (re-ranker) to order retrieved passages by strict relevance before forwarding them to the generator.
  • The integration layer: orchestrates data flow, manages automated prompt engineering, and cleans queries prior to semantic lookup. This layer is typically managed via orchestration frameworks such as LangChain, LlamaIndex, or IBM watsonx Orchestrate.
  • The generator: the pre-trained foundation model (such as GPT, Claude, Llama, or Gemini) responsible for assembling the final prose. Operating under explicit instructions to rely solely on the injected context, it synthesizes the retrieved material while avoiding unsupported claims.

Technical comparison: RAG vs. fine-tuning

Distinguishing between fine-tuning and retrieval-augmented systems directly dictates project expenditure and feasibility. IBM’s analysis highlights how each technique addresses separate architectural requirements:

Evaluation CriterionFine-TuningRetrieval-Augmented Generation (RAG)
System ModificationUpdates internal weights and parameters of the neural network.Augments the input prompt context while leaving the LLM frozen.
Primary ObjectiveTeaches specialized style, domain vocabulary, or structured output formats.Supplies verifiable factual data, proprietary domain knowledge, and up-to-date documentation.
Compute RequirementsHigh: demands iterative training runs on dedicated GPU hardware.Low: relies on vector search infrastructure and standard inference calls.
Knowledge UpdatesStatic: any document update requires a new training cycle.Dynamic: instantly achieved by inserting or deleting files in the database.
Hallucination PreventionLimited: outputs remain bounded by probabilistic token predictions.High: outputs are anchored (grounded) directly in retrieved source passages.
Auditability and CitationsNone: knowledge is diffused across billions of model parameters.Full: the system returns explicit references to exact source documents and pages.
Data Access GovernanceComplex: absorbed training data cannot be compartmentalized per user.Granular: document retrieval adheres to database-level access permissions.

Google Cloud provides an additional financial consideration regarding computational overhead: while state-of-the-art models like Gemini feature extended context windows (LCW), passing entire document archives into each prompt incurs significant token billing and drives up latency. RAG extracts only the necessary contextual chunks, keeping compute costs and response times within viable operational limits.


Security requirements and quality evaluation via RAG Ops

Deploying enterprise RAG systems in production requires discipline across two core domains: proprietary data security and continuous evaluation.

From a data privacy perspective, IBM points out that RAG protects confidentiality by decoupling the knowledge base from the generative algorithm: enterprise files do not enter training corpora, and file access can be revoked instantly. However, vector databases introduce their own architectural requirements: vector stores must be encrypted and safeguarded by strict access policies. If an unsecured vector database is breached, malicious actors can reverse-engineer vector embeddings to reconstruct the underlying sensitive text.

From an observability standpoint, Google Cloud underscores the necessity of a structured engineering practice termed RAG Ops, founded on objective evaluation metrics:

  • Factual grounding (groundedness): verifies that each assertion in the output directly traces back to retrieved context, flagging speculative generation.
  • Context relevance (context relevance): measures the retriever’s accuracy in filtering out noise and isolating only query-specific passages.
  • Instruction following and safety: confirms adherence to system prompts, behavioral boundaries, and enterprise governance policies.

Monitoring these indicators enables teams to continuously optimize chunking strategies, tune retrieval algorithms, and maintain financial visibility over AI investments. This discipline directly reflects Tina Nunno’s recommendation in the Gartner study: leaders who track expenditures across specific outcome categories—productivity, top-line growth, risk mitigation, or innovation—are uniquely positioned to justify allocations and reassign budgets when initiatives fall short of financial expectations.


Enterprise implementation: moving from pilot projects to knowledge engines

The findings from the Gartner survey indicate that superficial productivity shortcuts cannot justify the enterprise cost of artificial intelligence. The 81% positive return rate achieved by high-performing organizations confirms that enterprise value materializes when AI targets structural documentation bottlenecks across core business workflows.

RAG enables the deployment of enterprise knowledge engines where field engineers, sales teams, and plant managers can query complex machinery manuals, procurement contracts, and regulatory filings using plain language, receiving immediate answers tied to source files. Verifiable source attribution eliminates user distrust and removes manual search overhead from daily operations.

The foundation for this deployment rests on proven components: encrypted vector databases, hybrid search pipelines, and foundation models strictly constrained to retrieved context. We built AVA as an enterprise assistant that retrieves answers directly from your documentation, on-premise or in the cloud, and returns only verified information, with the exact page it comes from. To bring your company into that 22% getting real returns from AI: speak with us and test AVA on your workflows.


Sources

Marta Magnini

Marta Magnini

Digital Marketing & Communication Assistant at Aidia, graduated in Communication Sciences and passionate about performing arts.

Aidia

At Aidia, we develop AI-based software solutions, NLP solutions, Big Data Analytics, and Data Science. Innovative solutions to optimize processes and streamline workflows. To learn more, contact us or send an email to info@aidia.it.