# Agentowy RAG (agent decyduje, czego i gdzie szukać)

EN: **Agentic RAG** · id `agenticrag` · aliases: agentic retrieval, agentic RAG, RAG agentowy

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Aplikacje LLM i agenci](https://aiatlasgraph.com/t/applications.md) › [Wyszukiwanie i RAG](https://aiatlasgraph.com/t/retrieval.md) › Agentowy RAG (agent decyduje, czego i gdzie szukać)

## Description

- PL: Podejście, w którym agent steruje procesem RAG: planuje zapytania, wybiera źródła i narzędzia, ocenia trafność wyników i iteruje przed odpowiedzią.
- EN: An approach in which an agent controls the RAG process: planning queries, choosing sources and tools, grading results and iterating before answering.

## In one sentence

- PL: Asystent nie szuka raz i nie odpowiada od razu, tylko sam decyduje, gdzie szukać, ocenia znalezione materiały i w razie potrzeby szuka dalej.
- EN: Rather than searching once and answering, the assistant decides where to look, judges what it found and searches again when needed.

## Problem it solves

- PL: Jedno wyszukiwanie często przynosi nietrafione fragmenty, a złożone pytanie wymaga zebrania informacji z kilku miejsc po kolei.
- EN: A single search often brings back off-target passages, and complex questions need information gathered from several places in turn.

## What it does

- PL: Jak bibliotekarz, który po pierwszej półce widzi, że to nie to, zmienia katalog i wraca dopiero z pasującymi książkami.
- EN: Like a librarian who sees the first shelf is wrong, switches catalogue, and returns only with books that fit.

## Everyday example

- PL: Pytasz firmowego asystenta o zasady delegacji za granicę; zagląda do regulaminu, potem do tabeli stawek i łączy oba źródła.
- EN: You ask a workplace assistant about foreign travel rules; it checks the policy, then the rates table, and combines both.

## This concerns you if you…

- PL: twój asystent na dokumentach często trafia obok tematu
- PL: pytania wymagają łączenia informacji z kilku źródeł
- PL: masz dane w różnych bazach i wyszukiwarkach
- EN: find your document assistant often misses the point
- EN: ask questions that combine several sources
- EN: keep data in different databases and search engines

## Keywords

Self-RAG · Corrective RAG · Adaptive RAG · retrieval as a tool · multi-hop QA · query decomposition · iterative retrieval · reflection · multi-agent collaboration

## How it works

- PL: Wyszukiwanie jest udostępnione jako jedno lub wiele narzędzi (indeks wektorowy, SQL, sieć). Agent dekomponuje pytanie, wybiera źródło, ocenia przydatność fragmentów i przy słabych wynikach przeformułowuje zapytanie lub zmienia źródło. Wzorce obejmują refleksję, planowanie, użycie narzędzi i współpracę wielu agentów; architektury różnią się liczbą agentów i strukturą sterowania.
- EN: Retrieval is exposed as one or more tools (vector index, SQL, web). The agent decomposes the question, picks a source, grades passage usefulness and, on weak results, rewrites the query or switches source. Patterns include reflection, planning, tool use and multi-agent collaboration; architectures differ in agent count and control structure.

## Limits

- PL: Każda runda wyszukiwania i oceny dodaje opóźnienie i koszt, a nieprzewidywalna liczba kroków utrudnia testowanie. Agent może przerwać za wcześnie lub krążyć bez końca; trzeba ograniczać budżet i ocenić całe trajektorie, nie tylko odpowiedzi.
- EN: Each search-and-grade round adds latency and cost, and an unpredictable step count makes testing harder. The agent may stop too early or loop; budgets and evaluation of whole trajectories, not just answers, are needed.

## Key terms

- PL: **ocena trafności**: Sprawdzenie przez model, czy znaleziony fragment rzeczywiście dotyczy pytania.
- PL: **dekompozycja pytania**: Rozbicie złożonego pytania na prostsze podpytania do osobnego wyszukania.
- PL: **routing źródeł**: Wybór bazy lub wyszukiwarki najlepiej pasującej do danego podpytania.
- EN: **relevance grading**: The model checking whether a found passage really concerns the question.
- EN: **query decomposition**: Splitting a complex question into simpler sub-questions searched separately.
- EN: **source routing**: Choosing the database or search engine that best fits a sub-question.

## Know first

- [ReAct: rozumowanie przeplatane z działaniem (ReAct (interleaved reasoning and acting))](https://aiatlasgraph.com/t/reactagents.md)
- [Przekształcanie zapytań (Query transformation)](https://aiatlasgraph.com/t/queryrewrite.md)

## Sources

- [Agentic Retrieval-Augmented Generation: A Survey on Agentic RAG](<https://arxiv.org/abs/2501.09136>) `singh-agenticrag-survey-2025` · by Aditi Singh, Abul Ehtesham, Saket Kumar, Tala Talaei Khoei

---

AI Atlas revision 124 (2026-10-31) · HTML: https://aiatlasgraph.com/t/agenticrag · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-31
