Key facts
| Embedding call | POST /v1/embeddings with plugsky-embed or plugsky-embed-multilingual (live) |
| Generation call | OpenAI-compatible /v1/chat/completions with streaming and JSON mode (live) |
| Pipeline | Parse, chunk, embed, retrieve, map-reduce, cite |
| Models | 30+ models; draft summaries on plugsky-micro or plugsky-lite and escalate when needed |
| Long documents | Map-reduce across chunk groups; plugsky-longctx for wide synthesis |
| Pricing | Flat monthly self-serve plans with no per-token charges; see the live pricing page |
| Free tier | plugsky-micro and plugsky-lite on the free plan, no card required |
| Roadmap | Files and batch endpoints are coming soon; parse and fan out in your own pipeline today |
TL;DR
- Retrieval quality, not the summarizer, decides how useful the summary is.
- Chunk on headings and paragraphs, embed once, and reuse vectors everywhere.
- Map-reduce long documents: summarize chunk groups, then summarize the summaries.
- Require citations so every sentence traces back to a source chunk.
- Route drafting to cheap tiers and escalate only when the input is dense.
How it works, step by step
- Parse documents to text, strip navigation and boilerplate, and keep heading and page metadata.
- Chunk on semantic boundaries with a small overlap so sentences survive the split.
- Embed every chunk with the embeddings API and store vectors plus source offsets.
- Retrieve top-k chunks per section or query, deduplicate overlaps, and drop weak matches.
- Summarize each chunk group with a citation-enforcing prompt, then reduce group summaries into the final one.
- Check coverage and traceability against a rubric before the summary reaches a user.
- Track retrieval hit rate and tokens per document after every prompt or model change.
Original data
Try it yourself
Open the RAG architecture builder →
Why retrieval decides summary quality
A summarizer can only work with what it is given. If retrieval returns the wrong chunks, the summary is confidently wrong; if it returns too many, the model dilutes the important passages with noise. Treat the pipeline as retrieval first: parse cleanly, chunk on semantic boundaries such as headings and paragraph breaks, and keep source offsets so every statement can be traced back.
Chunk size is the main tuning knob. Chunks that are too small lose the context a claim depends on; chunks that are too large blur the embedding and crowd the prompt. Start with a few hundred tokens plus a modest overlap, then measure recall on questions with known answers.
Map-reduce when the document exceeds context
Long reports rarely fit in one prompt, and stuffing everything in raises cost while lowering precision. Use map-reduce: summarize each retrieved or segmented group independently, then run a reduce pass that merges the partial summaries into one. Hierarchical summarization works the same way one level deeper for very long documents.
Two rules keep map-reduce honest. First, every partial summary carries its chunk identifiers forward so the reduce step can cite sources. Second, the reduce prompt must forbid introducing facts that are absent from the partials, otherwise the final document reads well and invents detail.
Citations, evaluation and cost control
A summary without citations is a claim you cannot audit. Ask the model for a short list of claims, each mapped to chunk ids, and have your application resolve those ids to page numbers or URLs. When the evidence is missing, the correct output is a stated gap, not a guess.
- Evaluate: score coverage, faithfulness and citation accuracy on a fixed document set after every change.
- Route: cheap models handle extraction-style summarization well; escalate dense or multi-document inputs.
- Measure: log chunks retrieved, tokens in and out, and reduction passes per document to see where budget goes.
The free plan with plugsky-micro and plugsky-lite is enough to build and measure the pipeline before moving to paid tiers or the 14-day full-access trial.
Honest comparison
| Stage | RAG summarization on Plugsky | Stuffing the full document | Manual summarization |
|---|---|---|---|
| Retrieval | Top-k relevant chunks per section | Everything in one prompt | Human skimming |
| Long documents | Map-reduce across chunk groups | Truncation or lost detail | Reader fatigue |
| Citations | Chunk ids carried through both passes | Hard to trace a claim | Reviewer notes |
| Cost profile | Cheap tiers for group summaries | Scales with total document length | Headcount hours |
| Consistency | Same pipeline for every document | Varies with input length | Varies by reviewer |
| Failure mode | Wrong chunks produce wrong summaries | Context overflow and dilution | Missed sections |
Frequently asked questions
What is summarization with RAG?
It retrieves the passages relevant to a document or question and summarizes only those passages, so the output is grounded in sources instead of relying on the model's memory.
Which Plugsky models should I use?
Start with plugsky-micro or plugsky-lite for chunk-level summaries and escalate to stronger tiers for dense or multi-document inputs; all 30+ models sit behind one OpenAI-compatible endpoint.
How should I chunk documents?
On semantic boundaries such as headings and paragraph breaks, with a few hundred tokens per chunk and a small overlap. Measure retrieval recall before tuning further.
Can summaries include citations?
Yes. Ask the model to map each claim to chunk ids and resolve those ids to pages or URLs in your application; JSON mode makes the structure reliable.
How do I handle a 200-page report?
Use map-reduce: summarize segment groups, then merge the partial summaries in a reduce pass, carrying chunk ids so every claim stays traceable.
Are the embeddings endpoints live?
Yes. Embeddings, chat completions, streaming, JSON mode, function calling, RAG and agents are live; files and batch endpoints are coming soon.
How do I know the summaries are good?
Score coverage, faithfulness and citation accuracy on a fixed document set after every prompt, chunking or model change, and log retrieval hits and misses.
Can I start for free?
Yes. The free plan includes plugsky-micro and plugsky-lite with no card, and a 14-day full-access trial is available for frontier models.