Skip to content
Snippets Groups Projects
README.md 2.81 KiB
Newer Older
Behrisch, M. (Michael)'s avatar
Behrisch, M. (Michael) committed
# LLM Query Recommender

A tool that uses Large Language Models to assist users in generating meaningful queries for knowledge graphs based on their schema and natural language input.
- [Description](#introduction)
- [Features](#features)
- [Getting Started](#getting-started)
  - [Prerequisites](#prerequisites)
  - [Installation](#installation)
- [Usage](#usage)
- [Support](#support)
- [Contributing](#contributing)
- [License](#license)
- [Author](#authors-and-acknowledgement)
The **LLM Query Recommender** simplifies querying knowledge graphs by leveraging Large Language Models (LLMs).
Designed to bridge the gap between technical experts and non-expert users, this tool allows users to interact with complex knowledge graphs using natural language.
The system interprets user intents, generates schema-compliant queries, and validates their correctness through automated evaluation methods.
This project aims to democratize access to knowledge graphs, enabling anyone to explore data effortlessly.
- **Natural language input**: Accepts plain language queries and generates schema-compliant Cypher queries.
- **Automated validation**:
  - **Schema compliance check**: Ensures syntactic validity against the graph’s schema.
  - **Self-checking**: Validates query correctness using an LLM.
  - **Semantic re-interpretation**: Compares query alignment with user intent using semantic similarity metrics.
- **Customizable and scalable**: Built in Python, optimized for GPU, and easily configurable for different schemas and LLMs.
- **Experimentation support**: Facilitates testing across varying prompt complexities and schemas.
- **Knowledge graph schema**: A schema JSON format file of the knowledge graph you wish to query (3 are included in repository)
   ```
   git clone https://git.science.uu.nl/graphpolaris/experiments/llm-query-recommender.git
   cd llm-query-recommender
   ```
1. **Prepare the knowledge graph schema**
   Ensure you have the schema of the knowledge graph available. (3 example schemas in ./schema)
2. **Save prompts in Excel**
    
    Write your prompts in the following file and give them a difficulty.
   experimentation/queries.xlsx
   Edit the desirable schema path in the following file.
    ```
   user_input.json
    ```
Behrisch, M. (Michael)'s avatar
Behrisch, M. (Michael) committed

## Support

For support contact me at tvandermeijden at students dot uu dot nl
Behrisch, M. (Michael)'s avatar
Behrisch, M. (Michael) committed

## Contributing

Contributions are always welcome. If you have suggestions or found a bug, open an issue or submit a pull request.
Behrisch, M. (Michael)'s avatar
Behrisch, M. (Michael) committed

## License
- **Thijmen van der Meijden**