Skip to content

Commit

Permalink
Merge pull request #247 from nulib/4745-remove-catalog-prompt
Browse files Browse the repository at this point in the history
Removes prompt to suggest NUL catalog searches, based on chat responses.
  • Loading branch information
bmquinn authored Aug 19, 2024
2 parents 790141b + 6acae9c commit cae8fcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion chat/src/helpers/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions chat/test/helpers/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cae8fcd

Please sign in to comment.