nomadamas/autorag-research · Archived

create-generation-plugin

Guide developers through creating a custom generation pipeline plugin for AutoRAG-Research. Walks through scaffolding, implementing BaseGenerationPipeline methods, composing with retrieval pipelines, writing YAML configs, testing, and installing. Use when building a new RAG generation strategy (e.g., chain-of-thought RAG, multi-hop RAG).

First seen Jun 20, 2026

Installation

$ npx skills add nomadamas/autorag-research --skill create-generation-plugin

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from nomadamas/autorag-research.

npx skills add nomadamas/autorag-research

Browse all from nomadamas/autorag-research

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 141
License LICENSE
Default branch main
Open issues 29
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash, Read, Write, Edit

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,508 B
  • docs SUMMARY.md 371 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Create Generation Plugin

Workflow

1. Scaffold

autorag-research plugin create my_rag --type=generation

Read the generated pipeline.py, pyproject.toml, YAML config, and test file to understand the structure.

2. Implement

For the shared pipeline implementation and testing rules, read:

  • aiinstructions/pipelineimplementer.md
  • aiinstructions/pipelinetest_writer.md
  • aiinstructions/pipelinearchitecture_mapper.md

Implement the generate(queryid, top_k) method. This is where your RAG strategy lives.

Available attributes inside the pipeline:

  • self.llm — LangChain BaseLanguageModel (use await self.llm.ainvoke(prompt))
  • self.retrievalpipeline — composed retrieval pipeline (use await self.retrievalpipeline.retrievebyid(queryid, top_k))
  • self.service — GenerationPipelineService (use self.service.getchunkcontents(chunkids), self.getquerytext(query_id))

Must return a GenerationResult(text=...) (from autoragresearch.orm.service.generationpipeline).

DO NOT add your own asyncio.gather, asyncio.Semaphore, or any concurrency control.
The base pipeline's run() already handles parallel execution of all queries via
runwithconcurrencylimit() (semaphore + gather), controlled by the maxconcurrency
config parameter. Your _generate method is called once per single query — just implement
the retrieve-and-generate logic for that one query.

Custom parameters: Add fields to your config class and pass them via getpipelinekwargs() → accept them in the pipeline constructor.

Inherited config fields (from BaseGenerationPipelineConfig):

  • llm — LLM model string (auto-converted to LangChain model instance)
  • retrievalpipelinename — name of the retrieval pipeline to compose with (Executor injects it)

3. Write tests and install

Use langchaincore.languagemodels.FakeListLLM to mock the LLM in tests.

cd my_rag_plugin
pip install -e .   # or: uv pip install -e .
cd .. && autorag-research plugin sync

Verify: ls configs/pipelines/generation/my_rag.yaml

Key Files

Purpose Path
Base config class autorag_research/config.py → BaseGenerationPipelineConfig
Base pipeline class autorag_research/pipelines/generation/base.py → BaseGenerationPipeline
Service + GenerationResult autoragresearch/orm/service/generationpipeline.py
Plugin entry point discovery autoragresearch/pluginregistry.py

Examples

Study these existing implementations for patterns:

  • autoragresearch/pipelines/generation/basicrag.py — Simple retrieve-then-generate (start here)
  • autorag_research/pipelines/generation/ircot.py — Interleaving retrieval with chain-of-thought
  • autorag_research/pipelines/generation/et2rag.py — Entity-aware RAG
  • autoragresearch/pipelines/generation/mainrag.py — Main RAG pipeline
  • YAML configs: configs/pipelines/generation/basic_rag.yaml, configs/pipelines/generation/ircot.yaml