Automatic job seeking letter generation method and device based on large language model

Through the automatic generation method of cover letters based on large language models, combined with RPA and retrieval enhanced generation technology, the problem of low matching degree in traditional automatic generation methods of cover letters is solved, and highly personalized generation and automatic sending of cover letters are realized, significantly improving Improve job search efficiency and quality.

CN118586362APending Publication Date: 2024-09-03JIANGSU MARITIME INST
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410689005.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

In the traditional job search process, the automatic generation method of cover letters cannot be personalized for each specific position and company, resulting in a low match between the cover letter and the recruitment position, and the efficiency and quality of job search have not been significantly improved.

Method used

Using the automatic generation method of cover letters based on large language models, through resume information processing, position information acquisition, cover letter generation and sending, combined with RPA technology and retrieval enhancement generation technology, a highly personalized cover letter is generated. Specific steps include: obtaining job search keywords based on resumes and job skill keywords, obtaining job description information through job search websites, and using large language models to generate accurate cover letters and send them.

Benefits of technology

It has significantly improved the efficiency and quality of job applications, ensuring that every cover letter can accurately correspond to the requirements of each position, and greatly improving the matching degree and response rate of cover letters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586362A
    Figure CN118586362A
Patent Text Reader

Abstract

The invention relates to the technical field of information generation, in particular to an automatic job seeking letter generation method based on a large language model, which comprises the following steps of: resume information processing: obtaining keywords required by job query through a large language model according to a resume and cue words of job skill keywords; position information acquisition: retrieving and acquiring related position description information according to the position query keyword in the job application website; and job-seeking letter generation and sending: submitting the position description information, the cue word and the resume information to the large language model, generating a highly personalized job-seeking letter, and finally sending the job-seeking letter. According to the invention, the job hunting efficiency and the job hunting quality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information generation, and in particular to a method and device for automatically generating a job application letter based on a large language model. Background Art

[0002] The traditional job search process requires manual retrieval of job information and submission of resumes, which results in low job search efficiency and low application quality.

[0003] At present, some job search websites provide automatic resume generation functions, but there are the following shortcomings:

[0004] 1) Automatically generated resumes are often based on templates and cannot be generated for each specific position and company, resulting in a low match between the cover letter and the job position;

[0005] 2) The automatically generated resumes do not provide an in-depth understanding of the job requirements, resulting in a low hit rate for automatically generated resumes. Neither job search efficiency nor job search quality has been significantly improved. Summary of the invention

[0006] The present invention provides a method and device for automatically generating a job application letter based on a large language model, which can effectively solve the above-mentioned problems and improve job search efficiency and quality.

[0007] In order to achieve the purpose of the present invention, the technical solution adopted is: a method for automatically generating a job application letter based on a large language model, comprising:

[0008] S1. Resume information processing: Based on the prompt words of the resume and job skill keywords, the keywords required for job search are obtained through the large language model;

[0009] S2. Obtaining job information: Searching job search websites for relevant job description information based on job search keywords;

[0010] S3, cover letter generation and sending: Submit the job description information, prompt words, and resume information to the large language model to generate a highly personalized cover letter, and finally send the cover letter.

[0011] As an optimization solution of the present invention, in step S1, it specifically includes:

[0012] S1-1, read the resume file and obtain the resume text information;

[0013] S1-2. Add the prompt words for obtaining job skill-related keywords to the resume text information and submit it to the large language model to obtain the keywords required for job search.

[0014] As an optimization solution of the present invention, in step S2, specifically including:

[0015] S2-1, use selenium to control the browser to log in to the job search website according to the website URL, username and password;

[0016] S2-2, use selenium to locate the job search box on the web page, enter the job keyword, click the search button, and get the job list page;

[0017] S2-3. Use Selenium to click on the job links in the job list page one by one from top to bottom to enter the job details page; on the job details page, obtain the webpage text, filter out the jobs containing the keywords in the blacklist, and finally extract the job description text information;

[0018] S2-4. Calculate the similarity between the job description text and the resume text, and retain the job description information that exceeds the specified similarity threshold.

