# Layercraft > ## Blog - [১৬ মাস ধরে এআই দিয়ে আওয়ামী লীগের পক্ষে ভুয়া খবর, গাইবান্ধার এক ব্যক্তি শনাক্ত](https://ai.anovalab.com/blog/16-mas-dhre-eai-dize-aoozamee-leeger-pkshe-vuza-khbr-gaibandhar-ek-bzkti-snakt.md): ১৬ মাস ধরে এআই দিয়ে আওয়ামী লীগের পক্ষে ভুয়া খবর, গাইবান্ধার এক ব্যক্তি শনাক্ত - [What a large language model actually predicts](https://ai.anovalab.com/blog/what-a-large-language-model-actually-predicts.md): A large language model estimates a probability distribution over the next token given everything before it. It has no separate store of facts and no step where it checks an answer — fluency and accuracy come from the same mechanism, which is why confident wrong answers are a feature of the design rather than a bug in a particular model. - [Rumeen’s remarks trigger uproar in Parliament, allegations of verbal abuse](https://ai.anovalab.com/blog/rumeens-remarks-trigger-uproar-in-parliament-allegations-of-verbal-abuse.md): Independent member of parliament (MP) Rumeen Farhana’s remarks triggered a major uproar in the Jatiya Sangsad (national parliament) on Wednesday, as members of the ruling party protested by shouting and creating a commotion after she criticised the BNP (Bangladesh Nationalist Party) government. - [Tokens, not words: how a model reads your text](https://ai.anovalab.com/blog/tokens-not-words-how-a-model-reads-your-text.md): Text is split into tokens — roughly word fragments — before a model sees it. Tokenisation explains why models struggle to count letters, why non-English text costs more, why JSON is expensive, and why your bill scales with tokens rather than words. - [Why temperature changes the answer, not the knowledge](https://ai.anovalab.com/blog/why-temperature-changes-the-answer-not-the-knowledge.md): Temperature reshapes the probability distribution before a token is sampled. Low values make the model pick its top choice more often, which reads as consistency; high values flatten the distribution and admit less likely tokens. Neither setting adds knowledge or checks facts, so temperature is a control over variance, not correctness. - [Embeddings explained without the linear algebra](https://ai.anovalab.com/blog/embeddings-explained-without-the-linear-algebra.md): An embedding model converts text into a list of numbers positioned so that related meanings land close together. Distance between two embeddings approximates relatedness, which is what lets search match on meaning rather than keywords — and why "related" sometimes includes opposites. - [Training, fine-tuning and prompting are three different tools](https://ai.anovalab.com/blog/training-fine-tuning-and-prompting-are-three-different-tools.md): Pre-training builds general capability, fine-tuning adjusts behaviour and format, and prompting supplies task-specific context at request time. Fine-tuning is poor at teaching facts, which is the job most teams mistakenly hire it for; retrieval or a longer prompt is almost always the right answer there. - [The context window is a budget, not a memory](https://ai.anovalab.com/blog/the-context-window-is-a-budget-not-a-memory.md): A context window is how much text a model can consider in one request, and it resets every time. Filling it is not free: cost and latency rise with length, and retrieval accuracy degrades for material buried in the middle. Treat the window as a budget to spend deliberately rather than a space to fill. - [Why models hallucinate, and what actually reduces it](https://ai.anovalab.com/blog/why-models-hallucinate-and-what-actually-reduces-it.md): A model always produces a plausible continuation, whether or not grounds exist for one. Instructing it not to invent things helps marginally; giving it the source material, letting it decline, and verifying claims against something external help considerably more. - [System prompts: the instructions the user never sees](https://ai.anovalab.com/blog/system-prompts-the-instructions-the-user-never-sees.md): The system prompt establishes role, constraints and output format before any user input arrives. Specific, testable instructions with worked examples outperform adjectives, and every rule should be there because something went wrong without it. - [Structured output beats parsing prose](https://ai.anovalab.com/blog/structured-output-beats-parsing-prose.md): When a model's output feeds code rather than a person, constrain it to a schema. Native structured-output modes make the shape guaranteed rather than likely, and validating before use turns an unpredictable text problem into an ordinary data problem. - [Choosing between a large model and a small one](https://ai.anovalab.com/blog/choosing-between-a-large-model-and-a-small-one.md): Model choice should follow the task, not the org chart. Extraction, classification and routing run well on small fast models; open-ended reasoning and long synthesis justify a larger one. Routing per task typically cuts both cost and latency substantially without a quality change users notice. - [An agent is a loop, not a personality](https://ai.anovalab.com/blog/an-agent-is-a-loop-not-a-personality.md): An agent is a control loop around a model that can call tools. The model proposes an action, your code executes it, the result returns as context, and the cycle repeats until a completion condition is met. The difficult engineering is in the termination rules and the error handling, not the model. - [Tool calling is an API contract the model can read](https://ai.anovalab.com/blog/tool-calling-is-an-api-contract-the-model-can-read.md): A tool definition tells the model what a function does, when to use it and what arguments it takes. Descriptions are read as instructions, so vague names and thin descriptions produce wrong calls. Narrow, well-named tools with explicit enums and clear failure messages get used correctly far more often. - [Why agents fail on long tasks](https://ai.anovalab.com/blog/why-agents-fail-on-long-tasks.md): Long agent runs degrade because every step appends to the context, diluting the original goal among accumulated tool output. Compaction, restating the objective, and decomposing into shorter sub-runs address this far more effectively than a larger context window. - [Giving an agent memory without giving it amnesia](https://ai.anovalab.com/blog/giving-an-agent-memory-without-giving-it-amnesia.md): Since models retain nothing between calls, memory is something the application constructs. Useful systems separate short-term working context from durable facts worth storing, write memories deliberately rather than automatically, and make what is remembered visible and correctable by the user. - [When a workflow beats an agent](https://ai.anovalab.com/blog/when-a-workflow-beats-an-agent.md): Agents earn their unpredictability when the path genuinely varies by input. When the sequence is known, a deterministic pipeline with model calls at specific steps is cheaper, faster, easier to test and easier to debug. Most production tasks described as agentic are actually workflows. - [What an AI agent can actually do with a design system](https://ai.anovalab.com/blog/what-an-ai-agent-can-actually-do-with-a-design-system.md): A model asked to build UI from nothing invents plausible but inconsistent interfaces. Given a documented set of components, tokens and rules, it assembles from what exists instead. The determining factor is whether the design system is machine-readable, not how capable the model is. - [Design tokens are the interface AI needs](https://ai.anovalab.com/blog/design-tokens-are-the-interface-ai-needs.md): Tokens named for their role rather than their value give a model a vocabulary of decisions instead of a palette of colours. Semantic naming, a small closed set of values and a machine-readable source of truth are what turn generated interfaces from plausible into correct. - [Generating layouts that respect a grid](https://ai.anovalab.com/blog/generating-layouts-that-respect-a-grid.md): Generated layouts drift because spacing, column counts and breakpoints are conventions the model has to infer. Stating the grid explicitly, constraining spacing to a named scale and giving one correct example of a comparable layout removes most of the drift. - [Why component names matter more with AI in the loop](https://ai.anovalab.com/blog/why-component-names-matter-more-with-ai-in-the-loop.md): Models select components largely from their names and prop signatures, without opening the implementation. Names that state purpose get chosen correctly; generic or abbreviated names get chosen by guesswork. Naming has moved from a readability concern to an interface concern. - [Reviewing AI-generated UI: a checklist](https://ai.anovalab.com/blog/reviewing-ai-generated-ui-a-checklist.md): Generated UI tends to fail in consistent ways: invented values outside the scale, missing states, absent accessibility attributes, and layouts that only hold at the width they were written for. A short checklist covering those catches most problems before review becomes a matter of taste. - [RAG in one page: retrieve, rank, answer](https://ai.anovalab.com/blog/rag-in-one-page-retrieve-rank-answer.md): RAG finds relevant text, ranks it, and gives it to a model to answer from. The generation step is rarely where quality is lost — chunking, retrieval and ranking determine almost everything, which is why evaluating retrieval separately from answering is the highest-value thing a team can do. - [Chunking is the part of RAG nobody tunes](https://ai.anovalab.com/blog/chunking-is-the-part-of-rag-nobody-tunes.md): Chunking determines what retrieval can possibly return. Fixed-size splits cut sentences and separate claims from their context; splitting on document structure with a little overlap, and prepending the section heading to each chunk, consistently outperforms the default character-count approach. - [Prompt caching: the cheapest speedup you are not using](https://ai.anovalab.com/blog/prompt-caching-the-cheapest-speedup-you-are-not-using.md): Providers can cache a stable prompt prefix so repeated tokens are billed at a fraction of the normal rate and processed faster. Capturing that requires putting unchanging content first and variable content last, and keeping the prefix byte-identical across requests. - [Streaming responses without breaking your UI](https://ai.anovalab.com/blog/streaming-responses-without-breaking-your-ui.md): Streaming tokens as they arrive transforms perceived latency, but partial output is often invalid — half a markdown fence, an unterminated JSON object — and the stream can fail mid-response. Robust implementations render defensively, buffer structured output, and always render a terminal state. - [Rate limits, retries and the backoff you actually need](https://ai.anovalab.com/blog/rate-limits-retries-and-the-backoff-you-actually-need.md): Rate limits are a normal operating condition for AI features. Exponential backoff with jitter, respecting the retry-after header, distinguishing retryable from permanent errors, and a circuit breaker for sustained failure turn a recurring incident into an invisible one. - [How to evaluate an AI feature before you ship it](https://ai.anovalab.com/blog/how-to-evaluate-an-ai-feature-before-you-ship-it.md): Evaluation for AI features means a fixed set of real inputs with expected outputs, run on every change. Starting with fifty hand-labelled cases drawn from actual usage, measuring the failures rather than the average, and adding every reported bug to the set builds a harness that makes prompt changes safe. - [The cost model of an AI feature](https://ai.anovalab.com/blog/the-cost-model-of-an-ai-feature.md): AI feature cost is driven by tokens per interaction, interactions per user and hidden multipliers — resent conversation history, retries, retrieved context and agent loops. A simple spreadsheet built before launch, with a per-user cap in code, prevents the expensive surprises. - [Writing prompts your team can maintain](https://ai.anovalab.com/blog/writing-prompts-your-team-can-maintain.md): Prompts behave like code — they change behaviour, they regress, they accumulate — but arrive with none of the usual discipline. Keeping them in version control, recording why each rule exists, reviewing changes against an eval set and separating instructions from data makes them maintainable by a team rather than by whoever wrote them. - [What to tell users when the model is wrong](https://ai.anovalab.com/blog/what-to-tell-users-when-the-model-is-wrong.md): AI features fail in front of users, and the interface around the output determines the damage. Showing sources, making corrections easy, matching confidence to reliability and keeping the user in control of consequential actions preserves trust through failures that are going to happen regardless. - [AI adoption without a rewrite](https://ai.anovalab.com/blog/ai-adoption-without-a-rewrite.md): Successful adoption starts with one narrow, measurable feature behind a flag, chosen where errors are cheap and feedback is fast. Keeping the model behind an interface, measuring against a baseline and being willing to remove the feature keeps the risk proportionate to the evidence.