Data Science
-
Copilot Instructions Scoped to Python Files
Use glob-scoped .github/instructions/python.instructions.md files to isolate Python backend and data-pipeline rules from frontend TypeScript code. File: .github/instructions/python.instructions.md …
-
Include Grok 3 Thinking-Trace Tables in Final Reports
Because end users do not have direct access to Grok 3's internal <thinking> trace, its system prompt instructs: "Keep all relevant information from the thinking trace in the answer... If there are tables in the thinking
-
Mistral random_seed for Regression Testing
To enforce deterministic outputs across evaluation runs on Mistral models, pass randomseed: 42 (alongside temperature and stop sequences) in your provider configuration. …
-
Llama 4 ipython Tool Output Synthesis in Multi-Turn
After returning tool outputs inside <|headerstart|>ipython<|headerend|>...<|eot|>, append <|headerstart|>assistant<|headerend|> so Llama 4 synthesizes the structured array into a clean natural-language answer. …
-
KV-Cache Friendly Document Placement for Llama 4 Scout
Because long-form data processing in Llama 4 Scout's 10M context window demands significant system RAM and NVMe storage for the KV-cache, place the large document corpus first and the question last. …
-
Generate Cold-Start CoT Fine-Tuning Data With R1
DeepSeek's training pipeline uses CoT data generated by R1-Zero/R1 for supervised fine-tuning (SFT). Prompt DeepSeek-R1 at temperature=0.6 to generate clean problem-decomposition and multi-verification traces to train sm
-
Fix DeepSeek-R1 Stalling on Contradictory Instructions
Thoughtology analysis found that while DeepSeek-R1 adapts to user input when contradictions arise, this comes at the cost of efficiency because the model spends significant compute time deliberating over user intentions.
-
Gemini Shortcut Discovery for Data Pipeline Optimization
Use Gemini 3's planning step #3 (Identify tools, shortcuts, or "power user" methods that solve the problem better than standard approaches) to optimize slow data processing code. …
-
Summarizer-to-Classifier Chain With GPT-4o-mini
Decomposing a task into multiple focused LLM calls—specifically a summarizer call followed by a classifier call—is usually more reliable and cheaper than one giant prompt trying to do both. …
-
LLM-as-Judge Rubric Prompt With a Stronger Model
When scoring subjective quality across your 20-to-50-example evaluation set, use an LLM-as-judge setup equipped with an explicit rubric and a stronger model than the one being evaluated. …
-
Self-Consistency Majority Voting for Math and Code Evals
For non-reasoning models working on tasks with verifiable answers (such as math or testable code), sampling multiple completions (n) at a nonzero temperature and taking the majority answer remains a valuable evaluation a
-
Turn Natural Language Into API Calls With Tool Schemas
Use function calling to convert natural language questions like "Who are my top customers?" into structured, type-safe API calls such as getcustomers(minrevenue: int, createdbefore: string, limit: int) or extractdata(nam
-
Claude Relevance Ranking Prompt Before Classification
When matching a sentence against candidate article titles or categories, adding explicit step-by-step reasoning instructions with XML tags improves classification accuracy. …
-
Build a 50-Case Prompt Evaluation Suite for Claude
Rather than treating a prompt guide as a one-time checklist, PromptLayer recommends starting with a 50-example evaluation set: 25 common cases, 10 edge cases, 10 safety cases, and 5 known historical failures. Use Claude
-
Perplexity API Prompts: Target-Page Vocabulary, Result Caps
Perplexity's Agent API guide notes that specificity in input directly improves retrieval because it seeds the first search query: include vocabulary that actually appears on relevant target pages, add words to disambigua
-
Mistral Classification: Single-Word Label vs JSON
Mistral's official prompting guide outlines two main classification strategies: (1) ask for the label directly as a single word/string (fast, cheap, uses the fewest output tokens), or (2) ask for a JSON object (generates
-
Fine-Tune Llama 4 Scout With QLoRA Padding Settings
Fine-tuning guides for Llama 4 Scout note that despite its 10M context window, training sequences should be truncated to 1024 or 2048 tokens with 4-bit quantization (allowing Scout to run on a 24GB VRAM card), paddingsid
-
Llama 4 Small Images: Skip Tile Separator Tags
When passing a small image under 336 x 336 pixels into Llama 4, Meta's prompt specification notes that tile separator tags (<|tilexseparator|>, <|tileyseparator|>) are not required. …
-
Gemini Flash Chain-of-Thought Scaffolding Prompt
According to 2026 prompt engineering guides, on non-reasoning models like Gemini Flash, explicit Chain-of-Thought instructions still help significantly for math, logic, and multi-step tasks. …
-
Gemini 3 Reflection Prompt Before Each Tool Call
To improve agentic tool accuracy in Gemini 3, enforce a Pre-Computation Reflection rule requiring the model to explicitly state three things before calling any tool. …
-
Claude Multishot Reasoning With example Tags
Multishot prompting works effectively with extended thinking: when you provide 3 to 5 diverse examples inside <examples><example>...</example></examples> tags showing how to think through edge cases, Claude follows simil
-
Fix Claude Over-Triggering Tools in Your Prompts
In older models, developers used emphatic capitalization like "CRITICAL: You MUST use this tool". Anthropic's best practices note that on newer Claude models, overly aggressive language can cause tools to overtrigger. Re
-
DeepSeek-R1 Temperature Settings by Task
According to SambaNova's reasoning parameter guide for DeepSeek-R1, use temperature = 0.6 and topp = 0.95 for general reasoning (non-math), lower the temperature to 0.5 if you prefer more factual responses, and set tempe
-
Why OpenAI Reasoning Models Ignore Temperature
According to 2026 prompt engineering guides, reasoning models on OpenAI ignore the temperature parameter entirely. Instead of attempting to tune randomness via temperature or topp on reasoning models, specify determinist
-
OpenAI seed and system_fingerprint for Reproducible Outputs
Chat Completions are non-deterministic by default. To receive mostly deterministic outputs across API calls, OpenAI provides the integer seed parameter and the systemfingerprint response field: pass the exact same seed,