Skip to content

Commit

Permalink
feat: final correction for negative tags
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeSlain committed Dec 24, 2024
1 parent bd621bb commit 884c934
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/pages/Evaluations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ function EvaluationPannel({
</div>
</div>
{/* Feedback tags*/}
<div className="flex flex-col gap-2">
<div className="flex flex-col gap-4">
{/* Positive tags */}
<div className="flex gap-2 items-center">
<span className={'fr-icon-thumbs-up'} />
Expand All @@ -486,7 +486,7 @@ function EvaluationPannel({
{/* Negative tags */}
<div className="flex items-center gap-2">
<span className={'fr-icon-thumbs-down '} />
<div className="flex gap-2">
<div className=" flex flex-1 flex-wrap gap-2">
{Object.entries(negativeTags).map(([tagKey, tagValue]) => (
<button
key={tagKey}
Expand Down
15 changes: 12 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,13 @@ export type ChatCompletion = {
****************************************************************/

export type PositiveReason = 'clair' | 'synthetique' | 'complet' | 'sources_fiables'
export type NegativeReason = 'incorrect' | 'incoherent' | 'manque_de_sources'
export type NegativeReason =
| 'erreurs_grammaires'
| 'hallucinations'
| 'imprecisions'
| 'inconsistance'
| 'manque_de_sources'
| 'trop_long'

export type PositiveFeedbackArray = Array<PositiveReason>
export type NegativeFeedbackArray = Array<NegativeReason>
Expand All @@ -156,9 +162,12 @@ export const positiveTags: {
export const negativeTags: {
[index: string]: NegativeReason
} = {
Incorrect: 'incorrect',
Incohérent: 'incoherent',
'Manque de sources': 'manque_de_sources',
Hallucinations: 'hallucinations',
'Erreurs grammaticales': 'erreurs_grammaires',
Inconsistance: 'inconsistance',
Imprécisions: 'imprecisions',
'Trop long': 'trop_long',
}

/**œ
Expand Down

0 comments on commit 884c934

Please sign in to comment.