[0019] As an optimization solution of the present invention, in step S3, a job application letter is generated in a simple manner, specifically:

[0020] 1) Combine the job description text and the original resume text to form a prompt text for generating a corresponding cover letter;

[0021] 2) Submit the prompt word text of the job application letter to the large language model and obtain the return result to obtain the job application letter.

[0022] As an optimization solution of the present invention, in step S3, the assistant method of chatgpt is used to generate a job application letter, specifically: obtain the assistant client of OpenAI, and perform the following through the client object:

[0023] A. Upload the resume file to chatgpt and return the file ID;

[0024] B. Create a ChatGPT assistant; specify the assistant name, prompt word, tool type as retrieval, and return the file ID and the model used;

[0025] C. Create a thread Thread for interacting with the ChatGPT assistant;

[0026] D. Create a message with the job description text as its content, execute the Thread thread, send the message, wait for the thread to complete, obtain the AI ​​output result, and get the job application letter.

[0027] As an optimization solution of the present invention, in step S3, the RAG method based on langchain is adopted, and the job application letter generation is specifically as follows:

[0028] (1) Based on the job description information, prompt words, and prompt word template string, a prompt word template object is generated, where the prompt word template object includes a structured prompt, a job description, and a job question;

[0029] (2) Generate a large language model object LLM; (LLM model can be any large language model supported by langchain)

[0030] (3) Generate the retrieval question-answering chain RetrievalQA, and pass in the prompt word template object, the retriever obtained from the resume vector library, and the LLM as parameters;

[0031] (4) The retrieval question-answering chain executes the retrieval question-answering process for a given question, vectorizes the job description information, and then uses the retriever obtained from the resume vector library to search the vector library for resume text fragments corresponding to vectors with high similarity, then adds them to the prompt words, and finally submits the prompt words containing targeted resume information to the LLM. , Combined with LLM, the final answer is given and the final cover letter is obtained.

[0032] As an optimization scheme of the present invention, if a job application letter is input in step S1, the resume text is segmented into text segments of fixed length and a certain number of overlapping words, the text segments are vector-embedded, and the generated text vectors are stored in a vector library.

[0033] In order to achieve the purpose of the present invention, the technical scheme adopted is: a job application letter automatic generation device of a job application letter automatic generation method based on a large language model, including a resume information processing module, a position information acquisition module and a job application letter generation and sending module, the resume information processing module obtains the keywords required for the job search through the large language model according to the prompt words of the resume and the position skill keywords; the position information acquisition module retrieves the relevant job description information according to the job query keywords on the job search website; the job application letter generation and sending module submits the job description information, prompt words and resume information to the large language model, generates a highly personalized job application letter, and finally sends the job application letter.

[0034] The present invention has positive effects: the present invention innovatively combines the advantages of RPA technology (Robotic Process Automation), large language model (LLM) and retrieval enhanced generation (RAG) technology, and can realize automatic job search, automatic generation and automatic delivery of job application letters, which greatly improves the job search efficiency. At the same time, each job application letter can accurately correspond to each job requirement, greatly improving the job search efficiency and quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0036] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0037] like Figure 1 As shown, the present invention discloses a method for automatically generating a job application letter based on a large language model, comprising:

[0038] S1. Resume information processing: Based on the prompt words of the resume and job skill keywords, the keywords required for job search are obtained through the large language model;

[0039] S2. Obtaining job information: Searching job search websites for relevant job description information based on job search keywords;

[0040] S3, cover letter generation and sending: Submit the job description information, prompt words, and resume information to the large language model to generate a highly personalized cover letter, and finally send the cover letter.

[0041] Job description information comes from the description of specific positions on job search websites, and generally includes: job responsibilities, job requirements, work location, education, work experience, salary, etc.

[0042] Resume information generally includes: job search intention (job position and industry field, salary, work location, etc.), basic personal information (age, education, years of work experience, etc.), skills and expertise, work experience, educational background, additional information, etc.

[0043] Prompt words: generally include: general prompt words part of the cover letter, position information description part, resume information part, requirements or questions part.

