Sub-Query Generator

Sub-Query Generator

Model: GPT-4
Difficulty: Advanced
Upvotes: 0
decompositionquery generationRAG

โ€” Prompt โ€”

Break down the query [complex query] into smaller sub-queries targeting different data sources.

Why It Works

Improves retrieval accuracy by targeting specific aspects of a broad question.

Example Output

Main query: 'History of electric cars' โ†’ Sub-queries: 'Invention of electric motors', 'First commercial EV', 'Tesla's market impact'.