# Wyszukiwanie i RAG

EN: **Retrieval-augmented generation** · id `retrieval`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Aplikacje LLM i agenci](https://aiatlasgraph.com/t/applications.md) › Wyszukiwanie i RAG

## Description

- PL: Pobieranie wiedzy i używanie jej podczas odpowiedzi.
- EN: Fetching knowledge and using it while answering.

## In one sentence

- PL: To odpowiadanie z pomocą dokumentów znalezionych specjalnie dla danego pytania.
- EN: This answers a question using documents found specifically for that question.

## Problem it solves

- PL: Asystent nie zna twoich dokumentów ani informacji dodanych po jego uczeniu.
- EN: The assistant does not know your documents or information added after its training.

## What it does

- PL: Przed odpowiedzią wyszukuje potrzebne fragmenty i podaje je modelowi jak notatki do sprawdzenia przed rozmową.
- EN: Before answering, it finds relevant passages and gives them to the model, like notes to consult before a conversation.

## Everyday example

- PL: Pytasz, ile dni masz na zgłoszenie usterki, a asystent wyszukuje odpowiedni fragment w twojej umowie.
- EN: You ask how long you have to report a fault, and the assistant retrieves the relevant passage from your contract.

## This concerns you if you…

- PL: chcesz pytać asystenta o własne dokumenty
- PL: potrzebujesz odpowiedzi opartych na aktualnych materiałach
- EN: want to ask an assistant about your own documents
- EN: need answers based on current material

## Keywords

dense retrieval · sparse retrieval · hybrid search · reranking · document chunking · semantic search · BM25 · contextual compression · grounding · Recall@k · Precision@k · nDCG

## How it works

- PL: Retriever wybiera dokumenty lub fragmenty pasujące do zapytania, korzystając z indeksu słów, embeddingów albo obu podejść. Wybrane treści i ich pochodzenie trafiają do kontekstu generatora, który tworzy odpowiedź na podstawie dostarczonego materiału.
- EN: A retriever selects documents or passages matching a query using a lexical index, embeddings or both. Selected content and its provenance enter the generator's context, which produces a response from the supplied material.

## Limits

- PL: Brak odpowiedniego dokumentu lub błędny retrieval ogranicza odpowiedź nawet dobrego generatora. Dostarczony tekst nie gwarantuje poprawnego cytowania; potrzebne są ewaluacja wyszukiwania, kontrola dostępu i sprawdzanie oparcia odpowiedzi w źródłach.
- EN: Missing documents or incorrect retrieval constrain even a strong generator. Supplied text does not guarantee correct citations; retrieval evaluation, access controls and checks of answer grounding are needed.

## Key terms

- PL: **retriever**: Komponent wybierający materiały pasujące do zapytania.
- PL: **grounding**: Oparcie twierdzeń odpowiedzi na dostarczonych dowodach.
- PL: **recall wyszukiwania**: Odsetek potrzebnych materiałów odnalezionych przez wyszukiwarkę.
- EN: **retriever**: A component selecting material relevant to a query.
- EN: **grounding**: Supporting an answer's claims with supplied evidence.
- EN: **retrieval recall**: The proportion of needed material found by the search system.

## Know first

- [Embeddingi zdań i dokumentów (modele embeddingowe) (Sentence and document embeddings (embedding models))](https://aiatlasgraph.com/t/textembeddings.md)
- [Ekstrakcja tekstu ze stron i PDF (Text extraction from HTML and PDFs)](https://aiatlasgraph.com/t/textextraction.md)

## Examples

- PL: Chunking · hybrid search · reranking

## Subtopics (7 direct, 7 in total)

- [Bazy wektorowe (Vector databases)](https://aiatlasgraph.com/t/vectordb.md): Storing and searching by vectors.
- [Dzielenie dokumentów (Document chunking)](https://aiatlasgraph.com/t/chunking.md): Cutting documents into indexable pieces, preferably by structure and with metadata.
- [Hierarchiczna nawigacja dokumentów modelami decyzyjnymi (Hierarchical document navigation with decision models)](https://aiatlasgraph.com/t/decisionrag.md): Navigation through a corpus hierarchy in which a decision model evaluates branches jointly at each level without autoregressive text generation.
- [Przekształcanie zapytań (Query transformation)](https://aiatlasgraph.com/t/queryrewrite.md): Rewriting the user's question before it reaches the search.
- [Reranking i fuzja wyników (Reranking and result fusion)](https://aiatlasgraph.com/t/reranking.md): Re-ordering retrieved chunks before they reach the model, for relevance and diversity.
- [Wyszukiwanie hybrydowe (Hybrid retrieval)](https://aiatlasgraph.com/t/hybridsearch.md): Combining vector similarity with keyword matching, sometimes several vectors per document.
- [Zapytania do danych strukturalnych (Query construction for structured data)](https://aiatlasgraph.com/t/queryconstruction.md): Translating a question into a database query language when the answer lives in tables or a graph.

## Related topics

Untyped, symmetric "see also" links.

- [Asystenci językowi dla przemysłu (LLM assistants for manufacturing and maintenance)](https://aiatlasgraph.com/t/industrialassistants.md)
- [Asystent awarii oparty na instrukcjach serwisowych (RAG) (Retrieval-augmented troubleshooting over technical manuals)](https://aiatlasgraph.com/t/maintenancerag.md)
- [Grafy wiedzy (Knowledge graphs)](https://aiatlasgraph.com/t/kgraphs.md)
- [Odpowiadanie na pytania (QA) (Question answering (QA))](https://aiatlasgraph.com/t/questionanswering.md)
- [Odpowiadanie na pytania z dużego zbioru tekstów (open-domain QA) (Open-domain question answering (retriever–reader))](https://aiatlasgraph.com/t/opendomainqa.md)
- [Pośrednie wstrzykiwanie promptu (przez dokumenty i narzędzia) (Indirect prompt injection)](https://aiatlasgraph.com/t/indirectinjection.md)
- [Reprezentacje i embeddingi (Representation learning)](https://aiatlasgraph.com/t/representations.md)
- [Wykrywanie halucynacji (Hallucination detection)](https://aiatlasgraph.com/t/hallucinationdetect.md)

## Courses

- [Retrieval Augmented Generation (RAG)](<https://www.deeplearning.ai/courses/retrieval-augmented-generation>)
- [Advanced Retrieval for AI with Chroma](<https://www.deeplearning.ai/courses/advanced-retrieval-for-ai>)

## Sources

- [Hugging Face · Agents Course](<https://huggingface.co/learn/agents-course/en/unit0/introduction>) `agents` · reference: Agenci, narzędzia, frameworki, agentic RAG i ewaluacja.
- [FSDL · LLM Bootcamp (2023, archiwum)](<https://fullstackdeeplearning.com/llm-bootcamp/spring-2023/>) `bootcamp` · reference: Aplikacje LLM, prompting, retrieval, UX i LLMOps.
- [DeepLearning.AI — course catalogue](<https://www.deeplearning.ai/courses>) `dlai` · course catalogue: 42 topic labels with counts, about 130 courses.
- [LLM Course (Maxime Labonne)](<https://github.com/mlabonne/llm-course>) `mlabonne-llm-course` · by Maxime Labonne

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/retrieval · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
