AI engineering glossary · RAG vector search

What is sentence window retrieval?

Sentence window retrieval: Embedding individual sentences but, at retrieval time, returning each matched sentence together with a fixed number of sentences before and after it. This gives precise matching with local context and avoids storing large chunks.

Level: advancedTopic: RAG vector search

Sentence window retrieval: an example

A matched sentence is returned with 3 sentences on each side, giving the model 7 sentences of context.

Related terms

More RAG vector search terms

Where you learn it

Sentence window retrieval is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.