Asking a model your question directly is often the slowest path to a right answer. Google DeepMind's "step-back prompting": have it name the governing rule first, then solve. +7-27% on reasoning tasks. "First state the gas law. Then solve."
#PromptEngineering
To an AI, your instructions and your data look identical: one token stream, with no line between them. So a stray line inside your data can get followed as a command.
Fix: wrap the data in tags.
Summarize this. <email> ... </email> Use only what is inside <email>.
#AI#LLM
LLMs are excellent on common knowledge. They quietly fall apart on niche knowledge.
Kandpal et al. measured the gap on BLOOM-176B: 25% accuracy on questions where the answer appears 10 times in pre-training, 55% when it appears 10,000 times.
The bigger problem: tone doesn't shift with accuracy. The model sounds equally sure on the 25% case and the 55% case.
A 3-question test I run before trusting an LLM on a specialized topic:
1- The most common question in the field. The one any expert knows cold.
2- A mid-difficulty question. Something a practitioner uses weekly.
3- One specific, checkable fact. A number, a date, a name from a real source.
If the model folds on #3, the topic lives in its long tail. Sources beat recall in that zone.
Why it works: questions 1 and 2 probe the bulk of training data. Question 3 probes the tail. The drop tells you exactly where to add context.
Same strategy holds across Claude, GPT, Gemini. The frequency limit is a property of pre-training, not any one company.
#AI #LLM #PromptEngineering #LongTail #RAG
RAG returns the wrong answer sometimes, and the model is not the problem. The order of your context is.
Long-context models do not read uniformly. Attention is U-shaped: tokens at the very start and very end of the prompt get the most attention. Tokens in the middle get the least, regardless of how relevant they are.
This is "lost in the middle." A 2023 paper from Liu et al. (Stanford and collaborators) tested it on multi-document QA. The exact same fact, placed at position 1 of 20 documents, was retrieved correctly far more often than when placed at position 10.
What it means for RAG:
1- Reorder retrieved chunks before passing them to the model.
2- Top-ranked chunk goes first.
3- Second-best goes last, right before the user's question.
4- Less important chunks go in the middle, where they would get ignored anyway.
Reduce too. Twenty mediocre chunks scoring 0.6 each are worse than 5 strong chunks at 0.9. The model does not get smarter by reading more average context. It gets distracted.
Same retriever, same model, same documents. The order alone changes whether the answer is right or wrong.
#RAG #AI #LLM #PromptEngineering
Stop cramming your whole request into one message. Let the model interview you first.
For anything complex โ a business plan, a pricing page, a legal email โ your first draft of the question misses half the context. Asking the model to ask you questions closes that gap before it answers.
Paste this at the start of any hard request:
"Before you answer, ask me 5 questions you need answered to give the best possible response. Number them. Wait for my replies. Then answer."
What you get:
1- Questions that expose gaps in your own thinking
2- An answer built on complete context, not guesses
3- A record of the decisions behind the final output
Real example:
Weak prompt: "Help me build a pricing page for my SaaS."
Model's 5 questions:
Who is the buyer persona?
What do competitors charge?
Monthly or annual focus?
How many tiers?
Which feature justifies the top tier?
Answering those took 3 minutes. The pricing page that came out was usable, not generic.
Use it for strategy work, long documents, and any one-shot decision you cannot easily rerun.
#PromptEngineering #AI #LLM #AITips
LLMs generate tokens left-to-right. Each token is conditioned only on what came before it. When a model jumps straight to an answer, it locks into a reasoning path in the first few tokens and can't backtrack.
I add one line before every prompt where accuracy matters:
"Before answering, work through your reasoning step by step. Consider at least 2 alternative approaches. Then give your final answer with a confidence level (high/medium/low)."
This works because it shifts the early tokens from "answer" to "analysis." By the time the model reaches the answer, it's conditioned on a much richer chain of thought.
I use this for code review, data analysis, and any technical decision where I need the model to actually think, not guess.
Quick test: ask any model "What's 17 ร 28 + 33 ร 12?" with and without the reasoning prefix. You'll see the difference immediately.
#PromptEngineering #ChainOfThought #AI #LLM #AITips
I noticed something about how AI image models process prompts: CLIP-based text encoders tokenize your words into discrete chunks. When your prompt is one long sentence, key details compete for the same attention weight. The model guesses what matters.
A structured prompt fixes that. Each concept gets its own attention cluster.
I've been using a 6-part formula and the results are noticeably sharper:
1- Subject: who or what (be specific)
2- Action: what they're doing
3- Style: art direction (watercolor, cinematic, editorial)
4- Camera: angle and lens (wide shot, 85mm portrait)
5- Lighting: mood driver (golden hour, neon, overcast)
6- Extra detail: one texture or environment note
Example: "A ceramic artist shaping a vase on a wheel, editorial photography style, medium shot 50mm, soft window light from the left, dusty studio with clay-stained apron"
Swap one part at a time to see what each controls.
#AIImages #PromptEngineering #AITips #GenerativeAI #CreativeAI
Reasoning models were trained via RL to build their own chain of thought.
When you give them step-by-step instructions, you're competing with that process.
What works better: Goal โ Context โ Constraints โ Output.
Let the model plan.
#PromptEngineering#AITips#ReasoningModels
LLMs generate tokens sequentially .. each token depends on the ones before it.
When you ask for the answer directly, the model skips intermediate reasoning. When you ask it to think step by step, each generated token becomes context for the next.
One line changes everything:
"Think step by step before giving your final answer."
Add it to the end of any complex question: math, analysis, comparisons, planning. The model doesn't get smarter. It just gets more room to reason.
#AI #PromptEngineering #ChatGPT #Claude #ProductivityTips
LLMs weigh every token through attention layers. Clear structure = less guessing, better answers.
Every prompt I write has 4 parts:
1. Role
2. Task
3. Constraint
4. Format
The model doesn't guess. It executes.
#AI#PromptEngineering#ChatGPT
Interesting result from #Sora. In my prompt I wrote, โSanta passes by a homeless kid. He knocks on a door. A rich family opens the door.โ I never specified the race of any of the kids. ๐ค
@OpenAI @ChatGPTapp #ai#GenerativeAI
Start a #ChatGPT โLearningโ conversation in Safari on macOS. Open the ChatGPT app, resume the conversation, and a few minutes later, the app crashes! @OpenAI. Note: While the โLearningโ option is available on the iOS app, the macOS app lacks it.