From One Prompt to a Finished Doc: A Four-Stage AI Pipeline
A hands-on walkthrough of Pipeline mode: Draft, Critique, Revise, Polish, with a model assignment for every stage.
TL;DR
An AI document drafting pipeline chains models in sequence: one drafts, a second critiques, a third revises, a fourth polishes. In aiDex's Pipeline mode you set the four stages once, send one prompt, and get a shippable document with a built-in editing pass. This walkthrough shows the setup, the model picks, and what each stage changes.
What is an AI document drafting pipeline?
An AI document drafting pipeline is a chain of models where each one handles a single stage of the writing process and passes its output to the next. Instead of asking one model to write, edit, and proofread in a single shot, you split the work into four stages: Draft, Critique, Revise, Polish. Each model gets one narrow job, and the document improves at every handoff.
The separation matters because a model reviewing someone else's draft behaves differently from a model defending its own. When the critic comes from a different vendor than the drafter, it brings different training data and different blind spots, so it flags problems the first model cannot see. This is the same principle behind multi-model workflows in general: disagreement between models is information.
aiDex runs this pattern as a native mode called Pipeline. You define the stages once, send one prompt, and the models hand the work down the line automatically. If you want the concept first, read the Pipeline mode explainer; this post is the hands-on build.
How do I set up a four-stage pipeline in aiDex?
Open aiDex, start a new conversation, and switch the mode to Pipeline. The setup takes about two minutes:
- Create four stages and name them Draft, Critique, Revise, Polish.
- Assign one model per stage from the Dex, the model catalog. You can mix providers freely, and local Ollama models can fill any slot.
- Give each stage a short instruction. For example: Draft writes the full first version. Critique lists concrete problems without rewriting. Revise applies the critique. Polish fixes tone, grammar, and formatting only.
- Send your prompt. Each stage receives the previous stage's output along with your original request, so nothing gets lost in the handoffs.
Use your own provider keys or the ones we manage, and pick the models you want.
Which model belongs at each stage?
Pick by role, not by leaderboard position. These are the decision criteria that matter:
| Stage | What the stage needs | Sensible assignment |
|---|---|---|
| Draft | Strong long-form writing and structure | GPT-5.4 or Claude Opus 4.8 |
| Critique | A different vendor than the drafter, and a critical eye | Claude Opus 4.8 if GPT-5.4 drafted (or the reverse) |
| Revise | Enough context window to hold the draft plus the critique | Gemini 3.1 Pro for long documents |
| Polish | Speed and low cost, since the heavy lifting is done | DeepSeek V3.2 or a local Ollama model |
The one rule worth treating as fixed: the Critique stage should never use the same model as Draft. A model is a gentle judge of its own writing.
What does each stage actually change?
Take a concrete prompt: "Write a one-page internal brief proposing a customer feedback portal, for a leadership audience."
Draft produces the complete first version: structure, arguments, a recommendation. It is usually most of the way right and reads fine, which is exactly why single-shot drafts are dangerous. The remaining problems hide in plausible-sounding gaps.
Critique does not rewrite. Its instruction is to list problems: a missing cost estimate, a benefit stated twice, a leadership audience being told implementation details it does not need. Written as a numbered list, the critique becomes a checklist for the next stage.
Revise applies the checklist to the draft. Because it sees both the original prompt and the critique, it can cut, restructure, and fill gaps without drifting away from the request.
Polish touches nothing structural. It tightens sentences, normalizes headings and formatting, and reads the document once as a final proofreader.
You watch every handoff in the chat, so if the Critique stage flags something you disagree with, you can edit the instruction and rerun from that point instead of starting over. Drop a DOCX, PDF, MD, or txt file into the conversation and every stage can read it as source material, which is how document review with an AI team works too.
How much does a pipeline cost compared to one chat?
A four-stage pipeline makes four model calls instead of one, so a run costs roughly what four separate messages to those models would cost. aiDex shows the per-message cost next to each stage's output and lets you set spending limits, so the total is visible while the pipeline runs, not after. Putting an economical model on Polish, or a local Ollama model on any stage (local inference is free, see Ollama), keeps runs cheap.
When should I use a pipeline instead of a single chat?
Use Pipeline when the output is a deliverable: a brief, a proposal, a blog post, documentation, anything a colleague will read. The stages buy you a built-in editing pass that a single chat cannot replicate. Content writers who ship daily get the most from this, which is why the content writers guide builds on the same pattern.
Stay with a single model for quick questions and short answers, and use Compare or Judge when you need parallel opinions on the same question rather than sequential improvement of one artifact. The mode guide maps all five modes to use cases.
Ready to try it? Open aiDex, switch to Pipeline, and send the prompt you were about to write a document from today. Four stages later you will have something you can actually ship.
The aiDex Team · Multi-model AI platform
aiDex is a multi-model AI platform that lets you query several AI models at once, compare their answers, run consensus picks, and chain models in pipelines or open team chats. Use your own provider keys or the ones we manage, and pick the models you want.
Frequently asked questions
What is Pipeline mode in aiDex?
Pipeline mode chains several AI models in sequence, so each model's output becomes the next model's input. You define stages such as Draft, Critique, Revise, and Polish, assign a model to each, and one prompt runs the whole chain.
Can I mix AI providers in one pipeline?
Yes. Each stage can use a different provider: OpenAI, Anthropic, Google, DeepSeek, or a local Ollama model. Mixing vendors is recommended, because a critic from a different vendor catches problems the drafting model misses.
Do I need my own API keys to run a pipeline?
No. Use your own provider keys or the ones we manage, and pick the models you want. Local Ollama models need no key at all.
How many stages should a document pipeline have?
Four stages cover most documents: Draft, Critique, Revise, Polish. Add a fact-check stage for research-heavy pieces, or drop Polish for internal notes. More than five stages rarely improves the result and slows the run.
Can the pipeline work from my existing files?
Yes. Drop DOCX, PDF, MD, or txt files into the conversation and every stage reads them as source material, so the pipeline can revise an existing document instead of starting from scratch.
Keep reading
How to Build an AI Pipeline: Draft, Critique, Revise
Chain models into Draft, Critique, and Revise stages so each pass improves the last instead of starting over.
When to Use Each aiDex Mode: Solo, Compare, Judge, Pipeline, Team
The decision tree behind picking the right mode for the work in front of you.
How to Review a Document with an AI Team
Upload a file, let a panel of models read it together, and turn their flagged issues into an accepted set of edits.
aiDex for Content Writers: Drafting With a Three-Model Team
One AI drafts, a second critiques, a third polishes: a practical setup for working writers.