fastino-ai/GLiNER2 — reverse-engineered prompt
Reverse engineered prompt
Build me a Python library for schema based information extraction from plain text. I want one simple interface where I can pass in text plus a schema or a list of labels, and get back things like named entities, text classification results, structured JSON fields, and relations between entities in one pass. Keep it fast on normal CPUs, fully local by default for privacy, and make a cloud API option for a bigger hosted model if an API key is available.
Please make the basic install lightweight for schema building, validation, JSONL training data prep, and API calls, then allow a fuller local install for running models and training. Include easy examples for entity extraction with optional confidence scores and spans, classification, structured extraction, regex based validation, relation extraction, and combined schemas. I also want support for preparing training data and fine tuning custom models, including adapter style fine tuning and switching between adapters. Add tests, clean docs, and a few tutorials. If anything is unclear, check the current docs online and make sensible choices.
Want more depth? Deep Reverse