forge-rag

Design retrieval-augmented generation pipelines with hybrid retrieval, reranking, citations, and refusal behavior.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/f4rkh4d/forge-skill --skill forge-rag
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: forge-rag
Source: https://github.com/f4rkh4d/forge-skill/tree/main/skills/llm/forge-rag
Command: npx skills add https://github.com/f4rkh4d/forge-skill --skill forge-rag

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents RAG systems from hallucinating and returning unverifiable answers by enforcing retrieval quality, chunking structure, citation discipline, and refusal behavior.

Core Features & Use Cases

  • Semantic chunking with hierarchy: Chunks by meaningful units and preserves document structure so the model can answer with the right context.
  • Hybrid retrieval with reranking: Combines BM25 and dense retrieval, then uses cross-encoder reranking to select the most relevant passages.
  • Citation and refusal guardrails: Requires inline citations to retrieved chunks and includes a low-confidence refusal path to avoid fabrication.
  • Freshness and evaluation-first iteration: Supports version-aware retrieval, scheduled indexing, and an eval set that covers both answerable and refusal cases.

Quick Start

Ask your AI to redesign your RAG pipeline to use semantic hierarchical chunking, hybrid BM25+dense retrieval with reranking, and a generation prompt that requires inline citations to verified retrieved chunks or returns a refusal when no good passages are found.

Frequently Asked Questions about forge-rag

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop my retrieval-augmented generation pipeline from hallucinating?

To stop retrieval-augmented generation hallucinations, enforce low-confidence refusal paths and require inline citations to verified retrieved chunks so the model avoids fabrication when passage relevance is insufficient.

What is the best way to combine BM25 and dense retrieval for RAG?

The best way to combine BM25 and dense retrieval for RAG is using reciprocal rank fusion to merge results, followed by cross-encoder reranking to select the most relevant passages for generation.

How does semantic hierarchical chunking improve retrieval accuracy?

Semantic hierarchical chunking improves retrieval accuracy by chunking documents into meaningful units with overlap to preserve document structure, ensuring the model answers with properly contextualized information.

How do I evaluate a RAG system for both answers and refusals?

Evaluate a RAG system using an eval-driven regression testing set that includes both answerable queries and refusal cases, ensuring the pipeline maintains citation discipline and retrieval quality across updates.

Why does my RAG system return answers when no relevant passages are found?

A RAG system returns answers without relevant passages due to missing low-confidence refusal guardrails; implementing verified citations and generation limits forces the model to refuse rather than fabricate.

Does scheduled indexing work with version-aware retrieval for updating knowledge bases?

Scheduled indexing works with version-aware retrieval to maintain knowledge base freshness, automatically updating document chunks while preserving retrieval quality and citation discipline across versions.