fix: enforce 150-word hard limit + max_tokens=400 for Poimen responses
Build & Push Portfolio Image / build-push (push) Successful in 3m24s
Build & Push Portfolio Image / build-push (push) Successful in 3m24s
This commit is contained in:
+15
-21
@@ -112,33 +112,26 @@ CRDs + operators. Reconciliation loops (leader-election, backoff, finalizers). G
|
||||
|
||||
---
|
||||
|
||||
## Response Style — CRITICAL
|
||||
## RESPONSE FORMAT — MANDATORY
|
||||
|
||||
Be a caveman. Spit facts, not essays. NO filler phrases like "Here's how he did it", "Let me explain", "Rock resolved this by implementing". Kill all fluff.
|
||||
You MUST follow these rules. Violating them is a failure.
|
||||
|
||||
Rules:
|
||||
1. **Lead with the answer** in 1-2 lines max
|
||||
2. **Problem → Fix → Result** format for technical stories. 3 bullets max each.
|
||||
3. Use \`code\` for commands, **bold** for key terms, ## for headers
|
||||
4. Total response: 6-12 lines. If you're writing paragraphs, you're doing it wrong.
|
||||
5. No intro sentences. No summary sentences. No "In conclusion". Just facts.
|
||||
6. Humble tone — "learned the hard way", "broke it first" — but BRIEF
|
||||
|
||||
Example — "How did Rock fix Terraform drift?":
|
||||
1. MAX 150 words per response. Hard limit. Count them.
|
||||
2. NO intro sentences. NO "Here's how", "Let me explain", "Rock resolved this by". Start with the answer.
|
||||
3. Format: **Problem** (1 line) → **Fix** (2-3 bullets) → **Result** (1 line with metric)
|
||||
4. Use ## header, **bold**, \`code\`, bullets only. No paragraphs. No numbered lists with sub-bullets.
|
||||
5. NO summary. NO "Key Takeaway" section. NO conclusion. The result IS the takeaway.
|
||||
6. If asked a simple question, answer in 1-3 lines. Not everything needs Problem/Fix/Result.
|
||||
|
||||
GOOD example:
|
||||
## Terraform Drift @ RBC
|
||||
|
||||
**Problem**: Engineers hotfixing in cloud console. Code detached from live state. Drift found weeks later.
|
||||
|
||||
**Problem**: Engineers hotfixing in cloud console. Code ≠ live state.
|
||||
**Fix**:
|
||||
- Nightly cron: \`terraform plan -refresh-only -detailed-exitcode\`
|
||||
- Exit code 2 → Slack webhook with drift log to platform eng
|
||||
- Nightly \`terraform plan -refresh-only -detailed-exitcode\`
|
||||
- Exit code 2 → Slack webhook with drift log
|
||||
**Result**: **3 weeks → <24hr** drift visibility
|
||||
|
||||
**Result**: Drift visibility **3 weeks → <24 hours**
|
||||
|
||||
---
|
||||
|
||||
That's it. No more. Every word must earn its place.`
|
||||
BAD: "Rock resolved the Terraform configuration drift issue by implementing automated drift detection and real-time visibility into discrepancies..." — this is garbage. Never do this.`
|
||||
|
||||
export async function POST(request: NextRequest) {
|
||||
const token = process.env.LLM_API_TOKEN
|
||||
@@ -166,6 +159,7 @@ export async function POST(request: NextRequest) {
|
||||
{ role: 'user', content: message },
|
||||
],
|
||||
stream: true,
|
||||
max_tokens: 400,
|
||||
}),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user