Skip to content

Commit 97f8f29

Browse files
Docs. OG metadata for Sphinx docs.
1 parent 807afa9 commit 97f8f29

File tree

15 files changed

+1306
-1901
lines changed

15 files changed

+1306
-1901
lines changed

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ authors:
44
- family-names: Shcherbak
55
given-names: Sergii
66
email: sergii@shcherbak.ai
7-
title: "ContextGem: The easiest and fastest way to build LLM extraction workflows through powerful abstractions"
7+
title: "ContextGem: Easier and faster way to build LLM extraction workflows through powerful abstractions"
88
date-released: 2024-04-01
99
url: "https://github.com/shcherbak-ai/contextgem"

NOTICE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ContextGem - The easiest and fastest way to build LLM extraction workflows through powerful abstractions
1+
ContextGem - Easier and faster way to build LLM extraction workflows through powerful abstractions
22
=========================================================================================================
33

44
Copyright (c) 2025 Shcherbak AI AS
@@ -48,6 +48,7 @@ Development Dependencies:
4848
- sphinx-book-theme: Book-like theme for Sphinx
4949
- sphinx-copybutton: Adds copy button to code blocks in Sphinx docs
5050
- sphinx-design: Component library for Sphinx documentation
51+
- sphinxext-opengraph: OpenGraph metadata support for Sphinx documentation
5152

5253
Each of these components may have their own licenses. Users should refer to the
5354
respective project repositories for detailed license information.

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
![ContextGem](/docs/source/_static/contextgem_poster.png "ContextGem - The easiest and fastest way to build LLM extraction workflows through powerful abstractions")
1+
![ContextGem](/docs/source/_static/contextgem_poster.png "ContextGem - Easier and faster way to build LLM extraction workflows through powerful abstractions")
22

3-
# ContextGem: The Easiest and Fastest Way to Build LLM Extraction Workflows
3+
# ContextGem: Easier and faster way to build LLM extraction workflows
44

