See it happen
Section titled “See it happen”A RAG Agent answers a question from a help-centre knowledge base. Next to the answer, sources lists the passages it used, so you can show or check them.
Example run: Chat Trigger, 1 item → RAG Agent, 1 item. Illustration of a run. Each source also carries knowledgeId and sourceId.
{
"response": "Yes. Gifts can be returned within 30 days for store credit [S1].",
"sources": [
{
"title": "Returns and refunds",
"url": "https://help.example/returns",
"score": 0.82
},
{
"title": "Gift cards",
"url": "https://help.example/gift-cards",
"score": 0.61
}
]
}The two halves of RAG
Section titled “The two halves of RAG”flowchart LR Docs[Files, pages, text] --> Split[Split into passages] --> Store[(Knowledge base)] Q[Question] --> Search[Search by meaning] --> Model[Model answers from the passages] --> A[Answer and sources] Store --> Search class Store awf-data class Search awf-flow class Model awf-ai class A awf-ok
Filling the knowledge base happens once, then again when the sources change. Answering happens on every question.
Fill the knowledge base
Section titled “Fill the knowledge base”- Add sources in the app The documents change rarely. No workflow needed. Example Add sources: files, web pages, open tabs or pasted text.
- An indexing workflow The source changes and should stay up to date. Example A Schedule re-reads a docs page every morning.
For an indexing workflow:
- Load the content with a loader, such as URL Document Loader, File Document Loader or Current Page Document Loader, or read the page with Get All Text.
- Send it to the Indexer, with a text splitter and a Local Knowledge node connected. Set Source link so a later run updates the same source instead of adding a copy.
- Run it on a Schedule if the source changes.
The knowledge base embeds the passages with its own model. See Embeddings and vectors.
Answer from it
Section titled “Answer from it”Connect the same Local Knowledge node to a RAG Agent, a Q&A Agent or a Tools Agent. Before you build the answering step, use Test search on the knowledge base page to check that a typical question finds the right passages.
You’ll notice this when…
Section titled “You’ll notice this when…”The answer is generic, as if the documents weren’t there
Nothing relevant was found. Run Test search with the same question. If the right passage doesn’t come up, add the missing source, or reword the question the way your documents phrase it.
The answer mixes up two topics
Loosely related passages reached the model. Raise Minimum relevance (for example to 0.5), use a Metadata filter to search only the right sources, or split unrelated documents into separate knowledge bases.
The answer adds details that aren’t in your documents
The prompt lets the model fill gaps. Say “answer only from the sources” and give it a fallback for missing answers.
The answer is out of date
The knowledge base still holds the old version. Re-add the source, or set Source link in your indexing workflow so each run replaces it.
sources is empty
No passage passed the search, often because Minimum relevance is set too high, or the Local Knowledge node isn’t connected to the agent’s knowledge slot. Lower the setting and check the connection.