Back to blog
Your documents, one question away: knowledge spaces
Features4 min read

Your documents, one question away: knowledge spaces

The problem

Your lease, your boiler's manual, your club's rules, the notes from a project: the answers exist somewhere, in files you never reread. A language model doesn't know them. Pasting a whole document into it with every question is slow and expensive, and it stops working as soon as there are several.

What I wanted

I wanted you to file your documents in knowledge spaces, which you turn on or off depending on what you're working on, and have LIA search them on its own for the useful passage when you ask your question. It answers with that passage and tells you where it comes from. LIA has a space of its own, too: the site's FAQ, which it uses to answer when you ask how it works.

How it finds the right passage

You drop in a file: PDF, Word, Excel, PowerPoint, LibreOffice documents, EPUB, Markdown, HTML, CSV and a few others. LIA extracts its text, cuts it into passages that overlap slightly, and computes for each one a kind of fingerprint of its meaning. This computation is done once, at indexing, and counted in your usage.

When you ask “how many months' notice do I have to give on my lease?”, LIA compares the meaning of your question with that of the passages in your active spaces. It's this meaning that decides whether a passage is relevant: your question can use different words from the document, or another language. Exact word matching only breaks the tie between two passages that are almost equally close, for example to bring up the one that contains the precise reference you cite. I made that choice because mixing the two in equal parts discarded good answers as soon as the language of the question drifted away from that of the documents. And if nothing is close enough, LIA adds nothing to your question.

LIA can also search your documents on its own when a request calls for it, in several passes if needed, and cross-check with other sources: “compare the PDF quote with what Paul sent me by email”.

Where documents come from

  • Your uploads, which you can then download, move from one space to another or delete in batches.
  • A Google Drive or OneDrive folder that you link to a space, subfolders included. LIA follows additions, changes and deletions. When many files are about to be indexed, it gives you the exact number before starting.
  • A Gmail label, if your administrator has opened this option: each thread that carries the label becomes a document, and removing the label removes it. Only the subject, the messages and the names of the attachments are copied, never their content. I didn't want to index the whole mailbox: it would be a second copy of your archives to protect, made up mostly of notifications.
  • Your meetings: the minutes of a recorded meeting join a “Meetings” space that LIA keeps up to date for you.
  • Your kept answers: an answer you keep is indexed in a space of your own, so that LIA can find it and cite it weeks later.

To ask about a specific document, even one filed in a paused space, the “+” in the input area lets you attach a copy of it to your message, without touching the space.

The limits

  • LIA only reads text. A scanned PDF, made of page images, doesn't contain any: LIA tells you so and suggests a fix, opening it in Google Docs, which recognizes the text, then adding it through your Drive source.
  • A document that couldn't be indexed shows why: file gone, text impossible to extract, document too long.
  • Only active spaces are used for answers. Turning a space off deletes nothing.
  • The number of spaces and documents, and the size of files, are capped by your instance.

Read more: Finding what matters without dragging in everything: the thresholds of search by meaning; Your data stays yours: what LIA keeps, shows and erases.

#rag#documents#hybrid-search#embeddings#knowledge-base