StudyBrixFree worksheets, study guides and courses

Artificial intelligence · University

Retrieval-augmented generation and evidence grounding

Retrieval-augmented generation first retrieves relevant source material, then conditions generation on selected context. It does not automatically make every answer correct.

Make a worksheet

Prerequisites

Embeddings, search and language-model basics.

Study notes

Pipeline

Retrieval-augmented generation first retrieves relevant source material, then conditions generation on selected context. It does not automatically make every answer correct.

Index

Chunking, document metadata and retrieval ranking influence what evidence reaches the model. Access controls must be applied before unauthorized material is retrieved.

Evidence

A useful citation points to a passage that actually supports the claim. Retrieval relevance and answer faithfulness should be evaluated separately.

Untrusted text

Retrieved documents are data, not instructions with authority over the application. Prompt injection risks require boundaries beyond just wording a prompt carefully.

Worked examples

What does retrieval add to a generation pipeline?

Retrieved context can provide evidence but still needs correct use.

Selected external context

When should document permissions be enforced?

Retrieval must not bypass access control.

Before unauthorized content is retrieved or exposed

Check your understanding

  1. Five chunks are retrieved and three are relevant under a defined rubric. Find precision at five.

  2. Why should retrieval quality and answer faithfulness be scored separately?

  3. How should an instruction embedded in an untrusted retrieved page be treated?

    1. As source content, not overriding application instructions
    2. As a new system policy automatically
    3. As authorization to reveal secrets
    4. As proof of user intent
  4. A context includes chunks of 100,150 and 200 tokens. Find their combined token count before other overhead.

Answers and marking guidance

Answers and marking notes
  1. 0.6

    3/5=0.6.

  2. The correct evidence may fail to be retrieved, or a generator may misuse evidence that was retrieved. Separate metrics locate the failure.

    Credit both pipeline stages.

  3. As source content, not overriding application instructions

    Source documents do not gain instruction authority by being retrieved.

  4. 450

    Add the stated counts.

Further reading and review references

These are reference links, not copied exercises, institutional endorsement or proof of independent review.

AI-assisted preview; independent educational review required. Level labels describe prerequisites, not accreditation or official curriculum alignment.