-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'genai-integration-metrics' of https://github.com/kartik…
…727/responsible-ai-toolbox into genai-integration-metrics
- Loading branch information
Showing
23 changed files
with
275 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
apps/dashboard/src/model-assessment-text/__mock_data__/squadGenai.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { DatasetTaskType, IDataset } from "@responsible-ai/core-ui"; | ||
|
||
export const squadGenai: IDataset = { | ||
categorical_features: [], | ||
class_names: undefined, | ||
feature_names: [ | ||
"context", | ||
"prompt", | ||
"positive_words", | ||
"negative_words", | ||
"negation_words", | ||
"negated_entities", | ||
"named_persons", | ||
"sentence_length" | ||
], | ||
features: [ | ||
[ | ||
'Architecturally, the school has a Catholic character. Atop the Main Building\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.', | ||
'Answer the question given the context.\n\ncontext:\nArchitecturally, the school has a Catholic character. Atop the Main Building\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.\n\nquestion:\nTo whom did the Virgin Mary allegedly appear in 1858 in Lourdes France?', | ||
50, | ||
0, | ||
0, | ||
0, | ||
3, | ||
827 | ||
], | ||
[ | ||
'Architecturally, the school has a Catholic character. Atop the Main Building\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.', | ||
'Answer the question given the context.\n\ncontext:\nArchitecturally, the school has a Catholic character. Atop the Main Building\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.\n\nquestion:\nWhat is in front of the Notre Dame Main Building?', | ||
50, | ||
0, | ||
0, | ||
0, | ||
2, | ||
805 | ||
], | ||
[ | ||
'Architecturally, the school has a Catholic character. Atop the Main Building\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.', | ||
'Answer the question given the context.\n\ncontext:\nArchitecturally, the school has a Catholic character. Atop the Main Building\'s gold dome is a golden statue of the Virgin Mary. Immediately in front of the Main Building and facing it, is a copper statue of Christ with arms upraised with the legend "Venite Ad Me Omnes". Next to the Main Building is the Basilica of the Sacred Heart. Immediately behind the basilica is the Grotto, a Marian place of prayer and reflection. It is a replica of the grotto at Lourdes, France where the Virgin Mary reputedly appeared to Saint Bernadette Soubirous in 1858. At the end of the main drive (and in a direct line that connects through 3 statues and the Gold Dome), is a simple, modern stone statue of Mary.\n\nquestion:\nThe Basilica of the Sacred heart at Notre Dame is beside to which structure?', | ||
52, | ||
0, | ||
0, | ||
0, | ||
3, | ||
832 | ||
] | ||
], | ||
predicted_y: [ | ||
"This is a dummy answer", | ||
"This is a dummy answer", | ||
"This is a dummy answer" | ||
], | ||
target_column: undefined, | ||
task_type: DatasetTaskType.GenerativeText, | ||
true_y: undefined | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/DetectionDetails.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { Stack, Text } from "@fluentui/react"; | ||
import { IVisionListItem } from "@responsible-ai/core-ui"; | ||
import { localization } from "@responsible-ai/localization"; | ||
import React from "react"; | ||
|
||
import { stackTokens } from "./FlyoutObjectDetectionUtils"; | ||
|
||
interface IDetectionDetailsProps { | ||
item: IVisionListItem; // replace with actual type | ||
correctDetections: string; | ||
incorrectDetections: string; | ||
} | ||
export class DetectionDetails extends React.Component<IDetectionDetailsProps> { | ||
public render(): React.ReactNode { | ||
return ( | ||
<Stack | ||
tokens={stackTokens.large} | ||
horizontalAlign="start" | ||
verticalAlign="start" | ||
> | ||
<Stack | ||
horizontal | ||
tokens={stackTokens.medium} | ||
horizontalAlign="center" | ||
verticalAlign="center" | ||
/> | ||
<Stack.Item> | ||
<Text variant="large"> | ||
{localization.InterpretVision.Dashboard.indexLabel} | ||
{this.props.item?.index} | ||
</Text> | ||
</Stack.Item> | ||
<Stack.Item> | ||
<Text variant="large"> | ||
{localization.InterpretVision.Dashboard.correctDetections} | ||
{this.props.correctDetections} | ||
</Text> | ||
</Stack.Item> | ||
<Stack.Item> | ||
<Text variant="large"> | ||
{localization.InterpretVision.Dashboard.incorrectDetections} | ||
{this.props.incorrectDetections} | ||
</Text> | ||
</Stack.Item> | ||
</Stack> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.