RAG tips

curated by arun · 6 sources · public

Guide

Compiled from 6 sources on 2026-09-11

RAG and Text Splitting Guide

Language models perform better on tasks when given smaller, more relevant subsets of data, making proper text splitting and retrieval essential [1][2]. This guide compiles strategies and implementation details for building high-quality retrieval-augmented generation systems [6].

Text Splitting and Chunking Strategies

Text splitting helps language models by reducing noise and fitting data within context limits [2]. ChunkViz is an open-source tool created by Greg Kamradt under the MIT License that helps users understand text chunking and splitting strategies using color coding [1]. It displays chunks in distinct colors and shows overlapping text in orange, with overlap locked at less than fifty percent of the chunk size [1]. Text splitters trim whitespace on the end of Javascript, Python, and Markdown splitters [1].

Level 1 character splitting chunks text by a fixed static character length [2]. LangChain provides character splitters and document objects holding strings and metadata, while Llama Index uses a sentence splitter and processes documents into nodes containing unique IDs and relationships [2]. Implementations of text splitters are available in LangChain and Llama Index for Python and Javascript [1]. Splitting documents by logical blocks like headers and subheaders significantly improves retrieval quality compared to format-agnostic recursive text splitters [6]. Furthermore, embedding documents using multiple chunk sizes and dynamically selecting the best size at runtime improves retrieval accuracy [6].

Embedding, Search, and Re-ranking

Embedding models like e5-large-v2 provide a good balance between size and quality, often matching or exceeding OpenAI's ADA model [6]. Sparse embeddings implemented using SPLADE help minimize the vocabulary mismatch problem and can be efficiently stored using Numpy's sparse matrices [6].

High-quality RAG systems can utilize a hybrid search and re-ranking pipeline through the following steps [6]: - Retrieve top k documents using SPLADE sparse embeddings [6]. - Retrieve top k documents using dense embeddings similarity search [6]. - Create a union of documents from both sparse and dense retrieval results [6]. - Re-rank all the combined documents using a cross-encoder re-ranker based on relevance scores [6]. - Stuff the top sorted documents into the LLM as context [6].

Using a cross-encoder re-ranker on the union of sparse and dense search results allows precise scoring and sorting of retrieved passages before stuffing them into an LLM [6].

Additional Retrieval and Evaluation Resources

Full Stack Retrieval is an educational resource teaching LLM retrieval methods where users can sign up to receive one advanced retrieval method per day for five days [3]. Jason Liu's speaker series covers RAG systems, coding agents, and AI deployment insights, featuring Anton from ChromaDB on fundamental chunking strategies and evaluation methods, and Kelly Hong from Chroma on generative benchmarking to create custom evaluation sets instead of relying on MTEB rankings [4]. Additionally, Extend achieves 95%+ extraction accuracy for customers like Brex and Fortune 500s through AI-native document processing [4].

What is not covered

Specific configuration parameters and code implementations for integrating vector databases like Pinecone, FAISS, or SQLite are omitted [6]. Detailed benchmarks comparing all available embedding models beyond e5-large-v2 and OpenAI's ADA are not included [6]. Specific technical details regarding the internal architecture of coding agents like Devin, Amp, Cline, and Augment are absent [4].

  1. [1] ChunkViz · https://chunkviz.up.railway.app/ · fetched 2026-07-27
  2. [2] The 5 Levels of Text Splitting for Retrieval · https://www.youtube.com/watch?v=8OJC21T2SL4 · fetched 2026-09-11
  3. [3] Full Stack Retrieval · https://fullstackretrieval.com/ · fetched 2026-07-27
  4. [4] RAG - Jason Liu · https://jxnl.co/writing/category/rag/#faq-on-improving-rag-applications · fetched 2026-07-27
  5. [5] LocalLlama Subreddit - Discussions on Local AI and Large Language Models · https://www.reddit.com/r/LocalLLaMA/ · fetched 2026-07-27
  6. [6] Lessons Learned Building a High-Quality RAG System · https://www.reddit.com/r/LocalLLaMA/comments/16cbimi/yet_another_rag_system_implementation_details_and/ · fetched 2026-07-27
LinkList — grounded sources for agents

Curated source libraries, served to your agent over MCP.

Product

MCP