Skip to content

(EAI-1190) fix eval experiments #845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/chatbot-server-mongodb-public/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
".": "./build/lib.js"
},
"scripts": {
"build:check": "tsc --noEmit --project tsconfig.json",
"prebuild": "npm run build:check",
"build": "rm -rf ./build/ && tsc -b tsconfig.build.json",
"dev": "nodemon src/index.ts",
"format": "prettier ./src --write",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async function main({
);
const urlsNotIngested = await pageStore.getMissingPagesByUrl({
expectedUrls,
urlTransformer: normalizeUrl,
urlTransformer: (url) => normalizeUrl({ url }),
});
if (urlsNotIngested.length > 0) {
console.warn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import fs from "fs";
import path from "path";
import { makeConversationEval } from "../ConversationEval";
import { makeGenerateResponse } from "../../config";
import { addMessageToConversationStream } from "../../processors/generateResponseWithSearchTool";

async function conversationEval() {
// Get all the conversation eval cases from YAML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import fs from "fs";
import path from "path";
import { makeConversationEval } from "../ConversationEval";
import { makeGenerateResponse } from "../../config";
import { addMessageToConversationStream } from "../../processors/generateResponseWithSearchTool";

async function conversationEval() {
// Get ONLY architecture center conversations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from "../evalHelpers";
import { makeConversationEval } from "../ConversationEval";
import { closeDbConnections, makeGenerateResponse } from "../../config";
import { responsesApiStream } from "../../processors/generateResponseWithSearchTool";

const conversationEvalCases: ConversationEvalCase[] = [
// Test 1: Basic custom system prompt override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import fs from "fs";
import path from "path";
import { makeConversationEval } from "../ConversationEval";
import { makeGenerateResponse } from "../../config";
import { addMessageToConversationStream } from "../../processors/generateResponseWithSearchTool";

async function conversationEval() {
// Get dotcom question set eval cases from YAML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import "dotenv/config";
import {
Eval,
EvalCase,
EvalParameters,
EvalScorer,
EvalTask,
} from "mongodb-rag-core/braintrust";
Expand Down Expand Up @@ -62,8 +63,10 @@ const { k } = retrievalConfig.findNearestNeighborsOptions;
const retrieveRelevantContentEvalTask: EvalTask<
RetrievalEvalCaseInput,
RetrievalTaskOutput,
RetrievalEvalCaseExpected
> = async function (data) {
RetrievalEvalCaseExpected,
void,
EvalParameters
> = async function (data: RetrievalEvalCaseInput) {
// TODO: (EAI-991) implement retrieval task for evaluation
const extractedMetadata: MongoDbSearchToolArgs = {
productName: null,
Expand Down
1 change: 1 addition & 0 deletions packages/mongodb-rag-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ export * from "./VectorStore";
export * from "./arrayFilters";
export * from "./assertEnvVars";
export * from "./getEnv";
export * from "./mongoDbMetadata";