Overview
Retrieval-augmented question answering over your own documents. The template indexes three short documents into a vector collection, retrieves passages, and answers from those passages only, citing the source of each claim. It is the “Chat With Your Documents” template under Examples.
- Inputs -
question,search(the text used for retrieval), and three document texts (doc_specs,doc_charging,doc_warranty), allnodetool.input.StringInput. - Collection (
vector.Collection) - A collection namedaurora_docsthat uses the Ollamanomic-embed-textembedding model. Run Ollama with that model available. - Indexing (
vector.IndexTextChunk, three nodes) - Each document goes into the collection with adocument_idand asourcemetadata entry. - Retrieval (
vector.QueryText) - Queries the collection with thesearchtext and returns the top 5documents. - Context - A
Codenode joins the passages, and anodetool.text.Promptcombines them with the question. - Answer (
nodetool.agents.Agent) - Answers strictly from the passages, cites the passage heading after each claim, and replies “I couldn’t find that in the provided documents.” when the answer is absent. The template selectsgpt-5-mini. - Outputs -
AnswerandRetrieved Passages.
The search input is separate from the question. The shipped value, Aurora, appears in every document, so retrieval returns the whole corpus. Narrow it, for example to warranty, to retrieve one topic. Replace the three document inputs to use your own corpus.
Demo
Tags
rag, vectorstore, retrieval, llm, citations
Workflow Diagram
graph TD
collection["Collection (aurora_docs)"]
docs["StringInput x3 (documents)"]
index["IndexTextChunk x3"]
search["StringInput (search)"]
query["QueryText"]
join["Code (join passages)"]
question["StringInput (question)"]
prompt["Prompt"]
agent["Agent"]
answer["Output (Answer)"]
passages["Output (Retrieved Passages)"]
docs -->|text| index
collection --> index
collection --> query
search -->|text| query
query -->|documents| join
join -->|CONTEXT| prompt
question -->|QUESTION| prompt
prompt --> agent --> answer
join --> passages