From e650762ee294d21089060703e499794cbac79c89 Mon Sep 17 00:00:00 2001 From: elronbandel Date: Mon, 20 Jan 2025 15:13:46 +0200 Subject: [PATCH] Attach assitant answers to their origins with url link Signed-off-by: elronbandel --- src/unitxt/assistant/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/unitxt/assistant/app.py b/src/unitxt/assistant/app.py index f04c3896a..d2dce81b8 100644 --- a/src/unitxt/assistant/app.py +++ b/src/unitxt/assistant/app.py @@ -87,8 +87,10 @@ def generate_response(messages, metadata_df, embeddings, model, max_tokens=500): system_prompt = ( "Your job is to assist users with Unitxt Library and Catalog. " - "Refuse to do anything else.\n\n" - "# Answer only based on the following Information:\n\n" + context + "Refuse to do anything else. " + "Based your answers on the information below add link to its origin Path with this format: https://www.unitxt.ai/en/latest/{path}.html" + "\n\n" + "# Answer only based on the following information:\n\n" + context ) messages = [