Skip to content

Search inside your PDFs and Markdown files

To search inside your files, open Search in a Space, choose Ranked, type a question or a few words, and press Enter. Mempipe lists the passages that best answer it from every PDF and Markdown file in the Space, best match first. Choose a result to open the file at that passage.

Search looks inside PDF and Markdown files, one Space at a time. For a PDF, it reads the text Mempipe extracted from the file, the same text the file’s Markdown view shows. It does not look inside CSV or TSV files; you query those with SQL instead.

You need a Space with at least one PDF or Markdown file. A file you just uploaded appears in search once it finishes processing, usually within a minute.

The Search panel has three modes. Choose one at the top of the panel.

Mode Use it to Example
Ranked Find the passages that answer a question, best match first how much risk can we accept?
Grep Find every passage that contains exact text third-party software
Glob Find files by name or folder raw/*.pdf

Ranked search finds passages by what they mean as well as by the words they use, so you can ask in your own words. A ranked result is a passage of a file: a run of its lines, about a section at a time. The Rank by button under the search box chooses Meaning and keywords, the default, Meaning (Vector) alone, or Keywords (BM25) alone. Search, grep, and glob syntax describes each ranking.

The panel opens in Grep mode. Find an exact phrase in your documents covers Grep, and Find a file by name covers Glob.

  1. Open Search.

    In a Space, choose Search, the magnifying glass in the narrow rail at the left edge of the window. The Search panel opens beside the rail. If the rail is hidden, press ⌘\ (Ctrl+\ on Windows and Linux) to show the left sidebar.

  2. Choose Ranked.

    Select Ranked at the top of the panel.

  3. Ask and run the search.

    Type a question or a few words in the search box, such as how much risk can we accept?. Press Enter, or choose the magnifying glass at the end of the box.

  4. Read the results.

    A line above the list counts the results, such as “12 results in 4 files”. Results stay in rank order, best match first. Results next to each other from the same file sit under one heading: the file’s path and how many results it holds. A file that ranks again further down gets its own heading there. Choose a file’s path to fold those results away. Each result shows:

    • the heading the passage sits under, after the headings above it, such as “Key-notes brief › Not found”;
    • the first lines of the passage, with Markdown marks such as ** and table bars left out;
    • where the passage starts: p.12 is page 12 of a PDF, and L40 is line 40 of a Markdown file. PDF pages are counted from the first page of the file, so the number can differ from the one printed on the page.

    Within a file, the best match comes first. Point at a result to see its score. A higher score is a closer match.

  5. Open a result.

    Choose a result. The file opens in the main area, scrolled to the start of the passage, with its first paragraph or heading highlighted. For a PDF, the original page opens beside the text with the passage outlined. Open a citation and check its source explains this view.

  6. Load more results.

    When the count line says More available, choose Load more at the bottom of the list. Meaning and keywords ranks the top 20 passages, so it stops there. To look further, choose Meaning (Vector) or Keywords (BM25) under Rank by.

The results stay in the Search panel while you open files, so you can check several in turn.

The Search panel in BM25 mode with results for risk tolerance, and a PDF result open with its passage highlighted
BM25 lists the best matches first. Choose a result to open the file at that passage.

The filters sit in a row of buttons under the search box. Changing one searches again straight away.

  • Rank by chooses Meaning and keywords, the default, Meaning (Vector), or Keywords (BM25).

  • Files chooses which files to search. Choose + Files, then fill in one of its two tabs and choose Apply:

    • Folder and type: type a folder, such as raw, to search it and its subfolders. Choose PDF or Markdown under File type to search one kind of file.
    • Glob pattern: a file’s full path, such as raw/NIST.AI.100-1.pdf, or a pattern such as raw/**/*.pdf. Find a file by name explains patterns.

    The Files button turns teal while it narrows the search. To search every file again, choose its ×, or Search all files.

  • Up to sets how many results each page shows: 5, 10, or 20.

Grep has more filters, which Find an exact phrase in your documents describes.

  • Preparing recent uploads for search. Results may be incomplete. A file you uploaded is still processing. Wait a minute, then search again.
  • No results in the files you chose. Nothing matched inside the files Files narrows to. Check the folder name, or choose Search all files.
  • No results. No passage matched. Try other words, clear the filters, or use Grep to look for exact text. No results does not prove the text is absent: a file may still be processing, or it may use different words.
  • Matched on keywords only: meaning search is unavailable right now. Mempipe couldn’t reach the model that ranks by meaning, so these results match your words only. Search again in a moment, or use the words your documents use.
  • A message that says search coverage could not be verified. The Space has PDF or Markdown files, but none of them has reached search yet, so an empty result would tell you nothing. Wait a minute and search again, and open the files directly in the meantime. If a file failed processing, What happens after you upload a file shows how to find out why.
  • This Space’s search index is being rebuilt. Wait a minute, then search again.
  • Top 20 matches in the count line, with Rank by Meaning or Keywords to see more. Meaning and keywords ranks the top 20 passages for one query. Choose Meaning (Vector) or Keywords (BM25) under Rank by to page further, up to 1,000. At that bound the line says Top 1000 matches and Narrow the files to see others: add words, or narrow Files, to reach the others.
  • stale beside a result. The file has changed since search last read it, so the passage shown may be out of date. Open the file to read its current text. stale — re-deriving means Mempipe is processing the new version now. refresh failed means processing the new version failed; point at the label to see why.

If a file is still missing from search, see Search results are missing or out of date.

The Search Index page lists every passage that search can find in the Space. Use it to check whether a file has reached search.

  1. Open the Search Index.

    In the left rail, choose Pipeline, then Search Index under Inspect. You can also press ⌘K and choose Search Index.

  2. Check one file.

    Enter the file’s full path in Path and choose Apply. Each row is one passage from that file.

  3. Open a passage.

    Select a row to show its details in the right panel. Choose the arrow icon beside the path there to open the file at that passage.

You can also start from the file. Open it and choose search-units in the View switcher to list the passages prepared for search from that file. It shows them as a Table, or as Raw JSONL, the lines Mempipe stores, and selecting a passage shows its details. Find in Search Index, at the bottom of that list, opens the Search Index filtered to the file.

If a file has no rows, it may still be processing. Check Space Activity under Pipeline, then choose Refresh on the Search Index page. If the page says the index is being rebuilt, refresh it in a moment.

Most rows are one paragraph, heading, list item, or table row: what Grep searches. Rows of kind passage are the longer runs of lines that ranked search returns.

To narrow the list further, choose a Kind, such as heading, table_row, or passage, or type a file extension such as md or pdf in File Type. Page Size and the arrows above the list page through it, and a count such as 1–50 of 412 indexed units shows where you are. The Kind, Node, and Artifact columns describe how Mempipe stores each passage; you don’t need them to search.