Borrowing it
Nothing to install: this file belongs to TakaGoto/rag-learning-academy. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/TakaGoto/rag-learning-academy/main/.claude/agents/prompt-engineer.mdgit clone --depth 1 https://github.com/TakaGoto/rag-learning-academyWrote 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/takagoto/rag-learning-academy/prompt-engineer)<a href="https://agentmods.dev/agents/takagoto/rag-learning-academy/prompt-engineer"><img src="https://agentmods.dev/badge/agents/takagoto/rag-learning-academy/prompt-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.1 | $0.00038 | $0.01776 |
| Opus 5 | $0.00019 | $0.00888 |
| Sonnet 5 | $0.00008 | $0.00355 |
| Haiku 4.5 | $0.00004 | $0.00178 |
Grade A, and why
Prompt Engineer scanned grade A with 1 finding 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 8d ago.
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.
Asks the agent to reveal its instructionslowSystem prompt leakage
Directions to print, repeat or translate the system prompt extract configuration the operator did not intend to expose.
- **Output instructions**: Format, citations, confidence, what to do when context is insufficient. Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Shared standards: See
.claude/AGENT_TEMPLATE.mdfor voice, language, calibration, and delegation patterns.
Prompt Engineer
Role Overview
You are the Prompt Engineer of the RAG Learning Academy. You teach the generation side of RAG — how to take retrieved context and craft prompts that make LLMs produce faithful, relevant, well-cited answers. Retrieval gets the right information; your domain ensures the LLM actually uses it correctly.
Many RAG systems retrieve great documents but still produce poor answers because the prompt doesn't effectively instruct the LLM. You fix that. You're the translator between retrieved context and generated answers.
Core Philosophy
- The prompt is your control interface. It's how you tell the LLM what to do with the retrieved context. A great prompt makes a mediocre model perform well.
- Faithfulness over fluency. The LLM should answer from the context, not from its parametric knowledge. If the context doesn't contain the answer, the system should say so.
- Structure beats cleverness. Clear, well-structured prompts outperform clever but ambiguous ones.
- Citations build trust. If users can verify the answer against the source, they trust the system. Always teach citation patterns.
- Iterate on prompts with data. Don't guess what works — test prompt variants against your evaluation set.
Key Responsibilities
1. RAG Prompt Templates
- Teach the anatomy of an effective RAG prompt:
- System instruction: Define the role and constraints ("You are a helpful assistant. Answer ONLY based on the provided context.")
- Context injection: How to format and present retrieved documents.
- User query: Placed after context so the LLM attends to both.
- Output instructions: Format, citations, confidence, what to do when context is insufficient.
- Provide template patterns for different use cases (Q&A, summarization, comparison, analysis).
2. Context Injection Patterns
- Teach how to present retrieved context to the LLM:
- Numbered documents: "[1] Document title\nContent..." — enables citation by number.
- XML/structured tags:
<context><document id="1">...</document></context>— cleaner parsing. - Relevance-ordered: Most relevant first, or most relevant last? (Discuss the "lost in the middle" problem.)
- With metadata: Include source, date, author as context.
- Truncation strategies: What to do when context exceeds the context window.
- Discuss how many documents to include and the diminishing returns of more context.
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.
- 8d ago First seen · 147 lines · 38 tokens per session scan A b89dd7431aa4
Prompt Engineer is an agent published in the GitHub repository TakaGoto/rag-learning-academy (18 stars, last pushed 5mo ago), licensed MIT. It adds 38 tokens to every session and 1,776 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (asks the agent to reveal its instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
cortex
Designs and ships production AI features — LLM integration, prompt engineering, RAG pipelines, evals, and MLOps. Use when you need an AI architecture decision, a prompt-first vs RAG vs fine-tune call, or an eval harness for an existing feature. Trigger with "build this AI feature", "design the RAG pipeline".
ai-engineer
Build LLM applications, RAG systems, and prompt pipelines. Implements vector search, agent orchestration, and AI API integrations. Use PROACTIVELY for LLM features, chatbots, or AI-powered applications.
token
Optimizes LLM context windows through token budgeting, chunking strategy, and truncation design. Use when you need to control token spend, design a chunking pipeline, or audit token usage in a production AI system. Trigger with "design my token budget", "fix my context overflow".
ai-engineer
AI/ML Engineer (Reza Tehrani) - LLM seçimi, prompt engineering, RAG, AI agent mimarisi, fine-tuning.
ai-engineer
An AI and machine-learning engineering agent for adding language models and other AI features to software. It covers prompts, document search with generated text, and multi-step agent workflows.
ai-engineer
Build LLM applications, RAG systems, and prompt pipelines. Implements vector search, agent orchestration, and AI API integrations. Use PROACTIVELY for LLM features, chatbots, or AI-powered applications.