# How does a maintenance assistant find the right manual?

Follow one question at a hydropower plant to see how AI reads text, retrieves a source and produces an answer a shift engineer can check.

Watt2Work · 2026-11-22 · 10 min read
Canonical: https://watt2work.com/blog/how-a-maintenance-assistant-finds-the-right-manual/
Language: en
Topics · [Artificial intelligence](https://watt2work.com/blog/topic/ai/), [Energy](https://watt2work.com/blog/topic/energy/)

At a hydropower plant, a shift engineer has just taken a vibration reading. She types, “Which form should I use for the vibration reading on pump P-17B?” The library holds an old manual for her pump and the current manual for P-17A, the pump beside it. All three documents mention pumps, vibration and forms. An assistant can say F-12 in seconds. Which line should the engineer see before opening that form?

> Look for the equipment ID, the revision in force and the line that supports the answer. If the assistant gives the wrong form, you can then tell whether to investigate the search or the writing of the answer.

Illustrative scenario. The plant, equipment identifiers, manuals and form names were created for this article. The similarity scores are example values.

![Three candidates for P-17B. The highest-scoring K-42 B is archived. K-41 D covers P-17A. The applicable K-42 C names form F-12 in section 4.2 on page 18.](https://watt2work.com/editorial/manual-ai/manual-en.png)

Illustrative document search. Three passages resemble the question. One is in force for P-17B.

## Two jobs sit behind the answer

Imagine using a paper library. First you take a file off the shelf. Then you find the page and tell the engineer what it says. You can follow those two jobs separately in an AI system. A search component retrieves passages from manuals. A language model reads the supplied passage alongside the question and writes a reply.

This arrangement is commonly called retrieval-augmented generation, or RAG. In our example, the library stores each passage with an equipment ID, revision, approval status and page number. When a question arrives, the search component selects a passage from the documents the system is allowed to read and supplies it to the model. When a manual changes, the first thing the maintenance team can check is whether the new edition made it into the search index. [Patrick Lewis et al. · Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (2020)](https://arxiv.org/abs/2005.11401).

## What does a letter, a token or a bit count?

In 1948 Claude Shannon described the average uncertainty about which symbol an information source will produce next. We call it Shannon entropy. Suppose a log emits either A or B, independently each time and with equal probability. Each new symbol carries one bit of information on average. If the log always emits A, the uncertainty about the next symbol falls to zero. Shannon credited John W. Tukey with suggesting the word “bit” for “binary digit”. [Claude E. Shannon · A Mathematical Theory of Communication (1948)](https://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf).

This idea also tells us how few bits per symbol we can approach, on average, when compressing long sequences without loss. For independent, identically distributed symbols the limit is their entropy. For symbols with dependencies, the relevant quantity under suitable conditions is the entropy rate of the source. Lossless decoding restores the exact original sequence. In this library that includes both the hyphen and the last letter in P-17B. [Claude E. Shannon · A Mathematical Theory of Communication (1948)](https://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf).

Tokenization answers a different question. Which numbered pieces will the model use to read “P-17B”? Depending on the vocabulary, the letters, digits and hyphen could form one token or several. Byte-Pair Encoding (BPE) learns its vocabulary by merging adjacent pieces that occur together frequently. A vocabulary that encodes a passage in fewer tokens might need more bits for each token ID. To compare compression, count all the encoded bits needed to recover the same original text. [Rico Sennrich, Barry Haddow, Alexandra Birch · Neural Machine Translation of Rare Words with Subword Units (2016)](https://aclanthology.org/P16-1162/).

Cross-entropy connects this to language-model training. The training text tells us which token actually comes next. If the model assigned that token a probability of 1/2, the loss for that step is one bit. At 1/8 it is three bits. The calculation is the negative base-two logarithm of the probability. Averaging these scores over many steps gives the empirical cross-entropy. Suppose the model assigns almost all its probability to a token that completes the old form code. The entropy of that prediction is low. The resulting F-09 is still the wrong form for this pump. [Jared Kaplan et al. · Scaling Laws for Neural Language Models (2020)](https://arxiv.org/abs/2001.08361).

## How can “the pump is shaking” find a page about vibration readings?

The engineer might ask, “Where do I record how much the pump is shaking?” An embedding represents something as a vector, a list of numbers. Each token at the input of a language model starts with a vector. In document search, a separate encoder can turn a whole question or a manual passage into a text vector suitable for comparison. Two descriptions can point in similar directions even when they use different words. [Nils Reimers, Iryna Gurevych · Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks (2019)](https://aclanthology.org/D19-1410/).

Cosine similarity compares the directions of two nonzero vectors. It is 1 for vectors pointing the same way and 0 for perpendicular vectors. The three illustrative scores below rank passages by how closely their texts resemble the question. The equipment register and the revision in force supply further information needed for the selection. [Nils Reimers, Iryna Gurevych · Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks (2019)](https://aclanthology.org/D19-1410/).

Three illustrative search results for the question about P-17B

| Manual and equipment | Example score | Document record |
| --- | --- | --- |
| K-42 · Rev. B · P-17B | 0.94 | Archived. Previous form F-09. |
| K-41 · Rev. D · P-17A | 0.92 | In force for the neighbouring pump. Form F-21. |
| K-42 · Rev. C · P-17B | 0.88 | In force. Section 4.2, page 18 specifies form F-12. |

An assistant that takes the first row can give a fluent answer naming F-09. Filtering on equipment ID and approved revision leaves the third row. In this example, 0.94 describes how close two text vectors are. Estimating the probability that an answer is correct would take a separate measurement.

## What does “close” mean in hundreds of dimensions?

Hold a curled sheet of paper above a table. You can describe the location of two holes in the sheet using three room coordinates. Flatten the sheet and two page coordinates locate each hole. The manifold hypothesis proposes that, in some datasets represented by many coordinates, the data can lie on or near a structure with fewer dimensions. The structure our manual vectors actually follow is a question to investigate on that dataset. [Joshua B. Tenenbaum, Vin de Silva, John C. Langford · A Global Geometric Framework for Nonlinear Dimensionality Reduction (2000)](https://redwood.berkeley.edu/wp-content/uploads/2018/08/tenenbaum-manifold.pdf).

For concentration of measure, picture a different experiment. Choose directions independently and uniformly from the surface of a high-dimensional sphere. As the dimension grows, the angle between directions is usually close to 90 degrees. This describes the spread of a measurement under a particular distribution. Trained manual embeddings need not follow that sampling scheme. A team choosing a search threshold can compare the scores of applicable and inapplicable manuals on its own questions. [T. Tony Cai, Jianqing Fan, Tiefeng Jiang · Distributions of Angles in Random Packing on Spheres (2013)](https://www.jmlr.org/papers/v14/cai13a.html).

## How does the model read the page it was given?

Predicting the next token is a training objective. The Transformer is one architecture that can serve it. Imagine a manual saying, “F-09 was closed and F-12 was opened.” Swap the codes and the instruction changes meaning. Methods such as positional encoding give the model information about where each token occurs. [Ashish Vaswani et al. · Attention Is All You Need (2017)](https://arxiv.org/abs/1706.03762).

Attention introduces three names. A query represents the information a position seeks. A key represents the features each position offers for matching. A value carries the information the match can pass on. The question “which form?” and a line containing “F-12” help us picture it. In the actual calculation the model creates Q, K and V by applying learned linear transformations to its numerical representations. [Ashish Vaswani et al. · Attention Is All You Need (2017)](https://arxiv.org/abs/1706.03762).

In standard scaled dot-product attention, the dot product of a query and each key is divided by the square root of the key dimension. Softmax turns the resulting scores into weights that sum to one across the positions the model can attend to. It takes a weighted sum of their values. A causal Transformer predicting the next token masks positions that lie in the future. Softmax and the other nonlinear operations in its layers let the whole model express more than a linear transformation. [Ashish Vaswani et al. · Attention Is All You Need (2017)](https://arxiv.org/abs/1706.03762).

Softmax appears again at the output. Inside attention, softmax weights the text positions that contribute information. At the output, softmax assigns probabilities to candidate tokens in the vocabulary. To check the basis for “F-12”, the engineer can still open the cited page. [Ashish Vaswani et al. · Attention Is All You Need (2017)](https://arxiv.org/abs/1706.03762).

## What answer should the engineer see?

> Example reply — Record the vibration reading for pump P-17B on form F-12. Source K-42, Rev. C, section 4.2, page 18. The relevant line reads “Vibration readings are recorded on form F-12.”

The engineer can open the page and check two things. Does this document apply to P-17B? Does the cited line actually name that form? Remove the current revision from the example library and a sound answer changes too. “I could not verify the revision in force for P-17B. Could you provide the current approved copy of K-42?” Now the next person knows exactly which evidence is missing.

## When has a new ability appeared?

Imagine giving the same question to three sizes of model and asking for three fields. The smallest gets the equipment right. The middle one gets the equipment and revision. The largest gets all three fields, including the form. Award one point only for a complete answer and you see 0, 0, 1. Count fields separately and you see 1/3, 2/3, 3/3. We scored the same answers twice and obtained two different pictures.

In language-model research, emergence can describe an ability that appears at a larger scale after being unobservable at smaller scales. Researchers have also shown how a choice of metric can sharpen an apparent jump in some cases. Our three answers illustrate the effect of scoring. To make a claim about a model family we would need many new questions, comparable models and more than one metric. [Jason Wei et al. · Emergent Abilities of Large Language Models (2022)](https://arxiv.org/abs/2206.07682), [Rylan Schaeffer, Brando Miranda, Sanmi Koyejo · Are Emergent Abilities of Large Language Models a Mirage? (2023)](https://arxiv.org/abs/2304.15004).

For grokking, change the horizontal axis. Hold the model size fixed and track two scores for the same model as training proceeds. In the small arithmetic experiments of Power and colleagues, the model answered training examples correctly early on. Its performance on unseen examples rose much later. This delayed generalization is called grokking. To investigate a similar claim about a maintenance model, set aside unseen equipment families in advance and track their scores throughout training. [Alethea Power et al. · Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets (2022)](https://arxiv.org/abs/2201.02177).

Scaling laws address a third question. How does average prediction loss change with model size, training data and computation? Kaplan and colleagues described the relationships with empirical power laws in the settings they studied. A maintenance team still needs its own test set to measure how often a system finds the applicable revision of K-42. [Jared Kaplan et al. · Scaling Laws for Neural Language Models (2020)](https://arxiv.org/abs/2001.08361).

## What can the model learn from two examples in the prompt?

The engineer can start the prompt with two worked examples. Each gives the equipment first, then the revision, then the page and form. When the model uses this pattern to answer a third question, we are seeing in-context learning. The examples are part of the current input and the model weights stay fixed. A fresh conversation may need the examples or the formatting instruction again. [Tom B. Brown et al. · Language Models are Few-Shot Learners (2020)](https://arxiv.org/abs/2005.14165).

Meta-learning means learning how to adapt to a new task using experience from other tasks. A researcher might train on a collection of tasks and measure how rapidly the system adapts to a new one with a small amount of data. Two worked examples can show that a model used the context in this conversation. Establishing which meta-learning method was used to train it would require evidence about the training setup. [Chelsea Finn, Pieter Abbeel, Sergey Levine · Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks (2017)](https://proceedings.mlr.press/v70/finn17a.html), [Tom B. Brown et al. · Language Models are Few-Shot Learners (2020)](https://arxiv.org/abs/2005.14165).

For a first trial, ask the same question three times. Start with the current manual available. Next add an archived edition using the same vocabulary. Finally remove the current edition. Each time, write down the passage retrieved, the line cited and the reply delivered. That small record shows whether to improve the search, how closely the reply follows the source, or the way the assistant asks for a missing document.

## Sources

The research papers document the concepts and the experiments their authors ran. Watt2Work created the P-17B example for this article. Sources checked on 21 November 2026.

1. [Claude E. Shannon · A Mathematical Theory of Communication (1948)](https://people.math.harvard.edu/~ctm/home/text/others/shannon/entropy/entropy.pdf)
2. [Rico Sennrich, Barry Haddow, Alexandra Birch · Neural Machine Translation of Rare Words with Subword Units (2016)](https://aclanthology.org/P16-1162/)
3. [Nils Reimers, Iryna Gurevych · Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks (2019)](https://aclanthology.org/D19-1410/)
4. [Patrick Lewis et al. · Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (2020)](https://arxiv.org/abs/2005.11401)
5. [Joshua B. Tenenbaum, Vin de Silva, John C. Langford · A Global Geometric Framework for Nonlinear Dimensionality Reduction (2000)](https://redwood.berkeley.edu/wp-content/uploads/2018/08/tenenbaum-manifold.pdf)
6. [T. Tony Cai, Jianqing Fan, Tiefeng Jiang · Distributions of Angles in Random Packing on Spheres (2013)](https://www.jmlr.org/papers/v14/cai13a.html)
7. [Ashish Vaswani et al. · Attention Is All You Need (2017)](https://arxiv.org/abs/1706.03762)
8. [Jason Wei et al. · Emergent Abilities of Large Language Models (2022)](https://arxiv.org/abs/2206.07682)
9. [Rylan Schaeffer, Brando Miranda, Sanmi Koyejo · Are Emergent Abilities of Large Language Models a Mirage? (2023)](https://arxiv.org/abs/2304.15004)
10. [Alethea Power et al. · Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets (2022)](https://arxiv.org/abs/2201.02177)
11. [Jared Kaplan et al. · Scaling Laws for Neural Language Models (2020)](https://arxiv.org/abs/2001.08361)
12. [Chelsea Finn, Pieter Abbeel, Sergey Levine · Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks (2017)](https://proceedings.mlr.press/v70/finn17a.html)
13. [Tom B. Brown et al. · Language Models are Few-Shot Learners (2020)](https://arxiv.org/abs/2005.14165)

## Related articles

- [Sourced answers from maintenance documents: building a local AI assistant](https://watt2work.com/blog/maintenance-documents-local-rag/)
- [How will we know an AI solution is useful?](https://watt2work.com/blog/measuring-ai-value/)
- [RSI: Can AI improve the way it improves itself?](https://watt2work.com/blog/recursive-self-improvement-evidence-and-industry/)
