Gilgamesh Summarization Tool
Overview
Gilgamehs is an LLM-based ontology summarizaton. Developed as a pipeline for optimization in Knowledge Graph Question Answering tasks, to reduce a KG's complexity and prune possible multi-hop questions, further increasing the QA system accuracy. This pipeline utilizes the capabilities of LLMs to create concise summaries and locate possible redundant key-value patterns in the target KG. Implemented as a PyPI package, this pipeline can be deployed to summarize knowledge graphs as an optimization for question answering tasks.
Install
Basic requirements:
-
Python version greater or equal to 3.10.
pip install gilgamesh-summarizer
🔍 Basic Usage: Creating summaries based on Key-Value Pairs
Currently, the major functionality of our tool is in creating ontology summaries through discovering and condensing key-value pair formations in Knowledge Graph ontologies.
Our pipline initially:
- Parses ontology file and knowledge graph data
- Create clusters from initial knowledge graph data
- Cluster numbers can be reduced by removing nodes with high degrees
- Clusters can be further reduced in size by spliting and re-clustering large clusers (powered by PyJedAI)
from gilgamesh_summarizer.KnowledgeGraph import KnowledgeGraph
kg = KnowledgeGraph(path_to_rdf_data,path_to_ontology)
clusters, triples_dict = kg.create_clusters(prune_top_nodes=16,max_cluster_size=200)
clusters
And provides an unsloth based fine-tuned model locates meaningful information that can be used to create summaries
from gilgamesh_summarizer.Summarizer import Summarizer
classifier = Summarizer(kg)
results = classifier.classify_clusters(clusters, triples_dict)
Notebook Demo
An end to end example of the tool's summarization pipeline is presented here: Notebook
Github Repository
The packages official Github repo
Metadata
Release files for gilgamesh-summarizer 0.2.7
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 |
|---|---|---|---|---|
| gilgamesh_summarizer-0.2.7.tar.gz | 13.0 kB | Without provenance | Details for gilgamesh_summarizer-0.2.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gilgamesh_summarizer-0.2.7-py3-none-any.whl | Python 3 | none | any | Details for gilgamesh_summarizer-0.2.7-py3-none-any.whl |
Total release size: 26.4 kB
Release files / gilgamesh_summarizer-0.2.7.tar.gz
| Download URL | gilgamesh_summarizer-0.2.7.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24ec139c5c0f2291834f371ab83eba8dc5f42e0316dbde175816d9c0700b3893
|
|
BLAKE2b-256 checksum How to use checksums |
648da2135b456b53f4284459bf9578fbd04e51c8f40307fde4f55a06cbc52a04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / gilgamesh_summarizer-0.2.7-py3-none-any.whl
| Download URL | gilgamesh_summarizer-0.2.7-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f1a6d6cc5e55e873c9ee42936701b6d4a41c4f4ed99842d2d2a7ba8de25e321
|
|
BLAKE2b-256 checksum How to use checksums |
48b23c23c9c67fbc1a0af66bab57e7af1373a7d3e3b66fef21c7fdf3bf24b587
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for gilgamesh-summarizer 0.2.7
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.