# Miary jakości wyszukiwania (recall@k, MRR, nDCG)

EN: **Retrieval quality metrics (recall@k, MRR, nDCG)** · id `retrievalmetrics` · aliases: recall@k, precision@k, MRR, nDCG, mean reciprocal rank, metryki wyszukiwania

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Ewaluacja i interpretowalność](https://aiatlasgraph.com/t/evaluation.md) › [Ewaluacja RAG i agentów](https://aiatlasgraph.com/t/agenteval.md) › Miary jakości wyszukiwania (recall@k, MRR, nDCG)

## Description

- PL: Miary rankingowe oceniające etap retrievalu względem oznaczonych istotnych dokumentów.
- EN: Ranking metrics that grade the retrieval stage against labelled relevant documents.

## In one sentence

- PL: Mierzysz, czy wyszukiwarka w twoim systemie podaje potrzebny dokument wśród pierwszych kilku wyników i jak wysoko.
- EN: You measure whether the search step in your system puts the needed document among the first few results, and how high.

## Problem it solves

- PL: Gdy asystent odpowiada źle, nie wiadomo, czy zawiódł model, czy po prostu nie dostał właściwego dokumentu.
- EN: When an assistant answers badly, you cannot tell whether the model failed or it simply never got the right document.

## What it does

- PL: Ocenia sam etap szukania osobno od pisania odpowiedzi, jak sprawdzenie, czy bibliotekarz podał właściwą książkę, zanim ktoś ją streszcza.
- EN: It grades the search step apart from answer writing, like checking the librarian handed over the right book before anyone summarises it.

## Everyday example

- PL: Na stu pytaniach z oznaczonymi właściwymi stronami instrukcji widzisz, że po zmianie podziału dokumentów potrzebna strona częściej trafia do pierwszej piątki.
- EN: On a hundred questions with the correct manual pages marked, you see that after re-splitting the documents the needed page lands in the top five more often.

## This concerns you if you…

- PL: system przed odpowiedzią szuka w twoich dokumentach
- PL: zmieniasz sposób dzielenia albo wyszukiwania tekstów
- PL: chcesz wiedzieć, gdzie powstaje błąd
- EN: your system searches your documents before answering
- EN: you change how texts are split or searched
- EN: you want to know where errors arise

## Keywords

nDCG@10 · recall@k · MRR · precision@k · MAP · BEIR · qrels · hit rate

## How it works

- PL: Dla pytań z oznaczonymi istotnymi dokumentami liczy się recall@k (odsetek istotnych w top-k), precision@k, MRR (odwrotność pozycji pierwszego trafienia) oraz nDCG@k, które nagradza wysoką pozycję i obsługuje stopniowaną istotność.
- EN: For questions with labelled relevant documents, compute recall@k (share of relevant items in the top k), precision@k, MRR (inverse rank of the first hit) and nDCG@k, which rewards high positions and supports graded relevance.

## Limits

- PL: Wymaga etykiet istotności, które są drogie i bywają niepełne: nieoznaczony, lecz trafny dokument liczy się jako pudło. Dobre miary wyszukiwania nie gwarantują dobrej odpowiedzi końcowej.
- EN: It needs relevance labels, which are costly and often incomplete: an unlabelled but relevant document counts as a miss. Good retrieval scores do not guarantee a good final answer.

## Key terms

- PL: **recall@k**: Jaka część potrzebnych dokumentów trafiła do pierwszych k wyników.
- PL: **MRR**: Średnia z odwrotności pozycji pierwszego trafnego wyniku.
- PL: **nDCG**: Miara nagradzająca trafne wyniki tym bardziej, im wyżej stoją.
- EN: **recall@k**: What share of the needed documents reached the first k results.
- EN: **MRR**: Average of the inverse position of the first relevant result.
- EN: **nDCG**: A score that rewards relevant results more the higher they rank.

## Know first

- [Wyszukiwanie i RAG (Retrieval-augmented generation)](https://aiatlasgraph.com/t/retrieval.md)
- [Niepewność statystyczna wyników ewaluacji (Statistical uncertainty in evaluations)](https://aiatlasgraph.com/t/evalstats.md)

## Related topics

Untyped, symmetric "see also" links.

- [Reranking i fuzja wyników (Reranking and result fusion)](https://aiatlasgraph.com/t/reranking.md)
- [Uczenie rankingu (learning to rank) (Learning to rank)](https://aiatlasgraph.com/t/learningtorank.md)

## Sources

- [BEIR: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models](<https://arxiv.org/abs/2104.08663>) `beir-2021` · by Nandan Thakur, Nils Reimers, Andreas Rücklé, Abhishek Srivastava, Iryna Gurevych (UKP Lab, TU Darmstadt)

---

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