RA-RETRIEVE(1)
π RA-RETRIEVE π
okay so you opened ra-retrieve(1) from the General Commands Manual and bestie, you came to the right place π
. this is the retrieval half of the Savant search engine, and yes it's giving "old-school IR tool that absolutely still eats." let's get into it π
πΈ NAME πΈ
ra-retrieve β retrieves files that match a query, for use with remembrance agent software π«Ά
β¨ SYNOPSIS β¨
ra-retrieve [--version] [-v] [-d] <base-dir> [--docnum <docnum>]
π¦ DESCRIPTION π¦
so, the lore: ra-index and ra-retrieve together make up the Savant search engine β an information retrieval engine designed as a back-end for the Remembrance Agent (RA) β¨. You hand it a whole collection of the user's accumulated email, usenet news articles, papers, saved HTML files and other text notes, and the RA goes hunting for the documents that are most relevant to whatever the user is doing right now. Like, it searches this collection for the documents with the highest word-for-word similarity to the text the user is currently editing β the hope being that word-for-word similarity also means high conceptual similarity, and therefore actual usefulness to the current work π§ π. With the Emacs front-end, those suggestions just keep showing up in a little buffer at the bottom of the user's window, and if a suggestion looks useful, the full text comes back with a single command. iconic behaviour, honestly.
The Remembrance Agent runs in two stages. First, the user's collection of text documents gets indexed into a database saved in a vector format π. After that database exists, the other stage runs from emacs: it periodically takes a sample of text from the working buffer and finds the documents from the collection that are most similar π. It summarizes the top documents in a small emacs window and lets you retrieve the entire text of any one of them with a keystroke. For info on using the Emacs front-end, go read the README file, bestie.
The RA is primarily designed as a proactive information provider β it continually feeds you info that might be relevant to your current environment π. In that mode, ra-retrieve is run by a front end and its output gets parsed into a more human-readable format. But β plot twist β Savant can also be used as a standard text and information retrieval search engine. main character energy for real.
π USAGE π
The one argument to ra-retrieve is <base-dir> β that's the directory holding the index files that ra-index created π. Passing it starts an interactive process that handles queries and returns the documents that most match that query. Run it with the -v argument and you get a menu plus other information printed out. Without -v, it assumes ra-retrieve was launched from a front-end, so it only prints minimal info π€«.
Here are the commands you've got, no cap:
query <num-lines>β find the<num-lines>most relevant documents to a query. Default is5. Type in the text of the query, then hit a^D(ASCII 04) to send it π. If the query matches a predefined template, then the fields are parsed and separately β yep, that's literally what the manpage says, and I am not paraphrasing the mystery π. For example, in emacs mail mode the from, subject, date and body of the message are all individually parsed. If no template matches, the query is just assumed to be plain text.
A query outputs up to n summary lines, followed by a period on a line all by itself. Each summary line contains a line number, a relevance number, a document number, and a series of fields describing the document. That final field is a comma-separated list of the words from your query that most contributed to this document getting chosen π.
retrieve <document number>β retrieve and print the document with the given document number. The document number is the third fieldoutputedby the query (typo preserved, iykyk π). The full text of the document gets displayed. If the document is part of a larger file β like an email inside an archive file β only that one document is shown π.loc-retrieve <document number>β retrieve and print the location of the document with the given document number. Three values come out, each on its own separate line. First: the character offset to where the beginning of the document is found. Second: the character offset for the end of the document. Third line: the fully expanded filename for the document itself π. This exists primarily so front-ends can load the document and display it with their own formatting. thoughtful king behaviour.infoβ display version and database info.quitβ quit.?β display menu.
π OPTIONS π
-vβ Verbose mode. Prints a menu and other info, for running without a front-end π.-dβ Debug mode. Prints not-so-useful information π.[--docnum <docnum>]β print the contents of the specified document number and exit. This option doesn't use as much memory as interactive mode, and it's useful for scripts that call this program π₯.
also hanging out in the synopsis: --version. it's up there, it's real, it's doing its thing β¨.
π«Ά SEE ALSO π«Ά
π AUTHOR π
Bradley Rhodes, MIT Media Lab. Please send comments and questions to ra-bugs@media.mit.edu. New versions and updates can be found at http://www.media.mit.edu/~rhodes/RA/ π
π COPYRIGHT π
All code included in versions up to and including 2.09:
Copyright (C) 2001 Massachusetts Institute of Technology.
All modifications subsequent to version 2.09 are copyright Bradley Rhodes or their respective authors.
Developed by Bradley Rhodes at the Media Laboratory, MIT, Cambridge, Massachusetts, with support from British Telecom and Merrill Lynch ποΈ.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For commercial licensing under other terms, please consult the MIT Technology Licensing Office πΌ.
This program may be subject to the following US and/or foreign patents (pending): "Method and Apparatus for Automated, Context-Dependent Retrieval of Information," MIT Case No. 7870TS. If any of these patents are granted, royalty-free license to use this and derivative programs under the GNU General Public License are hereby granted.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details β οΈ.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA π¬.
π BUGS π
- Dates are not currently indexed, so anything trying to do a date query gets no suggestion back. not even a crumb. nothing. π
- Requires GNU make to compile.
- The template structure isn't documented. we simply do not know.
that's the whole page, bestie β every flag, every command, every copyright clause, untouched and accounted for π. this one's from MIT Media Lab, under the REMEMBRANCE AGENT banner, and it's RA-RETRIEVE(1) β go forth and retrieve, you absolute icon π¦β¨
π¦ where this page comes from
- ubuntu jammy: remembrance-agent 2.12-7.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms