---
title: "Setting up a private knowledge base for a law office: what we tell new customers"
url: https://memory.wiki/fgQjLZwA
updated: 2026-11-29T21:54:44.148Z
source: "memory.wiki"
---
# Setting up a private knowledge base for a law office: what we tell new customers

## Framing "Setting up a private knowledge base for a law office"

Decide document retention, access groups and an audit log before indexing a single contract.  Local knowledge bases fail in predictable ways: outdated documents outrank current ones, tables get flattened into nonsense, and exact codes never match because embeddings blur them. Each failure has a simple, boring fix.

## Fix the documents

Assign an owner for each collection. Store a document date and version as required fields. Convert tables to structured text or keep them as separate records instead of letting a paragraph splitter cut them in half. Remove duplicates so the same paragraph does not dominate results.

## Fix retrieval

Use hybrid retrieval: keyword search for identifiers and rare terms, vectors for meaning. Filter by metadata before ranking, for example by department, product line or validity date. Return a few passages with their sources so users can check the answer themselves.

## Fix expectations

The assistant should summarise and point to sources, not invent policy. Publish a short list of things it will not do: legal interpretation, medical advice, payroll decisions. Show the source document name and date with every answer, and make it easy to report a wrong one.

## A two-week pilot

1. Pick one team and one document collection.
2. Write thirty real questions with expected sources.
3. Run the pilot, collect feedback, and fix ingestion issues first.
4. Only then expand to more collections or users.

## A worked example

A small manufacturer wanted engineers to ask questions about internal specifications. The first version used only vector search and often returned the wrong revision of a document. The team added document dates and revision numbers as metadata, filtered out superseded revisions before ranking, and kept a keyword index for part numbers. They also rewrote their chunking so that tables were stored as separate records. After these changes, they re-ran the same evaluation questions and checked whether the correct source appeared in the retrieved passages. Only when retrieval was reliable did they spend time adjusting the answer prompt.

More on this topic: [local RAG knowledge-base guide](https://microaione.com/tutorials/local-rag-knowledge-base/). See also [local AI tutorials](https://microaione.com/tutorials/).

## Bottom line

Local AI rewards patience and record keeping more than raw spending. Decide what the system must do, measure it on your own hardware and documents, write down every change with a date and an owner, and review the setup after each significant upgrade. Small, documented steps are easier to debug, easier to hand over and easier to defend when someone asks why a particular choice was made. When in doubt, test on a smaller scale first and expand only when the evidence supports it.

## Quick reminders

- Publish what the assistant will refuse to do.
- Use one models directory shared by every runtime.
- Treat retrieved text and uploaded files as untrusted.
- Pin driver and runtime versions together.

*Published by [MicroAI One (本地AI 1号网)](https://microaione.com/), a Shenzhen team working on local LLM hardware, software and deployment.*

---

## Summary
Successful private knowledge bases require structured document management, hybrid retrieval methods, and rigorous testing before scaling. Prioritizing metadata, data quality, and iterative evaluation ensures reliable performance over simple model investment.

## Themes
- Private knowledge base setup
- RAG retrieval optimization
- Document management best practices
- Pilot testing methodology

## Key takeaways
- Document retention, access groups, and audit logs must be established before indexing begins.
- Tables should be stored as separate records or structured text to prevent fragmentation during chunking.
- Hybrid retrieval combining keyword search and vector search is necessary for accurate identifier matching.
- The assistant must explicitly list prohibited tasks like legal interpretation or medical advice.
- A pilot program should be limited to one team and one collection to validate ingestion before scaling.

## Insights
- Local knowledge bases fail primarily due to structural data issues rather than model intelligence limitations.
- Retrieval accuracy is improved by filtering metadata before applying vector ranking.
- The technical success of a RAG system depends more on disciplined record keeping than on hardware investment.

## Open questions / gaps
- What specific tools or software architectures are recommended for managing the shared models directory?
- How should the system handle documents that require frequent updates to their metadata?

