implement verification model
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import fs from "fs";
|
||||
import { queryScraper } from "../tools/webSearch";
|
||||
import { rankAndDisplayData } from "../tools/triggerEventTools";
|
||||
|
||||
export function hydratePrompt(path: string, state: any) {
|
||||
export async function hydratePrompt(path: string, state: any) : Promise<string> {
|
||||
// TODO: expand into full context-based replacement engine
|
||||
|
||||
let raw = fs.readFileSync("prompts/" + path, "utf-8");
|
||||
@@ -8,5 +10,15 @@ export function hydratePrompt(path: string, state: any) {
|
||||
raw = raw.replace("###TITLE###", state.disinformationTitle);
|
||||
raw = raw.replace("###LM###", state.messages.at(-1).content);
|
||||
|
||||
if (raw.indexOf("###TECLAIM###") != -1) {
|
||||
const title = state.proposedTriggerEvent[state.proposedTriggerEventIndex].Event
|
||||
raw = raw.replace("###TECLAIM###", title)
|
||||
}
|
||||
|
||||
if (raw.indexOf("###TESEARCH###") != -1) {
|
||||
const output = state.proposedTriggerEvent[state.proposedTriggerEventIndex].context
|
||||
raw = raw.replace("###TESEARCH###", output)
|
||||
}
|
||||
|
||||
return raw;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Do the search results cited below
|
||||
###TESEARCH###
|
||||
Support the idea that the following happened:
|
||||
###TECLAIM###
|
||||
|
||||
Respond with "CONFIDENCE", followed by : followed by a confidence score (VERYHIGH, HIGH, MEDIUM, LOW, VERYLOW) followed by : followed by the reason. Use no other words, just return the score and reason in format.
|
||||
|
||||
Dates can be off by a few days, that would still be valid
|
||||
Reference in New Issue
Block a user