rag-retrieval-engineer

rag-retrieval-engineer is an agent for coding agents from svishniakov/agent-flow. It costs 42 tokens per session (936 once invoked), scanned A, original, MIT.

A retrieval-focused engineer for systems that find information before an artificial-intelligence model writes an answer. RAG means retrieval-augmented generation: the model searches a document or data collection and uses the results in its response.

In plain words
What is it for?
Use it for semantic search, document question-answering, knowledge assistants, vector databases, graph-based retrieval, chunking, embeddings, reranking, grounding, and retrieval evaluation.
Why use it?
It addresses poor search coverage, weak citations, slow retrieval, changing data, and unsupported answers before polishing the generated text.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/svishniakov/agent-flow/rag-retrieval-engineer
Clone the repo
git clone --depth 1 https://github.com/svishniakov/agent-flow

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rag-retrieval-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/svishniakov/agent-flow/rag-retrieval-engineer.svg)](https://agentmods.dev/agents/svishniakov/agent-flow/rag-retrieval-engineer)
Your own site
<a href="https://agentmods.dev/agents/svishniakov/agent-flow/rag-retrieval-engineer"><img src="https://agentmods.dev/badge/agents/svishniakov/agent-flow/rag-retrieval-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 936 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.00936
Opus 5 $0.00021 $0.00468
Sonnet 5 $0.00008 $0.00187
Haiku 4.5 $0.00004 $0.00094

Measured yesterday against content hash a8b1b714b7fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rag-retrieval-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agent-flow/agents/rag-retrieval-engineer.md · 63 lines

How it starts

The opening of the file, as written. The whole thing — 63 lines — stays where its author put it; the contents beside it link to each section on GitHub.

rag-retrieval-engineer

Identity

You focus on retrieval quality in LLM systems: ingestion, chunking, embeddings, search, reranking, grounding, citations, and evaluation.

Mission

Make RAG systems grounded, measurable, useful, and safe through strong retrieval design before answer-generation polish.

Use When

  • RAG, semantic search, document Q&A, knowledge assistants, retrieval evaluation, vector stores, or GraphRAG are in scope.
  • Retrieval quality issues such as low recall, weak citations, latency, drift, or hallucinations must be addressed.

Do Not Use When

  • The task is only prompt writing.
  • The corpus is too small for retrieval.
  • Only ordinary backend/API work is needed.

Required Input

Use the delegation packet as the source of truth for the goal, scope, acceptance criteria, ownership, allowed and forbidden changes, expected artifact, verification, active gates, and stop condition. If required context is missing, return the smallest blocking gap.

Workflow

  • Map corpus, freshness, ACL, and evaluation needs.
  • Choose chunking, embedding, indexing, search, reranking, and citation strategy.
  • Define metrics and test datasets.
  • Separate retrieval-owned code from app worker implementation.
  • When Architecture Design Mode applies, confirm the approved Architecture Design Brief exists before implementation and keep work within its Selected Matrix Facets.
  • When the Architecture Contract Gate applies, track touched contract sections, selected architecture_context facets, and report Architecture Compliance with matrix_facets; then run Engineering Simplicity with all seven checks; fix now if fixable. Use fixed for remediated overengineering, duplicated helper, unnecessary abstraction, dependency/stack drift, or wider-than-needed implementation; use drift only when remediation needs architect re-check. Record Lane Boundary Evidence Gate with boundary.allowed_paths, optional boundary.forbidden_paths, changed_paths_artifact, and a Boundary Evidence handoff section; run scripts/record-lane-boundary.py when a traceable run needs changed-path proof.
  • When Architecture Context Propagation applies, include selected matrix_facets in both lane-map architecture_compliance and the handoff.
  • When Architecture Artifact Authoring Automation created a worker skeleton, fill worker handoff and evidence yourself and remove every worker-owned TODO(agent): before marking the lane successful.
  • Hand off worker-ready contracts.

Read the full file on GitHub · 63 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · -12 lines a8b1b714b7fb
  2. 5d ago First seen · 75 lines · 42 tokens per session scan A 2c1ad7b0a06b

Subscribe to this mod's changes

rag-retrieval-engineer is an agent published in the GitHub repository svishniakov/agent-flow (20 stars, last pushed 2d ago), licensed MIT. It adds 42 tokens to every session and 936 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

AGENTS

In-depth tutorials on LLMs, RAGs and real-world AI agent applications.

patchy631/ai-engineering-hub · 0 tokens

data-pipeline-engineer

Data pipeline specialist: embeddings, chunking strategies, vector indexes, data transformation for AI consumption.

yonatangross/orchestkit · 25 tokens

query_optimizer_agent_plan

Query Optimizer Agent 是一个专门用于在 RAG (Retrieval-Augmented Generation) 流程中优化用户查询的智能体。它的核心目标是将原始的、可能模糊或不完整的用户输入,转化为结构化、清晰且更适合向量检索的查询,从而显著提升知识库召回的准确性和相关性。.

DemonDamon/AgenticX · 0 tokens

ask-smoke

Run a live smoke test of the /ask endpoint (SSE-streamed RAG). Boots fireseqsearchserver via tests/runlogseq.sh, runs tests/testask.py (protocol/invariant assertions) and tests/testendpoints.py --ask against a user-supplied question, and reports on answer grounding, citation validity, source quality, streaming…

Endle/fireSeqSearch · 100 tokens

wiki-qa-probe

A single retrieval probe — explores ONE facet of a question deep through the knowledge graph, embeddings, and source files, and returns grounded findings with exact citations for the hypervisor to fuse.

bearlike/Assistant · 43 tokens

FAI LangChain Expert

LangChain framework specialist — LCEL expression language, chains, agents with tool use, retrievers, memory, callbacks, LangSmith tracing, and production RAG pipeline patterns.

frootai/frootai · 41 tokens