2026-06-17 Godot RAG Detector -> Qwen 3.6 Coding Model Development Flow Memo
Structure Image

Core Flow
Godot official documentation preparation
-> First chunking
-> Godot-specific post-processing
-> Build local search infrastructure
-> Collect and structure GitHub data
-> Run RAG discriminator
-> Create training dataset
-> Train Qwen 3.6 coding modelThis note organizes the MVP flow of first creating a Godot RAG detector and then using that detector to generate a training dataset for a Qwen 3.6‑based Godot coding model.
Step Summary
1. Prepare Official Documentation
- Prepare
godot_docs_full.zip - Use the completed crawl of the official documentation
- Currently the data is in its original form, not yet RAG‑processed
- Input consists of a collection of
.mdfiles
2. First‑Pass Chunking
- Run
chunk_docs.py - Chunk based on headings
- Large blocks are re‑split using
max_charsandoverlap - The first‑pass output is
docs_chunks.jsonl
3. Godot‑Specific Post‑Processing
- Remove Sphinx leftovers
- Extract symbols
- Add class/method/property metadata
- Extract migration rules
Outputs:
docs_chunks.jsonl
api_mapping.jsonl
label_prototypes.jsonl4. Building a Local Search Infrastructure
- Vector DB: document embedding
- Keyword Index: precise search
- Reranker: reordering search results
- API Mapping DB / Label Prototype DB
Important points:
The label is determined by the system.5. GitHub Data Collection and Structuring
- Collect
.gd,.tscn,.tres,project.godot, README - Build repo tree
- Structure code/scene/configuration files
Deliverables:
GitHub Structured Data JSONL6. RAG Discriminator Execution
The RAG discriminator uses both the local system and a remote LLM.
Local system responsibilities:
- GitHub chunk input
- symbol extraction
- vector + keyword search
- rerank
- label determination
Remote LLM responsibilities:
- generate corrected code
- generate explanations
- generate QA samples
- generate DPO candidates
The final JSON is assembled by Python code.
7. Generated Dataset
version_classification
api_mapping
migration_fix
instruction_sft
dpo_preference
repo_explorer
patch_generation
metadata_verificationThe initial MVP was concluded to be sufficient even if we first generate 10,000–40,000 samples.
8. Model Training
First training:
Qwen 3.6 SFTGoal:
- Prioritize Godot 4
- Basic GDScript output
- Reject Godot 3 API
Secondary learning:
DPOGoal:
- Strengthen preference for Godot 4 answers
Future expansion:
SWE ExtensionGoal:
- repo explorer
- patch
- trajectory
Core Principles
- Create the RAG discriminator first based on the official documentation.
- The label is determined by the system, not the LLM.
- The LLM is only responsible for generation assistance.
- The ultimate goal is the Qwen 3.6 Godot coding model.