Enterprise LLM Conversational Systems: Model Selection, RAG, and a Compliance Checklist
A practical guide to deploying enterprise LLM chat systems. It covers use-case boundaries and prerequisites, RAG tuning parameters with fallback rules, model selection criteria, monitoring and rollback strategies, and a privacy compliance checklist—helping teams move from prototype to production with measurable, auditable processes.
1. Scope and Prerequisites
Large language models are well suited for open-ended Q&A, information summarization, and content drafting. They are not suited for precise computation or tightly constrained business logic, such as calculating refund amounts, verifying account identity, or changing order status. Those operations belong to rule engines or business systems. The model should only interpret user intent and invoke the corresponding API.
Before going live, four prerequisites must be in place:
- Model service: a cloud API or a private deployment. The choice affects later compliance and cost decisions.
- Vector database: required only if document retrieval is involved.
- Object storage: required only if users can upload files.
- Evaluation set: at least 200 real user questions with manually labeled reference answers. The evaluation set is the basis for judging quality. Without it, there is no way to tell whether the model outperforms a keyword-based approach.
The minimal flow for a single Q&A interaction:
- Query rewriting: use conversation history to expand elliptical user expressions into standalone questions.
- Routing: decide whether the question goes to retrieval, a business API call, or direct model answering.
- Model invocation: submit the question, context, and output format requirements.
- Output validation: check formatting, sensitive words, and whether the answer is consistent with retrieved passages.
- Failure fallback: when validation fails, a timeout occurs, or the service errors, return a standard message or hand off to a human agent.
Timeout, retry, and degradation triggers must be defined before launch. The per-call timeout should be based on the P95 latency measured before launch, with headroom. Limit retries to at most one to avoid amplifying load during an outage. After several consecutive failures, or when the model service is unavailable, the system should automatically switch to retrieval-only answers or standard responses and log the degradation event.
Intent recognition still requires classification labels and slot definitions. The model can assist with labeling, but recognition accuracy must be validated against the evaluation set before launch.
Assisted writing works well for generating first drafts, and quality depends on the prompt template. A reusable template should include role, task, input materials, length requirements, and prohibited expressions. After generation, three checks are required: fact-checking (verifying every number, date, and name against source materials), source citation (attaching a reference to every factual statement), and sensitive-word filtering. Because models can fabricate facts, generated content must be verified before external publication.
2. RAG Parameters and Fallback Rules
There is no universally optimal set of RAG (retrieval-augmented generation) parameters. Each parameter must be calibrated against the evaluation set; the values below are only common starting points.
Document parsing is the foundation of retrieval quality. Images and scanned files require OCR; PDF and Word files require structured text extraction. Three common parsing problems are: low-resolution scans causing recognition errors, misaligned table content, and headers/footers mixed into body text. Parsing results should preserve page numbers and document names for later citation. Before launch, sample a batch of documents and manually check the frequency of these three problems.
Core parameters:
- chunk_size: split by heading and paragraph structure; a common starting point is 300–800 characters. Chunks that are too short lose context; chunks that are too long reduce retrieval precision.
- overlap: commonly 10%–20% of chunk_size, used to prevent key information from being cut off.
- top_k (initial candidates): commonly 5–10. Larger values increase recall but also introduce more noise into the model.
- Similarity threshold: passages below the threshold are treated as no hit. The threshold should be calibrated with labeled evaluation data rather than copied from another project.
- Rerank switch: recommended when there are many semantically similar candidates. Measure hit rate and latency before and after enabling it to confirm the benefit outweighs the cost.
Fallback rules must cover these cases:
- No hit: when all passages fall below the similarity threshold, reply that no relevant material was found and offer follow-up questions or human handoff.
- Low confidence: when retrieval results exist but relevance is weak, first confirm the scope of the question with the user instead of generating a definitive answer.
- Answer inconsistent with passages: when validation finds facts in the answer that have no basis in the retrieved passages, discard the answer and fall back.
- Citation requirement: every factual answer must include the document name and page number. Answers missing citations are treated as validation failures.
3. Model Selection Criteria
During selection, place all candidate models in a single comparison table and fill in measured values or written vendor commitments for each field. Recommended fields:
- Context length: calculate the total token budget, including the system prompt, conversation history, retrieved passages, and reserved output length.
- Pricing and billing model: distinguish input, output, and caching prices; confirm billing per token or per call, and whether tool calls are charged separately.
- Concurrency and rate limits: record QPS caps, burst quotas, and the behavior when limits are exceeded.
- Private deployment and data residency: confirm whether on-premises deployment is supported and where data is stored and processed.
- Tool calling: test function-calling format compliance and parameter accuracy; this directly affects routing stability.
- Language capability: test with your own evaluation set rather than relying on a single score from public benchmarks.
- SLA and evaluation method: record availability commitments, timeout rules, and version update notification mechanisms. Use a consistent evaluation method—the same evaluation set applied across all candidates.
The selection conclusion should state the chosen model, the backup model, and the reasons for rejecting others. When a model version updates, rerun the evaluation set.
4. Monitoring Metrics and Rollback
After launch, continuously monitor the following metrics:
- QPS: reflects actual load for capacity planning.
- P95 latency: reflects user-perceived response speed.
- Retrieval hit rate: the share of queries exceeding the similarity threshold. A decline usually indicates a stale knowledge base or a chunking problem.
- Answer consistency rate: sampled checks of how well answers match retrieved passages, done manually or with an evaluation model.
- Human handoff rate: the share of sessions transferred to human agents. An increase usually signals problems with model capability or fallback rules.
- Failure rate: all failure cases, including timeouts, rate limiting, and format validation failures.
- Cost per request: tracked by tokens and call count to detect abnormal consumption.
Principles for alert thresholds: use stable-period data from before launch as the baseline, and set thresholds based on relative change—for example, alert when a metric degrades beyond a defined percentage from baseline. Avoid arbitrary fixed numbers. Set alerts separately by channel and time period, and require several consecutive windows beyond the threshold before triggering, to reduce false alarms from transient fluctuations.
Sentiment-related signals should also be monitored. Sentiment recognition is an auxiliary signal and does not directly determine business outcomes. A lightweight classification model outputs a sentiment label and confidence score; when confidence is below the threshold, the default tone is kept. The threshold can start at 0.7 but must be calibrated with your own labeled data. Before launch, compute accuracy and misclassification rates by sentiment category. Misclassification makes replies sound jarring, so the misclassification rate should be tracked as an independent metric. Two consecutive turns of negative sentiment, or user mentions of keywords such as complaint, police report, or lawsuit, should trigger human handoff. The system must not make compensation, promises, or price concessions based on detected sentiment; such decisions belong to humans or rules.
Rollback switches must be in place and rehearsed before launch. At minimum:
- Model version switch: revert to the previous stable version within minutes.
- Retrieval switch: disable RAG independently, keeping direct model answers or rule-based replies.
- Rerank switch: quickly disable it when issues arise without affecting other features.
- Prompt version switch: roll back to a previously validated template.
- Master switch: one-click fallback to a keyword-based approach or full human handoff.
New versions should first be released to a small percentage of traffic, then gradually scaled up once the metrics above remain stable.
5. Privacy and Compliance Checklist
Privacy compliance should be considered at the design stage, not patched in before launch. The following checklist is for reference; confirm applicable regulations with your legal and compliance teams.
- Data classification: divide data into public, internal, sensitive, and restricted levels, and define for each level whether it may enter the model, be written to logs, or cross borders.
- Masking: mask phone numbers, national ID numbers, bank account numbers, and similar data before writing to the vector database, logs, or prompts.
- Log retention and access auditing: define log retention periods, record who accessed which conversations and when, and review periodically.
- Cross-border transfer: confirm the deployment region of the model service and data transfer paths, and determine whether security assessments or filings are required.
- Data processing agreement (DPA): clarify whether the vendor uses data for model training, data retention periods, and whether subprocessors are involved.
- Right to deletion and export: when a user requests it, can you locate and delete or export their data in the vector database, logs, and caches? This requires traceable user identifiers at ingestion time.
- Sensitive-content filtering and human review: filter sensitive content at the output stage; add human review in high-risk scenarios such as finance, healthcare, and legal advice.
- Copyright ownership of generated content: confirm per company policy and complete fact-checking before external publication.
These items should be documented as a written checklist, with an owner and acceptance criteria assigned to each. Re-verify the entire checklist whenever the model or vendor changes.
