---
title: "Match how people ask as well as title · Agent Wranglers"
url: https://agentwranglers.se/playbook/search/language-and-matching/match-plain-questions
id: SRH-15
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 933
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Match how people ask as well as title words

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Language and matching](https://agentwranglers.se/playbook/search/language-and-matching.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: SRH-15
- Level: Recommended
- Chapter: [Language and matching](https://agentwranglers.se/playbook/search/language-and-matching.md)
- Rule: Site search, ask endpoints and agent tools drop filler words and match word forms, so a plain question finds the right page.
- Check: A fixed set of at least 20 plain questions returns the expected page first for each. For example, "how do I know if my site is down" returns the uptime page.
- How: Drop stop words, such as "how", "do", "I", "my" and "the", before matching. Stem both the query and the index, so "signing" matches "Sign". Weight words in titles and summaries above words in body text. Agents pass on the person's own words more often than keywords, so test with whole questions. Keep the questions in a fixed set, as [Test search results with a fixed query set](https://agentwranglers.se/playbook/search/relevance/search-quality-tests.md) says. The ask endpoint itself is [Answer questions from your own pages](https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents/nlweb.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
const STOP_WORDS = new Set(['how', 'do', 'i', 'my', 'the', 'a', 'is', 'if', 'to', 'know', 'what']);
const stem = word => word.replace(/(ing|ed|es|s)$/, '');
export const queryTerms = question => question.toLowerCase().match(/[a-z0-9]+/g)?.filter(word => !STOP_WORDS.has(word)).map(stem) ?? [];
```

### Python example

```python
import re
from nltk.stem.snowball import SnowballStemmer

STOP_WORDS = {"how", "do", "i", "my", "the", "a", "is", "if", "to", "know", "what"}
stemmer = SnowballStemmer("english")

def query_terms(question: str) -> list[str]:
    return [stemmer.stem(word) for word in re.findall(r"[a-z0-9]+", question.lower()) if word not in STOP_WORDS]
```

## Related rules

- AGT-77 [Measure how much an agent reads to find an answer](https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents/agent-path-tests.md) in Agents as users
- DOC-30 [Fix the help searches that find nothing](https://agentwranglers.se/playbook/documentation/help-centres-and-user-guides/failed-searches.md) in Documentation
- SRH-17 [Test search results with a fixed query set](https://agentwranglers.se/playbook/search/relevance/search-quality-tests.md) in Search
- AGT-66 [Answer questions from your own pages](https://agentwranglers.se/playbook/agents-as-users/ready-for-ai-agents/nlweb.md) in Agents as users

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/search/language-and-matching/match-plain-questions">Agent Wranglers search playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Split compound words in languages that join them](https://agentwranglers.se/playbook/search/language-and-matching/compound-words.md)
- Next: [Give every item the words people use for it](https://agentwranglers.se/playbook/search/language-and-matching/item-aliases.md)
- [Language and matching](https://agentwranglers.se/playbook/search/language-and-matching.md)
