rafmacalaba commited on
Commit
d08736d
·
1 Parent(s): bd79ab1

filter: hide consensus non-datasets (model + judge agree)

Browse files
app/components/MarkdownAnnotator.js CHANGED
@@ -93,8 +93,11 @@ export default function MarkdownAnnotator({ selectedDocIndex, selectedPage, curr
93
  }
94
  };
95
 
96
- // Pre-process the markdown text to inject highlight markers
97
- const datasets = currentPageData?.datasets || [];
 
 
 
98
  const rawText = currentPageData?.input_text || "";
99
  const highlightedText = highlightDatasets(rawText, datasets);
100
 
 
93
  }
94
  };
95
 
96
+ // Filter out consensus non-datasets (model + judge both agree)
97
+ const datasets = (currentPageData?.datasets || []).filter(ds => {
98
+ if (ds.dataset_tag === 'non-dataset' && ds.dataset_name?.judge_agrees === true) return false;
99
+ return true;
100
+ });
101
  const rawText = currentPageData?.input_text || "";
102
  const highlightedText = highlightDatasets(rawText, datasets);
103
 
app/page.js CHANGED
@@ -293,8 +293,14 @@ export default function Home() {
293
  }
294
  };
295
 
296
- // All datasets on the current page (model + human)
297
- const currentPageDatasets = currentPageData?.datasets || [];
 
 
 
 
 
 
298
 
299
  // Validate a dataset entry (approve/reject with notes)
300
  const handleValidateDataset = async (datasetIdx, updates) => {
 
293
  }
294
  };
295
 
296
+ // All datasets on the current page, excluding consensus non-datasets
297
+ // (model says non-dataset AND judge agrees)
298
+ const currentPageDatasets = (currentPageData?.datasets || []).filter(ds => {
299
+ if (ds.dataset_tag === 'non-dataset' && ds.dataset_name?.judge_agrees === true) {
300
+ return false; // both model and judge say non-dataset → skip
301
+ }
302
+ return true;
303
+ });
304
 
305
  // Validate a dataset entry (approve/reject with notes)
306
  const handleValidateDataset = async (datasetIdx, updates) => {