[0044] In step S1, the input is a resume file, and the output is keywords for job search, specifically including:

[0045] S1-1, read the resume file and obtain the resume text information;

[0046] S1-2. Add the prompt words for obtaining job skill-related keywords to the resume text information and submit it to the large language model to obtain the keywords required for job search. The number of positions can be specified.

[0047] In step S2, the job information acquisition input is the URL of the job search website, the user name and the password, which specifically includes:

[0048] S2-1, use selenium to control the browser to log in to the job search website according to the website URL, username and password;

[0049] S2-2. Use selenium to locate the job search box on the web page, enter the job keywords, click the search button, and get the job list page; you can attach search conditions, such as salary range and work location.

[0050] S2-3. Use Selenium to click on the job links in the job list page one by one from top to bottom to enter the job details page; on the job details page, obtain the webpage text, filter out the jobs containing the keywords in the blacklist, and finally extract the job description text information;

[0051] S2-4. Calculate the similarity between the job description text and the resume text, and retain the job description information that exceeds the specified similarity threshold.

[0052] The following describes three ways to generate execution requests:

[0053] Method 1: Using the langchain-based RAG method, the job application letter generation is as follows:

[0054] (1) Based on the job description information, prompt words, and prompt word template string, a prompt word template object is generated, where the prompt word template object includes a structured prompt, a job description, and a job question;

[0055] (2) Generate a large language model object LLM; (LLM model can be any large language model supported by langchain)

[0056] (3) Generate the retrieval question-answering chain RetrievalQA, and pass in the prompt word template object, the retriever obtained from the resume vector library, and the LLM as parameters;

[0057] (4) The retrieval question-answering chain executes the retrieval question-answering process for a given question, vectorizes the job description information, and then uses the retriever obtained from the resume vector library to search the vector library for resume text fragments corresponding to vectors with high similarity, then adds them to the prompt words, and finally submits the prompt words containing targeted resume information to the LLM. , Combined with LLM, the final answer is given and the final cover letter is obtained.

[0058] Method 2: Use a simple method to generate a cover letter, specifically:

[0059] 1) Combine the job description text and the original resume text to form a prompt text for generating a corresponding cover letter;

[0060] 2) Submit the prompt word text of the job application letter to the large language model and obtain the return result to obtain the job application letter.

[0061] Method 3: Use the assistant method of chatgpt to generate a cover letter. Specifically, get the OpenAI assistant client and use the client object to:

[0062] A. Upload the resume file to chatgpt and return the file ID;

[0063] B. Create a ChatGPT assistant; specify the assistant name, prompt word, tool type as retrieval, and return the file ID and the model used;

[0064] C. Create a thread Thread for interacting with the ChatGPT assistant;

[0065] D. Create a message with the job description text as its content, execute the Thread thread, send the message, wait for the thread to complete, obtain the AI ​​output result, and get the job application letter.

[0066] The execution of the retrieval question-answering chain involves multiple steps, which combines the power of information retrieval technology (IR) and large language models (LLM) to provide the final answer to a given question. The following are the basic steps of this process:

[0067] Problem understanding and analysis: First, you need to carefully analyze and understand the user's problem. This includes determining the topic, keywords, and specific information the user wants to obtain.

[0068] Construct search formula: Based on your understanding of the problem, construct a suitable search formula. The search formula should be able to accurately locate relevant text or data in information sources (such as the Internet, databases, etc.).

[0069] Perform a search: Use the constructed query to perform a search operation on the information source. This usually returns a list of documents or results that are relevant to the question.

[0070] Result screening and extraction: Filter out the most relevant and valuable information from the retrieved results. This may involve ranking the results, extracting summaries, or further content analysis.

[0071] Use LLM to process information: Input the filtered relevant information into the Large Language Model (LLM). LLM has powerful natural language processing and knowledge reasoning capabilities, which can deeply analyze and understand this information.

[0072] Generate final answer: LLM generates the final answer to the question based on the input information and its own knowledge base. This answer should be accurate, concise and easy to understand.

