Prebuilt Document Loader
Why this pack ships 22MB of ready-made prompt libraries
- Documents
- summary
Most RAG packs make you bring your own documents. EasyRAG is different - it ships with a whole prebuilt corpus and a node designed to read it, which tells you something about what the author actually built this pack for. It's not for grounding an LLM chat in your private PDFs, or at least not mainly. It's for retrieval over prompt libraries - big collections of prompt text that you query to steer image generation. The Prebuilt Document Loader (it shows up as "Rag 预制文档加载" in Chinese UIs) is the node that reads that corpus.
What's bundled
Clone the pack and you get this in its rag/ directory:
1万条提示词完整版.txt- a 22MB file of roughly ten thousand prompts, one per line. This is the pack's centerpiece.Anima/,Z-Image_1steps/,Z-Image_2steps/- folders of prompt/rule text tuned for specific anime and step-count workflows.portrait_examples_chunks_v2.json- pre-chunked portrait example data.
The point of RAG with this stuff should be obvious: instead of staring at a 22MB text file, you embed it, then ask the LLM "find me a cinematic rainy-night portrait prompt" and it retrieves the actual relevant lines to build from. That's the whole workflow this pack is designed around - the LLM-in-the-graph pattern from the KB's llm-in-comfyui.md, applied to prompt retrieval instead of prompt enhancement.
How it works
The node gives you a single document dropdown that lists everything in two places: the pack's own rag/ folder and your ComfyUI/models/RAG folder. Folders get a 📂 prefix, files a 📄 prefix. Pick a folder and it recursively loads every supported file (txt/md/json/pdf) inside it; pick a file and it loads just that. Output is the same as the regular Document Loader - Documents (RAG_DOCUMENTS) for the Vector Store Builder, plus a summary string telling you how many files parsed successfully.
Two folders are deliberately hidden from you: VectorDB (the vector index directory - never feed an index back in as a document) and SystemPrompts. If you drop your own text into models/RAG, it appears here automatically - that's the intended way to add your own corpus without touching the pack.
Gotchas
- The combo box scans the directory tree at load time. Add a file to
models/RAGmid-session and it won't show until you refresh ComfyUI. - Line-based retrieval matters here. The vector store builder that consumes these documents chunks per non-empty line, which is exactly right for a prompt file where every line is a self-contained prompt and wrong for prose. This loader just hands text over - it's the builder downstream that does the slicing.
- If the dropdown is empty, it means neither the pack's
rag/folder normodels/RAGhas anything readable - check that the pack installed completely (the corpus lives inside the repo, so a partial checkout loses it).
Install and run
This node rides along with the whole pack - ComfyUI Manager, search "ComfyUI Easy RAG", install, restart. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/nregret/Comfyui-Easy-RAG
cd Comfyui-Easy-RAG
pip install -r requirements.txt
Dependencies are just faiss-cpu, sentence-transformers, requests, and pypdf - nothing exotic, and nothing downloads model weights by itself.
My honest verdict: for the "query a prompt library" use case this is the most convenient loader of the two EasyRAG offers, because it points at exactly where the interesting data already lives. But don't mistake the bundled 10k-prompt file for a magic quality button - retrieval only finds you what's already in the file, so the ceiling is your corpus, not the model. If you're feeding your own private documents, the plain Document Loader or dropping files into models/RAG works just as well.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| document | COMBO | Select a prebuilt document or folder from rag and models/RAG |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Documents | RAG_DOCUMENTS | — |
| summary | STRING | — |