Applied AI

RAG for Engineering Documentation: Building a Search Assistant Over Drawings, Specs and Manuals, explained simply.

Every engineering team has the same problem: the answer is somewhere in thousands of PDFs, drawings, datasheets and standards, and finding it takes longer than it should. Retrieval-augmented generation (RAG) promises a search assistant that answers questions in plain language. But engineering documents break most off-the-shelf RAG setups. This guide explains why, and how to build one that engineers can actually trust.

By Tirth Borda · Co-Founder · Robotics Systems Lead7 min read
Engineering documentation search assistant answering a question with cited sources

Core idea

What this blog covers

A general-purpose chatbot that invents a tolerance, a material grade or a torque value is worse than no answer at all. Engineering answers need to be exact, traceable to a specific document and revision, and honest when the information isn't there.

Main discussion

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 chatbotEngineering RAG system
Source of answersThe model's training dataYour drawings, specs, datasheets and standards
Exact values (tolerances, grades, part numbers)Often guessedQuoted from the source document
CitationsNone or unreliableDocument, revision, page and section for every answer
When the answer isn't thereMakes something upSays it couldn't find it
Where it runsVendor cloudCan 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 citations

Each 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:

MetricWhat it checksStage
Retrieval recall@kIs the right passage in the top k results?Search
Context precisionAre the retrieved passages relevant, or mostly noise?Search
FaithfulnessIs every claim in the answer supported by the retrieved passages?Generation
Answer correctnessDoes the answer match the expected answer?End to end
"Not found" accuracyDoes 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.

Tagged

  • RAG
  • LLM
  • Technical Documentation
  • Hybrid Search
  • Applied AI

Key takeaways

What readers should remember

  • Engineering documents need layout-aware parsing: tables, title blocks and drawing notes must survive extraction intact.
  • Chunk by document structure and attach the document, revision and section to every chunk.
  • Use hybrid search: vector search finds topics, keyword search (BM25) finds exact part numbers, grades and standards.
  • Constrain the model to the retrieved sources, cite every answer, and let it say "not found".
  • Build an evaluation set from real engineers' questions before tuning anything.
Tirth Borda — Co-Founder and Robotics Systems Lead at YantriX Technologies

Written by

Tirth Borda

Co-Founder · Robotics Systems Lead

Leads robotics system architecture and technical execution at YantriX, translating product requirements into integrated mechanical, electronics, embedded, perception and autonomy systems. He guides the work from concept definition through system integration and prototype validation.

Frequently asked questions

Answers from the work itself.

What is RAG in engineering?

Retrieval-augmented generation (RAG) is a search assistant that answers questions from your own engineering documents. It retrieves the relevant passages from drawings, specs, datasheets and standards, then writes an answer using only those passages, with citations.

Can RAG read engineering drawings?

It can use the text on drawings: title blocks, notes, callouts and tables, once they are extracted with layout-aware parsing. It does not interpret the geometry itself, so dimensions shown only graphically need the CAD model or the drawing's text annotations.

Why use hybrid search instead of only vector search?

Vector search matches meaning but often misses exact strings such as part numbers, material grades and standard numbers. Keyword (BM25) search finds those exactly. Combining both gives the best retrieval for engineering questions.

Can an engineering RAG system run without the cloud?

Yes. It can run on-premise or fully air-gapped with a locally hosted language model and vector database, so confidential drawings and specifications never leave your network.

How do you stop RAG from making up tolerances or values?

Constrain the model to answer only from retrieved passages, require exact quotes for numbers and units, cite every fact, let it answer "not found", and measure faithfulness on a test set of real questions.

Related reading

Keep going on embedded & electronics.

Continue exploring

Related services and proof points

Explore our core engineering capabilities and verified hardware case studies related to this technical domain.

Engineering Consultation

Working on a similar engineering problem?

Share your technical specifications, prototype requirements, or CAD models with our engineering team. NDA support is available where required before confidential CAD exchange.