GIMKit
Guided Infilling Modeling Toolkit — structured text generation and information extraction using language models.
Write a template with typed placeholders. The LLM fills them in. Get structured, named results back.
from gimkit import guide as g
query = f"""Extract from: "Hi, I'm John Smith, reach me at john@gmail.com"
Name: {g.person_name(name="name")}
Email: {g.e_mail(name="email")}"""
result = model(query, use_gim_prompt=True)
result.tags["name"].content # → "John Smith"
result.tags["email"].content # → "john@gmail.com"
Installation
pip install gimkit
For vLLM support:
pip install gimkit[vllm]
What Can You Do With GIMKit?
GIMKit is a general-purpose information extraction framework. Write a natural-language template with embedded tags, and the model extracts structured data from any text.
| Use Case | Example |
|---|---|
| Contact extraction | Parse names, emails, phones from free-form text |
| Named entity recognition | Extract orgs, people, locations, dates |
| Text classification | Categorize text, assign sentiment labels |
| Event extraction | Pull what/where/when/impact from event descriptions |
| Relation extraction | Find entities and the relationships between them |
| Resume parsing | Extract name, title, education, experience |
| Review analysis | Parse product, price, rating, pros/cons |
See the Classic IE Use Cases, Privacy and PII Use Cases, and Other Use Cases pages for full examples.
Why GIMKit?
- Template-driven — describe what you want in natural language, not label lists
- Format control — regex constraints, enumerated choices, type-safe tags
- Named access — results are keyed by field name, not token positions
- Small-model friendly — works with compact open-source models (4B+)
- Multiple backends — OpenAI, vLLM (server and offline)
Quick Start
from openai import OpenAI
from gimkit import from_openai, guide as g
client = OpenAI()
model = from_openai(client, model_name="gpt-4")
# Simple extraction
result = model(f"Hello, {g(desc='a single word')}!", use_gim_prompt=True)
print(result) # Hello, world!
# Structured form
query = f"""
Name: {g.person_name(name="name")}
Email: {g.e_mail(name="email")}
Favorite color: {g.select(name="color", choices=["red", "green", "blue"])}
"""
result = model(query, use_gim_prompt=True)
print(result.tags["name"].content)
print(result.tags["email"].content)
print(result.tags["color"].content)
Metadata
Release files for gimkit 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gimkit-0.2.1.tar.gz | 18.9 kB | Without provenance | Details for gimkit-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gimkit-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for gimkit-0.2.1-py3-none-any.whl |
Total release size: 43.5 kB
Release files / gimkit-0.2.1.tar.gz
| Download URL | gimkit-0.2.1.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e4e237f65c6f574333a8dddb338d9de85d1c5857237938183bdc2950078244b
|
|
BLAKE2b-256 checksum How to use checksums |
c248c6077e24a2f362c5531f528e0fea69fa6f79e63119904eaf8cb24a8e514d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / gimkit-0.2.1-py3-none-any.whl
| Download URL | gimkit-0.2.1-py3-none-any.whl |
|---|---|
| Size | 24.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
84175443577731994e943005ea50a58b570a8d638a96d5b822b908cfe6222e48
|
|
BLAKE2b-256 checksum How to use checksums |
166e678f5b495fae4a6ccd2bc0f9c095c9f1fe47c23a3248ccf09f8318f8988a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for gimkit 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.