Quick answer: what RAG does for engineering teams
RAG combines a search engine with a language model. When an engineer asks a question, the system first retrieves the most relevant passages from your own documents, then the model writes an answer using only those passages and cites where each fact came from.
| Generic AI chatbot | Engineering RAG system | |
|---|---|---|
| Source of answers | The model's training data | Your drawings, specs, datasheets and standards |
| Exact values (tolerances, grades, part numbers) | Often guessed | Quoted from the source document |
| Citations | None or unreliable | Document, revision, page and section for every answer |
| When the answer isn't there | Makes something up | Says it couldn't find it |
| Where it runs | Vendor cloud | Can run on-premise or air-gapped |
Typical questions it handles: "What's the surface finish on the gearbox output shaft?", "Which revision changed the bracket material?", "What does our standard say about weld inspection for this class?"
Why engineering documents break generic RAG
Most RAG tutorials assume clean prose like help-centre articles. Engineering documents are different:
- Tables carry the important data. Material properties, tolerances and part lists live in tables that naive text extraction scrambles into meaningless strings of numbers. - Exact strings matter. "6061-T6", "M8x1.25" and "ISO 2768-mK" must match exactly. Vector search, which matches by meaning, often misses or confuses them. - Revisions matter. Rev C of a drawing may contradict Rev B. An answer from the wrong revision is a wrong answer. - Drawings are mostly not text. Title blocks, notes and callouts can be extracted; the geometry itself cannot be read like a paragraph. - Scanned legacy documents need OCR, and OCR errors in numbers are dangerous. - Documents reference each other: a drawing note points to a standard, which points to a table in another standard.
A system that ignores these will look impressive in a demo and fail on the first real question.
The architecture
A production engineering RAG system has six stages:
1. Ingest PDFs, scans, datasheets, standards, drawing exports, PDM metadata
2. Parse layout-aware extraction: text, tables, title blocks, notes (OCR for scans)
3. Chunk split by document structure; attach document, revision, section
4. Index vector index (meaning) + keyword index (exact terms) + metadata
5. Retrieve hybrid search -> rerank -> top passages
6. Answer model answers only from those passages, with citationsEach stage can be tested on its own, which matters when something goes wrong: you need to know whether the answer was missed by retrieval or mangled by the model.
Parsing: keep tables, title blocks and notes intact
Parsing is where most engineering RAG projects quietly fail. Use layout-aware extraction that recognises tables and keeps rows and column headers together, rather than flattening the page to plain text. Store each table with its caption and the heading it sits under.
For drawings, extract the title block into structured metadata (part number, revision, material, finish, drawing date) and keep general notes as their own passages. That metadata becomes a filter later: "only search the current revision" or "only search this product line".
For scanned documents, run OCR and flag low-confidence numbers rather than indexing them silently. A misread "0.05" as "0.5" is exactly the kind of error that makes engineers stop trusting the tool.
Chunking by document structure
Split documents along their own structure (chapters, sections, clauses, tables) instead of fixed character counts. A good chunk is a self-contained piece of meaning: one clause of a standard, one table, one group of drawing notes. Typical chunks are a few hundred tokens, but the right size depends on the corpus and should be tuned with your evaluation set.
Every chunk should carry its context with it: document title, document number, revision, and the heading path (for example "Section 7 > Welding > Inspection"). This lets the model cite precisely, lets you filter by revision, and stops a clause from losing its meaning when it's separated from its heading.
Hybrid search: meaning and exact terms
Vector (dense) search finds passages that mean the same as the question, even with different wording. Keyword (BM25) search finds exact strings like part numbers, material grades and standard numbers. Engineering questions need both, so run both and merge the results, then use a cross-encoder reranker to order the best candidates:
def reciprocal_rank_fusion(result_lists, k=60):
scores = {}
for results in result_lists:
for rank, doc_id in enumerate(results):
scores[doc_id] = scores.get(doc_id, 0) + 1 / (k + rank + 1)
return sorted(scores, key=scores.get, reverse=True)
dense = vector_search(query, top_k=50) # meaning: "bracket corrosion protection"
sparse = bm25_search(query, top_k=50) # exact terms: "6061-T6", "ISO 2768-mK"
candidates = reciprocal_rank_fusion([dense, sparse])[:30]
top_passages = cross_encoder_rerank(query, candidates)[:6]Apply metadata filters before or during retrieval: current revision only, a specific product line, or excluding obsolete documents.
Grounded answers and citations
The generation step should be the most constrained part of the system:
1. Answer only from the retrieved passages. If they don't contain the answer, say so. 2. Quote numbers, units and part numbers exactly as written in the source; never round or convert silently. 3. Cite every fact: document, revision, page and section, with a link that opens the source. 4. Flag conflicts. If two documents disagree, show both rather than picking one.
Engineers will check the citations, especially at first. Make that easy, and the tool earns trust quickly.
Evaluation: measure before you tune
Build an evaluation set before tuning anything: 50-200 real questions from your engineers, each with the correct answer and the document it should come from. Then measure each stage separately:
| Metric | What it checks | Stage |
|---|---|---|
| Retrieval recall@k | Is the right passage in the top k results? | Search |
| Context precision | Are the retrieved passages relevant, or mostly noise? | Search |
| Faithfulness | Is every claim in the answer supported by the retrieved passages? | Generation |
| Answer correctness | Does the answer match the expected answer? | End to end |
| "Not found" accuracy | Does it decline when the answer isn't in the documents? | End to end |
Frameworks such as RAGAS automate parts of this. Rerun the set after every change to parsing, chunking, search or prompts, so improvements are measured rather than assumed.
Security and deployment
Engineering documents are often confidential: customer drawings, export-controlled data, unreleased designs. A RAG system for them can run fully on-premise or air-gapped, with a locally hosted language model, so documents never leave your network. Mirror the access permissions of your document or PDM system in the search index, so the assistant never shows an engineer a document they couldn't open directly.
How we built one
In our engineering documentation retrieval study we indexed about 40,000 technical document segments using layout-aware parsing for tables, title blocks and drawing notes. Retrieval combined dense vectors in Qdrant with BM25 keyword search, followed by a cross-encoder reranker. The model was constrained to cite retrieved passages, ran on a local LLM stack suitable for air-gapped use, and was evaluated with RAGAS on a set of technical queries. The hybrid search was what reliably captured exact part numbers and tolerance specifications.
If you want a search assistant over your own drawings, specs and manuals, our team in India builds RAG systems for engineering companies in India, the US and Europe. See our AI and ML development services or contact us to discuss your documents.

