RAG Chunk Visualizer
Visualisiere, wie ein Dokument für RAG in Chunks unterteilt wird: Chunk-Größe, Überlappung, Token-Anzahl, Embedding-Kosten und abgerufener Kontext
Wie der RecursiveCharacterTextSplitter von LangChain: Versucht zuerst bei Leerzeilen, dann bei Zeilenumbrüchen, Sätzen und Wörtern zu trennen, damit Chunks möglichst semantisch bleiben.
- Chunks
- 3
- Dokument-Tokens
- 232
- Durchschn. Tokens / Chunk
- 81
- Min. / Max. Tokens
- 46 / 126
- Zu embeddende Tokens
- 242
- Überlappungsfaktor
- 1.04×
Geschätzte Embedding-Kosten: $0.000005
Kontext für jeden Prompt hinzugefügt: 323 tokens
Dokumentkarte (Gelb = Überlappung mit vorherigem Chunk)
Abwechselnde Zeilen erleichtern das Unterscheiden benachbarter Chunks.
- #170 tokens280 zeichen0–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
- #2126 tokens503 zeichen255–75825 Zeichen Überlappung
## 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
- #346 tokens184 zeichen743–92715 Zeichen Überlappung
## 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.
Token-Zahlen sind Schätzwerte (~4 Zeichen pro Token für Englisch, ~1 pro nicht-lateinischem Zeichen), nicht die exakte Ausgabe eines Modell-Tokenizers. Die Kosten hängen vom aktuellen Preis deines Anbieters ab.