Skip to content

Commit c176e60

Browse files
committed
edit some comments
1 parent 3146d1f commit c176e60

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

packages/compass-assistant/test/assistant.eval.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,10 @@ type ConversationEvalCase = EvalCase<
4343
ConversationEvalCaseExpected,
4444
unknown
4545
> & {
46-
name: string; // defaults to the prompt
46+
name: string;
4747
};
4848

4949
type ConversationTaskOutput = {
50-
// again this could also be an array of messages and each message could be an
51-
// object for future-proofing. But we're probably just going to be taking the
52-
// result from the chatbot as a block of text for test purposes
5350
messages: ExpectedMessage[];
5451
};
5552

@@ -106,7 +103,7 @@ async function makeAssistantCall(
106103
}
107104
const text = chunks.join('');
108105

109-
// TODO: something up with this type
106+
// TODO: something's up with this type. url does exist on it.
110107
const resolvedSources = (await result.sources) as { url: string }[];
111108

112109
const sources = resolvedSources
@@ -141,13 +138,13 @@ const BinaryNdcgAt5: ConversationEvalScorer = ({ output, expected }) => {
141138
name,
142139
score: binaryNdcgAtK(expectedLinks, outputLinks, fuzzyLinkMatch, k),
143140
};
144-
} else {
145-
// If there are no expected links, return null
146-
return {
147-
name,
148-
score: null,
149-
};
150141
}
142+
143+
// If there are no expected links, just return null
144+
return {
145+
name,
146+
score: null,
147+
};
151148
};
152149

153150
void Eval<

0 commit comments

Comments
 (0)