Short answer. Put the matter data boundary first, then build retrieval over approved precedent and clause libraries. Use an OpenAI-compatible chat call that answers only from retrieved passages, cites each passage and refuses when nothing supports an answer. Use JSON mode for clause extraction so a schema can validate the output. Keep a qualified lawyer responsible for every draft, and log what the model saw. This page is informational, not legal advice.
Key facts
| Item | What is true on 20 November 2026 |
|---|---|
| API surface | OpenAI-compatible POST https://api.plugsky.com/v1/chat/completions with streaming and JSON mode. |
| Data grounding | Embeddings and RAG are live for clause and precedent retrieval. The embedding family serves an 8,192-token context and returns 2,048-dimension vectors. |
| Long context | Main text models serve 262,144 tokens for whole-contract reasoning; mistral-medium serves 131,072. |
| Deployment | Plugsky cloud in Frankfurt, UAE, Singapore or Virginia; private VPC or dedicated endpoint; on-premises; air-gapped. Private modes are contract-led. |
| Access control | Scoped API keys and usage analytics; enterprise SSO and RBAC options. |
| Auditability | Request, retrieval and response logging for review trails. |
| Trust evidence | SOC 2 alignment; no certification is claimed. Confirm scope and any exceptions during vendor review. A DPA with EU SCCs is available on paid plans. |
| Pricing model | Flat monthly self-serve plans with no per-token billing on self-serve; annual billing is 20% off. |
| Free tier | Free plan: $0, no card, two API keys, plugsky-micro and plugsky-lite. New accounts receive 100 requests and 50,000 tokens per day. |
TL;DR
- Keep matter data inside your boundary with private deployment options.
- Retrieve clauses and precedent with embeddings so answers cite real sources.
- Use long-context models for whole-contract review and JSON mode for extraction.
- Log retrieval and responses to create a review trail.
- Never treat model output as legal advice without qualified human review.
- Write the data map before the prompt; it decides which deployment is eligible.
How it works, step by step
- Agree with risk and compliance which data classes may reach which deployment mode.
- Choose the target environment: cloud for public law, VPC or on-premises for client matters, air-gapped for the most restricted.
- Build a precedent library with clean metadata: jurisdiction, matter type, date and outcome.
- Embed and index the library, then test clause retrieval against real review questions.
- Design extraction schemas in JSON mode for clauses, dates, parties and obligations.
- Require citations in every answer and route drafted output to a qualified reviewer.
- Track correction rates and update the library as new precedent is approved.
Try it yourself
Use the RAG architecture builder to map ingestion, retrieval, generation and review before you select a deployment. It produces an architecture sketch, not a legal or security opinion.
High-value legal workflows
Legal work rewards retrieval and structure more than open-ended generation:
- Contract review: find non-standard clauses, missing terms and deviations from your playbook.
- Clause extraction: return parties, dates, obligations and termination rights in a fixed schema.
- Matter and precedent search: answer questions from prior work product with citations.
- First drafts: assemble a starting point from approved templates for lawyer editing.
Each workflow keeps a qualified person in control of the final position. The useful distinction is between work that produces a candidate answer for a lawyer to check and work that produces a legal conclusion. The first is a research aid. The second is the practice of law, and it stays with the lawyer.
RAG over precedent with citations
Index approved work product with metadata that matters to lawyers: jurisdiction, practice area, counterparty type and date. Use multilingual embeddings if the practice spans languages, and keep the vector store inside the same boundary as the documents.
Require the model to answer only from retrieved passages and to name them. When nothing relevant is found, the assistant should say so rather than generate a plausible clause from memory. A clean refusal is more useful than a confident fabrication, and it is easier to defend in a review.
Metadata is the part teams underestimate. A precedent library without a jurisdiction field will retrieve the wrong clause across borders. A library without a date field will cite a superseded template. Fix the metadata before you tune the prompt; no prompt can recover a missing access label or a wrong effective date.
Confidentiality, privilege and access
Confidentiality and privilege are legal concepts, not product settings. A private deployment reduces the number of parties who can see the data, but it does not decide whether a communication is privileged, whether a vendor is acting as an agent, or whether a disclosure waives protection. Those questions depend on the facts, the retainer and the applicable law. See what private AI means for the deployment vocabulary.
What engineering can do is make the factual record clean. Keep client matter data inside a boundary the firm controls. Restrict who can query which library. Log access and retrieval. Use a written data-processing agreement with the vendor, and document the security review. Then have counsel assess the position rather than assuming a deployment mode settles it.
Do not treat “private deployment” as a privilege opinion. It is an architectural fact. Whether privilege attaches, who holds it and what happens on disclosure are legal questions for counsel in the relevant jurisdiction.
Ethical obligations around confidentiality are also the reason access control matters at the matter level, not only at the firm level. A conflicts team, a deal team and an unrelated practice group should not share a retrieval index just because they share a tenant.
A matter-level data map
The data map is the document that turns a policy into an architecture. Each row should name an owner and a retention rule, not only a storage location.
| Data class | Examples | Deployment | Access rule |
|---|---|---|---|
| Public law and commentary | Statutes, published judgments, regulator guidance | Regional cloud endpoint | Firm-wide read; cite the source date |
| Approved precedent | Cleaned templates, playbook clauses, opinion bank | Regional cloud or private VPC | Practice-group read; librarian owns updates |
| Client matter documents | Drafts, correspondence, disclosed documents | Private VPC or on-premises | Matter-team only; ethical wall enforced in the app |
| Restricted or highly confidential | Investigations, sensitive negotiations, personal data | On-premises or air-gapped | Named individuals; retrieval logged and reviewed |
The legal AI data-residency page covers the jurisdictional questions, and the DPA guide covers the contract terms that support the map.
Structured extraction with JSON mode
Clause extraction is a better first project than open-ended drafting. The output has a schema, a reviewer can check every field against the contract, and a failure is visible rather than plausible.
import os, json, httpx
BASE = "https://api.plugsky.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['PLUGSKY_API_KEY']}"}
SCHEMA = {
"parties": [],
"effective_date": "",
"termination_rights": [],
"obligations": [{"party": "", "text": "", "clause": ""}],
"governing_law": "",
"missing_terms": [],
}
# contract_text comes from your own document store, after access checks.
r = httpx.post(f"{BASE}/chat/completions", headers=HEADERS, json={
"model": "plugsky-pro",
"response_format": {"type": "json_object"},
"temperature": 0,
"messages": [
{"role": "system", "content": (
"Extract only what the contract states. Use an empty string or "
"empty list when a field is absent. Include the clause reference "
"for every obligation."
)},
{"role": "user", "content": f"Schema:\n{json.dumps(SCHEMA)}\n\nContract:\n{contract_text}"},
],
})
r.raise_for_status()
extraction = json.loads(r.json()["choices"][0]["message"]["content"])
Host note. This page uses
https://api.plugsky.com/v1, the approved API host. Plugsky’s public documentation also showshttps://plugsky.com/v1in examples. Both responded on 20 November 2026; choose one host and use it consistently for chat and embeddings.
Validate the parsed object against the schema before it reaches a reviewer. JSON mode makes valid JSON likely, not guaranteed, and it does not guarantee that the values are correct. A schema check catches structure; a human check catches meaning.
Drafting with verification
Treat drafts as research memos, not filings. Use JSON mode for structured output that a checklist can validate, show the retrieved sources next to each claim, and make reviewer edits feed back into the evaluation set. Over time, measure how often drafts survive review unchanged; that number, not benchmark scores, tells you whether the tool is working.
The review workflow should make it easy to reject a draft. A redline that starts from a model draft can anchor the reviewer; require the reviewer to open the cited source before accepting a clause. The point of retrieval is not to make the model sound authoritative. It is to make the source checkable.
Evaluation for legal work
| Metric | What it measures | Who judges |
|---|---|---|
| Clause recall | Whether the relevant clauses appear in the retrieved set | Lawyer or paralegal on a labelled contract set |
| Citation precision | Whether each citation points to text that supports the statement | Reviewer sampling, with the source open |
| Extraction accuracy | Field-level agreement with a hand-checked schema | Reviewer comparing the contract to the output |
| Refusal correctness | Whether unsupported questions are refused and supported ones answered | Labelled set that includes both cases |
| Draft survival rate | How often a draft survives review with no substantive edit | Reviewing lawyer, tracked over time |
The AI governance framework provides a policy skeleton for the surrounding decisions: who approves a use case, what is logged, and how a model change is reviewed.
Honest comparison
| Capability | Plugsky | Consumer AI tools | Building in-house |
|---|---|---|---|
| Confidentiality | VPC, on-premises, air-gapped deployment options | Vendor cloud only | You control fully |
| Precedent retrieval | RAG with citations over your library | No access to work product | You build ingestion and evaluations |
| Structured extraction | JSON mode for clause schemas | Unreliable format control | Custom post-processing |
| Long documents | Long-context models in the 39-model catalogue | Limited context | Depends on the hosted model |
| Audit trail | Request and response logging | Limited | You build logging |
| Pricing | Flat monthly self-serve plans; see live pricing | Per-seat | GPU plus operations cost |
A consumer tool can be adequate for public statutes and published judgments where no client information is involved. Building in-house is the better choice when the firm already operates its document platform and needs full control of retrieval, retention and the audit trail.
What we did not verify
- No legal advice is given, and no lawyer-client relationship is created by this page. Have counsel review any deployment that touches client material.
- No privilege or confidentiality opinion was obtained. The analysis is fact-specific and jurisdictional.
- No SOC 2 report, DPA, penetration test or subprocessor list was reviewed for this page. Request each document and check its date and scope.
- No legal research benchmark was run. The evaluation table describes a method, not a measured accuracy claim.
- No court, regulator or bar association has endorsed this architecture.
- Private deployment scope and regional availability are contract-led and must be confirmed in writing.
Frequently asked questions
Does this replace legal judgment?
No. It retrieves, summarizes and drafts. A qualified lawyer must review every output before it informs advice, a filing or a negotiation position.
Can client matter data stay in the firm?
Yes. VPC, on-prem and air-gapped deployments keep prompts and documents inside your environment, and the API shape does not change between modes.
How do we avoid hallucinated clauses?
Restrict answers to retrieved passages, require citations, allow a clean refusal when nothing matches, and validate structured output against a schema.
Is fine-tuning useful for house style?
Potentially, but fine-tuning is coming soon. Start with RAG plus templates and examples in the prompt, which is easier to update when house style evolves.
Can it summarize long contracts?
Long-context models help with whole-document reasoning. Combine them with clause-level retrieval so the summary remains traceable to specific text.
How do we audit what the model saw?
Log the model name, the retrieved passage identifiers and the response. That trail lets a reviewer reconstruct how a draft was produced.
What is live today?
Chat, streaming, JSON mode, function calling, embeddings, RAG, agents, image generation and editing, and AI Video Studio are live. Audio, moderation, files, batch, assistants, the Responses API and fine-tuning are coming soon.
Does this page give legal advice?
No. This page is informational and describes an architecture. It is not legal advice, it does not create a lawyer-client relationship, and it does not replace review by qualified counsel in the relevant jurisdiction.
Is using an AI tool a confidentiality breach?
That is a fact-specific legal question, not a product feature. The answer depends on your retainer, the tool's data terms, who can access the data and the jurisdiction. Evaluate the deployment and the contract with counsel before sending client material.
Does the vendor become our agent for privilege purposes?
Do not assume that. Privilege analysis depends on the facts and the applicable law, including who is acting for whom and how the material is used. Keep a qualified lawyer in the loop and have counsel document the position.
Sources
- American Bar Association — Model Rule 1.6, Confidentiality of Information (checked 20 November 2026).
- American Bar Association — Formal Opinion 512, Generative Artificial Intelligence Tools (checked 20 November 2026).
- NIST — AI Risk Management Framework (checked 20 November 2026).
- Plugsky documentation — chat completions, JSON mode, embeddings and RAG (checked 20 November 2026).
Related
Plugsky (2026). “AI for Legal Teams: Private Legal AI and RAG”. Plugsky. Available at: https://plugsky.com/articles/ai-for-legal-teams-private-legal-ai-and-rag (last updated 20 November 2026).