StackMap
Subscribe
Explore / contextgem
shcherbak-ai

contextgem

Declarative LLM extraction from documents: describe Aspects and Concepts in plain language, get structured values back with paragraph- or sentence-level references and built-in justifications.

1,990 183 Python Apache-2.0updated 11 days ago
View on GitHubDispute this mapping →
Curator's take

Its thesis is explicitly anti-RAG: stop chunking and retrieving, put the whole document in a long context window and extract in place. You declare Aspects — the sections or themes worth pulling — and Concepts — the entities, booleans, numbers, ratings and JSON objects inside them — and the framework writes the prompts, builds the validation models, and returns every item with reference_paragraphs, reference_sentences and a justification. That provenance is the point: it makes contract and filing review defensible rather than merely plausible. Two limits it states about itself: no cross-document querying or corpus-wide retrieval, so reach for a real RAG framework there; and its detailed instruction style wants a model at gpt-4o-mini level or better, so 8B local models will struggle even though LiteLLM happily points it at Ollama.

Mapped by ShipWithAI editors · links verified
README.md

ContextGem

ContextGem: Effortless LLM extraction from documents

Package PyPI PyPI Downloads Python Versions License
Quality tests Coverage CodeQL license compatibility security: bandit OpenSSF Best Practices
Tools uv Ruff Pydantic v2 ty pre-commit deptry egress: tethered Hatch project
Docs docs documentation Docstring Coverage DeepWiki
Community [Contributor Covenant](CODE_

Continue your stack

What teams reach for next — and why each earns a place beside contextgem. Ranked by curator confidence.

Alternative to See all + compare →