[0073] Answer verification and optimization: In some cases, it may be necessary to verify and optimize the answers generated by the LLM. This can be achieved by comparing information from multiple sources and checking the logic and consistency of the answers.

[0074] By combining information retrieval technology (used to obtain relevant information) and large language models (used to process and analyze information and generate answers), the retrieval question-answering chain is able to provide users with accurate and comprehensive answer results.

[0075] If in step S1, a job application letter is input (the job application letter is generated using the langchain-based RAG method), the resume text is segmented into text segments of fixed length and a certain number of overlapping words, the text segments are vector-embedded, and the generated text vectors are stored in a vector library for easy retrieval.

[0076] A job application letter automatic generation device based on a large language model and a job application letter automatic generation method comprises a resume information processing module, a position information acquisition module and a job application letter generation and sending module. The resume information processing module obtains keywords required for job search through a large language model according to the prompt words of the resume and the job skill keywords; the position information acquisition module retrieves relevant job description information on a job search website according to the job search keywords; the job application letter generation and sending module submits the job description information, prompt words and resume information to the large language model to generate a highly personalized job application letter.

[0077] After validating and post-processing the generated cover letter, a sendable cover letter text is formed. Send the cover letter. For job search websites that allow job application information to be sent on the page, use selenium to find and click the "Communicate" button on the job details page, enter the cover letter text in the text input box, and send the information. Or obtain the mailbox information and send the cover letter email.

[0078] There are three ways to generate a cover letter, which is convenient for weighing the accuracy, resource consumption, cost, and performance of the cover letter. Method 1 has high accuracy and low cost (when using a free large language model), but high resource consumption; Method 2 has poor accuracy and low resource consumption; Method 3 has high accuracy but high cost (requires models of ChatGPT3.5 and above).

[0079] Example:

[0080] The system is implemented in Python, using Selenium's WebDriver to drive the browser Chrome to visit job search websites such as "Boss Direct Recruitment" and "51Job". The process of manually visiting job search websites is automated (RPA technology). The positioning of web page elements uses XPATH or CSS. In addition to generating keywords based on resumes through large language models, other tools that can generate keywords locally (such as Jieba word segmentation) can also be used.

[0081] The content of the prompt word template in the cover letter generation method 3 is as follows:

[0082] """Please play the role of a job seeker. Based on the content of your resume and the description of the job you are applying for, write a polite and professional cover letter with a word count strictly limited to {number}. You are required to use professional language to combine the experience and skills in your resume with the description of the job you are applying for to explain your strengths and do your best to impress the recruiter. Always write messages in Chinese. Start with the person in charge of recruitment and end with the job seeker's contact information. This is a job application message. Do not include anything other than the job application content, such as "Based on the job application requirements and personal resume you uploaded, I will help you draft a job application email: " This type of content allows me to copy and paste it automatically and send it directly.

[0083] Job Description: {job_description}

[0084] Resume content: {context}

[0085] Requirements: {question}"""The question is "Based on the job description, what are the most suitable skills in the resume? What are the advantages of the job seeker?"

[0086] In an experiment of automatically sending 100 job application letters using job application letter generation method 3, 27 valid replies were received from HR, and the cost was basically zero. Compared with the manual method (the average reply rate generally does not exceed 10%), both job application efficiency and quality have been significantly improved.

[0087] The overall idea of ​​this method is to first extract relevant keywords based on the resume, then search for relevant job information based on the keywords on the job search website, and then submit the job description, prompt words, and resume information to the large language model to generate a highly personalized cover letter, and finally send the cover letter.

[0088] This method is also applicable to other application scenarios that can automatically obtain relevant text information of supply and demand parties and need to match supply and demand, such as: automatically matching products and procurement needs, sending product marketing emails; delivering business plans to investment institutions' mailboxes, etc.

[0089] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for automatically generating a job application letter based on a large language model, characterized in that: The steps include: S1. Resume information processing: Based on the prompt words of the resume and job skill keywords, the keywords required for job search are obtained through the large language model; S2. Obtaining job information: Searching job search websites for relevant job description information based on job search keywords; S3, cover letter generation and sending: Submit the job description information, prompt words, and resume information to the large language model to generate a highly personalized cover letter, and finally send the cover letter.

