diff --git a/src/core/ai/gateway.ts b/src/core/ai/gateway.ts index e65b08948..824ba1f52 100644 --- a/src/core/ai/gateway.ts +++ b/src/core/ai/gateway.ts @@ -1624,7 +1624,7 @@ export async function expand(query: string): Promise { model, schema: ExpansionSchema, prompt: [ - 'Rewrite the search query below into 3-4 different, related queries that would help find relevant documents.', + 'Rewrite the search query below into 3-4 different, related queries that would help find relevant documents. Respond with a JSON object in exactly this shape: {"queries": ["rewrite1", "rewrite2", "rewrite3"]}. The JSON key MUST be exactly "queries" (not "rewrites" or any other variation).', 'Return ONLY the JSON object. Do NOT include the original query in the result.', 'Each rewrite should emphasize different aspects, synonyms, or framings.', '',