Enhancing CV Accuracy with Structured KPI Metrics
Improving Data Precision
When using AI to generate experience bullets for resumes, a common frustration is the tendency for models to hallucinate metrics. To combat this in the devlog-ist/landing project, we recently implemented a structured system for users to input verified KPI metrics directly into their experience entries, ensuring the output reflects actual achievements rather than generated fillers.
The Concept: Verified Data Injection
Think of this like providing a blueprint to a builder. Instead of asking the AI to guess the outcome, we provide the specific components—Action Verb, Object, and Numerical Impact—to force the model to use the provided data verbatim.
Implementation Approach
We structure the input using a collection of metrics that are serialized and injected into the AI system prompt. This guarantees the "what" and "by how much" remain consistent throughout the generation process.
public function formatKpi(array $metric): string
{
// Maps structured input to a prompt-ready format
return sprintf(
"%s %s by %s",
$metric['action_verb'],
$metric['task_description'],
$metric['impact_value']
);
}
The formatKpi method serves as a bridge, transforming raw input from the Livewire components into a clean string that the language model can parse and anchor its writing on.
Validation
To ensure this logic holds up under various input scenarios, we utilize JUnit tests to verify that our formatting logic handles empty metrics or incomplete data fields gracefully, preventing the AI from receiving malformed input prompts.
Results
By anchoring the AI generation in structured data, we have significantly reduced the frequency of fabricated statistics in user CVs. Users can now confidently update their experience entries knowing that the technical impacts they report are exactly what the end reader will see.
Next Steps
Moving forward, we plan to implement a dynamic validation layer that warns users if their metric inputs lack a numerical value, ensuring high-quality data before the prompt is even sent to the AI service.
Generated with Gitvlg.com