gateway/logs/debug/prompts/20251127-113945-043-userintention_prompt.txt

28 lines
No EOL
1.4 KiB
Text

You are an input analyzer. From the user's message, perform ALL of the following in one pass:
1) detectedLanguage: detect ISO 639-1 language code (e.g., de, en).
2) normalizedRequest: full, explicit restatement of the user's request in the detected language; do NOT summarize; preserve ALL constraints and details.
3) intent: concise single-paragraph core request in the detected language for high-level routing.
4) contextItems: supportive data blocks to attach as separate documents if significantly larger than the intent (large literal content, long lists/tables, code/JSON blocks, transcripts, CSV fragments, detailed specs). Keep URLs in the intent unless they embed large pasted content.
Rules:
- If total content (intent + data) is < 10% of model max tokens, do not extract; return empty contextItems and keep intent compact and self-contained.
- If content exceeds that threshold, move bulky parts into contextItems; keep intent short and clear.
- Preserve critical references (URLs, filenames) in intent.
- Normalize to the primary detected language if mixed-language.
Return ONLY JSON (no markdown) with this shape:
{
"detectedLanguage": "de|en|fr|it|...",
"normalizedRequest": "Full explicit instruction in detected language",
"intent": "Concise normalized request...",
"contextItems": [
{
"title": "User context 1",
"mimeType": "text/plain",
"content": "Full extracted content block here"
}
]
}
User message:
'test'