Skip to content

Commit

Permalink
feat: add bespoke minicheck script for support call check
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Oct 24, 2024
1 parent c3a14ab commit 1aba830
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions packages/sample/genaisrc/bespoke-fact-check.genai.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
script({
system: [],
})

async function bespokeMinicheck(document, claim) {
const res = await runPrompt(
(ctx) => {
ctx.$`Document:
${document}
Claim:
${claim}
`
},
{
model: "ollama:bespoke-minicheck",
temperature: 0,
system: [],
}
)
if (res.error) throw res.error
return res.text?.includes("Yes")
}

const ungrounded = await bespokeMinicheck(
`## Phone and video call support
GitLab does not offer support via inbound or on-demand calls.
GitLab Support Engineers communicate with you about your tickets primarily through updates in the tickets themselves. At times it may be useful and important to conduct a call, video call, or screensharing session with you to improve the progress of a ticket. The support engineer may suggest a call for that reason. You may also request a call if you feel one is needed. Either way, the decision to conduct a call always rests with the support engineer, who will determine:
* whether a call is necessary; and
* whether we have sufficient information for a successful call.
`,
"GitLab offers support for in-bound phone calls."
)
console.log({ ungrounded })

const grounded = await bespokeMinicheck(
`## Phone and video call support
GitLab does not offer support via inbound or on-demand calls.
GitLab Support Engineers communicate with you about your tickets primarily through updates in the tickets themselves. At times it may be useful and important to conduct a call, video call, or screensharing session with you to improve the progress of a ticket. The support engineer may suggest a call for that reason. You may also request a call if you feel one is needed. Either way, the decision to conduct a call always rests with the support engineer, who will determine:
* whether a call is necessary; and
* whether we have sufficient information for a successful call.
`,
"GitLab offers not support for in-bound phone calls."
)
console.log({ grounded })

0 comments on commit 1aba830

Please sign in to comment.