Prompt Engineering
Table of contents
- Purpose
- Prompt contract
- Structured output
- Evidence grounding
- Provider abstraction
- Localization
- Safety and review
- Versioning and evaluation
Purpose
Prompts translate structured RetainAI context into bounded, reviewable advisor output.
Prompt contract
Prompts should define:
text
role
task
input schema
allowed evidence
output schema
failure behavior
safety constraints
localeStructured output
Prefer validated structured responses:
json
{
"recommendation_key": "advisor.action.review_manager_context",
"rationale_keys": [],
"evidence": [],
"limitations": [],
"confidence": null
}Evidence grounding
Provider output must reference supplied evidence and must not invent employee, resume, psychometric, or organizational facts.
Provider abstraction
Supported adapter states:
text
disabled
gemini
bedrockPrompt templates should not depend on a provider-specific response format.
Localization
Prompt and explanation architecture must support:
text
en
esThe backend should return stable message keys and variables where possible. The dashboard renders localized text.
Safety and review
Outputs remain advisory and reviewable. Prompts must not authorize autonomous high-impact employment decisions.
Versioning and evaluation
Track:
text
prompt version
provider
model identifier
locale
input schema
output schema
evaluation dataset
quality results