Returned item condition
Grade a returned item from the warehouse inspection notes, from sealed to not resellable.
F@fProblem
Inspectors write short notes in their own words. Turning them into a restock decision by hand is slow, and the same note gets graded differently on different shifts.
Goal
Place each return on one grading scale so restock, open-box, refurbishment and recycling queues are filled consistently.
Input / state
The inspector's notes and the product category.
- inspection_notes
- Free-text notes written at the returns bench.
- product_category
- The product category, since wear standards differ.
Decision question
conditionHow close is this returned item to new condition, based on the inspection notes?
Rubric levels
0As new: sealed or unopened, packaging intact.1Opened but complete and unused: all parts present, no marks.2Used or lightly damaged: signs of use, minor marks, or missing accessories.3Not resellable: broken, heavily damaged, contaminated or unsafe.
Allowed outcomes
Decided in your code from the answer and its confidence. Thresholds are yours to set and test.
- Restock as newMost likely level is 0 and confidence meets your threshold.
- Open-box stockMost likely level is 1 and confidence meets your threshold.
- RefurbishMost likely level is 2 and confidence meets your threshold.
- Not resellableMost likely level is 3 and confidence meets your threshold.
- Inspector reviewConfidence is below your threshold, or the notes don't describe the item's state.
Example scenarios
Predefined demonstrations. No model is called; the outcome shown is an illustrative judgment.
Example state
{
"inspection_notes": "Shrink wrap intact, factory seal unbroken.",
"product_category": "Board games"
}Outcome
IllustrativeMost likely level is 0 and confidence meets your threshold.
Why
Unopened with intact packaging.
Using it well
- Notes that say nothing about the item's state ("looks fine, didn't open") should reach a person, not be graded as new.
- Safety signs such as a swollen battery or a burnt smell need their own rule in code that overrides any grade.
- Calibrate on a sample graded by your senior inspectors before relying on the automated grade.
Request definition
POST https://api.typesafe.ai/v1/systemone{
"model": "jev-latest",
"state": {
"inspection_notes": "<inspection_notes>",
"product_category": "<product_category>"
},
"questions": {
"condition": {
"type": "score",
"instructions": "How close is this returned item to new condition, based on the inspection notes?",
"criteria": [
"As new: sealed or unopened, packaging intact.",
"Opened but complete and unused: all parts present, no marks.",
"Used or lightly damaged: signs of use, minor marks, or missing accessories.",
"Not resellable: broken, heavily damaged, contaminated or unsafe."
]
}
}
}Request shape from the System One API reference; a Kev server accepts the same body. Replace the placeholder state with your data. Requests need your own API key or server.
Version History
Initial version