Command and staff work
A secure assistant that answers from doctrine and manuals with sources, and drafts briefs from the unit's own reports.
Staff work is reading. A duty officer needs the paragraph in the operations manual that covers a river crossing at night, then a one-page brief that folds in the last three unit reports. Today that means a shared drive, a phone call to the person who wrote last month's brief, and a draft that nobody can trace to a page.
This lab builds that assistant on the RAG path. It answers only from doctrine and manuals you have indexed, it cites the document and page, and it drafts a brief from unit reports the user is allowed to read. A staff officer approves the draft. The assistant issues no order. The principles are the product requirements.
What the assistant does
Two tasks share one index.
- Answer. "What does the manual require before a night river crossing?" The system retrieves the passages, and the model answers with citations. If the passages do not contain the answer, it says so.
- Draft. "Summarise these three sitreps into the standard brief headings." The passages are the sitreps plus the brief template. The draft quotes the report it took each fact from. Headings with no supporting report stay empty.
Both tasks use the same prompt rule: use only the retrieved text, cite each fact, and leave out anything the text does not support. Fluency is not a substitute for a missing paragraph.
The corpus and the labels
Start with unclassified material you can copy into the lab: a field manual extract, a standing order, two or three sample sitreps, and the brief template. Give every chunk the metadata the rest of the series uses.
| Field | Example | Used for |
|---|---|---|
source |
doctrine/land/river-crossing.pdf |
The citation |
page |
14 |
The citation |
doc_type |
doctrine or sitrep |
Restrict a draft to reports, an answer to doctrine |
as_of |
2026-03-01 |
Prefer the current edition |
clearance |
unclassified |
Filter before retrieval |
unit |
hq |
Filter by the asker's posting |
language |
en or bn |
Bangla manuals stay in the same index |
Superseded editions stay in the index with an older as_of, and the prompt prefers the latest edition that the retrieved set actually contains. Deleting the old edition makes last year's orders unreadable. Mark them status: superseded and let the filter drop them unless the user asks for history.
Build it on OpenShift AI
Run this in an OpenShift AI workbench on the sovereign platform. The workbench has no route to the internet. Models are NIMs or an open-weight model you have already mirrored.
Index the corpus the way the RAG lab describes: parse, chunk on headings, embed, store. Keep chunks in the 300 to 800 token range so a citation is a paragraph, not a whole chapter. Store the metadata fields with each chunk.
A retrieval call for a captain in hq at clearance restricted must apply the filter in the database query, not after the model has seen the text:
hits = collection.search(
query_vector,
limit=20,
filter='clearance in ["unclassified", "restricted"] and unit == "hq"',
)
The filter values come from the token of the signed-in user, not from the question. A user who types "ignore my clearance" does not change the filter. Rerank the twenty hits and pass the best few to the model with the instruction and the question.
Log the fields the principles page lists. The workbench's experiment log is not the audit log. Write an audit event to the cluster log store for every answer.
A brief, not an order
The draft prompt asks for fixed headings the staff already use: situation, own forces, attachments, constraints, requests. Under each heading the model may only place a sentence it can hang on a source and page. The user interface shows the citation beside the sentence and a control that copies the draft into the staff system as a draft. Publishing remains the officer's action in that system.
Run a held-out set of questions before anyone relies on it. Twenty questions with a known page are enough to start. Score two things: did the right page come back, and does every sentence in the answer appear in the retrieved text? The RAG lab's measurement section is the method. When an answer is bad, read the retrieved chunks first.
Where this breaks
| What you see | What to change |
|---|---|
| The right manual exists and the answer is empty | Chunking cut the procedure in half, or the edition filter dropped it |
| The brief mixes two units | unit was not in the filter |
| The model adds a step the manual does not contain | Tighten the prompt and reject answers that fail a groundedness check |
| Bangla passages come back as noise | The parser's Bangla OCR was not tested. The records lab treats that as a first-class check |
A day in the lab
Use unclassified extracts you can afford to get wrong in public.
- Index one manual and two sitreps with the metadata table above.
- Ask for the procedure. Confirm the cited page is the page you marked.
- Ask for a fact you know is not in the corpus. The answer must refuse.
- Ask for the brief. Every filled heading has a sitrep citation. An empty heading says the reports did not contain it.
- Repeat the brief as a user whose
unitclaim is different. The other unit's sitrep is absent, and the audit event shows it was filtered.
Keep the five calls and the audit ids. That bundle is what the pilot scores later, with a larger held-out set. Do not tune the prompt on the same five questions and then treat them as the score.
The draft the officer sees
- Headings the staff already use, in their order.
- A citation on every sentence, and an empty heading where the reports are silent.
- A visible
draftmarker. Publishing is a different system. - The edition date of the doctrine that was retrieved, so a superseded paragraph is obvious.
- A control that copies the text. No control that issues an order.
What's next
- Records and archives: the same retrieval path at archive scale, in Bangla and English.
- RAG: the pipeline this assistant is built from.
- Pilots and roadmap: why this is usually one of the first two pilots.