← Example scenarios

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
Open in your workspace →

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

  1. What to look for — the entry: the query, from a person or from a previous step.
  2. Knowledge base — the rag_kb node. It does not search; it answers “search where”: which of your bases. Wired to the search with a data connection.
  3. Search across documents — the rag_query node. It turns the query into a vector, finds the nearest fragments and returns them along with how close each one is.
  4. 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.