TECHNOLOGY

LibreChat file queries: inspect the selected passages before changing the model

In this article
THE QUICK TAKE

A known file can be indexed yet missed by the generated retrieval query; citation limits do not explain every missing passage.

Start with a known missing fact

A user knows that a deployment exception appears in a policy attachment, but the agent gives only the general rule. Identify the exact clause and file before changing the answering model. The failure may occur in indexing, query generation, passage selection, or explanation. Each stage needs a different observation and a different corrective action.

Inspect the generated file query

The Chat with Files guide says the model writes a search query when calling file_search. Preserve that query with the question. If it omits the product suffix or qualifying condition, a relevant page can be missed even though the file is available. Compare the literal information need with what retrieval actually requested.

Understand passage selection

The current guide describes selecting 5 close chunks per attached file and keeping 10 overall. Treat these as documented behavior to check against the installed version, rather than a permanent guarantee for every deployment. Several documents can compete for the final passage set, so attaching another similar policy can change which exception reaches the model.

For a clause crossing a section boundary, inspect the returned text itself. Increasing the requested answer length cannot recover an exception that retrieval never supplied. Conversely, if the complete condition was present, investigate how the model interpreted it instead of immediately rebuilding the index.

Separate indexing from citations

The RAG configuration guide describes the independent indexing and retrieval service. The agent reference separately defines maxCitations, maxCitationsPerFile, and minRelevanceScore. These response-source controls should not be treated as interchangeable with the retrieval candidate pool. Record the effective settings before explaining a source’s absence.

Run a staged comparison

Use a direct question about the known clause, then the original broader question. Keep files and settings fixed. Check whether the generated query, selected passages, and final explanation differ. This local diagnostic distinguishes finding the evidence from using it correctly, without claiming a provider benchmark or a universal best model.

The existing guides to structural chunk boundaries and retrieval judgments help organize the comparison. Preserve a short record of the missing clause and the first stage where it disappears, making the eventual fix reviewable and targeted.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles