Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
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
2 changes: 1 addition & 1 deletion packages/chatbot-server-mongodb-public/tsconfig.build.json
Copy link
Collaborator

@mongodben mongodben Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need the .eval.ts files in the actual build output, so i dont think this is the correct approach. rather we could make sure that the evals are being compiled prior to running the main build.

rather, we can just check that the build works using tsconfig.json, which checks all files (whereas tsconfig.build.json only compiles the stuff in the final build).

can update package.json as follows:

{
//other stuff
"scripts": {
    // checks that compiles w/o emitting the compiled files
    "build:check": "tsc --noEmit --project tsconfig.json",
    // automatically runs build:check before build (https://docs.npmjs.com/cli/v8/using-npm/scripts#pre--post-scripts)
    "prebuild": "npm run build:check",
    "build": "rm -rf ./build/ && tsc -b tsconfig.build.json",
//...
},
//...
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion, using the prebuild is a much cleaner way to get this done

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["**/*.test.ts", "**/*.eval.ts", "**/eval/**/*", "**/test/**/*"]
"exclude": ["**/*.test.ts", "**/test/**/*"]
}
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";