|
369 | 369 | "outputs": [],
|
370 | 370 | "source": [
|
371 | 371 | "# Model parameters\n",
|
372 |
| - "# The LLM we will be using\n", |
373 |
| - "model_id = 'anthropic.claude-3-sonnet-20240229-v1:0'\n", |
374 |
| - " \n", |
| 372 | + "# The LLM we will be using is Anthropic Clause Sonnet 3.7\n", |
| 373 | + "model_id = 'us.anthropic.claude-3-7-sonnet-20250219-v1:0'\n", |
375 | 374 | "\n",
|
376 | 375 | "# The maximum number of tokens to use in the generated response\n",
|
377 | 376 | "max_tokens_to_sample = 1000"
|
|
431 | 430 | "source": [
|
432 | 431 | "def generate_personalize_simple_prompt(movie_list, model_id, max_tokens_to_sample = 50):\n",
|
433 | 432 | "\n",
|
434 |
| - " prompt_template = f'''\\n\\nHuman: Write a marketing email advertising several movies available in a video-on-demand streaming platform next week, given the movie and user information below. The movies to recommend and their information is contained in the <movie> tag. Put the email between <email> tags.\n", |
| 433 | + " prompt_template = f'''Write a marketing email advertising several movies available in a video-on-demand streaming platform next week, given the movie and user information below. The movies to recommend and their information is contained in the <movie> tag. Put the email between <email> tags.\n", |
435 | 434 | "\n",
|
436 | 435 | " <movie>\n",
|
437 | 436 | " {movie_list}\n",
|
438 | 437 | " </movie>\n",
|
439 | 438 | "\n",
|
440 | 439 | " Assistant: Email body:\n",
|
441 |
| - " <email>.\n", |
442 |
| - "\n", |
443 |
| - " Assistant:\n", |
| 440 | + " <email>\n", |
444 | 441 | " '''\n",
|
445 | 442 | " \n",
|
446 | 443 | " if 'claude' in model_id:\n",
|
|
556 | 553 | "source": [
|
557 | 554 | "def generate_personalize_advanced_prompt(user_demographic, favorite_genre, movie_list, model_id, max_tokens_to_sample = 50):\n",
|
558 | 555 | "\n",
|
559 |
| - " prompt_template = f'''\\n\\nHuman: You are a skilled publicist. Write a high-converting marketing email advertising several movies available in a video-on-demand streaming platform next week, \n", |
| 556 | + " prompt_template = f'''You are a skilled publicist. Write a high-converting marketing email advertising several movies available in a video-on-demand streaming platform next week, \n", |
560 | 557 | " given the movie and user information below. Your email will leverage the power of storytelling and persuasive language. \n",
|
561 | 558 | " You want the email to impress the user, so make it appealing to them based on the information contained in the <user> tags, \n",
|
562 | 559 | " and take into account the user's favorite genre in the <genre> tags. \n",
|
|
576 | 573 | " {movie_list}\n",
|
577 | 574 | " </movie>\n",
|
578 | 575 | "\n",
|
579 |
| - " Assistant:\n", |
| 576 | + " Assistant:Email body:\n", |
| 577 | + " <email>\n", |
580 | 578 | " '''\n",
|
581 | 579 | " \n",
|
582 | 580 | " if 'claude' in model_id:\n",
|
|
777 | 775 | "name": "python",
|
778 | 776 | "nbconvert_exporter": "python",
|
779 | 777 | "pygments_lexer": "ipython3",
|
780 |
| - "version": "3.10.14" |
| 778 | + "version": "3.10.16" |
781 | 779 | }
|
782 | 780 | },
|
783 | 781 | "nbformat": 4,
|
|
0 commit comments