
An engineering assistant answers a question about the required torque for a component. The answer is clear, includes a citation and matches a value that an engineer remembers seeing before. The cited drawing, however, has been superseded. The latest approved revision specifies a different condition.
A demonstration that judges only whether the answer sounds plausible would probably pass this interaction. A production evaluation must fail it.
Retrieval-augmented generation, often abbreviated RAG, combines a document retrieval mechanism with a language model that produces an answer using selected material. In an engineering environment, the usefulness of such a system depends on which evidence it retrieves, how it interprets that evidence and whether it respects the authority boundaries around the question.
Separate retrieval from generation
A retrieval failure occurs when the system does not provide the necessary evidence to the answering component. A generation failure occurs when relevant evidence is available but the resulting response misinterprets it, omits an important condition or introduces an unsupported claim.
These failures need different corrective actions. Changing the language model may not resolve a document indexing problem. Improving retrieval may not resolve a recurring tendency to confuse nominal values with tolerance limits.
A useful evaluation records the retrieved material and the final response for each question. Where possible, record document identifiers, revisions, access scope and relevant excerpts. This helps the team identify where the failure occurred rather than guessing from the final wording alone.
Build a representative question set
Do not evaluate only the questions used during implementation. Those questions may have influenced document preparation, prompting and retrieval settings.
Create a controlled collection of questions with justified expected answers or expected refusal behaviour. Include ordinary questions, questions requiring information from several documents, ambiguous questions and requests that cannot be answered from authorized evidence.
| Test category | Illustrative expected behaviour |
|---|---|
| Current drawing requirement | Use the approved revision and applicable feature |
| Conflicting historical records | Identify the relevant authority and revision condition |
| Missing specification | State that sufficient evidence is unavailable |
| Restricted document | Do not disclose information outside authorized access |
| Ambiguous component identity | Request the missing identifier rather than guess |
Use real engineering workflows to select test categories, but ensure the dataset and evaluation records are handled according to the applicable information-security requirements. Maintain separation between development examples and held-out evaluation cases.
An expected answer should include necessary conditions such as units, applicability, drawing revision or referenced specifications. A numerical value without its associated condition may be incomplete even if the number itself is correct.
Measure the individual dimensions
Suppose a hypothetical evaluation contains 100 answerable questions. The appropriate evidence appears among the first five retrieved results for 88 questions. The final answer satisfies the complete engineering rubric for 80 questions, and 76 answers include citations that support all required factual claims.
These are three separate results. The first is a question-level retrieval hit rate at five under the stated relevance definition. The second measures answer correctness according to the evaluation rubric. The third measures citation support across the complete question population.
Do not call all three measures accuracy. A system may retrieve the correct document but select a superseded value from another document. It may provide the right answer while citing material that does not support it.
If questions require several pieces of evidence, a simple retrieval hit rate is insufficient. Evaluate whether the system retrieved all necessary evidence or an adequate subset to justify the response.
Test when the system should not answer
Engineering knowledge systems often contain obsolete specifications, incomplete records and restricted documents. A system that answers every question confidently may be less useful than one that recognizes when the evidence is inadequate.
Create a separate set of unanswerable and unauthorized requests. Evaluate whether the system appropriately abstains or asks for clarification, and whether it avoids revealing protected information through generated text or other outputs.
Access control should be enforced by the system architecture, not by an instruction asking the language model to behave responsibly. Include authorization testing at the retrieval and application boundaries and investigate failures as security defects.
A useful answer should also distinguish an informational statement from an approved instruction to perform work. Retrieving a historical process setting does not give an assistant authority to change equipment parameters.
Establish a release gate that reflects risk
Aggregate performance is useful for comparison, but a single average cannot represent every consequence. An incorrect answer about a general manufacturing term may be less consequential than an unsupported answer concerning a critical product characteristic.
Define acceptance criteria for relevant test categories and critical failure modes. Establish how human reviewers resolve disagreements about the expected answer. Use independent technical review where the subject requires it.
Automated evaluators can assist with repetitive assessment, but validate their judgments against suitable human-reviewed cases. A model evaluating another model can make mistakes, especially when the engineering requirement depends on a subtle drawing condition.
Repeat evaluation when the system changes
Document the evaluated configuration, corpus revision, retrieval settings and model version. Re-run representative regression tests when relevant components or document-processing methods change.
Monitor production feedback and investigate failures using authorized records. Add genuinely new failure cases to the regression suite without treating memorization of those cases as proof of general reliability.
The business objective is not simply to deploy an assistant that produces persuasive answers. It is to build a system whose engineering responses can be checked against current, authorized evidence and whose limitations are understood before people rely on it.
