idea_world_labDEV JOURNAL
Sunday, June 28, 2026

Alternative E: Create Qwen Query Profile

Flow

-> Request Qwen to generate JSON for search  
  -> Search with BM25/vector using the generated JSON  
  -> Return JSONL candidates

Example Output

If Qwen is selected well, you can create a search profile as follows.

{
  "search_intent": "Godot 4 2D player movement tutorial",
  "important_literals": [
    "Input.is_action_pressed",
    "Vector2.ZERO",
    "AnimatedSprite2D",
    "position.clamp",
    "screen_size"
  ],
  "likely_doc_topics": [
    "first 2D game",
    "coding the player",
    "player movement",
    "clamp position to screen",
    "play and stop AnimatedSprite2D"
  ],
  "migration_signals": []
}

Advantages

  • Can reduce hardcoding.
  • Can summarize intent from complex chunks.
  • Can make search terms more readable for humans.
  • Can delegate Godot context inference to Qwen.

Disadvantages

  • Slow.
  • Expensive.
  • Hallucinations can appear as early as the pre‑search stage.
  • Can generate clues that do not involve Qwen.
  • May create incorrect migration intent and pull in the wrong api_mapping.

Failure Example

The reference chunk contains AnimatedSprite2D, but it is risky if Qwen incorrectly summarizes it as follows.

{
  "migration_intent": "Godot 3 to Godot 4 migration",
  "important_terms": ["AnimatedSprite", "AnimatedSprite2D"]
}

In this case it is valid Godot 4 code, but the migration mapping can be pulled incorrectly.

PoC Simulation

Pass the reference chunk to Qwen first to create a search profile.

Input:

SOURCE_CODE:
func _process(delta):
  ...
  $AnimatedSprite2D.play()
  position = position.clamp(Vector2.ZERO, screen_size)

Success profile:

{
  "search_intent": "Godot 4 2D player movement tutorial",
  "important_literals": [
    "Input.is_action_pressed",
    "Vector2.ZERO",
    "AnimatedSprite2D",
    "position.clamp",
    "screen_size"
  ],
  "migration_signals": []
}

If you search with this profile, the expected candidates are as follows.

docs_chunks:
  first_2d_game / coding_the_player
  first_2d_game / clamp and screen bounds section

api_mapping:
  Almost none or low

label_prototypes:
  Almost none or low

Failure profile:

{
  "search_intent": "Godot 3 to Godot 4 migration",
  "important_literals": [
    "AnimatedSprite",
    "AnimatedSprite2D",
    "KinematicBody2D"
  ],
  "migration_signals": ["AnimatedSprite to AnimatedSprite2D"]
}

Why a failed profile is dangerous:

There is no AnimatedSprite in SOURCE_CODE.  
There is no KinematicBody2D in SOURCE_CODE.  
SOURCE_CODE can be valid Godot 4 code.  
However, if Qwen creates a migration intent, it may incorrectly search api_mapping/label_prototypes.

Logs to Verify in PoC

The Qwen query profile method involves LLM intervention before the search, so the following logs are essential.

1. raw chunkText  
2. Query profile JSON created by Qwen  
3. Whether the `important_literals` in the profile actually exist in the `SOURCE_CODE`  
4. Whether the `migration_signals` in the profile actually exist in the `SOURCE_CODE`  
5. Candidates retrieved by searching with the profile  
6. Difference from the candidates retrieved by searching with raw chunkText

Visible conclusion:

If the Qwen profile appears well, the search terms look better.  
However, if you generate clues that don’t exist, the results become contaminated in the pre‑search stage.  
Therefore, using Qwen as a validator after the search rather than before is safer.

Judgment

Good for search quality experiments  
Be cautious as the primary production search engine

The judgment of the original note is that using Qwen as a post‑search direct‑evidence validator rather than a pre‑search query generator is safer.