मुख्य सामग्री पर जाएँ
kitlocal.dev

RAG Chunk Visualizer

लोकल चलता है

100% आपके ब्राउज़र में प्रोसेस होता है। इनपुट और आउटपुट कभी आपके डिवाइस से बाहर नहीं जाते।

देखें कि RAG के लिए किसी दस्तावेज़ को चंक में कैसे विभाजित किया जाता है: चंक आकार, ओवरलैप, टोकन गणना, एम्बेडिंग लागत और प्राप्त संदर्भ

दस्तावेज़

LangChain के RecursiveCharacterTextSplitter की तरह: पहले खाली पंक्तियों पर, फिर नई पंक्तियों, वाक्यों और शब्दों पर विभाजित करने का प्रयास करता है, ताकि चंक यथासंभव अर्थपूर्ण बने रहें।

प्रीसेट (आकार / ओवरलैप):
चंक
3
दस्तावेज़ टोकन
232
औसत टोकन / चंक
81
न्यूनतम / अधिकतम टोकन
46 / 126
एम्बेड करने हेतु टोकन
242
ओवरलैप फ़ैक्टर
1.04×

अनुमानित एम्बेडिंग लागत: $0.000005

प्रत्येक प्रॉम्प्ट में जोड़ा गया संदर्भ: 323 टोकन

दस्तावेज़ मैप (पीला = पिछले चंक के साथ ओवरलैप)

वैकल्पिक पंक्तियों से पड़ोसी चंक को आसानी से पहचाना जा सकता है।

  1. #170 टोकन280 वर्ण0–280
    # Retrieval-Augmented Generation
    
    Retrieval-Augmented Generation (RAG) gives a language model access to knowledge it was not trained on. Instead of fine-tuning, you split your documents into chunks, embed each chunk, and store the vectors in a database.
    
    ## Why chunking matters
    
    
  2. #2126 टोकन503 वर्ण255–75825 वर्ण ओवरलैप
    ## Why chunking matters
    
    At query time the question is embedded and the closest chunks are retrieved. If a chunk is too large, it dilutes the meaning and wastes context window. If it is too small, it loses the surrounding context and the answer gets cut in half.
    
    A common starting point is 256 to 512 tokens with 10 to 20 percent overlap. Overlap repeats the end of one chunk at the start of the next, so a sentence that straddles a boundary is still found whole in at least one chunk.
    
    ## Trade-offs
    
    
  3. #346 टोकन184 वर्ण743–92715 वर्ण ओवरलैप
    ## Trade-offs
    
    Larger overlap improves recall but increases the number of tokens you embed and store. Always measure retrieval quality on your own questions before settling on a size.
    

टोकन गणना अनुमानित है (अंग्रेज़ी के लिए ~4 वर्ण प्रति टोकन, गैर-लैटिन वर्णों के लिए ~1 प्रति वर्ण), मॉडल टोकनाइज़र का सटीक आउटपुट नहीं। लागत आपके प्रदाता की वर्तमान कीमत पर निर्भर करती है।