From 66a96cced093094860a72b5511e8c089f7dd51f7 Mon Sep 17 00:00:00 2001 From: Hassan Abedi Date: Fri, 28 Jun 2024 12:20:29 +0200 Subject: [PATCH] WIP --- notebooks/demo_openai.ipynb | 190 ++++++++++++++++++------------------ pyproject.toml | 2 +- 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/notebooks/demo_openai.ipynb b/notebooks/demo_openai.ipynb index da997ff..ad0bc66 100644 --- a/notebooks/demo_openai.ipynb +++ b/notebooks/demo_openai.ipynb @@ -26,8 +26,8 @@ "metadata": { "collapsed": true, "ExecuteTime": { - "end_time": "2024-06-27T20:38:34.270767Z", - "start_time": "2024-06-27T20:38:33.101181Z" + "end_time": "2024-06-28T10:18:43.739079Z", + "start_time": "2024-06-28T10:18:42.876084Z" } }, "source": [ @@ -55,8 +55,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:34.274346Z", - "start_time": "2024-06-27T20:38:34.271864Z" + "end_time": "2024-06-28T10:18:43.741726Z", + "start_time": "2024-06-28T10:18:43.739941Z" } }, "cell_type": "code", @@ -78,8 +78,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-06-27T20:38:34.278864Z", - "start_time": "2024-06-27T20:38:34.275281Z" + "end_time": "2024-06-28T10:18:43.748317Z", + "start_time": "2024-06-28T10:18:43.742183Z" } }, "id": "5c47615b36a77ea7", @@ -95,8 +95,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:34.286128Z", - "start_time": "2024-06-27T20:38:34.280539Z" + "end_time": "2024-06-28T10:18:43.754846Z", + "start_time": "2024-06-28T10:18:43.749225Z" } }, "cell_type": "code", @@ -137,8 +137,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:34.290128Z", - "start_time": "2024-06-27T20:38:34.287404Z" + "end_time": "2024-06-28T10:18:43.760982Z", + "start_time": "2024-06-28T10:18:43.755385Z" } }, "cell_type": "code", @@ -154,8 +154,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:34.293150Z", - "start_time": "2024-06-27T20:38:34.290870Z" + "end_time": "2024-06-28T10:18:43.767440Z", + "start_time": "2024-06-28T10:18:43.761435Z" } }, "cell_type": "code", @@ -191,8 +191,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-06-27T20:38:34.309337Z", - "start_time": "2024-06-27T20:38:34.293803Z" + "end_time": "2024-06-28T10:18:43.787395Z", + "start_time": "2024-06-28T10:18:43.768130Z" } }, "id": "d4373fdb670dddb4", @@ -205,8 +205,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-06-27T20:38:34.318455Z", - "start_time": "2024-06-27T20:38:34.310229Z" + "end_time": "2024-06-28T10:18:43.792765Z", + "start_time": "2024-06-28T10:18:43.788132Z" } }, "id": "afca07705eed8007", @@ -215,11 +215,11 @@ "data": { "text/plain": [ " id text\n", - "0 sample_letter_261 Dear Hiring Manager,\\n\\nI am writing to expres...\n", - "1 sample_letter_709 Dear Hiring Manager,\\n\\nI am writing to expres...\n", - "2 sample_letter_791 Dear Hiring Manager,\\n\\nI am writing to expres...\n", - "3 sample_letter_252 I am highly interested in the position of Seni...\n", - "4 sample_letter_376 Dear Hiring Manager,\\n\\nI am writing to expres..." + "0 sample_letter_507 I am writing to apply for the System Administr...\n", + "1 sample_letter_649 I am excited to apply for the AI Engineer posi...\n", + "2 sample_letter_480 Dear Hiring Manager,\\n\\nI am writing to expres...\n", + "3 sample_letter_605 Dear Hiring Manager,\\n\\nI am writing to expres...\n", + "4 sample_letter_746 I am writing to express my interest in the Dat..." ], "text/html": [ "
\n", @@ -247,28 +247,28 @@ " \n", " \n", " 0\n", - " sample_letter_261\n", - " Dear Hiring Manager,\\n\\nI am writing to expres...\n", + " sample_letter_507\n", + " I am writing to apply for the System Administr...\n", " \n", " \n", " 1\n", - " sample_letter_709\n", - " Dear Hiring Manager,\\n\\nI am writing to expres...\n", + " sample_letter_649\n", + " I am excited to apply for the AI Engineer posi...\n", " \n", " \n", " 2\n", - " sample_letter_791\n", + " sample_letter_480\n", " Dear Hiring Manager,\\n\\nI am writing to expres...\n", " \n", " \n", " 3\n", - " sample_letter_252\n", - " I am highly interested in the position of Seni...\n", + " sample_letter_605\n", + " Dear Hiring Manager,\\n\\nI am writing to expres...\n", " \n", " \n", " 4\n", - " sample_letter_376\n", - " Dear Hiring Manager,\\n\\nI am writing to expres...\n", + " sample_letter_746\n", + " I am writing to express my interest in the Dat...\n", " \n", " \n", "\n", @@ -299,8 +299,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-06-27T20:38:34.321523Z", - "start_time": "2024-06-27T20:38:34.319303Z" + "end_time": "2024-06-28T10:18:43.797961Z", + "start_time": "2024-06-28T10:18:43.793298Z" } }, "id": "c7e7e469ae9840ea", @@ -313,8 +313,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-06-27T20:38:34.347171Z", - "start_time": "2024-06-27T20:38:34.323154Z" + "end_time": "2024-06-28T10:18:43.816854Z", + "start_time": "2024-06-28T10:18:43.799109Z" } }, "id": "47b55c370e9b849a", @@ -337,8 +337,8 @@ "metadata": { "collapsed": false, "ExecuteTime": { - "end_time": "2024-06-27T20:38:38.438888Z", - "start_time": "2024-06-27T20:38:34.348171Z" + "end_time": "2024-06-28T10:18:47.098446Z", + "start_time": "2024-06-28T10:18:43.817470Z" } }, "id": "68a6d6e054a998b0", @@ -348,8 +348,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:38.446896Z", - "start_time": "2024-06-27T20:38:38.439946Z" + "end_time": "2024-06-28T10:18:47.104784Z", + "start_time": "2024-06-28T10:18:47.099229Z" } }, "cell_type": "code", @@ -360,18 +360,18 @@ "data": { "text/plain": [ " id text \\\n", - "0 sample_letter_261 Dear Hiring Manager,\\n\\nI am writing to expres... \n", - "1 sample_letter_709 Dear Hiring Manager,\\n\\nI am writing to expres... \n", - "2 sample_letter_791 Dear Hiring Manager,\\n\\nI am writing to expres... \n", - "3 sample_letter_252 I am highly interested in the position of Seni... \n", - "4 sample_letter_376 Dear Hiring Manager,\\n\\nI am writing to expres... \n", + "0 sample_letter_507 I am writing to apply for the System Administr... \n", + "1 sample_letter_649 I am excited to apply for the AI Engineer posi... \n", + "2 sample_letter_480 Dear Hiring Manager,\\n\\nI am writing to expres... \n", + "3 sample_letter_605 Dear Hiring Manager,\\n\\nI am writing to expres... \n", + "4 sample_letter_746 I am writing to express my interest in the Dat... \n", "\n", " embedding \n", - "0 [0.024967342615127563, 0.020443491637706757, 0... \n", - "1 [0.035281553864479065, 0.024604523554444313, 0... \n", - "2 [0.030405910685658455, 0.024307049810886383, 0... \n", - "3 [0.01667853072285652, 0.0006497522117570043, -... \n", - "4 [0.03840101882815361, 0.020255720242857933, 0.... " + "0 [-0.017879672348499298, 0.01556997001171112, 0... \n", + "1 [-0.016682444140315056, -0.0227852500975132, -... \n", + "2 [0.04394077882170677, 0.005209765397012234, 0.... \n", + "3 [0.04028189927339554, 0.020218798890709877, 0.... \n", + "4 [0.016521798446774483, -0.006224688142538071, ... " ], "text/html": [ "
\n", @@ -400,33 +400,33 @@ " \n", " \n", " 0\n", - " sample_letter_261\n", - " Dear Hiring Manager,\\n\\nI am writing to expres...\n", - " [0.024967342615127563, 0.020443491637706757, 0...\n", + " sample_letter_507\n", + " I am writing to apply for the System Administr...\n", + " [-0.017879672348499298, 0.01556997001171112, 0...\n", " \n", " \n", " 1\n", - " sample_letter_709\n", - " Dear Hiring Manager,\\n\\nI am writing to expres...\n", - " [0.035281553864479065, 0.024604523554444313, 0...\n", + " sample_letter_649\n", + " I am excited to apply for the AI Engineer posi...\n", + " [-0.016682444140315056, -0.0227852500975132, -...\n", " \n", " \n", " 2\n", - " sample_letter_791\n", + " sample_letter_480\n", " Dear Hiring Manager,\\n\\nI am writing to expres...\n", - " [0.030405910685658455, 0.024307049810886383, 0...\n", + " [0.04394077882170677, 0.005209765397012234, 0....\n", " \n", " \n", " 3\n", - " sample_letter_252\n", - " I am highly interested in the position of Seni...\n", - " [0.01667853072285652, 0.0006497522117570043, -...\n", + " sample_letter_605\n", + " Dear Hiring Manager,\\n\\nI am writing to expres...\n", + " [0.04028189927339554, 0.020218798890709877, 0....\n", " \n", " \n", " 4\n", - " sample_letter_376\n", - " Dear Hiring Manager,\\n\\nI am writing to expres...\n", - " [0.03840101882815361, 0.020255720242857933, 0....\n", + " sample_letter_746\n", + " I am writing to express my interest in the Dat...\n", + " [0.016521798446774483, -0.006224688142538071, ...\n", " \n", " \n", "\n", @@ -449,8 +449,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:38.450567Z", - "start_time": "2024-06-27T20:38:38.447887Z" + "end_time": "2024-06-28T10:18:47.111274Z", + "start_time": "2024-06-28T10:18:47.105332Z" } }, "cell_type": "code", @@ -462,8 +462,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:38.661470Z", - "start_time": "2024-06-27T20:38:38.451429Z" + "end_time": "2024-06-28T10:18:47.241681Z", + "start_time": "2024-06-28T10:18:47.111979Z" } }, "cell_type": "code", @@ -483,8 +483,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:38.666335Z", - "start_time": "2024-06-27T20:38:38.662614Z" + "end_time": "2024-06-28T10:18:47.244916Z", + "start_time": "2024-06-28T10:18:47.242398Z" } }, "cell_type": "code", @@ -511,8 +511,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:39.122192Z", - "start_time": "2024-06-27T20:38:38.667222Z" + "end_time": "2024-06-28T10:18:47.553490Z", + "start_time": "2024-06-28T10:18:47.245391Z" } }, "cell_type": "code", @@ -527,8 +527,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:39.128576Z", - "start_time": "2024-06-27T20:38:39.123829Z" + "end_time": "2024-06-28T10:18:47.557997Z", + "start_time": "2024-06-28T10:18:47.554800Z" } }, "cell_type": "code", @@ -552,8 +552,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:39.157573Z", - "start_time": "2024-06-27T20:38:39.130437Z" + "end_time": "2024-06-28T10:18:47.573964Z", + "start_time": "2024-06-28T10:18:47.559495Z" } }, "cell_type": "code", @@ -567,9 +567,9 @@ { "data": { "text/plain": [ - "[ScoredPoint(id=739, version=0, score=0.3767012077677522, payload={'text': 'I am excited to apply for the Senior Support Engineer role at STU Ltd. I have 7 years of experience in IT support, including 4 years as a Senior Support Engineer. I have a strong technical background, with expertise in Linux, Windows, SQL, and networking. I am also adept at troubleshooting and problem-solving. I am confident that I can bring value to your team.'}, vector=None, shard_key=None),\n", - " ScoredPoint(id=639, version=0, score=0.36754871388915344, payload={'text': 'I am writing to apply for the Senior Support Engineer position at Tech Giants. I have over 4 years of experience in providing technical support and customer service. I am skilled in troubleshooting and have a strong understanding of networking. In my current role at STU Inc, I have consistently received positive feedback from customers for my problem-solving skills and patience. I am confident that my experience and skills make me a strong candidate for this role. I am excited about the opportunity to contribute to your team and look forward to discussing my application further.'}, vector=None, shard_key=None),\n", - " ScoredPoint(id=647, version=0, score=0.33361973940607276, payload={'text': 'I am very interested in the Senior Support Engineer position at Innovative Tech. I have over 4 years of experience in IT support, and I am confident that I can bring a high level of expertise to your team. In my current role at ABC Inc, I have been responsible for managing a team of support specialists and dealing with complex technical issues. I am highly skilled in troubleshooting, networking, and both Linux and Windows systems. I hold a BSc in Information Technology and I am always eager to learn and improve my skills. I believe that my experience and dedication would make me a valuable addition to your company. Thank you for considering my application.'}, vector=None, shard_key=None)]" + "[ScoredPoint(id=184, version=0, score=0.3767012077677522, payload={'text': 'I am excited to apply for the Senior Support Engineer role at STU Ltd. I have 7 years of experience in IT support, including 4 years as a Senior Support Engineer. I have a strong technical background, with expertise in Linux, Windows, SQL, and networking. I am also adept at troubleshooting and problem-solving. I am confident that I can bring value to your team.'}, vector=None, shard_key=None),\n", + " ScoredPoint(id=97, version=0, score=0.36754871388915344, payload={'text': 'I am writing to apply for the Senior Support Engineer position at Tech Giants. I have over 4 years of experience in providing technical support and customer service. I am skilled in troubleshooting and have a strong understanding of networking. In my current role at STU Inc, I have consistently received positive feedback from customers for my problem-solving skills and patience. I am confident that my experience and skills make me a strong candidate for this role. I am excited about the opportunity to contribute to your team and look forward to discussing my application further.'}, vector=None, shard_key=None),\n", + " ScoredPoint(id=640, version=0, score=0.33361973940607276, payload={'text': 'I am very interested in the Senior Support Engineer position at Innovative Tech. I have over 4 years of experience in IT support, and I am confident that I can bring a high level of expertise to your team. In my current role at ABC Inc, I have been responsible for managing a team of support specialists and dealing with complex technical issues. I am highly skilled in troubleshooting, networking, and both Linux and Windows systems. I hold a BSc in Information Technology and I am always eager to learn and improve my skills. I believe that my experience and dedication would make me a valuable addition to your company. Thank you for considering my application.'}, vector=None, shard_key=None)]" ] }, "execution_count": 18, @@ -582,8 +582,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:39.174504Z", - "start_time": "2024-06-27T20:38:39.158698Z" + "end_time": "2024-06-28T10:18:47.579031Z", + "start_time": "2024-06-28T10:18:47.574654Z" } }, "cell_type": "code", @@ -602,19 +602,19 @@ "output_type": "stream", "text": [ "================================================================================\n", - "Letter ID: 739\n", + "Letter ID: 184\n", "Similarity: 0.38\n", "Letter Text:\n", "I am excited to apply for the Senior Support Engineer role at STU Ltd. I have 7 years of experience in IT support, including 4 years as a Senior Support Engineer. I have a strong technical background, with expertise in Linux, Windows, SQL, and networking. I am also adept at troubleshooting and problem-solving. I am confident that I can bring value to your team.\n", "\n", "================================================================================\n", - "Letter ID: 639\n", + "Letter ID: 97\n", "Similarity: 0.37\n", "Letter Text:\n", "I am writing to apply for the Senior Support Engineer position at Tech Giants. I have over 4 years of experience in providing technical support and customer service. I am skilled in troubleshooting and have a strong understanding of networking. In my current role at STU Inc, I have consistently received positive feedback from customers for my problem-solving skills and patience. I am confident that my experience and skills make me a strong candidate for this role. I am excited about the opportunity to contribute to your team and look forward to discussing my application further.\n", "\n", "================================================================================\n", - "Letter ID: 647\n", + "Letter ID: 640\n", "Similarity: 0.33\n", "Letter Text:\n", "I am very interested in the Senior Support Engineer position at Innovative Tech. I have over 4 years of experience in IT support, and I am confident that I can bring a high level of expertise to your team. In my current role at ABC Inc, I have been responsible for managing a team of support specialists and dealing with complex technical issues. I am highly skilled in troubleshooting, networking, and both Linux and Windows systems. I hold a BSc in Information Technology and I am always eager to learn and improve my skills. I believe that my experience and dedication would make me a valuable addition to your company. Thank you for considering my application.\n", @@ -633,8 +633,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:39.181135Z", - "start_time": "2024-06-27T20:38:39.175775Z" + "end_time": "2024-06-28T10:18:47.593295Z", + "start_time": "2024-06-28T10:18:47.579478Z" } }, "cell_type": "code", @@ -668,8 +668,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:39.424846Z", - "start_time": "2024-06-27T20:38:39.182160Z" + "end_time": "2024-06-28T10:18:47.687862Z", + "start_time": "2024-06-28T10:18:47.593782Z" } }, "cell_type": "code", @@ -692,8 +692,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:45.376379Z", - "start_time": "2024-06-27T20:38:39.425579Z" + "end_time": "2024-06-28T10:18:54.298482Z", + "start_time": "2024-06-28T10:18:47.688489Z" } }, "cell_type": "code", @@ -710,8 +710,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:45.381165Z", - "start_time": "2024-06-27T20:38:45.377395Z" + "end_time": "2024-06-28T10:18:54.301284Z", + "start_time": "2024-06-28T10:18:54.299122Z" } }, "cell_type": "code", @@ -723,7 +723,7 @@ "text/plain": [ "" ], - "text/markdown": "Dear Hiring Committee,\n\nI am writing to express my interest in the Short-Term Travel Grants (STG) Program at IREX. With a background in [relevant field], I am excited about the opportunity to conduct independent research in Europe and Eurasia.\n\nHaving [number] years of experience in [relevant field], I am confident in my ability to make a substantive contribution to knowledge of the contemporary political, economic, historical, or cultural developments in the region. My research interests align closely with the goals of the STG Program, and I am eager to explore how such knowledge can be relevant to US foreign policy.\n\nI have a proven track record of [relevant experience or skills], which I believe will be valuable in conducting research projects independently or collaboratively. I am proficient in [specific skills or expertise], and I am confident in my ability to navigate the challenges of conducting research in a new environment.\n\nI am particularly drawn to the STG Program because of its focus on fostering international collaboration and understanding. I am excited about the opportunity to engage with scholars and professionals in Europe and Eurasia, and I am eager to contribute to the exchange of knowledge and ideas.\n\nI am confident that my background, skills, and passion for research make me a strong candidate for the STG Program. I am excited about the opportunity to further my research interests and contribute to the goals of the program.\n\nThank you for considering my application. I look forward to the opportunity to discuss how my background and skills align with the goals of the STG Program.\n\nSincerely,\n[Your Name]" + "text/markdown": "Dear Hiring Committee,\n\nI am writing to express my interest in the Short-Term Travel Grants (STG) Program at IREX. With a background in [relevant field], I am excited about the opportunity to conduct independent research in Europe and Eurasia.\n\nHaving [number] years of experience in [relevant field], I am confident in my ability to make a substantive contribution to knowledge of the contemporary political, economic, historical, or cultural developments in the region. My research interests align closely with the goals of the STG Program, and I am eager to explore how such knowledge can be relevant to US foreign policy.\n\nI have a proven track record of [relevant experience or skills], which I believe will be beneficial for conducting research projects independently or collaboratively. I am proficient in [specific skills or expertise], and I am confident in my ability to navigate the challenges of conducting research in a new environment.\n\nI am particularly drawn to the STG Program because of its focus on fostering international collaboration and understanding. I am excited about the opportunity to engage with scholars and professionals in Europe and Eurasia, and I am eager to contribute to the exchange of knowledge and ideas.\n\nI am confident that my background, skills, and passion for research make me a strong candidate for the STG Program. I am excited about the opportunity to further my research interests and contribute to the goals of the program.\n\nThank you for considering my application. I look forward to the opportunity to discuss how my background and skills align with the objectives of the STG Program.\n\nSincerely,\n[Your Name]" }, "metadata": {}, "output_type": "display_data" @@ -734,8 +734,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:45.386150Z", - "start_time": "2024-06-27T20:38:45.382310Z" + "end_time": "2024-06-28T10:18:54.307518Z", + "start_time": "2024-06-28T10:18:54.301867Z" } }, "cell_type": "code", @@ -752,8 +752,8 @@ { "metadata": { "ExecuteTime": { - "end_time": "2024-06-27T20:38:45.390398Z", - "start_time": "2024-06-27T20:38:45.387307Z" + "end_time": "2024-06-28T10:18:54.313768Z", + "start_time": "2024-06-28T10:18:54.308172Z" } }, "cell_type": "code", diff --git a/pyproject.toml b/pyproject.toml index 8b18fc7..b28419f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "easy-letters" -version = "0.1.1" +version = "0.1.4" description = "A Python package for generating draft application letters using generative AI" authors = ["Hassan Abedi "] readme = "README.md"