You do not have to send every document, prompt or business idea to a cloud AI service. With suitable hardware and an openly available model, you can run an AI assistant on your own computer, adapt it to your work and decide which tools it may use.
But “without any restrictions” needs a reality check. Local AI can reduce dependence on a provider’s quotas, interface and data-handling policies. It does not remove model licences, legal obligations, hardware limits or the need to protect people and confidential information. A model with fewer refusals is not automatically more capable, accurate or trustworthy.
This guide focuses on private AI for legitimate tasks on computers and data you own or are authorised to manage.
1. Decide what private means
A local model runs inference on your machine. An offline system also avoids network connections during use. Those are different promises: a local assistant may still send data out through cloud tools, telemetry, browser integrations or external search.
Write down your privacy requirements first. Can initial model downloads use the internet? Must customer documents stay on one device? Will colleagues access the assistant? Are backups encrypted? Privacy is a property of the whole workflow, not just the model.
For sensitive work, keep document storage, embedding generation, retrieval and inference local. Disable unnecessary external integrations and review the software’s network behaviour. Do not assume that a “local” label proves nothing leaves the machine.
2. Start with a small local model
Ollama is one way to run supported models locally. The Xialei Ollama setup toolkit is an unofficial convenience wrapper around official downloads; it does not include a model. Open our Ollama setup guide, choose the installer for your operating system and review its instructions before running it.
Install the runtime, then select a model that fits your hardware and its licence. A smaller quantised model is a sensible first experiment. Quantisation reduces memory use, but may also affect output quality. Memory needs depend on parameter count, precision, context length and runtime overhead; the download size alone is not a reliable memory estimate.
Apple Silicon can use supported Metal acceleration; NVIDIA systems need compatible drivers and GPU software. CPU-only inference is possible for some models but can be slow. Begin with short prompts and a modest context window, then measure response speed and memory use before buying hardware.
Run a simple test: ask the model to summarise a non-sensitive sample document and return three clearly labelled points. Check the result against the original. “It answered” is not the same as “it answered correctly.”
3. Keep the model service private
Keep a single-user service bound to loopback, such as 127.0.0.1, instead of exposing it to the internet. A local API is not automatically protected by a login. Do not open router ports or broadly change firewall settings just to make an assistant connect.
If a browser-based tool needs permission to call your model, allow only that tool’s exact origin rather than all websites. For the Xialei AI Agent launcher, the documented origin is http://127.0.0.1:8765. An origin permission is a browser rule, not a replacement for authentication.
For shared access, put the service behind an authenticated gateway, restrict network access, encrypt connections and give each person only the access they need. Secure the computer itself with updates, disk encryption and a locked user account. Local files and backups still need protection.
4. Custom instructions, retrieval or training?
These techniques solve different problems.
Custom instructions: change the working style
Start here when you want a tone, format or procedure. Tell the assistant what its job is, what information it may use and what a successful answer looks like. Provide a few examples of good output. This does not change the model’s weights, but it is often enough for drafting, classification and structured summaries.
Retrieval: give it your documents
Retrieval-augmented generation, or RAG, finds relevant passages from a document collection and places them into the model’s context. It is often the best starting point for company handbooks, product documentation and frequently changing information.
Clean the documents, split them into meaningful passages, generate embeddings locally and store the search index privately. Ask the assistant to cite its sources and admit when the available material does not answer the question. Apply access permissions before retrieval: an assistant must not expose a document that its user is not allowed to read.
RAG is not training. Updating a document index is usually easier than retraining a model whenever a policy changes.
Fine-tuning: teach repeatable behaviour
Fine-tuning adjusts a model using task-specific examples. It can help with consistent formatting, terminology or a specialised response pattern. It is not a dependable way to turn a model into a searchable database of confidential facts.
LoRA and QLoRA adapt selected parameters rather than retraining every weight, which can reduce training costs. They still need a compatible base model, tooling, enough memory and carefully prepared examples. Training from scratch is a much larger project and is rarely the right starting point for an individual or small business.
5. Build a useful training dataset
Use data you have the right to use. Remove passwords, personal identifiers, unnecessary customer details and third-party material that you cannot lawfully include. Check both the model licence and the dataset permissions, especially for commercial work.
For a task such as classifying support requests, pair realistic inputs with reviewed target outputs. Include difficult cases, missing information and examples where the correct action is to ask a question or decline an unauthorised operation.
Separate training, validation and test sets. Keep duplicate or near-duplicate examples out of different sets, or your test results may look better than real performance. A smaller, carefully reviewed dataset often teaches more useful behaviour than a larger collection of inconsistent answers.
Choose measurable goals before training: correct category, valid output structure, factual accuracy or adherence to an approved procedure. Record the base model, dataset version and training settings. Protect checkpoints and adapters as potentially sensitive artefacts; training can lead to memorisation and does not guarantee anonymisation.
6. Evaluate before trusting it
First evaluate the unchanged model with your instructions. Then compare retrieval or fine-tuning against that baseline using the same held-out tasks. Inspect factual errors, unsupported claims and failure to follow the required format—not just fluent writing.
Test unusual inputs, conflicting instructions and malicious instructions embedded in documents. A document is evidence to analyse, not authority to override the assistant’s operating rules.
Keep a version you can roll back to. If an adapted model improves formatting but becomes less accurate, it has not necessarily improved the workflow.
7. Connect AI to actions carefully
Generating text is different from executing an action. To rename files, create reports, draft emails or update a business system, the assistant needs explicitly implemented tools and permissions.
Start with read-only tools and dry runs. Let it prepare a proposed change, show the affected records or files and ask for approval before sending messages, spending money, deleting information or changing access rights.
Use a short allowlist of operations with validated inputs. Do not give generated text unrestricted shell execution, administrator credentials or access to an entire drive. Treat model output as untrusted input. Keep credentials outside prompts, minimise access and log actions without unnecessarily recording private content.
The Xialei AI Agent setup guide provides a starting point for browser workflows and compatible local model connections. The current toolkit is not an unrestricted desktop agent, does not install models and does not grant the AI arbitrary control of your operating system.
8. A sensible first private-AI project
Choose one low-risk task: summarising your own notes, extracting fields from sample documents or drafting replies for review.
- Run a small local model and confirm it fits your hardware.
- Keep its service private and check all external integrations.
- Write clear instructions and a few reviewed examples.
- Add local retrieval if the task needs your documents.
- Create a held-out test set and measure the baseline.
- Consider fine-tuning only if you can identify a persistent behaviour problem.
- Add narrowly scoped tools with approval for consequential actions.
Freedom through control, not the absence of boundaries
Private AI gives you meaningful choices: where computation happens, which model you use, how your documents are handled and what tasks are automated. That is more useful than a promise that the AI will “do anything.”
The best system is not the one with no boundaries. It is the one whose capabilities, permissions and failure modes you understand—and whose behaviour you can test, audit and stop.
XIA LEI