RAG in Smartcat
1. What Is RAG?
Retrieval-Augmented Generation (RAG) enriches your AI translation by fetching relevant segments from your own Translation Memory (TM) and tucking them into the prompt. Here is an analogy from real life to better understand how RAG works:
Recipe Book with Sticky Notes: Imagine you’re baking a new cake (your source text). You have a recipe book (the LLM), but you also pull out a friend’s recipe for a similar cake and stick it in as a reference. Their recipe isn’t exactly for the same cake, but it has hints (ingredient proportions, baking times, special tips) that help you get it just right. RAG works the same way: it finds partial or fuzzy matches in your TM, and uses those human-reviewed translations as “sticky notes” to guide the LLM toward more consistent, accurate output.
2. How RAG Translation Works in Smartcat
Search TM for 100% segment matches.
If found: insert that exact TM translation into the segment.
If not found: search for the single most reliable fuzzy match and insert both its source segment and its human-reviewed translation into the prompt.
If still nothing found: send the prompt without TM context.
Only affects LLM engines (does not apply to DeepL, ModernMT, Google NMT, Microsoft Translator, etc.). 1. Supported LLMs: GPT-4o, Gemini 2.5, Claude Sonnet 3.7
Works with Custom Prompts in Smartcat
Additional information:
RAG works with TMs that are connected to the project (the same way 100%+ TM matches work)
RAG can be disabled if user deletes part of the prompt related to fuzzy match substitution (see “how to set up RAG” section for details)
3. RAG Mini-Example
Source Text | Fuzzy Match Segment | TM Translation for Match | Raw LLM Output | RAG-Augmented LLM Output |
International Sales Div. | International Sales Department | División Internacional | División divorciada¹ | División Internacional² |
Without RAG, “Div.” could be mis-interpreted by the LLM (“divorciada” means “divorced”).
With RAG, Smartcat fetched the TM fuzzy match and its approved translation (“División Internacional”), guiding the LLM to the correct output.
4. Why Use RAG vs No RAG or Fine-Tuned LLMs?
Linguistic consistency & brand voice Retrieved examples from your TM already reflect your approved style, tone, and terminology. By providing concrete, human-reviewed translations, RAG helps the LLM mimic your established voice more faithfully than a standalone or fine-tuned model might.
Reduced hallucinations & improved accuracy Instead of generating content from scratch, the LLM uses only the most relevant context pulled from your TM. This targeted retrieval minimizes the risk of off-topic or invented translations and boosts overall quality. Even in cases where no perfect match is available, the model falls back gracefully.
5. Feature Status & Enabling
Beta and feature-flagged : RAG is in private beta.
To enable: contact your CSM or Smartcat Support to turn on the flag for your workspace.