"link_system_prompt = \"You are provided with a list of links found on a webpage. \\\n",
"oneshot_system_prompt = \"You are provided with a list of links found on a webpage. \\\n",
"You are able to decide which of the links would be most relevant to include in a brochure about the company, \\\n",
"You are able to decide which of the links would be most relevant to include in a brochure about the company or freelancer offering their services, \\\n",
"such as links to an About page, or a Company page, or Careers/Jobs pages.\\n\"\n",
"such as links to an About page, or a Company page, or Careers/Jobs pages.\\n\"\n",
"link_system_prompt += \"You should respond in JSON as in this example:\"\n",
"oneshot_system_prompt += \"You should respond in JSON as in this example:\"\n",
"oneshot_system_prompt += \"Make sure not to miss any relevant pages.\""
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f5a8b688-b153-41a6-8b18-f6198f3df2c9",
"metadata": {},
"outputs": [],
"source": [
"fewshot_system_prompt = \"You are provided with a list of links found on a webpage. \\\n",
"You are able to decide which of the links would be most relevant to include in a brochure about the company or freelancer offering their services, \\\n",
"such as links to an About page, or a Company page, or Careers/Jobs pages.\\n You should respond in JSON as in the following examples:\"\n",
"fewshot_system_prompt += \"Make sure not to miss any relevant pages.\""
]
]
},
},
{
{
@ -154,7 +195,8 @@
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"print(link_system_prompt)"
"print(f\"Oneshot system prompt:\\n{oneshot_system_prompt}\")\n",
"print(f\"\\n\\n\\nFewshot system prompt:\\n{fewshot_system_prompt}\")"
]
]
},
},
{
{
@ -166,8 +208,8 @@
"source": [
"source": [
"def get_links_user_prompt(website):\n",
"def get_links_user_prompt(website):\n",
" user_prompt = f\"Here is the list of links on the website of {website.url} - \"\n",
" user_prompt = f\"Here is the list of links on the website of {website.url} - \"\n",
" user_prompt += \"please decide which of these are relevant web links for a brochure about the company, respond with the full https URL in JSON format. \\\n",
" user_prompt += \"please decide which of these are relevant web links for a brochure about the company or person offering their services, respond with the full https URL in JSON format. \\\n",
"Do not include Terms of Service, Privacy, email links.\\n\"\n",
"Do not include Terms of Service, Privacy, email links or social media links.\\n\"\n",
" user_prompt += \"Links (some might be relative links):\\n\"\n",
" user_prompt += \"Links (some might be relative links):\\n\"\n",
" system_prompt = f\"You are a skilled translator. Translate the following brochure text into {language}.\\\n",
" Make sure to translate into a idiomatic {language}, matching the target language's natural structure, wording and expressions, so it can't be recognised as a translation.\\\n",
" Be sure to also meet an appropriate tone, eg a good marketing language in other languages will probably be a bit less boastful than in English.\\\n",
" Output the translated brochure in Markdown format.\"\n",