---
schema_version: "1"
id: 95a35f0574984570ab92e4b20b2b749519909c10673cb6c5ffc36f41bac00a5e
title: About Knowledge/RAG Quality Data and Metrics
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ai/264-0-0/generative_ai_monitor_retrieval_about.md
canonical_url: https://help.salesforce.com/s/articleView?id=ai.generative_ai_monitor_retrieval_about.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a6a30ac604a32c5eea2fc36aff77dffab2b3c9ac0fe14c764d186e44ac10ece5
description: Learn about the metrics used to score retrievals. This feature collects data at run time and calculates quality scores for RAG-powered knowledge retrievals.
products:
  - Agentforce
  - Cross Cloud
release: "264"
---
# About Knowledge/RAG Quality Data and Metrics

Learn about the metrics used to score retrievals. This feature collects data at run time and calculates quality scores for RAG-powered knowledge retrievals.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions. <a href="https://help.salesforce.com/s/articleView?id=ai.agent_setup_explore_types.htm&amp;release=264.0.0&amp;type=5" title="Learn about agent types and default templates for specific clouds and common use cases.">Required add-on licenses vary by agent type.</a></td></tr></tbody></table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ai-generative_ai-264-0-0-production-enus/f8ef6498-d7b2-44e3-9b34-ffd5a850aae9/images/icon_note.png)

Note RAG quality metrics are supported for individual and ensemble retrievers.

## RAG Quality Metrics

Use quality metrics to track run-time performance, view trends, and identify areas to improve in RAG-powered solutions. RAG quality metrics help you identify problem patterns, conduct root cause analysis, and fine-tune your RAG configuration.

 
| Metric Name | Description |
| --- | --- |
| Context Precision | Measures the relevance of the retrieved context, calculated based on both the question and context. What proportion of the right knowledge was found? |
| Faithfulness | Measures the factual consistency of the generated answer against the given context. How well did the agent use the retrieved knowledge? |
| Answer Relevance | Measures how pertinent the generated answer is to the given prompt. How completely and how well is the question answered? |

## Common Patterns in RAG Quality Metrics

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:20%">
          <col style="width:40%">
          <col style="width:40%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d38614e143">Pattern</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d38614e146">Indication</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d38614e149">Investigate</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Pattern" class="slds-cell-wrap" style="vertical-align:top;" headers="d38614e143 ">High Faithfulness, Low Context Relevance</td>

            <td data-label="Indication" class="slds-cell-wrap" style="vertical-align:top;" headers="d38614e146 ">
              <p>The answer is grounded in the retrieved context, but that context isn’t
                relevant to the query. As a result, the answer relevance is also likely low. </p>
              <p style="margin-bottom:0;">This
                symptom likely indicates a problem in the retrieval.</p>
            </td>

            <td data-label="Investigate" class="slds-cell-wrap" style="vertical-align:top;" headers="d38614e149 ">
              <ul>
                <li>Does the content actually exist in the knowledge store?</li>

                <li>Is the number of returned results sufficiently high? </li>

                <li>Are the correct result ﬁelds selected?</li>

                <li>Is the search string well formed?</li>

                <li>For non-English content, is the multilingual embedding model selected?</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Pattern" class="slds-cell-wrap" style="vertical-align:top;" headers="d38614e143 ">Low Faithfulness, High-Context Relevance</td>

            <td data-label="Indication" class="slds-cell-wrap" style="vertical-align:top;" headers="d38614e146 ">
              <p>The answer isn’t grounded in the context, even though that context is relevant
                to the query. Answer relevance is also likely low. </p>
              <p style="margin-bottom:0;">This symptom likely indicates
                a problem in the LLM generation. It’s possibly due to a shortcoming in prompt
                engineering. Example: A failure of the LLM failing to give sufficiently strong
                instructions to follow the provided context.</p>
            </td>

            <td data-label="Investigate" class="slds-cell-wrap" style="vertical-align:top;" headers="d38614e149 ">
              <ul>
                <li>Is the prompt template well written?</li>

                <li>Is the LLM sufficiently capable to perform the required reasoning task? If
                  not, select a different LLM or LLM version.</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Pattern" class="slds-cell-wrap" style="vertical-align:top;" headers="d38614e143 ">High Faithfulness and High-Context Relevance, Low-Answer Relevance</td>

            <td data-label="Indication" class="slds-cell-wrap" style="vertical-align:top;" headers="d38614e146 ">
              <p>The answer is grounded in the context. That context is relevant to the query.
                However, the answer relevance is still low. </p>
              <p style="margin-bottom:0;">This symptom likely indicates that
                insufficient context was retrieved to fully answer the query. The problem is
                likely in the retrieval, particularly in the recall of the retrieval.</p>
            </td>

            <td data-label="Investigate" class="slds-cell-wrap" style="vertical-align:top;" headers="d38614e149 ">
              <ul>
                <li>Does the content actually exist in the knowledge store?</li>

                <li>Is the number of returned results sufficiently high? </li>

                <li>Are the right result ﬁelds selected?</li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

## Billing Considerations

Collecting and scoring RAG quality metrics increases your org’s credit consumption rate, including LLM calls and Data 360 features. For example, RAG retrieval is a Data 360 (system-level) operation that's not tied to the asking user’s context. To learn more, see:

- Agentforce: [Flex Credits Billable Usage Types](https://help.salesforce.com/s/articleView?id=ai.usage_flex_credits.htm&release=264.0.0&type=5 "Using Agentforce and embedded AI features can impact credit consumption.")
- Data 360: [Billing Considerations for Audit and Feedback](https://help.salesforce.com/s/articleView?id=ai.generative_ai_audit_feedback_usage_types.htm&release=264.0.0&type=5 "Generative AI Audit and Feedback consumes Data 360 credits for storage used over the allocated amount.")

#### See Also

- [About Retrieval Augmented Generation](https://help.salesforce.com/s/articleView?id=ai.generative_ai_rag_about.htm&release=264.0.0&type=5 "Learn how Retrieval Augmented Generation (RAG) in Data 360 enhances your Agentforce and Einstein generative AI solutions with knowledge.")
- [Troubleshooting Knowledge Retrieval for Agents](https://help.salesforce.com/s/articleView?id=ai.generative_ai_rag_troubleshoot.htm&release=264.0.0&type=5 "Solve common retrieval augmented generation (RAG) issues for agents.")