---
title: "Retrieval and RAG"
description: "An honest page about retrieval: one legal-text investigation mentioned it. I have not shipped a production RAG system."
canonical: "https://www.ayushrai.site/ai-engineering/rag/"
last-updated: "2026-10-16"
---

# Retrieval and RAG

Source: https://www.ayushrai.site/ai-engineering/rag/
Markdown: https://www.ayushrai.site/ai-engineering/rag.md

An honest page about retrieval: one legal-text investigation mentioned it. I have not shipped a production RAG system.

Evidence level: Investigation or notes, not a production system.

## Scope

Retrieval-augmented generation, RAG, usually means fetching passages and asking a model to answer from them. Chunking, embeddings, indexes, rerankers, and citation checks are the engineering. I am not going to teach that stack here as if I had operated it in production.

The evidence I do have is an investigation: NLP for legal document analysis, from August to December 2023. The summary says document structure, retrieval, and assisted review, not autonomous legal advice. It is not a peer-reviewed paper and not a production legal tool.

## What I will not carry forward from older copy

Earlier materials claimed a time reduction and a document volume. Those numbers are unverified and are not repeated here. A funding source named in older materials is also unverified. They stay off the site until confirmed.

## What a real RAG page would need

A corpus I can describe, a chunking choice, an index, a way to score retrieval separately from the model's prose, and at least one failure where the model answered from the wrong passage. I do not have that write-up. Until I do, this page should not rank as a production RAG portfolio piece, and I am not building doorway pages for synonyms of the same absence.

## Evidence

- [NLP for legal document analysis](/research/legal-nlp-contracts): Investigation. Retrieval is mentioned. Metrics are not.

## Related

- [AI engineering hub](/ai-engineering)
- [Research](/research)
- [LLM evaluation](/ai-engineering/llm-evaluation)


## Further reading

- [Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks](https://arxiv.org/abs/2005.11401): Lewis et al. Background. Not my paper.

## Gaps

- No production index, embedding model choice, reranker, or citation eval.
- No customer corpus and no permission to describe one.
- Treat any future RAG claim as new evidence, not as an extension of this paragraph.

Contact: /contact

_Unverified award metrics are omitted. Wording matches the public site._
