How retrieval-augmented answers work
The assistant does two jobs. First it finds. Your documents are split into passages, each passage is turned into a numeric representation of its meaning, and those are stored in a search index next to the plain text. When someone asks a question, the system searches by meaning and by exact keywords, because contract numbers and clause references need exact matches while policy questions need meaning. Second it writes. The best passages are given to a language model with an instruction to answer only from them and to cite them.
Most of the quality comes from the finding step, not the model. How you split a document, whether tables survive, how headings travel with their paragraphs and how duplicates are handled decide whether the right passage is even offered. Microsoft's and AWS's own documentation describe the same pattern, and we use their managed search services or open-source stores depending on where your data must live. We show you the retrieved passages during testing so you can see why an answer was good or bad.
