Name | sparql-llm JSON |
Version |
0.0.3
JSON |
| download |
home_page | None |
Summary | Reusable components and complete chat system to improve Large Language Models (LLMs) capabilities when generating SPARQL queries for a given set of endpoints, using Retrieval-Augmented Generation (RAG) and SPARQL query validation from the endpoint schema. |
upload_time | 2024-10-28 09:34:51 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT License
Copyright (c) 2024-present SIB Swiss Institute of Bioinformatics
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
keywords |
expasy
kgqa
llm
sparql
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<div align="center">
# âĻ SPARQL query generation with LLMs ðĶ
[![PyPI - Version](https://img.shields.io/pypi/v/sparql-llm.svg?logo=pypi&label=PyPI&logoColor=silver)](https://pypi.org/project/sparql-llm/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sparql-llm.svg?logo=python&label=Python&logoColor=silver)](https://pypi.org/project/sparql-llm/)
[![Tests](https://github.com/sib-swiss/sparql-llm/actions/workflows/test.yml/badge.svg)](https://github.com/sib-swiss/sparql-llm/actions/workflows/test.yml)
</div>
This project provides reusable components and a complete web service to enhance the capabilities of Large Language Models (LLMs) in generating [SPARQL](https://www.w3.org/TR/sparql11-overview/) queries for specific endpoints. By integrating Retrieval-Augmented Generation (RAG) and SPARQL query validation through endpoint schemas, this system ensures more accurate and relevant query generation on large scale knowledge graphs.
The components are designed to work either independently or as part of a full chat-based system that can be deployed for a set of SPARQL endpoints. It **requires endpoints to include metadata** such as [SPARQL query examples](https://github.com/sib-swiss/sparql-examples) and endpoint descriptions using the [Vocabulary of Interlinked Datasets (VoID)](https://www.w3.org/TR/void/), which can be automatically generated using the [void-generator](https://github.com/JervenBolleman/void-generator).
## ð Features
- **Metadata Extraction**: Functions to extract and load relevant metadata from SPARQL endpoints. These loaders are compatible with [LangChain](https://python.langchain.com) but are flexible enough to be used independently, providing metadata as JSON for custom vector store integration.
- **SPARQL Query Validation**: A function to automatically parse and validate federated SPARQL queries against the VoID description of the target endpoints.
- **Deployable Chat System**: A reusable and containerized system for deploying an LLM-based chat service with a web UI, API, and vector database. This system helps users write SPARQL queries by leveraging endpoint metadata (WIP).
- **Live Example**: Configuration for **[chat.expasy.org](https://chat.expasy.org)**, an LLM-powered chat system supporting SPARQL query generation for endpoints maintained by the [SIB](https://www.sib.swiss/).
> [!TIP]
>
> You can quickly check if an endpoint contains the expected metadata at [sib-swiss.github.io/sparql-editor/check](https://sib-swiss.github.io/sparql-editor/check)
## ðĶïļ Reusable components
### Installation
> Requires Python >=3.9
```bash
pip install sparql-llm
```
### SPARQL query examples loader
Load SPARQL query examples defined using the SHACL ontology from a SPARQL endpoint. See **[github.com/sib-swiss/sparql-examples](https://github.com/sib-swiss/sparql-examples)** for more details on how to define the examples.
```python
from sparql_llm import SparqlExamplesLoader
loader = SparqlExamplesLoader("https://sparql.uniprot.org/sparql/")
docs = loader.load()
print(len(docs))
print(docs[0].metadata)
```
> Refer to the [LangChain documentation](https://python.langchain.com/v0.2/docs/) to figure out how to best integrate documents loaders to your stack.
### SPARQL endpoint schema loader
Generate a human-readable schema using the ShEx format to describe all classes of a SPARQL endpoint based on the [VoID description](https://www.w3.org/TR/void/) present in the endpoint. Ideally the endpoint should also contain the ontology describing the classes, so the `rdfs:label` and `rdfs:comment` of the classes can be used to generate embeddings and improve semantic matching.
> [!TIP]
>
> Checkout the **[void-generator](https://github.com/JervenBolleman/void-generator)** project to automatically generate VoID description for your endpoint.
```python
from sparql_llm import SparqlVoidShapesLoader
loader = SparqlVoidShapesLoader("https://sparql.uniprot.org/sparql/")
docs = loader.load()
print(len(docs))
print(docs[0].metadata)
```
> The generated shapes are well-suited for use with a LLM or a human, as they provide clear information about which predicates are available for a class, and the corresponding classes or datatypes those predicates point to. Each object property references a list of classes rather than another shape, making each shape self-contained and interpretable on its own, e.g. for a *Disease Annotation* in UniProt:
>
> ```turtle
> up:Disease_Annotation {
> a [ up:Disease_Annotation ] ;
> up:sequence [ up:Chain_Annotation up:Modified_Sequence ] ;
> rdfs:comment xsd:string ;
> up:disease IRI
> }
> ```
### Generate complete ShEx shapes from VoID description
You can also generate the complete ShEx shapes for a SPARQL endpoint with:
```python
from sparql_llm import get_shex_from_void
shex_str = get_shex_from_void("https://sparql.uniprot.org/sparql/")
print(shex_str)
```
### Validate a SPARQL query based on VoID description
This takes a SPARQL query and validates the predicates/types used are compliant with the VoID description present in the SPARQL endpoint the query is executed on.
This function supports:
* federated queries (VoID description will be automatically retrieved for each SERVICE call in the query),
* path patterns (e.g. `orth:organism/obo:RO_0002162/up:scientificName`)
This function requires that at least one type is defined for each endpoint, but it will be able to infer types of subjects that are connected to the subject for which the type is defined.
It will return a list of issues described in natural language, with hints on how to fix them (by listing the available classes/predicates), which can be passed to an LLM as context to help it figuring out how to fix the query.
```python
from sparql_llm import validate_sparql_with_void
sparql_query = """PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX up: <http://purl.uniprot.org/core/>
PREFIX taxon: <http://purl.uniprot.org/taxonomy/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX orth: <http://purl.org/net/orth#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX obo: <http://purl.obolibrary.org/obo/>
PREFIX lscr: <http://purl.org/lscr#>
PREFIX genex: <http://purl.org/genex#>
PREFIX sio: <http://semanticscience.org/resource/>
SELECT DISTINCT ?diseaseLabel ?humanProtein ?hgncSymbol ?orthologRatProtein ?orthologRatGene
WHERE {
SERVICE <https://sparql.uniprot.org/sparql> {
SELECT DISTINCT * WHERE {
?humanProtein a up:Protein ;
up:organism/up:scientificName 'Homo sapiens' ;
up:annotation ?annotation ;
rdfs:seeAlso ?hgnc .
?hgnc up:database <http://purl.uniprot.org/database/HGNC> ;
rdfs:label ?hgncSymbol . # comment
?annotation a up:Disease_Annotation ;
up:disease ?disease .
?disease a up:Disease ;
rdfs:label ?diseaseLabel . # skos:prefLabel
FILTER CONTAINS(?diseaseLabel, "cancer")
}
}
SERVICE <https://sparql.omabrowser.org/sparql/> {
SELECT ?humanProtein ?orthologRatProtein ?orthologRatGene WHERE {
?humanProteinOma a orth:Protein ;
lscr:xrefUniprot ?humanProtein .
?orthologRatProtein a orth:Protein ;
sio:SIO_010078 ?orthologRatGene ; # 79
orth:organism/obo:RO_0002162/up:scientificNam 'Rattus norvegicus' .
?cluster a orth:OrthologsCluster .
?cluster orth:hasHomologousMember ?node1 .
?cluster orth:hasHomologousMember ?node2 .
?node1 orth:hasHomologousMember* ?humanProteinOma .
?node2 orth:hasHomologousMember* ?orthologRatProtein .
FILTER(?node1 != ?node2)
}
}
SERVICE <https://www.bgee.org/sparql/> {
?orthologRatGene genex:isExpressedIn ?anatEntity ;
orth:organism ?ratOrganism .
?anatEntity rdfs:label 'brain' .
?ratOrganism obo:RO_0002162 taxon:10116 .
}
}"""
issues = validate_sparql_with_void(sparql_query, "https://sparql.uniprot.org/sparql/")
print("\n".join(issues))
```
## ð Complete chat system
> [!WARNING]
>
> To deploy the complete chat system right now you will need to fork this repository, change the configuration in `src/sparql_llm/config.py` and `compose.yml`, then deploy with docker/podman compose.
>
> It can easily be adapted to use any LLM served through an OpenAI-compatible API. We plan to make configuration and deployment of complete SPARQL LLM chat system easier in the future, let us know if you are interested in the GitHub issues!
Create a `.env` file at the root of the repository to provide secrets and API keys:
```bash
OPENAI_API_KEY=sk-proj-YYY
GLHF_API_KEY=APIKEY_FOR_glhf.chat_USED_FOR_TEST_OPEN_SOURCE_MODELS
EXPASY_API_KEY=NOT_SO_SECRET_API_KEY_USED_BY_FRONTEND_TO_AVOID_SPAM_FROM_CRAWLERS
LOGS_API_KEY=SECRET_PASSWORD_TO_EASILY_ACCESS_LOGS_THROUGH_THE_API
```
Start the web UI, API, and similarity search engine in production (you might need to make some changes to the `compose.yml` file to adapt it to your server/proxy setup):
```bash
docker compose up
```
Start the stack locally for development, with code from `src` folder mounted in the container and automatic API reload on changes to the code:
```bash
docker compose -f compose.dev.yml up
```
* Chat web UI available at http://localhost:8000
* OpenAPI Swagger UI available at http://localhost:8000/docs
* Vector database dashboard UI available at http://localhost:6333/dashboard
## ð§âðŧ Contributing
Checkout the [CONTRIBUTING.md](https://github.com/sib-swiss/sparql-llm/blob/main/CONTRIBUTING.md) page for more details on how to run the package in development and make a contribution.
## ðŠķ How to cite this work
If you reuse any part of this work, please cite [the arXiv paper](https://arxiv.org/abs/2410.06062):
```
@misc{emonet2024llmbasedsparqlquerygeneration,
title={LLM-based SPARQL Query Generation from Natural Language over Federated Knowledge Graphs},
author={Vincent Emonet and Jerven Bolleman and Severine Duvaud and Tarcisio Mendes de Farias and Ana Claudia Sima},
year={2024},
eprint={2410.06062},
archivePrefix={arXiv},
primaryClass={cs.DB},
url={https://arxiv.org/abs/2410.06062},
}
```
Raw data
{
"_id": null,
"home_page": null,
"name": "sparql-llm",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Vincent Emonet <vincent.emonet@gmail.com>",
"keywords": "Expasy, KGQA, LLM, SPARQL",
"author": null,
"author_email": "Vincent Emonet <vincent.emonet@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/17/6d/69e4a7e8a0b1a480c6e1c8db8514322312b2387e63b3c1ac343f98d2eac1/sparql_llm-0.0.3.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n# \u2728 SPARQL query generation with LLMs \ud83e\udd9c\n\n[![PyPI - Version](https://img.shields.io/pypi/v/sparql-llm.svg?logo=pypi&label=PyPI&logoColor=silver)](https://pypi.org/project/sparql-llm/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/sparql-llm.svg?logo=python&label=Python&logoColor=silver)](https://pypi.org/project/sparql-llm/)\n[![Tests](https://github.com/sib-swiss/sparql-llm/actions/workflows/test.yml/badge.svg)](https://github.com/sib-swiss/sparql-llm/actions/workflows/test.yml)\n\n</div>\n\nThis project provides reusable components and a complete web service to enhance the capabilities of Large Language Models (LLMs) in generating [SPARQL](https://www.w3.org/TR/sparql11-overview/) queries for specific endpoints. By integrating Retrieval-Augmented Generation (RAG) and SPARQL query validation through endpoint schemas, this system ensures more accurate and relevant query generation on large scale knowledge graphs.\n\nThe components are designed to work either independently or as part of a full chat-based system that can be deployed for a set of SPARQL endpoints. It **requires endpoints to include metadata** such as [SPARQL query examples](https://github.com/sib-swiss/sparql-examples) and endpoint descriptions using the [Vocabulary of Interlinked Datasets (VoID)](https://www.w3.org/TR/void/), which can be automatically generated using the [void-generator](https://github.com/JervenBolleman/void-generator).\n\n## \ud83c\udf08 Features\n\n- **Metadata Extraction**: Functions to extract and load relevant metadata from SPARQL endpoints. These loaders are compatible with [LangChain](https://python.langchain.com) but are flexible enough to be used independently, providing metadata as JSON for custom vector store integration.\n- **SPARQL Query Validation**: A function to automatically parse and validate federated SPARQL queries against the VoID description of the target endpoints.\n- **Deployable Chat System**: A reusable and containerized system for deploying an LLM-based chat service with a web UI, API, and vector database. This system helps users write SPARQL queries by leveraging endpoint metadata (WIP).\n- **Live Example**: Configuration for **[chat.expasy.org](https://chat.expasy.org)**, an LLM-powered chat system supporting SPARQL query generation for endpoints maintained by the [SIB](https://www.sib.swiss/).\n\n> [!TIP]\n>\n> You can quickly check if an endpoint contains the expected metadata at [sib-swiss.github.io/sparql-editor/check](https://sib-swiss.github.io/sparql-editor/check)\n\n## \ud83d\udce6\ufe0f Reusable components\n\n### Installation\n\n> Requires Python >=3.9\n\n```bash\npip install sparql-llm\n```\n\n### SPARQL query examples loader\n\nLoad SPARQL query examples defined using the SHACL ontology from a SPARQL endpoint. See **[github.com/sib-swiss/sparql-examples](https://github.com/sib-swiss/sparql-examples)** for more details on how to define the examples.\n\n```python\nfrom sparql_llm import SparqlExamplesLoader\n\nloader = SparqlExamplesLoader(\"https://sparql.uniprot.org/sparql/\")\ndocs = loader.load()\nprint(len(docs))\nprint(docs[0].metadata)\n```\n\n> Refer to the [LangChain documentation](https://python.langchain.com/v0.2/docs/) to figure out how to best integrate documents loaders to your stack.\n\n### SPARQL endpoint schema loader\n\nGenerate a human-readable schema using the ShEx format to describe all classes of a SPARQL endpoint based on the [VoID description](https://www.w3.org/TR/void/) present in the endpoint. Ideally the endpoint should also contain the ontology describing the classes, so the `rdfs:label` and `rdfs:comment` of the classes can be used to generate embeddings and improve semantic matching.\n\n> [!TIP]\n>\n> Checkout the **[void-generator](https://github.com/JervenBolleman/void-generator)** project to automatically generate VoID description for your endpoint.\n\n```python\nfrom sparql_llm import SparqlVoidShapesLoader\n\nloader = SparqlVoidShapesLoader(\"https://sparql.uniprot.org/sparql/\")\ndocs = loader.load()\nprint(len(docs))\nprint(docs[0].metadata)\n```\n\n> The generated shapes are well-suited for use with a LLM or a human, as they provide clear information about which predicates are available for a class, and the corresponding classes or datatypes those predicates point to. Each object property references a list of classes rather than another shape, making each shape self-contained and interpretable on its own, e.g. for a *Disease Annotation* in UniProt:\n>\n> ```turtle\n> up:Disease_Annotation {\n> a [ up:Disease_Annotation ] ;\n> up:sequence [ up:Chain_Annotation up:Modified_Sequence ] ;\n> rdfs:comment xsd:string ;\n> up:disease IRI\n> }\n> ```\n\n### Generate complete ShEx shapes from VoID description\n\nYou can also generate the complete ShEx shapes for a SPARQL endpoint with:\n\n```python\nfrom sparql_llm import get_shex_from_void\n\nshex_str = get_shex_from_void(\"https://sparql.uniprot.org/sparql/\")\nprint(shex_str)\n```\n\n### Validate a SPARQL query based on VoID description\n\nThis takes a SPARQL query and validates the predicates/types used are compliant with the VoID description present in the SPARQL endpoint the query is executed on.\n\nThis function supports:\n\n* federated queries (VoID description will be automatically retrieved for each SERVICE call in the query),\n* path patterns (e.g. `orth:organism/obo:RO_0002162/up:scientificName`)\n\nThis function requires that at least one type is defined for each endpoint, but it will be able to infer types of subjects that are connected to the subject for which the type is defined.\n\nIt will return a list of issues described in natural language, with hints on how to fix them (by listing the available classes/predicates), which can be passed to an LLM as context to help it figuring out how to fix the query.\n\n```python\nfrom sparql_llm import validate_sparql_with_void\n\nsparql_query = \"\"\"PREFIX skos: <http://www.w3.org/2004/02/skos/core#>\nPREFIX up: <http://purl.uniprot.org/core/>\nPREFIX taxon: <http://purl.uniprot.org/taxonomy/>\nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\nPREFIX orth: <http://purl.org/net/orth#>\nPREFIX dcterms: <http://purl.org/dc/terms/>\nPREFIX obo: <http://purl.obolibrary.org/obo/>\nPREFIX lscr: <http://purl.org/lscr#>\nPREFIX genex: <http://purl.org/genex#>\nPREFIX sio: <http://semanticscience.org/resource/>\nSELECT DISTINCT ?diseaseLabel ?humanProtein ?hgncSymbol ?orthologRatProtein ?orthologRatGene\nWHERE {\n SERVICE <https://sparql.uniprot.org/sparql> {\n SELECT DISTINCT * WHERE {\n ?humanProtein a up:Protein ;\n up:organism/up:scientificName 'Homo sapiens' ;\n up:annotation ?annotation ;\n rdfs:seeAlso ?hgnc .\n ?hgnc up:database <http://purl.uniprot.org/database/HGNC> ;\n rdfs:label ?hgncSymbol . # comment\n ?annotation a up:Disease_Annotation ;\n up:disease ?disease .\n ?disease a up:Disease ;\n rdfs:label ?diseaseLabel . # skos:prefLabel\n FILTER CONTAINS(?diseaseLabel, \"cancer\")\n }\n }\n SERVICE <https://sparql.omabrowser.org/sparql/> {\n SELECT ?humanProtein ?orthologRatProtein ?orthologRatGene WHERE {\n ?humanProteinOma a orth:Protein ;\n lscr:xrefUniprot ?humanProtein .\n ?orthologRatProtein a orth:Protein ;\n sio:SIO_010078 ?orthologRatGene ; # 79\n orth:organism/obo:RO_0002162/up:scientificNam 'Rattus norvegicus' .\n ?cluster a orth:OrthologsCluster .\n ?cluster orth:hasHomologousMember ?node1 .\n ?cluster orth:hasHomologousMember ?node2 .\n ?node1 orth:hasHomologousMember* ?humanProteinOma .\n ?node2 orth:hasHomologousMember* ?orthologRatProtein .\n FILTER(?node1 != ?node2)\n }\n }\n SERVICE <https://www.bgee.org/sparql/> {\n ?orthologRatGene genex:isExpressedIn ?anatEntity ;\n orth:organism ?ratOrganism .\n ?anatEntity rdfs:label 'brain' .\n ?ratOrganism obo:RO_0002162 taxon:10116 .\n }\n}\"\"\"\n\nissues = validate_sparql_with_void(sparql_query, \"https://sparql.uniprot.org/sparql/\")\nprint(\"\\n\".join(issues))\n```\n\n## \ud83d\ude80 Complete chat system\n\n> [!WARNING]\n>\n> To deploy the complete chat system right now you will need to fork this repository, change the configuration in `src/sparql_llm/config.py` and `compose.yml`, then deploy with docker/podman compose.\n>\n> It can easily be adapted to use any LLM served through an OpenAI-compatible API. We plan to make configuration and deployment of complete SPARQL LLM chat system easier in the future, let us know if you are interested in the GitHub issues!\n\nCreate a `.env` file at the root of the repository to provide secrets and API keys:\n\n```bash\nOPENAI_API_KEY=sk-proj-YYY\nGLHF_API_KEY=APIKEY_FOR_glhf.chat_USED_FOR_TEST_OPEN_SOURCE_MODELS\nEXPASY_API_KEY=NOT_SO_SECRET_API_KEY_USED_BY_FRONTEND_TO_AVOID_SPAM_FROM_CRAWLERS\nLOGS_API_KEY=SECRET_PASSWORD_TO_EASILY_ACCESS_LOGS_THROUGH_THE_API\n```\n\nStart the web UI, API, and similarity search engine in production (you might need to make some changes to the `compose.yml` file to adapt it to your server/proxy setup):\n\n```bash\ndocker compose up\n```\n\nStart the stack locally for development, with code from `src` folder mounted in the container and automatic API reload on changes to the code:\n\n```bash\ndocker compose -f compose.dev.yml up\n```\n\n* Chat web UI available at http://localhost:8000\n* OpenAPI Swagger UI available at http://localhost:8000/docs\n* Vector database dashboard UI available at http://localhost:6333/dashboard\n\n## \ud83e\uddd1\u200d\ud83d\udcbb Contributing\n\nCheckout the [CONTRIBUTING.md](https://github.com/sib-swiss/sparql-llm/blob/main/CONTRIBUTING.md) page for more details on how to run the package in development and make a contribution.\n\n## \ud83e\udeb6 How to cite this work\n\nIf you reuse any part of this work, please cite [the arXiv paper](https://arxiv.org/abs/2410.06062):\n\n```\n@misc{emonet2024llmbasedsparqlquerygeneration,\n title={LLM-based SPARQL Query Generation from Natural Language over Federated Knowledge Graphs}, \n author={Vincent Emonet and Jerven Bolleman and Severine Duvaud and Tarcisio Mendes de Farias and Ana Claudia Sima},\n year={2024},\n eprint={2410.06062},\n archivePrefix={arXiv},\n primaryClass={cs.DB},\n url={https://arxiv.org/abs/2410.06062}, \n}\n```\n\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024-present SIB Swiss Institute of Bioinformatics\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Reusable components and complete chat system to improve Large Language Models (LLMs) capabilities when generating SPARQL queries for a given set of endpoints, using Retrieval-Augmented Generation (RAG) and SPARQL query validation from the endpoint schema.",
"version": "0.0.3",
"project_urls": {
"Documentation": "https://github.com/sib-swiss/sparql-llm",
"History": "https://github.com/sib-swiss/sparql-llm/releases",
"Homepage": "https://github.com/sib-swiss/sparql-llm",
"Source": "https://github.com/sib-swiss/sparql-llm",
"Tracker": "https://github.com/sib-swiss/sparql-llm/issues"
},
"split_keywords": [
"expasy",
" kgqa",
" llm",
" sparql"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "cfe998252e5024222b11b68a4ae1404bb14d103b352c927d6ec834351bf66193",
"md5": "79da39066f91d0112fc2baf5ef16ddfe",
"sha256": "1db487aa48946725c1c6efa25b36be4f41843d4c8380ee39e6c0ef6e9baeb871"
},
"downloads": -1,
"filename": "sparql_llm-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "79da39066f91d0112fc2baf5ef16ddfe",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 38297,
"upload_time": "2024-10-28T09:34:52",
"upload_time_iso_8601": "2024-10-28T09:34:52.994664Z",
"url": "https://files.pythonhosted.org/packages/cf/e9/98252e5024222b11b68a4ae1404bb14d103b352c927d6ec834351bf66193/sparql_llm-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "176d69e4a7e8a0b1a480c6e1c8db8514322312b2387e63b3c1ac343f98d2eac1",
"md5": "8c74e8501dd7696266351d12118d2a81",
"sha256": "8d6f43680322f3db2c5223ecd7b3ea032d72564de01c2ba7e9553348252a2af7"
},
"downloads": -1,
"filename": "sparql_llm-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "8c74e8501dd7696266351d12118d2a81",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 147731,
"upload_time": "2024-10-28T09:34:51",
"upload_time_iso_8601": "2024-10-28T09:34:51.098376Z",
"url": "https://files.pythonhosted.org/packages/17/6d/69e4a7e8a0b1a480c6e1c8db8514322312b2387e63b3c1ac343f98d2eac1/sparql_llm-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-28 09:34:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sib-swiss",
"github_project": "sparql-llm",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sparql-llm"
}