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.
npx agentmods add agents/svishniakov/agent-flow/rag-retrieval-engineergit clone --depth 1 https://github.com/svishniakov/agent-flowWrote 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.
[](https://agentmods.dev/agents/svishniakov/agent-flow/rag-retrieval-engineer)<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>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.
| Model | Per session | Once 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 |
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.
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_contextfacets, and reportArchitecture Compliancewithmatrix_facets; then run Engineering Simplicity with all seven checks; fix now if fixable. Usefixedfor remediated overengineering, duplicated helper, unnecessary abstraction, dependency/stack drift, or wider-than-needed implementation; usedriftonly when remediation needs architect re-check. Record Lane Boundary Evidence Gate withboundary.allowed_paths, optionalboundary.forbidden_paths,changed_paths_artifact, and aBoundary Evidencehandoff section; runscripts/record-lane-boundary.pywhen a traceable run needs changed-path proof. - When Architecture Context Propagation applies, include selected
matrix_facetsin both lane-maparchitecture_complianceand 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.
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.
- yesterday Changed · -12 lines a8b1b714b7fb
- 5d ago First seen · 75 lines · 42 tokens per session scan A 2c1ad7b0a06b
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.
Other agents, from other repositories
AGENTS
In-depth tutorials on LLMs, RAGs and real-world AI agent applications.
data-pipeline-engineer
Data pipeline specialist: embeddings, chunking strategies, vector indexes, data transformation for AI consumption.
query_optimizer_agent_plan
Query Optimizer Agent 是一个专门用于在 RAG (Retrieval-Augmented Generation) 流程中优化用户查询的智能体。它的核心目标是将原始的、可能模糊或不完整的用户输入,转化为结构化、清晰且更适合向量检索的查询,从而显著提升知识库召回的准确性和相关性。.
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…
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.
FAI LangChain Expert
LangChain framework specialist — LCEL expression language, chains, agents with tool use, retrievers, memory, callbacks, LangSmith tracing, and production RAG pipeline patterns.