Sub topic 4
From a Prompt to an Intent
Before an AI search system retrieves anything, it has to decide what the user is asking for. This chapter covers that step: how a raw prompt becomes an intent, what signals feed into it, and why it matters for the content you publish.
This chapter assumes you know how traditional search and SEO work, including the idea of search intent (informational, navigational, transactional). It also assumes you have used an AI chat or search product. No programming is needed. The short code sketch is there to make the idea concrete.
Why a prompt is not yet a query
A prompt is what the user typed or said. A query is what a retrieval system can act on. In classic search, those two were nearly the same: a few keywords went in, and the engine matched them against an index.
AI search users write differently. They write full sentences, add context, and ask several things at once. Compare these two inputs:
running shoes flat feetI run about 20 km a week, my arches are flat, my knees hurt after long runs, and I don't want to spend more than 100 dollars. What should I buy?
The second prompt contains a topic, a personal situation, a constraint, a symptom, and a decision to make. A system that matched it word for word against an index would do poorly. Long, specific prompts rarely match any single page. So the system has to interpret the prompt first.
What "intent" means here
In this chapter, an intent is the system's working description of what the user is trying to accomplish. It usually has several parts:
- Task type. Is the user looking for a fact, a comparison, a recommendation, a how-to, or something to buy?
- Topic and entities. What things does the prompt name? Examples are products, brands, conditions, places, and dates.
- Constraints. Budget, location, skill level, time frame, and similar limits.
- Context. What the user said earlier in the conversation, and in some products, stored preferences or location.
- Freshness need. Whether the answer can come from older knowledge or needs current pages.
- Whether to search at all. Some prompts can be answered without retrieval.
This breakdown is a useful working model. Vendors do not publish the exact structure their systems use, so treat it as an explanation of the kind of work being done, not a specification.
How the interpretation probably happens
Public documentation and research describe several techniques. The common approach is to have a language model read the prompt, and sometimes the conversation so far, and produce a structured interpretation or a set of rewritten queries. Which products do this, and in what form, varies. Here are the main techniques.
Rewriting for context
Conversation makes prompts ambiguous. If a user asks "What about the cheaper one?", no search engine can use that text. The system must rewrite it into a standalone query that includes the missing context, such as "cheaper alternative to [product named earlier]".
Intent classification
The system may label the prompt by type. A "how do I" prompt, a "best X for Y" prompt, and a "what is" prompt call for different kinds of sources. A recommendation request benefits from reviews and comparisons. A definition request benefits from reference pages.
Entity and constraint extraction
Named things and limits are pulled out so that they can be used as search terms or filters. In the running shoe example, "100 dollars" is a price constraint, "flat arches" is a foot condition, and "knees hurt" is a symptom that may or may not be treated as medical territory.
Deciding whether to retrieve
Not every prompt triggers a search. A request to rewrite a paragraph does not need web results. A question about last week's news does. Products make this choice differently, and some let the user force it. This matters for marketers because there is a class of prompts where your content cannot appear at all, since nothing was retrieved.
A worked sketch
The sketch below shows the kind of structured output an interpretation step might produce. It is hand-written for illustration. It is not output from any real system, and no vendor is known to use this exact format.
import json
prompt = (
"I run about 20 km a week, my arches are flat, my knees hurt after "
"long runs, and I don't want to spend more than 100 dollars. "
"What should I buy?"
)
interpreted_intent = {
"task_type": "recommendation",
"topic": "running shoes",
"entities": ["flat feet", "knee pain"],
"constraints": {"max_price_usd": 100, "weekly_distance_km": 20},
"needs_fresh_results": True,
"needs_retrieval": True,
"sensitive_topic": "possible health advice",
}
print("Prompt:", prompt)
print("Interpreted intent:")
print(json.dumps(interpreted_intent, indent=2))Everything that follows in retrieval depends on this step. The next chapter shows how one such intent can be split into several searches, which is query fan-out.
The pipeline position
The diagram shows where interpretation sits relative to the steps covered elsewhere in this tutorial.
Ambiguity and how systems handle it
Many prompts have more than one reasonable reading. "Python courses" could mean the programming language or something about snakes, though context usually settles that. A harder case is "best CRM," which could mean small business, enterprise, free, or industry-specific. Systems have a few options:
- Pick the most likely reading and proceed.
- Cover several readings at once, which is one reason fan-out exists.
- Ask the user a clarifying question.
For content creators, the second option is the important one. If a system hedges across readings, pages that clearly state who they are for can match whichever reading wins. A page that never says "for small teams" or "for enterprise" gives the system nothing to match against any constrained reading.
Common errors marketers make
- Treating the prompt as the keyword. Optimizing for the literal long prompt is rarely useful because every user phrases it differently. Think about the intent behind many phrasings.
- Ignoring constraints. Budget, location, experience level, and similar modifiers are often what separates a retrieved page from an ignored one. Content that states them explicitly is easier to match.
- Assuming one intent per topic. A single topic can carry informational, comparative, and transactional intents at once, and a system may serve all of them in one answer.
- Assuming retrieval always happens. For stable, well-known facts, a system may answer from the model's training data. Your page may influence nothing in that case.
- Presenting inference as fact. How any specific product interprets prompts is not public in detail. Claims such as "this system always extracts X" should be treated as hypotheses to test.
What to do with this
You can apply the idea without any special tool.
- Pick a target topic.
- Write five to ten realistic prompts a user might type, from short and vague to long and constrained.
- For each, write down the task type, the entities, and the constraints.
- Check whether your page states those entities and constraints in plain words.
This gives you the raw material for the sub-question audit later in the tutorial.
Exercise
A user types: "My team of 8 needs project software that works with Slack and costs under 15 dollars per person." List the task type, two constraints, and one entity a system might extract, then name one thing a product page would need to state plainly to be matched.
Show answer
Task type: recommendation (or comparison). Constraints: team size of 8, and a price under 15 dollars per person per month. Entity: Slack (the integration requirement), and "project management software" as the topic. A product page would need to state its pricing per user and name its Slack integration in plain text, ideally with team-size suitability, so a retrieval step can match those constraints. Any reasonable variation is acceptable.
Exercise
Why can a page get no benefit from a prompt it seems perfectly suited to, even if it ranks well in classic search for the topic?
Show answer
The system may decide the prompt does not need retrieval and answer from the model's stored knowledge. Alternatively, its interpretation may emphasize a constraint or reading that the page does not state, so the page is not matched. Neither case can be confirmed from outside, so test with repeated prompts.