# Wierność odpowiedzi wobec znalezionych źródeł (RAG)

EN: **RAG faithfulness and answer relevance metrics** · id `ragfaithfulness` · aliases: faithfulness, groundedness, answer relevance, context relevance, ugruntowanie w źródłach

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) › Wierność odpowiedzi wobec znalezionych źródeł (RAG)

## Description

- PL: Metryki RAG oceniające ugruntowanie odpowiedzi w kontekście, jej trafność względem pytania i trafność samego kontekstu.
- EN: RAG metrics scoring how grounded an answer is in its context, how relevant it is to the question and how relevant the context is.

## In one sentence

- PL: Sprawdzasz, czy każde zdanie odpowiedzi ma pokrycie w dokumentach, które system przed chwilą znalazł, i czy odpowiada na pytanie.
- EN: You check whether every sentence of an answer is backed by the documents the system just found, and whether it answers the question.

## Problem it solves

- PL: Asystent czytający firmowe dokumenty potrafi dopisać rzeczy, których w nich nie ma, a brzmi przy tym pewnie.
- EN: An assistant that reads company documents can add things that are not in them while sounding sure of itself.

## What it does

- PL: Jak redaktor sprawdzający przypisy: rozbija odpowiedź na pojedyncze twierdzenia i przy każdym szuka potwierdzenia w źródle.
- EN: Like an editor checking footnotes: it splits the answer into single claims and looks for support for each one in the source.

## Everyday example

- PL: Pracownik pyta o limit delegacji; ocena pokazuje, że kwota w odpowiedzi nie występuje w żadnym znalezionym fragmencie regulaminu.
- EN: An employee asks about the travel allowance; the check shows the amount in the answer appears in none of the retrieved policy passages.

## This concerns you if you…

- PL: budujesz asystenta odpowiadającego z twoich dokumentów
- PL: odpowiedzi muszą trzymać się źródła, nie wiedzy ogólnej modelu
- EN: you build an assistant that answers from your documents
- EN: answers must stick to the source, not the model's general knowledge

## Keywords

RAGAS · faithfulness · groundedness · answer relevancy · context relevance · claim decomposition

## How it works

- PL: Wierność: sędzia LLM rozkłada odpowiedź na twierdzenia i sprawdza, które wynikają z kontekstu; wynik to odsetek popartych. Trafność odpowiedzi: z odpowiedzi generuje się pytania i porównuje ich embeddingi z oryginalnym. Trafność kontekstu: odsetek zdań kontekstu potrzebnych do odpowiedzi. Metryki nie wymagają wzorcowych odpowiedzi.
- EN: Faithfulness: an LLM judge splits the answer into statements and checks which follow from the context; the score is the supported fraction. Answer relevance: questions generated from the answer are compared by embedding similarity to the original. Context relevance: the fraction of context sentences needed for the answer. No reference answers are required.

## Limits

- PL: Wynik zależy od modelu-sędziego i jego promptu, więc różni się między narzędziami. Wierność mówi tylko o zgodności ze znalezionym tekstem, nie o prawdzie: błędne źródło daje wierną, lecz złą odpowiedź. Trafność kontekstu jest najmniej zgodna z oceną ludzi.
- EN: Scores depend on the judge model and prompt, so they differ across tools. Faithfulness only means agreement with retrieved text, not truth: a wrong source yields a faithful but wrong answer. Context relevance agrees least with human ratings.

## Key terms

- PL: **faithfulness**: Odsetek twierdzeń odpowiedzi, które wynikają z podanego kontekstu.
- PL: **answer relevance**: Na ile odpowiedź trafia w zadane pytanie, bez lania wody.
- PL: **ocena bez wzorca**: Metryka liczona bez ręcznie napisanej poprawnej odpowiedzi.
- EN: **faithfulness**: The share of answer claims that follow from the given context.
- EN: **answer relevance**: How directly the answer addresses the question, without padding.
- EN: **reference-free evaluation**: A metric computed without a hand-written correct answer.

## Know first

- [Wyszukiwanie i RAG (Retrieval-augmented generation)](https://aiatlasgraph.com/t/retrieval.md)
- [Wykrywanie halucynacji (Hallucination detection)](https://aiatlasgraph.com/t/hallucinationdetect.md)

## Sources

- [Ragas: Automated Evaluation of Retrieval Augmented Generation](<https://arxiv.org/abs/2309.15217>) `ragas-2023` · by Shahul Es, Jithin James, Luis Espinosa-Anke, Steven Schockaert

---

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