Spaces:
Sleeping
Download README.md from Win786/careercompass: direct link, hf CLI and curl.
- Browser
- Download file 18.3 kB
-
https://huggingface.co/spaces/Win786/careercompass/resolve/main/README.md
- Command line
-
hf download hf://spaces/Win786/careercompass/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Win786/careercompass/resolve/main/README.md
title: CareerCompass — Career Paths, Backed by Graph Evidence
emoji: 🧭
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
startup_duration_timeout: 30m
pinned: false
short_description: Explore careers, compare skills, inspect graph results.
tags:
- falkordb
- knowledge-graph
- career-navigation
suggested_hardware: cpu-basic
CareerCompass
CareerCompass is a career-navigation agent built around FalkorDB and the O*NET 31.0 Database. Its graph computes skill gaps, importance-weighted career matches, and bounded career-transition routes. A validated deterministic router selects three fixed read-only queries. An optional LLM rephrases graph results; it cannot change queries or rankings. Exact tables, graph evidence, wages, and scores always come from FalkorDB.
Start with a decision
- Find careers: choose skill chips such as Critical Thinking, Mathematics, and Reading Comprehension, then run a comparison.
- Compare my skills: search for Data Scientists, select Critical Thinking and Mathematics, and optionally enter
critical thinking=3. Names without levels remain unassessed. - Explore a transition: select Software Developers and Data Scientists to see a route through shared graph features and preparation zones.
Free-text chat remains available. Your profile can be edited and reused without clearing the conversation. Follow-up actions select an occupation from the latest result; Run comparison applies the changes. Download this comparison exports full returned rows, parameters, sources, and caveats as JSON. Profiles and questions are personal input: share an export deliberately.
Read the one-page judge brief or open Inside the graph in the app. See SPACE_PRESENTATION.md for the title, thumbnail, screenshot, and what-to-try copy.
Run the app / deploy
See DEPLOY.md for a Docker Spaces setup, exact upload steps, optional OpenAI configuration, local launch, and the HTTP smoke battery. No Space has been created automatically. CPU Basic is the target hardware; account eligibility and free compute are distinct (see deployment notes).
python -m pip install -r requirements.txt
python deploy.py --prepare
python deploy.py
The standalone python app.py entry point still works against an existing
FalkorDB server using the FALKORDB_* connection settings.
Wage enrichment and visual evidence
Wages come from the official BLS May 2025 national OEWS workbook,
separate from ONET 31.0. The loader inspects headers, selects national
cross-industry/all-ownership detailed rows, and reads A_MEDIAN (not the mean).
An exact six-digit parent SOC join maps ONET specialties to the same labeled
parent estimate. No wage is inferred for unmatched or suppressed records.
Current coverage: 956 numeric annual medians, 5 unavailable medians, 55 unmatched
occupations. These are national USD estimates, not local, entry-level, or
individual salary predictions. The source period, source SOC, availability,
URL, and SHA-256 are stored on Occupation nodes. Wages do not affect rankings.
python falkordb_ingest.py --data-dir data --wage-file data/oesm25nat.zip
All three query files include wage maps; route wages are attached to each
occupation. The UI shows year and parent SOC beside amounts. Not available
means no usable annual median, never zero. Top-coded medians are not represented
as exact numbers. A normal loader run without a wage file replaces occupation
properties and therefore leaves wages unavailable; include the file on reload.
The top career route has an offline SVG node-link diagram with actual shared Skill/Knowledge/TaskText evidence and job-zone labels. Four features per hop are displayed, with a sample count and full evidence below; the score still uses all features. Zones describe preparation, not licensing eligibility.
When OPENAI_API_KEY is set, only successful graph results and the current
question are sent for optional explanation. OPENAI_MODEL defaults to
gpt-4.1-mini. Without a key, or on provider/validation failure, deterministic
text remains available. The UI identifies explanation mode and separates LLM
latency from graph timing. See DEPLOY.md for privacy, cost, and test limits.
Sprint
Project brief: FalkorDB Graph Hacks, Track 3 (Company Brain). Build October 14–16, 2026; ship October 17; judging deadline October 18. These dates and the track are supplied by the project owner.
- Day 1: data inspection, schema, ingestion, three graph computations.
- Day 2: agent tool with
ro_query, input validation, evidence-first UI. - Day 3: integration, demo cases, documentation, deployment rehearsal.
- October 17: ship and record a reproducible demo.
Setup and ingestion
Python 3.10 or later and an accessible FalkorDB server are required.
python -m pip install FalkorDB openpyxl
python falkordb_ingest.py --data-dir ~/workspace/falkordb-hackathon/onet --inspect-only
python falkordb_ingest.py --data-dir ~/workspace/falkordb-hackathon/onet --validate-only
python falkordb_ingest.py --data-dir ~/workspace/falkordb-hackathon/onet
Set FALKORDB_HOST, FALKORDB_PORT, FALKORDB_USERNAME,
FALKORDB_PASSWORD, and FALKORDB_SSL=true as appropriate. Do not commit
credentials. The default graph is careercompass_onet_31_0.
Every load first prints the first six rows of every sheet and detects headers. It supports single-row headers, leading title rows, and vertical header fragments spanning up to three rows within the first 40 rows. It stops on unknown layouts, conflicting duplicate keys, unsupported scales, invalid flags, invalid SOC codes, out-of-range ratings, missing files, and orphan relationships. It supports the documented long-form IM/LV rating format, not arbitrary reformatted wide tables.
Use one ingestion process at a time and a dedicated graph per release. Loads are idempotent upserts for the same release. They do not remove stale entities when switching releases. A failed multi-batch load can leave a partial graph; keep the agent offline until loading and validation succeed, then rerun safely.
schema.cypher contains valid Cypher statements and commented Redis constraint
commands. The loader executes statements separately, waits for indexes, and
applies the constraint commands. FalkorDB does not use Neo4j's CREATE CONSTRAINT
syntax. Labels arise from ingestion rather than standalone label declarations.
Graph model
Every number the app shows — match scores, gap tables, route rankings, wages — comes out of a FalkorDB read-only query. Nothing is precomputed or guessed.
graph TB
subgraph FalkorDB["FalkorDB · careercompass_onet_31_0 · 91,378 nodes / 242,797 rels"]
OCC["Occupation<br/>(soc)"]
SK["Element: Skill"]
KN["Element: Knowledge"]
AB["Element: Ability"]
JZ["JobZone<br/>(code, rank)"]
JT["JobTitle"]
T["Task (id)"]
TT["TaskText"]
TECH["Technology"]
TC["TechnologyCategory"]
OCC --"REQUIRES<br/>(importance, level)"--> SK
OCC --"REQUIRES"--> KN
OCC --"REQUIRES"--> AB
OCC --"IN_ZONE"--> JZ
OCC --"ALSO_KNOWN_AS"--> JT
OCC --"PERFORMS"--> T
T --"HAS_TEXT"--> TT
OCC --"USES"--> TECH
TECH --"IN_CATEGORY"--> TC
end
subgraph Agent["Agent · read-only tools (graph.ro_query)"]
SM["skill_match.cypher<br/>find careers"]
SG["skill_gap.cypher<br/>compare skills"]
CP["career_paths.cypher<br/>explore transition"]
end
SM --> OCC
SM --> SK
SG --> OCC
SG --> SK
CP --> OCC
CP --> SK
CP --> KN
CP --> TT
CP --> JZ
Occupation {soc}requiresElement:Skill,Element:Knowledge, orElement:Ability. Element ID is the shared identity, not its display name.Skill.familyseparates essential and transferable skills.REQUIRESstores raw importance and level, normalized values, usability flags, and a JSON string preserving all rating rows and statistical metadata.Occupation -IN_ZONE-> JobZone {code, rank}. In 31.0 the four codes are 2, 3, 4, and 5; code 2 combines the old zones 1 and 2. Rank is ordinal.Occupation -ALSO_KNOWN_AS-> JobTitle. Exact spelling identities preserve case variants. A title can refer to several occupations. Short titles and source codes remain on the occupation-specific relationship.Occupation -PERFORMS-> Task {id}preserves occupation-specific task IDs.Task -HAS_TEXT-> TaskTextgroups only equal text after lowercasing and whitespace normalization. This is not an assertion of semantic equivalence.Occupation -USES-> Technology -IN_CATEGORY-> TechnologyCategory. Software examples are keyed by category plus exact name; different categories are not silently merged. In-demand is occupation-specific; hot-technology is stored on the example. No invented software importance or level values.Datasetanddataset/source_fileproperties record source provenance.
Agent query contract
Only expose a tool using graph.ro_query(query, params=parameters, timeout=15000).
Never expose ingestion, graph.query, arbitrary Redis commands, or schema
mutations as agent tools. Use a separate read-only database credential for the
agent. Reject invalid parameters before querying, bound query size and results,
and return a clear message on missing occupations, unresolved skills, missing
rating coverage, timeout, or no route. Do not retry through the write endpoint.
from pathlib import Path
from falkordb import FalkorDB
graph = FalkorDB().select_graph('careercompass_onet_31_0')
result = graph.ro_query(
Path('skill_gap.cypher').read_text(),
params={
'soc': '15-2051.00',
'skills': ['Critical Thinking', 'Mathematics'],
'levels': [{'name': 'Critical Thinking', 'level': 2.0}],
},
timeout=15000,
)
print(result.result_set)
Normalize user skill whitespace, resolve canonical skill names, and validate
the levels list: one numeric, finite value in [0,7] per distinct skill name.
An explicit level also reports possession. Skill names alone cannot identify
weakness: use levels=[] and expect unassessed for reported skills.
An unreported skill is called missing relative to the supplied profile,
not a claim that the person lacks the skill in real life.
skill_match.cypher takes skills. It ranks first by the number of supplied
skills matched, then by importance-weighted requirement coverage. This avoids
putting a one-skill occupation first merely because it has 100% coverage.
Duplicate input names do not boost scores.
Unknown names receive no credit. This query covers rated Skill nodes; software
names such as Python belong to Technology and need a separate USES-based tool.
career_paths.cypher takes from_soc and to_soc. It evaluates direct routes
and routes with one intermediate occupation. It retrieves Skill, Knowledge,
and exact TaskText features through graph relationships; Cypher computes
Jaccard overlap, bottleneck overlap, and job-zone jumps. It prefers smaller
maximum zone jumps, then stronger bottleneck overlap, then shorter total zone
movement and fewer transitions. It requires at least three shared features
on every hop. Missing zone data retains the occupation: its displayed zone is
null, and any hop with an unknown zone receives a ranking penalty of 4 (above
the maximum known-zone jump of 3). This penalty is application policy, not an
estimated preparation level. Explain unknown zones explicitly in the UI.
Equal start and destination returns no transition; handle it as "already there".
The optimized query processes both endpoint feature sets through one UNWIND pipeline, discovers neighbors by reversing their feature relationships, and requires at least three distinct shared features with both endpoints before computing an intermediate's complete feature count. It then prunes on the first ranking key (maximum zone jump), retaining every tie at the tenth candidate's priority. Only counts cross the full-feature expansion; evidence keys and names are recovered after the final LIMIT 10. No correlated CALL/UNION branches, global occupation-profile collection, all-pairs routes, or DISTINCT maps are used. All scoring remains in Cypher; no precomputed transition cache or loader changes are required.
The importance cutoff of 3.0 and three-feature minimum are explicit application policies, not O*NET recommendations. Job zones do not measure years of training, licensure eligibility, or the probability of hiring. These routes are evidence based suggestions, not observed worker movements. Optional future enrichment: Tasks to DWAs plus DWA Reference for curated cross-occupation activity bridges, Level Scale Anchors for proficiency assessment, and company roles/employee skill records for the Company Brain use case. No company data is fabricated.
Sources and data changes
This project uses the O*NET 31.0 Database, provided by the U.S. Department of Labor, Employment and Training Administration (USDOL/ETA), under Creative Commons Attribution 4.0 International. O*NET® is a trademark of USDOL/ETA.
CareerCompass transforms the source into a graph, pivots IM/LV rating rows,
normalizes search keys and numeric scales, groups exactly matching normalized
task text, and computes application-specific ranking metrics. These are
CareerCompass modifications. USDOL/ETA has not approved, endorsed, or tested
these modifications. Source ratings, quality flags, dates, sources, and
frequency distributions are retained in ratings_json on rating relationships.
Primary documentation:
- https://www.onetcenter.org/dictionary/31.0/excel/
- https://www.onetcenter.org/dictionary/31.0/excel/software_skills.html
- https://www.onetcenter.org/dictionary/31.0/excel/task_statements.html
- https://www.onetcenter.org/dl_files/database/db_31_0_json/job_zone_reference.json
- https://docs.falkordb.com/commands/graph.constraint-create
- https://docs.falkordb.com/commands/graph.ro-query
AI assistance disclosure
OpenAI ChatGPT/Codex assisted with source-documentation research, schema design, new ingestion code, Cypher queries, debugging, and documentation for this sprint. The code in this starter was newly written for the project. Official data, FalkorDB, openpyxl, and other dependencies are third-party resources, not original project code. The project owner is responsible for reviewing the implementation and recording any additional AI use before submission.
Day-1 verification
The project owner's local data directory was not mounted in the build workspace. Testing therefore used fresh copies of all ten official O*NET 31.0 Excel files, not the owner's local copies. Their headers were inspected before the ingestion logic was written; all ten official copies had one header row. Local copies must still be inspected with the included command.
Verified with FalkorDB server 4.18.3, FalkorDB Python client 1.8.0, and openpyxl 3.1.5. These identify the test environment, not a recommendation to deploy an older server release.
- All ten official workbooks parsed and passed referential/data validation.
- Header detection passed synthetic split-row and leading-banner cases.
- Two complete loads produced identical totals: 91,378 nodes and 242,797 edges.
- The graph contained 1,016 occupations, 35 skills, 33 knowledge elements, 52 abilities, 18,838 tasks, 17,578 normalized task texts, 4 job zones, 44,779 job titles, 8,908 category-scoped software examples, 134 software categories, and one Dataset node.
- Relationship totals: 109,200 REQUIRES; 18,838 PERFORMS; 18,838 HAS_TEXT; 923 IN_ZONE; 54,269 ALSO_KNOWN_AS; 31,821 USES; 8,908 IN_CATEGORY.
- All three query computations returned results through
ro_queryon the full graph. Empty skill lists and nonexistent route endpoints were checked. - A deliberate CREATE through
ro_querywas rejected by the server. - After the full-data run exposed a one-skill coverage ranking issue, matching was changed to prioritize matched skill count before coverage; a targeted FalkorDB fixture confirmed that ranking and duplicate-input behavior.
- Full workbook parsing, loading, and full-data query behavior have not yet been verified against the owner's local copies or deployment server.
Optimization verification
The latest run reconstructed an isolated verification graph because the prior runtime database was no longer present. The unchanged loader produced the same 91,378 nodes and 242,797 relationships. Query-only deployment requires no reload. The existing setup also passed a warm rerun, including full-text indexes.
On that runtime, one first call followed by 20 warm ro_query calls produced:
| Query | First call | Warm median | Warm p95 | Rows |
|---|---|---|---|---|
| Skill gap | 3.1 ms | 1.1 ms | 1.6 ms | 12 |
| Skill match | 50.6 ms | 47.2 ms | 61.8 ms | 20 |
| Career paths | 108.6 ms | 96.9 ms | 105.8 ms | 10 |
The previous path query measured 589.0 ms median over 10 warm calls on the same runtime, versus 96.9 ms for the optimized query (about 6.1x faster). This is not a sub-100-ms latency guarantee: a second route pair measured 101.7 ms median. Timings include the local client round trip and result decoding, without application response caching; deployment hardware/network can change them.
Exact route ordering, scores and every evidence key/name were checked against
an independent test-only calculation from the source model. Task-only routes,
duplicate task text, weak and one-sided candidates, zero-feature endpoints,
missing zones, boundary ties in pruning, malformed/null/duplicate skill inputs,
null-safe gap sorting, and server rejection of writes through ro_query passed.
typeOf() remains in the gap query, and O*NET 31.0 zones remain codes 2–5.
See TEST_RESULTS.md for verification scope. Run
python smoke_test.py --url http://127.0.0.1:7860 against the running app
to reproduce the ten-question HTTP battery.
