Search, grep, and glob syntax
Mempipe’s Search panel has three modes, and each reads what you type differently. Ranked takes a question or a few words, in your own words, and ranks the passages that best answer it. It has no special syntax. Grep takes exact text, or a regular expression while Regex is on, and checks each line of each passage. Glob takes a pattern such as raw/**/*.pdf, which must match a file’s whole path.
Ranked search and Grep search the text of PDF and Markdown files that have finished processing. Glob searches the names of every file. Search inside your PDFs and Markdown files shows how to use the panel.
Ranked
Section titled “Ranked”Type a question or a few words, such as how much risk can we accept?. Ranked search returns passages: runs of a file’s lines, about a section at a time, each starting at a heading where it can.
Choose Rank by, under the search box, to choose how passages are ranked:
| Rank by | Finds | Best for |
|---|---|---|
| Meaning and keywords, the default | Passages about your question, with a boost for passages that contain your words | Most searches |
| Meaning (Vector) | Passages about your question, even when they use other words than yours | Questions phrased in your own words |
| Keywords (BM25) | Passages that contain your words | Names, terms, and codes you know appear in the file |
Meaning ranks with an AI model that turns each passage and your query into a list of numbers, so passages about the same thing sit close together. It can find a passage that says “risk tolerance” when you search for “how much risk can we accept”. It can still miss, and it can rank a nearby topic above the answer, so open the result to check it. For an exact code or clause number, Keywords or Grep is more reliable.
A higher score means a closer match. Compare scores only within one search: each mode scores on its own scale.
| Rank by | Results per page | Results in all |
|---|---|---|
| Meaning and keywords | Up to 20 | The top 20 |
| Meaning (Vector) | Up to 20 | 1,000 |
| Keywords (BM25) | Up to 20 | 1,000 |
To look past the top 20 for a query, choose Meaning (Vector) or Keywords (BM25).
If the meaning model can’t be reached, Meaning and keywords still answers from keywords alone, and the count line says Matched on keywords only: meaning search is unavailable right now. Meaning (Vector) shows an error instead. Search again in a moment.
Keywords (BM25)
Section titled “Keywords (BM25)”Type the words you expect to find in the passage, such as risk tolerance. A passage’s heading counts as part of its text.
- Any of your words can match. A passage needs only one of them. Passages with more of your words, and with rarer words, rank higher.
- Case and accents don’t matter.
Riskfinds “risk”, andcafefinds “café”. - Word endings don’t matter.
risksalso finds “risk” and “risking”. - Common English words are ignored, such as “the”, “and”, “or”, “not”, and “all”. A query made only of such words finds nothing.
- Punctuation splits words.
third-partylooks for “third” and “party”. - There is no other syntax. Quotes,
AND,OR,NOT,+,-, and*have no effect. To find an exact phrase, use Grep.
Keywords match words, not meanings, and handle word endings and common words as English does, whatever the document’s language. For text written without spaces between words, such as Chinese or Japanese, use Grep.
A higher score means a closer match. Point at a result to see its score, and compare scores only within one search.
Grep lists every passage that contains a match, sorted by file path and then by position in the file. A Grep passage is one paragraph, heading, list item, table row, or code block, shorter than a ranked result. The Regex and case buttons sit under the search box. Regex is on when the panel opens.

