← Blog
AI & LLM·18 HAZİRAN 2026JUN 18, 2026·6 DK OKUMA6 MIN READ

RAG demoda çalışır. Üretimde neden düşer?RAG works in the demo. Why does it fail in production?

Beş dakikada ayağa kalkan bir RAG demosu ile gerçek kullanıcıya, gerçek veriyle cevap veren bir sistem arasında bir uçurum var. Bu yazı o uçurumun haritası.

There's a gulf between a RAG demo that stands up in five minutes and a system answering real users with real data. This post maps that gulf.

Naylalabs · MühendislikEngineering

01Demo neden hep çalışırWhy the demo always works

Demo koşulları kusursuzdur: on temiz PDF, iyi niyetli üç soru ve sonucu değerlendiren kişinin cevabı zaten bilmesi. Framework'ler bu senaryoyu beş dakikada kurdurur — ve kurmalısınız da; hızlı prototip, problemi anlamanın en ucuz yolu.

Demo conditions are flawless: ten clean PDFs, three well-intentioned questions, and an evaluator who already knows the answer. Frameworks let you build this in five minutes — and you should; a fast prototype is the cheapest way to understand the problem.

Üretim koşulları ise tam tersi: on bin belge, çelişen sürümler, yazım hatalı sorgular, cevabın olmadığı sorular ve yanlış cevabın parayla ölçüldüğü bir ortam.

Production is the opposite: ten thousand documents, conflicting versions, misspelled queries, questions with no answer, and an environment where a wrong answer is measured in money.

RAG projeleri retrieval'da değil, disiplinde başarısız olur.
RAG projects don't fail at retrieval. They fail at discipline.

02Retrieval kalitesi: sistemin tavanıRetrieval quality: the system's ceiling

Model ne kadar iyi olursa olsun, yanlış bağlam geldiyse doğru cevap şans işidir. Üretimde farkı yaratan üç pratik:

However good the model, if the wrong context arrives, a correct answer is luck. Three practices that make the difference in production:

03Eval seti olmadan iyileştirme yokturNo eval set, no improvement

"Bugün daha iyi görünüyor" bir metrik değildir. Üretime giden her RAG sisteminde şunu kurarız: gerçek kullanıcı sorularından derlenmiş, beklenen kaynağı ve cevabı işaretlenmiş bir eval seti — ve her değişiklikte otomatik koşan bir skor.

"It looks better today" is not a metric. For every RAG system headed to production we build an eval set — real user questions with expected sources and answers labeled — and a score that runs automatically on every change.

eval.yaml — örnek / example
# her PR'da koşar / runs on every PR
case: "iade süresi — üyeliksiz sipariş"
expect_source: "iade-politikasi-v3.md"
expect_contains: "14 gün"
reject_if: "30 gün"  # eski politika / old policy

Bu set küçük başlar (50 soru yeter), her üretim hatası sete yeni bir vaka olarak döner. Altı ay sonra elinizde sistemin gerçek hafızası olur.

The set starts small (50 questions is enough); every production failure returns as a new case. Six months later you hold the system's real memory.

04Guardrails ve gözlemlenebilirlikGuardrails and observability

Modelin "bilmiyorum" diyebilmesi bir üründür; kaynak gösteremeyen cevabın reddedilmesi bir kuraldır. Bunun yanına her cevap için iz kaydı koyarız: hangi sorgu, hangi parçalar, hangi skorlar, kaç ms, kaç token. Bir kullanıcı "saçma cevap verdi" dediğinde bakılacak yer log değil, trace olmalı.

A model that can say "I don't know" is a feature; rejecting answers that can't cite a source is a rule. Next to that we record a trace per answer: which query, which chunks, which scores, how many ms and tokens. When a user says "it gave a nonsense answer", the place to look should be a trace, not grep.

Kısa liste. Üretime çıkmadan: hibrit arama ✓ · eval seti + CI ✓ · kaynak zorunluluğu ✓ · trace ✓ · maliyet/istek limiti ✓. Bu beşi yoksa, elinizdeki hâlâ bir demodur.Before go-live: hybrid search ✓ · eval set + CI ✓ · mandatory citations ✓ · tracing ✓ · cost/request limits ✓. Missing these five, what you have is still a demo.
RAGLLMEvalProduction AI