From 6acae9c42a3e3ae93acd7a249a19120ccb68ddf9 Mon Sep 17 00:00:00 2001 From: Brendan Quinn Date: Mon, 19 Aug 2024 20:52:31 +0000 Subject: [PATCH] Removes prompt to suggest NUL catalog searches, based on chat responses. --- chat/src/helpers/prompts.py | 2 +- chat/test/helpers/test_metrics.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chat/src/helpers/prompts.py b/chat/src/helpers/prompts.py index 440be17d..dfa2f7c8 100644 --- a/chat/src/helpers/prompts.py +++ b/chat/src/helpers/prompts.py @@ -2,7 +2,7 @@ def prompt_template() -> str: - return """Please provide a brief answer to the question based on the documents provided. Include specific details from the documents that support your answer. Keep your answer concise and keep reading time under 45 seconds. Each document is identified by a 'title' and a unique 'source' UUID. If the documents do not answer the question, please respond that you can't seem to find enough information about [keyword] that in the Digital Collection and suggest they search NUL's catalog and construct a search link using this format: https://search.library.northwestern.edu/discovery/search?field=any&query=any,contains,keyword&institution=01NWU&vid=01NWU_INST:NULVNEW&search_scope=MyInst_and_CI&tab=Everything&mode=Basic&displayMode=full&bulkSize=10&highlight=true&dum=true&displayField=all&pcAvailabiltyMode=true&facet=rtype,exclude,reviews,lk: + return """Please provide a brief answer to the question based on the documents provided. Include specific details from the documents that support your answer. Keep your answer concise and keep reading time under 45 seconds. Each document is identified by a 'title' and a unique 'source' UUID. Documents: {context} diff --git a/chat/test/helpers/test_metrics.py b/chat/test/helpers/test_metrics.py index 308748a3..885ee262 100644 --- a/chat/test/helpers/test_metrics.py +++ b/chat/test/helpers/test_metrics.py @@ -99,10 +99,10 @@ def test_token_usage(self): expected_result = { "answer": 12, - "prompt": 462, + "prompt": 322, "question": 5, "source_documents": 527, - "total": 1006 + "total": 866 } self.assertEqual(result, expected_result)