AI Model & Product
TextGrain
Also known as: Text Grain
TextGrain, also written as Text Grain, refers to the grain or granularity of text: the size and structure of the unit a system treats as a single piece of content, from a whole document down to a section, passage, sentence or token. In AI search and retrieval work, the chosen grain decides what gets embedded, indexed, retrieved and cited. The name is also used by various text analysis tools and products, so confirm which sense is meant before relying on it.
What it is
Text grain describes how finely a body of writing is divided before it is processed by a search index, an embedding model or a retrieval-augmented generation pipeline. A coarse grain keeps whole pages or long chapters together, while a fine grain splits content into short passages, paragraphs or sentences. Where the term appears as a product or project name, the underlying idea is usually the same: working with text at a defined unit of analysis.
Why it matters
AI answer engines and retrieval systems rarely quote an entire page. They pull the passage that best matches the question, so the grain at which your content is written and structured affects whether it can be retrieved cleanly and attributed to you. Too coarse and the useful answer is buried in noise; too fine and the passage loses the context a model needs to use it correctly.
How it works
Practitioners set a grain when they chunk content for an index, choosing boundaries such as headings, paragraphs or fixed token windows, often with overlap so meaning is not cut in half. They then test retrieval quality at different grains, compare which passages get returned for real questions, and restructure source content so that each self contained answer sits inside one retrievable unit. Editorial teams apply the same thinking by writing short, standalone sections under clear headings.
When it applies
It applies whenever content is prepared for search indexing, embeddings, internal knowledge assistants or any retrieval-augmented generation system. It also applies in editorial planning, when deciding whether a topic should be one long page or several focused ones.
Examples
- A support team re-chunks its help centre from whole articles to one chunk per heading, so an assistant returns a single troubleshooting step rather than a 3,000 word guide.
- A B2B site rewrites a long pillar page so each subsection answers one question in full, making individual passages usable as standalone citations.
- An engineering team tests 200, 400 and 800 token chunk sizes with overlap and keeps the setting that returns the most relevant passage for a sample of real user questions.
How it is measured
- Retrieval precision and recall for a fixed set of test questions at each grain setting
- Share of retrieved passages that answer the question without needing neighbouring context
- Average chunk length and variance across the indexed corpus
- Citation rate of specific sections or passages in AI answers and assistant responses
Insights on TextGrain
Related terms in AI Model & Product
- Agents APIAn Agents API is a programming interface for building applications where a model plans, calls tools and completes multi-step tasks rather than returning a single reply. The term is most often used for OpenAI's agent building interfaces, though other vendors offer equivalents. Teams use it to connect models to search, internal data and actions such as booking, updating records or generating reports.
- AI assistantAn AI assistant is a software product that uses a language model to hold a conversation, answer questions and carry out tasks on a user's behalf. It sits on top of one or more underlying models and adds an interface, memory, tools and safety controls. Examples include ChatGPT, Google Gemini, Microsoft Copilot, Claude and voice assistants such as Siri and Alexa.
- AI transcriptionAI transcription is the automatic conversion of spoken audio into written text using speech recognition models. Modern systems often add speaker labels, punctuation, timestamps and language detection, and can feed the output into summarisation or search. It is also called automatic speech recognition or ASR.
- BingBing is Microsooft's web search engine, available at bing.com and integrated into Microsoft Copilot and other Microsoft products. It maintains its own crawler, Bingbot, and its own index, and provides Bing Webmaster Tools for site owners. Its index and APIs have also supplied results to third-party search products and AI assistants.
- ChatGPT VoiceChatGPT Voice is the spoken conversation mode in OpenAI's ChatGPT apps, which lets you talk to the assistant and hear its replies read aloud. Advanced Voice Mode processes speech directly, so exchanges feel closer to a phone call and you can interrupt mid-answer. People use it hands free on mobile, and it is also available on desktop.
- Claude CodeClaude Code is Anthropic's agentic coding tool that works directly with a codebase, reading files, proposing and making edits, and running commands with permission. It runs in the terminal and in supported development environments, driven by natural language instructions rather than manual file by file editing. Marketing and growth teams use it for technical SEO, structured data and data tasks that would otherwise wait for engineering.