hari-huynh commited on
Commit
1b8f0b5
1 Parent(s): 767560a

Update KG Schema

Browse files
prompts/cypher_examples.yaml CHANGED
@@ -1,40 +1,33 @@
1
  examples:
2
- - question: Which companies located in 'San Francisco' are hiring for 'Data Scientist' roles with a 'Master's Degree' requirement?
3
- cypher: |
4
- MATCH (j:Job)<-[:RECRUITES]-(c:Company)-[:LOCATES_IN]->(l:Location)
5
  MATCH (j)-[:REQUIRES]->(e:Education)
6
  WHERE toLower(j.name) CONTAINS 'data scientist' AND toLower(l.name) CONTAINS 'san francisco' AND toLower(e.name) CONTAINS "master"
7
  RETURN DISTINCT c.name AS company
8
 
9
- - question: What are the most common skills required for 'Product Manager' jobs across different industries?
10
- cypher: |
11
  MATCH (j:Job)-[:REQUIRES]->(s:Skill)
12
  WHERE toLower(j.name) CONTAINS "product manager"
13
  RETURN s.name, count(*) AS skill_count
14
  ORDER BY skill_count DESC
15
  LIMIT 10
16
 
17
- - question: Find all jobs that require at least 5 years of experience and a 'Bachelor's Degree' in 'Computer Science'
18
- cypher: |
19
  MATCH (we:Work_Exper)<-[:REQUIRES]-(j:Job)-[:REQUIRES]->(e:Education)
20
  WHERE toLower(e.name) CONTAINS "bachelor" AND toLower(e.fields) CONTAINS "computer science" AND toLower(we.duration) CONTAINS "5 years"
21
  RETURN j AS job
22
 
23
- - question: Identify companies that are subsidiaries of 'Google' and are recruiting for 'Software Engineer' roles with 'Senior' level
24
- cypher: |
25
- MATCH (j:Job)<-[:RECRUITES]-(g:Company)<-[:SUBDIARY]-(c:Company)
26
- MATCH (j)-[:AT_LEVEL]->(wl:Work_LV)
27
- WHERE toLower(g.name) CONTAINS "google" AND toLower(j.name) CONTAINS "software engineer" AND toLower(wl.name) CONTAINS "senior"
28
- RETURN DISTINCT c.name AS company
29
-
30
- - question: Find companies recruiting "Machine Learning" jobs and their corresponding job titles.
31
- cypher: |
32
- MATCH (company: Company)-[:RECRUITES]->(job: Job)
33
  WHERE job.name CONTAINS "Machine Learning"
34
  RETURN company.name as company_name, job.name as job_title
35
 
36
- - question: Machine Learning job requires?
37
- cypher: |
38
  MATCH (j:Job)
39
  WHERE toLower(j.name) CONTAINS toLower("Machine Learning")
40
  OPTIONAL MATCH (j)-[:REQUIRES]->(s:Skill)
 
1
  examples:
2
+ - question_example: Which companies located in 'San Francisco' are hiring for 'Data Scientist' roles with a 'Master's Degree' requirement?
3
+ cypher_example: |
4
+ MATCH (j:Job)<-[:RECRUITS]-(c:Company)-[:LOCATES_IN]->(l:Location)
5
  MATCH (j)-[:REQUIRES]->(e:Education)
6
  WHERE toLower(j.name) CONTAINS 'data scientist' AND toLower(l.name) CONTAINS 'san francisco' AND toLower(e.name) CONTAINS "master"
7
  RETURN DISTINCT c.name AS company
8
 
9
+ - question_example: What are the most common skills required for 'Product Manager' jobs across different industries?
10
+ cypher_example: |
11
  MATCH (j:Job)-[:REQUIRES]->(s:Skill)
12
  WHERE toLower(j.name) CONTAINS "product manager"
13
  RETURN s.name, count(*) AS skill_count
14
  ORDER BY skill_count DESC
15
  LIMIT 10
16
 
17
+ - question_example: Find all jobs that require at least 5 years of experience and a 'Bachelor's Degree' in 'Computer Science'
18
+ cypher_example: |
19
  MATCH (we:Work_Exper)<-[:REQUIRES]-(j:Job)-[:REQUIRES]->(e:Education)
20
  WHERE toLower(e.name) CONTAINS "bachelor" AND toLower(e.fields) CONTAINS "computer science" AND toLower(we.duration) CONTAINS "5 years"
21
  RETURN j AS job
22
 
23
+ - question_example: Find companies recruiting "Machine Learning" jobs and their corresponding job titles.
24
+ cypher_example: |
25
+ MATCH (company: Company)-[:RECRUITS]->(job: Job)
 
 
 
 
 
 
 
26
  WHERE job.name CONTAINS "Machine Learning"
27
  RETURN company.name as company_name, job.name as job_title
28
 
29
+ - question_example: Machine Learning job requires?
30
+ cypher_example: |
31
  MATCH (j:Job)