2. The method for automatically generating a job application letter based on a large language model according to claim 1, characterized in that: In step S1, it specifically includes: S1-1, read the resume file and obtain the resume text information; S1-2. Add the prompt words for obtaining job skill-related keywords to the resume text information and submit it to the large language model to obtain the keywords required for job search.

3. The method for automatically generating a job application letter based on a large language model according to claim 2, characterized in that: In step S2, it specifically includes: S2-1, use selenium to control the browser to log in to the job search website according to the website URL, username and password; S2-2, use selenium to locate the job search box on the web page, enter the job keyword, click the search button, and get the job list page; S2-3. Use Selenium to click on the job links in the job list page one by one from top to bottom to enter the job details page; on the job details page, obtain the webpage text, filter out the jobs containing the keywords in the blacklist, and finally extract the job description text information; S2-4. Calculate the similarity between the job description text and the resume text, and retain the job description information that exceeds the specified similarity threshold.

4. The method for automatically generating a job application letter based on a large language model according to claim 3, characterized in that: In step S3, a simple method is used to generate a job application letter, specifically: 1) Combine the job description text and the original resume text to form a prompt text for generating a corresponding cover letter; 2) Submit the prompt word text of the job application letter to the large language model and obtain the return result to obtain the job application letter.

5. The method for automatically generating a job application letter based on a large language model according to claim 3, characterized in that: In step S3, use the assistant method of chatgpt to generate a job application letter, specifically: obtain the assistant client of OpenAI, and use the client object to: A. Upload the resume file to chatgpt and return the file ID; B. Create a ChatGPT assistant; specify the assistant name, prompt word, tool type as retrieval, and return the file ID and the model used; C. Create a thread Thread for interacting with the ChatGPT assistant; D. Create a message with the job description text as its content, execute the Thread thread, send the message, wait for the thread to complete, obtain the AI ​​output result, and get the job application letter.

6. The method for automatically generating a job application letter based on a large language model according to claim 3, characterized in that: In step S3, the RAG method based on langchain is adopted, and the job application letter generation is specifically as follows: (1) Based on the job description information, prompt words, and prompt word template string, a prompt word template object is generated, where the prompt word template object includes a structured prompt, a job description, and a job question; (2) Generate a large language model object LLM; (3) Generate the retrieval question-answering chain RetrievalQA, and pass in the prompt word template object, the retriever obtained from the resume vector library, and the LLM as parameters; (4) The retrieval question-answering chain executes the retrieval question-answering process for a given question, vectorizes the job description information, and then uses the retriever obtained from the resume vector library to search the vector library for resume text fragments corresponding to vectors with high similarity, then adds them to the prompt words, and finally submits the prompt words containing targeted resume information to the LLM. , Combined with LLM, the final answer is given and the final cover letter is obtained.

7. The method for automatically generating a job application letter based on a large language model according to claim 6, characterized in that: If a job application letter is input in step S1, the resume text is segmented into text segments of fixed length and with a certain number of overlapping words, the text segments are vector-embedded, and the generated text vectors are stored in a vector library.

8. A device for automatically generating a job application letter using the method for automatically generating a job application letter based on a large language model as claimed in claim 7, characterized in that: The invention comprises a resume information processing module, a position information acquisition module and a job application letter generation and sending module. The resume information processing module obtains the keywords required for the job search through a large language model according to the prompt words of the resume and the job skill keywords; the position information acquisition module retrieves the relevant job description information according to the job search keywords on the job search website; the job application letter generation and sending module submits the job description information, prompt words and resume information to the large language model to generate a highly personalized job application letter, and finally sends the job application letter.

Citation Information

Cited By

  • Automatic recruitment robot system based on large model RAG and fine tuning

    CN119048040A

  • Post recommendation method and system based on resume analysis

    CN120806901A

  • Position searching method and device based on implicit intention recognition

    CN121144373A