PageSourceSearch

https://app.paprik.ai/assets/Accuracy-RjIYfJUU.js

js paprik.ai collected 2026-10-05 14:50:16 UTC 17,952 bytes, 1 lines download raw bytes

1import{f as W,u as O,A as ie,e as v,r as x,j as t,D as ce,b as le,k as de,l as ue,m as me,B as C,d as ge,W as Ae,ax as he,i as pe,a_ as fe,aj as xe,P as ye,c6 as be,F as we,a0 as S,b5 as Ce,bH as ve,C as Ne,ad as Ee,ae as je,O as _e,bN as Le}from"./index-B5XhWAy1.js";import{p as M}from"./Spinner.es-BeLfjk9f.js";import{P as B}from"./PageFiltersBar-Cjlbahoi.js";import{P as Se,a as Re}from"./PipelineProgress-rce4demw.js";import{b as Te}from"./useGlobalTagFilter-OU63XEhY.js";import{f as ke}from"./formatDistanceToNowStrict-CWE5YbI7.js";import"./DateRangeSelector-DiJI4z42.js";import"./filterStyles-DrzMRc3v.js";import"./index-BiEMxay8.js";import"./Lock.es-CrElx-SB.js";import"./popover-a33fBmSw.js";import"./command-B1lQgT1w.js";import"./Tag.es-CaUdidu9.js";import"./index-fQwMzMf1.js";import"./progress-Dqm-5VA8.js";import"./ArrowsClockwise.es-zIFijwVB.js";import"./EnvelopeSimple.es-Bbe0JaKO.js";import"./actionsProcessingStrip-B-dGCvZ7.js";import"./supabaseErrorMessage-BJDdS6gc.js";import"./constructNow-IvYNCv_q.js";const Fe="accuracy-readiness",I="accuracy-latest-job",R="accuracy-latest-completed-job",We=3,Me=["pending","processing"];function T(e){return!!e&&Me.includes(e.status)}async function Pe(e){const{data:a,error:s}=await v.from("knowledge_hubs").select("id").eq("domain_id",e);if(s)throw s;const n=(a??[]).map(d=>d.id);if(n.length===0)return{hasHub:!1,hasIndexedContent:!1,indexedSourceCount:0};const{count:r,error:c}=await v.from("knowledge_sources").select("id",{count:"exact",head:!0}).in("hub_id",n).eq("status","completed");if(c)throw c;const i=r??0;return{hasHub:!0,hasIndexedContent:i>0,indexedSourceCount:i}}function De(e,a){return W({queryKey:[Fe,e],queryFn:()=>Pe(e),enabled:!!e,staleTime:3e4,gcTime:1800*1e3})}async function Ue(e){const{data:a,error:s}=await v.from("accuracy_jobs").select("id, domain_id, status, stage, run_type, kh_version, answers_total, answers_done, claims_total, claims_new, claims_cached, progress, error_message, created_at, updated_at, completed_at").eq("domain_id",e).order("created_at",{ascending:!1}).limit(1).maybeSingle();if(s)throw s;return a}async function Qe(e){const{data:a,error:s}=await v.from("accuracy_jobs").select("id, domain_id, status, stage, run_type, kh_version, answers_total, answers_done, claims_total, claims_new, claims_cached, progress, error_message, created_at, updated_at, completed_at").eq("domain_id",e).in("status",["completed","completed_with_warnings"]).order("created_at",{ascending:!1}).limit(1).maybeSingle();if(s)throw s;return a}function ze(e,a){return W({queryKey:[I,e],queryFn:()=>Ue(e),enabled:!!e,refetchInterval:s=>T(s.state.data)?2e3:!1,gcTime:1800*1e3})}function qe(e,a){const s=a?.isActive??!0;return W({queryKey:[R,e],queryFn:()=>Qe(e),enabled:s&&!!e,refetchInterval:a?.refetchWhileActive?2e3:!1,gcTime:1800*1e3})}function Je(e){const a=O();return ie({mutationFn:async s=>{if(!e)throw new Error("No active brand selected");const{data:n,error:r}=await v.functions.invoke("create-accuracy-job",{body:{domain_id:e,...s?{rejudge_scope:s}:{}}});if(r)throw r;return n},onSuccess:s=>{"job_id"in s&&a.invalidateQueries({queryKey:[I,e]})}})}const L=e=>e.toLocaleString();function Be({open:e,onOpenChange:a,counts:s,onChoose:n,isPending:r}){const[c,i]=x.useState(null),d=s?.new_answers??0,g=s?.n_not_sure??0,y=s?.n_total??0,A=p=>{i(p),n(p)},m=p=>r&&c===p?t.jsx(M,{className:"mr-1.5 animate-spin"}):null;return t.jsx(ce,{open:e,onOpenChange:r?void 0:a,children:t.jsxs(le,{className:"sm:max-w-md",children:[t.jsxs(de,{children:[t.jsx(ue,{children:"Your Knowledge Hub has changed"}),t.jsx(me,{children:"Choose what to check against the updated Knowledge Hub."})]}),t.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[d>0&&t.jsxs(C,{variant:"outline",className:"justify-between",onClick:()=>A("new_only"),disabled:r,children:[t.jsxs("span",{className:"flex items-center",children:[m("new_only"),"New answers only"]}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:[L(d)," answers"]})]}),t.jsxs(C,{className:"justify-between",onClick:()=>A("not_sure"),disabled:r||g===0,children:[t.jsxs("span",{className:"flex items-center",children:[m("not_sure"),"Unresolved claims"]}),t.jsxs("span",{className:"text-xs opacity-80",children:[L(g)," claims"]})]}),t.jsxs(C,{variant:"outline",className:"justify-between",onClick:()=>A("all"),disabled:r,children:[t.jsxs("span",{className:"flex items-center",children:[m("all"),"All claims"]}),t.jsxs("span",{className:"text-xs text-muted-foreground",children:[L(y)," claims"]})]})]})]})})}const Ke=.85,Ve=4.8,k=.4,Oe=30,F=[["dedup",.48],["cleanup",.2],["verifying",.28],["linking",.01],["theming",.02],["building_report",.01]],Ie=Object.fromEntries(F.map(([e],a)=>[e,F.slice(a).reduce((s,[,n])=>s+n,0)]));function Ye(e,a){const s=F.find(([n])=>n===e)?.[1];return s===void 0||!(a>0)?null:Math.max(20,a*k*s)}function Ge(e,a){const s=Math.max(0,e.claims_total??0),n=e.stage==="preparing"?"extracting":e.stage;if(n==="extracting"){const c=e.progress?.answers_total??e.answers_total,i=Math.min(c,e.progress?.extracted??e.answers_done);if(!c||c<=0)return null;const d=(a-new Date(e.created_at).getTime())/1e3,g=i>=Oe&&d>0,y=g?d/i:Ke,A=g&&s>0?s/i:Ve,m=Math.max(0,c-i);return m*y+(s+m*A)*k}const r=Ie[n];return r===void 0||s===0?null:s*k*r}function Ze(e,a){const s=Ge(e,a);if(s===null)return"Working out how long this will take.";const n=Math.ceil(s/60);if(n<=2)return"About 2 minutes left.";if(n<60)return`About ${n} minutes left.`;const r=Math.floor(n/60),c=Math.round(n%60/5)*5,i=`${r} hour${r===1?"":"s"}`;return c>0&&c<60?`About ${i} ${c} minutes left.`:`About ${i} left.`}const He="data:application/octet-stream;base64,UEsDBBQAAAAIAA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Vd6jmrZcd9iaNkhdMez7MhF9S27x/agZWcmi4YdNw0+XZ+9mV7fsGOznwz7ZNgnwz4Z9smwf/6Gnbs8DXvCUGy969fXY5nBqG7c7dhX7/8FUEsBAgAAFAAAAAgAAAAAAFwZd9l5AAAAngAAAA0AAAAAAAAAAAAAAAAAAAAAAG1hbmlmZXN0Lmpzb25QSwECAAAUAAAACAAAAAAA5RY2yekIAABtSwAAFQAAAAAAAAAAAAAAAACkAAAAYW5pbWF0aW9ucy8xMjM0NS5qc29uUEsFBgAAAAACAAIAfgAAAMAJAAAAAA==",Xe={durationMs:9e4,maxProgressDelta:4},$e=[{key:"preparing",label:"Preparing Knowledge Hub",subtexts:["Loading your source-of-truth content for verification.","Getting the accuracy evaluation ready."],band:[0,5]},{key:"extracting",label:"Extracting factual statements",subtexts:["Reading AI answers and pulling out factual brand claims.","Finding statements that can be checked against your Knowledge Hub."],band:[5,40],zeroDoneCreep:Xe},{key:"dedup",label:"Grouping repeated statements",subtexts:["Finding statements that say the same thing in different words.","Keeping one copy of each so it is checked once."],band:[40,52]},{key:"cleanup",label:"Picking statements worth checking",subtexts:["Setting aside opinions and vague statements.","Rating how much each statement would matter if wrong."],band:[52,58]},{key:"verifying",label:"Verifying statements",subtexts:["Comparing extracted claims with your official source material.","Checking each claim for correct, incorrect, or unresolved evidence."],band:[58,84]},{key:"linking",label:"Tracing inaccurate sources",subtexts:["Linking incorrect claims back to the web pages that cited them.","Finding which sources feed AI the wrong information."],band:[84,88]},{key:"theming",label:"Grouping inaccuracies into themes",subtexts:["Clustering incorrect and unresolved claims into broad topics.","Building the accuracy insights view."],band:[88,95]},{key:"building_report",label:"Building report",subtexts:["Scoring answers and preparing the accuracy dashboard.","Finalizing trend, LLM, and claim-level views."],band:[95,100]}];function et(e){return $e.map(a=>{const s=Ye(a.key,e.claims_total);if(s===null)return a;const[n,r]=a.band;return{...a,zeroDoneCreep:{durationMs:s*1e3,maxProgressDelta:(r-n)*.9}}})}function tt(e){const a=new Date(e);if(Number.isNaN(a.getTime()))return"Updated recently";const s=Date.now()-a.getTime();return s>=0&&s<6e4?"Updated just now":`Updated ${ke(a,{addSuffix:!0})}`}function st(e,a){const s=new Date(e);return`Last updated at ${Number.isNaN(s.getTime())?"Unknown time":Le(s,"PPpp")} · ${a}`}function at(e){if(e.stage==="extracting"){const a=e.progress?.answers_total??e.answers_total,s=e.progress?.extracted??e.answers_done;if(a>0)return{total:a,done:K(s,a)}}if(e.stage==="verifying"){const a=e.claims_total,s=e.progress?.pending_claims;if(a>0&&typeof s=="number")return{total:a,done:K(a-s,a)}}}function K(e,a){return Math.min(a,Math.max(0,e))}function w({children:e}){return t.jsx("div",{className:"flex h-full flex-col",children:t.jsx("main",{className:"flex-1 overflow-auto p-4 sm:p-6 space-y-6",children:e})})}function V({icon:e,title:a,description:s,note:n,ctaLabel:r,onCta:c,ctaLoading:i}){return t.jsx("div",{className:"mx-auto mt-6 max-w-2xl",children:t.jsxs(Ne,{className:"border-border/50 bg-card/50 shadow-sm backdrop-blur-sm",children:[t.jsxs(Ee,{className:"items-center text-center pb-4 pt-12",children:[t.jsx("div",{className:"mb-4 flex h-16 w-16 items-center justify-center rounded-2xl bg-muted/50 ring-1 ring-border/50 shadow-sm",children:e}),t.jsx(je,{className:"text-2xl font-semibold tracking-tight",children:a})]}),t.jsxs(_e,{className:"flex flex-col items-center gap-8 text-center pb-12",children:[s&&t.jsx("p",{className:"max-w-lg text-[15px] leading-relaxed text-muted-foreground",children:s}),n&&t.jsx("div",{className:"w-full max-w-lg rounded-xl border border-warning/20 bg-warning/5 p-4 text-left shadow-sm",children:t.jsxs("div",{className:"flex items-start gap-3",children:[t.jsx(S,{className:"mt-0.5 h-5 w-5 shrink-0 text-warning",weight:"duotone"}),t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-sm font-medium text-warning-foreground",children:n.title}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:n.body})]})]})}),t.jsxs(C,{size:"lg",onClick:c,disabled:i,className:"h-11 px-8 shadow-sm",children:[i?t.jsx(M,{className:"mr-2 animate-spin"}):null,r]})]})]})})}function Et(){const{primaryBrandId:e,brandName:a,brandDomain:s}=ge(),n=Ae(),r=he(),c=O(),{toast:i}=pe(),{dateRange:d,selectedPreset:g,customRange:y,onRangeChange:A,onPresetChange:m,onCustomRangeChange:p}=fe(),{selectedLLMs:E,onLLMsChange:Y}=xe(),{tags:G,selectedTagIds:j,setSelectedTagIds:Z,intentFilter:P}=Te(e),{data:_,isLoading:H}=De(e),{data:l,isLoading:X}=ze(e),{data:h,isLoading:$}=qe(e,{refetchWhileActive:T(l)}),f=Je(e),[D,N]=x.useState(null),[ee,te]=x.useState(null);x.useEffect(()=>{e&&(l?.status==="completed"||l?.status==="completed_with_warnings")&&(c.invalidateQueries({queryKey:[R,e]}),c.invalidateQueries({predicate:o=>{const u=o.queryKey[0];return typeof u=="string"&&u.startsWith("accuracy-")&&u!==R}}))},[l?.id,l?.status,e,c]);const U=x.useMemo(()=>({domainId:e,dateRange:d,llmTypes:E,intentFilter:P,tagIds:j}),[e,d,E,P,j]),se=x.useMemo(()=>({filters:U,setInlineFilters:te}),[U]),ae=r.pathname.endsWith("/accuracy/context"),b=o=>ae?t.jsx(B,{showDateRange:!1,showLLMSelector:!1}):t.jsx(B,{showDateRange:!0,showLLMSelector:!0,selectedLLMs:E,onLLMsChange:Y,selectedPreset:g,customRange:y,onRangeChange:A,onPresetChange:m,onCustomRangeChange:p,tags:G,selectedTagIds:j,onSelectedTagIdsChange:Z,inlineFilters:ee??void 0,rightContent:o}),Q=o=>{i({title:"Could not start accuracy refresh",description:o instanceof Error?o.message:"Please try again.",variant:"destructive"})},z=()=>{f.mutate(void 0,{onSuccess:o=>{if(o.status==="noop"){i({title:"Accuracy report is already up to date"});return}o.status==="requires_choice"&&N(o.counts)},onError:Q})},ne=o=>{f.mutate(o,{onSuccess:u=>{if(u.status==="requires_choice"){N(u.counts),i({title:"That option isn't available yet",description:"Choose unresolved claims or all claims instead.",variant:"destructive"});return}N(null),u.status==="noop"&&i({title:"Accuracy report is already up to date"})},onError:Q})};if(H||X||$)return t.jsxs(w,{children:[b(),t.jsx("div",{className:"mx-auto max-w-xl space-y-4",children:t.jsx(ye,{className:"h-40 w-full"})})]});if(!_?.hasHub||!_?.hasIndexedContent)return t.jsxs(w,{children:[b(),t.jsx(V,{icon:t.jsx(be,{size:28,weight:"duotone",className:"text-foreground
1/70"}),title:"Measure AI accuracy",description:"Automatically check AI answers against your official docs to spot incorrect claims.",note:{title:"Knowledge Hub required",body:"First, add your website or PDFs to serve as the source of truth."},ctaLabel:"Add Knowledge Hub",onCta:()=>n("/dashboard/context")})]});if(T(l)){const o=l,u=s?.trim(),J=a?a.charAt(0).toUpperCase()+a.slice(1):"your brand";return t.jsxs(w,{children:[b(),t.jsx(Se,{aboveTitle:t.jsx(Re,{lottieSrc:He}),title:t.jsxs(t.Fragment,{children:["Generating accuracy report for"," ",u?t.jsx(we,{domain:u,brandName:a||J,size:"md",className:"shrink-0",fallbackClassName:"bg-primary/20 text-primary text-xs font-semibold"}):null,t.jsx("span",{children:J})]}),phase:o.stage,progress:at(o),status:o.status==="pending"?"pending":"running",timeEstimate:Ze(o,Date.now()),phaseConfig:et(o),minHeightClassName:"min-h-[60vh]",persistKey:`accuracy:${o.id}`})]})}if(!(h&&(h.status==="completed"||h.status==="completed_with_warnings")))return t.jsxs(w,{children:[b(),l?.status==="failed"&&t.jsxs("div",{className:"mx-auto mb-4 flex max-w-xl items-center gap-2 rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:[t.jsx(S,{size:18}),t.jsxs("span",{children:["The last accuracy run failed",l.error_message?`: ${l.error_message}`:"."," You can try again."]})]}),t.jsx(V,{icon:t.jsx(Ce,{size:28,weight:"duotone",className:"text-foreground/70"}),title:"Run your first accuracy audit",note:(_?.indexedSourceCount??0)<We?{title:"Limited sources",body:"With few documents added, expect some 'Unresolved' results. We'll show you exactly what to document next."}:void 0,ctaLabel:"Start audit",onCta:z,ctaLoading:f.isPending})]});const q=h.completed_at??h.created_at,re=h.run_type==="first_run"?"Full history":"Incremental",oe=l?.status==="failed"&&l.id!==h?.id;return t.jsxs(w,{children:[b(t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"shrink-0 text-xs text-muted-foreground",title:st(q,re),children:tt(q)}),t.jsxs(C,{variant:"outline",size:"sm",onClick:z,disabled:f.isPending,className:"h-8 px-3 text-xs",children:[f.isPending?t.jsx(M,{className:"mr-1.5 animate-spin"}):null,"Re-verify"]})]})),oe&&t.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:[t.jsx(S,{size:18}),t.jsxs("span",{children:["Last refresh failed",l?.error_message?`: ${l.error_message}`:"."," Showing the previous report."]})]}),e?t.jsx(ve,{context:se}):null,t.jsx(Be,{open:D!==null,onOpenChange:o=>{o||N(null)},counts:D,onChoose:ne,isPending:f.isPending})]})}export{Et as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.