32
  WHERE toLower(j.name) CONTAINS toLower("Machine Learning")
33
  OPTIONAL MATCH (j)-[:REQUIRES]->(s:Skill)
prompts/cypher_instruct.yaml CHANGED
@@ -14,8 +14,8 @@ prefix: |
14
  Examples:
15
 
16
  example_template: |
17
- Question: {question}
18
- Cypher: {cypher}
19
 
20
  suffix: |
21
  Schema: {schema}
 
14
  Examples:
15
 
16
  example_template: |
17
+ Question: {question_example}
18
+ Cypher: {cypher_example}
19
 
20
  suffix: |
21
  Schema: {schema}
prompts/react_prompt_v2.txt CHANGED
@@ -2,7 +2,6 @@ You are an assistant who helps users find suitable jobs by answering questions r
2
  You MUST answer briefly but with complete information in Markdown format.
3
  You MUST bold phrases related to jobs, skills, companies, etc.
4
 
5
-
6
  TOOLS:
7
 
8
  ------
@@ -20,10 +19,9 @@ Action Input: the input to the action
20
  Observation: the result of the action
21
  ```
22
 
23
- You MUST prioritize searching on the Knowledge Graph. Unless the Knowledge Graph does not have enough information, you should not search on the web.
24
  You MUST not duplicate queries.
25
  If both of you do not provide enough information, you must answer "I cannot answer this question."
26
-
27
  When you have a response to say to the Human, or if you do not need to use a tool, you MUST use the format:
28
 
29
  ```
@@ -38,4 +36,4 @@ Previous conversation history:
38
 
39
  New input: {input}
40
 
41
- {agent_scratchpad}
 
2
  You MUST answer briefly but with complete information in Markdown format.
3
  You MUST bold phrases related to jobs, skills, companies, etc.
4
 
 
5
  TOOLS:
6
 
7
  ------
 
19
  Observation: the result of the action
20
  ```
21
 
22
+ You must prioritize searching on the Knowledge Graph. If the knowledge graph does not have enough information, you MUST search on the web.
23
  You MUST not duplicate queries.
24
  If both of you do not provide enough information, you must answer "I cannot answer this question."
 
25
  When you have a response to say to the Human, or if you do not need to use a tool, you MUST use the format:
26
 
27
  ```
 
36
 
37
  New input: {input}
38
 
39
+ {agent_scratchpad}
prompts/schema.txt CHANGED
@@ -1,11 +1,11 @@
1
  Node properties:
2
- Job {name: STRING, date_posted: DATE, status: STRING, responsibility: STRING, workLevel: STRING, benefitCompensation: STRING, workMode: STRING}
3
- Location {name: STRING, locationType: STRING}
4
- Education {name: STRING, majors: STRING, status: STRING}
5
- Skill {name: STRING}
6
- Company {name: STRING}
7
- Sector {name: STRING}
8
- WorkExper {name: STRING, yearsOfExper: STRING}
9
  Relationship properties:
10
 
11
  The relationships:
@@ -17,4 +17,4 @@ The relationships:
17
  (:Skill)-[:HYPERNYM]->(:Skill)
18
  (:Company)-[:OPERATED_IN]->(:Sector)
19
  (:Company)-[:RECRUITS]->(:Job)
20
- (:Company)-[:LOCATED_IN]->(:Location)
 
1
  Node properties:
2
+ Job {{name: STRING, date_posted: DATE, status: STRING, responsibility: STRING, workLevel: STRING, benefitCompensation: STRING, workMode: STRING}}
3
+ Location {{name: STRING, locationType: STRING}}
4
+ Education {{name: STRING, majors: STRING, status: STRING}}
5
+ Skill {{name: STRING}}
6
+ Company {{name: STRING}}
7
+ Sector {{name: STRING}}
8
+ WorkExper {{name: STRING, yearsOfExper: STRING}}
9
  Relationship properties:
10
 
11
  The relationships:
 
17
  (:Skill)-[:HYPERNYM]->(:Skill)
18
  (:Company)-[:OPERATED_IN]->(:Sector)
19
  (:Company)-[:RECRUITS]->(:Job)
20
+ (:Company)-[:LOCATED_IN]->(:Location)
prompts/temp.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ Assistant is designed to be able to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics. As a language model, Assistant is able to generate human-like text based on the input it receives, allowing it to engage in natural-sounding conversations and provide responses that are coherent and relevant to the topic at hand in Markdown format.
2
+ Assistant is constantly learning and improving, and its capabilities are constantly evolving. It is able to process and understand large amounts of text, and can use this knowledge to provide accurate and informative responses to a wide range of questions. Additionally, Assistant is able to generate its own text based on the input it receives, allowing it to engage in discussions and provide explanations and descriptions on a wide range of topics.
3
+ Overall, Assistant is a powerful tool that can help with a wide range of tasks and provide valuable insights and information on a wide range of topics. Whether you need help with a specific question or just want to have a conversation about a particular topic, Assistant is here to assist.