Search across your documents
Finds the right fragment in your documents and passes it on, with no retelling by the model.
What the scenario looks like
- Execute + Data
- Data
Sometimes what you need is not an answer but the source: the exact line of the price list, the clause of the policy, the paragraph of the manual. A model retelling those loses figures and rewords conditions. Here what comes out is what the document says, verbatim.
What is inside
- What to look for — the entry: the query, from a person or from a previous step.
- Knowledge base — the
rag_kbnode. It does not search; it answers “search where”: which of your bases. Wired to the search with adataconnection. - Search across documents — the
rag_querynode. It turns the query into a vector, finds the nearest fragments and returns them along with how close each one is. - Fragments found — the exit: the text of the fragments, not an answer about them.
There is no model in this graph, and that is not an omission. If you want a written answer instead of quotes, take “A support bot that answers from your documents”: the same search, with an agent behind it.
What to set up for yourself
- The base id. The Knowledge base node carries
REPLACE_ME. Replace it with your own: open the base under Documents and the id is in the address bar. - How many fragments (
top_k). Five by default. More is noisier and more expensive; fewer risks missing an answer that is in the documents. - The closeness threshold (
score_threshold). Zero means “return whatever came back”. Raise it if plainly unrelated material shows up.
What to connect
No connections, but you do need a filled knowledge base. Open Documents, create one and upload files: PDF, DOCX, TXT, Markdown or a link to a page. Uploading splits the document into fragments and computes vectors right away; that is a paid operation and shows up on the spend screen. An empty base answers with emptiness, and no setting fixes that.