Not able to create Generative AI model which will read the resume and check if it matches the job role

45 Views Asked by At

I am new to Generative AI and I am trying to create a model which will read the resume and check if it matches the job role. I have implemented the code but when I run it, the result which I am getting is not acurate. I am using models from HugginFace, this is my code

import pandas as pd
import numpy as np

from langchain import HuggingFaceHub
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain, SequentialChain
from langchain_community.document_loaders import UnstructuredWordDocumentLoader

doc= UnstructuredWordDocumentLoader(r'C:\Users\Lijin Durairaj\Desktop\resume.docx')
_data=doc.load()
_resume=_data[0].page_content


model_name='google/flan-t5-base'
huggin_face_api_token='**************************************'

client=HuggingFaceHub(
    huggingfacehub_api_token=huggin_face_api_token,
    repo_id=model_name,
    model_kwargs={
        'temperature':0.7        
    }
)


template=PromptTemplate(
input_variables=['job_position','resume'],
template='evaluate the resume: {resume} and tell me if the candidate is suitable for 
the position of {job_position}'
)

chain=LLMChain(llm=client,prompt=template)
chain.run({
    'resume':_resume
})

Am I missing something,

  1. Is my prompting template wrong? if no, then how to improve it
  2. Am i using the right model? Do i have to use some other model
  3. do i have to change the approach
  4. should i have to do any data cleaning and feature extraction?

please help me to reach to the solution

0

There are 0 best solutions below