experiment: recover semantic evaluation configuration
This commit is contained in:
@@ -9,6 +9,9 @@
|
||||
* Model call infrastructure is minimal: one inline helper using fetch to Ollama /api/chat.
|
||||
*/
|
||||
|
||||
import dotenv from "dotenv";
|
||||
dotenv.config({ path: ".env.local" });
|
||||
|
||||
import { describe, it, expect, beforeAll, afterEach } from "vitest";
|
||||
import { assessQuestionRelevanceToDecision } from "@/lib/graph/question-decision-relevance.js";
|
||||
|
||||
@@ -75,9 +78,11 @@ const PARAPHRASE_UNRELATED_PHR = { id: "unrel-paraphrased", label: "Which analyt
|
||||
*/
|
||||
|
||||
async function semanticInterpret(decisionTarget, unknown) {
|
||||
const baseUrl = process.env.OLLAMA_BASE_URL || "http://localhost:11434";
|
||||
const baseUrl = process.env.OLLAMA_BASE_URL;
|
||||
if (!baseUrl) throw new Error("OLLAMA_BASE_URL is not set");
|
||||
|
||||
const body = JSON.stringify({
|
||||
model: process.env.EXPERIMENT_52_MODEL || "llama3.1",
|
||||
model: process.env.OLLAMA_MODEL || "llama3.1",
|
||||
messages: [
|
||||
{ role: "system", content: SEMANTIC_INSTRUCTION },
|
||||
{ role: "user", content: `Decision: "${decisionTarget}"\nQuestion: "${unknown.label}"`, },
|
||||
|
||||
Reference in New Issue
Block a user