4.1 How to setup & use OpenAI GPT for Prompt Engineering

Prompt engineering with OpenAI GPT involves crafting specific instructions to obtain accurate responses from the language model. Here’s a brief guide on how to set up and use OpenAI GPT for prompt engineering:

Step 1: Access the OpenAI Playground

Go to the OpenAI Playground by visiting the link provided
Navigate to the link https://platform.openai.com/playground

Step 2: Login or Sign Up

Log in using your OpenAI account or sign up if you don’t have one.

Step 3: Select the Model

Choose the GPT model you want to use. For example, you can select “gpt-4-0613.”

Step 4: Configure Model Settings

Configure the model settings to suit your needs. Set parameters like

Mode = Chat
Model = gpt-4-0613
Temperature = 0 (For consistent results)
Maximum Length = to limit response length, and adjust penalties if necessary.
for example, 6000 (will fix the max length if it exceeds the token limit, by sustracting input tokens with 8191)
Top P = 1
Frequency penalty = 0
Presence penalty = 0

Step 5: Create the Prompt

Now, you’ll create your prompt. This is where prompt engineering comes into play. Your prompt should be clear and specific to achieve the desired outcome. Provide instructions for the model to follow.
Here you have to do prompt Engineering and finalise our prompt which will give correct results.

Step 6 : Input System Content and User Content
you need to give 2 inputs first is System content and User content.

Step 6.1 : In System content you will provide the prompt with all the instruction according to your requirements to generate dictionary of your input resume data in a key value format.

Step 6.2 : In the user content, please give the real input data. This means you’ll provide the resume information extracted by the “content_extraction” function, which is saved in the “content” variable.

Step 7: Submit and Review

Click the submit button to process your prompt. The model will generate a response based on your instructions.

Step 8 : Update maximum tokens

If you get token limit error, then substract the number of input messege tokens with 8191, and update the Maximum length with it, and again click on the submit.

Step 9 : Response Generation

Response result will get generated line by line, once you get the complete result check weather you are getting correct dictionary or not.

Step 10 : Refine and Iterate

Review the response. If it doesn’t meet your expectations, refine your prompt by making it more precise or adjusting the instructions. Repeat the process until you achieve the desired outcome response.

Step 11 : Document Your Prompts

Keep track of successful prompts and their corresponding results. This will help you fine-tune your prompt engineering techniques over time.
Here, You have to do the prompt engineering untill you recive expected dictionary of the resume data.

Remember that prompt engineering is an iterative process. Experiment with different prompts, instructions, and settings until you consistently obtain the results you need. With practice, you can harness the power of OpenAI GPT for various natural language processing tasks.

For your reference check the following final fine-tuned prompt created and the response generated by OpenAI GPT – 4.

Prompt: 

You will be provided with resume details. Your task is to convert the given data into a dictionary.

1.Create a first key named ‘name’ with a value representing the candidate’s name, extracted from the resume details.

2.Create a second key named ‘Contact Details’. Search for the candidate’s contact details such as email, phone number, current address, date of birth, LinkedIn profile, GitHub profile, or any other relevant information. If any of these details are found, assign them as the value for the key ‘Contact Details’. If the information is not found, leave the value empty and do not add anything by yourself.

3.If you encounter words like ‘professional profile’, ‘About’, ‘Objective’, ‘Personal statement’, ‘career profile’, or similar words that match semantically or have synonyms, then make them the keys of the dictionary with the key as ‘PP’.

4.If you don’t get any words like this, then create a key called ‘PP’.

5.To check the value, see if there is a paragraph just below the key. Take the content between the current key and another key as the value. If there is no specific key, search for any single paragraph that explains about a writer who has written the resume. Keep this paragraph as the value for the key ‘PP’ created by you. Do not print anything other than this.

6.If you encounter any words such as ‘Career Summary’, ‘Work Experience’, ‘Work History’, ‘Experience’, ‘Professional Experience’, ‘Relevant Experience’, ‘Employment History’, ‘Organization Worked With’, or words ending with ‘Experience’, ‘Summary’, or any other similar or semantically matching words or synonyms, then create the key of the dictionary as ‘Work Experience’.

7.If you don’t find any words like these, then create a key called ‘Work Experience’.

8.For the value, check whether there is related data in the resume details. If so, take it as a value for the key ‘Work Experience’ in the following format:

The “subkey” will be a date-related term where the date should have a month(reduce the month name to a 3-letter word) followed by the year or the year only. If there is no datetime-related content, then create the subkey as ‘MM|YYYY’.

The value of this key will be another “subkey” which will hold the company name or firm name, along with its address details if available. If there is no name mentioned, then create a subkey named as ‘ ‘.

The value of this subkey will take another “subkey” which will hold the key of the designation or job role that the particular candidate worked or was involved in during that time period. If there is no designation or job role mentioned, then create a subkey  as ‘ ‘.

The value of this subkey will take all the remaining content in a list format under these subkeys.

