Suggest missing job missions¶
This endpoint implements NB-8715: use AI to complete jobs in an existing catalog whose missions are missing or incomplete.
Request from Lexi¶
curl 'http://localhost:8000/lexi/api/v1/jobs/suggest_missions' \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<'JSON'
{
"jobs": [
{
"job_code": "DEV-1",
"job_title": "Backend developer",
"job_description": "Develops and maintains business services.",
"missions": ["You design APIs used by client applications"]
}
],
"outputLanguage": "en",
"clientContext": "B2B software company",
"missionsNumber": 6
}
JSON
{
"jobs": [
{
"job_code": "DEV-1",
"job_title": "Backend developer",
"job_family": "Technology",
"job_description": "Develops and maintains business services.",
"missions": [
"You design APIs used by client applications"
],
"skills": [
{
"skill_code": "SK-1",
"skill_title": "Python"
}
]
}
],
"outputLanguage": "en",
"clientContext": "B2B software company",
"missionsNumber": 6,
"debug": false
}
Only job_title is required for each job. The family, description, skills and
existing missions improve the accuracy of suggestions.
To produce consistent additions, AI Hub first determines the core of the job
from its title, then refines its scope using its family and description.
Existing missions define responsibilities that are already covered, while
skills provide clues about expected activities. Finally, clientContext
adapts suggestions to the explicitly supplied industry, products or services,
working environment and constraints without changing the job or inventing
company-specific facts.
Suggested missions prioritize central, recurring responsibilities that are
still missing. They are written as distinct, concrete professional actions in
the requested language. A skill, personal quality or generic objective does not
constitute a mission on its own. When existing missions use a consistent
grammatical style, suggestions preserve their person, tense and construction.
When no pattern exists, French suggestions use “Vous” followed by a present
tense action verb. Items in suggested_missions contain no bullets, numbers or
list labels; the client remains responsible for their presentation.
missionsNumber defines the target total number of missions for each job. It
accepts a value from 1 to 8 and defaults to 6. If a job already has two missions
and the target is six, the endpoint suggests at most four. If the target has
already been reached, no LLM call is made for that job.
Response¶
Existing missions are never changed. Proposed additions are returned separately
in suggested_missions:
{
"jobs": [
{
"job_code": "DEV-1",
"job_title": "Backend developer",
"job_family": "Technology",
"job_description": "Develops and maintains business services.",
"missions": [
"You design APIs used by client applications"
],
"skills": [
{
"skill_code": "SK-1",
"skill_title": "Python"
}
],
"suggested_missions": [
"You develop backend services to meet business requirements",
"You maintain application code quality and reliability",
"You diagnose and resolve service incidents",
"You document interfaces and technical decisions",
"You collaborate with product and frontend teams"
]
}
]
}
Additional fields received on jobs or skills are preserved in the response. The model is instructed to avoid semantic rewordings of existing missions. Exact text duplicates with existing missions or between suggestions are also removed while processing the response.
Generation errors return 400 with
{"detail":"Error during job mission suggestion"}.
The generated lexi HTTP reference is the authoritative source for parameters, schemas, responses and examples.