Text2Gremlin Data Generation and Model Fine-Tuning System (Vertical Scenarios and General Scenarios)#303
Merged
imbajin merged 32 commits intoapache:text2gqlfrom Oct 30, 2025
Merged
Conversation
…eneration parameters
…ing and call/with support
…y variants from Recipe
…cation and error handling
…and visitor classes
…with correctness guarantee and preliminary question generalization
imbajin
approved these changes
Oct 30, 2025
Member
imbajin
left a comment
There was a problem hiding this comment.
Merge this PR now, enhance it later & could merge into master branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLM-based Gremlin QA Synthesis and Generalization in Vertical Scenarios.
🏗️ Project Structure
./graph2gremlin.py: Initially generates Gremlin data based on templates and graph data, ensuring correctness through templates, and translates and preliminarily generalizes the Gremlin data and questions../gremlin_checker.py: Performs syntax checking using Antlr4../llm_handler.py: An LLM interaction model that inputs QA data for each batch of seed numbers (during seed data generation, queries undergo a small batch generalization), allowing the LLM to understand how to write text2gremlin, first generalizing Gremlin, then translating and generalizing the query../qa_generalize.py: Callsgremlin_checkerandllm_handlerfor seed data generalization../instruct_convert.py: Handles instruction format conversion and the division of training and test sets../db_data: Contains schema and graph data../data/seed_data: Seed data (to be uploaded)../data/vertical_training_sets: Vertical scenario generalization data (to be uploaded).Gremlin Corpus Generation System Based on Recursive Backtracking in General Scenarios.
📋 Project Overview
This PR adds a complete Text-to-Gremlin corpus generation system based on a recursive backtracking recipe-guided generation approach, capable of automatically generating large-scale and diverse training data from Gremlin query templates.
🏗️ Project Structure
🎯 Core Features
Recipe-Guided Generation
Large-Scale Data Processing
Complete Error Handling
Intelligent Constraint Mechanism
📊 System Capabilities
🧪 Technical Features
📈 Application Value
🔧 Usage
📋 Documentation