Exact text
Section titled “Exact text”With Regex off, Grep finds your text exactly as typed, anywhere in a line. bias also finds “biased”. Spaces at the start or end of the pattern are removed.
Letter case
Section titled “Letter case”- Smart case, the default, ignores case when the pattern has no capital letters, and matches case exactly when it has one.
- Match case always matches case exactly.
- Ignore case never does.
Ignoring case doesn’t ignore accents. cafe doesn’t find “café”.
Regular expressions
Section titled “Regular expressions”With Regex on, the pattern is a regular expression. These are the most useful parts:
| Syntax | Matches |
|---|---|
. |
Any one character |
*, +, ? |
The item before it, repeated zero or more times, one or more times, or zero or one time |
{2,4} |
The item before it, two to four times |
[abc], [a-z] |
One of the listed characters, or one in the range |
[^abc] |
One character that isn’t listed |
\d, \w, \s |
A digit, a letter or digit or _, or a space or tab |
\b |
The edge of a word |
^, $ |
The start or end of a line |
cat|dog |
Either side of the | |
( ) |
A group, such as risk (tolerance|appetite) |
\. |
A literal dot. Put \ before any of . * + ? ( ) [ ] { } | \ ^ $ to match it as text. |
(?i) |
Ignore case from this point |
Grep doesn’t support lookahead or lookbehind, such as (?=…), or back-references, such as \1. Letters and digits in \w, \d, and \b include other alphabets.
What Grep reads
Section titled “What Grep reads”Grep checks each line of a passage on its own. A match can’t run across two lines, and ^ and $ mark the start and end of each line.
It reads the passage as Markdown, so formatting marks are part of the text. A heading starts with #, so ^## finds second-level headings. Bold text is written **like this**, and a link includes its web address. Mempipe writes this Markdown in one standard form, so a note’s __bold__ is read as **bold** and its * bullets as -.
A pattern needs some fixed text
Section titled “A pattern needs some fixed text”To search the whole Space, a pattern must include fixed text that every match contains: three or more letters or digits in a row, or a punctuation mark, space, or character from another alphabet. \bbias\b works because of “bias”. \d+% works because of the %. \d{4} alone doesn’t, and Grep says your text left too little fixed text to search every file.
To search with a pattern like that, set Files. A folder or a file type is enough, and a Glob pattern of ** searches every file.
Filters
Section titled “Filters”- Files takes a folder and a file type, or a Glob pattern with the same syntax as Glob mode, below. A folder includes its subfolders. File type ignores letter case, so PDF also finds
Scan.PDF. In a glob pattern, a plain path such asraw/NIST.AI.100-1.pdfmatches that one file. Use the same letter case and no/at the start. - Up to sets how many results a page shows, up to 1,000.
Files works the same way in ranked search, where Up to goes up to 20.
A glob pattern must match a file’s whole path, from the top of the Space.
| Syntax | Matches |
|---|---|
* |
Any characters within one file or folder name, including none |
** |
Any number of folders, including none, when it stands alone between slashes, as in raw/**/*.pdf |
? |
Exactly one character, other than / |
[abc], [a-z] |
One of the listed characters, or one in the range |
[!abc] or [^abc] |
One character that isn’t listed |
{pdf,md} |
Any one of the choices |
\* |
A literal *. Put \ before any special character to match it as text. |
- Letter case must match.
*.PDFdoesn’t findreport.pdf. - Start from the top of the Space.
*.pdffinds only PDFs at the top level.**/*.pdffinds every PDF, at the top level too. A/at the start is ignored, but a pattern that starts with./finds nothing. - Two asterisks inside a name act like one:
raw/**.pdffinds only the PDFs directly insideraw. - A pattern with no special characters finds that one path.
- Glob finds files, not folders. To list a folder’s files, use a pattern such as
raw/**.
Results are sorted by path. The panel shows 50 files to start. Choose Up to 50 under the search box and pick a larger number, up to 1,000, to see more. If the pattern has a mistake, such as a [ with no ], the panel shows an error that ends in returned 422. Check the pattern’s brackets and braces.
| Pattern | Finds |
|---|---|
**/*.md |
Every .md file |
wiki/*.md |
Markdown files directly inside wiki |
raw/** |
Every file in raw and its subfolders |
**/*.{csv,tsv} |
Every CSV and TSV file |
**/NIST.AI.???-1.pdf |
NIST.AI.100-1.pdf and NIST.AI.600-1.pdf, in any folder |
**/[!_]* |
Every file whose name doesn’t start with _ |
Find a file by name shows how to use Glob mode.
When an agent searches
Section titled “When an agent searches”The in-app agent and connected AI apps use the same three kinds of search, with the same rules. Their ranked search uses Meaning and keywords unless they ask for another ranking, and returns 10 passages at a time, or up to 20 when they ask. Each passage comes with a citation for every paragraph, heading, or row inside it, so an answer cites the exact lines a claim comes from rather than the whole passage. Both can narrow a ranked search with a glob pattern, as the Search panel’s Files filter does. For example, ask the in-app agent to search only raw/project-a/**, then check the scope shown in its search step. The in-app agent’s grep matches exact text unless the agent asks for a regular expression. A connected app’s grep reads a regular expression unless the app asks for exact text.