Skip to content
Binay Dalai

2026 · product · capstone

Offline RAG for Morgan Advanced Materials

The logo of Morgan Advanced Materials: a square monogram beside the name Morgan, with the words Advanced Materials under it.
Morgan Advanced Materials, who sponsored the capstone. The tool was built for them and is theirs, so no screen of it is shown here.

A search assistant for a manufacturer’s internal technical documents. Employees ask a question in plain English and get an answer with citations.

It runs entirely inside the company’s network on local models, so no document leaves it. Recall@5 improved by more than 75% over the baseline retriever. The code belongs to the sponsor.

The question How tight should the cover bolts be?

The answer is written from the top passages, and cites them.

Keyword search

  1. A Assembly manual, 4.2
  2. C Parts list, covers
  3. B Service bulletin 17
  4. E Safety sheet, lifting

Search by meaning

  1. B Service bulletin 17
  2. A Assembly manual, 4.2
  3. D Maintenance guide, 2.1
  4. C Parts list, covers

Merged

A0.0325B0.0323C0.0318D0.0159E0.0156

The answer, with the passages it cites

Tighten the cover bolts to the torque in the assembly manual, in a cross pattern, and check them again after the first run. [A] [B]

  • A Assembly manual, 4.2. Cover bolts: tighten to the listed torque in a cross pattern.
  • B Service bulletin 17. Re-check cover bolt torque after the first run.

A question, then two ranked lists of the same five passages: one from keyword search and one from search by meaning. The lists merge into one by reciprocal rank, shown as bars, and an answer is written from the top two passages, which are marked as cited. The question and the passages are made up. It plays by itself and repeats. Press Space, or press on it, to pause or play; the arrow keys step it by hand.

Fig. 1. A keyword list and a vector list merge into one. Illustrative data.
How this works

Two searches rank the same passages in two ways. Keyword search finds shared words; search by meaning finds passages about the same thing.

Here the lists are merged by reciprocal rank: a passage scores more the higher each list puts it, and the scores add.

The question, the passages and both rankings are made up for this figure. It shows how two rankings merge, and none of the documents the real system searches.

Result

Recall@5 improved by more than 75% over the baseline retriever.

Problem

Employees at Morgan Advanced Materials needed to search internal technical documents by asking a question in plain English. The documents could not leave the company’s network.

Approach
  1. Two kinds of search run side by side: keyword search (BM25) and search by meaning over vectors (FAISS). Their two ranked lists are merged into one, and a second model re-orders the top results.
  2. Each answer cites the passages it came from.
  3. It runs on local language models of 7 to 13 billion parameters, on the company’s own servers.
  4. Retrieval was measured against a baseline with nDCG@5 and MRR.
  5. It was built end to end: ingestion, retrieval, the API and the interface.
My role

I led the technical part of the project.

Stack
  • FAISS
  • BM25
  • LangChain
  • FastAPI
Scope and limits

Sponsor work, deployed on the company’s own servers. The code belongs to the sponsor, so there is no public repository or demo.