If there are sub-headings within the same timeline, such as ‘Technologies’, ‘Outline’, ‘Key Responsibilities’, ‘Specialties’, ‘Key Achievements’, ‘Clients Include’, ‘Duties Include’, ‘Major Achievements’, ‘Accomplishments’, ‘Additional Professional Experience Includes’, treat them as second keys. The data below each second key will be the value for the respective second key.nThe values for the second keys will be lists of items. Do not skip any data in the ‘Work Experience’ section. Do not skip any information in the ‘Work Experience’ section or repeat any information. Do not print anything other than the original data, unless otherwise mentioned.

9.If you encounter words such as ‘Education’, ‘Academics’, ‘Eligibility’, ‘Certifications’, or any other similar or semantically matching words or synonyms, then create a key named ‘Education’ for the dictionary.

10.If you do not encounter any words of this kind, then create a key named ‘Education’.

11.To check the value, verify if there is any related data in the resume details. If found, assign it as the value for the key ‘Education’ in the following format:

12.The first “subkey” will be a date-related time-duration term, where the date should have a month(reduce the month name to a 3-letter word), followed by the year and if month is not present then take subkey with a time-duration related term as it is.

13.If there is no date-related term, then you must create a subkey as ‘MM|YYYY’.

14.The value of this subkey will be another “subkey” which will be a degree or course of candidate pursued in that time period.

15.If there is no degree mentioned, then create a subkey named as ‘ ‘.

16.The value of this subkey will take another “subkey” which will be the University name or the college name or institute name, do not skip the address.

17.If there is no University name or the college name or institute name mentioned, then create a subkey named as ‘ ‘.

18.For value of this subkey will take all the remaining content in a list format under this subkey.

19.Create a key called ‘Additional’.

20.If you encounter any words such as ‘Additional’, ‘Other Interests’, ‘Key Skills’, ‘Languages’, ‘Leadership Activities’, ‘Skills and Interests’, ‘Technical Skills’, ‘Certificates’, ‘Areas of Strength’, ‘Hobbies and Interests’, ‘Personal Achievements’, ‘References’, or other similar words that semantically resemble these within the entire resume details, they should be taken as a sub-key of the key ‘Additional’. For its value, check whether there is related data in the resume details, then take it as a value for the key in the following format:

21.Take the remaining content after the ‘Other Interests’, ‘Key Skills’, ‘Languages’, ‘Leadership Activities’, ‘Skills and Interests’, ‘Technical Skills’, ‘Certificates’, ‘Areas of Strength’, ‘Hobbies and Interests’, ‘Personal Achievements’, ‘References’ as values for their respective keys.

22.Even after doing this, if there is information that has not been printed, take that information, use its heading as a sub-key under the key ‘Additional’, and print its information as a value for the sub-key created.

23.Don’t create any extra information by yourself. If you get the data in the input, then use it; otherwise, leave that section empty.

Response:

