RAGda retrieval sifatini qanday baholash mumkin (recall@k, hit@k, MRR)?
sobes.tech AI
AIdan javob
In RAG (Retrieval-Augmented Generation), the quality of retrieval is evaluated using metrics that measure how relevant the documents returned by the model from the knowledge base are:
-
Recall@k — the proportion of relevant documents that appear in the top-k results. It indicates the completeness of the search.
-
Hit@k — a binary metric that is 1 if at least one relevant document is in the top-k results, otherwise 0. It is used to assess how often a relevant document is found.
-
MRR (Mean Reciprocal Rank) — the average value of the reciprocal rank of the first relevant document in the list. The higher the MRR, the closer the relevant documents are to the beginning.
Example: if a relevant document is at position 3, then the reciprocal rank = 1/3.
These metrics help to understand how effectively the RAG retrieval component finds the necessary information to generate responses.