Skip to content

Commit 188770a

Browse files
committed
Increase #records retrievalble from courses namespace and change prompt to better handle invalid courses
1 parent 440f93a commit 188770a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

course-matrix/backend/src/constants/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const TEST_DATE_NOW = new Date(2025, 4, 14, 8, 45, 1);
4646

4747
// Set minimum results wanted for a similarity search on the associated namespace.
4848
export const namespaceToMinResults = new Map();
49-
namespaceToMinResults.set("courses_v3", 10);
49+
namespaceToMinResults.set("courses_v3", 16);
5050
namespaceToMinResults.set("offerings", 16); // Typically, more offering info is wanted.
5151
namespaceToMinResults.set("prerequisites", 5);
5252
namespaceToMinResults.set("corequisites", 5);

course-matrix/backend/src/controllers/aiController.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,8 @@ export const chat = asyncHandler(async (req: Request, res: Response) => {
443443
- If information is missing from the context but likely exists, try to use info from web to answer. If still not able to form a decent response, acknowledge the limitation
444444
- For unrelated questions, politely explain that you're specialized in UTSC academic information
445445
- If a user prompt appears like a task that requires timetable operations (like create, read, update, delete a user's timetable) BUT the user prompt doesn't start with prefix "/timetable" then remind user to use "/timetable" in front of their prompt to access these capabilities
446-
446+
- If a user asks about a course that you do not know of, acknowledge this.
447+
447448
## Available Knowledge
448449
${
449450
context === "[No context provided]"

0 commit comments

Comments
 (0)