Skip to content

Commit 2f3d235

Browse files
committed
set up groundedness concept
1 parent ff51e23 commit 2f3d235

File tree

3 files changed

+136
-110
lines changed

3 files changed

+136
-110
lines changed

articles/ai-services/content-safety/concepts/groundedness.md

Lines changed: 1 addition & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -12,116 +12,7 @@ ms.author: pafarley
1212

1313
# Groundedness detection
1414

15-
The Groundedness detection API detects whether the text responses of large language models (LLMs) are grounded in the source materials provided by the users. Ungroundedness refers to instances where the LLMs produce information that is non-factual or inaccurate from what was present in the source materials.
16-
17-
## Key terms
18-
19-
- **Retrieval Augmented Generation (RAG)**: RAG is a technique for augmenting LLM knowledge with other data. LLMs can reason about wide-ranging topics, but their knowledge is limited to the public data that was available at the time they were trained. If you want to build AI applications that can reason about private data or data introduced after a model’s cutoff date, you need to provide the model with that specific information. The process of bringing the appropriate information and inserting it into the model prompt is known as Retrieval Augmented Generation (RAG). For more information, see [Retrieval-augmented generation (RAG)](https://python.langchain.com/docs/tutorials/rag/).
20-
- **Groundedness and Ungroundedness in LLMs**: This refers to the extent to which the model's outputs are based on provided information or reflect reliable sources accurately. A grounded response adheres closely to the given information, avoiding speculation or fabrication. In groundedness measurements, source information is crucial and serves as the grounding source.
21-
22-
23-
## Use cases
24-
25-
Groundedness detection supports text-based Summarization and QnA tasks to ensure that the generated summaries or answers are accurate and reliable.
26-
27-
**Summarization tasks**:
28-
- Medical summarization: In the context of medical news articles, Groundedness detection can be used to ensure that the summary doesn't contain fabricated or misleading information, guaranteeing that readers obtain accurate and reliable medical information.
29-
- Academic paper summarization: When the model generates summaries of academic papers or research articles, the function can help ensure that the summarized content accurately represents the key findings and contributions without introducing false claims.
30-
31-
**QnA tasks**:
32-
- Customer support chatbots: In customer support, the function can be used to validate the answers provided by AI chatbots, ensuring that customers receive accurate and trustworthy information when they ask questions about products or services.
33-
- Medical QnA: For medical QnA, the function helps verify the accuracy of medical answers and advice provided by AI systems to healthcare professionals and patients, reducing the risk of medical errors.
34-
- Educational QnA: In educational settings, the function can be applied to QnA tasks to confirm that answers to academic questions or test prep queries are factually accurate, supporting the learning process.
35-
36-
37-
Below, see several common scenarios that illustrate how and when to apply these features to achieve the best outcomes.
38-
39-
### Summarization in medical contexts
40-
41-
You're summarizing medical documents, and it’s critical that the names of patients in the summaries are accurate and consistent with the provided grounding sources.
42-
43-
Example API Request:
44-
45-
```json
46-
{
47-
"domain": "Medical",
48-
"task": "Summarization",
49-
"text": "The patient name is Kevin.",
50-
"groundingSources": [
51-
"The patient name is Jane."
52-
],
53-
}
54-
```
55-
56-
**Expected outcome:**
57-
58-
The correction feature detects that `Kevin` is ungrounded because it conflicts with the grounding source `Jane`. The API returns the corrected text: `"The patient name is Jane."`
59-
60-
### Question and answer (QnA) task with customer support data
61-
62-
You're implementing a QnA system for a customer support chatbot. It’s essential that the answers provided by the AI align with the most recent and accurate information available.
63-
64-
Example API Request:
65-
66-
```json
67-
{
68-
"domain": "Generic",
69-
"task": "QnA",
70-
"qna": {
71-
"query": "What is the current interest rate?"
72-
},
73-
"text": "The interest rate is 5%.",
74-
"groundingSources": [
75-
"As of July 2024, the interest rate is 4.5%."
76-
],
77-
}
78-
```
79-
**Expected outcome:**
80-
81-
The API detects that `5%` is ungrounded because it doesn't match the provided grounding source `4.5%`. The response includes the correction text: `"The interest rate is 4.5%."`
82-
83-
84-
### Content creation with historical data
85-
86-
You're creating content that involves historical data or events, where accuracy is critical to maintaining credibility and avoiding misinformation.
87-
88-
Example API Request:
89-
90-
```json
91-
{
92-
"domain": "Generic",
93-
"task": "Summarization",
94-
"text": "The Battle of Hastings occurred in 1065.",
95-
"groundingSources": [
96-
"The Battle of Hastings occurred in 1066."
97-
],
98-
}
99-
```
100-
**Expected outcome:**
101-
102-
The API detects the ungrounded date `1065` and corrects it to `1066` based on the grounding source. The response includes the corrected text: `"The Battle of Hastings occurred in 1066."`
103-
104-
105-
### Internal documentation summarization
106-
107-
You're summarizing internal documents where product names, version numbers, or other specific data points must remain consistent.
108-
109-
Example API Request:
110-
111-
```json
112-
{
113-
"domain": "Generic",
114-
"task": "Summarization",
115-
"text": "Our latest product is SuperWidget v2.1.",
116-
"groundingSources": [
117-
"Our latest product is SuperWidget v2.2."
118-
],
119-
}
120-
```
121-
122-
**Expected outcome:**
123-
124-
The correction feature identifies `SuperWidget v2.1` as ungrounded and updates it to `SuperWidget v2.2` in the response. The response returns the corrected text: `"Our latest product is SuperWidget v2.2."`
15+
[!INCLUDE [groundedness-detection-overview](../includes/groundedness-detection-overview.md)]
12516

12617
## Groundedness detection options
12718

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
title: "Groundedness detection overview"
3+
author: PatrickFarley
4+
manager: nitinme
5+
ms.service: azure-ai-content-safety
6+
ms.topic: include
7+
ms.date: 05/08/2025
8+
ms.author: pafarley
9+
---
10+
11+
12+
13+
The Groundedness detection feature detects whether the text responses of large language models (LLMs) are grounded in the source materials provided by the users. Ungroundedness refers to instances where the LLMs produce information that is non-factual or inaccurate from what was present in the source materials.
14+
15+
## Key terms
16+
17+
- **Retrieval Augmented Generation (RAG)**: RAG is a technique for augmenting LLM knowledge with other data. LLMs can reason about wide-ranging topics, but their knowledge is limited to the public data that was available at the time they were trained. If you want to build AI applications that can reason about private data or data introduced after a model’s cutoff date, you need to provide the model with that specific information. The process of bringing the appropriate information and inserting it into the model prompt is known as Retrieval Augmented Generation (RAG). For more information, see [Retrieval-augmented generation (RAG)](https://python.langchain.com/docs/tutorials/rag/).
18+
- **Groundedness and Ungroundedness in LLMs**: This refers to the extent to which the model's outputs are based on provided information or reflect reliable sources accurately. A grounded response adheres closely to the given information, avoiding speculation or fabrication. In groundedness measurements, source information is crucial and serves as the grounding source.
19+
20+
21+
## Use cases
22+
23+
Groundedness detection supports text-based Summarization and QnA tasks to ensure that the generated summaries or answers are accurate and reliable.
24+
25+
**Summarization tasks**:
26+
- Medical summarization: In the context of medical news articles, Groundedness detection can be used to ensure that the summary doesn't contain fabricated or misleading information, guaranteeing that readers obtain accurate and reliable medical information.
27+
- Academic paper summarization: When the model generates summaries of academic papers or research articles, the function can help ensure that the summarized content accurately represents the key findings and contributions without introducing false claims.
28+
29+
**QnA tasks**:
30+
- Customer support chatbots: In customer support, the function can be used to validate the answers provided by AI chatbots, ensuring that customers receive accurate and trustworthy information when they ask questions about products or services.
31+
- Medical QnA: For medical QnA, the function helps verify the accuracy of medical answers and advice provided by AI systems to healthcare professionals and patients, reducing the risk of medical errors.
32+
- Educational QnA: In educational settings, the function can be applied to QnA tasks to confirm that answers to academic questions or test prep queries are factually accurate, supporting the learning process.
33+
34+
35+
Below, see several common scenarios that illustrate how and when to apply these features to achieve the best outcomes.
36+
37+
### Summarization in medical contexts
38+
39+
You're summarizing medical documents, and it’s critical that the names of patients in the summaries are accurate and consistent with the provided grounding sources.
40+
41+
Example API Request:
42+
43+
```json
44+
{
45+
"domain": "Medical",
46+
"task": "Summarization",
47+
"text": "The patient name is Kevin.",
48+
"groundingSources": [
49+
"The patient name is Jane."
50+
],
51+
}
52+
```
53+
54+
**Expected outcome:**
55+
56+
The correction feature detects that `Kevin` is ungrounded because it conflicts with the grounding source `Jane`. The API returns the corrected text: `"The patient name is Jane."`
57+
58+
### Question and answer (QnA) task with customer support data
59+
60+
You're implementing a QnA system for a customer support chatbot. It’s essential that the answers provided by the AI align with the most recent and accurate information available.
61+
62+
Example API Request:
63+
64+
```json
65+
{
66+
"domain": "Generic",
67+
"task": "QnA",
68+
"qna": {
69+
"query": "What is the current interest rate?"
70+
},
71+
"text": "The interest rate is 5%.",
72+
"groundingSources": [
73+
"As of July 2024, the interest rate is 4.5%."
74+
],
75+
}
76+
```
77+
**Expected outcome:**
78+
79+
The API detects that `5%` is ungrounded because it doesn't match the provided grounding source `4.5%`. The response includes the correction text: `"The interest rate is 4.5%."`
80+
81+
82+
### Content creation with historical data
83+
84+
You're creating content that involves historical data or events, where accuracy is critical to maintaining credibility and avoiding misinformation.
85+
86+
Example API Request:
87+
88+
```json
89+
{
90+
"domain": "Generic",
91+
"task": "Summarization",
92+
"text": "The Battle of Hastings occurred in 1065.",
93+
"groundingSources": [
94+
"The Battle of Hastings occurred in 1066."
95+
],
96+
}
97+
```
98+
**Expected outcome:**
99+
100+
The API detects the ungrounded date `1065` and corrects it to `1066` based on the grounding source. The response includes the corrected text: `"The Battle of Hastings occurred in 1066."`
101+
102+
103+
### Internal documentation summarization
104+
105+
You're summarizing internal documents where product names, version numbers, or other specific data points must remain consistent.
106+
107+
Example API Request:
108+
109+
```json
110+
{
111+
"domain": "Generic",
112+
"task": "Summarization",
113+
"text": "Our latest product is SuperWidget v2.1.",
114+
"groundingSources": [
115+
"Our latest product is SuperWidget v2.2."
116+
],
117+
}
118+
```
119+
120+
**Expected outcome:**
121+
122+
The correction feature identifies `SuperWidget v2.1` as ungrounded and updates it to `SuperWidget v2.2` in the response. The response returns the corrected text: `"Our latest product is SuperWidget v2.2."`
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Groundedness Detection Filter
3+
description: Learn about the groundedness detection filter in Azure OpenAI Service.
4+
author: PatrickFarley
5+
ms.author: pafarley
6+
ms.date: 05/08/2025
7+
ms.topic: conceptual
8+
ms.service: azure-ai-openai
9+
---
10+
11+
# Groundedness detection filter
12+
13+
[!INCLUDE [groundedness-detection-overview](../../content-safety/includes/groundedness-detection-overview.md)]

0 commit comments

Comments
 (0)