RAG را با انبار فایل شروع نکنید؛ از ۳۰ سؤال شروع کنید
قبل از وصلکردن همه اسناد به RAG، یک کیت حقیقت کوچک و قابلآزمون بساز: پاسخ درست، منبع، مالک، تاریخ اعتبار و معیار پذیرش. بعد نسخه صفر را همین امروز اجرا کن.
فهرست مطالب
خیلی از پروژههای RAG با یک حرکت بزرگ شروع میشوند: همه فایلها را بریز تو یک انبار، تکهتکهشان کن، بردار بساز، یک مدل وصل کن و بنشین منتظر جواب خوب. از بیرون شیک به نظر میرسد. از داخل یک سوراخ بزرگ دارد: هنوز نمیدانی سیستم باید جواب کدام سؤال واقعی را بدهد، با چه دقتی، و بر پایه کدام مدرک.
راهحل من سادهتر است: قبل از ساخت مخزن دانشی بزرگ، یک «کیت حقیقت» بساز. یعنی یک مجموعه کوچک و کنترلشده از سؤالهای واقعی که برای هر کدام، جواب مطلوب، مدرک قابلاستناد، مالک محتوا، تاریخ اعتبار و شرط پذیرش را از قبل نوشتهای.
این حرف یعنی معماری و امنیت و اتصال سامانهها را کنار بگذاری؟ نه. یعنی برای مسئلهای که هنوز تعریفش معلوم نیست، معماری نساز. وقتی از اول بدانی کدام پاسخها واقعاً مهماند، تصمیمهای بعدی درباره داده و بازیابی و انتخاب مدل، خیلی دقیقتر میشوند.
عدد ۳۰ قانون نیست؛ یک اندازه خوب برای شروع است. آنقدر کوچک که بتوانی واقعاً با تیم محتوا مرورش کنی. آنقدر متنوع که شکاف دانشی را زود نشان بدهد. دامنهات کوچکتر است؟ کمتر بردار. چند واحد درگیرند؟ سؤالها را مرحلهبهمرحله اضافه کن.
گام اول: سؤالهای واقعی را پیدا کن، نه سؤالهای نمایشی که مدل را خوب جلوه میدهند. برو سر صف تیکتها، تماسها، سؤالهای فروش، دستورالعملهای داخلی. هرجا همکارها بین فایل و آدم جابهجا میشوند تا یک جواب بگیرند، همانجا طلاست. سؤال خوب تکرارشونده، زمانبر، حساس یا گران است.
مثال فرضی از صنعت فولاد: برای یک گرید مشخص چه مدارکی باید همراه سفارش برود؟ اگر مشخصات دریافتی با درخواست اولیه نخواند، تصمیم با کیست؟ کدام نسخه دستورالعمل نگهداری معتبر است؟ اینها سؤالهای کاریاند، نه دمو برای نشاندادن قدرت چتبات.
برای هر سؤال یک کارت شواهد بساز. سؤال فقط شروعش است. در کارت بنویس: پاسخ مطلوب چه تصمیمی را جلو میبرد، چقدر دقیق باید باشد، کدام منبع اجازه استناد دارد، مالک صحتش کیست، و کِی باید دوباره اعتبارش را چک کرد.
پاسخ مطلوب را فقط متن ننویس؛ ساختارش را هم بچین. شاید باید شامل نتیجه کوتاه، شرط اعتبار، ارجاع به سند و گام بعدی باشد. گاهی بهترین پاسخ این است که بگوید «اطلاعات کافی نیست» و مسیر درست را نشان بدهد. سکوتِ درست هم یک جواب است.
منبع را دقیق بنویس: نام سند، نسخه، بخش، جای نگهداری، وضعیت تأیید. سند رسمی نداری و پاسخ فقط تو ذهن یک نفر است؟ پنهانش نکن. آن سؤال را بگذار توی وضعیت «نیازمند تکمیل»، نه اینکه سیستم با لحن مطمئن یک جواب احتمالی تف کند بیرون.
مالک محتوا تزئینی نیست. مالک لزوماً سازنده RAG نیست؛ کسی است که حق تأیید یا اصلاح آن حقیقت عملیاتی را دارد. مشخصات یا دستورالعمل عوض شد؟ باید روشن باشد چه کسی کارت را بازبینی میکند و تغییر را ثبت میکند.
برای هر کارت یکی از این سه را بزن: پاسخپذیر، نیازمند تکمیل، یا نباید پاسخ داده شود. پاسخپذیر یعنی منبع معتبر و جواب قابلقبول داری. نیازمند تکمیل یعنی سؤال مهم است ولی سند یا مالک یا معیار هنوز ناقص است. نباید پاسخ داده شود یعنی جواب خودکار میتواند ریسک حقوقی، ایمنی یا تصمیم نامجاز بسازد.
این طبقهبندی یک قابلیت طلایی میدهد: سیستم بتواند «نمیدانم» را مفید بگوید. بهجای جواب مبهم، بگوید منبع تأییدشده ندارد و مسیر ارجاع را نشان بدهد. در حوزههای فنی و صنعتی این رفتار نقطه قوت است، نه ضعف.
حالا نسخه صفر را بساز، ولی فقط برای همین کیت. لازم نیست کل فایلهای سازمان را بریزی تو سیستم. فقط منابع تأییدشده مرتبط با همین سؤالها را وصل کن، بازیابی را تنظیم کن، خروجی را طوری طراحی کن که منبع و محدودیت پاسخ معلوم باشد. هدف کاملبودن نیست؛ هدف دیدن واقعیت است.
هر سؤال را با چند جور بیان امتحان کن. کاربر واقعی عین متن کارت شواهد سؤال نمیپرسد؛ اصطلاح عامیانه میگذارد، نام سند را ناقص مینویسد، غلط تایپی دارد. این تست نشان میدهد مشکل از بازیابی است، از کیفیت منبع است، از سؤال مبهم است یا از طراحی پاسخ.
معیار پذیرش را از قبل، نه بعد از دیدن خروجی، بنویس. آیا جواب به سؤال مرتبط است؟ آیا ادعای اصلی به منبع درست وصل شده؟ آیا نسخه و تاریخ درست دیده شده؟ شرط مهمی جا نمانده؟ در وضعیت ممنوعه، از جوابدادن خودکار پرهیز کرده؟ همین.
با n8n یا هر ابزار مشابه کار میکنی؟ چرخه را سبک نگهدار: سؤال بیاید، منبع بازیابی شود، جواب تولید شود، نتیجه ثبت شود، امتیاز بگیرد، دلیل خطا یادداشت شود. یک جدول داده ساده برای سؤال، نسخه منبع، خروجی، وضعیت پذیرش و یادداشت بازبین کافی است. همیشه بتوان اجرای جدید را با اجرای قبلی مقایسه کرد.
OpenAI و Anthropic هر دو روی همین نقطه تأکید دارند: ارزیابی با ورودیهای واقعی، بازخورد کاربر، مرور انسانی و پایش مداوم. n8n هم همین را میگوید: اجرای تکراری جریانها، ذخیره داده ارزیابی، دیدن افت کیفیت. پیام یکی است: کیفیت دکمه نیست، یک حلقه کاری است.
هر خطا را برچسب بزن، نه حس مبهم. منبع قدیمی، منبع پیدا نشد، تکهبندی بد، سؤال مبهم، جواب بیشازحد قطعی، استناد ناقص، دسترسی اشتباه، نیاز به ارجاع انسانی. حالا این برچسبها را بریز توی بکلاگ داده. همینجا آزمایش کوچک، نقشه ساخت زیرساخت را میسازد.
بازخورد کاربر را فقط با «خوب بود؟» جمع نکن. بپرس تصمیمش جلو رفت یا نه؟ باز هم مجبور شد دنبال سند بگردد؟ توانست منبع را چک کند؟ جواب ریسک تازه ساخت؟ همین فرق میگذارد بین متنی که خوشخوان است و ابزاری که واقعاً کار میکند.
بعد چند دور تست، شاید بفهمی مشکل اصلی مدل نیست. شاید نسخهبندی سند خراب است، مالک محتوا معلوم نیست، دسترسیها پخشوپلا است، یا اصلاً سؤالهای مهم جواب رسمی ندارند. این شکست نیست؛ این دقیقاً ارزش کیت حقیقت است. قبل از خرج بزرگ، محدودیت واقعی دانش سازمان را دیدی.
کارتهای پاسخپذیر ثابت شدند؟ دامنه را باز کن: سؤال تازه اضافه کن، منبع جدید را با همان استاندارد وارد کن، موارد نیازمند تکمیل را بعد از تأیید مالک فعال کن. هر گسترش باید با ارزیابی دوباره همراه باشد؛ یک تغییر کوچک در داده یا مدل، جوابهای قبلی را هم جابهجا میکند.
RAG قابلاعتماد از انباشتن فایل شروع نمیشود؛ از تعریف حقیقت قابلآزمون شروع میشود. یک کیت کوچک از سؤال واقعی تو را وادار میکند بدانی چه میدانی، چه نمیدانی، مسئول دانستنش کیست و سیستم کجا باید ساکت بماند. سریع شروع کن، اما نه با همهچیز؛ با سؤالهایی شروع کن که واقعاً کار را جلو میبرند.
Most RAG projects start with one big move: dump every file into a warehouse, chunk it, embed it, wire up a model, and wait for good answers. Looks slick from outside. From inside, it hides a hole: you still don’t know which real question the system must answer, how precise it needs to be, or what evidence backs it up.
My fix is simpler: before you build a giant knowledge repo, build a ‘truth kit.’ A small, controlled set of real questions, each one already paired with a desired answer, a citable source, a content owner, a validity date, and a clear acceptance bar.
Does this mean skip architecture, security, system integrations? No. It means don’t build architecture for a problem you haven’t defined yet. Once you know which answers actually matter, every later call on data, retrieval, and model choice gets sharper.
Thirty isn’t a rule; it’s a good starting size. Small enough that your content team can actually review it. Varied enough to expose knowledge gaps fast. Smaller scope? Pick fewer. Multiple units involved? Add questions in waves.
Step one: find real questions, not demo questions that make the model look impressive. Go to the ticket queue, the calls, the sales questions, the internal procedures. Wherever colleagues bounce between files and people just to get an answer, that’s gold. A good question is recurring, time-consuming, sensitive, or expensive.
A hypothetical example from steel: which documents must accompany an order for a given grade? If received specs clash with the original request, who decides? Which version of the maintenance procedure is valid? These are working questions, not chatbot party tricks.
Build an evidence card per question. The question is just the start. Write down: what decision the desired answer enables, how precise it must be, which source is allowed for citation, who owns its correctness, and when to recheck its validity.
Don’t write the desired answer as flat prose; shape its structure too. Maybe it needs a short conclusion, a validity condition, a document reference, a next step. Sometimes the best answer is ‘not enough info, here’s where to go.’ The right silence is still an answer.
Pin the source down: document name, version, section, storage location, approval status. No formal document, and the answer lives only in someone’s head? Don’t hide that. Put the question in ‘needs completion,’ not let the system spit out a confident guess.
The content owner isn’t decoration. This isn’t necessarily the RAG builder; it’s whoever has the authority to confirm or fix that operational truth. Spec or procedure changes? It must be clear who reviews the card and logs the change.
Tag every card one of three ways: answerable, needs completion, or must-not-answer. Answerable: valid source, acceptable answer. Needs completion: the question matters but the document, owner, or criteria are still incomplete. Must-not-answer: an automated reply here could create legal, safety, or unauthorized-decision risk.
This tagging gives you a golden capability: the system can say ‘I don’t know’ usefully. Instead of a vague answer, it states there’s no approved source and points to escalation. In technical and industrial work, that’s a strength, not a weakness.
Now build version zero, but only for this kit. You don’t need every organizational file dumped in. Wire up only the approved sources tied to these questions, configure retrieval, design output so the source and its limits are visible. The goal isn’t completeness; the goal is seeing reality.
Test each question with several phrasings. Real users don’t ask exactly like the evidence card’s wording; they use slang, half-remembered document names, typos. This test tells you whether the failure is retrieval, source quality, question ambiguity, or answer design.
Write acceptance criteria before you see any output, not after. Is the answer relevant? Is its main claim tied to the right source? Does it get the version and date right? Did it drop an important condition? In a prohibited case, did it avoid auto-answering? That’s it.
Using n8n or something similar? Keep the loop light: question in, source retrieved, answer generated, result logged, score given, failure reason noted. A simple data table for questions, source versions, outputs, acceptance states, and reviewer notes is enough. Always keep the ability to compare a new run against the last one.
OpenAI and Anthropic both hammer the same point: evaluate with real-world inputs, user feedback, human review, continuous monitoring. n8n says the same thing: iterative workflow runs, stored evaluation data, catching quality drift. One message: quality isn’t a button, it’s an operational loop.
Tag every failure, don’t just feel vaguely bad about it. Outdated source, source not found, bad chunking, ambiguous question, overly confident answer, incomplete citation, wrong access, needs human escalation. Dump these tags into a data backlog. This is where the small experiment turns into your infrastructure roadmap.
Don’t collect user feedback with just ‘was this good?’ Ask if it moved their decision forward. Did they still have to go dig up the document? Could they verify the source? Did the answer create new risk? That’s the line between readable text and a tool people actually use.
After a few test rounds, you might find the real problem isn’t the model at all. Document versioning is broken, content ownership is unclear, access is scattered, or important questions simply have no official answer. That’s not failure; that’s exactly the point of the truth kit. You saw the real limits of your organization’s knowledge before spending big.
Answerable cards holding steady? Expand scope: add new questions, admit new sources under the same standard, activate ‘needs completion’ items once owners sign off. Every expansion needs re-evaluation, because one change in data or model can shift answers you already trusted.
Reliable RAG doesn’t start by piling up files; it starts by defining testable truth. A small kit of real questions forces you to know what you know, what you don’t, who owns knowing it, and where the system must stay quiet. Move fast, but not on everything at once; start with the questions that will actually move the work.
اگر این موضوع شبیه مسئله واقعی کسبوکار توست، از چکاپ تصمیم شروع کن.
یک مسیر کوتاه برای روشنکردن مسئله، گلوگاه تصمیم و قدم بعدی؛ بدون فرم طولانی و بدون تعهد.