55
[![tests](https://github.com/shcherbak-ai/contextgem/actions/workflows/ci-tests.yml/badge.svg?branch=main)](https://github.com/shcherbak-ai/contextgem/actions/workflows/ci-tests.yml)
66
[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/SergiiShcherbak/daaee00e1dfff7a29ca10a922ec3becd/raw/coverage.json)](https://github.com/shcherbak-ai/contextgem/actions)
@@ -224,7 +224,7 @@ See more examples in the documentation:
224224
- [Concept Extraction from Document (vision)](https://contextgem.dev/quickstart.html#concept-extraction-from-document-vision)
225225

226226
### Advanced usage examples
227-
- [Extracting Aspects with Concepts](https://contextgem.dev/advanced_usage.html#extracting-aspects-with-concepts)
227+
- [Extracting Aspects Containing Concepts](https://contextgem.dev/advanced_usage.html#extracting-aspects-with-concepts)
228228
- [Extracting Aspects and Concepts from a Document](https://contextgem.dev/advanced_usage.html#extracting-aspects-and-concepts-from-a-document)
229229
- [Using a Multi-LLM Pipeline to Extract Data from Several Documents](https://contextgem.dev/advanced_usage.html#using-a-multi-llm-pipeline-to-extract-data-from-several-documents)
230230

@@ -236,6 +236,17 @@ ContextGem leverages LLMs' long context windows to deliver superior extraction a
236236
Read more on [how it works](https://contextgem.dev/how_it_works.html) in the documentation.
237237

238238

239+
## ⚡ Optimizations
240+
241+
ContextGem documentation offers guidance on optimization strategies to maximize performance, minimize costs, and enhance extraction accuracy:
242+
243+
- [Optimizing for Accuracy](https://contextgem.dev/optimizations/optimization_accuracy.html)
244+
- [Optimizing for Speed](https://contextgem.dev/optimizations/optimization_speed.html)
245+
- [Optimizing for Cost](https://contextgem.dev/optimizations/optimization_cost.html)
246+
- [Dealing with Long Documents](https://contextgem.dev/optimizations/optimization_long_docs.html)
247+
- [Choosing the Right LLM(s)](https://contextgem.dev/optimizations/optimization_choosing_llm.html)
248+
249+
239250
## 📚 Documentation
240251

241252
Full documentation is available at [contextgem.dev](https://contextgem.dev).

contextgem/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#
1818

1919
"""
20-
ContextGem - The easiest and fastest way to build LLM extraction workflows through powerful abstractions
20+
ContextGem - Easier and faster way to build LLM extraction workflows through powerful abstractions
2121
"""
2222

2323
__version__ = "0.1.0"

dev/readme.template.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
![ContextGem](/docs/source/_static/contextgem_poster.png "ContextGem - The easiest and fastest way to build LLM extraction workflows through powerful abstractions")
1+
![ContextGem](/docs/source/_static/contextgem_poster.png "ContextGem - Easier and faster way to build LLM extraction workflows through powerful abstractions")
22

3-
# ContextGem: The Easiest and Fastest Way to Build LLM Extraction Workflows
3+
# ContextGem: Easier and faster way to build LLM extraction workflows
44

55
[![tests](https://github.com/shcherbak-ai/contextgem/actions/workflows/ci-tests.yml/badge.svg?branch=main)](https://github.com/shcherbak-ai/contextgem/actions/workflows/ci-tests.yml)
66
[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/SergiiShcherbak/daaee00e1dfff7a29ca10a922ec3becd/raw/coverage.json)](https://github.com/shcherbak-ai/contextgem/actions)
@@ -56,7 +56,7 @@ See more examples in the documentation:
5656
- [Concept Extraction from Document (vision)](https://contextgem.dev/quickstart.html#concept-extraction-from-document-vision)
5757

5858
### Advanced usage examples
59-
- [Extracting Aspects with Concepts](https://contextgem.dev/advanced_usage.html#extracting-aspects-with-concepts)
59+
- [Extracting Aspects Containing Concepts](https://contextgem.dev/advanced_usage.html#extracting-aspects-with-concepts)
6060
- [Extracting Aspects and Concepts from a Document](https://contextgem.dev/advanced_usage.html#extracting-aspects-and-concepts-from-a-document)
6161
- [Using a Multi-LLM Pipeline to Extract Data from Several Documents](https://contextgem.dev/advanced_usage.html#using-a-multi-llm-pipeline-to-extract-data-from-several-documents)
6262

@@ -68,6 +68,17 @@ ContextGem leverages LLMs' long context windows to deliver superior extraction a
6868
Read more on [how it works](https://contextgem.dev/how_it_works.html) in the documentation.
6969

7070

71+
## ⚡ Optimizations
72+
73+
ContextGem documentation offers guidance on optimization strategies to maximize performance, minimize costs, and enhance extraction accuracy:
74+
75+
- [Optimizing for Accuracy](https://contextgem.dev/optimizations/optimization_accuracy.html)
76+
- [Optimizing for Speed](https://contextgem.dev/optimizations/optimization_speed.html)
77+
- [Optimizing for Cost](https://contextgem.dev/optimizations/optimization_cost.html)
78+
- [Dealing with Long Documents](https://contextgem.dev/optimizations/optimization_long_docs.html)
79+
- [Choosing the Right LLM(s)](https://contextgem.dev/optimizations/optimization_choosing_llm.html)
80+
81+
7182
## 📚 Documentation
7283

7384
Full documentation is available at [contextgem.dev](https://contextgem.dev).

dev/usage_examples/docs/optimizations/optimization_accuracy.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
# Define document
88
doc = Document(
99
raw_text="Non-Disclosure Agreement...",
10-
sat_model_id="sat-6l", # default is "sat-3l-sm"
10+
sat_model_id="sat-6l-sm", # default is "sat-3l-sm"
1111
paragraph_segmentation_mode="sat", # default is "newlines"
1212
# sentence segmentation mode is always "sat", as other approaches proved to be less accurate
1313
)
1414

1515
# Define document concepts
1616
doc.concepts = [
1717
StringConcept(
18-
name="Title",
18+
name="Title", # A very simple concept, just an example for testing purposes
1919
description="Title of the document",
2020
add_justifications=True, # enable justifications
2121
justification_depth="brief", # default
@@ -24,7 +24,8 @@
2424
content="Supplier Agreement",
2525
)
2626
],
27-
)
27+
),
28+
# ... add other concepts ...
2829
]
2930

3031
# ... attach other aspects/concepts to the document ...

docs/build_raw_docs_for_llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def concatenate_docs(doc_paths: list[str], text_dir: str, output_file: str) -> N
139139
"""
140140
with open(output_file, "w", encoding="utf-8") as outfile:
141141
outfile.write(
142-
"ContextGem - The easiest and fastest way to build LLM extraction workflows through powerful abstractions\n"
142+
"ContextGem - Easier and faster way to build LLM extraction workflows through powerful abstractions\n"
143143
)
144144
outfile.write("=" * 100 + "\n\n")
145145
outfile.write("Copyright (c) 2025 Shcherbak AI AS\n")

docs/docs-raw-for-llm.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ContextGem - The easiest and fastest way to build LLM extraction workflows through powerful abstractions
1+
ContextGem - Easier and faster way to build LLM extraction workflows through powerful abstractions
22
====================================================================================================
33

44
Copyright (c) 2025 Shcherbak AI AS
@@ -3887,8 +3887,8 @@ Below are complete, self-contained examples demonstrating advanced
38873887
usage of ContextGem.
38883888

38893889

3890-
🔍 Extracting Aspects with Concepts
3891-
===================================
3890+
🔍 Extracting Aspects Containing Concepts
3891+
=========================================
38923892

38933893
Tip:
38943894

@@ -4550,15 +4550,15 @@ Example of optimizing extraction for accuracy
45504550
# Define document
45514551
doc = Document(
45524552
raw_text="Non-Disclosure Agreement...",
4553-
sat_model_id="sat-6l", # default is "sat-3l-sm"
4553+
sat_model_id="sat-6l-sm", # default is "sat-3l-sm"
45544554
paragraph_segmentation_mode="sat", # default is "newlines"
45554555
# sentence segmentation mode is always "sat", as other approaches proved to be less accurate
45564556
)
45574557

45584558
# Define document concepts
45594559
doc.concepts = [
45604560
StringConcept(
4561-
name="Title",
4561+
name="Title", # A very simple concept, just an example for testing purposes
45624562
description="Title of the document",
45634563
add_justifications=True, # enable justifications
45644564
justification_depth="brief", # default
@@ -4567,7 +4567,8 @@ Example of optimizing extraction for accuracy
45674567
content="Supplier Agreement",
45684568
)
45694569
],
4570-
)
4570+
),
4571+
# ... add other concepts ...
45714572
]
45724573

45734574
# ... attach other aspects/concepts to the document ...
3.35 MB
Loading

docs/source/advanced_usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ Advanced usage examples
2121
Below are complete, self-contained examples demonstrating advanced usage of ContextGem.
2222

2323

24-
🔍 Extracting Aspects with Concepts
25-
------------------------------------
24+
🔍 Extracting Aspects Containing Concepts
25+
------------------------------------------
2626

2727
.. tip::
2828
Concept extraction is useful for extracting specific data points from a document or an aspect. For example, a "Payment terms" aspect in a contract may have multiple concepts:

0 commit comments

Comments
 (0)