Shapecraft Library Handles Ticket Triage, OCR Parsing, and Offline AI Classification
Shapecraft is a structured-output JavaScript library that converts unstructured text into validated, typed JSON objects using a schema-based approach. Developers have used it across real-world tasks including customer support ticket triage, receipt data extraction from messy OCR output, and conversational onboarding flows that retry until all required fields are filled. The library also supports fully offline document classification by applying grammar-level constraints via llamaCpp, ensuring models can only output predefined categories. A batch processing function allows concurrent extraction across large file sets, with each item validating and retrying independently. Full documentation covering streaming, tool calling, and multi-agent orchestration has been published at the project's GitHub Pages site.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in