Large Model Deployment and Tuning: A Project-Based Practical Guide
This guide explains why large model applications should be delivered as projects rather than isolated pilots, using two campus examples: a policy Q&A assistant and a dormitory repair request assistant. It walks through the full workflow, including knowledge ingestion, chunking and metadata design, hybrid retrieval and reranking, prompt constraints, deployment and acceptance checklists, evaluation with labeled question sets, and tuning order from retrieval to prompts to the model. It also covers slot extraction, validation, audit logging, and four-dimension evaluation, showing how one reusable pipeline supports different business scenarios.
1. Why Large Model Rollouts Should Be Organized as Projects
When teams pilot large model applications, they often chase parameter count first, only to find that the real bottleneck is not the model itself but knowledge supply, retrieval quality, and the engineering pipeline. Campus scenarios are a typical example: policy documents are updated frequently, clauses cross-reference one another, and users ask questions in colloquial language with omissions. If you hand raw documents to the model and ask it to answer directly, the most common failure mode is a confident tone paired with wrong clause numbers.
A more reliable path is to break the capability into deliverable projects: define the users, define the knowledge boundary, and define acceptance metrics. This article uses two campus projects as examples—a Q&A assistant for policy consultation and a repair request assistant for facility management workflows—to show how one reusable technical pipeline can support different business needs.
2. Project One: Campus Policy Q&A
2.1 Project Description and Learning Objectives
The goal is to build a Q&A application that answers only from publicly available campus policies, following the principle of “cite the source when an answer exists, and never fabricate when it does not.” The learning focus includes the fundamentals of retrieval-augmented generation (RAG), the knowledge ingestion workflow, chunking and indexing strategies, prompt constraints, and iterative tuning based on failure samples.
2.2 Breaking Down the Work
It helps to split the work into six steps: requirements and corpus inventory → platform environment setup → knowledge base construction → application creation and connectivity verification → evaluation and tuning → permissions and operations closure. Each step should produce a clear deliverable, such as a corpus list, a chunking rule document, an evaluation set, and a badcase log.
2.3 Key Concepts: How Retrieval-Augmented Generation Works
Retrieval-augmented generation externalizes “memory” into a searchable document collection. The pipeline typically runs: document parsing → chunking → vectorization → index construction → query rewriting → recall → reranking → context assembly → generation with citation labeling.
What matters most is that the quality ceiling is usually determined by recall, not generation. If the relevant clauses are never retrieved, even the strongest model can only guess from prior knowledge. A common engineering practice is hybrid retrieval: keyword retrieval handles exact matches such as clause numbers and proper nouns, vector retrieval handles semantic generalization, and the two result sets are fused before a reranking model performs fine-grained ordering.
An illustrative chunking and metadata design (pseudocode):
# Use each article as the smallest semantic unit and keep the chapter path as metadatachunks = []for chapter in doc.chapters:for article in chapter.articles:chunks.append({"text": f"{article.no} {article.content}","meta": {"chapter": chapter.title,"article_no": article.no,"version": doc.version,"effective_date": doc.effective_date}})
Metadata is the foundation for later filtering and citation tracing. For example, filtering by effective date prevents answers from citing clauses that have been repealed.
2.4 Platform Deployment and Knowledge Base Construction
For deployment, teaching and validation environments can use single-machine containerized deployment. For production, it is recommended to separate the model inference service, retrieval service, application orchestration, and storage so each can scale independently. If you prefer not to self-host, you can use general-purpose cloud capabilities: a container platform to host the inference service, object storage to hold original documents, and logging and monitoring services with alerting for observability.
The acceptance checklist after deployment should include: model service health checks, vector index write and read verification, document parsing success rate, and end-to-end latency for a single question. Missing any of these means later tuning has no baseline.
2.5 Practical Notes on Upload and Parsing
Format is the most common source of problems during upload. Scanned documents need OCR first, table attachments should be extracted separately into structured entries, and headers, footers, and tables of contents should be removed. After parsing, manually spot-check 20 entries to confirm that clause numbers and body text have not been split apart.
2.6 Application Creation and Basic Testing
When creating the Q&A application, write the system prompt as a hard constraint rather than a suggestion, for example:
Answer only based on the provided materials; when the materials are insufficient, respond "The current materials do not cover this question" and suggest contacting the relevant department.The answer must list the cited clause numbers at the end.
Basic testing should cover at least four question types: direct lookup of a single clause, synthesis across clauses, time-sensitivity questions, and refusal on out-of-scope questions.
2.7 Tuning and Extensions
Tune in the order of retrieval first, then prompts, and finally the model. On the retrieval side, you can adjust chunk granularity, enable hybrid retrieval and reranking, and set a similarity threshold and a cap on the number of recalled items. On the prompt side, you can add a structure that lists the basis before the conclusion. On the model side, consider switching to a general-purpose model service with a larger context or stronger reasoning capacity.
For evaluation, maintain 50–100 labeled question-answer pairs and track three metrics: hit rate, citation accuracy, and refusal accuracy. Change only one variable at a time to avoid attribution problems. Extension directions include multi-turn clarification, returning different visibility scopes by role, and integration with a ticketing system to form a closed loop.
3. Project Two: Dormitory Repair Request Assistant
This project upgrades Q&A into an executable workflow. The core difference is that the output is not a text answer but structured fields: repair location, fault type, urgency, expected visit time, and contact information. The implementation has the model perform intent recognition and slot extraction, asks one follow-up question when a slot is missing, and writes to the work order table and returns an acceptance number once all fields are complete.
{"location": "Building 3, Room 412","category": "plumbing/electrical","urgency": "high","slot_missing": ["contact"]}
Three engineering points need attention: first, minimize the collection of sensitive information and store it in masked form; second, extraction results must undergo enumeration validation, with invalid values falling back to manual confirmation; third, all automated actions should keep audit logs to support tracing and rollback.
4. Summary and Evaluation
Both projects share the same foundation: knowledge ingestion quality sets the lower bound, retrieval and reranking set the median level, and prompt constraints and workflow design determine usability. A four-dimension scoring approach is recommended: functional completeness, answer traceability, exception and refusal handling, and operational observability.
The advice for learners is to build the evaluation set before touching the model. With a quantifiable baseline, tuning shifts from “going by feel” to “reading the curve,” which is the most important methodological difference between large model engineering and traditional software development.
