What to Do After Deploying a Local LLM: From Inference Service to Office Integration
Deploying a local large language model is only the starting point. This article explains a four-layer architecture (inference, orchestration, access, and operations) for turning a running model into a practical assistant. It covers model selection by parameter size, quantization trade-offs, retrieval-augmented generation for internal knowledge, and a VBA example that brings model output into a spreadsheet. It also outlines high-value use cases, security and performance practices, and a step-by-step rollout path.
1. Why Deployment Is Only the Starting Point
Many teams reach a stalled state after downloading and starting a local LLM: the model runs and responds in the terminal, but there is no entry point in business systems, employees do not use it, and it ends up as an expensive test machine. The real value of local deployment is not running the model, but embedding its capabilities into existing workflows so that reading, summarizing, rewriting, extraction, and classification are handled automatically.
You can check whether a local model is truly in production with three questions: Do business users need to learn a new interface? Does data stay inside the internal network throughout? Are calls observable and reproducible? The sections below outline a practical path from the inference service to office tooling based on these three points.
2. Overall Architecture: Four Layers
A stable local AI assistant typically consists of four layers:
- Inference layer: loads and runs the model, exposing an interface compatible with common standards.
- Orchestration layer: manages the knowledge base, retrieval augmentation, sessions, and permissions, usually backed by a dedicated knowledge base service.
- Access layer: packages capabilities into entry points users already know, such as spreadsheets, browser pages, or internal system plugins.
- Operations layer: logging, monitoring and alerting, quotas, and auditing.
Decoupling these layers means the access layer code does not change when you swap models, knowledge base upgrades do not affect the inference service, and troubleshooting can be done layer by layer.
3. Environment Setup and Model Selection
Installing the inference service is similar across platforms: download the package for your platform, start it so it listens on a common port on the local loopback address by default, and pull models from the command line. The model name must match the parameter size you choose. Select based on the actual headroom in VRAM and memory rather than always going for the largest option.
Follow a “good enough first” approach:
- Below 8B suits ordinary office laptops and covers summarization, rewriting, and simple Q&A.
- 14B to 32B suits workstations with a discrete GPU and performs more reliably on reasoning and coding tasks.
- Larger sizes usually require multiple GPUs or quantization, with throughput and time-to-first-token evaluated.
Quantization is a key technique for local deployment. Low-bit quantization significantly reduces memory usage, at the cost of slightly lower stability for long-context reasoning and complex logic. Run a small comparison test with real business samples before settling on a final size.
4. Orchestration Layer: Giving the Model Knowledge, Not Just Speech
A bare model has static knowledge and cannot answer questions about internal company documents. This is where retrieval-augmented generation comes in: split documents into chunks, vectorize them into a vector store, retrieve the most relevant chunks for each question, and assemble them into a prompt for the model to generate an answer. The orchestration layer typically provides workspace isolation, access tokens, and call auditing, which are prerequisites for connecting to business systems.
Three practical points: chunk size must balance semantic completeness and retrieval precision; state in the prompt that the model should answer only from the provided material and note when information is missing, which greatly reduces fabrication; and create separate workspaces for different departments to prevent knowledge mixing and unauthorized access.
5. Access Layer: Bringing Capabilities to the Spreadsheet
Office suites offer the lowest learning curve. In a spreadsheet, for example, users type a question into a fixed cell and trigger a macro. The model’s reasoning summary and final answer are written back to designated cells, forming a “ask, generate, record” loop.
The sample code below illustrates how to construct the request and parse the response, rather than the interface details of a specific product:
Sub AskLocalModel()Dim q As String, body As String, resp As StringDim http As Objectq = ThisWorkbook.Sheets(1).Range("A2").ValueIf Len(Trim(q)) = 0 Then Exit Subbody = "{""message"":""" & Replace(q, """", "\""") & """,""mode"":""chat""}"Set http = CreateObject("MSXML2.XMLHTTP")http.Open "POST", "http://127.0.0.1:3001/api/v1/workspace/demo/stream-chat", Falsehttp.setRequestHeader "Content-Type", "application/json"http.setRequestHeader "Authorization", "Bearer " & LocalTokenhttp.send bodyIf http.Status = 200 Thenresp = http.responseTextThisWorkbook.Sheets(1).Range("A4").Value = ExtractBody(resp)ElseMsgBox "Request failed: " & http.StatusEnd IfEnd Sub
Three engineering details must be handled: streaming responses return line-delimited event data, so strip the prefix from each line and parse the inner JSON instead of deserializing the whole payload at once; double quotes and newlines in user input must be escaped or the request body breaks; and synchronous blocking calls freeze the interface, so batch scenarios should switch to asynchronous or batched processing with progress feedback.
6. Beyond Q&A: Four High-Value Use Cases
- Document batch processing: structured extraction from contracts, resumes, and tickets into a unified field table.
- Knowledge Q&A: turning policy manuals into a conversational query entry point with retrieval augmentation.
- Text reprocessing: meeting notes into minutes, long articles into summaries, and multilingual translation of technical documents.
- Semi-structured generation: producing spreadsheet formulas, query statements, or configuration drafts from natural language descriptions, for human review before use.
These four scenarios share controllable fault tolerance and verifiable results, making them good first landing points for a local model.
7. Security, Performance, and Operations
For security, the inference service listens on the loopback address by default. If the team needs to share it, put it behind an internal network reverse proxy with access tokens and least-privilege principles, and never expose it directly to the public internet. Keep audit records for all calls and mask sensitive fields before storing them.
For performance, time-to-first-token depends mainly on model size and context length. Limit maximum generation length, reuse session context, and cache results for frequent questions. Run batch jobs off-peak so they do not compete with online Q&A for resources.
For operations, configure process supervision and automatic restart for the inference service, and set monitoring alerts for VRAM usage, request failure rate, and average latency. Record model and orchestration layer versions for traceability and canary upgrades. If elastic capacity is needed, place cold data and model files in object storage, run the inference service on a container platform, and use logging and monitoring services for centralized observability. General cloud product categories from providers such as Baidu AI Cloud can be combined along these lines.
8. Recommended Rollout Path
First, validate the loop with a single scenario, such as policy Q&A. Second, turn prompts, chunking strategies, and token management into standards. Third, expand to batch processing and multi-department workspaces. Fourth, add auditing and quotas to form a reusable internal capability platform. Following this order takes a local LLM from “it runs” to “it is useful.”
