{
 "schema": "aiblocks-page/1",
 "id": "agency-engineering-rag-pipeline-engineer",
 "type": "agent",
 "name": "RAG pipeline implementation planner",
 "summary": "Plan a RAG pipeline that finds the right passages in your documents: chunking, search setup and a question set to score each change.",
 "headline": "RAG pipeline implementation planner",
 "subhead": "RAG means your AI looks up passages in your own documents, then answers from them. Describe your documents and the questions people ask. It plans how to split, index and search them, and how to test each change. You get a build plan and a score sheet.",
 "job": {
  "id": "build-software",
  "name": "Build and ship software"
 },
 "level": "intermediate",
 "thinking": "high",
 "tested": true,
 "updated": "2026-11-03",
 "first_published": "2026-10-26",
 "inputs": [
  {
   "type": "question",
   "required": true,
   "label": "Question",
   "what": "the problem, decision or piece of work you want help with, and what a good outcome looks like"
  },
  {
   "type": "source_text",
   "required": false,
   "label": "Source text",
   "what": "a long source in full: an article, a video or talk transcript, or notes from a book, with its title, author and link"
  },
  {
   "type": "plan",
   "required": false,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  }
 ],
 "outputs": [
  {
   "type": "plan",
   "required": true,
   "label": "Plan",
   "what": "a dated plan: what to do, in what order, with a decision rule for each step"
  }
 ],
 "you_give": [
  "What your documents are, how many, how long, and in which languages",
  "Ten to twenty real questions people ask, with the document that holds each answer if you know",
  "Your current setup and where it fails (optional)",
  "Your stack and limits, such as database, language, hosting, speed and budget",
  "Who may see which documents (optional)"
 ],
 "you_get": [
  "An audit of your documents, and a chunking plan that fits their layout",
  "Embedding and index choices, with a way to compare two or more on your own text",
  "A search plan that mixes keyword and meaning search, with filters",
  "A rule for whether to add re-ranking",
  "A test plan with question pairs and four scores to track",
  "A one-change-at-a-time improvement loop, and what to watch after launch"
 ],
 "use_when": [
  "Your document chatbot gives wrong, vague or unrelated answers.",
  "You plan a chatbot over PDFs, help articles or contracts and don't know how to split and index them.",
  "You need to choose between search by meaning, search by keyword or both.",
  "You changed something and want proof that answers got better, not just a feeling."
 ],
 "skip_when": [
  "You want a whole AI feature, with model choice and deployment. Use the AI feature planner.",
  "You want to improve a site or product search box. Use the Search Relevance Engineer agent.",
  "Your source data is messy, duplicated or broken. Use the Data pipeline designer first."
 ],
 "output_sample": {
  "input": [
   "A description of your documents, or a sample of them",
   "Ten to twenty real questions your users ask",
   "Your stack and limits, such as database, hosting and speed",
   "Your current setup and where it fails (optional)"
  ],
  "prerequisites": [
   "An AI that can read pasted text or files, such as Claude, ChatGPT or Gemini",
   "A way to run and score a pipeline, because your chat AI can't (optional)"
  ],
  "output": [
   {
    "name": "Corpus audit",
    "contains": "Your document types, length, layout and languages, and the kinds of questions users ask."
   },
   {
    "name": "Chunking plan",
    "contains": "How to split each document type, with size, overlap and the reason."
   },
   {
    "name": "Embedding and index test",
    "contains": "Which models and index settings to compare on your own text, and how to score them."
   },
   {
    "name": "Search design",
    "contains": "The keyword and meaning mix, metadata filters, passages fetched and the duplicate rule."
   },
   {
    "name": "Re-ranking decision",
    "contains": "A rule for when to add re-ranking, based on your scores and delay limit."
   },
   {
    "name": "Eval plan",
    "contains": "How to build the question set and track four scores after each change."
   },
   {
    "name": "Monitoring",
    "contains": "What to log and the weekly check that spots drift."
   }
  ]
 },
 "output_shape": "CORPUS AUDIT\n  Documents: <types> | <count> | <length> | <languages> | <structure>\n  Questions users ask: <types of question> | <examples>\n\nMETADATA PLAN\n  <label> | <values> | <used to filter by>\n\nCHUNKING PLAN\n  <document type> | <method: fixed, by meaning or by headings> | <size and overlap> | <why>\n\nEMBEDDING AND INDEX TEST\n  <model> | <recall on your question set> | <cost or speed note>\n  Index choice: <type> | <settings> | <speed against recall>\n\nSEARCH DESIGN\n  Keyword and meaning mix: <weights> | Filters: <list> | Passages fetched: <number> | Duplicate rule: <rule>\n\nRE-RANKING DECISION\n  Baseline precision: <number> | Trial: <yes or no> | Keep only if: <gain and delay limits>\n\nEVAL PLAN\n  Question set: <size> | Scores: context precision, context recall, faithfulness, answer relevancy | <how to run>\n\nMONITORING\n  Log: <fields> | Weekly drift check: <what to compare>\n\nGAPS\n  MISSING: <what> | <why it matters>",
 "how_to_use": [
  "Download the pack and add it to your AI as a skill. Or open a new chat and paste SKILL.md, then references/source-agent.md.",
  "Describe your documents, paste your real questions and say where answers fail today. Remove private data first.",
  "Read \"Corpus audit\" and \"Chunking plan\" first. Check that the plan fits how your documents are laid out.",
  "Build the question set it asks for. Fifty pairs of a question and its right passage is the profile's starting size.",
  "Run the compare and score steps yourself with your tools. Paste the scores back and ask for the next single change. RAGAS needs a Python setup. LangSmith is a hosted service that needs an account and an API key, and it may charge. A custom script works too.",
  "Keep a change only if the scores improve and no other score drops."
 ],
 "checks": [
  "The result addresses your actual task and cites the evidence used.",
  "Examples, role-play experience and targets are kept separate from verified results.",
  "Claims of tests, memory, tool access or completed actions match what actually happened."
 ],
 "next": [
  {
   "name": "Chroma search database builder",
   "url": "https://useaiblocks.com/skills/chroma-search-database-setup",
   "why": "Build it"
  },
  {
   "name": "Data pipeline builder",
   "url": "https://useaiblocks.com/skills/data-pipeline-builder",
   "why": "Build it"
  }
 ],
 "source": {
  "by": "Michael Sitarzewski and Agency Agents contributors",
  "repo": "msitarzewski/agency-agents",
  "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/engineering/engineering-rag-pipeline-engineer.md",
  "licence": "MIT",
  "original_name": "RAG Pipeline Engineer",
  "commit": "b37b5bb33b78f2c1d6567d98e25ca818e3259219"
 },
 "credits": [
  {
   "title": "RAG Pipeline Engineer",
   "by": "Michael Sitarzewski and Agency Agents contributors",
   "url": "https://github.com/msitarzewski/agency-agents/blob/b37b5bb33b78f2c1d6567d98e25ca818e3259219/engineering/engineering-rag-pipeline-engineer.md",
   "used": "Original agent profile, preserved in references/source-agent.md; AI Blocks adds setup and review instructions."
  },
  {
   "title": "AI Blocks catalogue guidance",
   "by": "AI Blocks",
   "url": "https://useaiblocks.com",
   "used": "We added Before you start and After this sections that link to other AI Blocks steps. We refreshed those generated sections from the catalogue inputs and next-step links."
  }
 ],
 "files": [
  "LICENSE",
  "references/source-agent.md",
  "SETUP.md",
  "source.json"
 ],
 "links": {
  "page": "https://useaiblocks.com/agents/agency-engineering-rag-pipeline-engineer",
  "markdown": "https://useaiblocks.com/agents/agency-engineering-rag-pipeline-engineer.md",
  "json": "https://useaiblocks.com/agents/agency-engineering-rag-pipeline-engineer.json",
  "instructions": "https://useaiblocks.com/skills/agency-engineering-rag-pipeline-engineer/SKILL.md",
  "download": "https://useaiblocks.com/skills/agency-engineering-rag-pipeline-engineer.zip",
  "api_item": "https://useaiblocks.com/api/v1/items/agency-engineering-rag-pipeline-engineer",
  "api_document": "https://useaiblocks.com/api/v1/documents/agent/agency-engineering-rag-pipeline-engineer",
  "mcp": "https://useaiblocks.com/mcp"
 }
}
