Key facts
| Pipeline | Clause-level chunking → embeddings → cited answers |
| Embeddings | plugsky-embed and plugsky-embed-multilingual via /v1/embeddings (live) |
| Generation | Cited answers with JSON mode on /v1/chat/completions (live) |
| Metadata | Matter, counterparty, version and clause number per chunk |
| Models | 30+ models, including plugsky-longctx for long agreements |
| Access | Matter-level filters applied before retrieval |
| Residency | Region-locked planes, VPC, on-prem and air-gapped options |
| Free tier | plugsky-micro and plugsky-lite on the free plan, no card required |
TL;DR
- Chunk by clause so every retrieved passage maps to an identifiable provision.
- Cite clause numbers, not page numbers, so citations survive renegotiation drafts.
- Filter retrieval by matter before ranking to preserve confidentiality walls.
- Keep version and execution date metadata so superseded drafts do not win.
- Have lawyers verify answers; the assistant prepares, it does not opine.
How it works, step by step
- Assemble the corpus for one practice area — executed agreements, templates, memos and policies — with matter and version metadata.
- Chunk by clause and section, numbering each chunk and keeping headings, definitions and execution dates.
- Embed chunks with plugsky-embed, or plugsky-embed-multilingual for cross-border matters in multiple languages.
- Build retrieval that resolves the lawyer's matters and applies matter and version filters before ranking.
- Generate answers constrained to retrieved clauses, requiring citations to clause numbers and document names.
- Return structured output with answer, cited provisions and a note when documents conflict or are silent.
- Run a closed-matter evaluation and review flagged conflicts with the practice group before rollout.
Original data
Try it yourself
Grounded legal retrieval
Legal work depends on the exact words of a provision, so retrieval must return identifiable text rather than vague similarity. RAG fits because the unit of value is the clause: retrieval finds it, generation explains it, and the citation lets a lawyer verify it in seconds. Coverage and citations beat fluency every time.
The model layer is live on Plugsky: /v1/embeddings for indexing and /v1/chat/completions for answers with JSON mode. Documents, matter walls and retention stay in your document management and security systems, which is where privilege requires them.
Chunking contracts and case files
Contracts have structure that generic splitters destroy: definitions, numbered clauses, schedules and signature blocks. Chunk along those boundaries and keep identifiers in metadata so citations are stable across drafts.
- Clauses and schedules: one chunk per clause or schedule item, carrying the clause number.
- Definitions: attach defined terms to the clauses that use them, or index a definitions block the answer can cite.
- Versions: store version and execution date, and apply the current version by default.
- Cross-references: preserve internal references as text so the answer can follow them.
Privilege, retention and evaluation
Confidentiality shapes the pipeline. Matter filters must be enforced in your retrieval service before ranking, keys should be scoped per team, and prompts should carry only the passages the task needs. Where policy requires, deployment moves to a region-locked plane or fully on-prem, and retention for logs and embeddings follows matter policy rather than platform defaults.
Evaluate on closed matters with known outcomes: does retrieval surface the governing clause, does the citation point to the right provision, and does the assistant refuse when the corpus lacks an answer. Conflicts between documents should be surfaced, not resolved silently. Track reviewer edit rates to see where retrieval or chunking needs refinement, and re-index on every contract version.
Honest comparison
| Capability | Plugsky RAG | Keyword contract search | Model with no retrieval |
|---|---|---|---|
| Answer basis | Retrieved clauses with citations | Ranked documents | Model memory |
| Citation precision | Clause and document level | Document level | None |
| Confidentiality | Matter filters before retrieval | Index ACLs | Vendor-controlled |
| Version handling | Execution date and draft version metadata | Manual | Training cutoff |
| Residency | Region-locked planes, VPC, on-prem, air-gapped | Your systems | Vendor-controlled |
Frequently asked questions
Can the assistant tell us whether a clause is enforceable?
It can retrieve and summarise the clause and related provisions, but enforceability is a legal judgement for a qualified lawyer. Keep answers descriptive and cite the source text.
How do you cite precisely?
Chunk by clause with the clause number and document name in metadata, and require citations in that form. Clause-level citations stay valid while a matter is still being redrafted.
Which embedding model fits cross-border work?
plugsky-embed works for English-language matters; plugsky-embed-multilingual handles mixed-language files where questions and documents differ in language.
How do matter walls work?
Your retrieval service resolves the lawyer's matters and filters before ranking. Never let model output or supplied parameters change which matter is queried.
Can documents stay on-prem?
Yes. Plugsky supports region-locked cloud planes plus VPC, on-prem and air-gapped deployment, so privileged files can remain inside the firm's environment.
What about superseded drafts?
Store version and execution date on every chunk and prefer the current version by default. Historical versions remain retrievable for comparison when requested.
How do we measure quality?
Use closed matters with known answers and score clause retrieval, citation accuracy and refusal behaviour, plus how often reviewers edit the draft materially.