RAG

How do legal teams use RAG on their documents?

Legal RAG retrieves the clause, precedent or obligation that answers a question and returns it with a source citation, so a lawyer can verify the passage instead of trusting a summary. The design constraints are privilege walls, version control and retention. Plugsky supports this with per-collection isolation, citations and private deployment options.

Key facts

CitationsEvery query returns ranked chunks with source attribution
IsolationPer-collection encryption and scoped keys for privilege walls
FormatsPDF, DOCX, TXT, MD and HTML ingestion
ConfidentialityVPC, on-prem and air-gapped deployment options
Audit logsPer-request model, tokens, latency, user and region with SIEM export
Data useAPI data is not used to train models
RetrievalKeyword, vector and hybrid search with optional reranking
Product statusLive

TL;DR

  • Make the collection the confidentiality wall: one per matter or client.
  • Always cite the passage; a legal answer without a source cannot be checked.
  • Version documents so an answer ties to the correct draft.
  • Agree retention and deletion for closed matters before ingestion.
  • Deploy inside your perimeter when privilege or client terms require it.

How it works, step by step

  1. Map matters, clients and confidentiality walls to collection boundaries.
  2. Define who can query each collection and issue scoped keys accordingly.
  3. Ingest a closed set first, such as templates or settled matters, as a pilot.
  4. Check chunking against contract structure: clauses, schedules and definitions.
  5. Build a question set with expected sources and score retrieval before drafting.
  6. Configure retention, deletion and audit export with risk and IT.
  7. Expand to live matters only after retrieval quality and access controls are proven.
1Map matters,clients andconfidentiality2Define who canquery eachcollection and3Ingest a closed setfirst, such astemplates or4Check chunkingagainst contractstructure: clauses,5Build a questionset with expectedsources and score6Configureretention, deletionand audit export

Try it yourself

Open the Chat with PDF tool →

Why citations are non-negotiable

Legal work is verified reading. A summary that cannot be traced to a clause has little value, because the risk of acting on an inaccurate paraphrase is high. Retrieval-grounded answers fit the profession better than free-form generation: the system returns the relevant passage with its source, and the lawyer reads the evidence before relying on it.

Citations also make review efficient. Instead of checking an entire answer against an entire contract, the reviewer checks a specific passage against a specific page, which is the same workflow they already use with a colleague's research note.

Privilege walls and access design

The collection is the practical unit of confidentiality. Create one per matter or client, scope keys to the team working on it, and never mix adversarial matters in a single index. Per-collection encryption at rest and scoped API keys keep retrieval attributable, while enterprise RBAC and SSO tie human access to the identity provider.

Audit logs then record who queried what and when, with export to your SIEM. For engagements that require it, deploy in a VPC, on-prem or air-gapped plane so documents and queries never leave the firm's perimeter.

Document structure and versioning

Contracts and filings have deliberate structure: recitals, definitions, operative clauses, schedules and annexes. Chunking that respects those boundaries keeps definitions with the clauses that use them, and citations that point to a page let a reviewer jump straight to the text. Keep the document version in the metadata so an answer can be tied to the draft in force.

Hybrid retrieval helps when searching for defined terms, party names and clause references, which are exact-match queries more than semantic ones. Optional reranking then orders the candidates for precision.

Piloting and production on Plugsky

Start with a non-privileged corpus such as a template library or public precedents to tune chunking and evaluation. Plugsky collections accept PDF, DOCX, TXT, MD and HTML, handle chunking and indexing automatically, and return ranked chunks with source attribution. Any of 30+ models can compose answers behind the same OpenAI-compatible API.

Test document questions with the Chat with PDF tool, and review the DPA and deployment terms before privileged content moves. Evaluate on the free plan with plugsky-micro and plugsky-lite or the 14-day full-access trial; current plans are on the live pricing page.

Honest comparison

RequirementPlugsky RAGKeyword document managementGeneral chatbot
Source linkingPassage-level citations with page referencesDocument-level searchNone
Privilege wallsCollections, scoped keys and encryptionFolder permissionsNo isolation model
Version controlMetadata on chunks and stable idsFile version historyUnknown
AuditPer-request logs with SIEM exportAccess logsChat history only
DeploymentManaged, VPC, on-prem and air-gappedOn-prem by defaultVendor cloud

Frequently asked questions

Can Plugsky replace legal research databases?

No. It retrieves from the corpus you provide, such as your contracts and precedents. Public case law and licensed databases are separate sources you would ingest if permitted.

How do we protect privilege?

Keep a collection per matter or client, scope keys to the team, deploy inside your perimeter where required, and review audit logs for access.

What happens when a matter closes?

Agree deletion workflows up front: remove the collection and documents, and confirm that logs and backups follow your retention policy.

How should contracts be chunked?

Follow the document structure: clauses, definitions and schedules. Structure-aware chunks keep defined terms with the clauses that use them.

Is there a free plan?

Yes. The free plan includes plugsky-micro and plugsky-lite with 2 API keys and no credit card, and a 14-day full-access trial is available.

How is pricing structured?

Self-serve plans are flat monthly with unlimited fair-use usage and no per-token charges or overage fees. See the live pricing page for current plans.