feat: verify analysis citations against source text
This commit is contained in:
@@ -33,6 +33,8 @@ const FAZ_RENK = {
|
||||
Sözleşme: 'bg-purple-600',
|
||||
};
|
||||
|
||||
const evidenceLabel = path => { const [field,index] = path.split('.'); return `${({itemsAndSpecs:'Kalem',documentChecklist:'Belge',qualificationCriteria:'Yeterlik',criticalRequirements:'Kritik koşul',risksAndPenalties:'Risk',criticalDetails:'Kritik ayrıntı',disqualificationRisks:'Eleme riski',deadlines:'Süre',roadmap:'Hazırlık adımı'})[field] || 'Bulgu'} ${Number(index)+1}`; };
|
||||
|
||||
const dolu = (x) => Array.isArray(x) && x.length > 0;
|
||||
|
||||
const tl = (n) =>
|
||||
@@ -81,6 +83,18 @@ export const DeepAnalysisReport = ({ results, tender: selectedTender }) => {
|
||||
<p>Boş bir bölüm, ilgili şartın kaynakta bulunmadığı anlamına gelmez.</p>
|
||||
</div>}
|
||||
|
||||
{results.sourceReview?.unverifiedFindings?.length > 0 && <p role="status" className="text-xs text-amber-800">
|
||||
{results.sourceReview.unverifiedFindings.length} bulgunun tekil kaynak alıntısı doğrulanamadı. Resmi metinden kontrol edin.
|
||||
</p>}
|
||||
{results.sourceEvidence?.length > 0 && <details className="border rounded-xl p-3 text-xs space-y-2">
|
||||
<summary className="font-bold cursor-pointer">Kaynak alıntıları ({results.sourceEvidence.length})</summary>
|
||||
<p>Metinde bulunması, modelin yorumunun doğru olduğunu tek başına kanıtlamaz.</p>
|
||||
{results.sourceEvidence.map((e,i)=><div key={i} className="border-t pt-2">
|
||||
<p className="font-semibold">{evidenceLabel(e.path)} — {e.status==='located'?'Alıntı kaynakta bulundu':e.status==='ambiguous'?'Alıntı birden fazla yerde geçiyor':'Alıntı kaynakta bulunamadı'}</p>
|
||||
<blockquote className="whitespace-pre-wrap border-l-2 pl-2 mt-1">{e.quote}</blockquote>
|
||||
</div>)}
|
||||
</details>}
|
||||
|
||||
{/* İşin kapsamı */}
|
||||
{scopeOfWork && (
|
||||
<div className="bg-white p-5 rounded-2xl border border-slate-200 shadow-xs space-y-2">
|
||||
|
||||
Reference in New Issue
Block a user