Handwriting a RAG engine from scratch: Implementing semantic chunking and hybrid retrieval
11/05/2026 — 11/06, 12:16·1 sources (all)·1 reports (all)
Key takeaways
- An article covers building a complete RAG engine from scratch, encompassing Markdown-level semantic chunking, BM25 algorithms, reciprocal ra…
Background & analysis
On 2026-11-05, a Juejin article titled "Writing a RAG Engine from Scratch: Semantic Chunking and Hybrid Retrieval" walked readers through building a complete RAG engine by hand. The piece is explicit that this goes beyond simple vector search: the goal is a full pipeline with several distinct pieces. Chunking is semantic and structure-aware, operating at the Markdown hierarchy level so that documents are split along their heading and nesting structure rather than by a fixed character count. Keyword search is implemented by writing the BM25 algorithm manually instead of calling a library. Hybrid retrieval is built by combining the BM25 rankings with dense vector search results through reciprocal rank fusion (RRF), which merges two ranked lists without needing normalised scores. For multi-turn question answering, the article adds a rewriting step that uses an LLM to rewrite follow-up questions into standalone ones, so a query like "what about the second part?
" can be resolved on its own. Finally, a quality evaluation system is included to score retrieved results. As of the only available report, the article remains at the feature-overview stage. It does not provide the chunking heuristics, BM25 source code, RRF parameters, retrieval or end-to-end benchmarks, evaluation metrics, or any follow-up updates. Readers interested in the actual implementation details have to wait for more material.
AI-generated from 1 reports · updated 1 hour ago
- Heat index
- 66
- All sources
- 1
- All reports
- 1
- First seen
- 15 hours ago
Reports on this story headlines open the original
The article demonstrates how to build a complete RAG engine from scratch, covering Markdown-level semantic chunking, BM25 algorithm, reciprocal rank fusion hybrid retrieval, as well as multi-turn query rewriting and quality evaluation systems.
掘金AI score 68
Other stories people are talking about
- Heat index 1182RisingOpenAI rolls out GPT-6 Cyber to Daybreak Red users with API, Codex access15 sources
- Heat index 906SurgeGemini Omni 1.2 Flash enters Gemini API with video clip extension to 30 seconds11 sources
- Heat index 685RisingAnthropic launches Claude Personal Finance with read-only Plaid bank links9 sources
- Heat index 612OpenAI ships Images 2.6 with GIF and SVG output14 sources
- Heat index 586Tencent unveils Hy4 multimodal model and announces full open-sourcing13 sources
How is heat calculated?About the methodHide
Heat counts how many independent sources covered a story in the last 48 hours: one source counts once no matter how many posts it published, decaying with a 24-hour half-life. What ranks first is what many people are talking about.
This page aggregates public feeds. Headlines and summaries are machine-organized and remain the property of the original authors; verify important facts at the source. If you believe a headline or summary infringes your rights, email the contact address in the footer with the page URL and basis of your claim, and we will remove or replace it after review.
- Surge
- Discussion rising fast
- New
- First report within 6 hours
- Rising
- Still gathering discussion

