---
library: "bootstrap"
slug: "RetrievalAugment"
name: "RetrievalAugment"
ref: "RetrievalAugment#6f84"
hash: "sema:RetrievalAugment#mh:SHA-256:6f840cc4134b302b712d8f59dcca0c1b446c255369a8cea11031e884c16f3052"
type: "Memory"
layer: "Mind"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/RetrievalAugment"
---

# RetrievalAugment

Ground responses in retrieved external knowledge

Mind · Memory

## Mechanism

Before generating a response, the [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) queries an external knowledge store to retrieve material relevant to the current [Context](https://semahash.org/vocabularies/bootstrap/patterns/Context.md). The retrieval follows [ContextFirst](https://semahash.org/vocabularies/bootstrap/patterns/ContextFirst.md): the lookup completes before generation begins, and the retrieved material is supplied as context for the response. The store, retrieval method, selection policy, and response process remain caller- or descendant-defined.

## Invariants

- Query Before Generate: Retrieval must precede response generation

## Failure modes

- Retrieval Poisoning: Malicious or incorrect material returned by the store contaminates responses.
- [Context](https://semahash.org/vocabularies/bootstrap/patterns/Context.md) Stuffing: Retrieved material exceeds the available [Context](https://semahash.org/vocabularies/bootstrap/patterns/Context.md) capacity, causing critical information to be omitted or truncated.

## Where this came from

—

## Builds on

- [Context](https://semahash.org/vocabularies/bootstrap/patterns/Context.md) (references)
- [ContextFirst](https://semahash.org/vocabularies/bootstrap/patterns/ContextFirst.md) (references)
- [Agent](https://semahash.org/vocabularies/bootstrap/patterns/Agent.md) (references)

## Used by

- [CiteBack](https://semahash.org/vocabularies/bootstrap/patterns/CiteBack.md) (references)
- [DeepResearch](https://semahash.org/vocabularies/bootstrap/patterns/DeepResearch.md) (references)

## Related

- [DeepResearch](https://semahash.org/vocabularies/bootstrap/patterns/DeepResearch.md)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: RetrievalAugment#6f84
- Hash: sema:RetrievalAugment#mh:SHA-256:6f840cc4134b302b712d8f59dcca0c1b446c255369a8cea11031e884c16f3052

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/RetrievalAugment
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/RetrievalAugment.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
