Library
The Library gives a chat its sources in full or searches them for the relevant parts; search by meaning needs an embedding model Loach can reach. When a reply surprises you, start with the sources chip above it - it says what the model actually got.
Search by meaning says “Embedding paused”
The Library header shows Embedding paused (Settings → Library reads Embedding is paused), and replies’ sources chips say the embedding model was unavailable.
Loach can’t reach the embedding model, so it searches your sources by keyword until it can - nothing is lost. Hover the header button, or open Settings → Library, for the reason:
- The model isn’t found - it isn’t installed in Ollama. Settings shows … isn’t installed in Ollama with a Download it link, or pick a suggested model with Download & use.
- A connection error (such as error sending request) - Ollama, or the OpenAI-compatible endpoint, isn’t running or can’t be reached. Start it, check its address under Settings → Providers, then click Retry.
- The endpoint answers but rejects the model - pick one it serves for embeddings; a chat model won’t do.
Loach tries again by itself every minute, and straight away when you change the model or the server’s address. Messages sent meanwhile don’t wait on the model: once one couldn’t reach it, those in the next minute go straight to keyword search.
Indexing never seems to finish
Indexing n / m stays in the Library header, or items keep their Indexing badge.
Embedding runs in the background, a batch at a time, and a large Library on a CPU-only machine takes a while; keyword search works throughout. If the count stops moving, check Settings → Library: when something fails, the status turns into Embedding is paused with the reason (see above).
Passages a model refuses or fails on by themselves - too long for some servers, or one that crashes the model’s runner - are set aside for keyword search and don’t hold up the rest. Editing the source, new embedding settings or a rebuild gives them another try. Rebuild in Settings → Library starts over from scratch; use it too when a reply’s sources chip says excerpts were embedded by a different version of the model, for example after you pulled a newer model under the same name.
Changing the embedding model, or the address of the server it runs on, re-embeds every source, so the count starts over then.
A link won’t add
Add link stays greyed out, or fails with an error.
- The button stays greyed out - the address has no dot in its host, like
localhostor a bare intranet name. Those aren’t accepted; copy the page’s text into a New text instead. - Refusing to fetch … - links to loopback, private-network and VPN addresses are refused, the same as for web fetch. Copy the page’s text into a New text instead.
- This link serves …, which can’t be read as text - the link points at a file, such as a PDF, not a page. Download it and add it under Files.
- The page has no readable text - the page builds its content with scripts, which Loach doesn’t run. Copy its text into a New text.
- Fetch exceeded its 30s time budget - a slow page gets 30 seconds; anything past 5 MB is cut. Web fetch rate limit hit means more than 60 fetches in a minute, links and web fetch together - wait a moment.
Web fetch and Library links connect directly and never through a proxy, so a network that only lets traffic out through one can’t fetch links. A link is a snapshot: when the page changes, Refresh it.
The model ignored my source, or used the wrong part of it
A reply doesn’t reflect a source you attached.
Expand the sources chip above the reply. It lists the sources and says whether the model read them in full or got excerpts.
- Excerpts - only the passages most relevant to your message were sent. Name the topic in the message, set an embedding model so sources are also searched by meaning, or switch the chat’s Sources chip to Full text if they fit.
- Cut to fit, or a source named as left out - the sources didn’t fit the context window. Raise the chat’s context length, attach fewer sources, or switch to Excerpts. On an OpenAI-compatible chat Loach assumes a 32k window unless you set one; set the context length to your model’s real window if it’s larger. A Space made before Loach 1.6 stays on Full text, as it always worked - switch it to Auto on its Settings tab to have long sources searched once they don’t fit.
- No chip at all - the source isn’t reaching the chat. Check it’s attached to this chat or linked to its Space, and switched on (a Space’s Sources tab). Private Chat never uses sources.
Small local models sometimes overlook long context; a larger model helps. See How sources reach the model.
Keyword search finds nothing in Chinese, Japanese or Thai text
Excerpts from these sources don’t match the question - the chip shows the opening part of each source instead.
These languages don’t put spaces between words, so keyword search can only match long runs of text. Set a multilingual embedding model in Settings → Library (embeddinggemma, qwen3-embedding:0.6b or bge-m3) - search by meaning doesn’t depend on spaces - or switch the chat to Full text when the sources fit.
An item is marked “Truncated”
A Library item shows an amber Truncated badge.
An item keeps up to 200,000 characters - roughly a 100-page document - and a link’s page is read up to 5 MB. The rest was cut; a text cut at 200,000 characters ends with a note telling the model it’s incomplete. Split the document and add the parts as separate items, then put them in one dataset to attach them together. Editing a cut text doesn’t bring back what was cut.
A file won’t add, or a Space upload says “unreadable”
Adding a file to the Library fails with Couldn’t add …, or on a Space’s Sources tab an upload shows unreadable instead of a token count.
- not a format Loach can read - binary spreadsheets (
.xlsx), archives and legacy.docfiles have no text Loach can extract. Save the file as PDF, Word (.docx) or plain text and add that; CSV works as it is. A Space keeps such a file but marks it unreadable and never sends it to a model. - no readable text - it may be a scanned PDF - the PDF is a scan with no text layer (or the document is empty). Run it through OCR, or add its pages as images or a text version. The Library and Space uploads both refuse these.
- exceeds the 20 MB limit - each file can be at most 20 MB.
I can’t find a Library item
The Library page has no search box, and the search palette doesn’t list an item you know is there.
The Library is searched from the search palette (Ctrl + K); type in:library or pick Library in the scope dropdown to see only Library items and datasets. Items match by title, the opening of their text (about 280 characters) and a link’s address - not by words deeper in the body. Datasets match by name and description. To find a passage inside your sources, ask in a chat that has them attached.