{‘name’: ‘Jessica Martinez Rodriguez’,

‘Contact Details’: {‘phone number’: ‘(555) 123 -4567’, ‘Email’: ‘jessica.m.rodriguez@example.com’, ‘current address’: ‘Los Angeles, CA’},

 ‘PP’: ‘Certified Professional in SAFe Scaled Agile Scrum/Kanban, Project Management and ITIL v3. Over 10 years of SDLC coupled with CI/CD experiences. Over 6 years performing Scrum Master duties coaching and developing teams and management toward practicing Agile methods. Utilize creative visionary approaches to resolve conflict, remove impediments and provide feedback up or downline with the use of verbal and or written communications.’,
 ‘Work Experience’: {‘November 2021 to Present’: {‘QUENCH THURST’: {‘Senior Scrum Master’: [‘Successfully coach and facilitate multiple teams and all ceremonies as we execute SAFe with 2-week iterations.’, ‘Utilize various tools and techniques while ensuring the team is working the correct tasks assigned coupled with ensuring impediments are removed to complete the tasks as appropriate.’, ‘Facilitate PI planning at the team level to include breakout sessions, dependencies collaboration, update user stories on the Mural Board and more while reducing distractions and providing documented follow up based on next action(s) during planning.’, ‘Work closely with Product Owners to assist with Product Backlog prioritization and Sprint Goals, identifying how the team may continuously inspect and adapt as needed.’, ‘Utilize visual techniques to support teams and stakeholders by creating metrics such as velocity trend reporting and user story completion rate (burn up or burn down).’, ‘Create and present power point decks as an example Definition of Ready (DoR), Team Agreements and Definition of Done (DoD) to ensure we remain focused on common goals as team.’, ‘Participate in Agile CoP meetings while sharing success stories as well as openly share difficult topics for brainstorming opportunities that will foster a collaborative environment for all.’]}},
 ‘August 2019 to November 2021’: {‘US-East BANK’: {‘Scrum Master’: [‘Performed servant leadership (Coached) functionalities for distributed teams as we worked CapEx projects and BAU with established expectation to deliver code with core values and Agile principles (Scrum 2-week iterations/Kanban 3_WIP items in doing per board) and methodologies.’, ‘Facilitated all ceremonies for multiple teams including offshore contractors. Coordinated meetings for cross – functional teams to ensure work remained in scope according to the identified acceptance Criteria and or solution.’, ‘Conducted backlog grooming and Planning sessions to ensure we prioritize work was appropriately addressed per the Product owner and stakeholder. Presented completed work with current and completed stated to the stakeholder with the team to ensure acceptance and closure which delivered MVP.’, ‘Encouraged Pair Programming and MOB sessions among distributed team members as well as cross – functional partners/venders to assist with mitigating technical debt. This promoted open dialogue for complex, high risk work and often assisted with reduction of effort and identified up or downline dependency.’, ‘Participated in virtual Technical Audits by capturing screenshots and identifying storage locations which included: (Clarity, Version One, MS Teams, GitLab, Jenkins etc.…) based on requested code material/artifacts for Basel and Sox Governance.’, ‘Created Key Performance Indicators (KPI’s) with the use of Version One Analytics and Objective Key Results (OKR’s) which supported team release alignment for MVP and MMF.’]}},
 ‘August 2016 to December 2019’: {‘Africa BANK’: {‘System Analyst/junior Scrum Master’: [‘Performed Junior Scrum Master duties from 2017 to 2019 by tracking team velocity, creating standardized reporting, creating high level management power point decks, identifying risk and next actions.’, ‘Performed financial reporting responsibilities for impact analysis as it related to monthly planned and completed capacity reports to assist with earned value management planning (PV, EV, AC).’, ‘Produced Ad -Hoc query reporting to assist with contract reconciliation. Provided power point slides monthly that assisted with variance reporting to Senior Management.’, ‘Provided updates on 3 rd party software risk to mitigate slow to no action for renewal and make or buy decision.’, ‘Worked cross -functionally with multiple business managers and team leaders to ensure documentation and d MS Visio diagrams were accurate mitigating risk for future Basel audits for software applications.’]}},
 ‘August 2014 to August 2016’: {‘ ‘: {‘Business Analyst’: [‘Coordinated project life cycle phases to include planning, execution, monitor and controlling for the development of the newest application for Retail Payment Solutions (RPS).’, ‘Gathered requirements for Cheega Developers and Quality Analyst to ensure detail planning, executing and QA Testing, for feature enhancements for (RPS) were captured.’, ‘Supported call center staff with simple Cheega software modifications as requested.’]}},
 ‘September 2011 to February 2014’: {‘SLOW LINK COMMUNICATION’: {‘Project Analyst’: [‘Supported developers during implementation of Customer Relationship Management (CRM)_Sales for On-Demand Web-Based product by providing business requirements conducted by way of stakeholder analysis. Documented follow up question and answer session.’, ‘Participated in Joint Application Development (JAD) sessions to assist with real-time requirements gathering for software enhancements.’, ‘Performed 24/7 on call duties to service on demand cable network outages while working often with our cross – functional partners (TOA, TIVO, CISCO, Central Office Techs, NETWORK OPS) utilizing AS/400 mainframe.’, ‘Project managed several responsibilities required for stakeholder analysis, gathering requirements, creating Visio flows, use cases, xml samples and developed manual test cases in preparation for executing End 2 End testing.’]}},
 ‘February 2009 to October 2010’: {‘NON-STOP SCRIPTS INC’: {‘Project Manager’: [‘Managed the production of training material to assist with proper record storage for the Department of Defense (DoD) contract to reduce the possibility of record storage violations.’, ‘Managed cross -functional departmental execution of IT Governance for electronic do cuments and policies to ensure adherence to guidelines while maintaining detailed project documents for record retention.’, ‘Designed the department’s SharePoint site to assist with standardizing storage of DoD non-personal data by each department.’, ‘Developed a project plan for vendor efforts to ensure record retention for DoD compliance of storing health and safety records based on LARA training guidelines.’, ‘Managed small BAU rewards /recognition projects for non-profit communities and marketing events based on budgetary dollars not exceeding 100k.’, ‘Created PowerPoint presentations for Senior Management coupled with trace logs and milestones data for change records and new requests.’, ‘Conducted vendor interviews based on procurement recommendations t o aid with make or buy decisions (RFP & RFQ) in preparation for contractual software training to enhance departmental contracts with the DoD.’]}}},
 ‘Education’: {‘ ‘: {‘APPSTER UNIVERSITY’: {‘Master of Arts’: []}, ‘UNIVERSITY CHIKODI ST. LOUIS – St. Louis, MO’: {‘Bachelor of Science’: []}}},
 ‘Additional’: {‘Skills’: [‘Agile Coaching’, ‘Customer Service/Call Center’, ‘Large Scale Scrum (LeSS)’, ‘Formal documentation of procedures & training’, ‘SAFe Scaled Agile/Kanban/Scrum’, ‘Project Management (SDLC)’, ‘Telecom’, ‘Pharma’, ‘Banking’, ‘DoD’, ‘Clarity’, ‘Rally’, ‘Jira’, ‘VersionOne (Digital.ai)’, ‘ADO’, ‘Mural’, ‘Service Now’, ‘SQL’, ‘AS400’, ‘more…’], ‘Certifications and Licenses’: [‘PMP’, ‘ITIL Certification’, ‘Certified Scrum Master’]}}