Build a RAG System with AI · Execution Map
Define & Scope
Clarify what you're building and for whom.
Design
Design the right solution before building.
Build & Refine
Build, test, secure, and make it production-ready.
Step 1 of 5
Understand the source corpus
A clear picture of what's in the corpus you'll index.
Phase
Define & Scope
Everything you need for this step
Download full path PDF
Workflow
AI Long Document Analysis Workflow
Get AI to actually read a document that's too big for one prompt — fit it to the model, split it cleanly, package the parts, and analyze them without losing the thread.
Resource
Plan Large Document Analysis — When It Will Not Fit
A book-length document against a 200K window: the estimate exceeds the budget at both ends of the range. The plan starts from Will Not Fit, not from hope.
Tool
Long Input Formatter
Package source material with delimiters, citable section labels, and grounding rules — material and instructions stay separate.
Step 2 of 5
Chunk and ground the documents
Chunked, grounded documents that hold meaning in retrieval.
Phase
Design
Everything you need for this step
Download full path PDF
Workflow
AI RAG Context Workflow
Prepare documents for a RAG system so retrieved answers stay accurate — budget the chunk size to the model, ground the sources against drift, and split them on clean boundaries for retrieval.
Resource
Context Window Planning for RAG — Budget the Retrieved Docs
RAG context is a budget with line items: retrieved documents, the question, and the answer all share one window. Plan how many chunks actually fit.
Tool
Context Window Estimator
Will this fit the model's context window? Token budget planning, range-honest fit verdicts, and model comparison.
Step 3 of 5
Extract the retrieval metadata
Structured metadata extracted to make retrieval filterable.
Phase
Build & Refine
Everything you need for this step
Download full path PDF
Workflow
AI Data Extraction Workflow
Turn messy text into structured data you can trust enough to feed another system — bound the source, extract the fields, force clean JSON, and validate before it flows downstream.
Resource
Extract Data From Text with AI
Free text in, named fields out. The extraction prompt pattern that turns any unstructured text into consistent, parseable records.
Tool
Extraction Prompt Generator
Build prompts that extract defined fields from unstructured text — emails, invoices, tickets, résumés.
Step 4 of 5
Classify and organize the content
Documents classified so retrieval searches the right subset.
Phase
Build & Refine
Everything you need for this step
Download full path PDF
Workflow
AI Classification Workflow
Build a text classification step you can automate on — pull out the unit to classify, assign a label from a fixed set, and validate the label is one you actually allow.
Resource
Text Classification Prompt — the Anatomy
The blocks a reliable classification prompt needs: defined labels, classification rules, edge-case rules, an ambiguity policy, and a confidence contract.
Tool
Data Classification Prompt
Build classification prompts that assign labels from a closed set — with label definitions and edge-case rules.
Step 5 of 5
Evaluate retrieval quality
Retrieval tested for accuracy and grounding, with a regression guard.
Phase
Build & Refine
Everything you need for this step
Download full path PDF
Workflow
AI Agent Evaluation Workflow
Find out whether an AI agent behaves before users do — define what correct means, build test scenarios with expected outputs, catch failures and hallucinations, then regression-test each version.
Resource
Hallucination Detection Prompt
Catch the confident invention — check an AI output's claims against its source and flag every statement that isn't supported, with the unsupported span quoted.
Tool
Test Case Prompt Generator
Build test generation prompts — unit, integration, or E2E — with framework modes and edge-case coverage rules.